Skip to content

Commit a5691a2

Browse files
committed
[TEMPLATE] merge v.1.12.1
2 parents e2f846b + 97c4a9e commit a5691a2

21 files changed

+160
-119
lines changed

.github/CONTRIBUTING.md

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ Please use the pre-filled template to save time.
99
However, don't be put off by this template - other more general issues and suggestions are welcome!
1010
Contributions to the code are even more welcome ;)
1111

12-
> If you need help using or modifying nf-core/hic then the best place to ask is on the nf-core
13-
Slack [#hic](https://nfcore.slack.com/channels/hic) channel ([join our Slack here](https://nf-co.re/join/slack)).
14-
12+
> 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)).
1513
1614
## Contribution workflow
1715

@@ -20,8 +18,9 @@ If you'd like to write some code for nf-core/hic, the standard workflow is as fo
2018
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
2119
* If there isn't one already, please create one so that others know you're working on this
2220
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
2524

2625
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/).
2726

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

3332
There are typically two types of tests that run:
3433

35-
### Lint Tests
34+
### Lint tests
3635

3736
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
3837
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.
3938

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

42-
### Pipeline Tests
41+
### Pipeline tests
4342

4443
Each `nf-core` pipeline should be set up with a minimal set of test-data.
4544
`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
5554
* A PR should be made on `master` from patch to directly this particular bug.
5655

5756
## 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
60-
([join our Slack here](https://nf-co.re/join/slack)).
6157

6258
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:
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/hic pipeline documentation](https://nf-co.re/nf-core/hic/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/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Hi there!
1111
1212
Thanks for suggesting a new feature for the pipeline!
1313
Please delete this text and anything that's not relevant from the template below:
14-
1514
-->
1615

1716
## Is your feature request related to a problem? Please describe

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/hic/
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/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).
2127

.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

.github/workflows/linting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ jobs:
3333
nf-core:
3434
runs-on: ubuntu-latest
3535
steps:
36+
3637
- name: Check out pipeline code
3738
uses: actions/checkout@v2
39+
3840
- name: Install Nextflow
3941
env:
4042
CAPSULE_LOG: none
@@ -72,5 +74,3 @@ jobs:
7274
lint_log.txt
7375
lint_results.md
7476
PR_number.txt
75-
76-

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
* Fix bug in `--bin_size` parameter (#85)
2222
* `--min_mapq` is ignored if `--keep_multi` is used
2323

24-
### Deprecated
24+
### `Deprecated`
2525

2626
* `--rm_dup` and `--rm_multi` are replaced by `--keep_dup` and `--keep_multi`
2727

@@ -130,3 +130,4 @@ if not provided.
130130
* Normalization of the contact maps using the ICE algorithm
131131
* Generation of cooler file for visualization on [higlass](https://higlass.io/)
132132
* Quality report based on HiC-Pro MultiQC module
133+

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,15 @@ project may be further defined and clarified by project maintainers.
5454

5555
## Enforcement
5656

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.
6458

6559
Project maintainers who do not follow or enforce the Code of Conduct in good
6660
faith may face temporary or permanent repercussions as determined by other
6761
members of the project's leadership.
6862

6963
## Attribution
7064

71-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
72-
version 1.4, available at
73-
[https://www.contributor-covenant.org/version/1/4/code-of-conduct/][version]
65+
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]
7466

7567
[homepage]: https://contributor-covenant.org
7668
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LABEL authors="Nicolas Servant" \
55
## Install gcc for pip iced install
66
RUN apt-get update && apt-get install -y gcc g++ && apt-get clean -y
77

8+
# Install the conda environment
89
COPY environment.yml /
910
RUN conda env create --quiet -f /environment.yml && conda clean -a
1011

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ![nf-core/hic](docs/images/nfcore-hic_logo.png)
1+
# ![nf-core/hic](docs/images/nf-core-hic_logo.png)
22

33
**Analysis of Chromosome Conformation Capture data (Hi-C)**.
44

@@ -70,8 +70,6 @@ sites ([`bowtie2`](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml))
7070
nextflow run nf-core/hic -profile <docker/singularity/podman/conda/institute> --input '*_R{1,2}.fastq.gz' --genome GRCh37
7171
```
7272

73-
See [usage docs](https://nf-co.re/hic/usage) for all of the available options when running the pipeline.
74-
7573
## Documentation
7674

7775
The nf-core/hic pipeline comes with documentation about the pipeline: [usage](https://nf-co.re/hic/usage) and [output](https://nf-co.re/hic/output).
@@ -87,9 +85,7 @@ nf-core/hic was originally written by Nicolas Servant.
8785
8886
If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).
8987
90-
For further information or help, don't hesitate to get in touch on the
91-
[Slack `#hic` channel](https://nfcore.slack.com/channels/hic)
92-
(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)).
9389

9490
## Citation
9591

@@ -100,8 +96,16 @@ You can cite the `nf-core` publication as follows:
10096

10197
> **The nf-core framework for community-curated bioinformatics pipelines.**
10298
>
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.
105100
>
106101
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
107102
> ReadCube: [Full Access Link](https://rdcu.be/b1GjZ)
103+
104+
In addition, references of tools and data used in this pipeline are as follows:
105+
106+
> **HiC-Pro: An optimized and flexible pipeline for Hi-C processing.**
107+
>
108+
> Nicolas Servant, Nelle Varoquaux, Bryan R. Lajoie, Eric Viara, Chongjian Chen, Jean-Philippe Vert, Job Dekker, Edith Heard, Emmanuel Barillot.
109+
>
110+
> Genome Biology 2015, 16:259 doi: [10.1186/s13059-015-0831-x](https://dx.doi.org/10.1186/s13059-015-0831-x)
111+

0 commit comments

Comments
 (0)