[BioC] MGU74A and MGU74Av2

Laurent Gautier laurent at cbs.dtu.dk
Mon Jun 23 05:16:48 MEST 2003


On Mon, Jun 23, 2003 at 10:17:37AM +1000, Matthew Hobbs wrote:
> Thanks to everyone for the helpful responses.
> 
> On Sat, 21 Jun 2003 06:10 am, Ben Bolstad wrote:
> > You have several options.
> 
> I will probably look into both.
> 
> > 1. treat the MGU74a  and MGU74av2 seperately, then try to figure out a
> > way to combine them.
> > 2. Look at only the common probesets but in this case you will be
> > thowing away about 2500-3000 probesets (out of about 12600 total
> > probesets)
> >
> > Option 1 is doable right now.
> 
> OK then - I'd really appreciate some guidance with option 1.  (I am still 
> fairly new to BioConductor and a pretty wobbly user of R.)

here it goes:

abatch.74a and abatch.74av2 being your AffyBatches, you merge them in
one AffyBatch to do normalization, then split this AffyBatch in two again
(this will work because the chips are of the same size and because
most of the probes are in common).
(hint: check split.AffyBatch and merge.AffyBatch in the doc)

then something like:
eset.47a <- computeExprSet(abatch.74a, <insert your favorite methods here>)

...leaving you with eset.74a and eset.74av2

Now thre is only to merge the two in one "exprSet".
Here is a rough (non-tested) function to do it:

merge.exprSet <- function(x, y) {
  g.x <- geneNames(x)
  g.y <- geneNames(y)
  g.xy <- unique(c(g.x, g.y))

  nc.x <- ncol(exprs(x))
  nc.y <- ncol(exprs(y))

  if (nc.x != nc.y)
    stop("For now only merging data in an identical set of experiements  is allowed ! ")

  m <- matrix(as.numeric(NA), length(g.xy), nc.x)

  m.xy <- match(g.xy, g.x)
  m[!is.na(m.xy), ] <- exprs(x)[m.xy, ]
  
  m.xy <- match(g.xy, g.y)
  m[!is.na(m.xy), ] <- exprs(x)[m.xy, ]
  
  eset <- new("exprSet", exprs=matrix(0, 0, nc.x),
              phenoData=x at phenoData)


  eset at exprs <- m

  return(eset)
  
}




hopin' it helps,



L.



> 
> >> I will have an approach for option 2 in a couple of hours (a local
> > colleague has been bothering me about this for awhile).
> 
> And I look forward to seeing this too!
> 
> Thanks.
> -- 
> ----------------------------------------------------------------------
> Matthew Hobbs
> 
> Garvan Institute of Medical Research
> 384 Victoria St            Ph   : (02) 9295 8327
> Darlinghurst                
> http://www.garvan.org.au        email:  m.hobbs at garvan.org.au
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor

-- 
--------------------------------------------------------------
currently at the National Yang-Ming University in Taipei, Taiwan
--------------------------------------------------------------
Laurent Gautier			CBS, Building 208, DTU
PhD. Student			DK-2800 Lyngby,Denmark	
tel: +45 45 25 24 89		http://www.cbs.dtu.dk/laurent



More information about the Bioconductor mailing list