diff --git a/subworkflows/local/pre_qc.nf b/subworkflows/local/pre_qc.nf index ce4e2e5..e4aa683 100644 --- a/subworkflows/local/pre_qc.nf +++ b/subworkflows/local/pre_qc.nf @@ -14,35 +14,43 @@ workflow PRE_QC { take: ch_samplesheet + skip_ee + skip_merging + skip_dadaQC main: ch_versions = Channel.empty() - VSEARCH_OVERLAP( - ch_samplesheet - ) + if (!skip_merging) { + VSEARCH_OVERLAP( + ch_samplesheet + ) - ch_versions = ch_versions.mix(VSEARCH_OVERLAP.out.versions.first()) + ch_versions = ch_versions.mix(VSEARCH_OVERLAP.out.versions.first()) + MERGE_OVERLAP_CHECK( + VSEARCH_OVERLAP.out.merged_log.collect() + ) - VSEARCH_EESTATS ( - ch_samplesheet - ) + OVERLAP_HEATMAP( + VSEARCH_OVERLAP.out.merged_stats.collect() + ) + } - ch_versions = ch_versions.mix(VSEARCH_EESTATS.out.versions.first()) + if (!skip_ee) { + VSEARCH_EESTATS ( + ch_samplesheet + ) - MERGE_OVERLAP_CHECK( - VSEARCH_OVERLAP.out.merged_log.collect() - ) - - OVERLAP_HEATMAP( - VSEARCH_OVERLAP.out.merged_stats.collect() - ) - - PLOT_QUALITY_PROFILE ( - ch_samplesheet - ) + ch_versions = ch_versions.mix(VSEARCH_EESTATS.out.versions.first()) + } + + if (!skip_dadaQC) { + PLOT_QUALITY_PROFILE ( + ch_samplesheet + ) - ch_versions = ch_versions.mix(PLOT_QUALITY_PROFILE.out.versions.first()) + ch_versions = ch_versions.mix(PLOT_QUALITY_PROFILE.out.versions.first()) + } emit: versions = ch_versions // channel: [ versions.yml ] diff --git a/workflows/tada.nf b/workflows/tada.nf index cee032b..60921c4 100644 --- a/workflows/tada.nf +++ b/workflows/tada.nf @@ -103,7 +103,10 @@ workflow TADA { ch_versions = ch_versions.mix(FASTQC.out.versions.first()) PRE_QC( - ch_samplesheet + ch_samplesheet, + params.skip_ee, + params.skip_merging, + params.skip_dadaQC ) ch_versions = ch_versions.mix(PRE_QC.out.versions) @@ -167,12 +170,12 @@ workflow TADA { // would be useful for... // this needs to die with an error message if method is not defined, or // it needs to be caught above - if (params.run_tree == 'phangorn') { + if (params.phylo_tool == 'phangorn') { PHANGORN( DECIPHER.out.alignment ) ch_tree = PHANGORN.out.treeGTR - } else if (params.run_tree == 'fasttree') { + } else if (params.phylo_tool == 'fasttree') { FASTTREE( DECIPHER.out.alignment ) @@ -181,7 +184,7 @@ workflow TADA { ROOT_TREE( ch_tree, - params.run_tree + params.phylo_tool ) // QC