Skip to content

Commit

Permalink
Re-add getSoftwareName
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Aug 13, 2021
1 parent ed5ea08 commit 3abdf96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions modules/fastqc/functions.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
// Utility functions used in nf-core DSL2 module files
//

//
// Extract name of software tool from process name using $task.process
//
def getSoftwareName(task_process) {
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
}

//
// Extract name of module from process name using $task.process
//
Expand Down
4 changes: 2 additions & 2 deletions modules/fastqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import generic module functions
include { initOptions; saveFiles; getProcessName } from './functions'
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'

params.options = [:]
options = initOptions(params.options)
Expand All @@ -9,7 +9,7 @@ process FASTQC {
label 'process_medium'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getProcessName(task.process).toLowerCase(), meta:meta, publish_by_meta:['id']) }
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }

conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
Expand Down

0 comments on commit 3abdf96

Please sign in to comment.