SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
CIGAR string from BWA-SW output incorrect ? robs Bioinformatics 13 01-13-2012 04:07 AM
incorrect fastq calls by vcf2fq Phillip Morin Bioinformatics 0 10-12-2011 04:27 PM
BWA optional fields kobib Bioinformatics 0 09-06-2011 04:41 AM
SAMTools showing incorrect depth for a given position rdeborja Bioinformatics 1 05-07-2011 03:25 PM
Illumina samplesheet fields nicolallias Core Facilities 2 08-24-2010 01:16 AM

Reply
 
Thread Tools
Old 11-29-2011, 10:57 PM   #1
vinodhsri
Junior Member
 
Location: usa

Join Date: Nov 2011
Posts: 2
Default ERROR: [bcf_sync] incorrect number of fields..

Has anyone encountered this error ('[bcf_sync] incorrect number of fields (0 != 5)') and found a solution already:


vcfutils.pl splitchr -l 50000000 ucsc.hg19.fasta.fai | xargs -i echo samtools mpileup -I -C50 -m3 -F0.0002 -DSuf ucsc.hg19.fasta -r {} -b bam.list | bcftools view -bcvg - /> part-{}.bcf

[bcf_sync] incorrect number of fields (0 != 5) at 0:0
[afs] 0:0.000
xargs: echo: terminated by signal 13

Appreciate your advice.

vsri
vinodhsri is offline   Reply With Quote
Old 12-02-2011, 11:50 AM   #2
sflink
Junior Member
 
Location: Denver

Join Date: Oct 2010
Posts: 1
Default

I get the same error message with a command like:

nohup samtools mpileup -uf ref.fa s1.bam s2.bam

but it runs fine without the 'nohup'. Have you tried the command sequence without the pipes?
sflink is offline   Reply With Quote
Old 12-12-2011, 04:43 PM   #3
Mark.hz
Member
 
Location: Seattle

Join Date: Mar 2009
Posts: 18
Default

I ran into this problem as well, using mpileup/bcftools (samtools-0.1.18) to call variants from 19 bam files.
I willl try to run it wiiltout nohup.
Mark.hz is offline   Reply With Quote
Old 12-27-2011, 02:20 PM   #4
Mark.hz
Member
 
Location: Seattle

Join Date: Mar 2009
Posts: 18
Default

Still have this problem when doing bcftools view for a bcf file (mpileup generated):[bcf_sync] incorrect number of fields (6 != 5) at 7:1396330564
Any help?
Mark.hz is offline   Reply With Quote
Old 02-03-2012, 04:03 AM   #5
colindaven
Senior Member
 
Location: Germany

Join Date: Oct 2008
Posts: 391
Default

This is weird. I've used Samtools a lot before on bacterial references and never had this problem, yet on some human exomes it happens. Mpileup runs fine and then I repeatedly get

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

Reinstalling/updating samtools and bcftools doesn't seem to help.
colindaven is offline   Reply With Quote
Old 02-03-2012, 05:36 AM   #6
brentp
Member
 
Location: denver, co

Join Date: Apr 2010
Posts: 72
Default

usually this happens if your bcf file is truncated.
brentp is offline   Reply With Quote
Old 02-06-2012, 03:06 AM   #7
colindaven
Senior Member
 
Location: Germany

Join Date: Oct 2008
Posts: 391
Default

Actually, I think it wasn't truncated, but something added by nohup.

When I don't use nohup to run the mpileup command bcftools seems to work fine.
colindaven is offline   Reply With Quote
Old 02-06-2012, 08:25 AM   #8
Mark.hz
Member
 
Location: Seattle

Join Date: Mar 2009
Posts: 18
Default

I still got the error message without nohup: "[bcf_sync] incorrect number of fields (6 != 5) at 7:1396330564"
Mark.hz is offline   Reply With Quote
Old 04-23-2012, 10:08 AM   #9
salturki
Member
 
Location: Cambridge, UK

Join Date: May 2008
Posts: 12
Default

I just had the same error and by adding '-u' option to 'samtools mplieup' part of the pipeline , this solved the issue in my case.

Last edited by salturki; 04-23-2012 at 10:18 AM.
salturki is offline   Reply With Quote
Old 07-05-2012, 06:34 PM   #10
kweber2
Member
 
Location: Seattle, WA

Join Date: Aug 2010
Posts: 10
Smile Make sure you're using the correct reference genome

In case anyone else encounters this same problem ("[bcf_sync] incorrect number of fields (6 != 5)..."), here's another possible solution:

I was having this problem with multiple files, but then I realized I was using the wrong reference fasta as the argument to the mpileup -f option. It wasn't the same reference fasta that was used to create the bam files. When I switched to the correct one, the problem went away.
kweber2 is offline   Reply With Quote
Old 07-13-2012, 10:41 AM   #11
wangli
Member
 
Location: Texas

Join Date: Apr 2012
Posts: 48
Default

I also had the problem when using nohup. Without nohup. it goes well.
wangli is offline   Reply With Quote
Old 07-15-2012, 11:14 PM   #12
mmartin
Member
 
Location: Stockholm

Join Date: Aug 2009
Posts: 75
Default

The problem occurs when nohup is used with a Unix pipe.

I've just sent this reply to the samtools-help mailing list.

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".

To avoid the problem, you can run the command like this:

nohup samtools mpileup ... 2> stderr.txt | bcftools ... - > out.raw.bcf &

But I strongly suggest you try the 'screen' program. It is less fragile and
much more powerful than nohup. This is the briefest introduction I could find: http://www.askbjoernhansen.com/2006/...ix_screen.html
mmartin is offline   Reply With Quote
Old 11-11-2013, 07:30 PM   #13
Elsie
Member
 
Location: Australia

Join Date: Mar 2011
Posts: 85
Default

I'm getting this error with this command
samtools mpileup -D -S -u -f hg19.fasta child.bam father.bam mother.bam | bcftools view -vcgT trioauto -s sample.txt - > samtoolsCLR.vcf
The resulting vcf file just has the INFO and FORMAT ## lines, then:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT
[bcf_sync] incorrect number of fields (0 != 5) at 0:0
[afs] 0:0.000
I am using the correct fa reference file.
My samples file looks like:
child.bam
father.bam
mother.bam

Any advice appreciated.
Elsie is offline   Reply With Quote
Old 11-17-2013, 07:31 PM   #14
Elsie
Member
 
Location: Australia

Join Date: Mar 2011
Posts: 85
Default

Solved my own problem, simple typo in samples file I missed.
Elsie is offline   Reply With Quote
Old 01-29-2014, 06:18 PM   #15
Sacrolfur
Junior Member
 
Location: Russia, Novosibirsk

Join Date: Oct 2013
Posts: 6
Default

I had the same problem. I think the problen is that bcftools works with bcf-file but you don't specify for samtools to output bcf. So you should add to samtools mpileup command argument -g.

Hope this was helpful.
Sacrolfur is offline   Reply With Quote
Old 01-29-2014, 06:21 PM   #16
Elsie
Member
 
Location: Australia

Join Date: Mar 2011
Posts: 85
Default

Thanks Sacrolfur, I'll give that a try.
Elsie is offline   Reply With Quote
Old 01-29-2014, 06:40 PM   #17
Sacrolfur
Junior Member
 
Location: Russia, Novosibirsk

Join Date: Oct 2013
Posts: 6
Default

Try to use both commands separately and write output here.
Sacrolfur is offline   Reply With Quote
Old 08-05-2014, 05:34 PM   #18
silentio
Junior Member
 
Location: China

Join Date: Jul 2012
Posts: 4
Default

using -u when running samtools mpileup
silentio is offline   Reply With Quote
Old 09-05-2014, 06:33 AM   #19
simpson
Member
 
Location: Florida

Join Date: Dec 2012
Posts: 11
Default

I got the same problem. I tried the verson 1.0, 0.1.19, 0.1.18 and none worked.
Any one can help to solve this problem.

Here are my command and error message:

samtools mpileup -ugf F.fna F.sorted.bam > F.bcf
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[bcf_sync] incorrect number of fields (6 != 5) at 67:234
Segmentation fault
simpson is offline   Reply With Quote
Old 05-03-2015, 07:00 AM   #20
zhkzhou
Junior Member
 
Location: Beijing

Join Date: Nov 2011
Posts: 4
Default

I figure out it problem by update the bcftools from 0.1.17 to 1.1.
zhkzhou is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:27 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO