1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-13 06:43:09 +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 {
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 = [
path: { "${params.outdir}/malt/${meta.db_name}" },
mode: params.publish_dir_mode,
@ -173,7 +183,7 @@ process {
withName: KRAKEN2_KRAKEN2 {
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 = [
path: { "${params.outdir}/kraken2/${meta.db_name}" },
mode: params.publish_dir_mode,
@ -182,12 +192,13 @@ 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}" }
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,
pattern: '*.{biom,txt}'
]
ext.prefix = { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
}
withName: CUSTOM_DUMPSOFTWAREVERSIONS {

View file

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

View file

@ -10,7 +10,10 @@
"type": "object",
"fa_icon": "fas fa-terminal",
"description": "Define where the pipeline should find input data and save output data.",
"required": ["input", "outdir"],
"required": [
"input",
"outdir"
],
"properties": {
"input": {
"type": "string",
@ -173,7 +176,14 @@
"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.",
"fa_icon": "fas fa-copy",
"enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"],
"enum": [
"symlink",
"rellink",
"link",
"copy",
"copyNoFollow",
"move"
],
"hidden": true
},
"email_on_fail": {
@ -288,7 +298,10 @@
"shortread_clipmerge_tool": {
"type": "string",
"default": "fastp",
"enum": ["fastp", "adapterremoval"]
"enum": [
"fastp",
"adapterremoval"
]
},
"shortread_clipmerge_skipadaptertrim": {
"type": "boolean"
@ -309,8 +322,7 @@
"default": 15
},
"save_preprocessed_reads": {
"type": "boolean",
"default": false
"type": "boolean"
},
"shortread_complexityfilter_tool": {
"type": "string",
@ -333,15 +345,23 @@
"shortread_complexityfilter_prinseqplusplus_mode": {
"type": "string",
"default": "entropy",
"enum": ["entropy", "dust"]
"enum": [
"entropy",
"dust"
]
},
"shortread_complexityfilter_prinseqplusplus_dustscore": {
"type": "number",
"default": 0.5
},
"save_complexityfiltered_reads": {
"type": "boolean",
"default": false
"type": "boolean"
},
"run_merging": {
"type": "boolean"
},
"save_runmerged_reads": {
"type": "boolean"
}
}
}
}

View file

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