forgi 2.0.0 documentation

«  forgi.graph.sequence module   ::   Contents   ::   forgi.projection package  »

forgi.graph.transform_graphs module

This module has functions which take a Bulge-Graph as input and return a modified copy of it.

This is implemented as a class which is accessible as BulgeGraph.transformed. This way we can properly inherit in CoarseGrainRNA

class forgi.graph.transform_graphs.BGTransformer(bg)[source]

Bases: object

condensed()[source]

Return a condensed copy of the BulgeGraph.

In the condensed BulgeGraph only the first (most 5-prime) nucleotide or base-pair of each element is retained, and the other nts/ base-pairs are converted to missing residues. In basepairs the first basepair contains the most 5’ and most 3’ nucleotide of the stem.

«  forgi.graph.sequence module   ::   Contents   ::   forgi.projection package  »