Skip to contents

Make a ggplot of the coefficients from a glmnet object trained on a gene expression meta-analysis (either logistic or multinomial classification).

Usage

plotCoefficients(
  fitResult,
  lambda,
  classLevels = NA,
  decreasing = FALSE,
  geneIdOrder = NA,
  org = "org.Hs.eg"
)

Arguments

fitResult

glmnet object.

lambda

value of lambda to use in fitResult.

classLevels

Order of classes in the confusion matrix. If NA (default), then the function uses the order in fitResult.

decreasing

logical indicating whether to sort genes by decreasing coefficient.

geneIdOrder

Optional character array of Entrez Gene IDs specifying the order of genes. If NA (default), the order from makeCoefDt() is used.

org

Name of package for mapping Entrez Gene IDs to gene symbols, passed to data argument of annotate::lookUp().

Value

A ggplot object.