glmSingleCellAssay: ##Generic for cv.glmnet ## ##Accepts formula arguments ##

Description Usage Arguments Value See Also

Description

##Generic for cv.glmnet ## ##Accepts formula arguments ##

Usage

1
2
3
4
glmSingleCellAssay(sca, comparison, min.freq, predictor = c("continuous",
  "dichotomous"), pen.scale.interaction = 2, precenter = FALSE,
  prescale = FALSE, addn = NULL, addn.penalty = 0, user.mm, alpha = 0.9,
  only.mm = FALSE, ...)

Arguments

x

formula ##

y

data.frame or environment in which x is evaluated ##

...

arguments passed to cv.glmnet ##

sca

SingleCellAssay object

comparison

character naming a column in cData(sca)

min.freq

minimum frequency for a gene to be considered in the classifier

predictor

character vector naming some combination of 'continuous', 'dichotomous' or 'interaction'. See details.

pen.scale.interaction

multiply the l1 penalty by this factor if interactions are included

precenter

should the gene predictors be centered? Recommended if there are interactions present to reduce co-linearity of the interaction with the marginal term.

prescale

should the gene predictors be scaled to have unit variance?

addn

character vector, giving additional columns of design, interpreted in the context of cData(sca)

addn.penalty

an optional numeric giving the relative scale of the penalty for add

user.mm

a function to be applied to exprs(sca) instead of the defaults given by predictor

alpha

elasticnet penalty parameter. Default =.9.

only.mm

Should only the model matrix be returned, rather than actually calling cv.glmnet?

...

additional arguments to cv.glmnet.

Value

see cv.glmnet Run a multinomial lasso on a SingleCellAssay object to predict group membership

This function generates a design matrix based on the expression values in sca and calls cv.glmnet to try to classify a group named by comparison, which keys a column in the cData of sca

The design matrix is generated according to the option predictor. If predictor vector includes the term 'dichotomous', then each gene is treated as binary indicators. If the term 'continuous' is included, then the zero-inflated (continuous) value for the gene is used. If both 'continuous' and 'dichotomous' are included, then the both values for the gene are used, however the continuous values are centered about their conditional mean using the function xform. If 'interaction' is included, then all the terms are crossed with each other to generate pairwise interactions.

list with components 'cv.fit' giving the output from cv.glmnet, 'mm' giving the model matrix, 'response' giving the response vector and 'sca' containing the 'sca' passed as input to the function

See Also

glmMisclass, getNZdesign, doGLMnet, cv.glmnet


amcdavid/SingleCellAnalysis documentation built on May 10, 2019, 10:27 a.m.