1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-09-21 04:32:06 +00:00

Make parameter naming more consistent for clipmerge

This commit is contained in:
James Fellows Yates 2022-03-21 19:52:50 +01:00
parent 51a0acd05b
commit 8012998542
4 changed files with 20 additions and 15 deletions

View file

@ -41,7 +41,7 @@ process {
// TODO also include option to NOT merge
ext.args = [
{ ${meta.single_end} } == 0 ? "-m" : '',
params.fastp_exclude_unmerged ? '' : "--include_unmerged"
params.shortread_excludeunmerged ? '' : "--include_unmerged"
].join(' ').trim()
publishDir = [
path: { "${params.outdir}/fastp" },
@ -84,7 +84,7 @@ process {
pattern: '*.{rma6,tab,text,sam,log}'
]
ext.args = { "${meta.db_params}" }
ext.when = params.run_malt
ext.prefix = { "${meta.id}-${meta.db_name}" }
}
withName: KRAKEN2_KRAKEN2 {
@ -94,7 +94,6 @@ process {
pattern: '.{fastq.gz,txt}'
]
ext.args = { "${meta.db_params}" }
ext.when = params.run_kraken2
ext.prefix = { "${meta.id}-${meta.db_name}" }
}

View file

@ -55,9 +55,9 @@ params {
databases = null
// FASTQ preprocessing
fastp_clip_merge = false
fastp_exclude_unmerged = true
remove_adapters = false
shortread_clipmerge = false
shortread_excludeunmerged = true
longread_clip = false
// MALT
run_malt = false

View file

@ -23,7 +23,7 @@ workflow SHORTREAD_PREPROCESSING {
// TODO move to subworkflow
if ( params.fastp_clip_merge ) {
if ( params.shortread_clipmerge ) {
ch_input_for_fastp = reads
.dump(tag: "pre-fastp_branch")

View file

@ -100,17 +100,14 @@ workflow TAXPROFILER {
//
// PERFORM PREPROCESSING
//
if ( params.fastp_clip_merge ) {
if ( params.shortread_clipmerge ) {
SHORTREAD_PREPROCESSING ( INPUT_CHECK.out.fastq )
}
ch_multiqc_files = Channel.empty()
if ( params.remove_adapters ) {
if ( params.longread_clip ) {
ch_longreads_preprocessed = LONGREAD_PREPROCESSING ( INPUT_CHECK.out.nanopore ).reads
.map { it -> [ it[0], [it[1]] ] }
ch_versions = ch_versions.mix(LONGREAD_PREPROCESSING.out.versions.first())
ch_multiqc_files = ch_multiqc_files.mix(LONGREAD_PREPROCESSING.out.mqc)
} else {
ch_longreads_preprocessed = INPUT_CHECK.out.nanopore
}
@ -187,9 +184,13 @@ workflow TAXPROFILER {
//
// RUN PROFILING
//
MALT_RUN ( ch_input_for_malt.reads, params.malt_mode, ch_input_for_malt.db )
KRAKEN2_KRAKEN2 ( ch_input_for_kraken2.reads, ch_input_for_kraken2.db )
if ( params.run_malt ) {
MALT_RUN ( ch_input_for_malt.reads, params.malt_mode, ch_input_for_malt.db )
}
if ( params.run_kraken2 ) {
KRAKEN2_KRAKEN2 ( ch_input_for_kraken2.reads, ch_input_for_kraken2.db )
}
//
// MODULE: MultiQC
@ -197,14 +198,19 @@ workflow TAXPROFILER {
workflow_summary = WorkflowTaxprofiler.paramsSummaryMultiqc(workflow, summary_params)
ch_workflow_summary = Channel.value(workflow_summary)
ch_multiqc_files = Channel.empty()
ch_multiqc_files = ch_multiqc_files.mix(Channel.from(ch_multiqc_config))
ch_multiqc_files = ch_multiqc_files.mix(ch_multiqc_custom_config.collect().ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
if (params.fastp_clip_merge) {
if (params.shortread_clipmerge) {
ch_multiqc_files = ch_multiqc_files.mix(SHORTREAD_PREPROCESSING.out.mqc)
}
if (params.longread_clip) {
ch_multiqc_files = ch_multiqc_files.mix(LONGREAD_PREPROCESSING.out.mqc)
}
if (params.run_kraken2) {
ch_multiqc_files = ch_multiqc_files.mix(KRAKEN2_KRAKEN2.out.txt.collect{it[1]}.ifEmpty([]))
ch_versions = ch_versions.mix(KRAKEN2_KRAKEN2.out.versions.first())