Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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)]
* Convert `d` to `day` in the `cleanParameters` function to make Duration objects like `2d` pass the validation [[#858](https://github.com/nf-core/tools/issues/858)]

## [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/functions.nf
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ def saveFiles(Map args) {
return "${getPathFromList(path_list)}/$args.filename"
}
}
}
}
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
2 changes: 1 addition & 1 deletion nf_core/module-template/software/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: {{ tool_name }}
name: {{ tool_name_underscore }}
## TODO nf-core: Add a description of the module and list keywords
description: write your description here
keywords:
Expand Down
6 changes: 3 additions & 3 deletions nf_core/module-template/tests/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

nextflow.enable.dsl = 2

include { {{ tool_name|upper }} } from '../../../{{ "../" if subtool else "" }}software/{{ tool_dir }}/main.nf' addParams( options: [:] )
include { {{ tool_name_underscore|upper }} } from '../../../{{ "../" if subtool else "" }}software/{{ tool_dir }}/main.nf' addParams( options: [:] )

workflow test_{{ tool_name }} {
workflow test_{{ tool_name_underscore }} {
{% if has_meta %}
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
{%- else %}
input = file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true)
{%- endif %}

{{ tool_name|upper }} ( input )
{{ tool_name_underscore|upper }} ( input )
}
2 changes: 1 addition & 1 deletion nf_core/module-template/tests/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## TODO nf-core: Please run the following command to build this file:
# nf-core modules create-test-yml {{ tool }}{%- if subtool %}/{{ subtool }}{%- endif %}
- name: {{ tool }}{{ ' '+subtool if subtool else '' }}
command: nextflow run ./tests/software/{{ tool_dir }} -entry test_{{ tool_name }} -c tests/config/nextflow.config
command: nextflow run ./tests/software/{{ tool_dir }} -entry test_{{ tool_name_underscore }} -c tests/config/nextflow.config
tags:
- {{ tool }}
{%- if subtool %}
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