1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-26 03:19:56 +00:00

Don't have per sample directory as unnecessary if file names are unique with the db in them

This commit is contained in:
James Fellows Yates 2022-09-07 12:22:17 +02:00
parent 7c5f9d0c24
commit 832d981976

View file

@ -268,7 +268,7 @@ process {
// one run with multiple samples, so fix ID to just db name to ensure clean log name // one run with multiple samples, so fix ID to just db name to ensure clean log name
ext.prefix = { "${meta.db_name}" } ext.prefix = { "${meta.db_name}" }
publishDir = [ publishDir = [
path: { "${params.outdir}/malt/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/malt/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{rma6,log,sam}' pattern: '*.{rma6,log,sam}'
] ]
@ -278,7 +278,7 @@ process {
ext.args = "-c2c Taxonomy" ext.args = "-c2c Taxonomy"
ext.prefix = { "${meta.id}" } ext.prefix = { "${meta.id}" }
publishDir = [ publishDir = [
path: { "${params.outdir}/malt/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/malt/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{txt.gz,megan}' pattern: '*.{txt.gz,megan}'
] ]
@ -288,7 +288,7 @@ process {
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = params.perform_runmerging ? { "${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}/${ext.prefix}" }, path: { "${params.outdir}/kraken2/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{txt,report,fastq.gz}' pattern: '*.{txt,report,fastq.gz}'
] ]
@ -297,7 +297,7 @@ process {
withName: KRONA_CLEANUP { withName: KRONA_CLEANUP {
ext.prefix = params.perform_runmerging ? { "${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}/krona/${ext.prefix}" }, path: { "${params.outdir}/krona/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{html}' pattern: '*.{html}'
] ]
@ -306,7 +306,7 @@ process {
withName: KRONA_KTIMPORTTEXT { withName: KRONA_KTIMPORTTEXT {
ext.prefix = { "${meta.tool}-${meta.id}" } ext.prefix = { "${meta.tool}-${meta.id}" }
publishDir = [ publishDir = [
path: { "${params.outdir}/krona/${ext.prefix}" }, path: { "${params.outdir}/krona/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{html}' pattern: '*.{html}'
] ]
@ -321,7 +321,7 @@ process {
ext.args = "-i" ext.args = "-i"
ext.prefix = { "${meta.tool}-${meta.id}" } ext.prefix = { "${meta.tool}-${meta.id}" }
publishDir = [ publishDir = [
path: { "${params.outdir}/krona/${ext.prefix}" }, path: { "${params.outdir}/krona/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{html}' pattern: '*.{html}'
] ]
@ -331,7 +331,7 @@ process {
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = params.perform_runmerging ? { "${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}/${ext.prefix}" }, path: { "${params.outdir}/metaphlan3/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{biom,txt}' pattern: '*.{biom,txt}'
] ]
@ -339,7 +339,7 @@ process {
withName: CENTRIFUGE_CENTRIFUGE { withName: CENTRIFUGE_CENTRIFUGE {
publishDir = [ publishDir = [
path: { "${params.outdir}/centrifuge/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/centrifuge/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{txt,sam,gz}' pattern: '*.{txt,sam,gz}'
] ]
@ -352,7 +352,7 @@ process {
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}.centrifuge" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.centrifuge" } ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}.centrifuge" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.centrifuge" }
publishDir = [ publishDir = [
path: { "${params.outdir}/centrifuge/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/centrifuge/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{txt}' pattern: '*.{txt}'
] ]
@ -361,7 +361,7 @@ process {
withName: KAIJU_KAIJU { withName: KAIJU_KAIJU {
ext.prefix = params.perform_runmerging ? { "${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}/kaiju/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/kaiju/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.tsv' pattern: '*.tsv'
] ]
@ -385,7 +385,7 @@ process {
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = params.perform_runmerging ? { "${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}/diamond/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/diamond/${meta.db_name}/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{blast,xml,txt,daa,sam,tsv,paf,log}' pattern: '*.{blast,xml,txt,daa,sam,tsv,paf,log}'
] ]
@ -394,7 +394,7 @@ process {
withName: MOTUS_PROFILE { withName: MOTUS_PROFILE {
ext.prefix = params.perform_runmerging ? { "${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}/motus/${meta.db_name}/${ext.prefix}" }, path: { "${params.outdir}/motus/${meta.db_name}/" },
mode: params.publish_dir_mode mode: params.publish_dir_mode
] ]
} }