Skip to content

Commit

Permalink
Merge pull request #206 from bgyori/hypothesis_group
Browse files Browse the repository at this point in the history
Add hypothesis group to redirect URL
  • Loading branch information
bgyori committed Mar 11, 2021
2 parents 0bb1950 + 2d951a7 commit 4752707
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emmaa_service/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

from indralab_auth_tools.auth import auth, config_auth, resolve_auth
from indralab_web_templates.path_templates import path_temps
from indra.config import get_config
from indra.sources.hypothesis import upload_statement_annotation


Expand Down Expand Up @@ -66,6 +67,7 @@
ns_mapping = {'genes/proteins': ['hgnc', 'up', 'fplx'],
'small molecules': ['chebi', 'drugbank', 'chembl', 'pubchem'],
'biological processes': ['go', 'mesh']}
hypothesis_group = get_config('HYPOTHESIS_GROUP')

qm = QueryManager()

Expand Down Expand Up @@ -880,7 +882,7 @@ def annotate_paper_statements(model):
logger.info(f'Annotating statement {i + 1} out of {len(paper_stmts)}')
anns = upload_statement_annotation(stmt)
if anns:
url = anns[0]['url']
url = f"{anns[0]['url']}#annotations:group:{hypothesis_group}"
if url:
return {'redirectURL': url}
else:
Expand Down

0 comments on commit 4752707

Please sign in to comment.