Learn R Programming

permGPU (version 0.14.9)

makeExprSet: Create an expressionSet object for use with permGPU

Description

The permGPU function expects that the phenotypic and molecular (expression) data are provided as an ExpressionSet. This is a simple utility function that creates this object so that permGPU can be used along with data objects created for use with certain Bioconductor packages.

Usage

makeExprSet(exprdat, phenodat, anno = "custom")

Arguments

exprdat

This should be an \(K \times n\), where \(K\) denotes the number of markers/features and \(n\) denotes the number of patients, expression matrix. It is expected that the \(K\) marker names are assigned as row names of this matrix (i.e., could be extracted as rownames(exprdat).

phenodat

This is an \(n \times p\) data.frame, \(n\) denotes the number of patients and \(p\) denotes the number of clinical co-variables. It is assumed that the rows of this data.frame are matched up with the columns of exprdat

anno

This slot can be used to assign a label to the data set.

Value

An object of class ExpressionSet.

See Also

ExpressionSet

Examples

Run this code
# NOT RUN {
library(Biobase)
set.seed(123)

## Generate toy phenotype and expression data sets
## This example consists of 4 markers and ten patients
n<-10
K<-4
pdat=data.frame(grp=rep(1:0,each=n/2),bp=rnorm(n),ostime=rexp(n),event=rbinom(n,1,0.8))
expdat=matrix(rnorm(K*n),K,n)

## Assign marker names g1,...,gK to the expression data set
## (as row names) and patient ids id1,...,idn to the expression 
## data set (as column names) and phenotype data (as row names)
rownames(expdat)=paste("g",1:K,sep="")
patid=paste("id",1:n,sep="")
rownames(pdat)=patid
colnames(expdat)=patid

## Create the ExprSet object
testdat=makeExprSet(expdat,pdat)
class(testdat)


## Check the dimensions of the expression and phenotype data sets
dim(exprs(testdat))
dim(pData(testdat))

## Get sample and marker ids
sampleNames(testdat)
featureNames(testdat)

# }

Run the code above in your browser using DataLab