Skip to content
Snippets Groups Projects
Commit 22115202 authored by nf-core-bot's avatar nf-core-bot
Browse files

Template update for nf-core/tools version 2.1

parent 4565ea50
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,9 @@ indent_style = space ...@@ -11,6 +11,9 @@ indent_style = space
[*.{yml,yaml}] [*.{yml,yaml}]
indent_size = 2 indent_size = 2
[*.json]
insert_final_newline = unset
# These files are edited and tested upstream in nf-core/modules # These files are edited and tested upstream in nf-core/modules
[/modules/nf-core/**] [/modules/nf-core/**]
charset = unset charset = unset
......
...@@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/hic, the standard workflow is as fo ...@@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/hic, the standard workflow is as fo
* If there isn't one already, please create one so that others know you're working on this * If there isn't one already, please create one so that others know you're working on this
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/hic repository](https://github.com/nf-core/hic) to your GitHub account 2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/hic repository](https://github.com/nf-core/hic) to your GitHub account
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) 3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
4. Use `nf-core schema build .` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). 4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged 5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/).
...@@ -69,7 +69,7 @@ If you wish to contribute a new step, please use the following coding standards: ...@@ -69,7 +69,7 @@ If you wish to contribute a new step, please use the following coding standards:
2. Write the process block (see below). 2. Write the process block (see below).
3. Define the output channel if needed (see below). 3. Define the output channel if needed (see below).
4. Add any new flags/options to `nextflow.config` with a default (see below). 4. Add any new flags/options to `nextflow.config` with a default (see below).
5. Add any new flags/options to `nextflow_schema.json` with help text (with `nf-core schema build .`). 5. Add any new flags/options to `nextflow_schema.json` with help text (with `nf-core schema build`).
6. Add any new flags/options to the help message (for integer/text parameters, print to help the corresponding `nextflow.config` parameter). 6. Add any new flags/options to the help message (for integer/text parameters, print to help the corresponding `nextflow.config` parameter).
7. Add sanity checks for all relevant parameters. 7. Add sanity checks for all relevant parameters.
8. Add any new software to the `scrape_software_versions.py` script in `bin/` and the version command to the `scrape_software_versions` process in `main.nf`. 8. Add any new software to the `scrape_software_versions.py` script in `bin/` and the version command to the `scrape_software_versions` process in `main.nf`.
...@@ -83,7 +83,7 @@ If you wish to contribute a new step, please use the following coding standards: ...@@ -83,7 +83,7 @@ If you wish to contribute a new step, please use the following coding standards:
Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope. Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
Once there, use `nf-core schema build .` to add to `nextflow_schema.json`. Once there, use `nf-core schema build` to add to `nextflow_schema.json`.
### Default processes resource requirements ### Default processes resource requirements
......
...@@ -18,7 +18,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/hic/ ...@@ -18,7 +18,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/hic/
- [ ] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/hic/tree/master/.github/CONTRIBUTING.md) - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/hic/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/hic _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. - [ ] If necessary, also make a PR on the nf-core/hic _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint .`). - [ ] Make sure your code lints (`nf-core lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
- [ ] Usage Documentation in `docs/usage.md` is updated. - [ ] Usage Documentation in `docs/usage.md` is updated.
- [ ] Output Documentation in `docs/output.md` is updated. - [ ] Output Documentation in `docs/output.md` is updated.
......
...@@ -53,7 +53,7 @@ jobs: ...@@ -53,7 +53,7 @@ jobs:
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
node-version: "10" node-version: '10'
- name: Install editorconfig-checker - name: Install editorconfig-checker
run: npm install -g editorconfig-checker run: npm install -g editorconfig-checker
......
...@@ -33,7 +33,7 @@ On release, automated continuous integration tests run the pipeline on a full-si ...@@ -33,7 +33,7 @@ On release, automated continuous integration tests run the pipeline on a full-si
## Quick Start ## Quick Start
1. Install [`Nextflow`](https://nf-co.re/usage/installation) (`>=21.04.0`) 1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=21.04.0`)
2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_ 2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_
......
...@@ -30,7 +30,7 @@ for k, v in sorted(results.items()): ...@@ -30,7 +30,7 @@ for k, v in sorted(results.items()):
print(" <dt>{}</dt><dd><samp>{}</samp></dd>".format(k, v)) print(" <dt>{}</dt><dd><samp>{}</samp></dd>".format(k, v))
print(" </dl>") print(" </dl>")
# Write out regexes as csv file: # Write out as tsv file:
with open("software_versions.tsv", "w") as f: with open("software_versions.tsv", "w") as f:
for k, v in sorted(results.items()): for k, v in sorted(results.items()):
f.write("{}\t{}\n".format(k, v)) f.write("{}\t{}\n".format(k, v))
...@@ -24,17 +24,21 @@ class NfcoreTemplate { ...@@ -24,17 +24,21 @@ class NfcoreTemplate {
public static void hostName(workflow, params, log) { public static void hostName(workflow, params, log) {
Map colors = logColours(params.monochrome_logs) Map colors = logColours(params.monochrome_logs)
if (params.hostnames) { if (params.hostnames) {
def hostname = "hostname".execute().text.trim() try {
params.hostnames.each { prof, hnames -> def hostname = "hostname".execute().text.trim()
hnames.each { hname -> params.hostnames.each { prof, hnames ->
if (hostname.contains(hname) && !workflow.profile.contains(prof)) { hnames.each { hname ->
log.info "=${colors.yellow}====================================================${colors.reset}=\n" + if (hostname.contains(hname) && !workflow.profile.contains(prof)) {
"${colors.yellow}WARN: You are running with `-profile $workflow.profile`\n" + log.info "=${colors.yellow}====================================================${colors.reset}=\n" +
" but your machine hostname is ${colors.white}'$hostname'${colors.reset}.\n" + "${colors.yellow}WARN: You are running with `-profile $workflow.profile`\n" +
" ${colors.yellow_bold}Please use `-profile $prof${colors.reset}`\n" + " but your machine hostname is ${colors.white}'$hostname'${colors.reset}.\n" +
"=${colors.yellow}====================================================${colors.reset}=" " ${colors.yellow_bold}Please use `-profile $prof${colors.reset}`\n" +
"=${colors.yellow}====================================================${colors.reset}="
}
} }
} }
} catch (Exception e) {
log.warn "[$workflow.manifest.name] Could not determine 'hostname' - skipping check. Reason: ${e.message}."
} }
} }
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"type": "string", "type": "string",
"format": "file-path", "format": "file-path",
"mimetype": "text/csv", "mimetype": "text/csv",
"pattern": "\\.csv$", "pattern": "^\\S+\\.csv$",
"schema": "assets/schema_input.json", "schema": "assets/schema_input.json",
"description": "Path to comma-separated file containing information about the samples in the experiment.", "description": "Path to comma-separated file containing information about the samples in the experiment.",
"help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row. See [usage docs](https://nf-co.re/hic/usage#samplesheet-input).", "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row. See [usage docs](https://nf-co.re/hic/usage#samplesheet-input).",
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
"type": "string", "type": "string",
"format": "file-path", "format": "file-path",
"mimetype": "text/plain", "mimetype": "text/plain",
"pattern": "\\.fn?a(sta)?(\\.gz)?$", "pattern": "^\\S+\\.fn?a(sta)?(\\.gz)?$",
"description": "Path to FASTA genome file.", "description": "Path to FASTA genome file.",
"help_text": "This parameter is *mandatory* if `--genome` is not specified. If you don't have a BWA index available this will be generated for you automatically. Combine with `--save_reference` to save BWA index for future runs.", "help_text": "This parameter is *mandatory* if `--genome` is not specified. If you don't have a BWA index available this will be generated for you automatically. Combine with `--save_reference` to save BWA index for future runs.",
"fa_icon": "far fa-file-code" "fa_icon": "far fa-file-code"
......
...@@ -130,7 +130,9 @@ workflow HIC { ...@@ -130,7 +130,9 @@ workflow HIC {
*/ */
workflow.onComplete { workflow.onComplete {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report) if (params.email || params.email_on_fail) {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report)
}
NfcoreTemplate.summary(workflow, params, log) NfcoreTemplate.summary(workflow, params, log)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment