ExploreSwirl.R

From Organic Design wiki

Code snipits and programs written in R, S or S-PLUS library(marray) library(limma)

bc.method <- "subtract" nbreaks <- 100

dataDir <- system.file("swirldata", package = "marray")

RG <- read.maimages(path=dataDir, source="spot", ext="spot")

  1. Right skew

plotDensities(RG, log=FALSE)

MA <- MA.RG(RG)

  1. [[[[1]]]] not centred

hist(rowMeans(MA$M), breaks=nbreaks) hist(rowMeans(MA$A), breaks=nbreaks) for(i in seq(ncol(RG))) {

 plotMA(RG, array=i)

}

MA <- normalizeWithinArrays(RG, method="loess", bc.method = bc.method)

for(i in seq(ncol(RG))) {

 plotMA(MA, array=i)
 Sys.sleep(0.5)

}

  1. CLT: After normalization the distribution is centred around 0 (right long tail)

hist(rowMeans(MA$M), breaks=nbreaks) hist(2^rowMeans(MA$M), breaks=nbreaks)

  1. Abundance apears to be a slight mixture (hump more prevelant with background subtraction)
  2. Mixture could be of exponential and low expressing distribution on raw scale

hist(rowMeans(MA$A), breaks=nbreaks)

  1. Abundance, observed exponential like decay on raw scale

hist(2^rowMeans(MA$A), breaks=nbreaks) qqplot(rexp(10000,1/6000), 2^rowMeans(MA$A)) abline(0,1)