Skip to content

Commit

Permalink
After review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilMaliszArdigen committed Nov 26, 2024
1 parent b2a122b commit dc88a9b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 31 deletions.
31 changes: 1 addition & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}

Expand Down
33 changes: 33 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dc88a9b

Please sign in to comment.