Make diffexp docs more specific (#1083)

* Update diffexp docs w/ more explicit assumptions, etc.

* Minor edits

* Formatting and cross-checking with `diffexp.py`
This commit is contained in:
Sidney Bell
2020-01-16 15:44:10 -08:00
committed by GitHub
parent 8b329630f8
commit 2832393f40

View File

@@ -16,6 +16,9 @@ cellxgene looks for embeddings (e.g., tSNE, UMAP, PCA, spatial coordinates) in `
## Differential expression
We're actively working on how to improve differential expression within the app.
We're actively working on how to improve differential expression within the app.
**N.B.: the [current implementation](https://github.com/chanzuckerberg/cellxgene/blob/master/server/app/scanpy_engine/diffexp.py#L40) assumes normally distributed values on a linear scale.**
Currently, we use a [Welch's _t_-test](https://en.wikipedia.org/wiki/Welch%27s_t-test) implementation, including the same variance overestimation correction as used in `scanpy`. We sort the `tscore` to identify the top 15 genes, and then filter to remove any that fall below a cutoff log fold change value, which can help remove spurious test results. The default threshold is `0.01` and can be changed using the option `--diffexp-lfc-cutoff`.
Currently, we use a [Welch's _t_-test](https://en.wikipedia.org/wiki/Welch%27s_t-test), which assumes that the two populations are each normally distributed, but may have unequal variance. We use a two-sided t-test against the null hypothesis that the two populations have **equal** means. P-values are adjusted with the [Bonferroni corrrection](https://en.wikipedia.org/wiki/Bonferroni_correction).
To help avoid spurious results, we use the log fold change to filter genes, retaining those where `|log2( mean(set1) / mean(set2) )| > 0.01`; this threshold can be configured with the [`--diffexp-lfc-cutoff`](launch) command. We then sort genes by their associated `|t value|` and return the top 15 genes.