scdef.tl.marker_scores_from_usages ¶
Marker scores of factors from any count matrix and per-cell factor usages.
The cNMF "gene spectra scores" (Kotliar et al. 2019, eLife): the coefficients of an ordinary least-squares regression, without intercept, of each gene's standardised expression (counts per million per cell; each gene centred and scaled to unit variance over cells) on the usages. A gene with a large score for a factor is expressed above its average in the cells that use that factor, holding the other factors fixed, so the score contrasts a factor with the others, where the gene loadings describe the programme alone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
counts
|
Any
|
cells x genes counts (dense or scipy sparse). |
required |
usages
|
ndarray
|
cells x factors non-negative usages (for scDEF, the proportions of the cell weights of one layer). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
factors x genes array of scores. |