########################################################################### # Sandrine Dudoit # # Demo script for marrayInput package -- Data input for cDNA microarrays # # mysource("marrayInput.demo.R", echo=TRUE, ask=TRUE) ########################################################################### # Load all the marray packages library(marrayPlots) # Load the swirl dataset data(swirl) # Description of swirl dataset ? swirl ########################################################################### # Main input functions datadir <- system.file("data", package="marrayInput") dir(datadir) ######################### # read.marrayLayout swirl.layout <- read.marrayLayout(fname=file.path(datadir, "fish.gal"), ngr=4, ngc=4, nsr=22, nsc=24, skip=21,ctl.col=4) ctl<-rep("Control",maNspots(swirl.layout)) ctl[maControls(swirl.layout)!="control"]<-"N" maControls(swirl.layout)<-factor(ctl) ######################### # read.marrayInfo swirl.samples <- read.marrayInfo(file.path(datadir, "SwirlSample.txt")) swirl.gnames <- read.marrayInfo(file.path(datadir, "fish.gal"), info.id=4:5, labels=5, skip=21) ######################### # read.marrayRaw names <- dir(path=datadir,pattern=paste("*", "spot", sep="\.")) swirl.raw <- read.marrayRaw(fnames, path = datadir, name.Gf = "Gmean", name.Gb = "morphG", name.Rf = "Rmean", name.Rb = "morphR", layout = swirl.layout, gnames = swirl.gnames, targets = swirl.samples ) ########################################################################### # Widgets # widget.marrayRaw() ###########################################################################