Question: BCFtools outputs error : [bcf_sync] incorrect number of fields (6 != 5)
2
gravatar for madkitty
6.6 years ago by
madkitty620
Canada
madkitty620 wrote:

I launched samtools to call SNPs on 2 BAM files, and when it comes to BCFtools, both returned an error.

$ samtools mpileup -ugf refseq.fa aln.bam | bcftools view -bvcg - > var.raw.bcf
$ bcftools view var.raw.bcf | vcfutils.pl varFilter -D 100 > var.flt.vcf

It returns the following error:

[bcf_sync] incorrect number of fields (6 != 5) at 13:51289753

 

What does it mean? Can I just skip this error and keep going with my list of SNPs and indels?

mpileup samtools bam bcftools • 5.5k views
ADD COMMENTlink modified 6.1 years ago by Biostar ♦♦ 20 • written 6.6 years ago by madkitty620

Did you use "nohup" somewhere in your unix command ?

ADD REPLYlink written 6.6 years ago by Ashutosh Pandey12k

No I didn't use nohup, what does it stand for and what does it do? I figured that error happens when the BCF file is truncated .. now I'm not sure why it's truncated yet

ADD REPLYlink modified 6.6 years ago • written 6.6 years ago by madkitty620

Is it matter if I use the "nohup" command ? I have met a similar problem as the error is

[bcf_sync] incorrect number of fields (0 != 5) at 0:0
[afs] 0:0.000

The following is the command that i have used to generate BCF file:

samtools mpileup -u -f ref.fa -C50 -DS -Q30 -q60 aln.sort.bam | bcftools view -bvceg - > var.raw.bcf

 

ADD REPLYlink written 6.3 years ago by linp05020

I have got an possible answer there: http://seqanswers.com/forums/showthread.php?t=15881

"nohup merges stdout and stderr of the command that it runs. bcftools then
doesn't know what to do with the input data since it also contains messages
such as '[mpileup] 1 samples in 1 input files'."

And without using the "nohup" my file works fine.

ADD REPLYlink written 6.3 years ago by linp05020
1
gravatar for madkitty
6.6 years ago by
madkitty620
Canada
madkitty620 wrote:

So I found my way around the problem. When samtools hasn't finished running the output BCF files are truncated which triggered that error when I run BCFtools. 

ADD COMMENTlink written 6.6 years ago by madkitty620
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2221 users visited in the last hour
_