Skip to content

Commit 8dd860e

Browse files
committed
Merge dev into nf-core-template-merge-4.0.2
Resolves conflicts for nf-core/tools v4.0.2 template merge, following nf-core/rnaseq#1827 precedent. Kept from dev (pipeline-specific): - paramsets workflow signature and full workflows/differentialabundance.nf body with output {} blocks - nf-test.config explicit-profile policy and all tests/default.nf.test cases - Pipeline-specific manifest contributors Adopted from template: - nf_core_version 4.0.2, nextflowVersion !>=25.10.4, badge bumps in README and ro-crate-metadata.json - outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode - utils_nfcore_pipeline bumped to a3fb7351b1fdb2b1de282b765816bbea190e86a8 (drops imNotification path) - tests/default.nf.test variable rename stable_name/stable_path -> stable_path/stable_content, applied to all four test cases - .lineage/ added to .gitignore - Template's auto-generated ro-crate-metadata.json (lint will renormalize description from the resolved README) Local touch-ups: - Removed .github/CONTRIBUTING.md from .nf-core.yml files_unchanged (file moved to docs/CONTRIBUTING.md in dev) - Dropped orphan def before_text/after_text declarations in subworkflows/local/utils_nfcore_differentialabundance_pipeline/main.nf - awsfulltest.yml nf-slack channel switched to differentialabundance-dev
2 parents 29d9397 + 6486ba6 commit 8dd860e

304 files changed

Lines changed: 42769 additions & 239 deletions

File tree

Some content is hidden

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

.github/workflows/awsfulltest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
enabled = true
4242
bot {
4343
token = '${{ secrets.NFSLACK_BOT_TOKEN }}'
44-
channel = 'differentialabundance'
44+
channel = 'differentialabundance-dev'
4545
}
4646
onStart {
4747
enabled = false

.github/workflows/nf-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
runs-on: # use self-hosted runners
3131
- runs-on=${{ github.run_id }}-nf-test-changes
3232
- runner=4cpu-linux-x64
33+
- volume=250gb
3334
outputs:
3435
shard: ${{ steps.set-shards.outputs.shard }}
3536
total_shards: ${{ steps.set-shards.outputs.total_shards }}
@@ -50,7 +51,7 @@ jobs:
5051
env:
5152
NFT_VER: ${{ env.NFT_VER }}
5253
with:
53-
max_shards: 7
54+
max_shards: 30
5455

5556
- name: debug
5657
run: |
@@ -64,6 +65,7 @@ jobs:
6465
runs-on: # use self-hosted runners
6566
- runs-on=${{ github.run_id }}-nf-test
6667
- runner=4cpu-linux-x64
68+
- volume=50gb
6769
strategy:
6870
fail-fast: false
6971
matrix:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ testing*
88
*.pyc
99
null/
1010
.lineage/
11+
.nf-test
12+
.nf-test.log

.nf-core.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ lint:
22
files_exist:
33
- assets/multiqc_config.yml
44
files_unchanged:
5-
- .github/CONTRIBUTING.md
65
- assets/nf-core-differentialabundance_logo_light.png
76
- docs/images/nf-core-differentialabundance_logo_light.png
87
- docs/images/nf-core-differentialabundance_logo_dark.png

CHANGELOG.md

Lines changed: 273 additions & 1 deletion
Large diffs are not rendered by default.

CITATIONS.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,80 @@
1010
1111
## Pipeline tools
1212

13+
- [decoupler-py](https://pubmed.ncbi.nlm.nih.gov/36699385/)
14+
15+
> Badia-i-Mompel P, Vélez Santiago J, Braunger J, Geiss C, Dimitrov D, Müller-Dott S, Taus P, Dugourd A, Holland CH, Ramirez Flores RO, Saez-Rodriguez J. decoupleR: ensemble of computational methods to infer biological activities from omics data. Bioinform Adv. 2022 Mar 8;2(1):vbac016. doi: 10.1093/bioadv/vbac016. PubMed PMID: 36699385; PubMed Central PMCID: PMC9710656.
16+
17+
- [GSEA](https://www.gsea-msigdb.org/gsea/index.jsp)
18+
19+
> Subramanian A, Tamayo P, Mootha VK, et al. Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proc Natl Acad Sci U S A. 2005;102(43):15545-15550.
20+
21+
## R packages
22+
23+
- [affy](https://pubmed.ncbi.nlm.nih.gov/14960456/)
24+
25+
> Gautier L, Cope L, Bolstad BM, Irizarry RA. Affy--analysis of affymetrix genechip data at the probe level. Bioinformatics. 2004;20(3):307-315.
26+
27+
- [DESeq2](https://pubmed.ncbi.nlm.nih.gov/25516281/)
28+
29+
> Love MI, Huber W, Anders S (2014). Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biol. 15(12):550. PubMed PMID: 25516281; PubMed Central PMCID: PMC4302049.
30+
31+
- [GEOQuery](https://pubmed.ncbi.nlm.nih.gov/17496320/)
32+
33+
> Davis S, Meltzer PS. Geoquery: a bridge between the gene expression omnibus (Geo) and bioconductor. Bioinformatics. 2007;23(14):1846-1847.
34+
35+
- [ggplot2](https://cran.r-project.org/web/packages/ggplot2/index.html)
36+
37+
> H. Wickham (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York.
38+
39+
- [gprofiler2](https://cran.r-project.org/web/packages/gprofiler2/index.html)
40+
41+
> Kolberg L, Raudvere U, Kuzmin I, Vilo J, Peterson H (2020). “gprofiler2– an R package for gene list functional enrichment analysis and namespace conversion toolset g:Profiler.” F1000Research, 9 (ELIXIR)(709). R package version 0.2.2.
42+
43+
- [Limma](https://pubmed.ncbi.nlm.nih.gov/25605792/)
44+
45+
> Ritchie ME, Phipson B, Wu D, et al. Limma powers differential expression analyses for rna-sequencing and microarray studies. Nucleic Acids Res. 2015;43(7):e47.
46+
47+
- [optparse](https://CRAN.R-project.org/package=optparse)
48+
49+
> Trevor L Davis (2018). optparse: Command Line Option Parser.
50+
51+
- [plotly](https://plotly.com/r/)
52+
53+
> C. Sievert (2020). Interactive Web-Based Data Visualization with R, plotly, and shiny. Chapman and Hall/CRC Florida.
54+
55+
- [Proteus](https://doi.org/10.1101/416511)
56+
57+
> Gierlinski M, Gastaldello F, Cole C, Barton GJ. Proteus : An r Package for Downstream Analysis of Maxquant Output. Bioinformatics; 2018.
58+
59+
- [R](https://www.R-project.org/)
60+
61+
> R Core Team (2017). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria.
62+
63+
- [RColorBrewer](https://CRAN.R-project.org/package=RColorBrewer)
64+
65+
> Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes.
66+
67+
- [RMarkdown](https://rmarkdown.rstudio.com)
68+
69+
> JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone (2022). rmarkdown: Dynamic Documents for R.
70+
71+
- [shinyngs](https://github.com/pinin4fjords/shinyngs)
72+
73+
> Jonathan R Manning (2022). Shiny apps for NGS etc based on reusable components created using Shiny modules. Computer software. Vers. 1.5.3. Jonathan Manning, Dec. 2022. Web.
74+
75+
- [SummarizedExperiment](https://bioconductor.org/packages/release/bioc/html/SummarizedExperiment.html)
76+
77+
> Morgan M, Obenchain V, Hester J and Pagès H (2020). SummarizedExperiment: SummarizedExperiment container.
78+
79+
- [variancePartition](https://pubmed.ncbi.nlm.nih.gov/27884101/)
80+
81+
> Hoffman GE, Schadt EE. variancePartition: interpreting drivers of variation in complex gene expression studies. BMC Bioinformatics. 2016 Nov 25;17(1):483. doi: 10.1186/s12859-016-1323-z. PubMed PMID: 27884101; PubMed Central PMCID: PMC5123296.
82+
83+
- [variancePartition::dream](https://pubmed.ncbi.nlm.nih.gov/32730587/)
84+
85+
> Hoffman GE, Roussos P. Dream: powerful differential expression analysis for repeated measures designs. Bioinformatics. 2021 Apr 19;37(2):192-201. doi: 10.1093/bioinformatics/btaa687. PubMed PMID: 32730587; PubMed Central PMCID: PMC8055218.
86+
1387
## Software packaging/containerisation tools
1488

1589
- [Anaconda](https://anaconda.com)

README.md

Lines changed: 104 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![GitHub Actions CI Status](https://github.com/nf-core/differentialabundance/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-core/differentialabundance/actions/workflows/nf-test.yml)
1010
[![GitHub Actions Linting Status](https://github.com/nf-core/differentialabundance/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/differentialabundance/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/differentialabundance/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
1111
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)
12-
12+
[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7568000-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7568000)
1313
[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.4-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
1414
[![nf-core template version](https://img.shields.io/badge/nf--core_template-4.0.2-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/4.0.2)
1515
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
@@ -21,54 +21,113 @@
2121

2222
## Introduction
2323

24-
**nf-core/differentialabundance** is a bioinformatics pipeline that ...
24+
**nf-core/differentialabundance** is a bioinformatics pipeline that can be used to analyse data represented as matrices, comparing groups of observations to generate differential statistics and downstream analyses. The pipeline supports RNA-seq data such as that generated by the nf-core [rnaseq workflow](https://github.com/nf-core/rnaseq), and Affymetrix arrays via .CEL files. Other types of matrix may also work with appropriate changes to parameters, and PRs to support additional specific modalities are welcomed.
25+
26+
The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from [nf-core/modules](https://github.com/nf-core/modules) in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!
27+
28+
On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/differentialabundance/results).
2529

26-
<!-- TODO nf-core:
27-
Complete this sentence with a 2-3 sentence summary of what types of data the pipeline ingests, a brief overview of the
28-
major pipeline sections and the types of output it produces. You're giving an overview to someone new
29-
to nf-core here, in 15-20 seconds. For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#introduction
30-
-->
30+
## Pipeline summary
3131

32-
<!-- TODO nf-core: Include a figure that guides the user through the major workflow steps. Many nf-core
33-
workflows use the "tube map" design for that. See https://nf-co.re/docs/community/brand/workflow-schematics#examples for examples. -->
34-
<!-- TODO nf-core: Fill in short bullet-pointed list of the default steps in the pipeline -->
32+
![nf-core/differentialabundance metro map](docs/images/workflow.png)
33+
34+
1. Optionally generate a list of genomic feature annotations using the input GTF file (if a table is not explicitly supplied).
35+
2. Cross-check matrices, sample annotations, feature set and contrasts to ensure consistency.
36+
3. Run differential analysis over all contrasts specified.
37+
4. Optionally run a differential gene set analysis.
38+
5. Generate exploratory and differential analysis plots for interpretation.
39+
6. Optionally build and (if specified) deploy a Shiny app for fully interactive mining of results.
40+
7. Build an HTML report based on Quarto markdown, with interactive plots (where possible) and tables.
41+
42+
> [!NOTE]
43+
> The pipeline supports two modes: **single-run mode** using analysis profiles (e.g. `-profile rnaseq,docker`) for production use, and **multi-run mode** using a custom paramsheet (`--paramsheet`) for comparing multiple configurations in parallel. See the [usage documentation](https://nf-co.re/differentialabundance/usage) for more information.
3544
3645
## Usage
3746

3847
> [!NOTE]
3948
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/get_started/environment_setup/overview) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/get_started/run-your-first-pipeline) with `-profile test` before running the workflow on actual data.
4049
41-
<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
42-
Explain what rows and columns represent. For instance (please edit as appropriate):
50+
Select an **analysis profile** that bundles the correct study type, differential method, and output settings. Combine it with a container profile (e.g. `docker`, `singularity`).
4351

44-
First, prepare a samplesheet with your input data that looks as follows:
52+
RNA-seq with DESeq2 (default method):
4553

46-
`samplesheet.csv`:
54+
```bash
55+
nextflow run nf-core/differentialabundance \
56+
-profile rnaseq,docker \
57+
--input samplesheet.csv \
58+
--contrasts contrasts.yaml \
59+
--matrix assay_matrix.tsv \
60+
--gtf mouse.gtf \
61+
--outdir <OUTDIR>
62+
```
4763

48-
```csv
49-
sample,fastq_1,fastq_2
50-
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz
64+
> [!WARNING]
65+
> Do not override `--differential_method` when using an analysis profile. Switch methods by using the appropriate profile (e.g. `-profile rnaseq_limma`).
66+
67+
RNA-seq with limma-voom:
68+
69+
```bash
70+
nextflow run nf-core/differentialabundance \
71+
-profile rnaseq_limma,docker \
72+
--input samplesheet.csv \
73+
--contrasts contrasts.yaml \
74+
--matrix assay_matrix.tsv \
75+
--gtf mouse.gtf \
76+
--outdir <OUTDIR>
5177
```
5278

53-
Each row represents a fastq file (single-end) or a pair of fastq files (paired end).
79+
> [!NOTE]
80+
> If you are using the outputs of the nf-core rnaseq workflow as input here you should provide either the **gene_counts_length_scaled.tsv** or **gene_counts_scaled.tsv** matrices. This follows the [recommendation from the tximport documentation](https://bioconductor.org/packages/devel/bioc/vignettes/tximport/inst/doc/tximport.html#limma-voom):
81+
>
82+
> "Because limma-voom does not use the offset matrix stored in `y$offset`, we recommend using scaled counts generated from abundances, either 'scaledTPM' or 'lengthScaledTPM'."
5483
55-
-->
84+
RNA-seq with DESeq2 and GSEA:
5685

57-
Now, you can run the pipeline using:
86+
```bash
87+
nextflow run nf-core/differentialabundance \
88+
-profile rnaseq_deseq2_gsea,docker \
89+
--input samplesheet.csv \
90+
--contrasts contrasts.yaml \
91+
--matrix assay_matrix.tsv \
92+
--gtf mouse.gtf \
93+
--gene_sets_files gene_sets.gmt \
94+
--outdir <OUTDIR>
95+
```
5896

59-
<!-- TODO nf-core: update the following command to include all required parameters for a minimal example -->
97+
Affymetrix microarray:
6098

6199
```bash
62100
nextflow run nf-core/differentialabundance \
63-
-profile <docker/singularity/.../institute> \
64-
--input samplesheet.csv \
65-
--outdir <OUTDIR>
101+
-profile affy,docker \
102+
--input samplesheet.csv \
103+
--contrasts contrasts.yaml \
104+
--affy_cel_files_archive cel_files.tar \
105+
--outdir <OUTDIR>
66106
```
67107

68-
> [!WARNING]
69-
> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/running/run-pipelines#using-parameter-files).
108+
For full usage examples, analysis profiles, paramsheet-based multi-run mode, and input specifics (rnaseq counts, Affymetrix, MaxQuant, GEO SOFT), see the [usage documentation](https://nf-co.re/differentialabundance/usage) and the [parameter documentation](https://nf-co.re/differentialabundance/parameters).
109+
110+
### Reporting
111+
112+
The pipeline reports its outcomes in two forms.
113+
114+
#### Quarto notebook and HTML
115+
116+
The primary workflow output is an HTML-format report produced from an [Quarto notebook template](assets/differentialabundance_report.qmd) (you can also supply your own). This leverages helper functions from [shinyngs](https://github.com/pinin4fjords/shinyngs) to produce rich plots and tables, but does not provide significant interactivity.
117+
118+
![screenshot of the Quarto report](docs/images/markdown_report.png "Quarto report")
70119

71-
For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/differentialabundance/usage) and the [parameter documentation](https://nf-co.re/differentialabundance/parameters).
120+
Additionally, a zip file is produced by the pipeline, containing a Quarto notebook file and all necessary file inputs for reporting. The notebook file is the same as the input template, but with the parameters set appropriately, so that you can run the reporting yourself in RStudio, and add any customisations you need.
121+
122+
#### Shiny-based data mining app
123+
124+
A second optional output is produced by leveraging [shinyngs](https://github.com/pinin4fjords/shinyngs) to build an interactive Shiny application. This allows more interaction with the data, setting of thresholds etc.
125+
126+
![screenshot of the ShinyNGS contrast table](docs/images/shinyngs_contrast_table.png "ShinyNGS contrast table")
127+
128+
![screenshot of the ShinyNGS gene plot](docs/images/shinyngs_gene_plot.png "ShinyNGS gene plot")
129+
130+
By default the application is provided as an R script and associated serialised data structure, which you can use to quickly start the application locally. With proper configuration the app can also be deployed to [shinyapps.io](https://www.shinyapps.io/) - though this requires you to have an account on that service (free tier available).
72131

73132
## Pipeline output
74133

@@ -78,11 +137,23 @@ For more details about the output files and reports, please refer to the
78137

79138
## Credits
80139

81-
nf-core/differentialabundance was originally written by Oskar Wacker, Jonathan Manning.
140+
nf-core/differentialabundance was originally written by Jonathan Manning ([@pinin4fjords](https://github.com/pinin4fjords)) and Oskar Wacker ([@WackerO](https://github.com/WackerO)). Jonathan Manning (now at Seqera) initially worked on this workflow as an employee of Healx, an AI-powered, patient-inspired tech company, accelerating the discovery and development of treatments for rare diseases. Oskar Wacker works for [QBiC](https://www.qbic.uni-tuebingen.de/) at Tübingen University. We are grateful for the support of open science in this project.
141+
142+
Also, additional contributions were made by Suzanne Jin ([@suzannejin](https://github.com/suzannejin)), Cristina Araiz ([@caraiz2001](https://github.com/caraiz2001)), Björn Langer ([blanger](https://github.com/blanger)), Jose Espinosa-Carrasco ([@JoseEspinosa](https://github.com/JoseEspinosa)) and Júlia Mir Pedrol ([@mirpedrol](https://github.com/mirpedrol)), from [The Comparative Bioinformatics Group](https://www.crg.eu/en/cedric_notredame) at [The Centre for Genomic Regulation, Spain](https://www.crg.eu/).
82143

83-
We thank the following people for their extensive assistance in the development of this pipeline:
144+
We thank the many members of the nf-core community who assisted with this pipeline, often by reviewing module pull requests including but not limited to:
84145

85-
<!-- TODO nf-core: If applicable, make list of people who have also contributed -->
146+
- [@ggabernet](https://github.com/ggabernet),
147+
- [@SPPearce](https://github.com/SPPearce),
148+
- [@nvnieuwk](https://github.com/nvnieuwk),
149+
- [@jfy133](https://github.com/jfy133),
150+
- [@mahesh-panchal](https://github.com/mahesh-panchal),
151+
- [@mashehu](https://github.com/mashehu),
152+
- [@apeltzer](https://github.com/apeltzer)
153+
- [@grst](https://github.com/grst)
154+
- [@atrigila](https://github.com/atrigila)
155+
- [@alanmmobbs93](https://github.com/alanmmobbs93)
156+
- [@nschcolnicov](https://github.com/nschcolnicov)
86157

87158
## Contributions and Support
88159

@@ -92,13 +163,12 @@ For further information or help, don't hesitate to get in touch on the [Slack `#
92163

93164
## Citations
94165

95-
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. -->
96-
<!-- If you use nf-core/differentialabundance for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->
97-
98-
<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->
166+
If you use nf-core/differentialabundance for your analysis, please cite it using the following doi: [10.5281/zenodo.7568000](https://doi.org/10.5281/zenodo.7568000).
99167

100168
An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.
101169

170+
This pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).
171+
102172
You can cite the `nf-core` publication as follows:
103173

104174
> **The nf-core framework for community-curated bioinformatics pipelines.**

0 commit comments

Comments
 (0)