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