1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 06:39:55 +00:00

Rename subworkflow parameters for consistency

This commit is contained in:
James Fellows Yates 2022-04-13 12:00:28 +02:00
parent 16a3556bfc
commit dfeaa0d1fe
6 changed files with 35 additions and 34 deletions

View file

@ -29,8 +29,8 @@ jobs:
- NXF_VER: ""
NXF_EDGE: "1"
parameters:
- "--longread_clip false"
- "--shortread_clip false"
- "--perform_longread_clip false"
- "--perform_shortread_clipmerge false"
- "--shortread_clipmerge_tool fastp"
- "--shortread_clipmerge_tool fastp --shortread_clipmerge_mergepairs --shortread_clipmerge_excludeunmerged"
- "--shortread_clipmerge_tool fastp --shortread_clipmerge_mergepairs"
@ -39,8 +39,8 @@ jobs:
- "--shortread_clipmerge_tool adapterremoval --shortread_clipmerge_mergepairs"
- "--shortread_complexityfilter_tool bbduk"
- "--shortread_complexityfilter_tool prinseq"
- "--run_merging"
- "--run_merging --shortread_clipmerge_mergepairs"
- "--perform_runmerging"
- "--perform_runmerging --shortread_clipmerge_mergepairs"
steps:
- name: Check out pipeline code

View file

@ -173,7 +173,7 @@ process {
withName: MALT_RUN {
ext.args = { "${meta.db_params}" }
ext.prefix = params.run_merging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
publishDir = [
path: { "${params.outdir}/malt/${meta.db_name}" },
mode: params.publish_dir_mode,
@ -183,7 +183,7 @@ process {
withName: KRAKEN2_KRAKEN2 {
ext.args = { "${meta.db_params}" }
ext.prefix = params.run_merging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
publishDir = [
path: { "${params.outdir}/kraken2/${meta.db_name}" },
mode: params.publish_dir_mode,
@ -193,7 +193,7 @@ process {
withName: METAPHLAN3 {
ext.args = { "${meta.db_params}" }
ext.prefix = params.run_merging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
publishDir = [
path: { "${params.outdir}/metaphlan3/${meta.db_name}" },
mode: params.publish_dir_mode,

View file

@ -28,7 +28,7 @@ params {
run_malt = true
run_metaphlan3 = true
run_centrifuge = true
shortread_clipmerge = true
longread_clip = false
shortread_complexityfilter = true
perform_shortread_clipmerge = true
perform_longread_clip = false
perform_shortread_complexityfilter = true
}

View file

@ -55,7 +55,7 @@ params {
databases = null
// FASTQ preprocessing
shortread_clipmerge = false
perform_shortread_clipmerge = false
shortread_clipmerge_tool = 'fastp'
shortread_clipmerge_skipadaptertrim = false
shortread_clipmerge_mergepairs = false
@ -63,11 +63,11 @@ params {
shortread_clipmerge_adapter1 = null
shortread_clipmerge_adapter2 = null
shortread_clipmerge_minlength = 15
longread_clip = false
perform_longread_clip = false
save_preprocessed_reads = false
// Complexity filtering
shortread_complexityfilter = false
perform_shortread_complexityfilter = false
shortread_complexityfilter_tool = 'bbduk'
shortread_complexityfilter_entropy = 0.3
shortread_complexityfilter_bbduk_windowsize = 50
@ -77,8 +77,8 @@ params {
save_complexityfiltered_reads = false
// run merging
run_merging = false
save_runmerged_reads = false
perform_runmerging = false
save_runmerged_reads = false
// MALT
run_malt = false
@ -92,6 +92,7 @@ params {
centrifuge_save_unaligned = false
centrifuge_save_aligned = false
centrifuge_sam_format = false
// metaphlan3
run_metaphlan3 = false
}

View file

@ -262,15 +262,9 @@
"type": "string",
"default": "None"
},
"shortread_clipmerge": {
"type": "boolean"
},
"shortread_clipmerge_excludeunmerged": {
"type": "boolean"
},
"longread_clip": {
"type": "boolean"
},
"run_malt": {
"type": "boolean"
},
@ -334,9 +328,6 @@
"shortread_complexityfilter_bbduk_mask": {
"type": "boolean"
},
"shortread_complexityfilter": {
"type": "boolean"
},
"shortread_complexityfilter_entropy": {
"type": "number",
"default": 0.3
@ -353,10 +344,19 @@
"save_complexityfiltered_reads": {
"type": "boolean"
},
"run_merging": {
"save_runmerged_reads": {
"type": "boolean"
},
"save_runmerged_reads": {
"perform_shortread_clipmerge": {
"type": "boolean"
},
"perform_longread_clip": {
"type": "boolean"
},
"perform_shortread_complexityfilter": {
"type": "boolean"
},
"perform_runmerging": {
"type": "boolean"
}
}

View file

@ -101,14 +101,14 @@ workflow TAXPROFILER {
/*
SUBWORKFLOW: PERFORM PREPROCESSING
*/
if ( params.shortread_clipmerge ) {
if ( params.perform_shortread_clipmerge ) {
ch_shortreads_preprocessed = SHORTREAD_PREPROCESSING ( INPUT_CHECK.out.fastq ).reads
} else {
ch_shortreads_preprocessed = INPUT_CHECK.out.fastq
}
if ( params.longread_clip ) {
if ( params.perform_longread_clip ) {
ch_longreads_preprocessed = LONGREAD_PREPROCESSING ( INPUT_CHECK.out.nanopore ).reads
.map { it -> [ it[0], [it[1]] ] }
} else {
@ -119,7 +119,7 @@ workflow TAXPROFILER {
SUBWORKFLOW: COMPLEXITY FILTERING
*/
if ( params.shortread_complexityfilter ) {
if ( params.perform_shortread_complexityfilter ) {
ch_shortreads_filtered = SHORTREAD_COMPLEXITYFILTERING ( ch_shortreads_preprocessed ).reads
} else {
ch_shortreads_filtered = ch_shortreads_preprocessed
@ -129,7 +129,7 @@ workflow TAXPROFILER {
STEP: Run merging
*/
if ( params.run_merging ) {
if ( params.perform_runmerging ) {
ch_reads_for_cat_branch = ch_shortreads_filtered
.mix( ch_longreads_preprocessed )
@ -190,22 +190,22 @@ workflow TAXPROFILER {
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.shortread_clipmerge) {
if (params.perform_shortread_clipmerge) {
ch_multiqc_files = ch_multiqc_files.mix( SHORTREAD_PREPROCESSING.out.mqc.collect{it[1]}.ifEmpty([]) )
ch_versions = ch_versions.mix( SHORTREAD_PREPROCESSING.out.versions )
}
if (params.longread_clip) {
if (params.perform_longread_clip) {
ch_multiqc_files = ch_multiqc_files.mix( LONGREAD_PREPROCESSING.out.mqc.collect{it[1]}.ifEmpty([]) )
ch_versions = ch_versions.mix( LONGREAD_PREPROCESSING.out.versions )
}
if (params.shortread_complexityfilter){
if (params.perform_shortread_complexityfilter){
ch_multiqc_files = ch_multiqc_files.mix( SHORTREAD_COMPLEXITYFILTERING.out.mqc.collect{it[1]}.ifEmpty([]) )
ch_versions = ch_versions.mix( SHORTREAD_COMPLEXITYFILTERING.out.versions )
}
if (params.run_merging){
if (params.perform_runmerging){
ch_versions = ch_versions.mix(CAT_FASTQ.out.versions)
}