Dear Gordon and List,
   
  Could you, please recommend the simplest/quickest way to create MAplots using the plotMA function if the data supplied to lmFit is “matrix”?
  In the last versions of limma you removed the calculation of Amean and therefore, plotMA doesn’t work directly on fit objects.
  My Data.txt file is an expression matrix with 30 samples, the first columns represent gene IDs (31 columns in total).
  The code that I use is below.
   
  With kind regards,
  Lev.
   
  > s<-scan("Data.txt",what='character')
  Read 387593 items
  > sm<-matrix(s,byrow=TRUE,ncol=31)
  > rownames(sm)<-sm[,1]
  > sm<-sm[,2:ncol(sm)]
  > snn<-apply(sm,2,as.numeric)
  > rownames(snn)<-rownames(sm)
  > 
  > signals<-snn
  > 
  > temp<-normalizeBetweenArrays(log2(signals), method="quantile")
  > 
  > design <- model.matrix(~0 +factor(c(3,2,4,5,1,4,3,6,6,1,2,1,3,5,4,2,5,6,3,4,5,6,1,2,3,4,5,6,1,2)))
  > 
  > colnames(design) <- c("Untreated","L1","L2","L1A","L2A","A")
  > contrast.matrix <- makeContrasts(L1-Untreated, L2-Untreated, L1A-Untreated, L2A-Untreated, A-Untreated, levels=design)
  > 
  > fit <- lmFit(temp, design)
  > fit2 <- contrasts.fit(fit, contrast.matrix)
  > fit2 <- eBayes(fit2)
  > plotMA(fit2, array=1)
  Error in xy.coords(x, y, xlabel, ylabel, log) : 
          'x' and 'y' lengths differ
  In addition: Warning messages:
  1: is.na() applied to non-(list or vector) in: is.na(x) 
  2: no non-missing arguments to min; returning Inf 
  3: no non-missing arguments to max; returning –Inf
   
   
  > sessionInfo()
  R version 2.4.1 (2006-12-18) 
  i386-pc-mingw32 
   
  locale:
  LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252
   
  attached base packages:
  [1] "tools"     "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
   
  other attached packages:
       vsn  Biobase    limma 
  "1.12.0" "1.12.2"  "2.9.8"


 		
---------------------------------

	[[alternative HTML version deleted]]

