[BioC] RG.MA in limma

Wang, Jixin jixinwang at tamu.edu
Mon Mar 9 19:38:06 CET 2009

Dear Peder,

Many thanks for the kind help. Is the cy3.channel.norm and cy5.channel.norm I want according to your code? I got error when I ran your code. I don’t understand the Cy3.norm and Cy5.norm object even after I check the ?apply and ?tapply. Thanks. 

> Cy3.norm <- apply(cy3.channel,2,function(v){tapply(v,names(v),function(x){median(x,na.rm=TRUE)})})
Error in as.vector(x, mode) : invalid 'mode' argument
> Cy5.norm <- apply(cy5.channel,2,function(v){tapply(v,names(v),function(x){median(x,na.rm=TRUE)})})
Error in as.vector(x, mode) : invalid 'mode' argument

Here is the modified code following yours

setwd("C:/Documents and Settings/JWang/Desktop/la") 
targets <- readTargets("norm vs dev.txt")
RG <- read.maimages(targets$FileName, source="genepix") 

RG = backgroundCorrect(RG, method="normexp", offset=50)

cy3.channel = RG$G
cy3.channel.norm =normalizeBetweenArrays(log2(cy3.channel),
cy5.channel = RG$R
cy5.channel.norm =normalizeBetweenArrays(log2(cy5.channel),

MA = normalizeWithinArrays(RG, method="printtiploess")
log.ratio <- MA$M

write.table(cy3.channel.norm, file="cy3.channel.norm.txt")
write.table(cy5.channel.norm, file="cy5.channel.norm.txt")

Best Regards,

----- Original Message -----
From: "Peder Worning" <pwo at exiqon.com>
To: "Jixin Wang" <jixinwang at tamu.edu>, bioconductor at stat.math.ethz.ch
Sent: Monday, March 9, 2009 3:06:03 AM GMT -06:00 US/Canada Central
Subject: RE: [BioC] RG.MA in limma

Dear Jixin Wang,

I use limma to normalize both one channel data normalizeBetweenArrays()
and two channel data normalizeWithinArrays() 

I'll paste some code below to show what I do starting with the RG
object. I am working with microRNA data and Exiqon arrays and you should
find the parameters, that fit your experiment. You should also check,
which channel is Cy3 and which is Cy5. My Cy3 is counter intuitively
called RG$R. The Cy3.norm and Cy5.norm should be what you are asking

I hope it can help you.



rownames(RG) <- RG$genes[,6] #I use that to sum over spot replicates
RGb = backgroundCorrect(RG, method="normexp", offset=50)

cy3.channel = RGb$R
cy3.channel.norm =normalizeBetweenArrays(log2(cy3.channel),
#this is the Logscaled Cy3 data with four spots per probe 

cy5.channel = RGb$G
cy5.channel.norm =normalizeBetweenArrays(log2(cy5.channel),
#this is the Logscaled Cy5 data with four spots per probe

MA = normalizeWithinArrays(RGb, method="loess", weights=RGb$weights)
log.ratio <- MA$M # this is the Ratio data with four spots per probe

#The median of the replicate probes:

Cy3.norm <-

Cy5.norm <-

LogRatio <-

Best regards 

Exiqon A/S

 Peder Worning, Ph.D.

Senior Scientist, Biomarker Discovery

-----Original Message-----
From: bioconductor-bounces at stat.math.ethz.ch
[mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Wang, Jixin
Sent: Monday, March 09, 2009 6:58 AM
To: bioconductor at stat.math.ethz.ch
Subject: [BioC] RG.MA in limma

Dear All,
I have one question that has perplexed me for a while. I use two color
arrays and I want to get the normalized log2 intensity values instead of
M values in MA$M (say, I have four arrays and I want to get eight
channels (red and green) of normalized expression data. How can I get
them?  I have checked the RG.MA function in R and have confused about
this problem. I always got error messages whenever I try. Any help will
be greatly appreciated!

In R help for package limma, it said 
MA.RG converts an unlogged RGList object into an MAList object.
MA.RG(object) is equivalent to
RG.MA(object) converts back from an MAList object to a RGList object
with unlogged intensities.

>  RG.MA$R <- 2^(MA$A + MA$M/2)
Error in RG.MA$R <- 2^(MA$A + MA$M/2) : 
  object of type 'closure' is not subsettable
> RG.MA$G <- 2^(MA$A - MA$M/2)
Error in RG.MA$G <- 2^(MA$A - MA$M/2) : 
  object of type 'closure' is not subsettable

R version 2.8.1 (2008-12-22) 
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] limma_2.16.4

Best Regards,


Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
Search the archives:

More information about the Bioconductor mailing list