Biostar Beta. Not for public use.
[bcf_sync] incorrect number of fields (0 != 5) at 0:0
1
Entering edit mode
15 months ago
david.4.ray • 10
United States

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.

ADD COMMENTlink
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 REPLYlink
0
Entering edit mode
17 months ago
swbarnes2 5.7k
United States

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 COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1