
Last chance! 50% off unlimited learning
Sale ends in
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.
makeExprSet(exprdat, phenodat, anno = "custom")
This should be an
This is an
This slot can be used to assign a label to the data set.
An object of class ExpressionSet
.
# 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