BCFtools outputs error : [bcf_sync] incorrect number of fields (6 != 5)
1
4
Entering edit mode
10.4 years ago
madkitty ▴ 690

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?

bcftools samtools mpileup BAM • 7.1k views
ADD COMMENT
0
Entering edit mode

Did you use nohup somewhere in your unix command?

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

I have got an possible answer here:

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 REPLY
2
Entering edit mode
10.4 years ago
madkitty ▴ 690

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 COMMENT

Login before adding your answer.

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