diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index 2bc32e1c5e437743aa13fa649c8e082d743a3d63..dc09f8d525b3b592a25ba3af48c6204da33e7a6c 100644 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -2293,37 +2293,43 @@ process failExecutionRun { cookie=\${cookie:11:-1} errorDetails="" - pipelineError_details=\$(echo "**Submitted metadata does not match inferred:**\\n") - pipelineError_details=\$(echo \${pipelineError_details}"|Metadata|Submitted value|Inferred value|\\n") - pipelineError_details=\$(echo \${pipelineError_details}"|:-:|-:|-:|\\n") - if ${pipelineError_ends} + if [ ${pipelineError} == false ] then - if [ "${endsInfer}" == "se" ] + rid=\$(python3 ${script_uploadExecutionRun_failExecutionRun} -r ${repRID} -w \${workflow} -g \${genome} -i ${inputBagRID} -s Success -d 'Run Successful' -o ${source} -c \${cookie} -u ${executionRunRID}) + echo LOG: execution run RID marked as successful - \${rid} >> ${repRID}.failExecutionRun.log + else + pipelineError_details=\$(echo "**Submitted metadata does not match inferred:**\\n") + pipelineError_details=\$(echo \${pipelineError_details}"|Metadata|Submitted value|Inferred value|\\n") + pipelineError_details=\$(echo \${pipelineError_details}"|:-:|-:|-:|\\n") + if ${pipelineError_ends} then - endInfer="Single End" - elif [ "${endsInfer}" == "pe" ] + if [ "${endsInfer}" == "se" ] + then + endInfer="Single End" + elif [ "${endsInfer}" == "pe" ] + then + endInfer="Paired End" + else + endInfer="unknown" + fi + pipelineError_details=\$(echo \${pipelineError_details}"|Paired End|${endsRaw}|"\${endInfer}"|\\n") + fi + if ${pipelineError_stranded} then - endInfer="Paired End" - else - endInfer="unknown" + pipelineError_details=\$(echo \${pipelineError_details}"|Strandedness|${strandedMeta}|${strandedInfer}|\\n") fi - pipelineError_details=\$(echo \${pipelineError_details}"|Paired End|${endsRaw}|"\${endInfer}"|\\n") - fi - if ${pipelineError_stranded} - then - pipelineError_details=\$(echo \${pipelineError_details}"|Strandedness|${strandedMeta}|${strandedInfer}|\\n") - fi - if ${pipelineError_spike} - then - pipelineError_details=\$(echo \${pipelineError_details}"|Used Spike Ins|${spikeMeta}|${spikeInfer}|\\n") - fi - if ${pipelineError_species} - then - pipelineError_details=\$(echo \${pipelineError_details}"|Species|${speciesMeta}|${speciesInfer}|\\n") + if ${pipelineError_spike} + then + pipelineError_details=\$(echo \${pipelineError_details}"|Used Spike Ins|${spikeMeta}|${spikeInfer}|\\n") + fi + if ${pipelineError_species} + then + pipelineError_details=\$(echo \${pipelineError_details}"|Species|${speciesMeta}|${speciesInfer}|\\n") + fi + pipelineError_details=\${pipelineError_details::-2} + rid=\$(python3 ${script_uploadExecutionRun_failExecutionRun} -r ${repRID} -w \${workflow} -g \${genome} -i ${inputBagRID} -s Error -d "\${pipelineError_details}" -o ${source} -c \${cookie} -u ${executionRunRID}) + echo LOG: execution run RID marked as error - \${rid} >> ${repRID}.failExecutionRun.log fi - pipelineError_details=\${pipelineError_details::-2} - rid=\$(python3 ${script_uploadExecutionRun_failExecutionRun} -r ${repRID} -w \${workflow} -g \${genome} -i ${inputBagRID} -s Error -d "\${pipelineError_details}" -o ${source} -c \${cookie} -u ${executionRunRID}) - echo LOG: execution run RID marked as error - \${rid} >> ${repRID}.failExecutionRun.log dt=`date --utc +%FT%TZ` curl -H 'Content-Type: application/json' -X PUT -d \