Error in SNP calling using samtools and bcftools
2
0
Entering edit mode
8.9 years ago

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 • 6.5k views
ADD COMMENT
1
Entering edit mode

Maybe SNP call using bcftools post is interesting for you?

ADD REPLY
0
Entering edit mode
8.9 years ago

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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

@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

ADD REPLY
0
Entering edit mode
8.5 years ago
ricket.woo • 0

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

ADD COMMENT

Login before adding your answer.

Traffic: 2394 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6