Skip to content

Commit

Permalink
Merge pull request #99 from indralab/uniprot_legacy
Browse files Browse the repository at this point in the history
Use legacy UniProt service to generate terms
  • Loading branch information
bgyori authored Jul 19, 2022
2 parents 0bd65d7 + 3be0c44 commit 962218e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gilda/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.10.1'
__version__ = '0.10.2'

import logging

Expand Down
2 changes: 1 addition & 1 deletion gilda/generate_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def generate_uniprot_terms(download=False, organisms=None):
path = os.path.join(resource_dir, 'up_synonyms.tsv')
org_filter_str = ' OR '.join(organisms)
if not os.path.exists(path) or download:
url = (f'https://www.uniprot.org/uniprot/?format=tab&columns=id,'
url = (f'https://legacy.uniprot.org/uniprot/?format=tab&columns=id,'
f'genes(PREFERRED),genes(ALTERNATIVE),protein%20names,organism-id&sort=score&'
f'query=reviewed:yes&fil=organism:{org_filter_str}')
logger.info('Downloading UniProt resource file')
Expand Down
2 changes: 2 additions & 0 deletions gilda/grounder.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ def get_models(self):
The list of entity texts for which a disambiguation model is
available.
"""
if self.gilda_disambiguators is None:
self.gilda_disambiguators = load_gilda_models()
return sorted(list(self.gilda_disambiguators.keys()))

def get_names(self, db, id, status=None, source=None):
Expand Down

0 comments on commit 962218e

Please sign in to comment.