Skip to content

Commit

Permalink
Merge pull request #651 from biolink/go-site-2079-gorule-0000002-no-n…
Browse files Browse the repository at this point in the history
…ot-annotations-to-binding

For #2079 added check for binding
  • Loading branch information
mugitty authored Oct 13, 2023
2 parents 3d0bc79 + 05d9a32 commit bb796ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ontobio/io/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ def repair(self, annotation: association.GoAssociation, group=None) -> Tuple[Lis
class GoRule02(GoRule):

def __init__(self):
super().__init__("GORULE:0000002", "No 'NOT' annotations to 'protein binding ; GO:0005515'", FailMode.HARD)
super().__init__("GORULE:0000002", "No 'NOT' annotations to 'binding ; GO:0005488' or 'protein binding ; GO:0005515'", FailMode.HARD)

def test(self, annotation: association.GoAssociation, config: assocparser.AssocParserConfig, group=None) -> TestResult:

fails = (str(annotation.object.id) == "GO:0005515" and annotation.negated)
annotation_obj_id = str(annotation.object.id)
fails = ((annotation_obj_id == "GO:0005488" or annotation_obj_id == "GO:0005515") and annotation.negated)
return self._result(not fails)


Expand Down

0 comments on commit bb796ff

Please sign in to comment.