I want to create consensus fasta sequence for long-read sequencing BAM files. I have used

samtools mpileup -uf reference.fasta file.bam | bcftools call -c | vcfutils.pl vcf2fq > sample.fq

seqtk seq -a sample.fq > sample.fasta

but variants present (in abundance) in the reads do not make it to the fasta file. I have added a lot of parameters, without success. Is there any other tool that I could use to create a consensus fasta file from bam files from long-read sequencing?

Similar questions and discussions