Skip to content

Commit

Permalink
Remove warning and fix plotting 3 points
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard10 committed Nov 28, 2021
1 parent ba376fd commit 10ca32a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions forgi/graph/bulge_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,9 @@ def get_node_dimensions(self, node, with_missing=False):
:return: A pair containing its dimensions
"""
if node[0] == 's':
if with_missing:
warnings.warn(
"get_node_dimensions: 'with_missing'-flag is currently ignored for stems!")
# if with_missing:
# warnings.warn(
# "get_node_dimensions: 'with_missing'-flag is currently ignored for stems!")
return (self.stem_length(node), self.stem_length(node))
else:
bd = self.get_bulge_dimensions(node, with_missing)
Expand Down
14 changes: 8 additions & 6 deletions forgi/threedee/visual/pymol.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,14 @@ def add_cg(self, cg, labels, color_modifier=1.0, plot_core_bulge_graph=True):

if self.display_3_points:
for i in range(1, cg.seq_length + 1):
for pos in cg.iter_three_points(i):
if cg.get_node_from_residue_num(i)[0] == "s":
c = "cyan"
else:
c = "magenta"
rna_plotter.add_sphere(pos, c, 0.4)
elem = cg.get_node_from_residue_num(i)
if not self.only_elements or elem in self.only_elements:
for pos in cg.iter_three_points(i):
if cg.get_node_from_residue_num(i)[0] == "s":
c = "cyan"
else:
c = "magenta"
rna_plotter.add_sphere(pos, c, 0.4)

if self.add_longrange:
for key1 in cg.longrange.keys():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def build_extension(self, ext):
"zip_safe":False,
"cmdclass":{'build_py': build_py, 'build_ext':construct_build_ext(build_ext)},
"name":'forgi',
"version":'2.1.0',
"version":'2.1.1',
"description":'RNA Graph Library',
"author":'Bernhard Thiel, Peter Kerpedjiev',
"author_email":'[email protected]',
Expand Down

0 comments on commit 10ca32a

Please sign in to comment.