mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 17:29:55 +00:00
Merge pull request #192 from nf-core/publishing-fix
Fix publishing of log files of rpreprocessing steps
This commit is contained in:
commit
aa117e8af9
4 changed files with 125 additions and 50 deletions
|
@ -33,7 +33,7 @@ process {
|
||||||
}
|
}
|
||||||
|
|
||||||
withName: FALCO {
|
withName: FALCO {
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}_raw" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}_raw_falco" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
path: { "${params.outdir}/falco/raw" },
|
path: { "${params.outdir}/falco/raw" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
|
@ -42,7 +42,7 @@ process {
|
||||||
}
|
}
|
||||||
|
|
||||||
withName: FALCO_PROCESSED {
|
withName: FALCO_PROCESSED {
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}_processed" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}_processed_falco" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
path: { "${params.outdir}/falco/processed" },
|
path: { "${params.outdir}/falco/processed" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
|
@ -61,10 +61,17 @@ process {
|
||||||
].join(' ').trim()
|
].join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/fastp" },
|
path: { "${params.outdir}/fastp" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.fastq.gz',
|
pattern: '*.fastq.gz',
|
||||||
enabled: params.save_preprocessed_reads
|
enabled: params.save_preprocessed_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/fastp" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.{log,html,json}'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,10 +89,17 @@ process {
|
||||||
].join(' ').trim()
|
].join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/fastp" },
|
path: { "${params.outdir}/fastp" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.fastq.gz',
|
pattern: '*.fastq.gz',
|
||||||
enabled: params.save_preprocessed_reads
|
enabled: params.save_preprocessed_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/fastp" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.{log,html,json}'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,10 +112,17 @@ process {
|
||||||
].join(' ').trim()
|
].join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/adapterremoval" },
|
path: { "${params.outdir}/adapterremoval" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.fastq.gz',
|
pattern: '*.fastq.gz',
|
||||||
enabled: params.save_preprocessed_reads
|
enabled: params.save_preprocessed_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/adapterremoval" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.settings'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,20 +138,34 @@ process {
|
||||||
].join(' ').trim()
|
].join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/adapterremoval" },
|
path: { "${params.outdir}/adapterremoval" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.fastq.gz',
|
pattern: '*.fastq.gz',
|
||||||
enabled: params.save_preprocessed_reads
|
enabled: params.save_preprocessed_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/adapterremoval" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.settings'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
withName: PORECHOP_PORECHOP {
|
withName: PORECHOP_PORECHOP {
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/porechop" },
|
path: { "${params.outdir}/porechop" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.fastq.gz',
|
pattern: '*.fastq.gz',
|
||||||
enabled: params.save_preprocessed_reads
|
enabled: params.save_preprocessed_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/porechop" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.log'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,10 +178,17 @@ process {
|
||||||
.join(' ').trim()
|
.join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}_filtered" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}_filtered" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/filtlong" },
|
path: { "${params.outdir}/filtlong" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.{fastq.gz,log}',
|
pattern: '*.fastq.gz',
|
||||||
enabled: params.save_preprocessed_reads
|
enabled: params.save_preprocessed_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/filtlong" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.log'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,10 +282,17 @@ process {
|
||||||
].join(' ').trim()
|
].join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}-${meta.run_accession}" }
|
ext.prefix = { "${meta.id}-${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/bbduk/" },
|
path: { "${params.outdir}/bbduk/" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.{fastq.gz,log}',
|
pattern: '*.{fastq.gz,log}',
|
||||||
enabled: params.save_complexityfiltered_reads
|
enabled: params.save_complexityfiltered_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/bbduk/" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.log'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,10 +304,17 @@ process {
|
||||||
].join(' ').trim()
|
].join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}-${meta.run_accession}" }
|
ext.prefix = { "${meta.id}-${meta.run_accession}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
[
|
||||||
path: { "${params.outdir}/prinseqplusplus/" },
|
path: { "${params.outdir}/prinseqplusplus/" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*{_good_out.fastq.gz,_good_out_R1.fastq.gz,_good_out_R2.fastq.gz,log}',
|
pattern: '*{_good_out.fastq.gz,_good_out_R1.fastq.gz,_good_out_R2.fastq.gz}',
|
||||||
enabled: params.save_complexityfiltered_reads
|
enabled: params.save_complexityfiltered_reads
|
||||||
|
],
|
||||||
|
[
|
||||||
|
path: { "${params.outdir}/prinseqplusplus/" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.log'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,7 +351,7 @@ process {
|
||||||
|
|
||||||
withName: KRAKEN2_KRAKEN2 {
|
withName: KRAKEN2_KRAKEN2 {
|
||||||
ext.args = params.kraken2_save_minimizers ? { "${meta.db_params} --report-minimizer-data" } : { "${meta.db_params}" }
|
ext.args = params.kraken2_save_minimizers ? { "${meta.db_params} --report-minimizer-data" } : { "${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.tool == "bracken" ? "${meta.id}-${meta.db_name}.bracken" : "${meta.id}-${meta.db_name}" } : { meta.tool == "bracken" ? "${meta.id}-${meta.run_accession}-${meta.db_name}.bracken" : "${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,
|
||||||
|
@ -305,7 +361,7 @@ process {
|
||||||
|
|
||||||
withName: BRACKEN_BRACKEN {
|
withName: BRACKEN_BRACKEN {
|
||||||
errorStrategy = 'ignore'
|
errorStrategy = 'ignore'
|
||||||
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}.bracken" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.bracken" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
path: { "${params.outdir}/bracken/${meta.db_name}/" },
|
path: { "${params.outdir}/bracken/${meta.db_name}/" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
|
@ -318,7 +374,7 @@ process {
|
||||||
publishDir = [
|
publishDir = [
|
||||||
path: { "${params.outdir}/bracken/" },
|
path: { "${params.outdir}/bracken/" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
pattern: '*.{txt}'
|
pattern: '*.txt'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,8 @@
|
||||||
"falco": {
|
"falco": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"git_sha": "fc959214036403ad83efe7a41d43d0606c445cda",
|
"git_sha": "fc959214036403ad83efe7a41d43d0606c445cda",
|
||||||
"installed_by": ["modules"]
|
"installed_by": ["modules"],
|
||||||
|
"patch": "modules/nf-core/falco/falco.diff"
|
||||||
},
|
},
|
||||||
"fastp": {
|
"fastp": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
|
|
16
modules/nf-core/falco/falco.diff
generated
Normal file
16
modules/nf-core/falco/falco.diff
generated
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Changes in module 'nf-core/falco'
|
||||||
|
--- modules/nf-core/falco/main.nf
|
||||||
|
+++ modules/nf-core/falco/main.nf
|
||||||
|
@@ -33,7 +33,9 @@
|
||||||
|
"""
|
||||||
|
} else {
|
||||||
|
"""
|
||||||
|
- falco $args --threads $task.cpus ${reads}
|
||||||
|
+ [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
|
||||||
|
+ [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
|
||||||
|
+ falco $args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
|
||||||
|
************************************************************
|
4
modules/nf-core/falco/main.nf
generated
4
modules/nf-core/falco/main.nf
generated
|
@ -33,7 +33,9 @@ process FALCO {
|
||||||
"""
|
"""
|
||||||
} else {
|
} else {
|
||||||
"""
|
"""
|
||||||
falco $args --threads $task.cpus ${reads}
|
[ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
|
||||||
|
[ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
|
||||||
|
falco $args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
Loading…
Reference in a new issue