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.
Update:
I ran
head
andtail
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.