Skip to content

Commit ff278c9

Browse files
committed
Updating contrasts file parser, short hand for --skip-index option
1 parent 2bdc216 commit ff278c9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

workflow/scripts/do_run_rMATS

+7-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function main(){
227227
key="$1"
228228
case $key in
229229
-h | --help) usage && exit 0;;
230-
-b | --skip-index) args["skip_index"]=true; shift;;
230+
-s | --skip-index) args["skip_index"]=true; shift;;
231231
-* | --*) err "Error: Failed to parse unsupported argument: '${key}'."; usage && exit 1;;
232232
*) err "Error: Failed to parse unrecognized argument: '${key}'. Do any of your inputs have spaces?"; usage && exit 1;;
233233
esac
@@ -249,7 +249,12 @@ function main(){
249249
read_length_index=$(_get_read_length "Reports/multiqc_matrix.tsv" \
250250
| awk -v wd="$PWD" \
251251
'{print wd"/rMATS/STAR/2.7.6a/genes-"$1"/"}')
252-
while read g1 g2; do
252+
253+
# Works even if the last line does
254+
# not contain a new line character,
255+
# technically tsv/text files should
256+
# but this is more robust.
257+
while read g1 g2 || { [ -n "$g1" ] && [ -n "$g2" ]; }; do
253258
# Run rMATS for each constrast
254259
# $1 = Group 1
255260
# $2 = Group 2

0 commit comments

Comments
 (0)