tombo
tombo copied to clipboard
Alternate RNA 5mC model not shown when using "plot most_significant" function
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!
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.
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!
Yes, I believe this is simply a cosmetic issue, but have not had a chance to investigate the root of this issue yet.
great , I am fine without it, just wanted to be sure it doesn't affect the result Thanks a million!