expr.predict: Calculates SAVER prediction.

Description Usage Arguments Details Value

View source: R/expr_predict.R

Description

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

Usage

1
2
3
4
5
6
7
8
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

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.

Value

A vector of predicted gene expression.


SAVER documentation built on Nov. 14, 2019, 1:06 a.m.