###################################################
### chunk number 1: init1
###################################################
remove(list=ls()) options(width=69)

###################################################
### chunk number 2: loadlib
###################################################
library("Biobase")

###################################################
### chunk number 3: load1
###################################################
getwd() ## Do you need to setwd()? ls() load("ALLmat.rda") ls()

###################################################
### chunk number 4: help1 eval=FALSE
###################################################
## help(load)

###################################################
### chunk number 5: loadPhenoDataframe
###################################################
samples <- read.table("ALL-sample-info.txt", header=TRUE, check.names=FALSE)

###################################################
### chunk number 6: colnames
###################################################
names(samples)

###################################################
### chunk number 7: sapplyClasses
###################################################
sapply(samples, class)

###################################################
### chunk number 8: simpleSubsetting
###################################################
samples[c(15, 30), c("sex", "age")] samples[samples$cod == "11005", c("sex", "age")]

###################################################
### chunk number 9: loadVarMeta
###################################################
varInfo <- read.table("ALL-varMeta.txt", header=TRUE, colClasses="character") varInfo[c("sex", "cod", "mol.biol"), , drop=FALSE]

###################################################
### chunk number 10: AnnotatedDataFrame
###################################################
pd <- new("AnnotatedDataFrame", data=samples, varMetadata=varInfo)

###################################################
### chunk number 11: ExpressionSetFinally
###################################################
ALLSet <- new("ExpressionSet", exprs=ALLmat, phenoData=pd, annotation="hgu95av2")

###################################################
### chunk number 12: helpExpressionSet eval=FALSE
###################################################
## help("ExpressionSet-class") ## class ? ExpressionSet

###################################################
### chunk number 13: showExpressionSet
###################################################
ALLSet

###################################################
### chunk number 14: usingDollar
###################################################
ALLSet$sex[1:5] == "F" ALLSet$"t(9;22)"[1:5]

###################################################
### chunk number 15: featureNames
###################################################
featureNames(ALLSet)[1:5]

###################################################
### chunk number 16: sampleNames
###################################################
sampleNames(ALLSet)[1:5] varLabels(ALLSet)

###################################################
### chunk number 17: exprs
###################################################
mat <- exprs(ALLSet) adf <- phenoData(ALLSet)

###################################################
### chunk number 18: first10
###################################################
vv <- ALLSet[1:5, 1:3] dim(vv) featureNames(vv) sampleNames(vv)

###################################################
### chunk number 19: males
###################################################
males <- ALLSet[ , ALLSet$sex == "M"]

###################################################
### chunk number 20: bcell
###################################################
anyB <- grep("^B", ALLSet$BT) bcell <- ALLSet[ , anyB]

###################################################
### chunk number 21:
###################################################
toLatex(sessionInfo())