Skip to content

Commit 3fca4c9

Browse files
committed
fix the jq
1 parent 4215b10 commit 3fca4c9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/metadata-parser/metadata-parser.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ process metadataParser {
4949

5050
script:
5151
"""
52-
set -uxo pipefail
52+
set -euxo pipefail
5353
STUDY_ID=`cat ${metadata_analysis} | jq -er '.studyId' | tr -d '\\n'`
5454
DONOR_ID=`cat ${metadata_analysis} | jq -er '.samples[0].donor.donorId' | tr -d '\\n'`
5555
EXP=`cat ${metadata_analysis} | jq -er '.experiment | .experimental_strategy? // .library_strategy' | tr -d '\\n'`
56-
VARIABLE1=`cat ${metadata_analysis} | jq -er 'if ([.read_groups[]?] | length) >0 then [.read_groups[]? | .is_paired_end] | all | tostring else "" end' | tr -d '\\n'`
56+
VARIABLE1=`cat ${metadata_analysis} | jq -r 'if ([.read_groups[]?] | length) >0 then [.read_groups[] | .is_paired_end] | all | tostring else null end' | tr -d '\\n'`
5757
PAIRED=\${VARIABLE1:-'null'}
58-
VARIABLE2=`cat ${metadata_analysis} | jq -er '[.files[] | .info? | .analysis_tools[]?] | unique | join(",")' | tr -d '\\n'`
58+
VARIABLE2=`cat ${metadata_analysis} | jq -r '[.files[] | .info? | .analysis_tools[]?] | unique | join(",")' | tr -d '\\n'`
5959
ANALYSIS_TOOLS=\${VARIABLE2:-'null'}
6060
"""
6161
}

0 commit comments

Comments
 (0)