Extracting top upregulated genes from Limma analysis
3
0
Entering edit mode
Casper Shyr ▴ 140
@casper-shyr-4113
Last seen 10.3 years ago
Hello, I have my results after running a microarray analysis. In general, the analysis is basically comparing gene expressions in 1 tumor group to another. Below are my relevant codes: mm2 <- model.matrix(~TumorType, pData(eset2)) fit2 <- lmFit(eset2, mm2) fit2 <- eBayes(fit2) Now I want to extract the top 50 up-regulated genes, but I am not sure how to do so. I know with toptable function, I can extract the top differentially expressed genes, but what if I only want the up- regulated ones? Thanks in advance! Sincerely, Casper [[alternative HTML version deleted]]
Microarray Microarray • 4.5k views
ADD COMMENT
1
Entering edit mode
@iain-gallagher-2532
Last seen 9.4 years ago
United Kingdom
tops <- topTable(fit2, number=Inf) # get all genes tops[which(tops$logFC > 0), ] [1:50,] # up reg top 50 tops[which(top$logFC < 0), ] [1:50,] # down reg top 50 best i --- On Wed, 2/3/11, Casper Shyr <casshyr at="" hotmail.com=""> wrote: tops <- topTable(fit2, number=Inf) > From: Casper Shyr <casshyr at="" hotmail.com=""> > Subject: [BioC] Extracting top upregulated genes from Limma analysis > To: bioconductor at r-project.org > Date: Wednesday, 2 March, 2011, 5:41 > > Hello, > ? I have my results after running a microarray > analysis. In general, the analysis is basically comparing > gene expressions in 1 tumor group to another. > ? Below are my relevant codes: > > mm2 <- model.matrix(~TumorType, pData(eset2)) > fit2 <- lmFit(eset2, mm2) > fit2 <- eBayes(fit2) > > ? Now I want to extract the top 50 up-regulated genes, > but I am not sure how to do so. I know with toptable > function, I can extract the top differentially expressed > genes, but what if I only want the up-regulated ones? > > Thanks in advance! > Sincerely, > Casper > ??? > ???????? > ?????? ??? > ? > ??? [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Wed, Mar 2, 2011 at 12:41 AM, Casper Shyr <casshyr@hotmail.com> wrote: > > Hello, > I have my results after running a microarray analysis. In general, the > analysis is basically comparing gene expressions in 1 tumor group to > another. > Below are my relevant codes: > > mm2 <- model.matrix(~TumorType, pData(eset2)) > fit2 <- lmFit(eset2, mm2) > fit2 <- eBayes(fit2) > > Now I want to extract the top 50 up-regulated genes, but I am not sure how > to do so. I know with toptable function, I can extract the top > differentially expressed genes, but what if I only want the up- regulated > ones? > > Hi, Casper. Take a look at the sort.by argument to topTable. Sean [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Noah Dowell ▴ 410
@noah-dowell-3791
Last seen 10.3 years ago
Hello Casper, This is from memory so double check it but the following should work: results <- decideTests(fit2, method="global") up <- which(results[,1] == 1) upGenes <- fit2[up, ] upTable <- topTable(upGenes[,4], number = 50, adjust.method= "BH", sort.by="p") The decideTests function assigns "upregulated" (actually DE genes in a positive direction) genes as "1" and "-1" for "downregulated" genes. HTH, noah On Mar 1, 2011, at 9:41 PM, Casper Shyr wrote: > > Hello, > I have my results after running a microarray analysis. In general, the analysis is basically comparing gene expressions in 1 tumor group to another. > Below are my relevant codes: > > mm2 <- model.matrix(~TumorType, pData(eset2)) > fit2 <- lmFit(eset2, mm2) > fit2 <- eBayes(fit2) > > Now I want to extract the top 50 up-regulated genes, but I am not sure how to do so. I know with toptable function, I can extract the top differentially expressed genes, but what if I only want the up- regulated ones? > > Thanks in advance! > Sincerely, > Casper > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 567 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