This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to annotate all SNPs from a BAM file, not just the variants?

I have a BAM file from sequencing data, and I would like to annotate all SNPs read in the sequencing, not just the variants. Is the following command correct for achieving this goal?

bcftools mpileup -Ou -f referencia.fasta arquivo.bam | \
  bcftools call -a FORMAT/DP --ploidy 2 --output-type z --output arquivo.vcf.gz

If this approach is incorrect, could you suggest the appropriate method or tool to accomplish this?

Thank you for your help!

annotation snp bam variant-calling

1 answer

You are using or conflating different concepts. annotate refers to adding info to vcf tools, SNPS are variants. I think what you are after is output all sites not just variant sites. If so, then the bcftools call command looks correct because you have not included -v, --variants-only flag.

Log in to answer this question.