[BioC] Finding Out the Fold Changes

Robert Gentleman rgentlem at jimmy.harvard.edu
Mon Oct 27 20:19:05 MET 2003


On Mon, Oct 27, 2003 at 02:14:22PM -0500, James MacDonald wrote:
> >From your email, it looks to me like you are trying to work through the
> vignette for genefilter. If so, then wh2 in this case is a vector of
> TRUEs and FALSEs, depending on the filter you applied to your data. If
> you want the list of genes that pass the filter, you are going to have
> to do something like:
> 
> goodgenes <- exprs(eset)[wh2,] # this will extract rows of your data
> matrix where wh2 = TRUE
> 

 well, why not just
  
  goodgenes <- eset[wh2,]

  and then you do have an exprSet?



> Then to output to a file, you cannot use write.exprs, because you no
> longer have an exprSet, but a matrix. In this case you have to use
> write.table:
> 
> write.table(goodgenes, file="My list of good genes.txt", sep="\t", etc
> etc)
> 
> AFAIK, there is no listing of methods for all packages, but those
> packages that use S4 methods usually have a listing of accessor
> functions for the objects in the package (e.g., for exprSets,
> AffyBatches, etc). Your best bet is to read all of the help files and
> vignettes for the packages you are working with. It takes time, but
> familiarity with 'how R works' only comes through time and effort.

 Documentation of classes and methods shows up in the same place as
 for other functions. Using help.start() will open things in a local
 browser. The bad thing, is of course that much of the documentation
 for these packages (Biobase, genefilter, annotate) was written before
 the current set of tools for writing documentation were, so they miss
 the boat in some places. We'll be working on that for the next
 release.

  Robert


> 
> HTH,
> 
> Jim
> 
> 
> 
> James W. MacDonald
> Affymetrix and cDNA Microarray Core
> University of Michigan Cancer Center
> 1500 E. Medical Center Drive
> 7410 CCGC
> Ann Arbor MI 48109
> 734-647-5623
> 
> >>> "Sachin Mathur" <smathur at kumc.edu> 10/27/03 01:28PM >>>
> Thanks for the reply.
> 
> RMA is a wonderful package, which allows the analysis in various ways.
> The difficuly i'm facing is trying to figure out what  methods apply
> to
> a particular package.
> 
>  For example, when using genefilter to find out differentially
> expressed genes, its difficult for me to output the entire list in a
> text or excel file. When I try to use "
> write.exprs(wh2,file="differ.txt")", it gives me an error saying that
> write.exprs is not applicable to Genefilter Package. Is there
> documentation which provides the methods and classes which a package
> provides? the vignettes seem to lack this information. 
> It would be very useful to have a comprehensive listing of packages
> with their methods.
> 
> thanks
> sachin.
> 
> 
> >>> "James MacDonald" <jmacdon at med.umich.edu> 10/27/03 08:57AM >>>
> The expression values from RMA are log2 transformed, so to calculate
> the
> log ratio you simply subtract one from the other.
> 
> log2(x) - log2(y) = log2(x/y)
> 
> Note here the the log ratio gives you the fold change directly. A log
> ratio of 1 = 2-fold up regulated and a log ratio of -1 = 2-fold down
> regulated (when comparing x vs y).
> 
> There is no command per se, you simply have to do it yourself. The
> expression values are held in a matrix in an exprSet and can be
> accessed
> using the exprs accessor. So if you wanted the log ratio of your first
> sample as compared to the second, you would do something like
> 
> LR <- exprs(eset)[,1] - exprs(eset)[,2] # where eset is the name of
> your exprSet
> 
> HTH,
> 
> Jim
> 
> 
> 
> James W. MacDonald
> Affymetrix and cDNA Microarray Core
> University of Michigan Cancer Center
> 1500 E. Medical Center Drive
> 7410 CCGC
> Ann Arbor MI 48109
> 734-647-5623
> 
> >>> "Sachin Mathur" <smathur at kumc.edu> 10/26/03 05:37PM >>>
> 
> Hello,
> 
> I'm new to RMA. Can anyone tell me which command to use for finding
> out
> the fold changes for a given set of genes. 
> 
> thanks
> sachin.
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch 
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor 
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch 
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor

-- 
+---------------------------------------------------------------------------+
| Robert Gentleman                 phone : (617) 632-5250                   |
| Associate Professor              fax:   (617)  632-2444                   |
| Department of Biostatistics      office: M1B20                            |
| Harvard School of Public Health  email: rgentlem at jimmy.harvard.edu        |
+---------------------------------------------------------------------------+



More information about the Bioconductor mailing list