Skip to content

Commit

Permalink
updated query
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Sep 23, 2024
1 parent bb38d8c commit 92435b4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/uniprot2s3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,16 @@ def fetch_uniprot_data(organism_id):
def fetch_uniprot_reference_proteome_data() -> list:
"""Single URL request for Uniprot proteome data."""
file_path = Path(RAW_DATA_DIR) / f"{PROTEOMES_FILENAME}.{UNIPROT_DESIRED_FORMAT}"
all_proteomes_query = "%28*%29"
# filtered_proteomes_query = (
# "((superkingdom:Bacteria)+OR+(superkingdom:Archaea))+AND+((proteome_type:1)+OR+(proteome_type:2))"
# )
# all_proteomes_query = "%28*%29"
filtered_proteomes_query = (
"((superkingdom:Bacteria)+OR+(superkingdom:Archaea))+AND+((proteome_type:1)+OR+(proteome_type:2))"
)
import pdb; pdb.set_trace()

url = construct_query_url(
UNIPROT_REFERENCE_PROTEOMES_URL,
UNIPROT_DESIRED_FORMAT,
all_proteomes_query,
filtered_proteomes_query,
UNIPROT_REFERENCE_PROTEOMES_FIELDS,
UNIPROT_SIZE,
)
Expand Down Expand Up @@ -311,7 +312,7 @@ def run_uniprot_api_parallel(
# If show_status is True, use process_map to display a progress bar
if show_status:
process_map(
fetch_func, taxa_id_common_with_proteomes_list, max_workers=workers
fetch_func, taxa_id_common_with_proteomes_list, max_workers=workers, chunksize=CHUNK_SIZE_PER_WORKER
)
else:
# Set up a pool of worker processes without a progress bar
Expand Down

0 comments on commit 92435b4

Please sign in to comment.