Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- [[#644](https://github.com/nf-core/differentialabundance/pull/644)] - Reverted back to use profiles by default, and use paramsheet only when provided, ([@suzannejin](https://github.com/suzannejin)), review by [@pinin4fjords](https://github.com/pinin4fjords) and [@grst](https://github.com/grst).
- [[#652](https://github.com/nf-core/differentialabundance/pull/652)] - Harmonize `--contrasts` and `--contrasts_yml` ([@atrigila](https://github.com/atrigila), review by [@grst](https://github.com/grst) and [@pinin4fjords](https://github.com/pinin4fjords)).
- [[#626](https://github.com/nf-core/differentialabundance/pull/626)] - Update documentation, bump Nextflow version, `versions.yml` output cleanup and add params_yaml to report bundle ([@delfiterradas](https://github.com/delfiterradas), review by [@atrigila](https://github.com/atrigila), [@apeltzer](https://github.com/apeltzer), [@grst](https://github.com/grst) and [@pinin4fjords](https://github.com/pinin4fjords)).
- [[#628](https://github.com/nf-core/differentialabundance/pull/628)] - Removed `--deseq2_cores` parameter and infer from task cpus instead,([@delfiterradas](https://github.com/delfiterradas), review by [@grst](https://github.com/grst) and [@pinin4fjords](https://github.com/pinin4fjords)).
Expand Down
96 changes: 46 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,84 +41,80 @@ On release, automated continuous integration tests run the pipeline on a full-si
8. Build an HTML report based on Quarto markdown, with interactive plots (where possible) and tables.

> [!NOTE]
> Each of these steps can be looped over multiple parameter sets, through paramsheet files and the `--paramset_name` parameter. See the [usage documentation](https://nf-co.re/differentialabundance/usage) for more information.
> 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.

## Usage

> [!NOTE]
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.

The paramsheet file (ie. `paramsheet.yaml`) stored in the `conf` directory defines the combination of tools and parameters that make sense to run for a given study type. You can use the flag `--paramset_name` to specify which set of tools to run. For example:
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`).

RNA-seq with deseq2:
RNA-seq with DESeq2 (default):

```bash
nextflow run nf-core/differentialabundance \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--matrix assay_matrix.tsv \
--gtf mouse.gtf \
--outdir <OUTDIR> \
-profile <docker/singularity/podman/shifter/charliecloud/conda/institute> \
--paramset_name deseq2_rnaseq
nextflow run nf-core/differentialabundance \
-profile rnaseq,docker \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--matrix assay_matrix.tsv \
--gtf mouse.gtf \
--outdir <OUTDIR>
```

:::note
If you are using the outputs of the nf-core rnaseq workflow as input here **either**:

- supply the raw count matrices (file names like **gene_counts.tsv**) alongide the feature length matrix via `--feature_length_matrix` (rnaseq versions >=3.12.0, preferred)
- **or** supply the **gene_counts_length_scaled.tsv** or **gene_counts_scaled.tsv** matrices.
> [!NOTE]
> If you are using the outputs of the nf-core rnaseq workflow as input here **either**:
>
> - supply the raw count matrices (file names like **gene_counts.tsv**) alongside the feature length matrix via `--feature_length_matrix` (rnaseq versions >=3.12.0, preferred)
> - **or** supply the **gene_counts_length_scaled.tsv** or **gene_counts_scaled.tsv** matrices.

RNA-seq limma+voom:
RNA-seq with Limma (voom):

```bash
nextflow run nf-core/differentialabundance \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--matrix assay_matrix.tsv \
--gtf mouse.gtf \
--outdir <OUTDIR> \
-profile <docker/singularity/podman/shifter/charliecloud/conda/institute> \
--paramset_name limma_rnaseq
nextflow run nf-core/differentialabundance \
-profile rnaseq_limma,docker \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--matrix assay_matrix.tsv \
--gtf mouse.gtf \
--outdir <OUTDIR>
```

:::note
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):

> [!NOTE]
> 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):
>
> "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'."

See the [usage documentation](https://nf-co.re/differentialabundance/usage) for more information.
:::
RNA-seq with DESeq2 and GSEA:

```bash
nextflow run nf-core/differentialabundance \
-profile rnaseq_deseq2_gsea,docker \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--matrix assay_matrix.tsv \
--gtf mouse.gtf \
--gene_sets_files gene_sets.gmt \
--outdir <OUTDIR>
```

Affymetrix microarray:

```bash
nextflow run nf-core/differentialabundance \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--affy_cel_files_archive cel_files.tar \
--outdir <OUTDIR> \
-profile <docker/singularity/podman/shifter/charliecloud/conda/institute> \
--paramset_name limma_affy
nextflow run nf-core/differentialabundance \
-profile affy,docker \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--affy_cel_files_archive cel_files.tar \
--outdir <OUTDIR>
```

> [!WARNING]
> 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/usage/getting_started/configuration#custom-configuration-files).

RNA-seq with deseq2 and GSEA:

```bash
nextflow run nf-core/differentialabundance \
--input samplesheet.csv \
--contrasts contrasts.yaml \
--matrix assay_matrix.tsv \
--gtf mouse.gtf \
--outdir <OUTDIR> \
-profile <docker/singularity/podman/shifter/charliecloud/conda/institute> \
--paramset_name deseq2_rnaseq_gsea
```
Available analysis profiles: `rnaseq`, `rnaseq_deseq2_gsea`, `rnaseq_deseq2_gprofiler2`, `rnaseq_limma`, `rnaseq_limma_gsea`, `rnaseq_limma_gprofiler2`, `rnaseq_limma_decoupler`, `rnaseq_dream`, `rnaseq_dream_decoupler`, `affy`, `affy_limma_gsea`, `affy_limma_gprofiler2`, `maxquant`, `soft`. CLI flags override profile parameters following standard Nextflow precedence.

You could also provide your own paramsheet through the `--paramsheet` parameter.
For benchmarking multiple configurations in parallel, you can provide a custom paramsheet via `--paramsheet`. See the [usage documentation](https://nf-co.re/differentialabundance/usage) for more details on the multi-run mode.

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).

Expand Down
41 changes: 41 additions & 0 deletions conf/affy/affy.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Affymetrix microarray analysis profile (default: Limma)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets parameters for Affymetrix array differential abundance analysis using Limma.
Use as follows:
nextflow run nf-core/differentialabundance -profile affy,<docker/singularity> --input <SAMPLESHEET> --affy_cel_files_archive <TAR> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/

params {
paramset_name = 'affy'

// Study
study_type = 'affy_array'
study_abundance_type = 'intensities'

// Differential analysis (Limma)
differential_method = 'limma'

// Features
features_id_col = 'PROBEID'
features_metadata_cols = 'PROBEID,ENSEMBL,SYMBOL,GENETYPE'
features_name_col = 'SYMBOL'
differential_feature_id_column = 'PROBEID'
differential_feature_name_column = 'SYMBOL'

// Exploratory
exploratory_assay_names = 'raw,normalised'
exploratory_final_assay = 'normalised'
exploratory_log2_assays = null

// Differential output columns
differential_file_suffix = '.limma.results.tsv'
differential_fc_column = 'logFC'
differential_pval_column = 'P.Value'
differential_qval_column = 'adj.P.Val'

// Shiny app
shinyngs_build_app = true
}
14 changes: 14 additions & 0 deletions conf/affy/affy_limma_gprofiler2.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Affymetrix Limma + g:Profiler2 analysis profile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Inherits from affy.config and adds g:Profiler2 functional enrichment.
----------------------------------------------------------------------------------------
*/

includeConfig 'affy.config'

params {
paramset_name = 'affy_limma_gprofiler2'
functional_method = 'gprofiler2'
}
14 changes: 14 additions & 0 deletions conf/affy/affy_limma_gsea.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Affymetrix Limma + GSEA analysis profile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Inherits from affy.config and adds GSEA functional enrichment.
----------------------------------------------------------------------------------------
*/

includeConfig 'affy.config'

params {
paramset_name = 'affy_limma_gsea'
functional_method = 'gsea'
}
45 changes: 45 additions & 0 deletions conf/maxquant/maxquant.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MaxQuant proteomics analysis profile (default: Limma)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets parameters for MaxQuant proteomics differential abundance analysis using Limma.
Use as follows:
nextflow run nf-core/differentialabundance -profile maxquant,<docker/singularity> --input <SAMPLESHEET> --matrix <MATRIX> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/

params {
paramset_name = 'maxquant'

// Study
study_type = 'maxquant'
study_abundance_type = 'intensities'

// Differential analysis (Limma)
differential_method = 'limma'

// Features
features_id_col = 'Majority protein IDs'
features_name_col = 'Majority protein IDs'
features_metadata_cols = 'Majority protein IDs'
features_type = 'protein'
differential_feature_id_column = 'Majority protein IDs'
differential_feature_name_column = 'Majority protein IDs'

// Exploratory
exploratory_assay_names = 'raw,normalised'
exploratory_final_assay = 'normalised'
exploratory_log2_assays = null

// Differential output columns
differential_file_suffix = '.limma.results.tsv'
differential_fc_column = 'logFC'
differential_pval_column = 'P.Value'
differential_qval_column = 'adj.P.Val'

// Proteus
proteus_measurecol_prefix = 'LFQ intensity'

// Shiny app
shinyngs_build_app = false
}
Loading
Loading