Finding Out the Fold Changes
5
0
Entering edit mode
@sachin-mathur-494
Last seen 10.2 years ago
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.
• 3.7k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States
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@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@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
@sachin-mathur-494
Last seen 10.2 years ago
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@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@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@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States
>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 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. 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@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@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@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@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
rgentleman ★ 5.5k
@rgentleman-7725
Last seen 9.6 years ago
United States
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@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@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@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@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor@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@jimmy.harvard.edu | +--------------------------------------------------------------------- ------+
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States
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 >>> Robert Gentleman <rgentlem@jimmy.harvard.edu> 10/27/03 02:19PM >>> well, why not just goodgenes <- eset[wh2,] and then you do have an exprSet? > It takes time, but > familiarity with 'how R works' only comes through time and effort. I forgot to add that you can learn even more by posting 'close, but no banana' answers on the BioC listserv. ;-D Thanks for the pointer! Jim
ADD COMMENT

Login before adding your answer.

Traffic: 983 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6