Skip to content

Commit f690b89

Browse files
committed
Template update for nf-core/tools version 1.12.1
1 parent 82a71c9 commit f690b89

File tree

10 files changed

+137
-18
lines changed

10 files changed

+137
-18
lines changed

.github/CONTRIBUTING.md

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ If you'd like to write some code for nf-core/rnaseq, the standard workflow is as
1818
1. Check that there isn't already an issue about your idea in the [nf-core/rnaseq issues](https://github.com/nf-core/rnaseq/issues) to avoid duplicating work
1919
* If there isn't one already, please create one so that others know you're working on this
2020
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/rnaseq repository](https://github.com/nf-core/rnaseq) to your GitHub account
21-
3. Make the necessary changes / additions within your forked repository
22-
4. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
21+
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
22+
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).
23+
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
2324

2425
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/).
2526

@@ -30,14 +31,14 @@ Typically, pull-requests are only fully reviewed when these tests are passing, t
3031

3132
There are typically two types of tests that run:
3233

33-
### Lint Tests
34+
### Lint tests
3435

3536
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
3637
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint <pipeline-directory>` command.
3738

3839
If any failures or warnings are encountered, please follow the listed URL for more documentation.
3940

40-
### Pipeline Tests
41+
### Pipeline tests
4142

4243
Each `nf-core` pipeline should be set up with a minimal set of test-data.
4344
`GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully.
@@ -55,3 +56,73 @@ These tests are run both with the latest available version of `Nextflow` and als
5556
## Getting help
5657

5758
For further information/help, please consult the [nf-core/rnaseq documentation](https://nf-co.re/rnaseq/usage) and don't hesitate to get in touch on the nf-core Slack [#rnaseq](https://nfcore.slack.com/channels/rnaseq) channel ([join our Slack here](https://nf-co.re/join/slack)).
59+
60+
## Pipeline contribution conventions
61+
62+
To make the nf-core/rnaseq code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
63+
64+
### Adding a new step
65+
66+
If you wish to contribute a new step, please use the following coding standards:
67+
68+
1. Define the corresponding input channel into your new process from the expected previous process channel
69+
2. Write the process block (see below).
70+
3. Define the output channel if needed (see below).
71+
4. Add any new flags/options to `nextflow.config` with a default (see below).
72+
5. Add any new flags/options to `nextflow_schema.json` with help text (with `nf-core schema build .`)
73+
6. Add any new flags/options to the help message (for integer/text parameters, print to help the corresponding `nextflow.config` parameter).
74+
7. Add sanity checks for all relevant parameters.
75+
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`.
76+
9. Do local tests that the new code works properly and as expected.
77+
10. Add a new test command in `.github/workflow/ci.yaml`.
78+
11. If applicable add a [MultiQC](https://https://multiqc.info/) module.
79+
12. Update MultiQC config `assets/multiqc_config.yaml` so relevant suffixes, name clean up, General Statistics Table column order, and module figures are in the right order.
80+
13. Optional: Add any descriptions of MultiQC report sections and output files to `docs/output.md`.
81+
82+
### Default values
83+
84+
Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
85+
86+
Once there, use `nf-core schema build .` to add to `nextflow_schema.json`.
87+
88+
### Default processes resource requirements
89+
90+
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/%7B%7Bcookiecutter.name_noslash%7D%7D/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
91+
92+
The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block.
93+
94+
### Naming schemes
95+
96+
Please use the following naming schemes, to make it easy to understand what is going where.
97+
98+
* initial process channel: `ch_output_from_<process>`
99+
* intermediate and terminal channels: `ch_<previousprocess>_for_<nextprocess>`
100+
101+
### Nextflow version bumping
102+
103+
If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]`
104+
105+
### Software version reporting
106+
107+
If you add a new tool to the pipeline, please ensure you add the information of the tool to the `get_software_version` process.
108+
109+
Add to the script block of the process, something like the following:
110+
111+
```bash
112+
<YOUR_TOOL> --version &> v_<YOUR_TOOL>.txt 2>&1 || true
113+
```
114+
115+
or
116+
117+
```bash
118+
<YOUR_TOOL> --help | head -n 1 &> v_<YOUR_TOOL>.txt 2>&1 || true
119+
```
120+
121+
You then need to edit the script `bin/scrape_software_versions.py` to:
122+
123+
1. Add a Python regex for your tool's `--version` output (as in stored in the `v_<YOUR_TOOL>.txt` file), to ensure the version is reported as a `v` and the version number e.g. `v2.1.1`
124+
2. Add a HTML entry to the `OrderedDict` for formatting in MultiQC.
125+
126+
### Images and figures
127+
128+
For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ Thanks for telling us about a problem with the pipeline.
1313
Please delete this text and anything that's not relevant from the template below:
1414
-->
1515

16+
## Check Documentation
17+
18+
I have checked the following places for your error:
19+
20+
- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)
21+
- [ ] [nf-core/rnaseq pipeline documentation](https://nf-co.re/nf-core/rnaseq/usage)
22+
1623
## Description of the bug
1724

1825
<!-- A clear and concise description of what the bug is. -->
@@ -28,6 +35,13 @@ Steps to reproduce the behaviour:
2835

2936
<!-- A clear and concise description of what you expected to happen. -->
3037

38+
## Log files
39+
40+
Have you provided the following extra information/files:
41+
42+
- [ ] The command used to run the pipeline
43+
- [ ] The `.nextflow.log` file <!-- this is a hidden file in the directory where you launched the pipeline -->
44+
3145
## System
3246

3347
- Hardware: <!-- [e.g. HPC, Desktop, Cloud...] -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/rnas
1313

1414
## PR checklist
1515

16-
- [ ] This comment contains a description of changes (with reason)
17-
- [ ] `CHANGELOG.md` is updated
16+
- [ ] This comment contains a description of changes (with reason).
1817
- [ ] If you've fixed a bug or added code that should be tested, add tests!
19-
- [ ] Documentation in `docs` is updated
20-
- [ ] If necessary, also make a PR on the [nf-core/rnaseq branch on the nf-core/test-datasets repo](https://github.com/nf-core/test-datasets/pull/new/nf-core/rnaseq)
18+
- [ ] If you've added a new tool - add to the software_versions process and a regex to `scrape_software_versions.py`
19+
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/rnaseq/tree/master/.github/CONTRIBUTING.md)
20+
- [ ] If necessary, also make a PR on the nf-core/rnaseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
21+
- [ ] Make sure your code lints (`nf-core lint .`).
22+
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
23+
- [ ] Usage Documentation in `docs/usage.md` is updated.
24+
- [ ] Output Documentation in `docs/output.md` is updated.
25+
- [ ] `CHANGELOG.md` is updated.
26+
- [ ] `README.md` is updated (including new tool citations and authors/contributors).

.github/markdownlint.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Markdownlint configuration file
2-
default: true,
2+
default: true
33
line-length: false
44
no-duplicate-header:
55
siblings_only: true
6+
no-inline-html:
7+
allowed_elements:
8+
- img
9+
- p
10+
- kbd
11+
- details
12+
- summary

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nfcore/base:1.12
1+
FROM nfcore/base:1.12.1
22
LABEL authors="Phil Ewels, Rickard Hammarén" \
33
description="Docker image containing all software requirements for the nf-core/rnaseq pipeline"
44

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
## Introduction
1414

15+
<!-- TODO nf-core: Write a 1-2 sentence summary of what data the pipeline is for and what it does -->
16+
**nf-core/rnaseq** is a bioinformatics best-practise analysis pipeline for
17+
1518
The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.
1619

1720
## Quick Start
@@ -38,6 +41,15 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
3841

3942
See [usage docs](https://nf-co.re/rnaseq/usage) for all of the available options when running the pipeline.
4043

44+
## Pipeline Summary
45+
46+
By default, the pipeline currently performs the following:
47+
48+
<!-- TODO nf-core: Fill in short bullet-pointed list of default steps of pipeline -->
49+
50+
* Sequencing quality control (`FastQC`)
51+
* Overall pipeline run summaries (`MultiQC`)
52+
4153
## Documentation
4254

4355
The nf-core/rnaseq pipeline comes with documentation about the pipeline: [usage](https://nf-co.re/rnaseq/usage) and [output](https://nf-co.re/rnaseq/output).
@@ -48,13 +60,18 @@ The nf-core/rnaseq pipeline comes with documentation about the pipeline: [usage]
4860

4961
nf-core/rnaseq was originally written by Phil Ewels, Rickard Hammarén.
5062

63+
We thank the following people for their extensive assistance in the development
64+
of this pipeline:
65+
66+
<!-- TODO nf-core: If applicable, make list of people who have also contributed -->
67+
5168
## Contributions and Support
5269

5370
If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).
5471

5572
For further information or help, don't hesitate to get in touch on the [Slack `#rnaseq` channel](https://nfcore.slack.com/channels/rnaseq) (you can join with [this invite](https://nf-co.re/join/slack)).
5673
57-
## Citation
74+
## Citations
5875
5976
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi. -->
6077
<!-- If you use nf-core/rnaseq for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->
@@ -67,3 +84,7 @@ You can cite the `nf-core` publication as follows:
6784
>
6885
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
6986
> ReadCube: [Full Access Link](https://rdcu.be/b1GjZ)
87+
88+
In addition, references of tools and data used in this pipeline are as follows:
89+
90+
<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->

assets/nf-core-rnaseq_logo.png

93.3 KB
Loading

conf/igenomes.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ params {
2121
readme = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/README.txt"
2222
mito_name = "MT"
2323
macs_gsize = "2.7e9"
24-
blacklist = "${baseDir}/assets/blacklists/GRCh37-blacklist.bed"
24+
blacklist = "${projectDir}/assets/blacklists/GRCh37-blacklist.bed"
2525
}
2626
'GRCh38' {
2727
fasta = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa"
@@ -33,7 +33,7 @@ params {
3333
bed12 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.bed"
3434
mito_name = "chrM"
3535
macs_gsize = "2.7e9"
36-
blacklist = "${baseDir}/assets/blacklists/hg38-blacklist.bed"
36+
blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed"
3737
}
3838
'GRCm38' {
3939
fasta = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/WholeGenomeFasta/genome.fa"
@@ -46,7 +46,7 @@ params {
4646
readme = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/README.txt"
4747
mito_name = "MT"
4848
macs_gsize = "1.87e9"
49-
blacklist = "${baseDir}/assets/blacklists/GRCm38-blacklist.bed"
49+
blacklist = "${projectDir}/assets/blacklists/GRCm38-blacklist.bed"
5050
}
5151
'TAIR10' {
5252
fasta = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/WholeGenomeFasta/genome.fa"
@@ -270,7 +270,7 @@ params {
270270
bed12 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Annotation/Genes/genes.bed"
271271
mito_name = "chrM"
272272
macs_gsize = "2.7e9"
273-
blacklist = "${baseDir}/assets/blacklists/hg38-blacklist.bed"
273+
blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed"
274274
}
275275
'hg19' {
276276
fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/genome.fa"
@@ -283,7 +283,7 @@ params {
283283
readme = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/README.txt"
284284
mito_name = "chrM"
285285
macs_gsize = "2.7e9"
286-
blacklist = "${baseDir}/assets/blacklists/hg19-blacklist.bed"
286+
blacklist = "${projectDir}/assets/blacklists/hg19-blacklist.bed"
287287
}
288288
'mm10' {
289289
fasta = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/WholeGenomeFasta/genome.fa"
@@ -296,7 +296,7 @@ params {
296296
readme = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/README.txt"
297297
mito_name = "chrM"
298298
macs_gsize = "1.87e9"
299-
blacklist = "${baseDir}/assets/blacklists/mm10-blacklist.bed"
299+
blacklist = "${projectDir}/assets/blacklists/mm10-blacklist.bed"
300300
}
301301
'bosTau8' {
302302
fasta = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/WholeGenomeFasta/genome.fa"
85 KB
Loading

main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ workflow.onComplete {
336336
def email_html = html_template.toString()
337337

338338
// Render the sendmail template
339-
def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, baseDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: params.max_multiqc_email_size.toBytes() ]
339+
def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: params.max_multiqc_email_size.toBytes() ]
340340
def sf = new File("$projectDir/assets/sendmail_template.txt")
341341
def sendmail_template = engine.createTemplate(sf).make(smail_fields)
342342
def sendmail_html = sendmail_template.toString()

0 commit comments

Comments
 (0)