Make publishDir more flexible

This commit is contained in:
Gregor Sturm 2020-07-15 10:16:48 +02:00
parent dd34fa5853
commit 1dc47e7cd3
2 changed files with 41 additions and 28 deletions

View file

@ -1,4 +1,6 @@
nextflow.preview.dsl = 2 nextflow.preview.dsl = 2
def MODULE = "fastqc"
params.fastqc_publish_dir = "${params.out_dir}/$MODULE"
process FASTQC { process FASTQC {
input: input:
@ -9,10 +11,10 @@ process FASTQC {
path "*.zip", emit: report // e.g. for MultiQC later path "*.zip", emit: report // e.g. for MultiQC later
path "*.version.txt", emit: version path "*.version.txt", emit: version
container 'docker.pkg.github.com/nf-core/fastqc' container "docker.pkg.github.com/nf-core/$module"
conda "${moduleDir}/environment.yml" conda "${moduleDir}/environment.yml"
publishDir "${params.out_dir}", mode: params.publish_dir_mode publishDir "${params.fastqc_publish_dir}/$name", mode: params.publish_dir_mode
script: script:
""" """

View file

@ -14,8 +14,20 @@ tools:
overrepresented sequences. overrepresented sequences.
homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/
documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/
params:
- out_dir:
type: string
description: |
The pipeline's output directory. By default, the module will
output filese into `$out_dir/MODULE_NAME`
- fastqc_publish_dir:
type: string
description: |
Override the automatically generated output directory.
- publish_dir_mode:
type: string
description: Set the publishDir mode (e.g. copy, link, ...)
input: input:
-
- name: - name:
type: string type: string
description: Sample identifier description: Sample identifier
@ -23,7 +35,6 @@ input:
type: file type: file
description: Input FastQ file, or pair of files description: Input FastQ file, or pair of files
output: output:
-
- report: - report:
type: file type: file
description: FastQC report description: FastQC report