[BioC] doing some math on an array of PM probes

James W. MacDonald jmacdon at med.umich.edu
Wed Jan 5 18:55:24 CET 2005


Stuart Brown wrote:
> 
> I would like to normalize probe signals per gene on a single Affy array 
> by dividing
> each pm probe by the mean of all pm probes on that array. Never mind 
> that this is a
> stupid thing to do, I have an idea...
> 
> The command  pm(affybatch)
> gives a single probe value in each row and adds a numerical suffix to 
> the gene name so
> that each probe has a unique gene name.
> 
> Instead,  I'd like to extract the pm probes into a matrix that has a 
> single Affy gene name for a row header and the signal values for all of 
> the pm probes for that gene in the following columns of that row. Some 
> genes will have different numbers of columns since they have different 
> numbers of
> pm probes. [If I could just get a table in this shape, I could actually 
> do all the rest of the work
> in Excel.]

You will have a hard time making a matrix in R that has different column 
lengths (recycling rules will make the matrix rectangular). You will be 
much better off using a list and the lapply() function.

mn <- mean(pm(abatch)) ## where abatch is the name of your AffyBatch
norm.pm <- lapply(pm(abatch, LISTRUE=TRUE), function(x) x / mn)

This will give you a list of all PM probes normalized by the overall mean.

HTH,

Jim

> 
> Then I'd like to take the mean of all the probe signal values for each 
> gene and write that into a new array that has just 2 rows - genename 
> (which serves as the index) and mean-pm for that gene.
> 
> Finally, I'd like to replace the values of each pm probe signal with the 
> ratio of that probe signal divided by  the mean of all pm probes for 
> that gene.
> 
> There must be an easy way to do this, but I'm new to Bioconductor.
> 
> Thanks for any and all helpful suggestions
> -Stuart Brown
> 
> 


-- 
James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109



More information about the Bioconductor mailing list