From 9e58aa0ed5a0d3fa025bb3e96985bb2ce017c346 Mon Sep 17 00:00:00 2001 From: Kyle O'Connell Date: Tue, 2 Apr 2024 18:57:57 -0400 Subject: [PATCH 1/3] changed path to val for unused parts of channels so that it doesnt throw the not valid path error --- modules/local/initial_submission/main_genbank.nf | 2 +- modules/local/initial_submission/main_sra.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/initial_submission/main_genbank.nf b/modules/local/initial_submission/main_genbank.nf index 9b9f4bac..06622f0d 100644 --- a/modules/local/initial_submission/main_genbank.nf +++ b/modules/local/initial_submission/main_genbank.nf @@ -14,7 +14,7 @@ process SUBMISSION_GENBANK { 'cdcgov/seqsender-dev' : 'cdcgov/seqsender-dev' }" input: - tuple val(meta), path(validated_meta_path), path(fasta_path), path(fastq_1), path(fastq_2), path(annotations_path) + tuple val(meta), path(validated_meta_path), path(fasta_path), val(fastq_1), val(fastq_2), path(annotations_path) path submission_config // define the command line arguments based on the value of params.submission_test_or_prod, params.send_submission_email diff --git a/modules/local/initial_submission/main_sra.nf b/modules/local/initial_submission/main_sra.nf index e2079929..89d22e6d 100644 --- a/modules/local/initial_submission/main_sra.nf +++ b/modules/local/initial_submission/main_sra.nf @@ -14,7 +14,7 @@ process SUBMISSION_SRA { 'cdcgov/seqsender-dev' : 'cdcgov/seqsender-dev' }" input: - tuple val(meta), path(validated_meta_path), path(fasta_path), path(fastq_1), path(fastq_2) + tuple val(meta), path(validated_meta_path), val(fasta_path), path(fastq_1), path(fastq_2) path submission_config // define the command line arguments based on the value of params.submission_test_or_prod From 8a42bcb95a5731598b158fcb72a240305faf9720 Mon Sep 17 00:00:00 2001 From: Kyle O'Connell Date: Tue, 2 Apr 2024 19:53:09 -0400 Subject: [PATCH 2/3] modified the submission ch with the map function to just drop the unwanted parts of the channel --- modules/local/initial_submission/main_genbank.nf | 2 +- modules/local/initial_submission/main_sra.nf | 2 +- subworkflows/local/submission.nf | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/local/initial_submission/main_genbank.nf b/modules/local/initial_submission/main_genbank.nf index 06622f0d..7e6c7221 100644 --- a/modules/local/initial_submission/main_genbank.nf +++ b/modules/local/initial_submission/main_genbank.nf @@ -14,7 +14,7 @@ process SUBMISSION_GENBANK { 'cdcgov/seqsender-dev' : 'cdcgov/seqsender-dev' }" input: - tuple val(meta), path(validated_meta_path), path(fasta_path), val(fastq_1), val(fastq_2), path(annotations_path) + tuple val(meta), path(validated_meta_path), path(fasta_path), path(annotations_path) path submission_config // define the command line arguments based on the value of params.submission_test_or_prod, params.send_submission_email diff --git a/modules/local/initial_submission/main_sra.nf b/modules/local/initial_submission/main_sra.nf index 89d22e6d..fa327429 100644 --- a/modules/local/initial_submission/main_sra.nf +++ b/modules/local/initial_submission/main_sra.nf @@ -14,7 +14,7 @@ process SUBMISSION_SRA { 'cdcgov/seqsender-dev' : 'cdcgov/seqsender-dev' }" input: - tuple val(meta), path(validated_meta_path), val(fasta_path), path(fastq_1), path(fastq_2) + tuple val(meta), path(validated_meta_path), path(fastq_1), path(fastq_2) path submission_config // define the command line arguments based on the value of params.submission_test_or_prod diff --git a/subworkflows/local/submission.nf b/subworkflows/local/submission.nf index ebab8ee5..dff93e86 100644 --- a/subworkflows/local/submission.nf +++ b/subworkflows/local/submission.nf @@ -23,6 +23,7 @@ workflow INITIAL_SUBMISSION { // submit the files to database of choice (after fixing config and getting wait time) if ( params.genbank && params.sra ){ // genbank and sra // submit the files to database of choice (after fixing config and getting wait time) + submission_ch.view() SUBMISSION_FULL ( submission_ch, submission_config ) // actual process to initiate wait @@ -33,7 +34,14 @@ workflow INITIAL_SUBMISSION { } if ( !params.genbank && params.sra ){ //only sra + // drop fasta_path from ch + submission_ch = submission_ch + .map { + it -> [it[0], it[1], it[3], it[4]] + } + submission_ch.view() SUBMISSION_SRA ( submission_ch, submission_config ) + // actual process to initiate wait WAIT ( SUBMISSION_SRA.out.submission_files.collect(), wait_time ) @@ -42,7 +50,12 @@ workflow INITIAL_SUBMISSION { } if ( params.genbank && !params.sra ){ //only genbank - // submit the files to database of choice (after fixing config and getting wait time) + // drop fastq paths + submission_ch = submission_ch + .map { + it -> [it[0], it[1], it[2], it[5]] + } + submission_ch.view() SUBMISSION_GENBANK ( submission_ch, submission_config ) // actual process to initiate wait From 577df1464fdb44ea9025a72a53268d559d2fb460 Mon Sep 17 00:00:00 2001 From: Jessica Rowell Date: Thu, 4 Apr 2024 15:26:31 -0400 Subject: [PATCH 3/3] minor formatting modification and removal of extraneous .vew() cmd --- subworkflows/local/submission.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subworkflows/local/submission.nf b/subworkflows/local/submission.nf index dff93e86..80d26f37 100644 --- a/subworkflows/local/submission.nf +++ b/subworkflows/local/submission.nf @@ -53,9 +53,8 @@ workflow INITIAL_SUBMISSION { // drop fastq paths submission_ch = submission_ch .map { - it -> [it[0], it[1], it[2], it[5]] + meta, _, fq1, fq2 -> [meta, fq1, fq2] } - submission_ch.view() SUBMISSION_GENBANK ( submission_ch, submission_config ) // actual process to initiate wait