diff --git a/README.md b/README.md index bb7601c6..c5a6207c 100644 --- a/README.md +++ b/README.md @@ -73,36 +73,7 @@ RNA-seq limma+voom: ``` > [!NOTE] -> To use advanced mixed model in your analysis, you need to prepare your submission sheet by combining experimental factors into a single composite variable. See the necessary steps: - -##### Step 1: Create a Composite Factor Column - -- **Combine Experimental Factors**: Add a new column to your submission sheet that merges your experimental factors (e.g., `Condition`, `Tissue`) into a single factor. - -- **Use a Dot Separator**: Separate the original factor values with a `.` (dot). This combined factor will serve as your **contrast variable** for model construction. - -##### Example Submission Sheet - -Below is an example of how your submission sheet should look after creating the composite variable: - -| Patient | Condition | Tissue | Condition.Tissue | -| ------- | --------- | ------ | ---------------- | -| 1 | Diseased | A | Diseased.A | -| 1 | Diseased | B | Diseased.B | -| 2 | Diseased | A | Diseased.A | -| 2 | Diseased | B | Diseased.B | -| 3 | Diseased | A | Diseased.A | -| 3 | Diseased | B | Diseased.B | -| 4 | Normal | A | Normal.A | -| 4 | Normal | B | Normal.B | -| 5 | Normal | A | Normal.A | -| 5 | Normal | B | Normal.B | -| 6 | Normal | A | Normal.A | -| 6 | Normal | B | Normal.B | - -##### Step 2: Define Contrasts - -After creating the composite variable (e.g., `Condition.Tissue`), use this column in your input contrast file to define the specific contrasts you want to test. Make sure all levels of the composite factor are correctly labeled and match the values in your contrast file. +> To use advanced mixed model in your analysis, you need to prepare your submission sheet by combining experimental factors into a single composite variable. See [docs](https://github.com/nf-core/differentialabundance/blob/master/docs/usage.md#limma-mixed-models). > [!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): diff --git a/conf/modules.config b/conf/modules.config index 9e732402..9c99189e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -376,7 +376,7 @@ process { "--final_assay \"${params.exploratory_final_assay}\"", "--outlier_mad_threshold ${params.exploratory_mad_threshold}", "--palette_name \"${params.exploratory_palette_name}\"", - ( (params.study_type == 'maxquant' || params.limma_block) ? "--log2_assays ''" : (((params.exploratory_log2_assays == null) ? '' : "--log2_assays \"$params.exploratory_log2_assays\"".replace('[', '').replace(']', ''))) ) + ( (params.study_type == 'maxquant' || params.limma_use_voom) ? "--log2_assays ''" : (((params.exploratory_log2_assays == null) ? '' : "--log2_assays \"$params.exploratory_log2_assays\"".replace('[', '').replace(']', ''))) ) ].join(' ').trim() } } diff --git a/docs/usage.md b/docs/usage.md index 7364d837..c00bc10a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -273,6 +273,39 @@ With this configuration in place deployment should happen automatically every ti There is also a [Shiny server application](https://posit.co/download/shiny-server/), which you can install on your own infrastruture and use to host applications yourself. +## Limma mixed models +> To use advanced mixed model in your analysis, you need to prepare your submission sheet by combining experimental factors into a single composite variable. See the necessary steps: + +### Step 1: Create a Composite Factor Column + +- **Combine Experimental Factors**: Add a new column to your submission sheet that merges your experimental factors (e.g., `Condition`, `Tissue`) into a single factor. + +- **Use a Dot Separator**: Separate the original factor values with a `.` (dot). This combined factor will serve as your **contrast variable** for model construction. + +#### Example Submission Sheet + +Below is an example of how your submission sheet should look after creating the composite variable: + +| Patient | Condition | Tissue | Condition.Tissue | +| ------- | --------- | ------ | ---------------- | +| 1 | Diseased | A | Diseased.A | +| 1 | Diseased | B | Diseased.B | +| 2 | Diseased | A | Diseased.A | +| 2 | Diseased | B | Diseased.B | +| 3 | Diseased | A | Diseased.A | +| 3 | Diseased | B | Diseased.B | +| 4 | Normal | A | Normal.A | +| 4 | Normal | B | Normal.B | +| 5 | Normal | A | Normal.A | +| 5 | Normal | B | Normal.B | +| 6 | Normal | A | Normal.A | +| 6 | Normal | B | Normal.B | + +### Step 2: Define Contrasts + +After creating the composite variable (e.g., `Condition.Tissue`), use this column in your input contrast file to define the specific contrasts you want to test. Make sure all levels of the composite factor are correctly labeled and match the values in your contrast file. + + ## Gene set enrichment analysis Currently, two tools can be used to do gene set enrichment analysis.