rnaglib.transforms.AnnotatorFromDict

class rnaglib.transforms.AnnotatorFromDict(annotation_dict, name, **kwargs)[source]

Generic annotator which enables to add node-level features to a dataset by only using a dictionary mapping the node names to the desired node features. Enables to store information to build annotations in a JSON dictionary for instance.

Parameters:
  • annotation_dict (dict) – dictionary of type {node_id:node_feature}

  • name (str) – name to give to the feature resulting from this annotation

__init__(annotation_dict, name, **kwargs)[source]

Methods

__init__(annotation_dict, name, **kwargs)

forward(rna_dict)

Application of the transform to an RNA dictionary object