I am trying to make a consensus from a aligned bam file. This is my workflow:
bcftools mpileup -Ou -f reference_HG19.fa aligned.bam | bcftools call -mv -Ob -o calls.bcf bcftools index calls.bcf cat reference_HG19.fa | bcftools consensus calls.bcf > consensus.fa
However, the created consensus.fa file turned out to be identical with the reference_HG19.fa file. I looked at calls.bcf file with bcftools view, and it seems the following columns are all empty:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT aligned.bam
When I look at calls.bcf with samtools view I get the error "Aborted".
Does anyone have an idea how to solve this issues? Thank you very much!