Skip to content

Commit

Permalink
Clean up UniProt processing
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Jan 23, 2024
1 parent c6e77a6 commit 3dd4305
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gilda/generate_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ def generate_uniprot_terms(download=False, organisms=None):
organisms = popular_organisms
path = os.path.join(resource_dir, 'up_synonyms.tsv')
if not os.path.exists(path) or download:
# Columns according to the new API, comments for old API
columns = [
'accession', # id
'gene_primary', # genes(PREFERRED)
#'gene_names', # genes(PREFERRED)
'gene_synonym', # genes(ALTERNATIVE)'
'protein_name', # protein names
'organism_id', # organism-id
'accession', # id
'gene_primary', # genes(PREFERRED)
'gene_synonym', # genes(ALTERNATIVE)'
'protein_name', # protein names
'organism_id', # organism-id
]
org_filter_str = '+OR+'.join(f'(taxonomy_id:{org})' for org in organisms)
query = f'reviewed:true+AND+({org_filter_str})'
Expand Down

0 comments on commit 3dd4305

Please sign in to comment.