This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools SNP calling

I am using samtools for SNP calling from .sorted.bam file:

bcftools mpileup -f ref.fa bwa.sorted.bam | bcftools view -Ov - > bwa.bcftools.vcf

VCF file gives REF calling but does not give ALT calling: A view from vcd file:

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  bwa.sorted.bam
EL1.0ch00   23812   .   A   <*> 0   .   DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0  PL  0,0,0

Any suggestions will be helpful.

snp

1 answer

Hello evelyn ,

variant calling using bcftools is a 2-step process:

  1. First check each position of the reference if it contains a potential variant, using bcftools mpileup
  2. In a second step have a closer look at the positions that have potential variants and check more criteria, using bcftools call

The second step is missing in your case.

So a complete command line could look like this:

$ bcftools mpileup -Ou -f ref.fa aln.bam | bcftools call -mv -o output.vcf

fin swimmer

It worked, thanks!!!

Log in to answer this question.