From 92093a5d7513e27c5f01d34814aced39ec52e1dc Mon Sep 17 00:00:00 2001 From: Toni Hermoso Pulido Date: Mon, 4 Nov 2024 13:48:41 +0100 Subject: [PATCH] remove params.output --- TODO.md | 1 - main.nf | 3 ++- modules/local/exorthist/filter_matches.nf | 3 ++- modules/local/exorthist/merge_aligns.nf | 5 +++-- modules/local/exorthist/plot/get_exons.nf | 3 ++- subworkflows/local/exorthist/align.nf | 3 ++- subworkflows/local/exorthist/score.nf | 2 +- workflows/main.nf | 1 + workflows/plot.nf | 1 + 9 files changed, 14 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index b20a173..edbb4ad 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,2 @@ -- Review params.output from modules (optional) - Add stub to modules (optional) - Include colors into the terminal messages (optional) diff --git a/main.nf b/main.nf index 0b87e61..5cc6409 100644 --- a/main.nf +++ b/main.nf @@ -47,7 +47,8 @@ workflow { params.relevant_exs, params.ordered_species, params.isoformID, - params.sub_orthologs + params.sub_orthologs, + params.output ) } else { diff --git a/modules/local/exorthist/filter_matches.nf b/modules/local/exorthist/filter_matches.nf index 00dfc1e..1c9f883 100644 --- a/modules/local/exorthist/filter_matches.nf +++ b/modules/local/exorthist/filter_matches.nf @@ -1,7 +1,7 @@ process FILTER_AND_SELECT_BEST_EX_MATCHES_BY_TARGETGENE { tag { comp_id } - publishDir "${params.output}", mode: "copy", + publishDir "${outdir}", mode: "copy", pattern: "best_scored_EX_matches_by_targetgene.txt", saveAs: { filename -> "${comp_id}/$filename" } @@ -10,6 +10,7 @@ process FILTER_AND_SELECT_BEST_EX_MATCHES_BY_TARGETGENE { val(long_dist) val(medium_dist) val(short_dist) + path outdir output: path "*.tab", emit: filterscore_per_joining diff --git a/modules/local/exorthist/merge_aligns.nf b/modules/local/exorthist/merge_aligns.nf index 95defa6..1894a4a 100644 --- a/modules/local/exorthist/merge_aligns.nf +++ b/modules/local/exorthist/merge_aligns.nf @@ -4,11 +4,12 @@ process MERGE_PROT_EX_INT_ALN_INFO { stageInMode 'copy' - publishDir "${params.output}", mode: "copy", pattern: "${comp_id}/all_*_aln_features.txt" - publishDir "${params.output}", mode: "copy", pattern: "${comp_id}/EXINT_aln.gz" + publishDir "${outdir}", mode: "copy", pattern: "${comp_id}/all_*_aln_features.txt" + publishDir "${outdir}", mode: "copy", pattern: "${comp_id}/EXINT_aln.gz" input: tuple val(comp_id), path("FOLDERS_*"), path("*") + path outdir output: tuple val(comp_id), path("${comp_id}/"), emit: folder_jscores diff --git a/modules/local/exorthist/plot/get_exons.nf b/modules/local/exorthist/plot/get_exons.nf index d026b20..aa2607d 100644 --- a/modules/local/exorthist/plot/get_exons.nf +++ b/modules/local/exorthist/plot/get_exons.nf @@ -1,12 +1,13 @@ process GET_ISOFORM_EXONS { tag "${isoformID}" label 'pandas' - publishDir "${params.output}/${geneID}/processed_table", mode: 'copy' + publishDir "${outdir}/${geneID}/processed_table", mode: 'copy' input: val(isoformID) tuple val(species), path(exons_info), path(overlap_info) val(geneID) + path outdir output: stdout emit: isoform_interesting_exs diff --git a/subworkflows/local/exorthist/align.nf b/subworkflows/local/exorthist/align.nf index f0e5fbc..fd544d7 100644 --- a/subworkflows/local/exorthist/align.nf +++ b/subworkflows/local/exorthist/align.nf @@ -16,6 +16,7 @@ workflow ALIGN { short_dist alignmentnum prevaln + outdir main: @@ -46,7 +47,7 @@ workflow ALIGN { realigned_exons_4_merge = REALIGN_EX_PAIRS.out.realigned_exons_4_merge data_4_merge = aligned_subclusters_4_splitting.groupTuple().join(realigned_exons_4_merge.groupTuple()) // Merge alignments information - MERGE_PROT_EX_INT_ALN_INFO(data_4_merge) + MERGE_PROT_EX_INT_ALN_INFO(data_4_merge, outdir) emit: folder_jscores = MERGE_PROT_EX_INT_ALN_INFO.out.folder_jscores diff --git a/subworkflows/local/exorthist/score.nf b/subworkflows/local/exorthist/score.nf index 54fcd65..df838ee 100644 --- a/subworkflows/local/exorthist/score.nf +++ b/subworkflows/local/exorthist/score.nf @@ -24,7 +24,7 @@ workflow SCORE { SCORE_EX_MATCHES(data_to_score, outdir) // Filter the best matches above score cutoffs by target gene. all_scores_to_filt_ch = SCORE_EX_MATCHES.out.all_scores_to_filt - FILTER_AND_SELECT_BEST_EX_MATCHES_BY_TARGETGENE(all_scores_to_filt_ch.join(dist_ranges_ch), long_dist, medium_dist, short_dist) + FILTER_AND_SELECT_BEST_EX_MATCHES_BY_TARGETGENE(all_scores_to_filt_ch.join(dist_ranges_ch), long_dist, medium_dist, short_dist, outdir) // Join filtered scored EX matches filterscore_per_joining_ch = FILTER_AND_SELECT_BEST_EX_MATCHES_BY_TARGETGENE.out.filterscore_per_joining JOIN_FILTERED_EX_MATCHES(filterscore_per_joining_ch.collect()) diff --git a/workflows/main.nf b/workflows/main.nf index abd68f8..8f3cfd7 100644 --- a/workflows/main.nf +++ b/workflows/main.nf @@ -31,6 +31,7 @@ workflow MAIN { params.short_dist, params.alignmentnum, params.prevaln + params.output ) SCORE( diff --git a/workflows/plot.nf b/workflows/plot.nf index acd18fe..e663819 100644 --- a/workflows/plot.nf +++ b/workflows/plot.nf @@ -17,6 +17,7 @@ workflow PLOT { ordered_species isoformID sub_orthologs + outdir main: