Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot visualize RNA co-folded structures #44

Open
itamarwe opened this issue Sep 19, 2022 · 0 comments
Open

Cannot visualize RNA co-folded structures #44

itamarwe opened this issue Sep 19, 2022 · 0 comments

Comments

@itamarwe
Copy link

I'm trying to visualize a co-folded structure, for example: ..(((...((((((..&.)))))).((((....)))))))
When trying to visualize the structure, I'm getting the following error:

# Plot structure from dotbracket notation
fvm.plot_rna(forgi.graph.bulge_graph.BulgeGraph.from_dotbracket('..(((...((((((..&.)))))).((((....)))))))'))
plt.show()

The error:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Input In [38], in <cell line: 2>()
      1 # Plot structure from dotbracket notation
----> 2 fvm.plot_rna(forgi.graph.bulge_graph.BulgeGraph.from_dotbracket('..(((...((((((..&.)))))).((((....)))))))'))
      3 plt.show()

File ~/miniconda3/lib/python3.9/site-packages/forgi/visual/mplotlib.py:300, in plot_rna(cg, ax, offset, text_kwargs, backbone_kwargs, basepair_kwargs, color, lighten, annotations)
    298 for i, coord in enumerate(coords):
    299     if color:
--> 300         c = el_to_color[el_string[i]]
    301         h,l,s = colorsys.rgb_to_hls(*mc.to_rgb(c))
    302         if lighten>0:

IndexError: string index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant