[bcf_sync] incorrect number of fields (0 != 5) at 0:0
1
1
Entering edit mode
8.8 years ago
david.4.ray ▴ 10

I am attempting to call variants on some genomes and troubleshooting an error I'm getting from bcftools. My commands are as follows:

$SAMTOOLS_HOME/samtools mpileup -Q30 -C50 \
    -uf $REF_HOME/$REFGENOME$INPUT/$SPECIES"_R3_noDup.bam" \
    >$SPECIES"_mPileUp.vcf"

Followed by:

$BCFTOOLS_HOME/bcftools view -bvcg $SPECIES"_mPileUp.vcf" >$SPECIES"_variants_raw.bcf"

I get the following error:

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

I've seen this error mentioned in other posts and most everyone has resolved it by adding -u to the initial mpileup run. However, I've already got that in the initial run.

The mPileup seems to run fine. In fact, I can run the following and generate a consensus.fq with no trouble.

$BCFTOOLS_HOME/bcftools call -c $SPECIES"_mPileUp.vcf" |\
    $VCFTOOLS_HOME/vcfutils.pl vcf2fq >$SPECIES"_consensus.fq"

Any ideas? If you come to my place I will buy you a cookie.

Thanks.

software error snp genome samtools bcftools • 4.8k views
ADD COMMENT
0
Entering edit mode

Update:

I ran head and tail on my .vcf file and it doesn't look so good after all.

head yields what you would expect. Standard headers and such.

tail does something very strange. In fact, it appears to be trying to read a binary rather than a text file. No idea where this development is arising.

ADD REPLY
0
Entering edit mode
8.8 years ago

If you want bcf format, shouldn't you use -g in the mpileup command? Without it, you are making ordinary pileup output, not vcf.

ADD COMMENT

Login before adding your answer.

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