dat <- data.frame(matrix(rnorm(10000),ncol=10,nrow=1000))
rownames(dat) <- paste("g", 1:1000, sep="")
colnames(dat) <- paste("s", 1:10, sep="")
## build a data.frame containing sample annotations
annot <- data.frame(type=c(rep("a",5),rep("b",5)))
rownames(annot) <- colnames(dat)
## run ICA
resJade <- runICA(X=dat, nbComp=3, method = "JADE")
## build params
params <- buildMineICAParams(resPath="toy/")
## build IcaSet object
icaSettoy <- buildIcaSet(params=params, A=data.frame(resJade$A), S=data.frame(resJade$S),
dat=dat, pData=annot, alreadyAnnot=TRUE)
params <- icaSettoy$params
icaSettoy <- icaSettoy$icaSet
## Not run:
# ## load data
# library(breastCancerMAINZ)
# data(mainz)
#
# ## run ICA
# resJade <- runICA(X=dataMainz, nbComp=10, method = "JADE", maxit=10000)
#
# ## build params
# params <- buildMineICAParams(resPath="mainz/")
#
# ## build IcaSet object
#
# # fill typeID, Mainz data originate from affymetrix HG-U133a microarray and are indexed by probe sets
# # we want to annotate the probe sets into Gene Symbols
# typeIDmainz <- c(geneID_annotation="SYMBOL", geneID_biomart="hgnc_symbol", featureID_biomart="affy_hg_u133a")
#
# icaSetMainz <- buildIcaSet(params=params, A=data.frame(resJade$A), S=data.frame(resJade$S),
# dat=exprs(mainz), pData=pData(mainz),
# annotation="hgu133a.db", typeID= c(geneID_annotation = "SYMBOL",
# geneID_biomart = "hgnc_symbol", featureID_biomart = "affy_hg_u133a"),
# chipManu = "affymetrix", runAnnot=TRUE,
# mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl"))
# ## End(Not run)
Run the code above in your browser using DataLab