Skip to content

Commit

Permalink
Merge pull request #661 from biolink/go-site-1658-gorule-0000061-upda…
Browse files Browse the repository at this point in the history
…te-mf-term

For #1658
  • Loading branch information
mugitty authored Nov 29, 2023
2 parents c33f281 + 020265b commit bafa1f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ontobio/io/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bafa1f0

Please sign in to comment.