Hi Henrik,

Thanks a lot for the help! It works perfectly.

Sean

On Mon, Jun 11, 2012 at 10:29 PM, Henrik Bengtsson <[email protected]>wrote:

> Hi.
>
> Yes, to extract all cell (=probe) intensities from all arrays in an
> AffymetrixCelSet ('csN'), you can do:
>
> Y <- extractMatrix(csN, drop=FALSE)
>
> Typically an Affymetrix array contains several million probes, so this
> will be a rather big matrix, especially if you have many arrays.
>
> More comments below...
>
> On Mon, Jun 11, 2012 at 1:50 PM, sean nj <[email protected]> wrote:
> > Hi guys,
> >
> > I have a weird situation that I need to retrieve probe level intensity
> (not
> > the probeset/gene level) from U133Plus2 expression array data. I did RBC
> and
> > qn first.
> >
> >> library(aroma.affymetrix)
> >> verbose <- Arguments$getVerbose(-8, timestamp=TRUE)
> >> chipType <- "HG-U133_Plus_2,Binary,Hs_ENTREZG"
> >> cdf <- AffymetrixCdfFile$byChipType(chipType)
> >> cs <- AffymetrixCelSet$byName("Genesis_Lung", cdf=cdf)
> >> bc <- RmaBackgroundCorrection(cs)
> >> csBC <- process(bc,verbose=verbose)
> >> qn <- QuantileNormalization(csBC, typesToUpdate="pm")
> >> csN <- process(qn, verbose=verbose)
> >> print(csN)
> > .....
> >
> > At first, I tried to save the data into a table, but had no success.
> >
> >> data <- readUnits(csN)
>
> This returns a special list/tree that reflects the structure of the
> CDF associated with the 'csN' object.
>
> >> write.table(data,"myfile.txt",sep="\t")
>
> Here you're trying to use write.table() to write that tree structure
> to file; it does not work/does not make sense, because write.table()
> writes tabular text files.
>
> > Error in data.frame(`AFFX-BioB-5_at` = list(`AFFX-BioB-5_at` =
> > list(intensities = c(6.21948575973511,  :
> >   arguments imply differing number of rows: 40, 22, 138, 16, 38, 108, 28,
> > 42, 36, 44, 18, 64, 20, 60, 14, 32, 34, 24, 10, 8, 12, 48, 6, 46, 128,
> 106,
> > 54, 26, 52, 88, 56, 62, 82, 66, 70, 74, 76, 58, 86, 30, 78, 80, 96, 102,
> 84,
> > 142, 50, 100, 116, 110, 68, 146, 120, 90, 98, 92, 148, 134, 122, 118, 72,
> > 144, 126, 104, 150, 124, 162, 136, 130, 114, 94, 112, 132, 216, 154, 140,
> > 168, 172, 152, 160, 170, 182, 178, 166, 180, 198
> >>
> >
> > Then, I tried some method metioned in thread regarding exon array
> > (
> http://groups.google.com/group/aroma-affymetrix/browse_thread/thread/40e3950e52d73c1f
> )
> >
> >> cell <- 9049      # 9049 is the unit number corresponding to the
> probeset
> >> 3799_at in custom CDF
> >> Y <- extractMatrix(csN, cells=cells, field=c("intensities", "stdvs",
> >> "pixels"), drop=FALSE, verbose=verbose)
> > Error in extractMatrix.AffymetrixCelSet(csN, cells = cells, field =
> > c("intensities",  :
> >   object 'cells' not found
>
> Note that you ask extractMatrix() to use the value of object 'cells'
> and assign it to the argument named 'cells'.  The error is simple; it
> says that you do not have an object 'cells'.  You do have one named
> 'cell', though.
>
> Regardless, you're are interesting in the probeset named '3799_at'.
> (To be picky, a probe set is formally called *unit group*, because
> each CDF *unit* can contain multiple *groups*. However, assuming that
> each unit of your CDF only got one group, we can say that the probeset
> corresponds to one unit.)  This corresponds to index 9049, which I
> assume you inferred by:
>
> cdf <- getCdf(csN);
> unit <- indexOf(cdf, names="3799_at");
>
> Note that a *unit* is not a *cell*.  A *cell* is a single probe.  A
> unit contains unit groups, which in turn contains cells.  So, if
> you're interested in the cells (=probes) of a single unit, you need to
> do something like:
>
> > cells <- getCellIndices(cdf, unit=4024, unlist=TRUE);
> > str(cells)
>  Named int [1:22] 250694 251858 25400 26564 1273099 1274263 406504 407668
> 124536
> 1 1246525 ...
>  - attr(*, "names")= chr [1:22] "204435_at.groups.204435_at.indices1"
> "204435_at
> .groups.204435_at.indices2" "204435_at.groups.204435_at.indices3"
> "204435_at.gro
> ups.204435_at.indices4" ...
>
> and then
>
> Y <- extractMatrix(csN, cells=cells, drop=FALSE);
>
> For your information, the following illustrates the CDF unit group
> cell structure:
>
> > cells <- getCellIndices(cdf, unit=4024);
> > str(cells);
> List of 1
>  $ 204435_at:List of 1
>  ..$ groups:List of 1
>  .. ..$ 204435_at:List of 1
>  .. .. ..$ indices: int [1:22] 250694 251858 25400 26564 1273099 1274263
> 406504
>  407668 1245361 1246525 ...
>
> I recommend you to play around with the 'affxparser' package to learn
> more about the CDF structure.
>
> Hope this helps
>
> /Henrik
>
> > At last, I repeated the above without "cells=cells" and it seemed working
> > with no error message. But I am not sure if this is the right result or
> not.
> >> Y <- extractMatrix(csN, field=c("intensities", "stdvs", "pixels"),
> >> drop=FALSE, verbose=verbose)
> >
> > Any suggestion?
> >
> > Thanks a lot for the help!
> >
> > Sean
> >
> > --
> > When reporting problems on aroma.affymetrix, make sure 1) to run the
> latest
> > version of the package, 2) to report the output of sessionInfo() and
> > traceback(), and 3) to post a complete code example.
> >
> >
> > You received this message because you are subscribed to the Google Groups
> > "aroma.affymetrix" group with website http://www.aroma-project.org/.
> > To post to this group, send email to [email protected]
> > To unsubscribe and other options, go to
> http://www.aroma-project.org/forum/
>
> --
> When reporting problems on aroma.affymetrix, make sure 1) to run the
> latest version of the package, 2) to report the output of sessionInfo() and
> traceback(), and 3) to post a complete code example.
>
>
> You received this message because you are subscribed to the Google Groups
> "aroma.affymetrix" group with website http://www.aroma-project.org/.
> To post to this group, send email to [email protected]
> To unsubscribe and other options, go to
> http://www.aroma-project.org/forum/
>

-- 
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group with website http://www.aroma-project.org/.
To post to this group, send email to [email protected]
To unsubscribe and other options, go to http://www.aroma-project.org/forum/

Reply via email to