Skip to content

Commit

Permalink
fixed bug nf-core#1011
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMenden committed Apr 16, 2021
1 parent b00a269 commit 790e980
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Added a timestamp to the trace + timetime + report + dag filenames to fix overwrite issue on AWS
* Rewrite the `params_summary_log()` function to properly ignore unset params and have nicer formatting [[#971](https://github.com/nf-core/tools/issues/971)]
* Fix overly strict `--max_time` formatting regex in template schema [[#973](https://github.com/nf-core/tools/issues/973)]
* Added `tool_name_underscore` to the module template to allow TOOL_SUBTOOL in `main.nf` [[#1011](https://github.com/nf-core/tools/issues/1011)]

## [v1.13.3 - Copper Crocodile Resurrection :crocodile:](https://github.com/nf-core/tools/releases/tag/1.13.2) - [2021-03-24]

Expand Down
2 changes: 1 addition & 1 deletion nf_core/module-template/software/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
options = initOptions(params.options)

process {{ tool_name|upper }} {
process {{ tool_name_underscore|upper }} {
tag {{ '"$meta.id"' if has_meta else "'$bam'" }}
label '{{ process_label }}'
publishDir "${params.outdir}",
Expand Down
5 changes: 3 additions & 2 deletions nf_core/modules/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ def __init__(
self.process_label = process_label
self.has_meta = has_meta
self.force_overwrite = force

self.tool_conda_name = conda_name
self.subtool = None
self.tool_conda_name = conda_name
self.tool_licence = None
self.repo_type = None
self.tool_licence = ""
Expand Down Expand Up @@ -116,6 +115,8 @@ def create(self):
self.tool_name = f"{self.tool}/{self.subtool}"
self.tool_dir = os.path.join(self.tool, self.subtool)

self.tool_name_underscore = self.tool_name.replace("/", "_")

# Check existance of directories early for fast-fail
self.file_paths = self.get_module_dirs()

Expand Down

0 comments on commit 790e980

Please sign in to comment.