modkit icon indicating copy to clipboard operation
modkit copied to clipboard

Advice on Preserving Methylation Tags (ML/MN) When Switching from Minimap2 to BWA

Open assafgrw opened this issue 5 months ago • 1 comments

Hello dear community,

I am studying epigenetics in cfDNA using ONT sequencing.

I have reasons to suspect that minimap2 does not handle short reads <150 bp well, and hence I want to use BWA instead.

The problem is, I don’t know how to use any other aligner in a way that would retain methylation data (e.g., MN, ML tags). BWA does not accept a BAM (ubam) as input.

I can generate a modified FASTQ using samtools fastq -T and then provide this file to BWA, but I’m not sure that this pipeline is ideal. Any other ideas?

Kind regards, Assaf Grunwald

assafgrw avatar Jul 17 '25 08:07 assafgrw

Hello @assafgrw,

I often use Minimap2 (through Dorado aligner) in my experiments to map reads <150bp (although not much below that). Have you tried using -x sr? (more options here).

If Minimap2 is definitely a non-starter, and you'd prefer to use a different alignment algorithm. You can use modkit repair (docs to re-add the MM/ML tags after alignment. I made this command to help with trimmed reads, but it will work in this case as well. If you're not sure that the tags are correct, use modkit modbam check-tags [--head 1000] on the output.

Happy to answer any additional questions.

ArtRand avatar Jul 18 '25 22:07 ArtRand