rnaglib.transforms.GraphRepresentation¶
- class rnaglib.transforms.GraphRepresentation(framework='nx', clean_edges=True, edge_map={'B35': 19, 'B53': 0, 'cHH': 1, 'cHS': 2, 'cHW': 3, 'cSH': 4, 'cSS': 5, 'cSW': 6, 'cWH': 7, 'cWS': 8, 'cWW': 9, 'tHH': 10, 'tHS': 11, 'tHW': 12, 'tSH': 13, 'tSS': 14, 'tSW': 15, 'tWH': 16, 'tWS': 17, 'tWW': 18}, etype_key='LW', **kwargs)[source]¶
Converts RNA into a Leontis-Westhof graph (2.5D) where nodes are residues and edges are either base pairs or backbones. Base pairs are annotated with the Leontis-Westhof classification for canonical and non-canonical base pairs.
- __init__(framework='nx', clean_edges=True, edge_map={'B35': 19, 'B53': 0, 'cHH': 1, 'cHS': 2, 'cHW': 3, 'cSH': 4, 'cSS': 5, 'cSW': 6, 'cWH': 7, 'cWS': 8, 'cWW': 9, 'tHH': 10, 'tHS': 11, 'tHW': 12, 'tSH': 13, 'tSS': 14, 'tSW': 15, 'tWH': 16, 'tWS': 17, 'tWW': 18}, etype_key='LW', **kwargs)[source]¶
Methods
__init__
([framework, clean_edges, edge_map, ...])batch
(samples)Batch a list of graph samples
to_dgl
(graph, features_dict)to_nx
(graph, features_dict)to_pyg
(graph, features_dict)Attributes
name
Just return the name of the representation