Skip to content

Commit

Permalink
Combine output and project param
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Apr 21, 2024
1 parent 8f2f79a commit 1b7d4ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/local/annotate.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ANNOTATE {

publishDir "${params.output}", mode: 'copy'
publishDir "${params.pubDir}", mode: 'copy'

input:
path variants_ch
Expand Down
1 change: 0 additions & 1 deletion tests/test_single_bam.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
params {
project = "test-job"
files = "$projectDir/tests/data/bam/*.bam"
output = "out"
}

14 changes: 10 additions & 4 deletions workflows/mtdna_server_2.nf
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
println "Welcome to ${params.service.name} ${workflow.manifest.version}"
println "(c) ${workflow.manifest.author}"
requiredParams = [
'project', 'files', 'output'
'project', 'files'
]

for (param in requiredParams) {
if (params[param] == null) {
exit 1, "Parameter ${param} is required."
}
}


if(params.output == null) {
params.pubDir = "output/${params.project}"
} else {
params.pubDir = params.output
}

if (params.output_reports == null || params.output_auxiliary == null ) {
params.output_reports = params.output
params.output_auxiliary = params.output
params.output_reports = params.pubDir
params.output_auxiliary = params.pubDir
}

include { INDEX } from '../modules/local/index'
Expand Down

0 comments on commit 1b7d4ca

Please sign in to comment.