1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-25 22:59:56 +00:00

Revert "Adds filtering and warning for non-FASTA supporting tool. Standardised warning messages."

This reverts commit 564474cafe.
This commit is contained in:
James Fellows Yates 2022-04-18 07:26:15 +02:00
parent 564474cafe
commit 491c2d8949
3 changed files with 5 additions and 16 deletions

View file

@ -45,7 +45,6 @@ def create_fastq_channel(LinkedHashMap row) {
meta.run_accession = row.run_accession meta.run_accession = row.run_accession
meta.instrument_platform = row.instrument_platform meta.instrument_platform = row.instrument_platform
meta.single_end = row.single_end.toBoolean() meta.single_end = row.single_end.toBoolean()
meta.is_fasta = false
// add path(s) of the fastq file(s) to the meta map // add path(s) of the fastq file(s) to the meta map
def fastq_meta = [] def fastq_meta = []
@ -76,7 +75,6 @@ def create_fasta_channel(LinkedHashMap row) {
meta.run_accession = row.run_accession meta.run_accession = row.run_accession
meta.instrument_platform = row.instrument_platform meta.instrument_platform = row.instrument_platform
meta.single_end = true meta.single_end = true
meta.is_fasta = true
def array = [] def array = []
if (!file(row.fasta).exists()) { if (!file(row.fasta).exists()) {

View file

@ -75,10 +75,6 @@ workflow PROFILING {
} }
ch_input_for_centrifuge = ch_input_for_profiling.centrifuge 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 { .multiMap {
it -> it ->
reads: [ it[0] + it[2], it[1] ] reads: [ it[0] + it[2], it[1] ]
@ -86,10 +82,6 @@ workflow PROFILING {
} }
ch_input_for_metaphlan3 = ch_input_for_profiling.metaphlan3 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 { .multiMap {
it -> it ->
reads: [it[0] + it[2], it[1]] reads: [it[0] + it[2], it[1]]

View file

@ -19,11 +19,11 @@ for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true
// Check mandatory parameters // Check mandatory parameters
if (params.input ) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' } 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.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_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, "ERROR: [nf-core/taxprofiler] cannot include unmerged reads when merging not turned on. Please specify --shortread_clipmerge_mergepairs" 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.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, "ERROR: [nf-core/taxprofiler] --shortread_hostremoval_index provided 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_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 = [] } 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 ->
[ meta, [ reads ].flatten() ] [ meta, [ reads ].flatten() ]
} }
.mix( INPUT_CHECK.out.fasta )
} else { } else {
ch_reads_runmerged = ch_shortreads_hostremoved ch_reads_runmerged = ch_shortreads_hostremoved
.mix( ch_longreads_preprocessed ) .mix( ch_longreads_preprocessed )
.mix( INPUT_CHECK.out.fasta )
} }
/* /*