diff --git a/ontobio/io/qc.py b/ontobio/io/qc.py index 2e0f67e0..2281071d 100644 --- a/ontobio/io/qc.py +++ b/ontobio/io/qc.py @@ -836,8 +836,8 @@ def make_virion_component_descendents_if_not_present(self, ontology: Optional[on def test(self, annotation: association.GoAssociation, config: assocparser.AssocParserConfig, group=None) -> TestResult: """ * GO:0003674 "molecular function" - * Term: GO:0005554 => relation is RO:0002327 "enables", else relation is RO:0002327 "enables" + repair, - * Term: subclass of GO:0005554 => relations: {RO:0002327 "enables", RO:0002326 "contributes_to"}, else relation is RO:0002327 "enables" + repair + * Term: GO:0003674 => relation is RO:0002327 "enables", else relation is RO:0002327 "enables" + repair, + * Term: subclass of GO:0003674 => relations: {RO:0002327 "enables", RO:0002326 "contributes_to"}, else relation is RO:0002327 "enables" + repair * GO:0008150 "biological process" * Term: GO:0008150 => RO:0002331 "involved_in" + repair * Term: subclass of GO:0008150 => relations: {RO:0002331 "involved_in", RO:0002264 "acts upstream or within", RO:0004032 "acts upstream of or within, positive effect", RO:0004033 "acts upstream of or within, negative effect", RO:0002263 "acts upstream of", RO:0004034 "acts upstream of, positive effect", RO:0004035 "acts upstream of, negative effect"} else relation is RO:0002264 "acts upstream of or within" + repair @@ -856,7 +856,7 @@ def test(self, annotation: association.GoAssociation, config: assocparser.AssocP allowed = set() repaired_annotation = annotation - if term == "GO:0005554": + if term == "GO:0003674": enables = association.Curie(namespace="RO", identity="0002327") if relation != enables: repaired_annotation = copy.deepcopy(annotation) diff --git a/tests/test_qc.py b/tests/test_qc.py index f0cb964b..bd72ec59 100644 --- a/tests/test_qc.py +++ b/tests/test_qc.py @@ -714,13 +714,13 @@ def test_gorule58(): def test_gorule61(): config = all_rules_config(ontology=ontology) - assoc = make_annotation(goid="GO:0005554", qualifier="enables", evidence=ikr_eco, from_gaf=False, version="1.2") + assoc = make_annotation(goid="GO:0003674", qualifier="enables", evidence=ikr_eco, from_gaf=False, version="1.2") assert assoc.report.reporter.messages.get("gorule-0000001", []) == [] test_result = qc.GoRule61().test(assoc.associations[0], config) assert test_result.result_type == qc.ResultType.PASS # Using `contributes_to`, but should be repaired to RO:0002327 enables - assoc = make_annotation(goid="GO:0005554", qualifier="contributes_to", evidence=ikr_eco, from_gaf=False, version="1.2") + assoc = make_annotation(goid="GO:0003674", qualifier="contributes_to", evidence=ikr_eco, from_gaf=False, version="1.2") test_result = qc.GoRule61().test(assoc.associations[0], config) assert test_result.result.relation == association.Curie("RO", "0002327") assert test_result.result_type == qc.ResultType.WARNING