Uses cv.glmnet from the glmnet package to return the SAVER prediction.

expr.predict(x, y, pred.cells = 1:length(y), seed = NULL,
  lambda.max = NULL, lambda.min = NULL)

Arguments

x

A log-normalized expression count matrix of genes to be used in the prediction.

y

A normalized expression count vector of the gene to be predicted.

pred.cells

Index of cells to use for prediction. Default is to use all cells.

seed

Sets the seed for reproducible results.

lambda.max

Maximum value of lambda which gives null model.

lambda.min

Value of lambda from which the prediction model is used

Value

A vector of predicted gene expression.

Details

The SAVER method starts with predicting the prior mean for each cell for a specific gene. The prediction is performed using the observed normalized gene count as the response and the normalized gene counts of other genes as predictors. cv.glmnet from the glmnet package is used to fit the LASSO Poisson regression. The model with the lowest cross-validation error is chosen and the fitted response values are returned and used as the SAVER prediction.