Skip to content

Basepair links not showing with forgi.visual.mplotlib.plot_rna #56

Description

@mtod92

Hello,

I am plotting a structure with the following script:

import forgi.graph.bulge_graph as fgb
import forgi.visual.mplotlib as fvm
import matplotlib.pyplot as plt

seq = "AAAACCGGGCCUUUUACCCCAAAUUGGAA"
mfe =  "((((..(((..)))..))))...((..))"
bg, = fgb.BulgeGraph.from_fasta_text("".join([">test\n", seq, "\n", mfe]))

fvm.plot_rna(bg, ax=None, offset=(0, 0), text_kwargs={}, backbone_kwargs={'color':'k', 'lw':2}, basepair_kwargs={'color':'black', 'lw':5, 'linestyle':':', 'edgecolor':'black', 'alpha':1}, lighten=0.5)

The structure looks just fine, and I can modify the backbone appearance with the keyword arguments passed to matplotlib.
Unfortunately, the basepair just do not show up.
I am playing around with all possible arguments (color, line width, lifestyle, edge color, alpha) to try and have them showing up, but it's not working.

Any help?

Thanks

P.s. I suspect this is because I am not explicitly passing a list of paired nucleotides to be connected, and it is not clear to me how to do that at this moment.
P.p.s. nevermind, bg.to_pair_tuples() shows that the base pairs are correctly captured, so the issue is in the visualization itself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions