Skip to content

Commit 30bb5d3

Browse files
authored
Merge pull request #94 from icgc-argo/[email protected]
[release]
2 parents 13c8ae4 + f1d4e81 commit 30bb5d3

File tree

7 files changed

+129
-78
lines changed

7 files changed

+129
-78
lines changed

argo-data-submission-wf/main.nf

+101-63
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
nextflow.enable.dsl = 2
25-
version = '1.0.3'
25+
version = '1.1.0'
2626

2727
// universal params go here, change default value as needed
2828
params.container = ""
@@ -44,10 +44,11 @@ params.download_mode="local"
4444
params.song_container = "ghcr.io/overture-stack/song-client"
4545
params.song_container_version = "5.0.2"
4646
params.score_container = "ghcr.io/overture-stack/score"
47-
params.score_container_version = "5.9.0"
47+
params.score_container_version = "5.10.0"
4848
params.score_mem = 20
4949
params.score_cpus = 8
5050
params.score_force = false
51+
params.skip_upload = false
5152

5253
// sanityChecks
5354
params.song_url=""
@@ -58,7 +59,7 @@ params.api_token=""
5859
// payloadJsonToTsvs
5960
params.data_directory="NO_FILE1"
6061
params.skip_duplicate_check=false
61-
62+
params.skip_sanity_check=false
6263
// payloadGenSeqExperiment
6364
params.schema_url=""
6465
params.experiment_info_tsv="NO_FILE2"
@@ -237,6 +238,19 @@ workflow ArgoDataSubmissionWf {
237238
clinical_url
238239
main:
239240

241+
if (!"${workflow.profile}".contains('docker') && !"${workflow.profile}".contains('singularity')){
242+
exit 1, "Error Missing profile. `-profile` must be specified with the engines :`docker` or `singularity`."
243+
}
244+
if (!"${workflow.profile}".contains('rdpc_qa') && !"${workflow.profile}".contains('rdpc_dev') && !"${workflow.profile}".contains('rdpc')){
245+
exit 1, "Error Missing profile. `-profile` must be specified with the rdpc environments : `rdpc_qa`,`rdpc_dev`, or `rdpc`."
246+
}
247+
248+
if (!params.api_token){
249+
if (!params.api_download_token || !params.api_upload_token) {
250+
exit 1, "Error SONG parameters detected but missing token params. `--api_token` or `api_upload_token` and `api_download_token` must be supplied when uploading."
251+
}
252+
}
253+
240254
if (
241255
og_experiment_info_tsv.startsWith("NO_FILE") && \
242256
og_read_group_info_tsv.startsWith("NO_FILE") && \
@@ -278,29 +292,41 @@ workflow ArgoDataSubmissionWf {
278292
file(data_directory)
279293
)
280294

281-
sanityCheck(
282-
payloadJsonToTsvs.out.experiment_tsv,
283-
api_token,
284-
song_url,
285-
clinical_url,
286-
params.skip_duplicate_check
287-
)
288-
289-
experiment_info_tsv=sanityCheck.out.updated_experiment_info_tsv
290-
read_group_info_tsv=payloadJsonToTsvs.out.read_group_tsv
291-
file_info_tsv=payloadJsonToTsvs.out.file_tsv
295+
if (params.skip_sanity_check){
296+
experiment_info_tsv=file(payloadJsonToTsvs.out.experiment_tsv)
297+
read_group_info_tsv=file(og_read_group_info_tsv)
298+
file_info_tsv=file(og_file_info_tsv)
299+
} else {
300+
sanityCheck(
301+
payloadJsonToTsvs.out.experiment_tsv,
302+
api_token,
303+
song_url,
304+
clinical_url,
305+
params.skip_duplicate_check
306+
)
307+
308+
experiment_info_tsv=sanityCheck.out.updated_experiment_info_tsv
309+
read_group_info_tsv=file(og_read_group_info_tsv)
310+
file_info_tsv=file(og_file_info_tsv)
311+
}
292312
} else {
293-
sanityCheck(
294-
file(og_experiment_info_tsv),
295-
api_token,
296-
song_url,
297-
clinical_url,
298-
params.skip_duplicate_check
299-
)
300-
301-
experiment_info_tsv=sanityCheck.out.updated_experiment_info_tsv
302-
read_group_info_tsv=file(og_read_group_info_tsv)
303-
file_info_tsv=file(og_file_info_tsv)
313+
if (params.skip_sanity_check){
314+
experiment_info_tsv=file(og_experiment_info_tsv)
315+
read_group_info_tsv=file(og_read_group_info_tsv)
316+
file_info_tsv=file(og_file_info_tsv)
317+
} else {
318+
sanityCheck(
319+
file(og_experiment_info_tsv),
320+
api_token,
321+
song_url,
322+
clinical_url,
323+
params.skip_duplicate_check
324+
)
325+
326+
experiment_info_tsv=sanityCheck.out.updated_experiment_info_tsv
327+
read_group_info_tsv=file(og_read_group_info_tsv)
328+
file_info_tsv=file(og_file_info_tsv)
329+
}
304330
}
305331

306332
checkCramReference(
@@ -362,20 +388,22 @@ workflow ArgoDataSubmissionWf {
362388
skipping_tests
363389
)
364390

365-
uploadWf(
366-
study_id,
367-
valSeq.out.validated_payload,
368-
sequence_files.collect(),
369-
''
370-
)
371-
372-
submissionReceipt(
391+
if (!params.skip_upload){
392+
uploadWf(
373393
study_id,
374-
uploadWf.out.analysis_id,
375-
song_url,
376-
params.skip_submission_check,
377-
sequence_files.collect()
378-
)
394+
valSeq.out.validated_payload,
395+
sequence_files.collect(),
396+
''
397+
)
398+
399+
submissionReceipt(
400+
study_id,
401+
uploadWf.out.analysis_id,
402+
song_url,
403+
params.skip_submission_check,
404+
sequence_files.collect()
405+
)
406+
}
379407

380408
} else if (checkCramReference.out.check_status && !ref_genome_fa.startsWith("NO_FILE")){
381409
// If reference genome is provided...
@@ -403,52 +431,62 @@ workflow ArgoDataSubmissionWf {
403431
sequence_files.collect().concat(cram2bam.out.output_bam.collect()).collect(),
404432
skipping_tests
405433
)
406-
407-
uploadWf(
408-
study_id,
409-
valSeq.out.validated_payload,
410-
not_cram_sequence_files.concat(cram2bam.out.output_bam.collect()).collect(),
411-
''
412-
)
413-
414-
submissionReceipt(
434+
if (!params.skip_upload){
435+
uploadWf(
415436
study_id,
416-
uploadWf.out.analysis_id,
417-
song_url,
418-
params.skip_submission_check,
437+
valSeq.out.validated_payload,
419438
not_cram_sequence_files.concat(cram2bam.out.output_bam.collect()).collect(),
420-
)
439+
''
440+
)
441+
442+
submissionReceipt(
443+
study_id,
444+
uploadWf.out.analysis_id,
445+
song_url,
446+
params.skip_submission_check,
447+
not_cram_sequence_files.concat(cram2bam.out.output_bam.collect()).collect()
448+
)
449+
}
421450
}
422-
if (params.cleanup && params.download_mode!='local' && ref_genome_fa.startsWith("NO_FILE")) {
451+
if (params.cleanup && params.download_mode!='local' && ref_genome_fa.startsWith("NO_FILE") && !params.skip_upload) {
423452
// only cleanup the sequence files when they are not from local
424453
cleanup(
425454
sequence_files.collect(),
426455
submissionReceipt.out.receipt // wait until upload is done
427456
)
428-
} else if (params.cleanup && params.download_mode!='local' && !ref_genome_fa.startsWith("NO_FILE")){
457+
} else if (params.cleanup && params.download_mode!='local' && !ref_genome_fa.startsWith("NO_FILE") && !params.skip_upload){
429458
// only cleanup the sequence files and cram2bam output when they are not from local
430459
cleanup(
431460
sequence_files.collect().concat(cram2bam.out.output_bam.collect()).collect(),
432461
submissionReceipt.out.receipt // wait until upload is done
433462
)
434-
} else if (params.cleanup && params.download_mode=='local' && !ref_genome_fa.startsWith("NO_FILE")){
463+
} else if (params.cleanup && params.download_mode=='local' && !ref_genome_fa.startsWith("NO_FILE") && !params.skip_upload){
435464
// only cleanup output from cram2bam on local
436465
cleanup(
437466
cram2bam.out.output_bam.collect(),
438467
submissionReceipt.out.receipt // wait until upload is done
439468
)
440469
}
441470

442-
printOut(
443-
pGenExp.out.payload,
444-
uploadWf.out.analysis_id,
445-
submissionReceipt.out.receipt
446-
)
471+
if (!params.skip_upload){
472+
printOut(
473+
pGenExp.out.payload,
474+
uploadWf.out.analysis_id,
475+
submissionReceipt.out.receipt
476+
)
477+
out_payload = pGenExp.out.payload
478+
out_analysis_id = uploadWf.out.analysis_id
479+
out_receipt = submissionReceipt.out.receipt
480+
} else {
481+
out_payload = null
482+
out_analysis_id = null
483+
out_receipt = null
484+
}
447485

448486
emit:
449-
json_file=pGenExp.out.payload
450-
output_analysis_id=uploadWf.out.analysis_id
451-
receipt=submissionReceipt.out.receipt
487+
out_json_file=out_payload
488+
out_output_analysis_id=out_analysis_id
489+
out_receipt=out_receipt
452490
}
453491

454492
// this provides an entry point for this main script, so it can be run directly without clone the repo
@@ -467,4 +505,4 @@ workflow {
467505
params.song_url,
468506
params.clinical_url
469507
)
470-
}
508+
}

argo-data-submission-wf/pkg.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "argo-data-submission-wf",
3-
"version": "1.0.3",
3+
"version": "1.1.0",
44
"description": "ARGO data submission workflow",
55
"main": "main.nf",
66
"deprecated": false,
@@ -36,4 +36,4 @@
3636
"license": "GNU Affero General Public License v3",
3737
"bugReport": "https://github.com/icgc-argo/argo-data-submission/issues",
3838
"homepage": "https://github.com/icgc-argo/argo-data-submission#readme"
39-
}
39+
}

argo-data-submission-wf/tests/checker.nf

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727

2828
nextflow.enable.dsl = 2
29-
version = '1.0.3'
29+
version = '1.1.0'
3030

3131
// universal params
3232
params.publish_dir = ""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
type submitter_sequencing_experiment_id program_id submitter_donor_id submitter_specimen_id submitter_sample_id submitter_matched_normal_sample_id sequencing_center platform platform_model experimental_strategy sequencing_date read_group_count
2+
sequencing_experiment SubWf_exp_02_FASTQ_input TEST-CA TEST_SUBMITTER_DONOR_ID_zzespofnsa TEST_SUBMITTER_SPECIMEN_ID_zzespofnsaT1 TEST_SUBMITTER_SAMPLE_ID_zzespofnsaT1 TEST_SUBMITTER_SAMPLE_ID_zzespofnsaN1 EXT ILLUMINA HiSeq 2000 WGS 2014-12-12 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
type name format size md5sum path
2+
file C0HVY.2_r1.fq.gz FASTQ 2040 c4971f805930e9e31e1c45314c652d3c input/C0HVY.2_r1.fq.gz
3+
file C0HVY.2_r2.fq.gz FASTQ 2042 f60026e682bf55f014c84d494112aa13 input/C0HVY.2_r2.fq.gz
4+
file D0RE2.1_r1.fq.gz FASTQ 2309 835b35f6e7f8263636fce4224b1aca69 input/D0RE2.1_r1.fq.gz
5+
file D0RE2.1_r2.fq.gz FASTQ 2365 23d030ddba2916f8430b13234e3e9a0c input/D0RE2.1_r2.fq.gz
6+
file D0RH0.2_r1.fq.gz FASTQ 1872 b3aa75d0585a989bb25fae252a10b532 input/D0RH0.2_r1.fq.gz
7+
file D0RH0.2_r2.fq.gz FASTQ 1894 c59ebfa4199287bf3911a4c1d6eda71e input/D0RH0.2_r2.fq.gz
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type submitter_read_group_id read_group_id_in_bam submitter_sequencing_experiment_id platform_unit is_paired_end file_r1 file_r2 read_length_r1 read_length_r2 insert_size sample_barcode library_name
2+
read_group C0HVY.2 SubWf_exp_02_FASTQ_input 74_8a true C0HVY.2_r1.fq.gz C0HVY.2_r2.fq.gz 150 150 298 Pond-147580
3+
read_group D0RE2.1 SubWf_exp_02_FASTQ_input 74_8b true D0RE2.1_r1.fq.gz D0RE2.1_r2.fq.gz 150 150 298 Pond-147580
4+
read_group D0RH0.2 SubWf_exp_02_FASTQ_input 74_8c true D0RH0.2_r1.fq.gz D0RH0.2_r2.fq.gz 150 150 298 Pond-147580

nextflow.config

+12-12
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ process {
5656
}
5757

5858
profiles {
59-
collab {
60-
params.song_url = 'https://submission-song.rdpc.cancercollaboratory.org'
61-
params.score_url = 'https://submission-score.rdpc.cancercollaboratory.org'
59+
rdpc {
60+
params.song_url = 'https://submission-song.rdpc.argo.genomeinformatics.org'
61+
params.score_url = 'https://submission-score.rdpc.argo.genomeinformatics.org'
6262
params.clinical_url = 'https://clinical.platform.icgc-argo.org'
63-
params.schema_url = 'https://submission-song.rdpc.cancercollaboratory.org/schemas/sequencing_experiment'
63+
params.schema_url = 'https://submission-song.rdpc.argo.genomeinformatics.org/schemas/sequencing_experiment'
6464
}
6565
docker {
6666
docker.enabled = true
@@ -73,16 +73,16 @@ profiles {
7373
singularity.autoMounts = true
7474
singularity.engineOptions = '-s'
7575
}
76-
debug_qa {
77-
params.song_url = 'https://submission-song.rdpc-qa.cancercollaboratory.org'
78-
params.score_url = 'https://submission-score.rdpc-qa.cancercollaboratory.org'
76+
rdpc_qa {
77+
params.song_url = 'https://submission-song.rdpc-qa.cumulus.genomeinformatics.org'
78+
params.score_url = 'https://submission-score.rdpc-qa.cumulus.genomeinformatics.org'
7979
params.clinical_url = 'https://clinical.qa.argo.cancercollaboratory.org'
80-
params.schema_url = 'https://submission-song.rdpc-qa.cancercollaboratory.org/schemas/sequencing_experiment'
80+
params.schema_url = 'https://submission-song.rdpc-qa.cumulus.genomeinformatics.org/schemas/sequencing_experiment'
8181
}
82-
debug_dev {
83-
params.song_url = 'https://submission-song.rdpc-dev.cancercollaboratory.org'
84-
params.score_url = 'https://submission-score.rdpc-dev.cancercollaboratory.org'
82+
rdpc_dev {
83+
params.song_url = 'https://submission-song.rdpc-dev.cumulus.genomeinformatics.org'
84+
params.score_url = 'https://submission-score.rdpc-dev.cumulus.genomeinformatics.org'
8585
params.clinical_url = 'https://clinical.dev.argo.cancercollaboratory.org'
86-
params.schema_url = 'https://submission-song.rdpc-dev.cancercollaboratory.org/schemas/sequencing_experiment'
86+
params.schema_url = 'https://submission-song.rdpc-dev.cumulus.genomeinformatics.org/schemas/sequencing_experiment'
8787
}
8888
}

0 commit comments

Comments
 (0)