Skip to content

Commit

Permalink
increase page size
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Oct 7, 2024
1 parent 3a65785 commit 0f9db14
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions htsget_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,9 @@ def check_genomic_data(dataset, token):

# get all sample_registrations for this program
samples_in_program = []
response = requests.get(f"{KATSU_URL}/v3/authorized/sample_registrations", params={"program_id": program_id}, headers=headers)
response = requests.get(f"{KATSU_URL}/v3/authorized/sample_registrations", params={"program_id": program_id, "page_size": 10000000}, headers=headers)
if response.status_code == 200:
if "next_page" in response.json():
count = response.json()["count"]
response = requests.get(f"{KATSU_URL}/v3/authorized/sample_registrations", params={"program_id": program_id, "page_size": count}, headers=headers)
if response.status_code == 200:
samples_in_program = list(map(lambda x: x["submitter_sample_id"], response.json()["items"]))

samples_in_program.extend(list(map(lambda x: x["submitter_sample_id"], response.json()["items"])))
for sample in by_program[program_id]:
sample_errors = []
# validate the json
Expand Down

0 comments on commit 0f9db14

Please sign in to comment.