samtools mpileup and bcftools error HELP~
1
0
Entering edit mode
8.2 years ago
linzhang • 0

Hi I have used the below command line to call SNPs: samtools-1.2/samtools mpileup -q 25 -Iu -f reference.fasta .*.sorted.bam | bcftools view -Nv - | vcfutils.pl varFilter -Q 20 - >multicall.vcf

but it gives the following error:

[mpileup] 20 samples in 20 input files [bcf_sync] incorrect number of fields (0 != 5) at 0:0 [afs] 0:0.000

and the vcf file it generated only has the headers

Please give any suggestions which will help a lot!! I have been stuck on this for so long...

snp • 3.7k views
ADD COMMENT
0
Entering edit mode
8.2 years ago

99% of the time this is due to using different versions of bcftools and samtools. If you're using samtools-1.2 then you MUST also be using bcftools-1.2.

ADD COMMENT
0
Entering edit mode

Thank you so much!! I tried it, it works!! but the generated .vcf file has some problems (all "<x>" in "ALT" column, all "0" in "QUAL" column, all "." in "Filter" column). Besides, it also says "[mpileup] 1 samples in 1 input files", of which I do not know whether it is an error or not.

ADD REPLY
0
Entering edit mode

The "[mpileup]..." thing is just informational. You'll need to use bcftools call in addition to bcftools view.

ADD REPLY
0
Entering edit mode

Thanks a lot! (the commands were given by a senior who no longer works in our lab, I didn't know bcftools call should be used in newer version for samtools mpileup output). I generated a better .vcf file using bcftools call instead of bcftools view, however the "ID" and "FILTER" column is still "."

The command I am using now is: samtools-1.2/samtools mpileup -d 8000 -q 25 -Iu -f reference.fasta *.sorted.bam | bcftools-1.2/bcftools call -m | bcftools-1.2/vcfutils.pl varFilter -Q 20 - > multivariantcall.vcf &

ADD REPLY

Login before adding your answer.

Traffic: 1693 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