Skip to content

Commit a1bad01

Browse files
authored
Merge pull request #556 from nf-core/olgabotpatch1-sync
Get latest dev version to check no flaky bam filtering
2 parents b21fb60 + c2ad7a7 commit a1bad01

56 files changed

Lines changed: 6780 additions & 3555 deletions

Some content is hidden

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

.github/.dockstore.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Dockstore config version, not pipeline version
2+
version: 1.2
3+
workflows:
4+
- subclass: nfl
5+
primaryDescriptorPath: /nextflow.config

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ These tests are run both with the latest available version of `Nextflow` and als
4747

4848
## Patch
4949

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

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

5656
## Getting help
5757

58-
For further information/help, please consult the [nf-core/eager documentation](https://nf-co.re/nf-core/eager/docs) and don't hesitate to get in touch on the nf-core Slack [#eager](https://nfcore.slack.com/channels/eager) channel ([join our Slack here](https://nf-co.re/join/slack)).
58+
For further information/help, please consult the [nf-core/eager documentation](https://nf-co.re/eager/docs) and don't hesitate to get in touch on the nf-core Slack [#eager](https://nfcore.slack.com/channels/eager) channel ([join our Slack here](https://nf-co.re/join/slack)).

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
9-
101
# nf-core/eager bug report
11-
2+
<!--
123
Hi there!
134
145
Thanks for telling us about a problem with the pipeline.
156
7+
Please delete this text and anything that's not relevant from the template below:
8+
-->
9+
1610
## Check Documentation
1711

1812
Have you checked in the following places for your error?:
@@ -21,7 +15,7 @@ Have you checked in the following places for your error?:
2115
- [ ] [Troubleshooting](https://nf-co.re/usage/troubleshooting)
2216
(for nf-core specific information)
2317

24-
Please also check the the corresponding branch documentation on github, if not
18+
Please also check the the corresponding branch documentation on github, if not
2519
testing the latest release.
2620

2721
## Describe the bug
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
1-
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
9-
101
# nf-core/eager feature request
2+
<!--
113
124
Hi there!
135
146
Thanks for suggesting a new feature for the pipeline!
7+
Please delete this text and anything that's not relevant from the template below:
8+
-->
159

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

18-
A clear and concise description of what the problem is.
12+
<!-- A clear and concise description of what the problem is. -->
1913

20-
Ex. I'm always frustrated when [...]
14+
<!-- e.g. [I'm always frustrated when ...] -->
2115

2216
## Describe the solution you'd like
2317

24-
A clear and concise description of what you want to happen.
18+
<!-- A clear and concise description of what you want to happen. -->
2519

2620
## Describe alternatives you've considered
2721

28-
A clear and concise description of any alternative solutions or features you've considered.
22+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
2923

3024
## Additional context
3125

32-
Add any other context about the feature request here.
26+
<!-- Add any other context about the feature request here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# nf-core/eager pull request
2+
<!--
23
34
Many thanks for contributing to nf-core/eager!
45
56
Please fill in the appropriate checklist below (delete whatever is not relevant).
67
These are the most common things requested on pull requests (PRs).
8+
-->
79

810
## PR checklist
911

.github/workflows/awsfulltest.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: nf-core AWS full test
2-
# This workflow is triggered on push to the master branch and on published releases.
3-
# It runs the -profile 'test_full' on AWS batch
1+
2+
name: nf-core AWS full size tests
3+
# This workflow is triggered on push to the master branch.
44

55
on:
66
release:
77
types: [published]
88

99
jobs:
1010
run-awstest:
11-
if: github.repository == 'nf-core/eager'
1211
name: Run AWS full tests
12+
if: github.repository == 'nf-core/eager'
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Setup Miniconda
@@ -20,20 +20,20 @@ jobs:
2020
- name: Install awscli
2121
run: conda install -c conda-forge awscli
2222
- name: Start AWS batch job
23-
# Add full size test data (but still relatively small datasets for few samples)
23+
# Add full size test data (but still relatively small datasets for few samples)
2424
# on the `test_full.config` test runs with only one set of parameters
2525
# Then specify `-profile test_full` instead of `-profile test` on the AWS batch command
2626
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}}
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 }}
3333
run: |
3434
aws batch submit-job \
35-
--region eu-west-1 \
36-
--job-name nf-core-eager \
37-
--job-queue $AWS_JOB_QUEUE \
38-
--job-definition $AWS_JOB_DEFINITION \
39-
--container-overrides '{"command": ["nf-core/eager", "-r '"${GITHUB_SHA}"' -profile test_full --outdir s3://'"${AWS_S3_BUCKET}"'/eager/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/eager/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'
35+
--region eu-west-1 \
36+
--job-name nf-core-eager \
37+
--job-queue $AWS_JOB_QUEUE \
38+
--job-definition $AWS_JOB_DEFINITION \
39+
--container-overrides '{"command": ["nf-core/eager", "-r '"${GITHUB_SHA}"' -profile awsfulltest --outdir s3://'"${AWS_S3_BUCKET}"'/eager/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/eager/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'

.github/workflows/awstest.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nf-core AWS test
2-
# This workflow is triggered on push to the master branch and on published releases.
3-
# It runs the -profile 'test_tsv' on AWS batch
2+
# This workflow is triggered on push to the master branch.
3+
# It runs the -profile 'test' on AWS batch
44

55
on:
66
push:
@@ -9,8 +9,8 @@ on:
99

1010
jobs:
1111
run-awstest:
12+
name: Run AWS tests
1213
if: github.repository == 'nf-core/eager'
13-
name: Run AWS test
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Setup Miniconda
@@ -21,17 +21,19 @@ jobs:
2121
- name: Install awscli
2222
run: conda install -c conda-forge awscli
2323
- name: Start AWS batch job
24+
# For example: adding multiple test runs with different parameters
25+
# Remember that you can parallelise this by using strategy.matrix
2426
env:
25-
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
26-
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
27-
TOWER_ACCESS_TOKEN: ${{secrets.AWS_TOWER_TOKEN}}
28-
AWS_JOB_DEFINITION: ${{secrets.AWS_JOB_DEFINITION}}
29-
AWS_JOB_QUEUE: ${{secrets.AWS_JOB_QUEUE}}
30-
AWS_S3_BUCKET: ${{secrets.AWS_S3_BUCKET}}
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 }}
3133
run: |
3234
aws batch submit-job \
3335
--region eu-west-1 \
3436
--job-name nf-core-eager \
3537
--job-queue $AWS_JOB_QUEUE \
3638
--job-definition $AWS_JOB_DEFINITION \
37-
--container-overrides '{"command": ["nf-core/eager", "-r '"${GITHUB_SHA}"' -profile test_tsv --outdir s3://'"${AWS_S3_BUCKET}"'/eager/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/eager/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'
39+
--container-overrides '{"command": ["nf-core/eager", "-r '"${GITHUB_SHA}"' -profile test_tsv_complex --outdir s3://'"${AWS_S3_BUCKET}"'/eager/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/eager/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'eager/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'

.github/workflows/branch.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,35 @@ name: nf-core branch protection
33
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
44
on:
55
pull_request:
6-
branches:
7-
- master
6+
branches: [master]
87

98
jobs:
109
test:
11-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1211
steps:
13-
# PRs are only ok if coming from an nf-core `dev` branch or a fork `patch` branch
12+
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
1413
- name: Check PRs
14+
if: github.repository == 'nf-core/eager'
1515
run: |
16-
{ [[ $(git remote get-url origin) == *nf-core/eager ]] && [[ ${GITHUB_HEAD_REF} = "dev" ]]; } || [[ ${GITHUB_HEAD_REF} == "patch" ]]
16+
{ [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/eager ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
17+
18+
19+
# If the above check failed, post a comment on the PR explaining the failure
20+
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
21+
- name: Post PR comment
22+
if: failure()
23+
uses: mshick/add-pr-comment@v1
24+
with:
25+
message: |
26+
Hi @${{ github.event.pull_request.user.login }},
27+
28+
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
29+
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.
31+
32+
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.
33+
34+
Thanks again for your contribution!
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
allow-repeats: false
37+

.github/workflows/ci.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
name: nf-core eager CI
2-
#This workflow is triggered on pushes and PRs to the repository.
3-
on: [push, pull_request]
1+
name: nf-core CI
2+
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
release:
9+
types: [published]
410

511
jobs:
6-
conda_build:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v1
10-
- name: Try Creating Conda env
11-
run: |
12-
conda env create --prefix nf-core-eager --file environment.yml
1312
test:
13+
name: Run workflow tests
14+
# Only run on push if this is the nf-core dev branch (merged PRs)
15+
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/eager') }}
16+
runs-on: ubuntu-latest
1417
env:
1518
NXF_VER: ${{ matrix.nxf_ver }}
1619
NXF_ANSI_LOG: false
17-
runs-on: ubuntu-latest
1820
strategy:
1921
matrix:
2022
# Nextflow versions: check pipeline minimum and current latest
@@ -64,7 +66,7 @@ jobs:
6466
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --save_reference
6567
- name: REFERENCE Basic workflow, with supplied indices
6668
run: |
67-
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --bwa_index 'results/reference_genome/bwa_index/BWAIndex/Mammoth_MT_Krause.fasta' --fasta_index 'https://github.com/nf-core/test-datasets/blob/eager/reference/Mammoth/Mammoth_MT_Krause.fasta.fai'
69+
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --bwa_index 'results/reference_genome/bwa_index/BWAIndex/' --fasta_index 'https://github.com/nf-core/test-datasets/blob/eager/reference/Mammoth/Mammoth_MT_Krause.fasta.fai'
6870
- name: REFERENCE Run the basic pipeline with FastA reference with `fna` extension
6971
run: |
7072
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_fna,docker
@@ -103,7 +105,7 @@ jobs:
103105
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --mapper 'bowtie2' --bt2_alignmode 'local' --bt2_sensitivity 'sensitive' --bt2n 1 --bt2l 16 --bt2_trim5 1 --bt2_trim3 1
104106
- name: HOST REMOVAL_FASTQ Run the basic pipeline with output unmapped reads as fastq
105107
run: |
106-
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --hostremoval_input_fastq
108+
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_complex,docker --hostremoval_input_fastq
107109
- name: BAM_FILTERING Run basic mapping pipeline with mapping quality filtering, and unmapped export
108110
run: |
109111
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --run_bam_filtering --bam_mapping_quality_threshold 37 --bam_unmapped_type 'fastq'
@@ -152,7 +154,7 @@ jobs:
152154
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --run_genotyping --run_trim_bam --genotyping_source 'trimmed' --gatk_ug_jar '/home/runner/work/eager/eager/jars/gatk_3_5/GenomeAnalysisTK.jar' --genotyping_tool 'ug' --gatk_out_mode 'EMIT_ALL_SITES' --gatk_ug_genotype_model 'SNP'
153155
- name: BAM_INPUT Run the basic pipeline with the bam input profile, skip AdapterRemoval as no convertBam
154156
run: |
155-
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_bam,docker --skip_adapterremoval --run_convertinputbam
157+
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_bam,docker --skip_adapterremoval
156158
- name: BAM_INPUT Run the basic pipeline with the bam input profile, convert to FASTQ for adapterremoval test and downstream
157159
run: |
158160
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_bam,docker --run_convertinputbam
@@ -163,7 +165,7 @@ jobs:
163165
for i in index0.idx ref.db ref.idx ref.inf table0.db table0.idx taxonomy.idx taxonomy.map taxonomy.tre; do wget https://github.com/nf-core/test-datasets/raw/eager/databases/malt/"$i" -P databases/malt/; done
164166
- name: METAGENOMIC Run the basic pipeline but with unmapped reads going into MALT
165167
run: |
166-
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --run_bam_filtering --bam_unmapped_type 'fastq' --run_metagenomic_screening --database "/home/runner/work/eager/eager/databases/malt/"
168+
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv,docker --run_bam_filtering --bam_unmapped_type 'fastq' --run_metagenomic_screening --metagenomic_tool 'malt' --database "/home/runner/work/eager/eager/databases/malt/"
167169
- name: MALTEXTRACT Download resource files
168170
run: |
169171
mkdir -p databases/maltextract

.github/workflows/linting.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ jobs:
3333
nf-core:
3434
runs-on: ubuntu-latest
3535
steps:
36-
- uses: actions/checkout@v2
36+
37+
- name: Check out pipeline code
38+
uses: actions/checkout@v2
39+
3740
- name: Install Nextflow
3841
run: |
3942
wget -qO- get.nextflow.io | bash
@@ -46,5 +49,18 @@ jobs:
4649
run: |
4750
python -m pip install --upgrade pip
4851
pip install nf-core
52+
4953
- name: Run nf-core lint
50-
run: nf-core lint ${GITHUB_WORKSPACE}
54+
env:
55+
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
58+
run: nf-core -l lint_log.txt lint ${GITHUB_WORKSPACE}
59+
60+
- name: Upload linting log file artifact
61+
if: ${{ always() }}
62+
uses: actions/upload-artifact@v2
63+
with:
64+
name: linting-log-file
65+
path: lint_log.txt
66+

0 commit comments

Comments
 (0)