Description Usage Arguments Details Value Examples
Recovers expression using the SAVER method.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
An expression count matrix. The rows correspond to genes and the columns correspond to cells. Can be sparse. |
do.fast |
Approximates the prediction step. Default is TRUE. |
ncores |
Number of cores to use. Default is 1. |
size.factor |
Vector of cell size normalization factors.
If |
npred |
Number of genes for regression prediction. Selects the top
|
pred.cells |
Indices of cells to perform regression prediction. Default is all cells. |
pred.genes |
Indices of specific genes to perform regression
prediction. Overrides |
pred.genes.only |
Return expression levels of only |
null.model |
Whether to use mean gene expression as prediction. |
mu |
Matrix of prior means. |
estimates.only |
Only return SAVER estimates. Default is FALSE. |
The SAVER method starts by estimating the prior mean and variance for the
true expression level for each gene and cell. The prior mean is obtained
through predictions from a LASSO Poisson regression for each gene
implemented using the glmnet
package. Then, the variance is estimated
through maximum likelihood assuming constant variance, Fano factor, or
coefficient of variation variance structure for each gene. The posterior
distribution is calculated and the posterior mean is reported as the SAVER
estimate.
If 'estimates.only = TRUE', then a matrix of SAVER estimates.
If 'estimates.only = FALSE', a list with the following components
|
Recovered (normalized) expression. |
|
Standard error of estimates. |
|
Information about dataset. |
The info
element is a list with the following components:
|
Size factor used for normalization. |
|
Maximum absolute correlation for each gene. 2 if not calculated |
|
Smallest value of lambda which gives the null model. |
|
Value of lambda from which the prediction model is used |
|
Difference in the number of standard deviations in deviance between the model with lowest cross-validation error and the null model |
|
Time taken to generate predictions. |
|
Time taken to estimate variance. |
|
Maximum absolute correlation cutoff used to determine if a gene should be predicted. |
|
Coefficients for estimating lambda with lowest cross-validation error. |
|
Total time for SAVER estimation. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data("linnarsson")
## Not run:
system.time(linnarsson_saver <- saver(linnarsson, ncores = 12))
## End(Not run)
# predictions for top 5 highly expressed genes
## Not run:
saver2 <- saver(linnarsson, npred = 5)
## End(Not run)
# predictions for certain genes
## Not run:
genes <- c("Thy1", "Mbp", "Stim2", "Psmc6", "Rps19")
genes.ind <- which(rownames(linnarsson)
saver3 <- saver(linnarsson, pred.genes = genes.ind)
## End(Not run)
# return only certain genes
## Not run:
saver4 <- saver(linnarsson, pred.genes = genes.ind, pred.genes.only = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.