Skip to content

Commit

Permalink
Merge branch 'master' into gopreprocess-gpad20
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Jan 29, 2024
2 parents 1b8df3a + 7e4ca73 commit df4b831
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ontobio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

__version__ = '2.8.20'
__version__ = '2.8.22'


from .ontol_factory import OntologyFactory
Expand Down
4 changes: 2 additions & 2 deletions ontobio/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ solr_assocs:
url: "https://solr.monarchinitiative.org/solr/golr"
timeout: 60
amigo_solr_assocs:
url: "http://golr-aux.geneontology.io/solr"
url: "http://golr.geneontology.org/solr"
timeout: 15
solr_search:
url: "https://solr.monarchinitiative.org/solr/search"
Expand All @@ -11,7 +11,7 @@ lay_person_search:
url: "https://solr.monarchinitiative.org/solr/hpo-pl"
timeout: 15
amigo_solr_search:
url: "http://golr-aux.geneontology.io/solr"
url: "http://golr.geneontology.org/solr"
timeout: 15
sparql:
url: "http://sparql.hegroup.org/sparql"
Expand Down
2 changes: 1 addition & 1 deletion ontobio/golr/golr_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ def map_id(self,id, prefix, closure_list):

## Should take those URLs from config.yaml
class ESOLR(Enum):
GOLR = "http://golr-aux.geneontology.io/solr/"
GOLR = "http://golr.geneontology.org/solr/"
MOLR = "https://solr.monarchinitiative.org/solr/search"

class ESOLRDoc(Enum):
Expand Down
4 changes: 2 additions & 2 deletions ontobio/io/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,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 GOREF:0000033 as a reference", FailMode.HARD)
super().__init__("GORULE:0000037", "IBA annotations should ONLY be assigned_by GO_Central and have GO_REF: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 @@ -527,7 +527,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 "GOREF:0000033" in references)
result = self._result(assigned_by == "GO_Central" and "GO_REF:0000033" in references)

return result

Expand Down
4 changes: 2 additions & 2 deletions tests/resources/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ solr_assocs:
url: "https://example.org"
timeout: 999
amigo_solr_assocs:
url: "http://golr-aux.geneontology.io/solr"
url: "http://golr.geneontology.org/solr"
timeout: 2
solr_search:
url: "https://solr-dev.monarchinitiative.org/solr/search"
timeout: 2
amigo_solr_search:
url: "http://golr-aux.geneontology.io/solr"
url: "http://golr.geneontology.org/solr"
timeout: 2
sparql:
url: "http://sparql.hegroup.org/sparql"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def test_gorule30():
assert test_result.result_type == qc.ResultType.PASS

def test_gorule37():
assoc = make_annotation(evidence="IBA", references="GOREF:0000033", assigned_by="GO_Central").associations[0]
assoc = make_annotation(evidence="IBA", references="GO_REF: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 @@ -476,7 +476,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("GOREF:0000033")]
assoc.evidence.has_supporting_reference = [Curie.from_str("GO_REF: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

0 comments on commit df4b831

Please sign in to comment.