nanoporetech / modkit

A bioinformatics tool for working with modified bases
https://nanoporetech.com/
Other
128 stars 7 forks source link

IGV visualization of bedMethyl file #104

Open MaestSi opened 8 months ago

MaestSi commented 8 months ago

Dear all, I would like to know if there is a way to properly visualize methylation information obtained from modkit in IGV genome browser (testing IGV 2.17 snapshot). In particular, I ran Dorado with --modified-bases 5mC_5hmC 6mA parameter, I converted the unmapped bam file to fastq with samtools fastq -T '*’ $UNMAPPED_BAM > $FASTQ and I mapped the reads to the reference with minimap2 retaining all information in the reads' headers (-y parameter). Finally, I ran modkit pileup $BAM modkit.bedMethyl. I have been able to upload to IGV the bam file, and to color bases by modification. However, I would like to make the bedMethyl file more informative in a visual way. For example, I would like to color the track by %Showing methylation, is it possible? Any advice for better visualization would be greatly apprecciated.

mods_detection_example

Thanks, SM

ArtRand commented 8 months ago

Hello @MaestSi,

Sorry for the delay and thanks for the question. Probably the easiest thing is to convert the bedMethyl into a bedGraph or bigWig file. You would have to decide if you want to combine the top and bottom strands into one track or not, as well as whether or not to combine the modification calls. modkit has a --bedgraph option, or you can convert the bedMethyl in bash pretty easily. I'd recommend converting the bedMethyl into a bedGraph. Allowing additional formats is on the roadmap as well, mostly bigWig and bigBed. Coloring based on the %-methylation is an interesting idea, I'll have to play around with IGV to see.