Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For #2131 #659

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ontobio/io/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def test(self, annotation: association.GoAssociation, config: assocparser.AssocP
class GoRule37(GoRule):

def __init__(self):
super().__init__("GORULE:0000037", "IBA annotations should ONLY be assigned_by GO_Central and have PMID:21873635 as a reference", FailMode.HARD)
super().__init__("GORULE:0000037", "IBA annotations should ONLY be assigned_by GO_Central and have GOREF:0000033 as a reference", FailMode.HARD)

def test(self, annotation: association.GoAssociation, config: assocparser.AssocParserConfig, group=None) -> TestResult:
# If the evidence code is IBA, then (1) the assigned_by field must be GO_Central and (2) the reference field must be PMID:21873635
Expand All @@ -516,7 +516,7 @@ def test(self, annotation: association.GoAssociation, config: assocparser.AssocP

result = self._result(True) # By default we pass
if evidence == iba_eco:
result = self._result(assigned_by == "GO_Central" and "PMID:21873635" in references)
result = self._result(assigned_by == "GO_Central" and "GOREF:0000033" in references)

return result

Expand Down
4 changes: 2 additions & 2 deletions tests/test_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def test_gorule30():
assert test_result.result_type == qc.ResultType.PASS

def test_gorule37():
assoc = make_annotation(evidence="IBA", references="PMID:21873635", assigned_by="GO_Central").associations[0]
assoc = make_annotation(evidence="IBA", references="GOREF:0000033", assigned_by="GO_Central").associations[0]

test_result = qc.GoRule37().test(assoc, all_rules_config())
assert test_result.result_type == qc.ResultType.PASS
Expand All @@ -465,7 +465,7 @@ def test_gorule37():
test_result = qc.GoRule37().test(assoc, all_rules_config())
assert test_result.result_type == qc.ResultType.ERROR

assoc.evidence.has_supporting_reference = [Curie.from_str("PMID:21873635")]
assoc.evidence.has_supporting_reference = [Curie.from_str("GOREF:0000033")]
assoc.provided_by = "Pascale" # IBA, but wrong assigned_by
test_result = qc.GoRule37().test(assoc, all_rules_config())
assert test_result.result_type == qc.ResultType.ERROR
Expand Down
Loading