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

Dear all,

I am using the newest version of samtools and bcftools (Version: 1.2 (using htslib 1.2.1)) to call the snps from sorted Bam files, but I have error all the time. I try to search online, but no clear answer about this, Could anyone can help me to figure out this?

This is the commands what I used:

[wu@correns RMR1_subsample_1000000]$ samtools mpileup -uf BRP.fas RMR1_sub_1000000_1_mit.sort.bam RMR1_sub_1000000_2_mit.sort.bam | bcftools view -vcg - > BRP.Chr01.vcf
[mpileup] 2 samples in 2 input files
<mpileup> Set max per-file depth to 4000
[E::cg] unknown type

I try to different computers and still met the error.

Best
ZQ

rna-seq snp

2 answers

You don't want the -v option, that's what's causing this to happen.

Hi Ryan,

I try your suggestion, but I still have the error like:

bash-3.2$ samtools mpileup -uf BRP.fas RMR1_sub_1000000_1_mit.sort.bam RMR1_sub_1000000_2_mit.sort.bam | bcftools view -cg - > RMR1_sub_1000000.raw.bcf
Error: Could not parse --min-ac g
[mpileup] 2 samples in 2 input files
<mpileup> Set max per-file depth to 4000

If I use the old version of the samtools and bcftools, it works and no error. What's the problem?

ZQ

@ZQ you should mark your code as proper code. it makes it easier to read. Also have a good look at the link posted by airan. bcftools have changed. You no longer call variants with bcftools view instead use bcftools call. Here is another link Samtools mpileup quality scores all zero

You'd better change using an older version of bcftools and samtools, since the options -v -c -g are of different meaning now.

Log in to answer this question.