Skip to content

Commit

Permalink
Merge pull request #11 from SystemsGenetics/dev
Browse files Browse the repository at this point in the history
nf-core udpates
  • Loading branch information
spficklin committed Nov 28, 2022
2 parents caaf691 + 594add8 commit 5c715c9
Show file tree
Hide file tree
Showing 104 changed files with 3,659 additions and 1,772 deletions.
29 changes: 28 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trim_trailing_whitespace = true
indent_size = 4
indent_style = space

[*.{yml,yaml}]
[*.{md,yml,yaml,html,css,scss,js,cff}]
indent_size = 2

[*.json]
Expand All @@ -25,3 +25,30 @@ indent_size = unset

[/assets/email*]
indent_size = unset

[/assets/demo/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

[/scripts/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

[/docs/**.rst]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

[README.md]
indent_size = unset
69 changes: 19 additions & 50 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# nf-core/entap: Contributing Guidelines
# systemsgenetics/entapnf: Contributing Guidelines

Hi there!
Many thanks for taking an interest in improving nf-core/entap.
Many thanks for taking an interest in improving systemsgenetics/entapnf.

We try to manage the required tasks for nf-core/entap using GitHub issues, you probably came to this page when creating one.
We try to manage the required tasks for systemsgenetics/entapnf using GitHub issues, you probably came to this page when creating one.
Please use the pre-filled template to save time.

However, don't be put off by this template - other more general issues and suggestions are welcome!
Contributions to the code are even more welcome ;)

> If you need help using or modifying nf-core/entap then the best place to ask is on the nf-core Slack [#entap](https://nfcore.slack.com/channels/entap) channel ([join our Slack here](https://nf-co.re/join/slack)).
## Contribution workflow

If you'd like to write some code for nf-core/entap, the standard workflow is as follows:
If you'd like to write some code for systemsgenetics/entapnf, the standard workflow is as follows:

1. Check that there isn't already an issue about your idea in the [nf-core/entap issues](https://github.com/nf-core/entap/issues) to avoid duplicating work
* 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/entap repository](https://github.com/nf-core/entap) to your GitHub account
1. Check that there isn't already an issue about your idea in the [systemsgenetics/entapnf issues](https://github.com/systemsgenetics/entapnf/issues) to avoid duplicating work. 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 [systemsgenetics/entapnf repository](https://github.com/systemsgenetics/entapnf) to your GitHub account
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).
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
Expand Down Expand Up @@ -49,17 +46,13 @@ These tests are run both with the latest available version of `Nextflow` and als

:warning: Only in the unlikely and regretful event of a release happening with a bug.

* On your own fork, make a new branch `patch` based on `upstream/master`.
* Fix the bug, and bump version (X.Y.Z+1).
* A PR should be made on `master` from patch to directly this particular bug.

## Getting help

For further information/help, please consult the [nf-core/entap documentation](https://nf-co.re/entap/usage) and don't hesitate to get in touch on the nf-core Slack [#entap](https://nfcore.slack.com/channels/entap) channel ([join our Slack here](https://nf-co.re/join/slack)).
- On your own fork, make a new branch `patch` based on `upstream/master`.
- Fix the bug, and bump version (X.Y.Z+1).
- A PR should be made on `master` from patch to directly this particular bug.

## Pipeline contribution conventions

To make the nf-core/entap 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.
To make the systemsgenetics/entapnf 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.

### Adding a new step

Expand All @@ -68,16 +61,13 @@ If you wish to contribute a new step, please use the following coding standards:
1. Define the corresponding input channel into your new process from the expected previous process channel
2. Write the process block (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).
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).
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`.
9. Do local tests that the new code works properly and as expected.
10. Add a new test command in `.github/workflow/ci.yml`.
11. If applicable add a [MultiQC](https://https://multiqc.info/) module.
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.
13. Optional: Add any descriptions of MultiQC report sections and output files to `docs/output.md`.
4. Add any new parameters to `nextflow.config` with a default (see below).
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool).
6. Add sanity checks and validation for all relevant parameters.
7. Perform local tests to validate that the new code works as expected.
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module.
10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`.

### Default values

Expand All @@ -95,34 +85,13 @@ The process resources can be passed on to the tool dynamically within the proces

Please use the following naming schemes, to make it easy to understand what is going where.

* initial process channel: `ch_output_from_<process>`
* intermediate and terminal channels: `ch_<previousprocess>_for_<nextprocess>`
- initial process channel: `ch_output_from_<process>`
- intermediate and terminal channels: `ch_<previousprocess>_for_<nextprocess>`

### Nextflow version bumping

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]`

### Software version reporting

If you add a new tool to the pipeline, please ensure you add the information of the tool to the `get_software_version` process.

Add to the script block of the process, something like the following:

```bash
<YOUR_TOOL> --version &> v_<YOUR_TOOL>.txt 2>&1 || true
```

or

```bash
<YOUR_TOOL> --help | head -n 1 &> v_<YOUR_TOOL>.txt 2>&1 || true
```

You then need to edit the script `bin/scrape_software_versions.py` to:

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`
2. Add a HTML entry to the `OrderedDict` for formatting in MultiQC.

### Images and figures

For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).
41 changes: 21 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,53 @@

name: Bug report
description: Report something that is broken or incorrect
labels: bug
body:

- type: markdown
attributes:
value: |
Before you post this issue, please check the documentation:
- [GEMmaker documentation troubleshooting](https://gemmaker.readthedocs.io/en/latest/troubleshooting.html)
- [GEMmaker documentation](https://gemmaker.readthedocs.io/)
- type: textarea
id: description
attributes:
label: Description of the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: command_used
attributes:
label: Command used and terminal output
description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal.
description: Steps to reproduce the behaviour. Please paste the command you used
to launch the pipeline and the output from your terminal.
render: console
placeholder: |
$ nextflow run ...
placeholder: "$ nextflow run ...
Some output where something broke
"
- type: textarea
id: files
attributes:
label: Relevant files
description: |
Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed.
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files.
description: "Please drag and drop the relevant files here. Create a `.zip` archive
if the extension is not allowed.
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file
in the directory where you launched the pipeline)_ as well as custom Nextflow
configuration files.
"
- type: textarea
id: system
attributes:
label: System information
description: |
* Nextflow version _(eg. 21.10.3)_
description: "* Nextflow version _(eg. 21.10.3)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
* Version of GEMmaker _(eg. 1.0, 2.0)_
* Version of systemsgenetics/entapnf _(eg. 1.1, 1.5, 1.8.2)_
"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Suggest an idea for the GEMmaker pipeline
description: Suggest an idea for the systemsgenetics/entapnf pipeline
labels: enhancement
body:
- type: textarea
Expand Down
12 changes: 5 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<!--
# nf-core/entap pull request
# systemsgenetics/entapnf pull request
Many thanks for contributing to nf-core/entap!
Many thanks for contributing to systemsgenetics/entapnf!
Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).
Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release.
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/entap/tree/master/.github/CONTRIBUTING.md)
Learn more about contributing: [CONTRIBUTING.md](https://github.com/systemsgenetics/entapnf/tree/master/.github/CONTRIBUTING.md)
-->
<!-- markdownlint-disable ul-indent -->

## PR checklist

- [ ] This comment contains a description of changes (with reason).
- [ ] 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/entap/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/entap _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/systemsgenetics/entapnf/tree/master/.github/CONTRIBUTING.md)
- [ ] 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 --outdir <OUTDIR>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
- [ ] Output Documentation in `docs/output.md` is updated.
- [ ] `CHANGELOG.md` is updated.
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
steps:
- name: Launch workflow via tower
uses: nf-core/tower-action@master
# TODO nf-core: You can customise AWS full pipeline tests as required
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters

with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
bearer_token: ${{ secrets.TOWER_BEARER_TOKEN }}
Expand All @@ -31,4 +27,3 @@ jobs:
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/entap/results-${{ github.sha }}"
}
profiles: '[ "test_full", "aws_tower" ]'

3 changes: 1 addition & 2 deletions .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Launch workflow via tower
uses: nf-core/tower-action@master

with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
bearer_token: ${{ secrets.TOWER_BEARER_TOKEN }}
Expand All @@ -25,4 +25,3 @@ jobs:
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/entap/results-${{ github.sha }}"
}
profiles: '[ "test", "aws_tower" ]'

6 changes: 2 additions & 4 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ jobs:
steps:
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
- name: Check PRs
if: github.repository == 'nf-core/entap'
if: github.repository == 'systemsgenetics/entapnf'
run: |
{ [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/entap ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
{ [[ ${{github.event.pull_request.head.repo.full_name }} == systemsgenetics/entapnf ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
Expand Down Expand Up @@ -43,4 +42,3 @@ jobs:
Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false

29 changes: 11 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,29 @@ on:
release:
types: [published]

# Uncomment if we need an edge release of Nextflow again
# env: NXF_EDGE: 1
env:
NXF_ANSI_LOG: false

jobs:
test:
name: Run workflow tests
name: Run pipeline with test data
# Only run on push if this is the nf-core dev branch (merged PRs)
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/entap') }}
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'systemsgenetics/entapnf') }}"
runs-on: ubuntu-latest
env:
NXF_VER: ${{ matrix.nxf_ver }}
NXF_ANSI_LOG: false
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['21.04.0', '']
NXF_VER:
- "21.10.3"
- "latest-everything"
steps:
- name: Check out pipeline code
uses: actions/checkout@v2

- name: Install Nextflow
env:
CAPSULE_LOG: none
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"

- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
Loading

0 comments on commit 5c715c9

Please sign in to comment.