From 9530752d75a22362e64b73e0c8e74e9b3d566035 Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Wed, 3 Apr 2024 17:17:56 -0500 Subject: [PATCH 1/6] Remove duplicate output of `Classes added` --- .../implementations/simpleobo/simple_obo_implementation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/oaklib/implementations/simpleobo/simple_obo_implementation.py b/src/oaklib/implementations/simpleobo/simple_obo_implementation.py index f99ade6a6..2d20c7513 100644 --- a/src/oaklib/implementations/simpleobo/simple_obo_implementation.py +++ b/src/oaklib/implementations/simpleobo/simple_obo_implementation.py @@ -800,7 +800,8 @@ def _id(): if stanza1 is None: stanza1 = Stanza(id=stanza2.id, type=stanza2.type) if stanza2.type == "Term": - yield kgcl.ClassCreation(id=_id(), about_node=stanza2.id) + # yield kgcl.ClassCreation(id=_id(), about_node=stanza2.id) + pass elif stanza2.type == "Typedef": yield kgcl.NodeCreation(id=_id(), about_node=stanza2.id) else: From f33b41fd5215b9c4354c3a2f05497a52955f6c17 Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Wed, 3 Apr 2024 17:20:34 -0500 Subject: [PATCH 2/6] formatted --- src/oaklib/datamodels/association.py | 989 +++++++++++++----- .../amigo/amigo_implementation.py | 8 - .../association_provider_interface.py | 9 +- src/oaklib/utilities/lexical/synonymizer.py | 4 +- tests/test_utilities/test_synonymizer.py | 3 +- 5 files changed, 751 insertions(+), 262 deletions(-) diff --git a/src/oaklib/datamodels/association.py b/src/oaklib/datamodels/association.py index eef50080c..82c645e74 100644 --- a/src/oaklib/datamodels/association.py +++ b/src/oaklib/datamodels/association.py @@ -42,13 +42,13 @@ dataclasses._init_fn = dataclasses_init_fn_with_kwargs # Namespaces -BIOLINK = CurieNamespace('biolink', 'https://w3id.org/biolink/vocab/') -LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') -OA = CurieNamespace('oa', 'http://www.w3.org/ns/oa#') -ONTOASSOC = CurieNamespace('ontoassoc', 'https://w3id.org/oak/association/') -RDF = CurieNamespace('rdf', 'http://example.org/UNKNOWN/rdf/') -RDFS = CurieNamespace('rdfs', 'http://example.org/UNKNOWN/rdfs/') -SSSOM = CurieNamespace('sssom', 'https://w3id.org/sssom/') +BIOLINK = CurieNamespace("biolink", "https://w3id.org/biolink/vocab/") +LINKML = CurieNamespace("linkml", "https://w3id.org/linkml/") +OA = CurieNamespace("oa", "http://www.w3.org/ns/oa#") +ONTOASSOC = CurieNamespace("ontoassoc", "https://w3id.org/oak/association/") +RDF = CurieNamespace("rdf", "http://example.org/UNKNOWN/rdf/") +RDFS = CurieNamespace("rdfs", "http://example.org/UNKNOWN/rdfs/") +SSSOM = CurieNamespace("sssom", "https://w3id.org/sssom/") DEFAULT_ = ONTOASSOC @@ -57,7 +57,6 @@ # Class references - @dataclass class PositiveOrNegativeAssociation(YAMLRoot): _inherited_slots: ClassVar[List[str]] = [] @@ -70,19 +69,29 @@ class PositiveOrNegativeAssociation(YAMLRoot): subject: Optional[Union[str, URIorCURIE]] = None predicate: Optional[Union[str, URIorCURIE]] = None object: Optional[Union[str, URIorCURIE]] = None - property_values: Optional[Union[Union[dict, "PropertyValue"], List[Union[dict, "PropertyValue"]]]] = empty_list() + property_values: Optional[ + Union[Union[dict, "PropertyValue"], List[Union[dict, "PropertyValue"]]] + ] = empty_list() subject_label: Optional[str] = None predicate_label: Optional[str] = None object_label: Optional[str] = None negated: Optional[Union[bool, Bool]] = None - publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( + empty_list() + ) evidence_type: Optional[Union[str, URIorCURIE]] = None - supporting_objects: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + supporting_objects: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( + empty_list() + ) primary_knowledge_source: Optional[Union[str, URIorCURIE]] = None aggregator_knowledge_source: Optional[Union[str, URIorCURIE]] = None - subject_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + subject_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( + empty_list() + ) subject_closure_label: Optional[Union[str, List[str]]] = empty_list() - object_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + object_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( + empty_list() + ) object_closure_label: Optional[Union[str, List[str]]] = empty_list() comments: Optional[Union[str, List[str]]] = empty_list() @@ -97,8 +106,13 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.object = URIorCURIE(self.object) if not isinstance(self.property_values, list): - self.property_values = [self.property_values] if self.property_values is not None else [] - self.property_values = [v if isinstance(v, PropertyValue) else PropertyValue(**as_dict(v)) for v in self.property_values] + self.property_values = ( + [self.property_values] if self.property_values is not None else [] + ) + self.property_values = [ + v if isinstance(v, PropertyValue) else PropertyValue(**as_dict(v)) + for v in self.property_values + ] if self.subject_label is not None and not isinstance(self.subject_label, str): self.subject_label = str(self.subject_label) @@ -114,36 +128,60 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.publications, list): self.publications = [self.publications] if self.publications is not None else [] - self.publications = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications] + self.publications = [ + v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications + ] if self.evidence_type is not None and not isinstance(self.evidence_type, URIorCURIE): self.evidence_type = URIorCURIE(self.evidence_type) if not isinstance(self.supporting_objects, list): - self.supporting_objects = [self.supporting_objects] if self.supporting_objects is not None else [] - self.supporting_objects = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.supporting_objects] - - if self.primary_knowledge_source is not None and not isinstance(self.primary_knowledge_source, URIorCURIE): + self.supporting_objects = ( + [self.supporting_objects] if self.supporting_objects is not None else [] + ) + self.supporting_objects = [ + v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.supporting_objects + ] + + if self.primary_knowledge_source is not None and not isinstance( + self.primary_knowledge_source, URIorCURIE + ): self.primary_knowledge_source = URIorCURIE(self.primary_knowledge_source) - if self.aggregator_knowledge_source is not None and not isinstance(self.aggregator_knowledge_source, URIorCURIE): + if self.aggregator_knowledge_source is not None and not isinstance( + self.aggregator_knowledge_source, URIorCURIE + ): self.aggregator_knowledge_source = URIorCURIE(self.aggregator_knowledge_source) if not isinstance(self.subject_closure, list): - self.subject_closure = [self.subject_closure] if self.subject_closure is not None else [] - self.subject_closure = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.subject_closure] + self.subject_closure = ( + [self.subject_closure] if self.subject_closure is not None else [] + ) + self.subject_closure = [ + v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.subject_closure + ] if not isinstance(self.subject_closure_label, list): - self.subject_closure_label = [self.subject_closure_label] if self.subject_closure_label is not None else [] - self.subject_closure_label = [v if isinstance(v, str) else str(v) for v in self.subject_closure_label] + self.subject_closure_label = ( + [self.subject_closure_label] if self.subject_closure_label is not None else [] + ) + self.subject_closure_label = [ + v if isinstance(v, str) else str(v) for v in self.subject_closure_label + ] if not isinstance(self.object_closure, list): self.object_closure = [self.object_closure] if self.object_closure is not None else [] - self.object_closure = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.object_closure] + self.object_closure = [ + v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.object_closure + ] if not isinstance(self.object_closure_label, list): - self.object_closure_label = [self.object_closure_label] if self.object_closure_label is not None else [] - self.object_closure_label = [v if isinstance(v, str) else str(v) for v in self.object_closure_label] + self.object_closure_label = ( + [self.object_closure_label] if self.object_closure_label is not None else [] + ) + self.object_closure_label = [ + v if isinstance(v, str) else str(v) for v in self.object_closure_label + ] if not isinstance(self.comments, list): self.comments = [self.comments] if self.comments is not None else [] @@ -157,6 +195,7 @@ class Association(PositiveOrNegativeAssociation): """ A generic association between a thing (subject) and another thing (object). """ + _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = OA["Annotation"] @@ -178,6 +217,7 @@ class NegatedAssociation(PositiveOrNegativeAssociation): """ A negated association between a thing (subject) and another thing (object). """ + _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["NegatedAssociation"] @@ -199,6 +239,7 @@ class PropertyValue(YAMLRoot): """ A generic tag-value that can be associated with an association. """ + _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["PropertyValue"] @@ -229,8 +270,12 @@ class RollupGroup(YAMLRoot): class_model_uri: ClassVar[URIRef] = ONTOASSOC.RollupGroup group_object: Optional[Union[str, URIorCURIE]] = None - sub_groups: Optional[Union[Union[dict, "RollupGroup"], List[Union[dict, "RollupGroup"]]]] = empty_list() - associations: Optional[Union[Union[dict, Association], List[Union[dict, Association]]]] = empty_list() + sub_groups: Optional[Union[Union[dict, "RollupGroup"], List[Union[dict, "RollupGroup"]]]] = ( + empty_list() + ) + associations: Optional[Union[Union[dict, Association], List[Union[dict, Association]]]] = ( + empty_list() + ) def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.group_object is not None and not isinstance(self.group_object, URIorCURIE): @@ -238,11 +283,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.sub_groups, list): self.sub_groups = [self.sub_groups] if self.sub_groups is not None else [] - self.sub_groups = [v if isinstance(v, RollupGroup) else RollupGroup(**as_dict(v)) for v in self.sub_groups] + self.sub_groups = [ + v if isinstance(v, RollupGroup) else RollupGroup(**as_dict(v)) for v in self.sub_groups + ] if not isinstance(self.associations, list): self.associations = [self.associations] if self.associations is not None else [] - self.associations = [v if isinstance(v, Association) else Association(**as_dict(v)) for v in self.associations] + self.associations = [ + v if isinstance(v, Association) else Association(**as_dict(v)) + for v in self.associations + ] super().__post_init__(**kwargs) @@ -252,6 +302,7 @@ class PairwiseCoAssociation(YAMLRoot): """ A collection of subjects co-associated with two objects """ + _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["PairwiseCoAssociation"] @@ -269,7 +320,9 @@ class PairwiseCoAssociation(YAMLRoot): number_subject_unique_to_entity1: Optional[int] = None number_subject_unique_to_entity2: Optional[int] = None subjects_in_common: Optional[Union[str, List[str]]] = empty_list() - associations_for_subjects_in_common: Optional[Union[Union[dict, Association], List[Union[dict, Association]]]] = empty_list() + associations_for_subjects_in_common: Optional[ + Union[Union[dict, Association], List[Union[dict, Association]]] + ] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.object1): @@ -288,28 +341,49 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.object2_label is not None and not isinstance(self.object2_label, str): self.object2_label = str(self.object2_label) - if self.number_subjects_in_common is not None and not isinstance(self.number_subjects_in_common, int): + if self.number_subjects_in_common is not None and not isinstance( + self.number_subjects_in_common, int + ): self.number_subjects_in_common = int(self.number_subjects_in_common) - if self.proportion_subjects_in_common is not None and not isinstance(self.proportion_subjects_in_common, float): + if self.proportion_subjects_in_common is not None and not isinstance( + self.proportion_subjects_in_common, float + ): self.proportion_subjects_in_common = float(self.proportion_subjects_in_common) - if self.number_subjects_in_union is not None and not isinstance(self.number_subjects_in_union, int): + if self.number_subjects_in_union is not None and not isinstance( + self.number_subjects_in_union, int + ): self.number_subjects_in_union = int(self.number_subjects_in_union) - if self.number_subject_unique_to_entity1 is not None and not isinstance(self.number_subject_unique_to_entity1, int): + if self.number_subject_unique_to_entity1 is not None and not isinstance( + self.number_subject_unique_to_entity1, int + ): self.number_subject_unique_to_entity1 = int(self.number_subject_unique_to_entity1) - if self.number_subject_unique_to_entity2 is not None and not isinstance(self.number_subject_unique_to_entity2, int): + if self.number_subject_unique_to_entity2 is not None and not isinstance( + self.number_subject_unique_to_entity2, int + ): self.number_subject_unique_to_entity2 = int(self.number_subject_unique_to_entity2) if not isinstance(self.subjects_in_common, list): - self.subjects_in_common = [self.subjects_in_common] if self.subjects_in_common is not None else [] - self.subjects_in_common = [v if isinstance(v, str) else str(v) for v in self.subjects_in_common] + self.subjects_in_common = ( + [self.subjects_in_common] if self.subjects_in_common is not None else [] + ) + self.subjects_in_common = [ + v if isinstance(v, str) else str(v) for v in self.subjects_in_common + ] if not isinstance(self.associations_for_subjects_in_common, list): - self.associations_for_subjects_in_common = [self.associations_for_subjects_in_common] if self.associations_for_subjects_in_common is not None else [] - self.associations_for_subjects_in_common = [v if isinstance(v, Association) else Association(**as_dict(v)) for v in self.associations_for_subjects_in_common] + self.associations_for_subjects_in_common = ( + [self.associations_for_subjects_in_common] + if self.associations_for_subjects_in_common is not None + else [] + ) + self.associations_for_subjects_in_common = [ + v if isinstance(v, Association) else Association(**as_dict(v)) + for v in self.associations_for_subjects_in_common + ] super().__post_init__(**kwargs) @@ -319,6 +393,7 @@ class ParserConfiguration(YAMLRoot): """ Settings that determine behavior when parsing associations. """ + _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["ParserConfiguration"] @@ -332,16 +407,24 @@ class ParserConfiguration(YAMLRoot): aggregator_knowledge_source: Optional[Union[str, URIorCURIE]] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self.preserve_negated_associations is not None and not isinstance(self.preserve_negated_associations, Bool): + if self.preserve_negated_associations is not None and not isinstance( + self.preserve_negated_associations, Bool + ): self.preserve_negated_associations = Bool(self.preserve_negated_associations) - if self.include_association_attributes is not None and not isinstance(self.include_association_attributes, Bool): + if self.include_association_attributes is not None and not isinstance( + self.include_association_attributes, Bool + ): self.include_association_attributes = Bool(self.include_association_attributes) - if self.primary_knowledge_source is not None and not isinstance(self.primary_knowledge_source, URIorCURIE): + if self.primary_knowledge_source is not None and not isinstance( + self.primary_knowledge_source, URIorCURIE + ): self.primary_knowledge_source = URIorCURIE(self.primary_knowledge_source) - if self.aggregator_knowledge_source is not None and not isinstance(self.aggregator_knowledge_source, URIorCURIE): + if self.aggregator_knowledge_source is not None and not isinstance( + self.aggregator_knowledge_source, URIorCURIE + ): self.aggregator_knowledge_source = URIorCURIE(self.aggregator_knowledge_source) super().__post_init__(**kwargs) @@ -352,6 +435,7 @@ class AssociationChange(YAMLRoot): """ A change object describing a change between two associations. """ + _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["AssociationChange"] @@ -364,7 +448,9 @@ class AssociationChange(YAMLRoot): new_date: Optional[str] = None primary_knowledge_source: Optional[Union[str, URIorCURIE]] = None aggregator_knowledge_source: Optional[Union[str, URIorCURIE]] = None - publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( + empty_list() + ) publication_is_added: Optional[Union[bool, Bool]] = None publication_is_deleted: Optional[Union[bool, Bool]] = None subject: Optional[Union[str, URIorCURIE]] = None @@ -378,7 +464,9 @@ class AssociationChange(YAMLRoot): is_specialization: Optional[Union[bool, Bool]] = None is_creation: Optional[Union[bool, Bool]] = None is_deletion: Optional[Union[bool, Bool]] = None - closure_predicates: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + closure_predicates: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( + empty_list() + ) closure_delta: Optional[int] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @@ -391,20 +479,30 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.new_date is not None and not isinstance(self.new_date, str): self.new_date = str(self.new_date) - if self.primary_knowledge_source is not None and not isinstance(self.primary_knowledge_source, URIorCURIE): + if self.primary_knowledge_source is not None and not isinstance( + self.primary_knowledge_source, URIorCURIE + ): self.primary_knowledge_source = URIorCURIE(self.primary_knowledge_source) - if self.aggregator_knowledge_source is not None and not isinstance(self.aggregator_knowledge_source, URIorCURIE): + if self.aggregator_knowledge_source is not None and not isinstance( + self.aggregator_knowledge_source, URIorCURIE + ): self.aggregator_knowledge_source = URIorCURIE(self.aggregator_knowledge_source) if not isinstance(self.publications, list): self.publications = [self.publications] if self.publications is not None else [] - self.publications = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications] + self.publications = [ + v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications + ] - if self.publication_is_added is not None and not isinstance(self.publication_is_added, Bool): + if self.publication_is_added is not None and not isinstance( + self.publication_is_added, Bool + ): self.publication_is_added = Bool(self.publication_is_added) - if self.publication_is_deleted is not None and not isinstance(self.publication_is_deleted, Bool): + if self.publication_is_deleted is not None and not isinstance( + self.publication_is_deleted, Bool + ): self.publication_is_deleted = Bool(self.publication_is_deleted) if self.subject is not None and not isinstance(self.subject, URIorCURIE): @@ -441,8 +539,12 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.is_deletion = Bool(self.is_deletion) if not isinstance(self.closure_predicates, list): - self.closure_predicates = [self.closure_predicates] if self.closure_predicates is not None else [] - self.closure_predicates = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.closure_predicates] + self.closure_predicates = ( + [self.closure_predicates] if self.closure_predicates is not None else [] + ) + self.closure_predicates = [ + v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.closure_predicates + ] if self.closure_delta is not None and not isinstance(self.closure_delta, int): self.closure_delta = int(self.closure_delta) @@ -457,197 +559,588 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): class slots: pass -slots.subject = Slot(uri=RDF.subject, name="subject", curie=RDF.curie('subject'), - model_uri=ONTOASSOC.subject, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.subject_label = Slot(uri=SSSOM.subject_label, name="subject_label", curie=SSSOM.curie('subject_label'), - model_uri=ONTOASSOC.subject_label, domain=None, range=Optional[str]) - -slots.predicate = Slot(uri=RDF.predicate, name="predicate", curie=RDF.curie('predicate'), - model_uri=ONTOASSOC.predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.predicate_label = Slot(uri=SSSOM.predicate_label, name="predicate_label", curie=SSSOM.curie('predicate_label'), - model_uri=ONTOASSOC.predicate_label, domain=None, range=Optional[str]) - -slots.object = Slot(uri=RDF.object, name="object", curie=RDF.curie('object'), - model_uri=ONTOASSOC.object, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.object_label = Slot(uri=SSSOM.object_label, name="object_label", curie=SSSOM.curie('object_label'), - model_uri=ONTOASSOC.object_label, domain=None, range=Optional[str]) - -slots.core_triple = Slot(uri=ONTOASSOC.core_triple, name="core_triple", curie=ONTOASSOC.curie('core_triple'), - model_uri=ONTOASSOC.core_triple, domain=None, range=Optional[str]) - -slots.negated = Slot(uri=ONTOASSOC.negated, name="negated", curie=ONTOASSOC.curie('negated'), - model_uri=ONTOASSOC.negated, domain=None, range=Optional[Union[bool, Bool]]) - -slots.property_values = Slot(uri=ONTOASSOC.property_values, name="property_values", curie=ONTOASSOC.curie('property_values'), - model_uri=ONTOASSOC.property_values, domain=None, range=Optional[Union[Union[dict, PropertyValue], List[Union[dict, PropertyValue]]]]) - -slots.group_object = Slot(uri=RDF.object, name="group_object", curie=RDF.curie('object'), - model_uri=ONTOASSOC.group_object, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.sub_groups = Slot(uri=ONTOASSOC.sub_groups, name="sub_groups", curie=ONTOASSOC.curie('sub_groups'), - model_uri=ONTOASSOC.sub_groups, domain=None, range=Optional[Union[Union[dict, RollupGroup], List[Union[dict, RollupGroup]]]]) - -slots.associations = Slot(uri=ONTOASSOC.associations, name="associations", curie=ONTOASSOC.curie('associations'), - model_uri=ONTOASSOC.associations, domain=None, range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]]) - -slots.original_subject = Slot(uri=BIOLINK.original_subject, name="original_subject", curie=BIOLINK.curie('original_subject'), - model_uri=ONTOASSOC.original_subject, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.original_predicate = Slot(uri=BIOLINK.original_predicate, name="original_predicate", curie=BIOLINK.curie('original_predicate'), - model_uri=ONTOASSOC.original_predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.original_object = Slot(uri=BIOLINK.original_object, name="original_object", curie=BIOLINK.curie('original_object'), - model_uri=ONTOASSOC.original_object, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.publications = Slot(uri=BIOLINK.publications, name="publications", curie=BIOLINK.curie('publications'), - model_uri=ONTOASSOC.publications, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) - -slots.primary_knowledge_source = Slot(uri=BIOLINK.primary_knowledge_source, name="primary_knowledge_source", curie=BIOLINK.curie('primary_knowledge_source'), - model_uri=ONTOASSOC.primary_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.aggregator_knowledge_source = Slot(uri=BIOLINK.aggregator_knowledge_source, name="aggregator_knowledge_source", curie=BIOLINK.curie('aggregator_knowledge_source'), - model_uri=ONTOASSOC.aggregator_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.evidence_type = Slot(uri=ONTOASSOC.evidence_type, name="evidence_type", curie=ONTOASSOC.curie('evidence_type'), - model_uri=ONTOASSOC.evidence_type, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.supporting_objects = Slot(uri=ONTOASSOC.supporting_objects, name="supporting_objects", curie=ONTOASSOC.curie('supporting_objects'), - model_uri=ONTOASSOC.supporting_objects, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) - -slots.comments = Slot(uri=RDFS.comment, name="comments", curie=RDFS.curie('comment'), - model_uri=ONTOASSOC.comments, domain=None, range=Optional[Union[str, List[str]]]) - -slots.denormalized_slot = Slot(uri=ONTOASSOC.denormalized_slot, name="denormalized_slot", curie=ONTOASSOC.curie('denormalized_slot'), - model_uri=ONTOASSOC.denormalized_slot, domain=None, range=Optional[str]) - -slots.date = Slot(uri=ONTOASSOC.date, name="date", curie=ONTOASSOC.curie('date'), - model_uri=ONTOASSOC.date, domain=None, range=Optional[str]) - -slots.modification_date = Slot(uri=ONTOASSOC.modification_date, name="modification_date", curie=ONTOASSOC.curie('modification_date'), - model_uri=ONTOASSOC.modification_date, domain=None, range=Optional[str]) - -slots.creation_date = Slot(uri=ONTOASSOC.creation_date, name="creation_date", curie=ONTOASSOC.curie('creation_date'), - model_uri=ONTOASSOC.creation_date, domain=None, range=Optional[str]) - -slots.diff_slot = Slot(uri=ONTOASSOC.diff_slot, name="diff_slot", curie=ONTOASSOC.curie('diff_slot'), - model_uri=ONTOASSOC.diff_slot, domain=None, range=Optional[str]) - -slots.old_date = Slot(uri=ONTOASSOC.old_date, name="old_date", curie=ONTOASSOC.curie('old_date'), - model_uri=ONTOASSOC.old_date, domain=None, range=Optional[str]) - -slots.new_date = Slot(uri=ONTOASSOC.new_date, name="new_date", curie=ONTOASSOC.curie('new_date'), - model_uri=ONTOASSOC.new_date, domain=None, range=Optional[str]) - -slots.summary_group = Slot(uri=ONTOASSOC.summary_group, name="summary_group", curie=ONTOASSOC.curie('summary_group'), - model_uri=ONTOASSOC.summary_group, domain=None, range=Optional[str]) - -slots.publication_is_added = Slot(uri=ONTOASSOC.publication_is_added, name="publication_is_added", curie=ONTOASSOC.curie('publication_is_added'), - model_uri=ONTOASSOC.publication_is_added, domain=None, range=Optional[Union[bool, Bool]]) - -slots.publication_is_deleted = Slot(uri=ONTOASSOC.publication_is_deleted, name="publication_is_deleted", curie=ONTOASSOC.curie('publication_is_deleted'), - model_uri=ONTOASSOC.publication_is_deleted, domain=None, range=Optional[Union[bool, Bool]]) - -slots.old_predicate = Slot(uri=ONTOASSOC.old_predicate, name="old_predicate", curie=ONTOASSOC.curie('old_predicate'), - model_uri=ONTOASSOC.old_predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.new_predicate = Slot(uri=ONTOASSOC.new_predicate, name="new_predicate", curie=ONTOASSOC.curie('new_predicate'), - model_uri=ONTOASSOC.new_predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.old_object = Slot(uri=ONTOASSOC.old_object, name="old_object", curie=ONTOASSOC.curie('old_object'), - model_uri=ONTOASSOC.old_object, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.new_object = Slot(uri=ONTOASSOC.new_object, name="new_object", curie=ONTOASSOC.curie('new_object'), - model_uri=ONTOASSOC.new_object, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.old_object_obsolete = Slot(uri=ONTOASSOC.old_object_obsolete, name="old_object_obsolete", curie=ONTOASSOC.curie('old_object_obsolete'), - model_uri=ONTOASSOC.old_object_obsolete, domain=None, range=Optional[Union[bool, Bool]]) - -slots.is_migration = Slot(uri=ONTOASSOC.is_migration, name="is_migration", curie=ONTOASSOC.curie('is_migration'), - model_uri=ONTOASSOC.is_migration, domain=None, range=Optional[Union[bool, Bool]]) - -slots.is_generalization = Slot(uri=ONTOASSOC.is_generalization, name="is_generalization", curie=ONTOASSOC.curie('is_generalization'), - model_uri=ONTOASSOC.is_generalization, domain=None, range=Optional[Union[bool, Bool]]) - -slots.is_specialization = Slot(uri=ONTOASSOC.is_specialization, name="is_specialization", curie=ONTOASSOC.curie('is_specialization'), - model_uri=ONTOASSOC.is_specialization, domain=None, range=Optional[Union[bool, Bool]]) - -slots.is_creation = Slot(uri=ONTOASSOC.is_creation, name="is_creation", curie=ONTOASSOC.curie('is_creation'), - model_uri=ONTOASSOC.is_creation, domain=None, range=Optional[Union[bool, Bool]]) - -slots.is_deletion = Slot(uri=ONTOASSOC.is_deletion, name="is_deletion", curie=ONTOASSOC.curie('is_deletion'), - model_uri=ONTOASSOC.is_deletion, domain=None, range=Optional[Union[bool, Bool]]) - -slots.closure_predicates = Slot(uri=ONTOASSOC.closure_predicates, name="closure_predicates", curie=ONTOASSOC.curie('closure_predicates'), - model_uri=ONTOASSOC.closure_predicates, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) - -slots.closure_delta = Slot(uri=ONTOASSOC.closure_delta, name="closure_delta", curie=ONTOASSOC.curie('closure_delta'), - model_uri=ONTOASSOC.closure_delta, domain=None, range=Optional[int]) - -slots.closure_information_content_delta = Slot(uri=ONTOASSOC.closure_information_content_delta, name="closure_information_content_delta", curie=ONTOASSOC.curie('closure_information_content_delta'), - model_uri=ONTOASSOC.closure_information_content_delta, domain=None, range=Optional[float]) - -slots.subject_closure = Slot(uri=ONTOASSOC.subject_closure, name="subject_closure", curie=ONTOASSOC.curie('subject_closure'), - model_uri=ONTOASSOC.subject_closure, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) - -slots.object_closure = Slot(uri=ONTOASSOC.object_closure, name="object_closure", curie=ONTOASSOC.curie('object_closure'), - model_uri=ONTOASSOC.object_closure, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) - -slots.subject_closure_label = Slot(uri=ONTOASSOC.subject_closure_label, name="subject_closure_label", curie=ONTOASSOC.curie('subject_closure_label'), - model_uri=ONTOASSOC.subject_closure_label, domain=None, range=Optional[Union[str, List[str]]]) - -slots.object_closure_label = Slot(uri=ONTOASSOC.object_closure_label, name="object_closure_label", curie=ONTOASSOC.curie('object_closure_label'), - model_uri=ONTOASSOC.object_closure_label, domain=None, range=Optional[Union[str, List[str]]]) - -slots.object1 = Slot(uri=ONTOASSOC.object1, name="object1", curie=ONTOASSOC.curie('object1'), - model_uri=ONTOASSOC.object1, domain=None, range=Union[str, URIorCURIE]) - -slots.object2 = Slot(uri=ONTOASSOC.object2, name="object2", curie=ONTOASSOC.curie('object2'), - model_uri=ONTOASSOC.object2, domain=None, range=Union[str, URIorCURIE]) - -slots.object1_label = Slot(uri=ONTOASSOC.object1_label, name="object1_label", curie=ONTOASSOC.curie('object1_label'), - model_uri=ONTOASSOC.object1_label, domain=None, range=Optional[str]) - -slots.object2_label = Slot(uri=ONTOASSOC.object2_label, name="object2_label", curie=ONTOASSOC.curie('object2_label'), - model_uri=ONTOASSOC.object2_label, domain=None, range=Optional[str]) - -slots.number_subjects_in_common = Slot(uri=ONTOASSOC.number_subjects_in_common, name="number_subjects_in_common", curie=ONTOASSOC.curie('number_subjects_in_common'), - model_uri=ONTOASSOC.number_subjects_in_common, domain=None, range=Optional[int]) - -slots.proportion_subjects_in_common = Slot(uri=ONTOASSOC.proportion_subjects_in_common, name="proportion_subjects_in_common", curie=ONTOASSOC.curie('proportion_subjects_in_common'), - model_uri=ONTOASSOC.proportion_subjects_in_common, domain=None, range=Optional[float]) - -slots.number_subjects_in_union = Slot(uri=ONTOASSOC.number_subjects_in_union, name="number_subjects_in_union", curie=ONTOASSOC.curie('number_subjects_in_union'), - model_uri=ONTOASSOC.number_subjects_in_union, domain=None, range=Optional[int]) - -slots.number_subject_unique_to_entity1 = Slot(uri=ONTOASSOC.number_subject_unique_to_entity1, name="number_subject_unique_to_entity1", curie=ONTOASSOC.curie('number_subject_unique_to_entity1'), - model_uri=ONTOASSOC.number_subject_unique_to_entity1, domain=None, range=Optional[int]) - -slots.number_subject_unique_to_entity2 = Slot(uri=ONTOASSOC.number_subject_unique_to_entity2, name="number_subject_unique_to_entity2", curie=ONTOASSOC.curie('number_subject_unique_to_entity2'), - model_uri=ONTOASSOC.number_subject_unique_to_entity2, domain=None, range=Optional[int]) - -slots.subjects_in_common = Slot(uri=ONTOASSOC.subjects_in_common, name="subjects_in_common", curie=ONTOASSOC.curie('subjects_in_common'), - model_uri=ONTOASSOC.subjects_in_common, domain=None, range=Optional[Union[str, List[str]]]) - -slots.associations_for_subjects_in_common = Slot(uri=ONTOASSOC.associations_for_subjects_in_common, name="associations_for_subjects_in_common", curie=ONTOASSOC.curie('associations_for_subjects_in_common'), - model_uri=ONTOASSOC.associations_for_subjects_in_common, domain=None, range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]]) - -slots.parserConfiguration__preserve_negated_associations = Slot(uri=ONTOASSOC.preserve_negated_associations, name="parserConfiguration__preserve_negated_associations", curie=ONTOASSOC.curie('preserve_negated_associations'), - model_uri=ONTOASSOC.parserConfiguration__preserve_negated_associations, domain=None, range=Optional[Union[bool, Bool]]) - -slots.parserConfiguration__include_association_attributes = Slot(uri=ONTOASSOC.include_association_attributes, name="parserConfiguration__include_association_attributes", curie=ONTOASSOC.curie('include_association_attributes'), - model_uri=ONTOASSOC.parserConfiguration__include_association_attributes, domain=None, range=Optional[Union[bool, Bool]]) - -slots.parserConfiguration__primary_knowledge_source = Slot(uri=BIOLINK.primary_knowledge_source, name="parserConfiguration__primary_knowledge_source", curie=BIOLINK.curie('primary_knowledge_source'), - model_uri=ONTOASSOC.parserConfiguration__primary_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.parserConfiguration__aggregator_knowledge_source = Slot(uri=BIOLINK.aggregator_knowledge_source, name="parserConfiguration__aggregator_knowledge_source", curie=BIOLINK.curie('aggregator_knowledge_source'), - model_uri=ONTOASSOC.parserConfiguration__aggregator_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) - -slots.Association_negated = Slot(uri=ONTOASSOC.negated, name="Association_negated", curie=ONTOASSOC.curie('negated'), - model_uri=ONTOASSOC.Association_negated, domain=Association, range=Optional[Union[bool, Bool]]) -slots.NegatedAssociation_negated = Slot(uri=ONTOASSOC.negated, name="NegatedAssociation_negated", curie=ONTOASSOC.curie('negated'), - model_uri=ONTOASSOC.NegatedAssociation_negated, domain=NegatedAssociation, range=Optional[Union[bool, Bool]]) +slots.subject = Slot( + uri=RDF.subject, + name="subject", + curie=RDF.curie("subject"), + model_uri=ONTOASSOC.subject, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.subject_label = Slot( + uri=SSSOM.subject_label, + name="subject_label", + curie=SSSOM.curie("subject_label"), + model_uri=ONTOASSOC.subject_label, + domain=None, + range=Optional[str], +) + +slots.predicate = Slot( + uri=RDF.predicate, + name="predicate", + curie=RDF.curie("predicate"), + model_uri=ONTOASSOC.predicate, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.predicate_label = Slot( + uri=SSSOM.predicate_label, + name="predicate_label", + curie=SSSOM.curie("predicate_label"), + model_uri=ONTOASSOC.predicate_label, + domain=None, + range=Optional[str], +) + +slots.object = Slot( + uri=RDF.object, + name="object", + curie=RDF.curie("object"), + model_uri=ONTOASSOC.object, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.object_label = Slot( + uri=SSSOM.object_label, + name="object_label", + curie=SSSOM.curie("object_label"), + model_uri=ONTOASSOC.object_label, + domain=None, + range=Optional[str], +) + +slots.core_triple = Slot( + uri=ONTOASSOC.core_triple, + name="core_triple", + curie=ONTOASSOC.curie("core_triple"), + model_uri=ONTOASSOC.core_triple, + domain=None, + range=Optional[str], +) + +slots.negated = Slot( + uri=ONTOASSOC.negated, + name="negated", + curie=ONTOASSOC.curie("negated"), + model_uri=ONTOASSOC.negated, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.property_values = Slot( + uri=ONTOASSOC.property_values, + name="property_values", + curie=ONTOASSOC.curie("property_values"), + model_uri=ONTOASSOC.property_values, + domain=None, + range=Optional[Union[Union[dict, PropertyValue], List[Union[dict, PropertyValue]]]], +) + +slots.group_object = Slot( + uri=RDF.object, + name="group_object", + curie=RDF.curie("object"), + model_uri=ONTOASSOC.group_object, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.sub_groups = Slot( + uri=ONTOASSOC.sub_groups, + name="sub_groups", + curie=ONTOASSOC.curie("sub_groups"), + model_uri=ONTOASSOC.sub_groups, + domain=None, + range=Optional[Union[Union[dict, RollupGroup], List[Union[dict, RollupGroup]]]], +) + +slots.associations = Slot( + uri=ONTOASSOC.associations, + name="associations", + curie=ONTOASSOC.curie("associations"), + model_uri=ONTOASSOC.associations, + domain=None, + range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]], +) + +slots.original_subject = Slot( + uri=BIOLINK.original_subject, + name="original_subject", + curie=BIOLINK.curie("original_subject"), + model_uri=ONTOASSOC.original_subject, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.original_predicate = Slot( + uri=BIOLINK.original_predicate, + name="original_predicate", + curie=BIOLINK.curie("original_predicate"), + model_uri=ONTOASSOC.original_predicate, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.original_object = Slot( + uri=BIOLINK.original_object, + name="original_object", + curie=BIOLINK.curie("original_object"), + model_uri=ONTOASSOC.original_object, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.publications = Slot( + uri=BIOLINK.publications, + name="publications", + curie=BIOLINK.curie("publications"), + model_uri=ONTOASSOC.publications, + domain=None, + range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], +) + +slots.primary_knowledge_source = Slot( + uri=BIOLINK.primary_knowledge_source, + name="primary_knowledge_source", + curie=BIOLINK.curie("primary_knowledge_source"), + model_uri=ONTOASSOC.primary_knowledge_source, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.aggregator_knowledge_source = Slot( + uri=BIOLINK.aggregator_knowledge_source, + name="aggregator_knowledge_source", + curie=BIOLINK.curie("aggregator_knowledge_source"), + model_uri=ONTOASSOC.aggregator_knowledge_source, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.evidence_type = Slot( + uri=ONTOASSOC.evidence_type, + name="evidence_type", + curie=ONTOASSOC.curie("evidence_type"), + model_uri=ONTOASSOC.evidence_type, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.supporting_objects = Slot( + uri=ONTOASSOC.supporting_objects, + name="supporting_objects", + curie=ONTOASSOC.curie("supporting_objects"), + model_uri=ONTOASSOC.supporting_objects, + domain=None, + range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], +) + +slots.comments = Slot( + uri=RDFS.comment, + name="comments", + curie=RDFS.curie("comment"), + model_uri=ONTOASSOC.comments, + domain=None, + range=Optional[Union[str, List[str]]], +) + +slots.denormalized_slot = Slot( + uri=ONTOASSOC.denormalized_slot, + name="denormalized_slot", + curie=ONTOASSOC.curie("denormalized_slot"), + model_uri=ONTOASSOC.denormalized_slot, + domain=None, + range=Optional[str], +) + +slots.date = Slot( + uri=ONTOASSOC.date, + name="date", + curie=ONTOASSOC.curie("date"), + model_uri=ONTOASSOC.date, + domain=None, + range=Optional[str], +) + +slots.modification_date = Slot( + uri=ONTOASSOC.modification_date, + name="modification_date", + curie=ONTOASSOC.curie("modification_date"), + model_uri=ONTOASSOC.modification_date, + domain=None, + range=Optional[str], +) + +slots.creation_date = Slot( + uri=ONTOASSOC.creation_date, + name="creation_date", + curie=ONTOASSOC.curie("creation_date"), + model_uri=ONTOASSOC.creation_date, + domain=None, + range=Optional[str], +) + +slots.diff_slot = Slot( + uri=ONTOASSOC.diff_slot, + name="diff_slot", + curie=ONTOASSOC.curie("diff_slot"), + model_uri=ONTOASSOC.diff_slot, + domain=None, + range=Optional[str], +) + +slots.old_date = Slot( + uri=ONTOASSOC.old_date, + name="old_date", + curie=ONTOASSOC.curie("old_date"), + model_uri=ONTOASSOC.old_date, + domain=None, + range=Optional[str], +) + +slots.new_date = Slot( + uri=ONTOASSOC.new_date, + name="new_date", + curie=ONTOASSOC.curie("new_date"), + model_uri=ONTOASSOC.new_date, + domain=None, + range=Optional[str], +) + +slots.summary_group = Slot( + uri=ONTOASSOC.summary_group, + name="summary_group", + curie=ONTOASSOC.curie("summary_group"), + model_uri=ONTOASSOC.summary_group, + domain=None, + range=Optional[str], +) + +slots.publication_is_added = Slot( + uri=ONTOASSOC.publication_is_added, + name="publication_is_added", + curie=ONTOASSOC.curie("publication_is_added"), + model_uri=ONTOASSOC.publication_is_added, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.publication_is_deleted = Slot( + uri=ONTOASSOC.publication_is_deleted, + name="publication_is_deleted", + curie=ONTOASSOC.curie("publication_is_deleted"), + model_uri=ONTOASSOC.publication_is_deleted, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.old_predicate = Slot( + uri=ONTOASSOC.old_predicate, + name="old_predicate", + curie=ONTOASSOC.curie("old_predicate"), + model_uri=ONTOASSOC.old_predicate, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.new_predicate = Slot( + uri=ONTOASSOC.new_predicate, + name="new_predicate", + curie=ONTOASSOC.curie("new_predicate"), + model_uri=ONTOASSOC.new_predicate, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.old_object = Slot( + uri=ONTOASSOC.old_object, + name="old_object", + curie=ONTOASSOC.curie("old_object"), + model_uri=ONTOASSOC.old_object, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.new_object = Slot( + uri=ONTOASSOC.new_object, + name="new_object", + curie=ONTOASSOC.curie("new_object"), + model_uri=ONTOASSOC.new_object, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.old_object_obsolete = Slot( + uri=ONTOASSOC.old_object_obsolete, + name="old_object_obsolete", + curie=ONTOASSOC.curie("old_object_obsolete"), + model_uri=ONTOASSOC.old_object_obsolete, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.is_migration = Slot( + uri=ONTOASSOC.is_migration, + name="is_migration", + curie=ONTOASSOC.curie("is_migration"), + model_uri=ONTOASSOC.is_migration, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.is_generalization = Slot( + uri=ONTOASSOC.is_generalization, + name="is_generalization", + curie=ONTOASSOC.curie("is_generalization"), + model_uri=ONTOASSOC.is_generalization, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.is_specialization = Slot( + uri=ONTOASSOC.is_specialization, + name="is_specialization", + curie=ONTOASSOC.curie("is_specialization"), + model_uri=ONTOASSOC.is_specialization, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.is_creation = Slot( + uri=ONTOASSOC.is_creation, + name="is_creation", + curie=ONTOASSOC.curie("is_creation"), + model_uri=ONTOASSOC.is_creation, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.is_deletion = Slot( + uri=ONTOASSOC.is_deletion, + name="is_deletion", + curie=ONTOASSOC.curie("is_deletion"), + model_uri=ONTOASSOC.is_deletion, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.closure_predicates = Slot( + uri=ONTOASSOC.closure_predicates, + name="closure_predicates", + curie=ONTOASSOC.curie("closure_predicates"), + model_uri=ONTOASSOC.closure_predicates, + domain=None, + range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], +) + +slots.closure_delta = Slot( + uri=ONTOASSOC.closure_delta, + name="closure_delta", + curie=ONTOASSOC.curie("closure_delta"), + model_uri=ONTOASSOC.closure_delta, + domain=None, + range=Optional[int], +) + +slots.closure_information_content_delta = Slot( + uri=ONTOASSOC.closure_information_content_delta, + name="closure_information_content_delta", + curie=ONTOASSOC.curie("closure_information_content_delta"), + model_uri=ONTOASSOC.closure_information_content_delta, + domain=None, + range=Optional[float], +) + +slots.subject_closure = Slot( + uri=ONTOASSOC.subject_closure, + name="subject_closure", + curie=ONTOASSOC.curie("subject_closure"), + model_uri=ONTOASSOC.subject_closure, + domain=None, + range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], +) + +slots.object_closure = Slot( + uri=ONTOASSOC.object_closure, + name="object_closure", + curie=ONTOASSOC.curie("object_closure"), + model_uri=ONTOASSOC.object_closure, + domain=None, + range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], +) + +slots.subject_closure_label = Slot( + uri=ONTOASSOC.subject_closure_label, + name="subject_closure_label", + curie=ONTOASSOC.curie("subject_closure_label"), + model_uri=ONTOASSOC.subject_closure_label, + domain=None, + range=Optional[Union[str, List[str]]], +) + +slots.object_closure_label = Slot( + uri=ONTOASSOC.object_closure_label, + name="object_closure_label", + curie=ONTOASSOC.curie("object_closure_label"), + model_uri=ONTOASSOC.object_closure_label, + domain=None, + range=Optional[Union[str, List[str]]], +) + +slots.object1 = Slot( + uri=ONTOASSOC.object1, + name="object1", + curie=ONTOASSOC.curie("object1"), + model_uri=ONTOASSOC.object1, + domain=None, + range=Union[str, URIorCURIE], +) + +slots.object2 = Slot( + uri=ONTOASSOC.object2, + name="object2", + curie=ONTOASSOC.curie("object2"), + model_uri=ONTOASSOC.object2, + domain=None, + range=Union[str, URIorCURIE], +) + +slots.object1_label = Slot( + uri=ONTOASSOC.object1_label, + name="object1_label", + curie=ONTOASSOC.curie("object1_label"), + model_uri=ONTOASSOC.object1_label, + domain=None, + range=Optional[str], +) + +slots.object2_label = Slot( + uri=ONTOASSOC.object2_label, + name="object2_label", + curie=ONTOASSOC.curie("object2_label"), + model_uri=ONTOASSOC.object2_label, + domain=None, + range=Optional[str], +) + +slots.number_subjects_in_common = Slot( + uri=ONTOASSOC.number_subjects_in_common, + name="number_subjects_in_common", + curie=ONTOASSOC.curie("number_subjects_in_common"), + model_uri=ONTOASSOC.number_subjects_in_common, + domain=None, + range=Optional[int], +) + +slots.proportion_subjects_in_common = Slot( + uri=ONTOASSOC.proportion_subjects_in_common, + name="proportion_subjects_in_common", + curie=ONTOASSOC.curie("proportion_subjects_in_common"), + model_uri=ONTOASSOC.proportion_subjects_in_common, + domain=None, + range=Optional[float], +) + +slots.number_subjects_in_union = Slot( + uri=ONTOASSOC.number_subjects_in_union, + name="number_subjects_in_union", + curie=ONTOASSOC.curie("number_subjects_in_union"), + model_uri=ONTOASSOC.number_subjects_in_union, + domain=None, + range=Optional[int], +) + +slots.number_subject_unique_to_entity1 = Slot( + uri=ONTOASSOC.number_subject_unique_to_entity1, + name="number_subject_unique_to_entity1", + curie=ONTOASSOC.curie("number_subject_unique_to_entity1"), + model_uri=ONTOASSOC.number_subject_unique_to_entity1, + domain=None, + range=Optional[int], +) + +slots.number_subject_unique_to_entity2 = Slot( + uri=ONTOASSOC.number_subject_unique_to_entity2, + name="number_subject_unique_to_entity2", + curie=ONTOASSOC.curie("number_subject_unique_to_entity2"), + model_uri=ONTOASSOC.number_subject_unique_to_entity2, + domain=None, + range=Optional[int], +) + +slots.subjects_in_common = Slot( + uri=ONTOASSOC.subjects_in_common, + name="subjects_in_common", + curie=ONTOASSOC.curie("subjects_in_common"), + model_uri=ONTOASSOC.subjects_in_common, + domain=None, + range=Optional[Union[str, List[str]]], +) + +slots.associations_for_subjects_in_common = Slot( + uri=ONTOASSOC.associations_for_subjects_in_common, + name="associations_for_subjects_in_common", + curie=ONTOASSOC.curie("associations_for_subjects_in_common"), + model_uri=ONTOASSOC.associations_for_subjects_in_common, + domain=None, + range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]], +) + +slots.parserConfiguration__preserve_negated_associations = Slot( + uri=ONTOASSOC.preserve_negated_associations, + name="parserConfiguration__preserve_negated_associations", + curie=ONTOASSOC.curie("preserve_negated_associations"), + model_uri=ONTOASSOC.parserConfiguration__preserve_negated_associations, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.parserConfiguration__include_association_attributes = Slot( + uri=ONTOASSOC.include_association_attributes, + name="parserConfiguration__include_association_attributes", + curie=ONTOASSOC.curie("include_association_attributes"), + model_uri=ONTOASSOC.parserConfiguration__include_association_attributes, + domain=None, + range=Optional[Union[bool, Bool]], +) + +slots.parserConfiguration__primary_knowledge_source = Slot( + uri=BIOLINK.primary_knowledge_source, + name="parserConfiguration__primary_knowledge_source", + curie=BIOLINK.curie("primary_knowledge_source"), + model_uri=ONTOASSOC.parserConfiguration__primary_knowledge_source, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.parserConfiguration__aggregator_knowledge_source = Slot( + uri=BIOLINK.aggregator_knowledge_source, + name="parserConfiguration__aggregator_knowledge_source", + curie=BIOLINK.curie("aggregator_knowledge_source"), + model_uri=ONTOASSOC.parserConfiguration__aggregator_knowledge_source, + domain=None, + range=Optional[Union[str, URIorCURIE]], +) + +slots.Association_negated = Slot( + uri=ONTOASSOC.negated, + name="Association_negated", + curie=ONTOASSOC.curie("negated"), + model_uri=ONTOASSOC.Association_negated, + domain=Association, + range=Optional[Union[bool, Bool]], +) + +slots.NegatedAssociation_negated = Slot( + uri=ONTOASSOC.negated, + name="NegatedAssociation_negated", + curie=ONTOASSOC.curie("negated"), + model_uri=ONTOASSOC.NegatedAssociation_negated, + domain=NegatedAssociation, + range=Optional[Union[bool, Bool]], +) diff --git a/src/oaklib/implementations/amigo/amigo_implementation.py b/src/oaklib/implementations/amigo/amigo_implementation.py index 80b76cf0b..c638213cc 100644 --- a/src/oaklib/implementations/amigo/amigo_implementation.py +++ b/src/oaklib/implementations/amigo/amigo_implementation.py @@ -211,7 +211,6 @@ def subset_members(self, subset: SUBSET_CURIE, **kwargs) -> Iterable[CURIE]: for doc in results: yield doc[ANNOTATION_CLASS] - def associations( self, subjects: Iterable[CURIE] = None, @@ -348,7 +347,6 @@ def association_counts( solr, fq, facet_field=ff, rows=0, facet_limit=limit, min_facet_count=min_facet_count ) - # def association_pairwise_coassociations( # self, # curies1: Iterable[CURIE], @@ -389,8 +387,6 @@ def association_counts( # yield ff[i], ff[i + 1] # - - def association_subject_counts( self, subjects: Iterable[CURIE] = None, @@ -446,10 +442,6 @@ def relationships( self._cache_nodes(nodes, [s, p, o]) yield s, p, o - - - - def basic_search( self, search_term: str, config: Optional[SearchConfiguration] = None ) -> Iterable[CURIE]: diff --git a/src/oaklib/interfaces/association_provider_interface.py b/src/oaklib/interfaces/association_provider_interface.py index e87445235..7d2050058 100644 --- a/src/oaklib/interfaces/association_provider_interface.py +++ b/src/oaklib/interfaces/association_provider_interface.py @@ -365,7 +365,9 @@ def association_pairwise_coassociations( curies1 = list(curies1) curies2 = list(curies2) logging.info(f"Finding co-associations between {curies1} and {curies2}") - assocmap = {c: list(self.associations(objects=[c], **kwargs)) for c in set(curies1+curies2)} + assocmap = { + c: list(self.associations(objects=[c], **kwargs)) for c in set(curies1 + curies2) + } assocmap1 = {c: assocmap[c] for c in curies1} assocmap2 = {c: assocmap[c] for c in curies2} for c1 in curies1: @@ -389,8 +391,9 @@ def association_pairwise_coassociations( number_subject_unique_to_entity2=len(elements2.difference(elements1)), ) if coassoc.number_subjects_in_union: - coassoc.proportion_subjects_in_common = (coassoc.number_subjects_in_common / - coassoc.number_subjects_in_union) + coassoc.proportion_subjects_in_common = ( + coassoc.number_subjects_in_common / coassoc.number_subjects_in_union + ) if include_entities: coassoc.subjects_in_common = list(common) coassoc.associations_for_subjects_in_common = assocs_to_common diff --git a/src/oaklib/utilities/lexical/synonymizer.py b/src/oaklib/utilities/lexical/synonymizer.py index 0d3bfecd6..743737908 100644 --- a/src/oaklib/utilities/lexical/synonymizer.py +++ b/src/oaklib/utilities/lexical/synonymizer.py @@ -85,7 +85,9 @@ def apply_synonymizer_to_terms( if qualifier is None or qualifier == "": if rule.in_place or scope_pred == "definition": # preserves the original synonym type - qualifier = pred_to_qual.get(scope_pred, scope_pred).lower() + qualifier = pred_to_qual.get( + scope_pred, scope_pred + ).lower() else: qualifier = "exact" n += 1 diff --git a/tests/test_utilities/test_synonymizer.py b/tests/test_utilities/test_synonymizer.py index 1fa29bd11..3dfb37807 100644 --- a/tests/test_utilities/test_synonymizer.py +++ b/tests/test_utilities/test_synonymizer.py @@ -81,7 +81,6 @@ def test_synonymizer(rule, input, expected): "the plasma membrane and nucleus, but including other subcellular structures.' " "to 'All of the contents of a cell excluding the plasma membrane and " "NUCLEUS, but including other subcellular structures.'" - ) ], ), @@ -105,7 +104,7 @@ def test_synonymizer(rule, input, expected): ], ) def test_syonymizer_on_terms(ruleset, include_all, terms, expected): - #adapter = get_adapter(f"simpleobo:{TEST_SIMPLE_ONT}") + # adapter = get_adapter(f"simpleobo:{TEST_SIMPLE_ONT}") adapter = get_adapter(f"{TEST_SIMPLE_ONT}") if isinstance(ruleset, Synonymizer): ruleset = RuleSet(rules=[ruleset]) From 127e2c984f72b5944060d0e9de2a707385d1f446 Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Wed, 3 Apr 2024 17:21:53 -0500 Subject: [PATCH 3/6] formatted --- src/oaklib/implementations/amigo/amigo_implementation.py | 8 -------- src/oaklib/interfaces/association_provider_interface.py | 9 ++++++--- src/oaklib/utilities/lexical/synonymizer.py | 4 +++- tests/test_utilities/test_synonymizer.py | 3 +-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/oaklib/implementations/amigo/amigo_implementation.py b/src/oaklib/implementations/amigo/amigo_implementation.py index 80b76cf0b..c638213cc 100644 --- a/src/oaklib/implementations/amigo/amigo_implementation.py +++ b/src/oaklib/implementations/amigo/amigo_implementation.py @@ -211,7 +211,6 @@ def subset_members(self, subset: SUBSET_CURIE, **kwargs) -> Iterable[CURIE]: for doc in results: yield doc[ANNOTATION_CLASS] - def associations( self, subjects: Iterable[CURIE] = None, @@ -348,7 +347,6 @@ def association_counts( solr, fq, facet_field=ff, rows=0, facet_limit=limit, min_facet_count=min_facet_count ) - # def association_pairwise_coassociations( # self, # curies1: Iterable[CURIE], @@ -389,8 +387,6 @@ def association_counts( # yield ff[i], ff[i + 1] # - - def association_subject_counts( self, subjects: Iterable[CURIE] = None, @@ -446,10 +442,6 @@ def relationships( self._cache_nodes(nodes, [s, p, o]) yield s, p, o - - - - def basic_search( self, search_term: str, config: Optional[SearchConfiguration] = None ) -> Iterable[CURIE]: diff --git a/src/oaklib/interfaces/association_provider_interface.py b/src/oaklib/interfaces/association_provider_interface.py index e87445235..7d2050058 100644 --- a/src/oaklib/interfaces/association_provider_interface.py +++ b/src/oaklib/interfaces/association_provider_interface.py @@ -365,7 +365,9 @@ def association_pairwise_coassociations( curies1 = list(curies1) curies2 = list(curies2) logging.info(f"Finding co-associations between {curies1} and {curies2}") - assocmap = {c: list(self.associations(objects=[c], **kwargs)) for c in set(curies1+curies2)} + assocmap = { + c: list(self.associations(objects=[c], **kwargs)) for c in set(curies1 + curies2) + } assocmap1 = {c: assocmap[c] for c in curies1} assocmap2 = {c: assocmap[c] for c in curies2} for c1 in curies1: @@ -389,8 +391,9 @@ def association_pairwise_coassociations( number_subject_unique_to_entity2=len(elements2.difference(elements1)), ) if coassoc.number_subjects_in_union: - coassoc.proportion_subjects_in_common = (coassoc.number_subjects_in_common / - coassoc.number_subjects_in_union) + coassoc.proportion_subjects_in_common = ( + coassoc.number_subjects_in_common / coassoc.number_subjects_in_union + ) if include_entities: coassoc.subjects_in_common = list(common) coassoc.associations_for_subjects_in_common = assocs_to_common diff --git a/src/oaklib/utilities/lexical/synonymizer.py b/src/oaklib/utilities/lexical/synonymizer.py index 0d3bfecd6..743737908 100644 --- a/src/oaklib/utilities/lexical/synonymizer.py +++ b/src/oaklib/utilities/lexical/synonymizer.py @@ -85,7 +85,9 @@ def apply_synonymizer_to_terms( if qualifier is None or qualifier == "": if rule.in_place or scope_pred == "definition": # preserves the original synonym type - qualifier = pred_to_qual.get(scope_pred, scope_pred).lower() + qualifier = pred_to_qual.get( + scope_pred, scope_pred + ).lower() else: qualifier = "exact" n += 1 diff --git a/tests/test_utilities/test_synonymizer.py b/tests/test_utilities/test_synonymizer.py index 1fa29bd11..3dfb37807 100644 --- a/tests/test_utilities/test_synonymizer.py +++ b/tests/test_utilities/test_synonymizer.py @@ -81,7 +81,6 @@ def test_synonymizer(rule, input, expected): "the plasma membrane and nucleus, but including other subcellular structures.' " "to 'All of the contents of a cell excluding the plasma membrane and " "NUCLEUS, but including other subcellular structures.'" - ) ], ), @@ -105,7 +104,7 @@ def test_synonymizer(rule, input, expected): ], ) def test_syonymizer_on_terms(ruleset, include_all, terms, expected): - #adapter = get_adapter(f"simpleobo:{TEST_SIMPLE_ONT}") + # adapter = get_adapter(f"simpleobo:{TEST_SIMPLE_ONT}") adapter = get_adapter(f"{TEST_SIMPLE_ONT}") if isinstance(ruleset, Synonymizer): ruleset = RuleSet(rules=[ruleset]) From 9d8342b5365a6a253ec3e3114f507191a145344e Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Wed, 3 Apr 2024 17:22:32 -0500 Subject: [PATCH 4/6] undo format --- src/oaklib/datamodels/association.py | 989 +++++++-------------------- 1 file changed, 248 insertions(+), 741 deletions(-) diff --git a/src/oaklib/datamodels/association.py b/src/oaklib/datamodels/association.py index 82c645e74..eef50080c 100644 --- a/src/oaklib/datamodels/association.py +++ b/src/oaklib/datamodels/association.py @@ -42,13 +42,13 @@ dataclasses._init_fn = dataclasses_init_fn_with_kwargs # Namespaces -BIOLINK = CurieNamespace("biolink", "https://w3id.org/biolink/vocab/") -LINKML = CurieNamespace("linkml", "https://w3id.org/linkml/") -OA = CurieNamespace("oa", "http://www.w3.org/ns/oa#") -ONTOASSOC = CurieNamespace("ontoassoc", "https://w3id.org/oak/association/") -RDF = CurieNamespace("rdf", "http://example.org/UNKNOWN/rdf/") -RDFS = CurieNamespace("rdfs", "http://example.org/UNKNOWN/rdfs/") -SSSOM = CurieNamespace("sssom", "https://w3id.org/sssom/") +BIOLINK = CurieNamespace('biolink', 'https://w3id.org/biolink/vocab/') +LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') +OA = CurieNamespace('oa', 'http://www.w3.org/ns/oa#') +ONTOASSOC = CurieNamespace('ontoassoc', 'https://w3id.org/oak/association/') +RDF = CurieNamespace('rdf', 'http://example.org/UNKNOWN/rdf/') +RDFS = CurieNamespace('rdfs', 'http://example.org/UNKNOWN/rdfs/') +SSSOM = CurieNamespace('sssom', 'https://w3id.org/sssom/') DEFAULT_ = ONTOASSOC @@ -57,6 +57,7 @@ # Class references + @dataclass class PositiveOrNegativeAssociation(YAMLRoot): _inherited_slots: ClassVar[List[str]] = [] @@ -69,29 +70,19 @@ class PositiveOrNegativeAssociation(YAMLRoot): subject: Optional[Union[str, URIorCURIE]] = None predicate: Optional[Union[str, URIorCURIE]] = None object: Optional[Union[str, URIorCURIE]] = None - property_values: Optional[ - Union[Union[dict, "PropertyValue"], List[Union[dict, "PropertyValue"]]] - ] = empty_list() + property_values: Optional[Union[Union[dict, "PropertyValue"], List[Union[dict, "PropertyValue"]]]] = empty_list() subject_label: Optional[str] = None predicate_label: Optional[str] = None object_label: Optional[str] = None negated: Optional[Union[bool, Bool]] = None - publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( - empty_list() - ) + publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() evidence_type: Optional[Union[str, URIorCURIE]] = None - supporting_objects: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( - empty_list() - ) + supporting_objects: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() primary_knowledge_source: Optional[Union[str, URIorCURIE]] = None aggregator_knowledge_source: Optional[Union[str, URIorCURIE]] = None - subject_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( - empty_list() - ) + subject_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() subject_closure_label: Optional[Union[str, List[str]]] = empty_list() - object_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( - empty_list() - ) + object_closure: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() object_closure_label: Optional[Union[str, List[str]]] = empty_list() comments: Optional[Union[str, List[str]]] = empty_list() @@ -106,13 +97,8 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.object = URIorCURIE(self.object) if not isinstance(self.property_values, list): - self.property_values = ( - [self.property_values] if self.property_values is not None else [] - ) - self.property_values = [ - v if isinstance(v, PropertyValue) else PropertyValue(**as_dict(v)) - for v in self.property_values - ] + self.property_values = [self.property_values] if self.property_values is not None else [] + self.property_values = [v if isinstance(v, PropertyValue) else PropertyValue(**as_dict(v)) for v in self.property_values] if self.subject_label is not None and not isinstance(self.subject_label, str): self.subject_label = str(self.subject_label) @@ -128,60 +114,36 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.publications, list): self.publications = [self.publications] if self.publications is not None else [] - self.publications = [ - v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications - ] + self.publications = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications] if self.evidence_type is not None and not isinstance(self.evidence_type, URIorCURIE): self.evidence_type = URIorCURIE(self.evidence_type) if not isinstance(self.supporting_objects, list): - self.supporting_objects = ( - [self.supporting_objects] if self.supporting_objects is not None else [] - ) - self.supporting_objects = [ - v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.supporting_objects - ] - - if self.primary_knowledge_source is not None and not isinstance( - self.primary_knowledge_source, URIorCURIE - ): + self.supporting_objects = [self.supporting_objects] if self.supporting_objects is not None else [] + self.supporting_objects = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.supporting_objects] + + if self.primary_knowledge_source is not None and not isinstance(self.primary_knowledge_source, URIorCURIE): self.primary_knowledge_source = URIorCURIE(self.primary_knowledge_source) - if self.aggregator_knowledge_source is not None and not isinstance( - self.aggregator_knowledge_source, URIorCURIE - ): + if self.aggregator_knowledge_source is not None and not isinstance(self.aggregator_knowledge_source, URIorCURIE): self.aggregator_knowledge_source = URIorCURIE(self.aggregator_knowledge_source) if not isinstance(self.subject_closure, list): - self.subject_closure = ( - [self.subject_closure] if self.subject_closure is not None else [] - ) - self.subject_closure = [ - v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.subject_closure - ] + self.subject_closure = [self.subject_closure] if self.subject_closure is not None else [] + self.subject_closure = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.subject_closure] if not isinstance(self.subject_closure_label, list): - self.subject_closure_label = ( - [self.subject_closure_label] if self.subject_closure_label is not None else [] - ) - self.subject_closure_label = [ - v if isinstance(v, str) else str(v) for v in self.subject_closure_label - ] + self.subject_closure_label = [self.subject_closure_label] if self.subject_closure_label is not None else [] + self.subject_closure_label = [v if isinstance(v, str) else str(v) for v in self.subject_closure_label] if not isinstance(self.object_closure, list): self.object_closure = [self.object_closure] if self.object_closure is not None else [] - self.object_closure = [ - v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.object_closure - ] + self.object_closure = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.object_closure] if not isinstance(self.object_closure_label, list): - self.object_closure_label = ( - [self.object_closure_label] if self.object_closure_label is not None else [] - ) - self.object_closure_label = [ - v if isinstance(v, str) else str(v) for v in self.object_closure_label - ] + self.object_closure_label = [self.object_closure_label] if self.object_closure_label is not None else [] + self.object_closure_label = [v if isinstance(v, str) else str(v) for v in self.object_closure_label] if not isinstance(self.comments, list): self.comments = [self.comments] if self.comments is not None else [] @@ -195,7 +157,6 @@ class Association(PositiveOrNegativeAssociation): """ A generic association between a thing (subject) and another thing (object). """ - _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = OA["Annotation"] @@ -217,7 +178,6 @@ class NegatedAssociation(PositiveOrNegativeAssociation): """ A negated association between a thing (subject) and another thing (object). """ - _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["NegatedAssociation"] @@ -239,7 +199,6 @@ class PropertyValue(YAMLRoot): """ A generic tag-value that can be associated with an association. """ - _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["PropertyValue"] @@ -270,12 +229,8 @@ class RollupGroup(YAMLRoot): class_model_uri: ClassVar[URIRef] = ONTOASSOC.RollupGroup group_object: Optional[Union[str, URIorCURIE]] = None - sub_groups: Optional[Union[Union[dict, "RollupGroup"], List[Union[dict, "RollupGroup"]]]] = ( - empty_list() - ) - associations: Optional[Union[Union[dict, Association], List[Union[dict, Association]]]] = ( - empty_list() - ) + sub_groups: Optional[Union[Union[dict, "RollupGroup"], List[Union[dict, "RollupGroup"]]]] = empty_list() + associations: Optional[Union[Union[dict, Association], List[Union[dict, Association]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.group_object is not None and not isinstance(self.group_object, URIorCURIE): @@ -283,16 +238,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.sub_groups, list): self.sub_groups = [self.sub_groups] if self.sub_groups is not None else [] - self.sub_groups = [ - v if isinstance(v, RollupGroup) else RollupGroup(**as_dict(v)) for v in self.sub_groups - ] + self.sub_groups = [v if isinstance(v, RollupGroup) else RollupGroup(**as_dict(v)) for v in self.sub_groups] if not isinstance(self.associations, list): self.associations = [self.associations] if self.associations is not None else [] - self.associations = [ - v if isinstance(v, Association) else Association(**as_dict(v)) - for v in self.associations - ] + self.associations = [v if isinstance(v, Association) else Association(**as_dict(v)) for v in self.associations] super().__post_init__(**kwargs) @@ -302,7 +252,6 @@ class PairwiseCoAssociation(YAMLRoot): """ A collection of subjects co-associated with two objects """ - _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["PairwiseCoAssociation"] @@ -320,9 +269,7 @@ class PairwiseCoAssociation(YAMLRoot): number_subject_unique_to_entity1: Optional[int] = None number_subject_unique_to_entity2: Optional[int] = None subjects_in_common: Optional[Union[str, List[str]]] = empty_list() - associations_for_subjects_in_common: Optional[ - Union[Union[dict, Association], List[Union[dict, Association]]] - ] = empty_list() + associations_for_subjects_in_common: Optional[Union[Union[dict, Association], List[Union[dict, Association]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.object1): @@ -341,49 +288,28 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.object2_label is not None and not isinstance(self.object2_label, str): self.object2_label = str(self.object2_label) - if self.number_subjects_in_common is not None and not isinstance( - self.number_subjects_in_common, int - ): + if self.number_subjects_in_common is not None and not isinstance(self.number_subjects_in_common, int): self.number_subjects_in_common = int(self.number_subjects_in_common) - if self.proportion_subjects_in_common is not None and not isinstance( - self.proportion_subjects_in_common, float - ): + if self.proportion_subjects_in_common is not None and not isinstance(self.proportion_subjects_in_common, float): self.proportion_subjects_in_common = float(self.proportion_subjects_in_common) - if self.number_subjects_in_union is not None and not isinstance( - self.number_subjects_in_union, int - ): + if self.number_subjects_in_union is not None and not isinstance(self.number_subjects_in_union, int): self.number_subjects_in_union = int(self.number_subjects_in_union) - if self.number_subject_unique_to_entity1 is not None and not isinstance( - self.number_subject_unique_to_entity1, int - ): + if self.number_subject_unique_to_entity1 is not None and not isinstance(self.number_subject_unique_to_entity1, int): self.number_subject_unique_to_entity1 = int(self.number_subject_unique_to_entity1) - if self.number_subject_unique_to_entity2 is not None and not isinstance( - self.number_subject_unique_to_entity2, int - ): + if self.number_subject_unique_to_entity2 is not None and not isinstance(self.number_subject_unique_to_entity2, int): self.number_subject_unique_to_entity2 = int(self.number_subject_unique_to_entity2) if not isinstance(self.subjects_in_common, list): - self.subjects_in_common = ( - [self.subjects_in_common] if self.subjects_in_common is not None else [] - ) - self.subjects_in_common = [ - v if isinstance(v, str) else str(v) for v in self.subjects_in_common - ] + self.subjects_in_common = [self.subjects_in_common] if self.subjects_in_common is not None else [] + self.subjects_in_common = [v if isinstance(v, str) else str(v) for v in self.subjects_in_common] if not isinstance(self.associations_for_subjects_in_common, list): - self.associations_for_subjects_in_common = ( - [self.associations_for_subjects_in_common] - if self.associations_for_subjects_in_common is not None - else [] - ) - self.associations_for_subjects_in_common = [ - v if isinstance(v, Association) else Association(**as_dict(v)) - for v in self.associations_for_subjects_in_common - ] + self.associations_for_subjects_in_common = [self.associations_for_subjects_in_common] if self.associations_for_subjects_in_common is not None else [] + self.associations_for_subjects_in_common = [v if isinstance(v, Association) else Association(**as_dict(v)) for v in self.associations_for_subjects_in_common] super().__post_init__(**kwargs) @@ -393,7 +319,6 @@ class ParserConfiguration(YAMLRoot): """ Settings that determine behavior when parsing associations. """ - _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["ParserConfiguration"] @@ -407,24 +332,16 @@ class ParserConfiguration(YAMLRoot): aggregator_knowledge_source: Optional[Union[str, URIorCURIE]] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self.preserve_negated_associations is not None and not isinstance( - self.preserve_negated_associations, Bool - ): + if self.preserve_negated_associations is not None and not isinstance(self.preserve_negated_associations, Bool): self.preserve_negated_associations = Bool(self.preserve_negated_associations) - if self.include_association_attributes is not None and not isinstance( - self.include_association_attributes, Bool - ): + if self.include_association_attributes is not None and not isinstance(self.include_association_attributes, Bool): self.include_association_attributes = Bool(self.include_association_attributes) - if self.primary_knowledge_source is not None and not isinstance( - self.primary_knowledge_source, URIorCURIE - ): + if self.primary_knowledge_source is not None and not isinstance(self.primary_knowledge_source, URIorCURIE): self.primary_knowledge_source = URIorCURIE(self.primary_knowledge_source) - if self.aggregator_knowledge_source is not None and not isinstance( - self.aggregator_knowledge_source, URIorCURIE - ): + if self.aggregator_knowledge_source is not None and not isinstance(self.aggregator_knowledge_source, URIorCURIE): self.aggregator_knowledge_source = URIorCURIE(self.aggregator_knowledge_source) super().__post_init__(**kwargs) @@ -435,7 +352,6 @@ class AssociationChange(YAMLRoot): """ A change object describing a change between two associations. """ - _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = ONTOASSOC["AssociationChange"] @@ -448,9 +364,7 @@ class AssociationChange(YAMLRoot): new_date: Optional[str] = None primary_knowledge_source: Optional[Union[str, URIorCURIE]] = None aggregator_knowledge_source: Optional[Union[str, URIorCURIE]] = None - publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( - empty_list() - ) + publications: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() publication_is_added: Optional[Union[bool, Bool]] = None publication_is_deleted: Optional[Union[bool, Bool]] = None subject: Optional[Union[str, URIorCURIE]] = None @@ -464,9 +378,7 @@ class AssociationChange(YAMLRoot): is_specialization: Optional[Union[bool, Bool]] = None is_creation: Optional[Union[bool, Bool]] = None is_deletion: Optional[Union[bool, Bool]] = None - closure_predicates: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = ( - empty_list() - ) + closure_predicates: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() closure_delta: Optional[int] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @@ -479,30 +391,20 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.new_date is not None and not isinstance(self.new_date, str): self.new_date = str(self.new_date) - if self.primary_knowledge_source is not None and not isinstance( - self.primary_knowledge_source, URIorCURIE - ): + if self.primary_knowledge_source is not None and not isinstance(self.primary_knowledge_source, URIorCURIE): self.primary_knowledge_source = URIorCURIE(self.primary_knowledge_source) - if self.aggregator_knowledge_source is not None and not isinstance( - self.aggregator_knowledge_source, URIorCURIE - ): + if self.aggregator_knowledge_source is not None and not isinstance(self.aggregator_knowledge_source, URIorCURIE): self.aggregator_knowledge_source = URIorCURIE(self.aggregator_knowledge_source) if not isinstance(self.publications, list): self.publications = [self.publications] if self.publications is not None else [] - self.publications = [ - v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications - ] + self.publications = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.publications] - if self.publication_is_added is not None and not isinstance( - self.publication_is_added, Bool - ): + if self.publication_is_added is not None and not isinstance(self.publication_is_added, Bool): self.publication_is_added = Bool(self.publication_is_added) - if self.publication_is_deleted is not None and not isinstance( - self.publication_is_deleted, Bool - ): + if self.publication_is_deleted is not None and not isinstance(self.publication_is_deleted, Bool): self.publication_is_deleted = Bool(self.publication_is_deleted) if self.subject is not None and not isinstance(self.subject, URIorCURIE): @@ -539,12 +441,8 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.is_deletion = Bool(self.is_deletion) if not isinstance(self.closure_predicates, list): - self.closure_predicates = ( - [self.closure_predicates] if self.closure_predicates is not None else [] - ) - self.closure_predicates = [ - v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.closure_predicates - ] + self.closure_predicates = [self.closure_predicates] if self.closure_predicates is not None else [] + self.closure_predicates = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.closure_predicates] if self.closure_delta is not None and not isinstance(self.closure_delta, int): self.closure_delta = int(self.closure_delta) @@ -559,588 +457,197 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): class slots: pass +slots.subject = Slot(uri=RDF.subject, name="subject", curie=RDF.curie('subject'), + model_uri=ONTOASSOC.subject, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.subject_label = Slot(uri=SSSOM.subject_label, name="subject_label", curie=SSSOM.curie('subject_label'), + model_uri=ONTOASSOC.subject_label, domain=None, range=Optional[str]) + +slots.predicate = Slot(uri=RDF.predicate, name="predicate", curie=RDF.curie('predicate'), + model_uri=ONTOASSOC.predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.predicate_label = Slot(uri=SSSOM.predicate_label, name="predicate_label", curie=SSSOM.curie('predicate_label'), + model_uri=ONTOASSOC.predicate_label, domain=None, range=Optional[str]) + +slots.object = Slot(uri=RDF.object, name="object", curie=RDF.curie('object'), + model_uri=ONTOASSOC.object, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.object_label = Slot(uri=SSSOM.object_label, name="object_label", curie=SSSOM.curie('object_label'), + model_uri=ONTOASSOC.object_label, domain=None, range=Optional[str]) + +slots.core_triple = Slot(uri=ONTOASSOC.core_triple, name="core_triple", curie=ONTOASSOC.curie('core_triple'), + model_uri=ONTOASSOC.core_triple, domain=None, range=Optional[str]) + +slots.negated = Slot(uri=ONTOASSOC.negated, name="negated", curie=ONTOASSOC.curie('negated'), + model_uri=ONTOASSOC.negated, domain=None, range=Optional[Union[bool, Bool]]) + +slots.property_values = Slot(uri=ONTOASSOC.property_values, name="property_values", curie=ONTOASSOC.curie('property_values'), + model_uri=ONTOASSOC.property_values, domain=None, range=Optional[Union[Union[dict, PropertyValue], List[Union[dict, PropertyValue]]]]) + +slots.group_object = Slot(uri=RDF.object, name="group_object", curie=RDF.curie('object'), + model_uri=ONTOASSOC.group_object, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.sub_groups = Slot(uri=ONTOASSOC.sub_groups, name="sub_groups", curie=ONTOASSOC.curie('sub_groups'), + model_uri=ONTOASSOC.sub_groups, domain=None, range=Optional[Union[Union[dict, RollupGroup], List[Union[dict, RollupGroup]]]]) + +slots.associations = Slot(uri=ONTOASSOC.associations, name="associations", curie=ONTOASSOC.curie('associations'), + model_uri=ONTOASSOC.associations, domain=None, range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]]) + +slots.original_subject = Slot(uri=BIOLINK.original_subject, name="original_subject", curie=BIOLINK.curie('original_subject'), + model_uri=ONTOASSOC.original_subject, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.original_predicate = Slot(uri=BIOLINK.original_predicate, name="original_predicate", curie=BIOLINK.curie('original_predicate'), + model_uri=ONTOASSOC.original_predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.original_object = Slot(uri=BIOLINK.original_object, name="original_object", curie=BIOLINK.curie('original_object'), + model_uri=ONTOASSOC.original_object, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.publications = Slot(uri=BIOLINK.publications, name="publications", curie=BIOLINK.curie('publications'), + model_uri=ONTOASSOC.publications, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + +slots.primary_knowledge_source = Slot(uri=BIOLINK.primary_knowledge_source, name="primary_knowledge_source", curie=BIOLINK.curie('primary_knowledge_source'), + model_uri=ONTOASSOC.primary_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.aggregator_knowledge_source = Slot(uri=BIOLINK.aggregator_knowledge_source, name="aggregator_knowledge_source", curie=BIOLINK.curie('aggregator_knowledge_source'), + model_uri=ONTOASSOC.aggregator_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.evidence_type = Slot(uri=ONTOASSOC.evidence_type, name="evidence_type", curie=ONTOASSOC.curie('evidence_type'), + model_uri=ONTOASSOC.evidence_type, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.supporting_objects = Slot(uri=ONTOASSOC.supporting_objects, name="supporting_objects", curie=ONTOASSOC.curie('supporting_objects'), + model_uri=ONTOASSOC.supporting_objects, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + +slots.comments = Slot(uri=RDFS.comment, name="comments", curie=RDFS.curie('comment'), + model_uri=ONTOASSOC.comments, domain=None, range=Optional[Union[str, List[str]]]) + +slots.denormalized_slot = Slot(uri=ONTOASSOC.denormalized_slot, name="denormalized_slot", curie=ONTOASSOC.curie('denormalized_slot'), + model_uri=ONTOASSOC.denormalized_slot, domain=None, range=Optional[str]) + +slots.date = Slot(uri=ONTOASSOC.date, name="date", curie=ONTOASSOC.curie('date'), + model_uri=ONTOASSOC.date, domain=None, range=Optional[str]) + +slots.modification_date = Slot(uri=ONTOASSOC.modification_date, name="modification_date", curie=ONTOASSOC.curie('modification_date'), + model_uri=ONTOASSOC.modification_date, domain=None, range=Optional[str]) + +slots.creation_date = Slot(uri=ONTOASSOC.creation_date, name="creation_date", curie=ONTOASSOC.curie('creation_date'), + model_uri=ONTOASSOC.creation_date, domain=None, range=Optional[str]) + +slots.diff_slot = Slot(uri=ONTOASSOC.diff_slot, name="diff_slot", curie=ONTOASSOC.curie('diff_slot'), + model_uri=ONTOASSOC.diff_slot, domain=None, range=Optional[str]) + +slots.old_date = Slot(uri=ONTOASSOC.old_date, name="old_date", curie=ONTOASSOC.curie('old_date'), + model_uri=ONTOASSOC.old_date, domain=None, range=Optional[str]) + +slots.new_date = Slot(uri=ONTOASSOC.new_date, name="new_date", curie=ONTOASSOC.curie('new_date'), + model_uri=ONTOASSOC.new_date, domain=None, range=Optional[str]) + +slots.summary_group = Slot(uri=ONTOASSOC.summary_group, name="summary_group", curie=ONTOASSOC.curie('summary_group'), + model_uri=ONTOASSOC.summary_group, domain=None, range=Optional[str]) + +slots.publication_is_added = Slot(uri=ONTOASSOC.publication_is_added, name="publication_is_added", curie=ONTOASSOC.curie('publication_is_added'), + model_uri=ONTOASSOC.publication_is_added, domain=None, range=Optional[Union[bool, Bool]]) + +slots.publication_is_deleted = Slot(uri=ONTOASSOC.publication_is_deleted, name="publication_is_deleted", curie=ONTOASSOC.curie('publication_is_deleted'), + model_uri=ONTOASSOC.publication_is_deleted, domain=None, range=Optional[Union[bool, Bool]]) + +slots.old_predicate = Slot(uri=ONTOASSOC.old_predicate, name="old_predicate", curie=ONTOASSOC.curie('old_predicate'), + model_uri=ONTOASSOC.old_predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.new_predicate = Slot(uri=ONTOASSOC.new_predicate, name="new_predicate", curie=ONTOASSOC.curie('new_predicate'), + model_uri=ONTOASSOC.new_predicate, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.old_object = Slot(uri=ONTOASSOC.old_object, name="old_object", curie=ONTOASSOC.curie('old_object'), + model_uri=ONTOASSOC.old_object, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.new_object = Slot(uri=ONTOASSOC.new_object, name="new_object", curie=ONTOASSOC.curie('new_object'), + model_uri=ONTOASSOC.new_object, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.old_object_obsolete = Slot(uri=ONTOASSOC.old_object_obsolete, name="old_object_obsolete", curie=ONTOASSOC.curie('old_object_obsolete'), + model_uri=ONTOASSOC.old_object_obsolete, domain=None, range=Optional[Union[bool, Bool]]) + +slots.is_migration = Slot(uri=ONTOASSOC.is_migration, name="is_migration", curie=ONTOASSOC.curie('is_migration'), + model_uri=ONTOASSOC.is_migration, domain=None, range=Optional[Union[bool, Bool]]) + +slots.is_generalization = Slot(uri=ONTOASSOC.is_generalization, name="is_generalization", curie=ONTOASSOC.curie('is_generalization'), + model_uri=ONTOASSOC.is_generalization, domain=None, range=Optional[Union[bool, Bool]]) + +slots.is_specialization = Slot(uri=ONTOASSOC.is_specialization, name="is_specialization", curie=ONTOASSOC.curie('is_specialization'), + model_uri=ONTOASSOC.is_specialization, domain=None, range=Optional[Union[bool, Bool]]) + +slots.is_creation = Slot(uri=ONTOASSOC.is_creation, name="is_creation", curie=ONTOASSOC.curie('is_creation'), + model_uri=ONTOASSOC.is_creation, domain=None, range=Optional[Union[bool, Bool]]) + +slots.is_deletion = Slot(uri=ONTOASSOC.is_deletion, name="is_deletion", curie=ONTOASSOC.curie('is_deletion'), + model_uri=ONTOASSOC.is_deletion, domain=None, range=Optional[Union[bool, Bool]]) + +slots.closure_predicates = Slot(uri=ONTOASSOC.closure_predicates, name="closure_predicates", curie=ONTOASSOC.curie('closure_predicates'), + model_uri=ONTOASSOC.closure_predicates, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + +slots.closure_delta = Slot(uri=ONTOASSOC.closure_delta, name="closure_delta", curie=ONTOASSOC.curie('closure_delta'), + model_uri=ONTOASSOC.closure_delta, domain=None, range=Optional[int]) + +slots.closure_information_content_delta = Slot(uri=ONTOASSOC.closure_information_content_delta, name="closure_information_content_delta", curie=ONTOASSOC.curie('closure_information_content_delta'), + model_uri=ONTOASSOC.closure_information_content_delta, domain=None, range=Optional[float]) + +slots.subject_closure = Slot(uri=ONTOASSOC.subject_closure, name="subject_closure", curie=ONTOASSOC.curie('subject_closure'), + model_uri=ONTOASSOC.subject_closure, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + +slots.object_closure = Slot(uri=ONTOASSOC.object_closure, name="object_closure", curie=ONTOASSOC.curie('object_closure'), + model_uri=ONTOASSOC.object_closure, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + +slots.subject_closure_label = Slot(uri=ONTOASSOC.subject_closure_label, name="subject_closure_label", curie=ONTOASSOC.curie('subject_closure_label'), + model_uri=ONTOASSOC.subject_closure_label, domain=None, range=Optional[Union[str, List[str]]]) + +slots.object_closure_label = Slot(uri=ONTOASSOC.object_closure_label, name="object_closure_label", curie=ONTOASSOC.curie('object_closure_label'), + model_uri=ONTOASSOC.object_closure_label, domain=None, range=Optional[Union[str, List[str]]]) + +slots.object1 = Slot(uri=ONTOASSOC.object1, name="object1", curie=ONTOASSOC.curie('object1'), + model_uri=ONTOASSOC.object1, domain=None, range=Union[str, URIorCURIE]) + +slots.object2 = Slot(uri=ONTOASSOC.object2, name="object2", curie=ONTOASSOC.curie('object2'), + model_uri=ONTOASSOC.object2, domain=None, range=Union[str, URIorCURIE]) + +slots.object1_label = Slot(uri=ONTOASSOC.object1_label, name="object1_label", curie=ONTOASSOC.curie('object1_label'), + model_uri=ONTOASSOC.object1_label, domain=None, range=Optional[str]) + +slots.object2_label = Slot(uri=ONTOASSOC.object2_label, name="object2_label", curie=ONTOASSOC.curie('object2_label'), + model_uri=ONTOASSOC.object2_label, domain=None, range=Optional[str]) + +slots.number_subjects_in_common = Slot(uri=ONTOASSOC.number_subjects_in_common, name="number_subjects_in_common", curie=ONTOASSOC.curie('number_subjects_in_common'), + model_uri=ONTOASSOC.number_subjects_in_common, domain=None, range=Optional[int]) + +slots.proportion_subjects_in_common = Slot(uri=ONTOASSOC.proportion_subjects_in_common, name="proportion_subjects_in_common", curie=ONTOASSOC.curie('proportion_subjects_in_common'), + model_uri=ONTOASSOC.proportion_subjects_in_common, domain=None, range=Optional[float]) + +slots.number_subjects_in_union = Slot(uri=ONTOASSOC.number_subjects_in_union, name="number_subjects_in_union", curie=ONTOASSOC.curie('number_subjects_in_union'), + model_uri=ONTOASSOC.number_subjects_in_union, domain=None, range=Optional[int]) + +slots.number_subject_unique_to_entity1 = Slot(uri=ONTOASSOC.number_subject_unique_to_entity1, name="number_subject_unique_to_entity1", curie=ONTOASSOC.curie('number_subject_unique_to_entity1'), + model_uri=ONTOASSOC.number_subject_unique_to_entity1, domain=None, range=Optional[int]) + +slots.number_subject_unique_to_entity2 = Slot(uri=ONTOASSOC.number_subject_unique_to_entity2, name="number_subject_unique_to_entity2", curie=ONTOASSOC.curie('number_subject_unique_to_entity2'), + model_uri=ONTOASSOC.number_subject_unique_to_entity2, domain=None, range=Optional[int]) + +slots.subjects_in_common = Slot(uri=ONTOASSOC.subjects_in_common, name="subjects_in_common", curie=ONTOASSOC.curie('subjects_in_common'), + model_uri=ONTOASSOC.subjects_in_common, domain=None, range=Optional[Union[str, List[str]]]) + +slots.associations_for_subjects_in_common = Slot(uri=ONTOASSOC.associations_for_subjects_in_common, name="associations_for_subjects_in_common", curie=ONTOASSOC.curie('associations_for_subjects_in_common'), + model_uri=ONTOASSOC.associations_for_subjects_in_common, domain=None, range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]]) + +slots.parserConfiguration__preserve_negated_associations = Slot(uri=ONTOASSOC.preserve_negated_associations, name="parserConfiguration__preserve_negated_associations", curie=ONTOASSOC.curie('preserve_negated_associations'), + model_uri=ONTOASSOC.parserConfiguration__preserve_negated_associations, domain=None, range=Optional[Union[bool, Bool]]) + +slots.parserConfiguration__include_association_attributes = Slot(uri=ONTOASSOC.include_association_attributes, name="parserConfiguration__include_association_attributes", curie=ONTOASSOC.curie('include_association_attributes'), + model_uri=ONTOASSOC.parserConfiguration__include_association_attributes, domain=None, range=Optional[Union[bool, Bool]]) + +slots.parserConfiguration__primary_knowledge_source = Slot(uri=BIOLINK.primary_knowledge_source, name="parserConfiguration__primary_knowledge_source", curie=BIOLINK.curie('primary_knowledge_source'), + model_uri=ONTOASSOC.parserConfiguration__primary_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.parserConfiguration__aggregator_knowledge_source = Slot(uri=BIOLINK.aggregator_knowledge_source, name="parserConfiguration__aggregator_knowledge_source", curie=BIOLINK.curie('aggregator_knowledge_source'), + model_uri=ONTOASSOC.parserConfiguration__aggregator_knowledge_source, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.Association_negated = Slot(uri=ONTOASSOC.negated, name="Association_negated", curie=ONTOASSOC.curie('negated'), + model_uri=ONTOASSOC.Association_negated, domain=Association, range=Optional[Union[bool, Bool]]) -slots.subject = Slot( - uri=RDF.subject, - name="subject", - curie=RDF.curie("subject"), - model_uri=ONTOASSOC.subject, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.subject_label = Slot( - uri=SSSOM.subject_label, - name="subject_label", - curie=SSSOM.curie("subject_label"), - model_uri=ONTOASSOC.subject_label, - domain=None, - range=Optional[str], -) - -slots.predicate = Slot( - uri=RDF.predicate, - name="predicate", - curie=RDF.curie("predicate"), - model_uri=ONTOASSOC.predicate, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.predicate_label = Slot( - uri=SSSOM.predicate_label, - name="predicate_label", - curie=SSSOM.curie("predicate_label"), - model_uri=ONTOASSOC.predicate_label, - domain=None, - range=Optional[str], -) - -slots.object = Slot( - uri=RDF.object, - name="object", - curie=RDF.curie("object"), - model_uri=ONTOASSOC.object, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.object_label = Slot( - uri=SSSOM.object_label, - name="object_label", - curie=SSSOM.curie("object_label"), - model_uri=ONTOASSOC.object_label, - domain=None, - range=Optional[str], -) - -slots.core_triple = Slot( - uri=ONTOASSOC.core_triple, - name="core_triple", - curie=ONTOASSOC.curie("core_triple"), - model_uri=ONTOASSOC.core_triple, - domain=None, - range=Optional[str], -) - -slots.negated = Slot( - uri=ONTOASSOC.negated, - name="negated", - curie=ONTOASSOC.curie("negated"), - model_uri=ONTOASSOC.negated, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.property_values = Slot( - uri=ONTOASSOC.property_values, - name="property_values", - curie=ONTOASSOC.curie("property_values"), - model_uri=ONTOASSOC.property_values, - domain=None, - range=Optional[Union[Union[dict, PropertyValue], List[Union[dict, PropertyValue]]]], -) - -slots.group_object = Slot( - uri=RDF.object, - name="group_object", - curie=RDF.curie("object"), - model_uri=ONTOASSOC.group_object, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.sub_groups = Slot( - uri=ONTOASSOC.sub_groups, - name="sub_groups", - curie=ONTOASSOC.curie("sub_groups"), - model_uri=ONTOASSOC.sub_groups, - domain=None, - range=Optional[Union[Union[dict, RollupGroup], List[Union[dict, RollupGroup]]]], -) - -slots.associations = Slot( - uri=ONTOASSOC.associations, - name="associations", - curie=ONTOASSOC.curie("associations"), - model_uri=ONTOASSOC.associations, - domain=None, - range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]], -) - -slots.original_subject = Slot( - uri=BIOLINK.original_subject, - name="original_subject", - curie=BIOLINK.curie("original_subject"), - model_uri=ONTOASSOC.original_subject, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.original_predicate = Slot( - uri=BIOLINK.original_predicate, - name="original_predicate", - curie=BIOLINK.curie("original_predicate"), - model_uri=ONTOASSOC.original_predicate, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.original_object = Slot( - uri=BIOLINK.original_object, - name="original_object", - curie=BIOLINK.curie("original_object"), - model_uri=ONTOASSOC.original_object, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.publications = Slot( - uri=BIOLINK.publications, - name="publications", - curie=BIOLINK.curie("publications"), - model_uri=ONTOASSOC.publications, - domain=None, - range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], -) - -slots.primary_knowledge_source = Slot( - uri=BIOLINK.primary_knowledge_source, - name="primary_knowledge_source", - curie=BIOLINK.curie("primary_knowledge_source"), - model_uri=ONTOASSOC.primary_knowledge_source, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.aggregator_knowledge_source = Slot( - uri=BIOLINK.aggregator_knowledge_source, - name="aggregator_knowledge_source", - curie=BIOLINK.curie("aggregator_knowledge_source"), - model_uri=ONTOASSOC.aggregator_knowledge_source, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.evidence_type = Slot( - uri=ONTOASSOC.evidence_type, - name="evidence_type", - curie=ONTOASSOC.curie("evidence_type"), - model_uri=ONTOASSOC.evidence_type, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.supporting_objects = Slot( - uri=ONTOASSOC.supporting_objects, - name="supporting_objects", - curie=ONTOASSOC.curie("supporting_objects"), - model_uri=ONTOASSOC.supporting_objects, - domain=None, - range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], -) - -slots.comments = Slot( - uri=RDFS.comment, - name="comments", - curie=RDFS.curie("comment"), - model_uri=ONTOASSOC.comments, - domain=None, - range=Optional[Union[str, List[str]]], -) - -slots.denormalized_slot = Slot( - uri=ONTOASSOC.denormalized_slot, - name="denormalized_slot", - curie=ONTOASSOC.curie("denormalized_slot"), - model_uri=ONTOASSOC.denormalized_slot, - domain=None, - range=Optional[str], -) - -slots.date = Slot( - uri=ONTOASSOC.date, - name="date", - curie=ONTOASSOC.curie("date"), - model_uri=ONTOASSOC.date, - domain=None, - range=Optional[str], -) - -slots.modification_date = Slot( - uri=ONTOASSOC.modification_date, - name="modification_date", - curie=ONTOASSOC.curie("modification_date"), - model_uri=ONTOASSOC.modification_date, - domain=None, - range=Optional[str], -) - -slots.creation_date = Slot( - uri=ONTOASSOC.creation_date, - name="creation_date", - curie=ONTOASSOC.curie("creation_date"), - model_uri=ONTOASSOC.creation_date, - domain=None, - range=Optional[str], -) - -slots.diff_slot = Slot( - uri=ONTOASSOC.diff_slot, - name="diff_slot", - curie=ONTOASSOC.curie("diff_slot"), - model_uri=ONTOASSOC.diff_slot, - domain=None, - range=Optional[str], -) - -slots.old_date = Slot( - uri=ONTOASSOC.old_date, - name="old_date", - curie=ONTOASSOC.curie("old_date"), - model_uri=ONTOASSOC.old_date, - domain=None, - range=Optional[str], -) - -slots.new_date = Slot( - uri=ONTOASSOC.new_date, - name="new_date", - curie=ONTOASSOC.curie("new_date"), - model_uri=ONTOASSOC.new_date, - domain=None, - range=Optional[str], -) - -slots.summary_group = Slot( - uri=ONTOASSOC.summary_group, - name="summary_group", - curie=ONTOASSOC.curie("summary_group"), - model_uri=ONTOASSOC.summary_group, - domain=None, - range=Optional[str], -) - -slots.publication_is_added = Slot( - uri=ONTOASSOC.publication_is_added, - name="publication_is_added", - curie=ONTOASSOC.curie("publication_is_added"), - model_uri=ONTOASSOC.publication_is_added, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.publication_is_deleted = Slot( - uri=ONTOASSOC.publication_is_deleted, - name="publication_is_deleted", - curie=ONTOASSOC.curie("publication_is_deleted"), - model_uri=ONTOASSOC.publication_is_deleted, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.old_predicate = Slot( - uri=ONTOASSOC.old_predicate, - name="old_predicate", - curie=ONTOASSOC.curie("old_predicate"), - model_uri=ONTOASSOC.old_predicate, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.new_predicate = Slot( - uri=ONTOASSOC.new_predicate, - name="new_predicate", - curie=ONTOASSOC.curie("new_predicate"), - model_uri=ONTOASSOC.new_predicate, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.old_object = Slot( - uri=ONTOASSOC.old_object, - name="old_object", - curie=ONTOASSOC.curie("old_object"), - model_uri=ONTOASSOC.old_object, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.new_object = Slot( - uri=ONTOASSOC.new_object, - name="new_object", - curie=ONTOASSOC.curie("new_object"), - model_uri=ONTOASSOC.new_object, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.old_object_obsolete = Slot( - uri=ONTOASSOC.old_object_obsolete, - name="old_object_obsolete", - curie=ONTOASSOC.curie("old_object_obsolete"), - model_uri=ONTOASSOC.old_object_obsolete, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.is_migration = Slot( - uri=ONTOASSOC.is_migration, - name="is_migration", - curie=ONTOASSOC.curie("is_migration"), - model_uri=ONTOASSOC.is_migration, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.is_generalization = Slot( - uri=ONTOASSOC.is_generalization, - name="is_generalization", - curie=ONTOASSOC.curie("is_generalization"), - model_uri=ONTOASSOC.is_generalization, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.is_specialization = Slot( - uri=ONTOASSOC.is_specialization, - name="is_specialization", - curie=ONTOASSOC.curie("is_specialization"), - model_uri=ONTOASSOC.is_specialization, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.is_creation = Slot( - uri=ONTOASSOC.is_creation, - name="is_creation", - curie=ONTOASSOC.curie("is_creation"), - model_uri=ONTOASSOC.is_creation, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.is_deletion = Slot( - uri=ONTOASSOC.is_deletion, - name="is_deletion", - curie=ONTOASSOC.curie("is_deletion"), - model_uri=ONTOASSOC.is_deletion, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.closure_predicates = Slot( - uri=ONTOASSOC.closure_predicates, - name="closure_predicates", - curie=ONTOASSOC.curie("closure_predicates"), - model_uri=ONTOASSOC.closure_predicates, - domain=None, - range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], -) - -slots.closure_delta = Slot( - uri=ONTOASSOC.closure_delta, - name="closure_delta", - curie=ONTOASSOC.curie("closure_delta"), - model_uri=ONTOASSOC.closure_delta, - domain=None, - range=Optional[int], -) - -slots.closure_information_content_delta = Slot( - uri=ONTOASSOC.closure_information_content_delta, - name="closure_information_content_delta", - curie=ONTOASSOC.curie("closure_information_content_delta"), - model_uri=ONTOASSOC.closure_information_content_delta, - domain=None, - range=Optional[float], -) - -slots.subject_closure = Slot( - uri=ONTOASSOC.subject_closure, - name="subject_closure", - curie=ONTOASSOC.curie("subject_closure"), - model_uri=ONTOASSOC.subject_closure, - domain=None, - range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], -) - -slots.object_closure = Slot( - uri=ONTOASSOC.object_closure, - name="object_closure", - curie=ONTOASSOC.curie("object_closure"), - model_uri=ONTOASSOC.object_closure, - domain=None, - range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], -) - -slots.subject_closure_label = Slot( - uri=ONTOASSOC.subject_closure_label, - name="subject_closure_label", - curie=ONTOASSOC.curie("subject_closure_label"), - model_uri=ONTOASSOC.subject_closure_label, - domain=None, - range=Optional[Union[str, List[str]]], -) - -slots.object_closure_label = Slot( - uri=ONTOASSOC.object_closure_label, - name="object_closure_label", - curie=ONTOASSOC.curie("object_closure_label"), - model_uri=ONTOASSOC.object_closure_label, - domain=None, - range=Optional[Union[str, List[str]]], -) - -slots.object1 = Slot( - uri=ONTOASSOC.object1, - name="object1", - curie=ONTOASSOC.curie("object1"), - model_uri=ONTOASSOC.object1, - domain=None, - range=Union[str, URIorCURIE], -) - -slots.object2 = Slot( - uri=ONTOASSOC.object2, - name="object2", - curie=ONTOASSOC.curie("object2"), - model_uri=ONTOASSOC.object2, - domain=None, - range=Union[str, URIorCURIE], -) - -slots.object1_label = Slot( - uri=ONTOASSOC.object1_label, - name="object1_label", - curie=ONTOASSOC.curie("object1_label"), - model_uri=ONTOASSOC.object1_label, - domain=None, - range=Optional[str], -) - -slots.object2_label = Slot( - uri=ONTOASSOC.object2_label, - name="object2_label", - curie=ONTOASSOC.curie("object2_label"), - model_uri=ONTOASSOC.object2_label, - domain=None, - range=Optional[str], -) - -slots.number_subjects_in_common = Slot( - uri=ONTOASSOC.number_subjects_in_common, - name="number_subjects_in_common", - curie=ONTOASSOC.curie("number_subjects_in_common"), - model_uri=ONTOASSOC.number_subjects_in_common, - domain=None, - range=Optional[int], -) - -slots.proportion_subjects_in_common = Slot( - uri=ONTOASSOC.proportion_subjects_in_common, - name="proportion_subjects_in_common", - curie=ONTOASSOC.curie("proportion_subjects_in_common"), - model_uri=ONTOASSOC.proportion_subjects_in_common, - domain=None, - range=Optional[float], -) - -slots.number_subjects_in_union = Slot( - uri=ONTOASSOC.number_subjects_in_union, - name="number_subjects_in_union", - curie=ONTOASSOC.curie("number_subjects_in_union"), - model_uri=ONTOASSOC.number_subjects_in_union, - domain=None, - range=Optional[int], -) - -slots.number_subject_unique_to_entity1 = Slot( - uri=ONTOASSOC.number_subject_unique_to_entity1, - name="number_subject_unique_to_entity1", - curie=ONTOASSOC.curie("number_subject_unique_to_entity1"), - model_uri=ONTOASSOC.number_subject_unique_to_entity1, - domain=None, - range=Optional[int], -) - -slots.number_subject_unique_to_entity2 = Slot( - uri=ONTOASSOC.number_subject_unique_to_entity2, - name="number_subject_unique_to_entity2", - curie=ONTOASSOC.curie("number_subject_unique_to_entity2"), - model_uri=ONTOASSOC.number_subject_unique_to_entity2, - domain=None, - range=Optional[int], -) - -slots.subjects_in_common = Slot( - uri=ONTOASSOC.subjects_in_common, - name="subjects_in_common", - curie=ONTOASSOC.curie("subjects_in_common"), - model_uri=ONTOASSOC.subjects_in_common, - domain=None, - range=Optional[Union[str, List[str]]], -) - -slots.associations_for_subjects_in_common = Slot( - uri=ONTOASSOC.associations_for_subjects_in_common, - name="associations_for_subjects_in_common", - curie=ONTOASSOC.curie("associations_for_subjects_in_common"), - model_uri=ONTOASSOC.associations_for_subjects_in_common, - domain=None, - range=Optional[Union[Union[dict, Association], List[Union[dict, Association]]]], -) - -slots.parserConfiguration__preserve_negated_associations = Slot( - uri=ONTOASSOC.preserve_negated_associations, - name="parserConfiguration__preserve_negated_associations", - curie=ONTOASSOC.curie("preserve_negated_associations"), - model_uri=ONTOASSOC.parserConfiguration__preserve_negated_associations, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.parserConfiguration__include_association_attributes = Slot( - uri=ONTOASSOC.include_association_attributes, - name="parserConfiguration__include_association_attributes", - curie=ONTOASSOC.curie("include_association_attributes"), - model_uri=ONTOASSOC.parserConfiguration__include_association_attributes, - domain=None, - range=Optional[Union[bool, Bool]], -) - -slots.parserConfiguration__primary_knowledge_source = Slot( - uri=BIOLINK.primary_knowledge_source, - name="parserConfiguration__primary_knowledge_source", - curie=BIOLINK.curie("primary_knowledge_source"), - model_uri=ONTOASSOC.parserConfiguration__primary_knowledge_source, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.parserConfiguration__aggregator_knowledge_source = Slot( - uri=BIOLINK.aggregator_knowledge_source, - name="parserConfiguration__aggregator_knowledge_source", - curie=BIOLINK.curie("aggregator_knowledge_source"), - model_uri=ONTOASSOC.parserConfiguration__aggregator_knowledge_source, - domain=None, - range=Optional[Union[str, URIorCURIE]], -) - -slots.Association_negated = Slot( - uri=ONTOASSOC.negated, - name="Association_negated", - curie=ONTOASSOC.curie("negated"), - model_uri=ONTOASSOC.Association_negated, - domain=Association, - range=Optional[Union[bool, Bool]], -) - -slots.NegatedAssociation_negated = Slot( - uri=ONTOASSOC.negated, - name="NegatedAssociation_negated", - curie=ONTOASSOC.curie("negated"), - model_uri=ONTOASSOC.NegatedAssociation_negated, - domain=NegatedAssociation, - range=Optional[Union[bool, Bool]], -) +slots.NegatedAssociation_negated = Slot(uri=ONTOASSOC.negated, name="NegatedAssociation_negated", curie=ONTOASSOC.curie('negated'), + model_uri=ONTOASSOC.NegatedAssociation_negated, domain=NegatedAssociation, range=Optional[Union[bool, Bool]]) From bbfc181629d5fb7e87a78548b843ea1f9a8b979e Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Wed, 3 Apr 2024 22:47:33 -0500 Subject: [PATCH 5/6] added exclude for linter --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index aed69286d..aeb1d045f 100644 --- a/tox.ini +++ b/tox.ini @@ -41,8 +41,8 @@ deps = ruff skip_install = true commands = - black src/ tests/ - ruff --fix src/ tests/ + black src/ tests/ --exclude src/oaklib/datamodels/* + ruff --fix src/ tests/ --exclude src/oaklib/datamodels description = Run linters. # This is used for QC checks. @@ -51,7 +51,7 @@ deps = ruff skip_install = true commands = - ruff check src/ tests/ + ruff check src/ tests/ --exclude src/oaklib/datamodels description = Run linters. [testenv:codespell] From 7c20b56c2e6a70a3b04b9279c8fa9c9b3a706dc5 Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Wed, 3 Apr 2024 22:48:33 -0500 Subject: [PATCH 6/6] reveresed change --- .../implementations/simpleobo/simple_obo_implementation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/oaklib/implementations/simpleobo/simple_obo_implementation.py b/src/oaklib/implementations/simpleobo/simple_obo_implementation.py index 2d20c7513..f99ade6a6 100644 --- a/src/oaklib/implementations/simpleobo/simple_obo_implementation.py +++ b/src/oaklib/implementations/simpleobo/simple_obo_implementation.py @@ -800,8 +800,7 @@ def _id(): if stanza1 is None: stanza1 = Stanza(id=stanza2.id, type=stanza2.type) if stanza2.type == "Term": - # yield kgcl.ClassCreation(id=_id(), about_node=stanza2.id) - pass + yield kgcl.ClassCreation(id=_id(), about_node=stanza2.id) elif stanza2.type == "Typedef": yield kgcl.NodeCreation(id=_id(), about_node=stanza2.id) else: