1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-09-21 04:32:06 +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_VER: ""
NXF_EDGE: "1" NXF_EDGE: "1"
parameters: parameters:
- "--longread_clip false" - "--perform_longread_clip false"
- "--shortread_clip false" - "--perform_shortread_clipmerge false"
- "--shortread_clipmerge_tool fastp" - "--shortread_clipmerge_tool fastp"
- "--shortread_clipmerge_tool fastp --shortread_clipmerge_mergepairs --shortread_clipmerge_excludeunmerged" - "--shortread_clipmerge_tool fastp --shortread_clipmerge_mergepairs --shortread_clipmerge_excludeunmerged"
- "--shortread_clipmerge_tool fastp --shortread_clipmerge_mergepairs" - "--shortread_clipmerge_tool fastp --shortread_clipmerge_mergepairs"
@ -39,8 +39,8 @@ jobs:
- "--shortread_clipmerge_tool adapterremoval --shortread_clipmerge_mergepairs" - "--shortread_clipmerge_tool adapterremoval --shortread_clipmerge_mergepairs"
- "--shortread_complexityfilter_tool bbduk" - "--shortread_complexityfilter_tool bbduk"
- "--shortread_complexityfilter_tool prinseq" - "--shortread_complexityfilter_tool prinseq"
- "--run_merging" - "--perform_runmerging"
- "--run_merging --shortread_clipmerge_mergepairs" - "--perform_runmerging --shortread_clipmerge_mergepairs"
steps: steps:
- name: Check out pipeline code - name: Check out pipeline code

View file

@ -173,7 +173,7 @@ process {
withName: MALT_RUN { withName: MALT_RUN {
ext.args = { "${meta.db_params}" } 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 = [ publishDir = [
path: { "${params.outdir}/malt/${meta.db_name}" }, path: { "${params.outdir}/malt/${meta.db_name}" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
@ -183,7 +183,7 @@ process {
withName: KRAKEN2_KRAKEN2 { withName: KRAKEN2_KRAKEN2 {
ext.args = { "${meta.db_params}" } 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 = [ publishDir = [
path: { "${params.outdir}/kraken2/${meta.db_name}" }, path: { "${params.outdir}/kraken2/${meta.db_name}" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
@ -193,7 +193,7 @@ process {
withName: METAPHLAN3 { withName: METAPHLAN3 {
ext.args = { "${meta.db_params}" } 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 = [ publishDir = [
path: { "${params.outdir}/metaphlan3/${meta.db_name}" }, path: { "${params.outdir}/metaphlan3/${meta.db_name}" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,

View file

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

View file

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

View file

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

View file

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