nanopolish icon indicating copy to clipboard operation
nanopolish copied to clipboard

Support for bam output of methylation via the new MM tag?

Open oneillkza opened this issue 2 years ago • 2 comments

I know that @jts has been pretty involved with the development of the spec for the MM tag, and has even mentioned getting nanopolish to work with it. But it doesn't look like this has been implemented in a release.

Would it be possible to get bam output supported by nanopolish?

Or alternately, a utility script to add this information to the bam from the per-read methylation .tsv?

Thanks!

oneillkza avatar Sep 22 '21 17:09 oneillkza

Hi,

This is implemented in the https://github.com/jts/nanopolish/tree/methylation_bam branch. Note that nanopolish uses an extension of the tag that I describe here: https://github.com/samtools/hts-specs/pull/592 so isn't exactly what is currently described in the spec. Once this is resolved, I'll merge this branch in.

You might be interested in https://github.com/jts/mbtools, which has support for reading these tags in various ways.

Jared

jts avatar Sep 22 '21 17:09 jts

Thanks @jts !

mbtools look very useful for getting the data out of the bam, and I guess we'll just have to wait for the methylation_bam branch to be done for writing to the bams.

oneillkza avatar Sep 22 '21 18:09 oneillkza

Closing as this now merged in

jts avatar Aug 29 '22 17:08 jts