@@ -291,7 +291,7 @@ def handle_url_downloads(runsheet_df, output_file='unique-sample-IDs.txt'):
291
291
if skipped_downloads_count > 0 :
292
292
print (f"{ skipped_downloads_count } read file(s) were already present and were not downloaded." )
293
293
294
- def download_url_to_file (url , file_path , max_retries = 6 , timeout_seconds = 120 ):
294
+ def download_url_to_file (url , file_path , max_retries = 3 , timeout_seconds = 120 ):
295
295
retries = 0
296
296
success = False
297
297
@@ -302,11 +302,6 @@ def download_url_to_file(url, file_path, max_retries=6, timeout_seconds=120):
302
302
303
303
with open (file_path , 'wb' ) as file :
304
304
shutil .copyfileobj (response .raw , file )
305
- # Check if gzip file downloaded successfully
306
- # If not, jump out of the loop and retry downloading
307
- retcode = subprocess .call (["gzip" , "-t" , f"{ file_path } " ])
308
- if retcode != 0 :
309
- continue
310
305
success = True
311
306
312
307
except (requests .exceptions .HTTPError , requests .exceptions .ConnectionError , requests .exceptions .Timeout ) as e :
@@ -369,10 +364,7 @@ def write_input_file(runsheet_df):
369
364
sample_id = row ['Sample Name' ]
370
365
read1_path = os .path .join (raw_reads_dir , sample_id + row ['raw_R1_suffix' ])
371
366
read2_path = os .path .join (raw_reads_dir , sample_id + row ['raw_R2_suffix' ])
372
- if os .path .exists (read1_path ) and os .path .exists (read2_path ):
373
- file .write (f"{ sample_id } ,{ read1_path } ,{ read2_path } ,true\n " )
374
- else :
375
- print (f"Paired-end data does not exist for { sample_id } . Therefore this analysis will not include { sample_id } ..." )
367
+ file .write (f"{ sample_id } ,{ read1_path } ,{ read2_path } ,true\n " )
376
368
else :
377
369
file .write (f"sample_id,forward,paired\n " )
378
370
for _ , row in runsheet_df .iterrows ():
0 commit comments