tombo icon indicating copy to clipboard operation
tombo copied to clipboard

Alternate RNA 5mC model not shown when using "plot most_significant" function

Open eugenechow opened this issue 5 years ago • 4 comments

Hi, I installed tombo v1.5 using pip install ont-tombo[full] method and followed the tutorial to call 5mC modifications from direct RNA-seq data. However, when I ran the plot most_significant function with --plot-alternate-model 5mC argument, the pink bell curves representing the alternate 5mC model did not appear in the plot.

I then tried debugging and found an issue in the get_reg_kmers() function in _plot_commands.py.

By changing lines 1497-1499 from this: fwd_kmers[plot_center - alt_ref.central_pos - 1: plot_center + alt_ref.kmer_width - alt_ref.central_pos], to this: fwd_kmers[plot_center - alt_ref.central_pos - 2: plot_center + alt_ref.kmer_width - alt_ref.central_pos - 1], The alternate model reappears in plots. It seems that the string offset was incorrect, which generated wrong kmers that do not have an alternate model entry.

I am not sure if the fix is legit. Could you take a look at it?

Thanks!

eugenechow avatar Mar 16 '20 15:03 eugenechow

Thank you for this bug report and extra effort to debug! I'll have to take a closer look, but it seems that this might actually be an issue with the central position value stored in the rna 5mC alt model. Adding 1 to the alt_ref.central_pos attribute would have the same effect as your proposed fix, but this fix should break the same plotting function for the dna models which likely have the correct central_pos attribute.

marcus1487 avatar Mar 16 '20 15:03 marcus1487

Hi @marcus1487 , May I ask if this issue is only a cosmetic issue and despite the absence of the box I can still consider the C in centre of the region as the right 5mc for RNA data? Thanks a lot!

LeilyR avatar May 20 '20 16:05 LeilyR

Yes, I believe this is simply a cosmetic issue, but have not had a chance to investigate the root of this issue yet.

marcus1487 avatar May 20 '20 22:05 marcus1487

great , I am fine without it, just wanted to be sure it doesn't affect the result Thanks a million!

LeilyR avatar May 22 '20 07:05 LeilyR