dipper.models.assoc.D2PAssoc module¶
-
class
dipper.models.assoc.D2PAssoc.D2PAssoc(graph, definedby, disease_id, phenotype_id, onset=None, frequency=None, rel=None)¶ Bases:
dipper.models.assoc.Association.AssocA specific association class for defining Disease-to-Phenotype relationships This assumes that a graph is created outside of this class, and nodes get added. By default, an association will assume the “has_phenotype” relationship, unless otherwise specified.
-
add_association_to_graph()¶ The reified relationship between a disease and a phenotype is decorated with some provenance information. This makes the assumption that both the disease and phenotype are classes.
Parameters: g – Returns:
-
d2p_object_properties= {'frequency': ':frequencyOfPhenotype', 'onset': ':onset'}¶
-
make_d2p_id()¶ Make an association id for phenotypic associations with disease that is defined by: source of association + disease + relationship + phenotype + onset + frequency
Returns:
-
set_association_id(assoc_id=None)¶ This will set the association ID based on the internal parts of the association. To be used in cases where an external association identifier should be used.
Parameters: assoc_id – Returns:
-