2022-02-18 06:55:14 +00:00
|
|
|
/*
|
|
|
|
========================================================================================
|
|
|
|
Config file for defining DSL2 per module options and publishing paths
|
|
|
|
========================================================================================
|
|
|
|
Available keys to override module options:
|
|
|
|
ext.args = Additional arguments appended to command in module.
|
|
|
|
ext.args2 = Second set of arguments appended to command in module (multi-tool modules).
|
|
|
|
ext.args3 = Third set of arguments appended to command in module (multi-tool modules).
|
|
|
|
ext.prefix = File name prefix for output files.
|
|
|
|
----------------------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
process {
|
|
|
|
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
|
|
|
|
mode: 'copy',
|
|
|
|
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
|
|
|
|
]
|
|
|
|
|
|
|
|
withName: SAMPLESHEET_CHECK {
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/pipeline_info" },
|
|
|
|
mode: 'copy',
|
|
|
|
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
withName: FASTQC {
|
|
|
|
ext.args = '--quiet'
|
2022-02-18 15:51:01 +00:00
|
|
|
ext.prefix = { "${meta.id}_${meta.run_accession}_raw" }
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/fastqc/raw" },
|
|
|
|
mode: 'copy',
|
|
|
|
pattern: '*.html'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
withName: FASTP {
|
|
|
|
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
|
|
|
// TODO also include option to NOT merge
|
|
|
|
ext.args = [
|
|
|
|
{ ${meta.single_end} } == 0 ? "-m" : '',
|
|
|
|
params.fastp_exclude_unmerged ? '' : "--include_unmerged"
|
|
|
|
].join(' ').trim()
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/fastp" },
|
|
|
|
mode: 'copy',
|
|
|
|
pattern: '*.fastq.gz'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
withName: FASTQC_POST {
|
|
|
|
ext.args = '--quiet'
|
|
|
|
ext.prefix = { "${meta.id}_${meta.run_accession}_processed" }
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/fastqc/processed" },
|
|
|
|
mode: 'copy',
|
|
|
|
pattern: '*.html'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
withName: CAT_FASTQ {
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/prepared_sequences" },
|
|
|
|
mode: 'copy',
|
|
|
|
pattern: '*.fastq.gz'
|
|
|
|
]
|
2022-02-18 06:55:14 +00:00
|
|
|
}
|
|
|
|
|
2022-02-18 15:51:01 +00:00
|
|
|
|
2022-02-18 06:55:14 +00:00
|
|
|
withName: CUSTOM_DUMPSOFTWAREVERSIONS {
|
|
|
|
publishDir = [
|
|
|
|
path: { "${params.outdir}/pipeline_info" },
|
|
|
|
mode: 'copy',
|
|
|
|
pattern: '*_versions.yml'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|