From d9e22df56089a6b163901656e5ce9fa7d6420b48 Mon Sep 17 00:00:00 2001 From: Wes Dingman Date: Thu, 21 Oct 2021 09:07:30 -0400 Subject: [PATCH] Develop (#251) * Add note about deprecation * Add note about deprecation * Hot fix create-links to check for single end ss2 runs --- pipeline_tools/shared/submission/create_links.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipeline_tools/shared/submission/create_links.py b/pipeline_tools/shared/submission/create_links.py index 38dc72a8..49c81bc9 100644 --- a/pipeline_tools/shared/submission/create_links.py +++ b/pipeline_tools/shared/submission/create_links.py @@ -136,7 +136,9 @@ def __init__( with open(analysis_protocol_list_path) as f: self.analysis_protocol_list_path = json.load(f) - # If single end read then this will load an empty array + # If single end read then this will load a single element array with empty string + # This is just how bash works when piping an empty array to a file through jq + # array = [""] with open(ss2_fastq2) as f: self.ss2_fastq2 = json.load(f) @@ -251,7 +253,9 @@ def __ss2_intermediate_inputs__(self, index): } ] - if self.ss2_fastq2: + # Verify first element isn't empty string and the length is at least 1 + # Need to at least check the case where we have a single pair + if not self.ss2_fastq2[0] == "" and len(self.ss2_fastq2) >= 1: intermediate_input.append({ "input_id" : self.ss2_fastq2[index], "input_type" : "sequence_file"