You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> If you need help using or modifying nf-core/hic then the best place to ask is on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel ([join our Slack here](https://nf-co.re/join/slack)).
15
13
16
14
## Contribution workflow
17
15
@@ -20,8 +18,9 @@ If you'd like to write some code for nf-core/hic, the standard workflow is as fo
20
18
1. Check that there isn't already an issue about your idea in the [nf-core/hic issues](https://github.com/nf-core/hic/issues) to avoid duplicating work
21
19
* If there isn't one already, please create one so that others know you're working on this
22
20
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
23
-
3. Make the necessary changes / additions within your forked repository
24
-
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
25
24
26
25
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/).
27
26
@@ -32,14 +31,14 @@ Typically, pull-requests are only fully reviewed when these tests are passing, t
32
31
33
32
There are typically two types of tests that run:
34
33
35
-
### Lint Tests
34
+
### Lint tests
36
35
37
36
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
38
37
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.
39
38
40
39
If any failures or warnings are encountered, please follow the listed URL for more documentation.
41
40
42
-
### Pipeline Tests
41
+
### Pipeline tests
43
42
44
43
Each `nf-core` pipeline should be set up with a minimal set of test-data.
45
44
`GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully.
@@ -55,8 +54,75 @@ These tests are run both with the latest available version of `Nextflow` and als
55
54
* A PR should be made on `master` from patch to directly this particular bug.
56
55
57
56
## Getting help
58
-
For further information/help, please consult the [nf-core/hic documentation](https://nf-co.re/nf-core/hic/docs) and
59
-
don't hesitate to get in touch on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel
For further information/help, please consult the [nf-core/hic documentation](https://nf-co.re/hic/usage) and don't hesitate to get in touch on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel ([join our Slack here](https://nf-co.re/join/slack)).
59
+
60
+
## Pipeline contribution conventions
61
+
62
+
To make the nf-core/hic 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:
<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).
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,15 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/hic/
13
13
14
14
## PR checklist
15
15
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).
18
17
-[ ] 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/hic branch on the nf-core/test-datasets repo](https://github.com/nf-core/test-datasets/pull/new/nf-core/hic)
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/hic/tree/master/.github/CONTRIBUTING.md)
20
+
-[ ] 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.
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).
Copy file name to clipboardExpand all lines: CODE_OF_CONDUCT.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,23 +54,15 @@ project may be further defined and clarified by project maintainers.
54
54
55
55
## Enforcement
56
56
57
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
-
reported by contacting the project team on
59
-
[Slack](https://nf-co.re/join/slack). The project team will review
60
-
and investigate all complaints, and will respond in a way that it deems
61
-
appropriate to the circumstances. The project team is obligated to maintain
62
-
confidentiality with regard to the reporter of an incident. Further details
63
-
of specific enforcement policies may be posted separately.
57
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team on [Slack](https://nf-co.re/join/slack). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
64
58
65
59
Project maintainers who do not follow or enforce the Code of Conduct in good
66
60
faith may face temporary or permanent repercussions as determined by other
67
61
members of the project's leadership.
68
62
69
63
## Attribution
70
64
71
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct/][version]
(you can join with [this invite](https://nf-co.re/join/slack)).
88
+
For further information or help, don't hesitate to get in touch on the [Slack `#hic` channel](https://nfcore.slack.com/channels/hic) (you can join with [this invite](https://nf-co.re/join/slack)).
93
89
94
90
## Citation
95
91
@@ -100,8 +96,16 @@ You can cite the `nf-core` publication as follows:
100
96
101
97
>**The nf-core framework for community-curated bioinformatics pipelines.**
102
98
>
103
-
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg,
104
-
Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
99
+
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
105
100
>
106
101
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
0 commit comments