Learn R Programming

sigsquared (version 1.4.0)

ensembleAdjustable: Application of geneSignature object

Description

The ensembleAdjustable function applies a geneSignature object to a data matrix containing expression values and gene symbols or an ExpressionSet object.

Usage

ensembleAdjustable(dataSet, geneSig, index=F)

Arguments

dataSet
data set object, may be numeric matrix or an ExpressionSet
geneSig
geneSignature object containing directions, thresholds, and gene symbols
index
index to indicate which samples are to be subsetted, may be FALSE for no subsetting or a vector of column numbers

Value

Examples

Run this code
require(Biobase)
## Generate test geneSignature object with 0s for thresholds
gs <- setGeneSignature(g=new("geneSignature"), direct=c(1,1,1), genes=c("A", "B", "C"), thresholds=c(0, 0, 0))

## Generate randomly distributed matrix and ExpressionSet
mat <- matrix(rnorm(9, 0, 1), nrow=3)
rownames(mat) <- c("A", "B", "C")
posmat <- abs(mat)
expset <- new("ExpressionSet")
exprs(expset) <- mat

## Apply geneSignature to matrices
ensembleAdjustable(mat, gs)
ensembleAdjustable(posmat, gs)

## Apply geneSignature to ExpressionSet
ensembleAdjustable(expset, gs)

## Apply geneSignature with subsetting
ensembleAdjustable(mat, gs, c(1, 3))
ensembleAdjustable(expset, gs, c(1, 3))

Run the code above in your browser using DataLab