This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Parameter to check atleast 75% consensus of each nucleotide

I have a bam file and want to generate a consensus from it.

Which parameters in vcftools/bcftools are supposed to be tuned in order to have for each nucleotide atleast 75% consensus, with at-least "n" reads support? Please help me redirect if it is answered elsewhere. Many thanks in advance.

snp alignment genome

1 answer

You could filter your VCF file for variants that are found at more than 75% and then use bcftools consensus with your reference sequence and your filtered VCF file.

Hi Joesph. Many thanks. May I know if you mean to use the numbers from DP4 tag? But it appears these values are after filtering. I would like to do some thing like this "A consensus of at least 75% was required to support an SNV, and calls were required to be homozygous under a diploid model." Is there something which I am missing. Thanks.

You probably want to filter based on the alternate allele frequency (AF) with values above 0.75 being kept.

Log in to answer this question.