Skip to content

Commit

Permalink
Merge pull request #38 from icgc-argo/[email protected]
Browse files Browse the repository at this point in the history
[release]
  • Loading branch information
junjun-zhang authored May 26, 2021
2 parents 4b803f9 + 44a94aa commit fe02e48
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
18 changes: 12 additions & 6 deletions song-score-upload/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

nextflow.enable.dsl = 2
version = '2.6.1'
version = '2.7.0'

// universal params go here, change default value as needed
params.publish_dir = "" // set to empty string will disable publishDir
Expand All @@ -33,6 +33,7 @@ params.first_retry_wait_time = 1 // in seconds
params.study_id = "TEST-PR"
params.payload = "NO_FILE"
params.upload = []
params.analysis_id = "" // optional, analysis must already exist and in UNPUBLISHED state if analysis_id provided

params.api_token = ""

Expand Down Expand Up @@ -81,16 +82,20 @@ workflow SongScoreUpload {
study_id
payload
upload
analysis_id

main:
// Create new analysis
songSub(study_id, payload)
if (!analysis_id) {
// Create new analysis
songSub(study_id, payload)
analysis_id = songSub.out
}

// Generate file manifest for upload
songMan(study_id, songSub.out, upload.collect())
songMan(study_id, analysis_id, upload.collect())

// Upload to SCORE
scoreUp(songSub.out, songMan.out, upload.collect())
scoreUp(analysis_id, songMan.out, upload.collect())

// Publish the analysis
songPub(study_id, scoreUp.out.ready_to_publish)
Expand All @@ -107,6 +112,7 @@ workflow {
SongScoreUpload(
params.study_id,
file(params.payload),
Channel.fromPath(params.upload)
Channel.fromPath(params.upload),
params.analysis_id
)
}
2 changes: 1 addition & 1 deletion song-score-upload/pkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "song-score-upload",
"version": "2.6.1",
"version": "2.7.0",
"description": "SONG/SCORE upload",
"main": "main.nf",
"deprecated": false,
Expand Down
8 changes: 6 additions & 2 deletions song-score-upload/tests/checker.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ params.first_retry_wait_time = 1 // in seconds
params.study_id = "TEST-PR"
params.payload = "NO_FILE"
params.upload = []
params.analysis_id = ""

params.api_token = ""

Expand All @@ -59,12 +60,14 @@ workflow checker {
study_id
payload
upload
analysis_id

main:
SSUp(
study_id,
payload,
upload
upload,
analysis_id
)

}
Expand All @@ -74,6 +77,7 @@ workflow {
checker(
params.study_id,
file(params.payload),
Channel.fromPath(params.upload)
Channel.fromPath(params.upload),
params.analysis_id
)
}

0 comments on commit fe02e48

Please sign in to comment.