From ff278c91ae83896fa220ef90287a9eebc7d3f2ad Mon Sep 17 00:00:00 2001 From: skchronicles Date: Tue, 17 Dec 2024 15:16:39 -0500 Subject: [PATCH] Updating contrasts file parser, short hand for --skip-index option --- workflow/scripts/do_run_rMATS | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/workflow/scripts/do_run_rMATS b/workflow/scripts/do_run_rMATS index 081f8d2..8a8c94d 100755 --- a/workflow/scripts/do_run_rMATS +++ b/workflow/scripts/do_run_rMATS @@ -227,7 +227,7 @@ function main(){ key="$1" case $key in -h | --help) usage && exit 0;; - -b | --skip-index) args["skip_index"]=true; shift;; + -s | --skip-index) args["skip_index"]=true; shift;; -* | --*) err "Error: Failed to parse unsupported argument: '${key}'."; usage && exit 1;; *) err "Error: Failed to parse unrecognized argument: '${key}'. Do any of your inputs have spaces?"; usage && exit 1;; esac @@ -249,7 +249,12 @@ function main(){ read_length_index=$(_get_read_length "Reports/multiqc_matrix.tsv" \ | awk -v wd="$PWD" \ '{print wd"/rMATS/STAR/2.7.6a/genes-"$1"/"}') - while read g1 g2; do + + # Works even if the last line does + # not contain a new line character, + # technically tsv/text files should + # but this is more robust. + while read g1 g2 || { [ -n "$g1" ] && [ -n "$g2" ]; }; do # Run rMATS for each constrast # $1 = Group 1 # $2 = Group 2