From b14ca29fa5f7ca534cda5de3dbeffcdca7894745 Mon Sep 17 00:00:00 2001 From: jvfe Date: Wed, 8 May 2024 22:36:22 -0300 Subject: [PATCH 1/3] refactor: Add assemblies to poppunk process input Signed-off-by: jvfe --- modules/local/poppunk/createdb/main.nf | 1 + subworkflows/local/poppunk.nf | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/local/poppunk/createdb/main.nf b/modules/local/poppunk/createdb/main.nf index e41d9a25..3239abbb 100644 --- a/modules/local/poppunk/createdb/main.nf +++ b/modules/local/poppunk/createdb/main.nf @@ -9,6 +9,7 @@ process POPPUNK_CREATEDB { input: path filesheet + path assemblies output: diff --git a/subworkflows/local/poppunk.nf b/subworkflows/local/poppunk.nf index 7f7a6237..64e14563 100644 --- a/subworkflows/local/poppunk.nf +++ b/subworkflows/local/poppunk.nf @@ -24,14 +24,14 @@ workflow RUN_POPPUNK { } genome_assemblies - .map { meta, path -> [meta.id, path.toString()] } + .map { meta, path -> [meta.id, path.getName()] } .collectFile(newLine: true) { item -> [ "${item[0]}.txt", item[0] + '\t' + item[1] ] } .collectFile(name: 'poppunk_samplesheet.tsv') .set { poppunk_samplesheet } - POPPUNK_CREATEDB(poppunk_samplesheet) + POPPUNK_CREATEDB(poppunk_samplesheet, genome_assemblies.collect { it[1] } ) POPPUNK_CREATEDB.out.poppunk_db.set { poppunk_db } From f1c93b697ddc3ed7a824463a12b788a26632d8b6 Mon Sep 17 00:00:00 2001 From: jvfe Date: Wed, 8 May 2024 22:36:41 -0300 Subject: [PATCH 2/3] refactor: Add gffs to ppanggolin/panaroo input Signed-off-by: jvfe --- modules/local/ppanggolin/workflow/main.nf | 1 + modules/nf-core/panaroo/run/main.nf | 1 + subworkflows/local/phylo.nf | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/local/ppanggolin/workflow/main.nf b/modules/local/ppanggolin/workflow/main.nf index 462c0c75..7ba66c5a 100644 --- a/modules/local/ppanggolin/workflow/main.nf +++ b/modules/local/ppanggolin/workflow/main.nf @@ -11,6 +11,7 @@ process PPANGGOLIN_WORKFLOW { input: tuple val(meta), path(samplesheet) + path gffs output: tuple val(meta), path("$prefix") , emit: results diff --git a/modules/nf-core/panaroo/run/main.nf b/modules/nf-core/panaroo/run/main.nf index 7947fc53..d1cfcb8c 100644 --- a/modules/nf-core/panaroo/run/main.nf +++ b/modules/nf-core/panaroo/run/main.nf @@ -9,6 +9,7 @@ process PANAROO_RUN { input: tuple val(meta), path(gff) + path gffs output: tuple val(meta), path("results/*") , emit: results diff --git a/subworkflows/local/phylo.nf b/subworkflows/local/phylo.nf index b7bfea4d..06caa9c6 100755 --- a/subworkflows/local/phylo.nf +++ b/subworkflows/local/phylo.nf @@ -26,7 +26,7 @@ workflow PHYLOGENOMICS{ ch_software_versions = Channel.empty() gffs - .map { meta, path -> [meta.id, path.toString()] } + .map { meta, path -> [meta.id, path.getName()] } .set { gff_paths } // Create samplesheet @@ -39,7 +39,7 @@ workflow PHYLOGENOMICS{ .map{ path -> [[id: 'ppanggolin'], path] } .set { gff_samplesheet } - PPANGGOLIN_WORKFLOW(gff_samplesheet) + PPANGGOLIN_WORKFLOW(gff_samplesheet, gffs.collect{ it[1] }) PPANGGOLIN_WORKFLOW.out.pangenome.set { pangenome } @@ -76,7 +76,7 @@ workflow PHYLOGENOMICS{ * Core gene identification and alignment */ // By default, run panaroo - PANAROO_RUN(gff_samplesheet) + PANAROO_RUN(gff_samplesheet, gffs.collect{ it[1] }) PANAROO_RUN.out.aln.collect{ meta, aln -> aln }.set{ ch_core_alignment } PANAROO_RUN.out.accessory_aln.set{ ch_all_alignments } From a2b0c795caa5f0f2f5c1ed9a76f3f53ecd014aec Mon Sep 17 00:00:00 2001 From: jvfe Date: Fri, 10 May 2024 23:02:51 -0300 Subject: [PATCH 3/3] tests: Add file to files in nf-tests Signed-off-by: jvfe --- tests/subworkflows/local/phylo.nf.test | 6 +++--- tests/subworkflows/local/poppunk.nf.test.skip | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/subworkflows/local/phylo.nf.test b/tests/subworkflows/local/phylo.nf.test index a4b54e73..ef556f45 100644 --- a/tests/subworkflows/local/phylo.nf.test +++ b/tests/subworkflows/local/phylo.nf.test @@ -15,9 +15,9 @@ nextflow_workflow { """ // define inputs of the workflow here. Example: input[0] = Channel.of( - [[id:'SRR14022735'], '$baseDir/test/SRR14022735_T1.gff'], - [[id:'SRR14022764'], '$baseDir/test/SRR14022764_T1.gff'], - [[id:'SRR14022754'], '$baseDir/test/SRR14022754_T1.gff'] + [[id:'SRR14022735'], file('$baseDir/test/SRR14022735_T1.gff')], + [[id:'SRR14022764'], file('$baseDir/test/SRR14022764_T1.gff')], + [[id:'SRR14022754'], file('$baseDir/test/SRR14022754_T1.gff')] ) // Don't use full alignment input[1] = false diff --git a/tests/subworkflows/local/poppunk.nf.test.skip b/tests/subworkflows/local/poppunk.nf.test.skip index e9ea2386..00bd5028 100644 --- a/tests/subworkflows/local/poppunk.nf.test.skip +++ b/tests/subworkflows/local/poppunk.nf.test.skip @@ -15,10 +15,10 @@ nextflow_workflow { """ // define inputs of the workflow here. Example: input[0] = Channel.of( - [[id:'SRR14022735'], "$baseDir/test/SRR14022735_T1.scaffolds.fa"], - [[id:'SRR14022737'], "$baseDir/test/SRR14022737_T1.scaffolds.fa"], - [[id:'SRR14022754'], "$baseDir/test/SRR14022754_T1.scaffolds.fa"], - [[id:'SRR14022764'], "$baseDir/test/SRR14022764_T1.scaffolds.fa"], + [[id:'SRR14022735'], file("$baseDir/test/SRR14022735_T1.scaffolds.fa")], + [[id:'SRR14022737'], file("$baseDir/test/SRR14022737_T1.scaffolds.fa")], + [[id:'SRR14022754'], file("$baseDir/test/SRR14022754_T1.scaffolds.fa")], + [[id:'SRR14022764'], file("$baseDir/test/SRR14022764_T1.scaffolds.fa")], ) """ }