Skip to content

Commit 0a568d7

Browse files
committed
replaced create.py with old working version
1 parent 9fc0765 commit 0a568d7

File tree

1 file changed

+2
-10
lines changed
  • Amplicon/Illumina/Workflow_Documentation/SW_AmpIllumina-B/workflow_code/bin

1 file changed

+2
-10
lines changed

Amplicon/Illumina/Workflow_Documentation/SW_AmpIllumina-B/workflow_code/bin/create_runsheet.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def handle_url_downloads(runsheet_df, output_file='unique-sample-IDs.txt'):
291291
if skipped_downloads_count > 0:
292292
print(f"{skipped_downloads_count} read file(s) were already present and were not downloaded.")
293293

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):
295295
retries = 0
296296
success = False
297297

@@ -302,11 +302,6 @@ def download_url_to_file(url, file_path, max_retries=6, timeout_seconds=120):
302302

303303
with open(file_path, 'wb') as file:
304304
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
310305
success = True
311306

312307
except (requests.exceptions.HTTPError, requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
@@ -369,10 +364,7 @@ def write_input_file(runsheet_df):
369364
sample_id = row['Sample Name']
370365
read1_path = os.path.join(raw_reads_dir, sample_id + row['raw_R1_suffix'])
371366
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")
376368
else:
377369
file.write(f"sample_id,forward,paired\n")
378370
for _, row in runsheet_df.iterrows():

0 commit comments

Comments
 (0)