ViennaRNA / forgi

An RNA manipulation library.
GNU General Public License v3.0
52 stars 31 forks source link

Junctions generate not only regular multiloops but also other structures #51

Open Rimasss opened 1 year ago

Rimasss commented 1 year ago

According to the documentation junctions returns A list of tuples of multiloop segments. Each tuple contains the segments of one regular (i.e. not pseudoknotted) multiloop. but the output isn't always a list of only regular multiloops, for example:

>>> dbn= '...(((((((..((((((.........))))))......).((((((.......))))))..))))))...'
>>> bg, = forgi.load_rna(dbn)
>>> bg.junctions
[('f0', 't0'), ('m0', 'm1', 'm2')]

Although the output list is intended to indicate the quantity of regular multiloops, which is two in this instance, an inspection of the graph produced by Forna reveals that there is only one regular multiloop.

image

In addition, using describe_multiloop(multiloop)[source] we get:

>>> bg.describe_multiloop(('f0', 't0'))
{'open'}
>>> bg.describe_multiloop(('m0', 'm1', 'm2'))
{'regular_multiloop'}