Skip to content

Commit ce4d7f4

Browse files
authored
Merge pull request #289 from nf-core/dev
Release 2.0.0
2 parents 1e76f1c + 013370d commit ce4d7f4

File tree

134 files changed

+6070
-4456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6070
-4456
lines changed

.github/.dockstore.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ version: 1.2
33
workflows:
44
- subclass: nfl
55
primaryDescriptorPath: /nextflow.config
6+
publish: True

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ If you wish to contribute a new step, please use the following coding standards:
6969
2. Write the process block (see below).
7070
3. Define the output channel if needed (see below).
7171
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 .`)
72+
5. Add any new flags/options to `nextflow_schema.json` with help text (with `nf-core schema build .`).
7373
6. Add any new flags/options to the help message (for integer/text parameters, print to help the corresponding `nextflow.config` parameter).
7474
7. Add sanity checks for all relevant parameters.
7575
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`.
@@ -87,7 +87,7 @@ Once there, use `nf-core schema build .` to add to `nextflow_schema.json`.
8787

8888
### Default processes resource requirements
8989

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.
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/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.
9191

9292
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.
9393

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Have you provided the following extra information/files:
5555

5656
## Container engine
5757

58-
- Engine: <!-- [e.g. Conda, Docker, Singularity or Podman] -->
58+
- Engine: <!-- [e.g. Conda, Docker, Singularity, Podman, Shifter or Charliecloud] -->
5959
- version: <!-- [e.g. 1.0.0] -->
6060
- Image tag: <!-- [e.g. nfcore/ampliseq:1.0.0] -->
6161

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Feature request
3-
about: Suggest an idea for the nf-core website
3+
about: Suggest an idea for the nf-core/ampliseq pipeline
44
labels: enhancement
55
---
66

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ Remember that PRs should be made against the dev branch, unless you're preparing
1010
1111
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/ampliseq/tree/master/.github/CONTRIBUTING.md)
1212
-->
13+
<!-- markdownlint-disable ul-indent -->
1314

1415
## PR checklist
1516

1617
- [ ] This comment contains a description of changes (with reason).
1718
- [ ] If you've fixed a bug or added code that should be tested, add tests!
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/ampliseq/tree/master/.github/CONTRIBUTING.md)
20-
- [ ] If necessary, also make a PR on the nf-core/ampliseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
19+
- [ ] If you've added a new tool - add to the software_versions process and a regex to `scrape_software_versions.py`
20+
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](<https://github.com/>nf-core/ampliseq/tree/master/.github/CONTRIBUTING.md)
21+
- [ ] If necessary, also make a PR on the nf-core/ampliseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
2122
- [ ] Make sure your code lints (`nf-core lint .`).
2223
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
2324
- [ ] Usage Documentation in `docs/usage.md` is updated.

.github/workflows/awsfulltest.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ on:
99
types: [completed]
1010
workflow_dispatch:
1111

12+
13+
env:
14+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
15+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
16+
TOWER_ACCESS_TOKEN: ${{ secrets.AWS_TOWER_TOKEN }}
17+
AWS_JOB_DEFINITION: ${{ secrets.AWS_JOB_DEFINITION }}
18+
AWS_JOB_QUEUE: ${{ secrets.AWS_JOB_QUEUE }}
19+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
20+
21+
1222
jobs:
1323
run-awstest:
1424
name: Run AWS full tests
@@ -23,21 +33,14 @@ jobs:
2333
- name: Install awscli
2434
run: conda install -c conda-forge awscli
2535
- name: Start AWS batch job
26-
# TODO nf-core: You can customise AWS full pipeline tests as required
36+
# nf-core: You can customise AWS full pipeline tests as required
2737
# Add full size test data (but still relatively small datasets for few samples)
2838
# on the `test_full.config` test runs with only one set of parameters
2939
# Then specify `-profile test_full` instead of `-profile test` on the AWS batch command
30-
env:
31-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
32-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
33-
TOWER_ACCESS_TOKEN: ${{ secrets.AWS_TOWER_TOKEN }}
34-
AWS_JOB_DEFINITION: ${{ secrets.AWS_JOB_DEFINITION }}
35-
AWS_JOB_QUEUE: ${{ secrets.AWS_JOB_QUEUE }}
36-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
3740
run: |
3841
aws batch submit-job \
3942
--region eu-west-1 \
4043
--job-name nf-core-ampliseq \
4144
--job-queue $AWS_JOB_QUEUE \
4245
--job-definition $AWS_JOB_DEFINITION \
43-
--container-overrides '{"command": ["nf-core/ampliseq", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/ampliseq/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/ampliseq/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'
46+
--container-overrides '{"command": ["nf-core/ampliseq", "-r '"${GITHUB_SHA}"' -profile test_full --outdir s3://'"${AWS_S3_BUCKET}"'/ampliseq/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/ampliseq/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'

.github/workflows/awstest.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ name: nf-core AWS test
66
on:
77
workflow_dispatch:
88

9+
10+
env:
11+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
12+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
13+
TOWER_ACCESS_TOKEN: ${{ secrets.AWS_TOWER_TOKEN }}
14+
AWS_JOB_DEFINITION: ${{ secrets.AWS_JOB_DEFINITION }}
15+
AWS_JOB_QUEUE: ${{ secrets.AWS_JOB_QUEUE }}
16+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
17+
18+
919
jobs:
1020
run-awstest:
1121
name: Run AWS tests
@@ -20,16 +30,9 @@ jobs:
2030
- name: Install awscli
2131
run: conda install -c conda-forge awscli
2232
- name: Start AWS batch job
23-
# TODO nf-core: You can customise CI pipeline run tests as required
33+
# nf-core: You can customise CI pipeline run tests as required
2434
# For example: adding multiple test runs with different parameters
2535
# Remember that you can parallelise this by using strategy.matrix
26-
env:
27-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
28-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29-
TOWER_ACCESS_TOKEN: ${{ secrets.AWS_TOWER_TOKEN }}
30-
AWS_JOB_DEFINITION: ${{ secrets.AWS_JOB_DEFINITION }}
31-
AWS_JOB_QUEUE: ${{ secrets.AWS_JOB_QUEUE }}
32-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
3336
run: |
3437
aws batch submit-job \
3538
--region eu-west-1 \

.github/workflows/branch.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Check PRs
1414
if: github.repository == 'nf-core/ampliseq'
1515
run: |
16-
{ [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/ampliseq ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
16+
{ [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/ampliseq ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
1717
1818
1919
# If the above check failed, post a comment on the PR explaining the failure
@@ -23,13 +23,22 @@ jobs:
2323
uses: mshick/add-pr-comment@v1
2424
with:
2525
message: |
26+
## This PR is against the `master` branch :x:
27+
28+
* Do not close this PR
29+
* Click _Edit_ and change the `base` to `dev`
30+
* This CI test will remain failed until you push a new commit
31+
32+
---
33+
2634
Hi @${{ github.event.pull_request.user.login }},
2735
28-
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
36+
It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `master` branch.
2937
The `master` branch on nf-core repositories should always contain code from the latest release.
30-
Because of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
38+
Because of this, PRs to `master` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch.
3139
3240
You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page.
41+
Note that even after this, the test will continue to show as failing until you push a new commit.
3342
3443
Thanks again for your contribution!
3544
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
release:
99
types: [published]
1010

11+
# Uncomment if we need an edge release of Nextflow again
12+
# env: NXF_EDGE: 1
13+
1114
jobs:
1215
test:
1316
name: Run workflow tests
@@ -20,28 +23,11 @@ jobs:
2023
strategy:
2124
matrix:
2225
# Nextflow versions: check pipeline minimum and current latest
23-
nxf_ver: ['20.04.0', '']
26+
nxf_ver: ['21.04.0', '']
2427
steps:
2528
- name: Check out pipeline code
2629
uses: actions/checkout@v2
2730

28-
- name: Check if Dockerfile or Conda environment changed
29-
uses: technote-space/get-diff-action@v4
30-
with:
31-
FILES: |
32-
Dockerfile
33-
environment.yml
34-
35-
- name: Build new docker image
36-
if: env.MATCHED_FILES
37-
run: docker build --no-cache . -t nfcore/ampliseq:1.2.0
38-
39-
- name: Pull docker image
40-
if: ${{ !env.MATCHED_FILES }}
41-
run: |
42-
docker pull nfcore/ampliseq:dev
43-
docker tag nfcore/ampliseq:dev nfcore/ampliseq:1.2.0
44-
4531
- name: Install Nextflow
4632
env:
4733
CAPSULE_LOG: none
@@ -52,15 +38,29 @@ jobs:
5238
- name: Run pipeline with test data
5339
run: |
5440
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
55-
- name: Run pipeline with multi test data
56-
run: |
57-
nextflow run ${GITHUB_WORKSPACE} -profile test_multi,docker
58-
- name: Run pipeline with manifest input
59-
run: |
60-
nextflow run ${GITHUB_WORKSPACE} -profile test_manifest,docker
61-
- name: Run pipeline with ITS PacBio reads and Unite database
62-
run: |
63-
nextflow run ${GITHUB_WORKSPACE} -profile test_pacbio_its,docker
64-
- name: Run pipeline with double cutadapt steps on test data with double primers
41+
42+
profiles:
43+
name: Run workflow profile
44+
# Only run on push if this is the nf-core dev branch (merged PRs)
45+
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/ampliseq') }}
46+
runs-on: ubuntu-latest
47+
env:
48+
NXF_VER: '21.04.0'
49+
NXF_ANSI_LOG: false
50+
strategy:
51+
matrix:
52+
# Run remaining test profiles with minimum nextflow version
53+
profile: [test_multi, test_pacbio_its, test_doubleprimers, test_iontorrent]
54+
steps:
55+
- name: Check out pipeline code
56+
uses: actions/checkout@v2
57+
58+
- name: Install Nextflow
59+
env:
60+
CAPSULE_LOG: none
61+
run: |
62+
wget -qO- get.nextflow.io | bash
63+
sudo mv nextflow /usr/local/bin/
64+
- name: Run pipeline with ${{ matrix.profile }} test profile
6565
run: |
66-
nextflow run ${GITHUB_WORKSPACE} -profile test_doubleprimers,docker
66+
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.profile }},docker

.github/workflows/linting.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,34 @@ jobs:
1919
run: npm install -g markdownlint-cli
2020
- name: Run Markdownlint
2121
run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml
22+
23+
# If the above check failed, post a comment on the PR explaining the failure
24+
- name: Post PR comment
25+
if: failure()
26+
uses: mshick/add-pr-comment@v1
27+
with:
28+
message: |
29+
## Markdown linting is failing
30+
31+
To keep the code consistent with lots of contributors, we run automated code consistency checks.
32+
To fix this CI test, please run:
33+
34+
* Install `markdownlint-cli`
35+
* On Mac: `brew install markdownlint-cli`
36+
* Everything else: [Install `npm`](https://www.npmjs.com/get-npm) then [install `markdownlint-cli`](https://www.npmjs.com/package/markdownlint-cli) (`npm install -g markdownlint-cli`)
37+
* Fix the markdown errors
38+
* Automatically: `markdownlint . --config .github/markdownlint.yml --fix`
39+
* Manually resolve anything left from `markdownlint . --config .github/markdownlint.yml`
40+
41+
Once you push these changes the test should pass, and you can hide this comment :+1:
42+
43+
We highly recommend setting up markdownlint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
44+
45+
Thanks again for your contribution!
46+
repo-token: ${{ secrets.GITHUB_TOKEN }}
47+
allow-repeats: false
48+
49+
2250
YAML:
2351
runs-on: ubuntu-latest
2452
steps:
@@ -29,7 +57,34 @@ jobs:
2957
- name: Install yaml-lint
3058
run: npm install -g yaml-lint
3159
- name: Run yaml-lint
32-
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml")
60+
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml" -o -name "*.yaml")
61+
62+
# If the above check failed, post a comment on the PR explaining the failure
63+
- name: Post PR comment
64+
if: failure()
65+
uses: mshick/add-pr-comment@v1
66+
with:
67+
message: |
68+
## YAML linting is failing
69+
70+
To keep the code consistent with lots of contributors, we run automated code consistency checks.
71+
To fix this CI test, please run:
72+
73+
* Install `yaml-lint`
74+
* [Install `npm`](https://www.npmjs.com/get-npm) then [install `yaml-lint`](https://www.npmjs.com/package/yaml-lint) (`npm install -g yaml-lint`)
75+
* Fix the markdown errors
76+
* Run the test locally: `yamllint $(find . -type f -name "*.yml" -o -name "*.yaml")`
77+
* Fix any reported errors in your YAML files
78+
79+
Once you push these changes the test should pass, and you can hide this comment :+1:
80+
81+
We highly recommend setting up yaml-lint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
82+
83+
Thanks again for your contribution!
84+
repo-token: ${{ secrets.GITHUB_TOKEN }}
85+
allow-repeats: false
86+
87+
3388
nf-core:
3489
runs-on: ubuntu-latest
3590
steps:
@@ -43,6 +98,7 @@ jobs:
4398
run: |
4499
wget -qO- get.nextflow.io | bash
45100
sudo mv nextflow /usr/local/bin/
101+
46102
- uses: actions/setup-python@v1
47103
with:
48104
python-version: '3.6'
@@ -68,7 +124,7 @@ jobs:
68124
if: ${{ always() }}
69125
uses: actions/upload-artifact@v2
70126
with:
71-
name: linting-log-file
127+
name: linting-logs
72128
path: |
73129
lint_log.txt
74130
lint_results.md

.github/workflows/push_dockerhub_dev.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/push_dockerhub_release.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)