[BioC] From eSet to AffyBatch Object

Boris Umylny umylny at apbri.org
Tue Mar 10 04:30:20 CET 2009


Martin,

Let me apologize in advance if I made a silly mistake - my programming skills 
are fairly limited.

I've attached two files to this e-mail.  R.in contains the R script and R.out 
is the screen capture of the output produced by the script.  R command was 
invoked with "--vanilla".

Both files are in Linux text forma.  I am using SUSE Linix 10.3.


Sincerely,


Boris Umylny


On Friday 06 March 2009 11:47:34 pm Martin Morgan wrote:
> Hi Boris --
>
> Boris Umylny <umylny at apbri.org> writes:
> > Thank you very much for your help!
> >
> > I wound up using Martin's suggestion for density and boxplots.  As Jenny
> > pointed out it does not make much sense to run image on an ExpressionSet.
> > However, that does require users to utilize AffyRead even if they are
> > processing their data with just.rma.  However, thats not a major obtacle.
> >
> > I did find a strange error with just.rma when reading gzipped CEL files
> > from GSE10641 (samples GSM268225, GSM268224, GSM268223, GSM268222,
> > GSM268221, GSM268214, GSM268213, GSM268212, GSM268211, GSM268210,
> > GSM268209, GSM268226, GSM268233, GSM268234, GSM268235, GSM268236,
> > GSM268237, GSM268238) with normalize=FALSE:
> >
> > Error in dimnames(x) <- dn : 'dimnames' applied to non-array
> >
> > and ExpressionSet was not created.
> >
> > When I used AffyRead and rma (with normalize=FALSE), it worked fine.
>
> Unfortunately, I don't see this problem when I try with R 2.8.0 or
> R-devel. To track it down further it would really help to see the
> output of sessionInfo() (after following the instructions to update
> packages at http://bioconductor.org/docs/install/ and confirming that
> the error still occurs) and the precise command that you used. Here's
> mine...
>
> > setwd("~/tmp/GEO")
> > f <- c("GSM268225", "GSM268224", "GSM268223", "GSM268222", "GSM268221",
> > "GSM268214", "GSM268213", "GSM268212", "GSM268211", "GSM268210",
> > "GSM268209", "GSM268226", "GSM268233", "GSM268234", "GSM268235",
> > "GSM268236", "GSM268237", "GSM268238") f <- paste(f, ".CEL.gz", sep="")
> > all(f %in% list.files())
>
> [1] TRUE
>
> > res <- justRMA(filenames=f, normalize=FALSE)
> > sessionInfo()
>
> R version 2.8.0 Patched (2008-11-10 r46882)
> x86_64-unknown-linux-gnu
>
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-
>8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_AD
>DRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] tools     stats     graphics  utils     datasets
> grDevices methods
> [8] base
>
> other attached packages:
> [1] rat2302cdf_2.3.0 affy_1.20.2      Biobase_2.2.2
>
> loaded via a namespace (and not attached):
> [1] affyio_1.10.1        preprocessCore_1.4.0
>
> Martin
>
> > I am using R 2.8.1, Bioconductor 2.3 and including:
> >
> > library(affy)
> > library(geneplotter)
> > library(lattice)
> > library(Biobase)
> >
> >
> > Thank you again for your help!
> >
> >
> > Sincerely,
> >
> >
> > Boris Umylny
> >
> > On Tuesday 03 March 2009 02:48:13 pm Martin Morgan wrote:
> >> Hi Boris --
> >>
> >> Boris Umylny <umylny at apbri.org> writes:
> >> > Hi,
> >> >
> >> > I am working with affy library from Bioconductor 2.3.
> >> >
> >> > The library contains functions (hist, image and boxplot) that work
> >> > directly on AffyBatch object, but apparently not on ExpressionSet/eSet
> >> > object.  After I use rma, expresso or mas5 to do background correction
> >> > and normalization I get an eSet object, which appears to be
> >> > incompatible with these functions.  If I call hist(exprs(e)), where e
> >> > is an ExpressionSet object, I get a plot of the first array only.
> >> >
> >> > Is there a Bioconductor library (other than geneplotter which
> >> > apparently does not) that provides these functions on
> >> > eSet/ExpressionSet object?
> >>
> >> Others will probably point to specific packages implementing plotting
> >> methods for expression data, but I find myself doing things more
> >> directly, typically using the lattice package
> >>
> >>   library(lattice)
> >>   library(Biobase)
> >>   data(sample.ExpressionSet)
> >>   eset <- sample.ExpressionSet   # easier to type!
> >>   df <- data.frame(Expression=as.vector(exprs(eset)),
> >>                    Sample=sampleNames(eset)[col(eset)])
> >>   densityplot(~log2(Expression)|Sample, df, plot.points=FALSE)
> >>
> >> or
> >>
> >>   densityplot(~log2(Expression), group=Sample, df, plot.points=FALSE)
> >>
> >> > Is there a way to get an AffyBatch object from eSet object to make use
> >> > of these functions?
> >>
> >> An AffyBatch and an ExpressionSet are conceptually different ('raw'
> >> vs. preprocessed data) so trying to convert back and forth at will
> >> doesn't really make sense.
> >>
> >> Martin
> >>
> >> > Thank you in advance for your help.
> >> >
> >> >
> >> > Sincerely,
> >> >
> >> >
> >> > Boris Umylny
> >> >
> >> > _______________________________________________
> >> > Bioconductor mailing list
> >> > Bioconductor at stat.math.ethz.ch
> >> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> >> > Search the archives:
> >> > http://news.gmane.org/gmane.science.biology.informatics.conductor


-------------- next part --------------
library(affy)
library(geneplotter)
library(lattice)
library(Biobase)
e <- just.rma("/home/umylny/tmp/rat_cel/GSM268209.CEL.gz","/home/umylny/tmp/rat_cel/GSM268210.CEL.gz","/home/umylny/tmp/rat_cel/GSM268211.CEL.gz","/home/umylny/tmp/rat_cel/GSM268212.CEL.gz","/home/umylny/tmp/rat_cel/GSM268213.CEL.gz","/home/umylny/tmp/rat_cel/GSM268214.CEL.gz","/home/umylny/tmp/rat_cel/GSM268221.CEL.gz","/home/umylny/tmp/rat_cel/GSM268222.CEL.gz","/home/umylny/tmp/rat_cel/GSM268223.CEL.gz","/home/umylny/tmp/rat_cel/GSM268224.CEL.gz","/home/umylny/tmp/rat_cel/GSM268225.CEL.gz","/home/umylny/tmp/rat_cel/GSM268226.CEL.gz","/home/umylny/tmp/rat_cel/GSM268233.CEL.gz","/home/umylny/tmp/rat_cel/GSM268234.CEL.gz","/home/umylny/tmp/rat_cel/GSM268235.CEL.gz","/home/umylny/tmp/rat_cel/GSM268236.CEL.gz","/home/umylny/tmp/rat_cel/GSM268237.CEL.gz","/home/umylny/tmp/rat_cel/GSM268238.CEL.gz", normalize=FALSE)
sessionInfo()

-------------- next part --------------
WARNING: ignoring environment value of R_HOME

R version 2.8.1 (2008-12-22)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(affy)
Loading required package: Biobase
Loading required package: tools

Welcome to Bioconductor

  Vignettes contain introductory material. To view, type
  'openVignette()'. To cite Bioconductor, see
  'citation("Biobase")' and for packages 'citation(pkgname)'.

> library(geneplotter)
Loading required package: lattice
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: xtable
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
> library(lattice)
> library(Biobase)
> e <- just.rma("/home/umylny/tmp/rat_cel/GSM268209.CEL.gz","/home/umylny/tmp/rat_cel/GSM268210.CEL.gz","/home/umylny/tmp/rat_cel/GSM268211.CEL.gz","/home/umylny/tmp/rat_cel/GSM268212.CEL.gz","/home/umylny/tmp/rat_cel/GSM268213.CEL.gz","/home/umylny/tmp/rat_cel/GSM268214.CEL.gz","/home/umylny/tmp/rat_cel/GSM268221.CEL.gz","/home/umylny/tmp/rat_cel/GSM268222.CEL.gz","/home/umylny/tmp/rat_cel/GSM268223.CEL.gz","/home/umylny/tmp/rat_cel/GSM268224.CEL.gz","/home/umylny/tmp/rat_cel/GSM268225.CEL.gz","/home/umylny/tmp/rat_cel/GSM268226.CEL.gz","/home/umylny/tmp/rat_cel/GSM268233.CEL.gz","/home/umylny/tmp/rat_cel/GSM268234.CEL.gz","/home/umylny/tmp/rat_cel/GSM268235.CEL.gz","/home/umylny/tmp/rat_cel/GSM268236.CEL.gz","/home/umylny/tmp/rat_cel/GSM268237.CEL.gz","/home/umylny/tmp/rat_cel/GSM268238.CEL.gz", normalize=FALSE)
Error in dimnames(x) <- dn : 'dimnames' applied to non-array
In addition: Warning message:
In just.rma("/home/umylny/tmp/rat_cel/GSM268209.CEL.gz", "/home/umylny/tmp/rat_cel/GSM268210.CEL.gz",  :
  Incompatible phenoData object. Created a new one.

> sessionInfo()
R version 2.8.1 (2008-12-22)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] tools     stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] rat2302cdf_2.3.0    geneplotter_1.20.0  annotate_1.20.1
[4] xtable_1.5-4        AnnotationDbi_1.4.3 lattice_0.17-17
[7] affy_1.20.2         Biobase_2.2.2

loaded via a namespace (and not attached):
[1] affyio_1.10.1        DBI_0.2-4            grid_2.8.1
[4] KernSmooth_2.22-22   preprocessCore_1.4.0 RColorBrewer_1.0-2
[7] RSQLite_0.7-1
>                                                     


More information about the Bioconductor mailing list