Skip to content

Commit 7a63aa2

Browse files
authored
update main.nf to write workflow into SONG (#27)
1 parent cfc1228 commit 7a63aa2

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

main.nf

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,28 @@ include { songScoreDownload } from './workflow/song_score_download' params(param
55
include { songScoreUpload } from './workflow/song_score_upload' params(params)
66

77
process analysisToPayload() {
8-
container "ubuntu:18.04"
8+
container "cfmanteiga/alpine-bash-curl-jq"
99

1010
input:
1111
path analysis_json
1212
output:
1313
path 'payload.json', emit: payload
1414
script:
1515
"""
16-
sed '/\"analysisId\"/ d ; /\"analysisState\"/ d' $analysis_json > payload.json
16+
cat $analysis_json
17+
cat $analysis_json | jq 'del(.analysisId, .analysisState) + {"workflow": {
18+
"workflow_name": "nextflow-data-processing-utility-tools",
19+
"workflow_version": "$workflow.revision",
20+
"genome_build": "GRCh38_hla_decoy_ebv",
21+
"run_id": "$workflow.runName",
22+
"session_id": "$workflow.sessionId",
23+
"inputs": [
24+
{
25+
"analysis_type": .analysisType,
26+
"input_analysis_id": .analysisId
27+
}
28+
]
29+
}}' > payload.json
1730
"""
1831
}
1932

0 commit comments

Comments
 (0)