Description Usage Arguments Value Examples
Performs "reverse deconvolution", modelling each gene expression's ~ cell scores. Returns a matrix of "fitted" expression values, a matrix of residuals, a matrix of reverse decon coefficients for genes * cells.
1 | reverseDecon(norm, beta, epsilon = NULL)
|
norm |
Matrix of normalized data, with genes in rows and observations in columns |
beta |
Matrix of cell abundance estimates, with cells in rows and observations in columns. Columns are aligned to "norm". |
epsilon |
All y and yhat values are thresholded up to this point when performing decon. Essentially says, "ignore variability in counts below this threshold." |
A list:
coefs, a matrix of coefficients for genes * cells, where element i,j is interpreted as "every unit increase in cell score j is expected to increase expression of gene i by _".
yhat, a matrix of fitted values, in the same dimension as norm
resids, a matrix of log2-scale residuals from the reverse decon fit, in the same dimension as norm
cors, a vector giving each gene's correlation between fitted and observed expression
resid.sd, a vector of each gene's residual SD, a metric of how much variability genes have independend of cell mixing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(mini_geomx_dataset)
data(safeTME)
# estimate background:
mini_geomx_dataset$bg <- derive_GeoMx_background(
norm = mini_geomx_dataset$normalized,
probepool = rep(1, nrow(mini_geomx_dataset$normalized)),
negnames = "NegProbe"
)
# run basic decon:
res0 <- spatialdecon(
norm = mini_geomx_dataset$normalized,
bg = mini_geomx_dataset$bg,
X = safeTME
)
# run reverse decon:
rdecon <- reverseDecon(
norm = mini_geomx_dataset$norm,
beta = res0$beta
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.