dipper.models.assoc.D2PAssoc module¶
-
class
dipper.models.assoc.D2PAssoc.
D2PAssoc
(graph, definedby, disease_id, phenotype_id, onset=None, frequency=None, rel=None, disease_category=None, phenotype_category=None)¶ Bases:
dipper.models.assoc.Association.Assoc
A 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
(association_category=None)¶ 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 –
- disease_category – a biolink category CURIE for disease_id (defaults to
biolink:Disease via the constructor) :param phenotype_category: a biolink category CURIE for phenotype_id (defaults to biolink:PhenotypicFeature via the constructor) :return:
-
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:
-