I run the following command:
samtools mpileup -Ruf genome.fa merged.bam | bcftools view -gc - > merged.vcf
[mpileup] 1 samples in 1 input files <mpileup> Set max per-file depth to 8000
The output is only chrM and run ends with:
[bcf_sync] incorrect number of fields (6 != 5) at 0:11894
When I try hacking this and deleting chrM:
samtools mpileup -Ruf genome.fa merged.bam | grep -v "chrM"| bcftools view -gc - > merged.vcf
The output contains only metadata (lines starting with #)
Does anyone know the solution for this?
I really want to avoid pileup parsing, since this is really a pain.
EDIT: Problem solved. Used mpileup -Buf