dipper.models.assoc.G2PAssoc module¶
-
class
dipper.models.assoc.G2PAssoc.
G2PAssoc
(graph, definedby, entity_id, phenotype_id, rel=None, entity_category=None, phenotype_category=None)¶ Bases:
dipper.models.assoc.Association.Assoc
A specific association class for defining Genotype-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. Note that genotypes are expected to be created and defined outside of this association, most likely by calling methods in the Genotype() class.
-
add_association_to_graph
(entity_category=None, phenotype_category=None)¶ Overrides Association by including bnode support
The reified relationship between a genotype (or any genotype part) and a phenotype is decorated with some provenance information. This makes the assumption that both the genotype and phenotype are classes.
currently hardcoded to map the annotation to the monarch namespace :param g: :param entity_category: a biolink category CURIE for self.sub :param phenotype_category: a biolink category CURIE for self.obj :return:
-
make_g2p_id
()¶ Make an association id for phenotypic associations that is defined by: source of association + (Annot subject) + relationship + phenotype/disease + environment + start stage + end stage
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:
-
set_environment
(environment_id)¶
-
set_stage
(start_stage_id, end_stage_id)¶
-