1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-26 07:49:54 +00:00

Fix cat_fastq naming logic?

This commit is contained in:
James Fellows Yates 2022-04-08 13:28:37 +02:00
parent d130a72d74
commit ca011ccc5b
4 changed files with 45 additions and 17 deletions

View file

@ -161,9 +161,19 @@ process {
] ]
} }
withName: CAT_FASTQ {
ext.prefix = { "${meta.id}-${meta.run_accession}" }
publishDir = [
path: { "${params.outdir}/run_merging/" },
mode: params.publish_dir_mode,
pattern: '*.fastq.gz',
enabled: params.save_runmerged_reads
]
}
withName: MALT_RUN { withName: MALT_RUN {
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = if params.run_merging : { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } ext.prefix = params.run_merging ? { "${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,
@ -173,7 +183,7 @@ process {
withName: KRAKEN2_KRAKEN2 { withName: KRAKEN2_KRAKEN2 {
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = if params.run_merging : { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } ext.prefix = params.run_merging ? { "${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,
@ -182,12 +192,13 @@ process {
} }
withName: METAPHLAN3 { 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}" }
publishDir = [ publishDir = [
ext.prefix = if params.run_merging : { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } path: { "${params.outdir}/metaphlan3/${meta.db_name}" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{biom,txt}' pattern: '*.{biom,txt}'
] ]
ext.prefix = { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
} }
withName: CUSTOM_DUMPSOFTWAREVERSIONS { withName: CUSTOM_DUMPSOFTWAREVERSIONS {

View file

@ -78,6 +78,7 @@ params {
// run merging // run merging
run_merging = false run_merging = false
save_runmerged_reads = false
// MALT // MALT
run_malt = false run_malt = false

View file

@ -10,7 +10,10 @@
"type": "object", "type": "object",
"fa_icon": "fas fa-terminal", "fa_icon": "fas fa-terminal",
"description": "Define where the pipeline should find input data and save output data.", "description": "Define where the pipeline should find input data and save output data.",
"required": ["input", "outdir"], "required": [
"input",
"outdir"
],
"properties": { "properties": {
"input": { "input": {
"type": "string", "type": "string",
@ -173,7 +176,14 @@
"description": "Method used to save pipeline results to output directory.", "description": "Method used to save pipeline results to output directory.",
"help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.",
"fa_icon": "fas fa-copy", "fa_icon": "fas fa-copy",
"enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], "enum": [
"symlink",
"rellink",
"link",
"copy",
"copyNoFollow",
"move"
],
"hidden": true "hidden": true
}, },
"email_on_fail": { "email_on_fail": {
@ -288,7 +298,10 @@
"shortread_clipmerge_tool": { "shortread_clipmerge_tool": {
"type": "string", "type": "string",
"default": "fastp", "default": "fastp",
"enum": ["fastp", "adapterremoval"] "enum": [
"fastp",
"adapterremoval"
]
}, },
"shortread_clipmerge_skipadaptertrim": { "shortread_clipmerge_skipadaptertrim": {
"type": "boolean" "type": "boolean"
@ -309,8 +322,7 @@
"default": 15 "default": 15
}, },
"save_preprocessed_reads": { "save_preprocessed_reads": {
"type": "boolean", "type": "boolean"
"default": false
}, },
"shortread_complexityfilter_tool": { "shortread_complexityfilter_tool": {
"type": "string", "type": "string",
@ -333,15 +345,23 @@
"shortread_complexityfilter_prinseqplusplus_mode": { "shortread_complexityfilter_prinseqplusplus_mode": {
"type": "string", "type": "string",
"default": "entropy", "default": "entropy",
"enum": ["entropy", "dust"] "enum": [
"entropy",
"dust"
]
}, },
"shortread_complexityfilter_prinseqplusplus_dustscore": { "shortread_complexityfilter_prinseqplusplus_dustscore": {
"type": "number", "type": "number",
"default": 0.5 "default": 0.5
}, },
"save_complexityfiltered_reads": { "save_complexityfiltered_reads": {
"type": "boolean", "type": "boolean"
"default": false },
"run_merging": {
"type": "boolean"
},
"save_runmerged_reads": {
"type": "boolean"
} }
} }
} }

View file

@ -140,10 +140,6 @@ workflow TAXPROFILER {
[ meta_new, reads ] [ meta_new, reads ]
} }
.groupTuple() .groupTuple()
.map {
meta, reads ->
[ meta, reads.flatten() ]
}
.branch { .branch {
// we can't concate files if there is not a second run, we branch // we can't concate files if there is not a second run, we branch
// here to separate them out, and mix after // here to separate them out, and mix after