###################################################
### chunk number 1: loadlibs
###################################################
#line 28 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"
library("Biobase")
library("limma")
library("CCl4")


###################################################
### chunk number 2: datapath
###################################################
#line 42 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"
datapath = system.file("extdata", package="CCl4")


###################################################
### chunk number 3: RGList
###################################################
#line 46 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"
p = read.AnnotatedDataFrame("samplesInfo.txt", path=datapath)

CCl4_RGList = read.maimages(files=sampleNames(p), 
   path = datapath, 
   source = "genepix", 
   columns = list(R = "F635 Median", Rb = "B635 Median", 
                  G = "F532 Median", Gb = "B532 Median"))


###################################################
### chunk number 4: outdir
###################################################
#line 62 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"
outdir = file.path("..", "..", "data")
if(!isTRUE(file.info(outdir)$isdir))
  outdir = tempdir()

save(CCl4_RGList, file = file.path(outdir, "CCl4_RGList.RData"))


###################################################
### chunk number 5: tempdir
###################################################
#line 74 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"
outdir


###################################################
### chunk number 6: CCl4-NChannelSet
###################################################
#line 83 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"

featureData = new("AnnotatedDataFrame", data = CCl4_RGList$genes)

assayData = with(CCl4_RGList, assayDataNew(R=R, G=G, Rb=Rb, Gb=Gb))

varMetadata(p)$channel=factor(c("G", "R", "G", "R"), 
                    levels=c(ls(assayData), "_ALL_"))

CCl4 <- new("NChannelSet",
              assayData = assayData,
              featureData = featureData,
              phenoData = p)
save(CCl4, file = file.path(outdir, "CCl4.RData"))


###################################################
### chunk number 7: sessionInfo
###################################################
#line 104 "D:/biocbld/bbs-2.8-data-experiment/tmpdir/RtmpVBRszb/R.INSTALL26aa3106/CCl4/inst/doc/CCl4.Rnw"
sessionInfo()


