Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pairwise gene variation subworkflow / nf-tools v3.2.0 #5

Open
wants to merge 69 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
50988b6
update metro map ;Update pre-commit hooks
OlivierCoen Dec 30, 2024
e3bd4c5
fix comment and rename variable
OlivierCoen Dec 30, 2024
1ba7847
modified map_ids_to_ensembl.py to get gene metadata
OlivierCoen Dec 30, 2024
6ef626e
added gene metadata and original gene ids to variation coefficient ou…
OlivierCoen Dec 31, 2024
4d034e1
remove genes with at least one zero count by default; added parameter…
OlivierCoen Jan 1, 2025
5f73254
improved output of get_eatlas_accessions
OlivierCoen Jan 1, 2025
6b49e00
fixed bug with DESeq2 caused by count rows having many zeros
OlivierCoen Jan 1, 2025
41a6bd0
ignore issue with ExpressionAtlas R package when summary is unavailab…
OlivierCoen Jan 1, 2025
38ed6df
handle idmapping in case when count file is empty
OlivierCoen Jan 1, 2025
c4be7a8
removed allow_zeros argument
OlivierCoen Jan 1, 2025
82d3e37
added check that count datasets do not get empty because of filtering…
OlivierCoen Jan 1, 2025
2b82024
remove when statement from module main.nf files
OlivierCoen Jan 2, 2025
4bef904
separate merging step from get_variation_coefficients.R; translated g…
OlivierCoen Jan 2, 2025
7890f7e
implemented get_variation_coefficients.py in polars
OlivierCoen Jan 3, 2025
63728d2
fixed issue with deseq2 when design contains one condition
OlivierCoen Jan 3, 2025
cab4310
added option for gene variation computation method
OlivierCoen Jan 3, 2025
97fce7e
fixed issues with idmapping not finding entries
OlivierCoen Jan 3, 2025
808cb55
fixed issue with Expression Atlas Get data releasing more than one co…
OlivierCoen Jan 4, 2025
00e39c8
place Expression Atlas steps in a separate subworkflow
OlivierCoen Jan 4, 2025
f87ba65
improve error handling in expressionatlas getdata
OlivierCoen Jan 4, 2025
58780f0
handle extra bug cases for expressionatlas getdata
OlivierCoen Jan 4, 2025
8b4dc63
update pipeline to latest nf-core specs
OlivierCoen Jan 4, 2025
1e37a19
add multiqc to pipeline
OlivierCoen Jan 5, 2025
14211e2
remove log transformation during normalisation steps
OlivierCoen Jan 6, 2025
a1cc1f2
improve statistic computation and multiqc visualisation
OlivierCoen Jan 6, 2025
a54fddf
update documentation
OlivierCoen Jan 7, 2025
e68d2f5
rename edger and deseq2 output files and channel
OlivierCoen Jan 7, 2025
0ef10a9
fix nf-core linter erros
OlivierCoen Jan 7, 2025
ce3bc3e
add labels to modules
OlivierCoen Jan 7, 2025
a2068af
update tests nd various functionnalities to pass CI tests
OlivierCoen Jan 7, 2025
030fedc
fix case when datasets file is not provided
OlivierCoen Jan 11, 2025
9a3a36e
update documentation
OlivierCoen Jan 14, 2025
0fcbdb5
update multiqc version
OlivierCoen Jan 14, 2025
e9f2970
rename gene_variation to gene_statistics; change gene_statistics outp…
OlivierCoen Jan 14, 2025
32e781f
rename gene_variation to gene_statistics; change gene_statistics outp…
OlivierCoen Jan 14, 2025
d7485c5
implement new module to process pairwise gene variation computation
OlivierCoen Jan 14, 2025
d664a03
rename tests/input to tests/data
OlivierCoen Jan 15, 2025
6d32642
separate gene_statistics step into merge_counts and updated gene_stat…
OlivierCoen Jan 15, 2025
32a746f
update multiqc_config.yml
OlivierCoen Jan 15, 2025
b6d8f64
add pairwise_gene_variation step in workflow
OlivierCoen Jan 15, 2025
60871fe
add option to skip computation of gene variation and option to choose…
OlivierCoen Jan 15, 2025
5b6c64e
create subworkflow to compute pairwise fene variation
OlivierCoen Jan 16, 2025
9a30679
add pairwise gene variation subworkflow to main workflow
OlivierCoen Jan 16, 2025
3e98355
fix bugs with pairwise gene variation
OlivierCoen Jan 16, 2025
7ebbea3
fix bugs with computation of m measures
OlivierCoen Jan 17, 2025
517169c
handle g:Profiler server breakdown in id mapping step
OlivierCoen Jan 17, 2025
4fa2148
add parameters for g:Profiler
OlivierCoen Jan 17, 2025
47596ef
add section in multiqc
OlivierCoen Jan 19, 2025
e8cc91a
fix case when nb genes equals GENE_CHUNK_SIZE
OlivierCoen Jan 19, 2025
8337d52
fix difference of results between the pairwise gene variation workflo…
OlivierCoen Jan 19, 2025
05975b7
fix difference of results between the pairwise gene variation workflo…
OlivierCoen Jan 19, 2025
898ef35
fix difference of results between the pairwise gene variation workflo…
OlivierCoen Jan 19, 2025
a3a341e
redirect calls to g:Profiler beta API server when main one is down
OlivierCoen Jan 19, 2025
c1cc181
change expression status computation and configuration in multiqc
OlivierCoen Jan 19, 2025
ccb1550
change export of statistics fata and siplay in multiqc - fix gene ord…
OlivierCoen Jan 20, 2025
a48c2db
change export of statistics fata and siplay in multiqc - fix gene ord…
OlivierCoen Jan 26, 2025
735537c
Template update for nf-core/tools version 3.1.2
OlivierCoen Jan 26, 2025
837ecf5
Merge pull request #3 from OlivierCoen/TEMPLATE
OlivierCoen Jan 26, 2025
d7ee8a6
Merge branch 'TEMPLATE' into dev
OlivierCoen Jan 26, 2025
365135a
merged TEMPLATE into dev
OlivierCoen Jan 26, 2025
f59ae1c
Template update for nf-core/tools version 3.2.0
nf-core-bot Jan 27, 2025
8b030fe
fixed bugs following merge with TEMPLATE
OlivierCoen Jan 30, 2025
0421420
merged with TEMPLATE
OlivierCoen Jan 31, 2025
37777da
fix issues with linting
OlivierCoen Jan 31, 2025
9f51a32
add test data; modify path to test data
OlivierCoen Jan 31, 2025
146991d
add check that merged count dataset is not empty
OlivierCoen Jan 31, 2025
ddc0cf4
ignore test parquet files for nf-core pipelines lint
OlivierCoen Feb 1, 2025
076c844
ignore .github/PULL_REQUEST_TEMPLATE.md to pass nf-core pipelines lint
OlivierCoen Feb 1, 2025
15f19e6
add nf test shards ti ci.yml
OlivierCoen Feb 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ indent_size = unset
# ignore python and markdown
[*.{py,md}]
indent_style = unset

# ignore ro-crate metadata files
[**/ro-crate-metadata.json]
insert_final_newline = unset
12 changes: 6 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nf-core/stableexpression: Contributing Guidelines
# `nf-core/stableexpression`: Contributing Guidelines

Hi there!
Many thanks for taking an interest in improving nf-core/stableexpression.
Expand Down Expand Up @@ -55,23 +55,23 @@ 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`.
- On your own fork, make a new branch `patch` based on `upstream/main` or `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.
- Open a pull-request from `patch` to `main`/`master` with the changes.

## Getting help

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

## Pipeline contribution conventions

To make the nf-core/stableexpression 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 `nf-core/stableexpression` 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

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
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 parameters to `nextflow.config` with a default (see below).
Expand All @@ -84,7 +84,7 @@ If you wish to contribute a new step, please use the following coding standards:

### Default values

Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
Parameters should be initialised / defined with default values within the `params` scope in `nextflow.config`.

Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json`.

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ body:

- [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)
- [nf-core/stableexpression pipeline documentation](https://nf-co.re/stableexpression/usage)

- type: textarea
id: description
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ 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/stableexpression/tree/master/.github/CONTRIBUTING.md)
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/stableexpression/tree/main/.github/CONTRIBUTING.md)
-->

## 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/stableexpression/tree/master/.github/CONTRIBUTING.md)
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/stableexpression/tree/main/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/stableexpression _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core pipelines lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
Expand Down
29 changes: 25 additions & 4 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
name: nf-core AWS full size tests
# This workflow is triggered on published releases.
# This workflow is triggered on PRs opened against the main/master branch.
# It can be additionally triggered manually with GitHub actions workflow dispatch button.
# It runs the -profile 'test_full' on AWS batch

on:
release:
types: [published]
pull_request:
branches:
- main
- master
workflow_dispatch:
pull_request_review:
types: [submitted]

jobs:
run-platform:
name: Run AWS full tests
if: github.repository == 'nf-core/stableexpression'
# run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered
if: github.repository == 'nf-core/stableexpression' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.x
id: check_approvals
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: test_variables
if: github.event_name != 'workflow_dispatch'
run: |
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
- name: Launch workflow via Seqera Platform
uses: seqeralabs/action-tower-launch@v2
# 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 }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: nf-core branch protection
# This workflow is triggered on PRs to master branch on the repository
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
# This workflow is triggered on PRs to `main`/`master` branch on the repository
# It fails when someone tries to make a PR against the nf-core `main`/`master` branch instead of `dev`
on:
pull_request_target:
branches: [master]
branches:
- main
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
# PRs to the nf-core repo main/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/stableexpression'
run: |
Expand All @@ -22,7 +24,7 @@ jobs:
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
message: |
## This PR is against the `master` branch :x:
## This PR is against the `${{github.event.pull_request.base.ref}}` branch :x:

* Do not close this PR
* Click _Edit_ and change the `base` to `dev`
Expand All @@ -32,9 +34,9 @@ jobs:

Hi @${{ github.event.pull_request.user.login }},

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.
The `master` branch on nf-core repositories should always contain code from the latest release.
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.
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 }}) ${{github.event.pull_request.base.ref}} branch.
The ${{github.event.pull_request.base.ref}} branch on nf-core repositories should always contain code from the latest release.
Because of this, PRs to ${{github.event.pull_request.base.ref}} 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.

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.
Note that even after this, the test will continue to show as failing until you push a new commit.
Expand Down
116 changes: 99 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,112 @@ on:
pull_request:
release:
types: [published]
workflow_dispatch:

env:
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
NFT_VER: "0.9.2"

concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Run pipeline with test data
name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})"
# 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/stableexpression') }}"
runs-on: ubuntu-latest
strategy:
matrix:
NXF_VER:
- "23.04.0"
- "24.04.2"
- "latest-everything"
profile:
- "conda"
- "docker"
- "singularity"
shard: [1, 2, 3, 4]
test_name:
- "test"
isMaster:
- ${{ github.base_ref == 'master' }}
# Exclude conda and singularity on dev
exclude:
- isMaster: false
profile: "conda"
- isMaster: false
profile: "singularity"
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
distribution: "temurin"
java-version: "17"
version: "${{ matrix.NXF_VER }}"

- name: Set up Apptainer
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main

- name: Install Nextflow
- name: Set up Singularity
if: matrix.profile == 'singularity'
run: |
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR

- name: Set up Miniconda
if: matrix.profile == 'conda'
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
with:
miniconda-version: "latest"
auto-update-conda: true
conda-solver: libmamba
channels: conda-forge,bioconda

- name: Set up Conda
if: matrix.profile == 'conda'
run: |
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
echo $(realpath python) >> $GITHUB_PATH

- name: Clean up Disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results

nf_test:
name: "Run nf-test (${{ matrix.NXF_VER }} | ${{ matrix.profile }})"
# 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/stableexpression') }}"
runs-on: ubuntu-latest
strategy:
matrix:
NXF_VER:
- "24.04.2"
- "latest-everything"
profile:
- "conda"
- "docker"
- "singularity"
shard: [1, 2, 3, 4]
isMaster:
- ${{ github.base_ref == 'master' }}
# Exclude conda and singularity on dev
exclude:
- isMaster: false
profile: "conda"
- isMaster: false
profile: "singularity"
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "${{ matrix.NXF_VER }}"
Expand All @@ -57,17 +127,29 @@ jobs:
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: Set up Miniconda
if: matrix.profile == 'conda'
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
with:
miniconda-version: "latest"
auto-update-conda: true
conda-solver: libmamba
channels: conda-forge,bioconda

- name: Install nf-test
- name: Set up Conda
if: matrix.profile == 'conda'
run: |
wget -qO- https://get.nf-test.com | bash
sudo mv nf-test /usr/local/bin/
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
echo $(realpath python) >> $GITHUB_PATH

- name: Run Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }})
run: nf-test test --ci --shard ${{ matrix.shard }}/${{ strategy.job-total }}
- name: Install nf-test
uses: nf-core/setup-nf-test@v1
with:
version: ${{ env.NFT_VER }}

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Run whole pipeline with test profile
- name: Run Tests
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
nf-test test --ci --profile ${{ matrix.profile }} --shard ${{ matrix.shard }}/${{ strategy.job-total }}
Loading
Loading