From 491c2d894967f76481b566758c40be369b448603 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 18 Apr 2022 07:26:15 +0200 Subject: [PATCH] Revert "Adds filtering and warning for non-FASTA supporting tool. Standardised warning messages." This reverts commit 564474cafeb77ed1e39d127ed4a08667a4522878. --- subworkflows/local/input_check.nf | 2 -- subworkflows/local/profiling.nf | 8 -------- workflows/taxprofiler.nf | 11 +++++------ 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index eb21b9d..db46f2b 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -45,7 +45,6 @@ def create_fastq_channel(LinkedHashMap row) { meta.run_accession = row.run_accession meta.instrument_platform = row.instrument_platform meta.single_end = row.single_end.toBoolean() - meta.is_fasta = false // add path(s) of the fastq file(s) to the meta map def fastq_meta = [] @@ -76,7 +75,6 @@ def create_fasta_channel(LinkedHashMap row) { meta.run_accession = row.run_accession meta.instrument_platform = row.instrument_platform meta.single_end = true - meta.is_fasta = true def array = [] if (!file(row.fasta).exists()) { diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index f2f7eb7..18de739 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -75,10 +75,6 @@ workflow PROFILING { } ch_input_for_centrifuge = ch_input_for_profiling.centrifuge - .filter{ - if (it[0].is_fasta) log.warn "[nf-core/taxprofiler] Centrifuge does not accept FASTA files as input. Skipping Centrifuge for sample " + it[0].id - !it[0].is_fasta - } .multiMap { it -> reads: [ it[0] + it[2], it[1] ] @@ -86,10 +82,6 @@ workflow PROFILING { } ch_input_for_metaphlan3 = ch_input_for_profiling.metaphlan3 - .filter{ - if (it[0].is_fasta) log.warn "[nf-core/taxprofiler] MetaPhlAn3 does not accept FASTA files as input. Skipping MetaPhlAn3 for sample " + it[0].id - !it[0].is_fasta - } .multiMap { it -> reads: [it[0] + it[2], it[1]] diff --git a/workflows/taxprofiler.nf b/workflows/taxprofiler.nf index e7ff78b..9fe8cc8 100644 --- a/workflows/taxprofiler.nf +++ b/workflows/taxprofiler.nf @@ -19,11 +19,11 @@ for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true // Check mandatory parameters if (params.input ) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' } if (params.databases) { ch_databases = file(params.databases) } else { exit 1, 'Input database sheet not specified!' } -if (params.shortread_clipmerge_mergepairs && params.run_malt ) log.warn "[nf-core/taxprofiler]: MALT does not accept uncollapsed paired-reads. Pairs will be profiled as separate files." -if (params.shortread_clipmerge_excludeunmerged && !params.shortread_clipmerge_mergepairs) exit 1, "ERROR: [nf-core/taxprofiler] cannot include unmerged reads when merging not turned on. Please specify --shortread_clipmerge_mergepairs" +if (params.shortread_clipmerge_mergepairs && params.run_malt ) log.warn "[nf-core/taxprofiler] warning: MALT does not accept uncollapsed paired-reads. Pairs will be profiled as separate files." +if (params.shortread_clipmerge_excludeunmerged && !params.shortread_clipmerge_mergepairs) exit 1, "[nf-core/taxprofiler] error: cannot include unmerged reads when merging not turned on. Please specify --shortread_clipmerge_mergepairs" -if (params.perform_shortread_hostremoval && !params.shortread_hostremoval_reference) { exit 1, "ERROR: [nf-core/taxprofiler] --shortread_hostremoval requested but no --shortread_hostremoval_reference FASTA supplied. Check input." } -if (!params.shortread_hostremoval_reference && params.shortread_hostremoval_reference_index) { exit 1, "ERROR: [nf-core/taxprofiler] --shortread_hostremoval_index provided but no --shortread_hostremoval_reference FASTA supplied. Check input." } +if (params.perform_shortread_hostremoval && !params.shortread_hostremoval_reference) { exit 1, "[nf-core/taxprofiler] error: --shortread_hostremoval requested but no --shortread_hostremoval_reference FASTA supplied. Check input." } +if (!params.shortread_hostremoval_reference && params.shortread_hostremoval_reference_index) { exit 1, "[nf-core/taxprofiler] error: --shortread_hostremoval_index provided but no --shortread_hostremoval_reference FASTA supplied. Check input." } if (params.shortread_hostremoval_reference ) { ch_reference = file(params.shortread_hostremoval_reference) } if (params.shortread_hostremoval_index ) { ch_reference_index = file(params.shortread_hostremoval_index ) } else { ch_reference_index = [] } @@ -175,11 +175,10 @@ workflow TAXPROFILER { meta, reads -> [ meta, [ reads ].flatten() ] } - .mix( INPUT_CHECK.out.fasta ) + } else { ch_reads_runmerged = ch_shortreads_hostremoved .mix( ch_longreads_preprocessed ) - .mix( INPUT_CHECK.out.fasta ) } /*