Skip to content

Commit

Permalink
Merge pull request #164 from nf-core/rlog_fixes
Browse files Browse the repository at this point in the history
Rlog + other small fixes
  • Loading branch information
pinin4fjords authored Oct 6, 2023
2 parents cb913b5 + 510fed8 commit 1e75341
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[#138](https://github.com/nf-core/differentialabundance/issues/138)]- Fix bugs with --control_features and --sizefactors_from_controls ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords))
- [[#133](https://github.com/nf-core/differentialabundance/issues/133)] - Sample exclusion options fail due to contrast-wise normalisation ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO))
- [[#160](https://github.com/nf-core/differentialabundance/issues/160)]- Fix merge conflicts for Template update 2.10 by nf-core-bot ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords))
- [[#164](https://github.com/nf-core/differentialabundance/pull/164)] - Rlog + other small fixes ([@pinin4fjords](https://github.com/pinin4fjords), review by [@drpatelh](https://github.com/drpatelh))

### `Changed`

Expand Down
9 changes: 5 additions & 4 deletions assets/differentialabundance_report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,17 @@ for (assay_type in rev(names(assay_data))){
}
```

### Outlier detection {.tabset}

Outlier detection based on [median absolute deviation](https://wiki.arrayserver.com/wiki/index.php?title=CorrelationQC.pdf) was undertaken, the outlier scoring is plotted below.

```{r, echo=FALSE, results='asis', warning=FALSE}
# We can't look for ouliers in sets of less than 3 samples, so exclude variables
# unless the minimum group size is larger than that
iv_min_group_sizes <- unlist(lapply(informative_variables, function(x) min(table(observations[[x]]))))
if (any(iv_min_group_sizes > 2)){
cat("\n### Outlier detection {.tabset}\n")
cat("\nOutlier detection based on [median absolute deviation](https://wiki.arrayserver.com/wiki/index.php?title=CorrelationQC.pdf) was undertaken, the outlier scoring is plotted below.\n")
}
foo <- lapply(informative_variables[iv_min_group_sizes > 2], function(iv){
cat(paste("\n####", iv, "\n"))
Expand Down
11 changes: 8 additions & 3 deletions workflows/differentialabundance.nf
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,19 @@ workflow DIFFERENTIALABUNDANCE {
// variance-stabilised matrices are not (IIUC) impacted by the model.

ch_norm = DESEQ2_NORM.out.normalised_counts
ch_vst = DESEQ2_NORM.out.vst_counts
ch_differential = DESEQ2_DIFFERENTIAL.out.results

ch_versions = ch_versions
.mix(DESEQ2_DIFFERENTIAL.out.versions)

ch_processed_matrices = ch_norm
.join(ch_vst)
if ('rlog' in params.deseq2_vs_method){
ch_processed_matrices = ch_processed_matrices.join(DESEQ2_NORM.out.rlog_counts)
}
if ('vst' in params.deseq2_vs_method){
ch_processed_matrices = ch_processed_matrices.join(DESEQ2_NORM.out.vst_counts)
}
ch_processed_matrices = ch_processed_matrices
.map{ it.tail() }
}

Expand Down Expand Up @@ -507,7 +512,7 @@ workflow DIFFERENTIALABUNDANCE {
// Condition params reported on study type

def params_pattern = ~/^(report|study|observations|features|filtering|exploratory|differential|deseq2|gsea).*/
if (params.study_type == 'affy_array' || 'geo_soft_file'){
if (params.study_type == 'affy_array' || params.study_type == 'geo_soft_file'){
params_pattern = ~/^(report|study|observations|features|filtering|exploratory|differential|affy|limma|gsea).*/
}

Expand Down

0 comments on commit 1e75341

Please sign in to comment.