question_gene list from venn diagram limma function for two color array data
2
0
Entering edit mode
lee ▴ 40
@lee-1915
Last seen 9.7 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20061031/ 0d7840b6/attachment.pl
• 1.2k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 4 days ago
United States
Hi Seungmin, lee wrote: > Hello, > I am using my two color array data. I want to know the genes that are significantly Up or Down in both "HFEvsWT" and "SlavsWT" groups from Venn diagram results. I also want to know the genes that are only significantly Up or Down in one group. When I tried using the gene list from topTable function, I got different number of genes compared to Venn Diagram results. Thus, I want to know what are the genes after Venndiagram analysis. > Could you help me? Thank you so much. > > Sincerely, Seungmin Lee > > > > > library(limma) > targets<-readTargets("Target4wkEnteroHFESla.txt") > f<-function(x) as.numeric(x$Flags>-99) > files<-targets[,c("FileName")] > RG<-read.maimages(files,columns=list(R="F635 Mean",G="F532 Mean",Rb="B635 Median",Gb="F532 Median"),annotation=c("Block","Row","C olumn","ID","Accession","Symbol")) > plotMA(RG) > RG$genes<-readGAL("meebo.gal") > RG$printer<-getLayout(RG$genes) > MA.p<-normalizeWithinArrays(RG,method="loess") > MA.pAq<-normalizeBetweenArrays(MA.p,method="Aquantile") > design<-modelMatrix(targets,ref="WT.C57.chow") > design > contrast.matrix<-cbind("HFEvsWT"=c(1,0),"SlavsWT"=c(0,1)) > rownames(contrast.matrix)<-colnames(design) > contrast.matrix > fit<-lmFit(MA.pAq,design) > fit2<-contrasts.fit(fit,contrast.matrix) > fit2<-eBayes(fit2) > topTable(fit2,coef="HFEvsWT",adjust="BH") > plotMA(fit2,array=1) > topTable(fit2,coef="SlavsWT",adjust="BH") > plotMA(fit2,array=2) > results<-classifyTestsF(fit2, p.value=0.01) > summary(results) > table("HFEvsWT"=results[,1],"SlavsWT"=results[,2]) > vennDiagram(results,include="up") > vennDiagram(results,include="down") The affycoretools package is designed for analysis of one-color chips, but you could use a utility function from that package to do what you want. library(affycoretools) ups <- affycoretools:::makeIndices(results, "up") downs <- affycoretools:::makeIndices(results, "down") up.genes <- lapply(ups, function(x) row.names(results)[x]) down.genes <- lapply(downs, function(x) row.names(results)[x]) Now you will have two lists each containing the gene names corresponding to the left, right, and intersection of your Venn diagrams. You could also use the 'ups' and 'downs' lists to extract information from your fit2 object such as t-statistics or p-values, etc. HTH, Jim > > > -------------------------------------------------------------------- --- > Seung-Min Lee > > graduate student > 244 Morgan Hall > Molecular&Biochemical Nutrition > University of California at Berkeley > 94720-3104 > lab phone (510)643-2351 > lab fax(510)642-0535 > > > --------------------------------- > > [[alternative HTML version deleted]] > > _______________________________________________ > 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 -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT
0
Entering edit mode
Francois Pepin ★ 1.3k
@francois-pepin-1012
Last seen 9.7 years ago
Hi Seung-Min, The differences come from the classifyTestsF. It classifies the genes based on the F statistics, rather than the B-values which topTable uses. Another way to get the information about the up genes both contrast (Jim's way should work too): fit$genes[which(results[,1]>0,] ##set to <0 for down genes Please note that, unlike topTable, the list is ordered by position on the chip, not by how significant the differences are. Francois On Tue, 2006-10-31 at 16:25 -0800, lee wrote: > Hello, > I am using my two color array data. I want to know the genes that > are significantly Up or Down in both "HFEvsWT" and "SlavsWT" groups > from Venn diagram results. I also want to know the genes that are only > significantly Up or Down in one group. When I tried using the gene > list from topTable function, I got different number of genes compared > to Venn Diagram results. Thus, I want to know what are the genes after > Venndiagram analysis. > Could you help me? > Thank you so much.classifyTestsF > > Sincerely, Seungmin Lee > > > > > library(limma) > targets<-readTargets("Target4wkEnteroHFESla.txt") > f<-function(x) as.numeric(x$Flags>-99) > files<-targets[,c("FileName")] > RG<-read.maimages(files,columns=list(R="F635 Mean",G="F532 Mean",Rb="B635 Median",Gb="F532 Median"),annotation=c("Block","Row","C olumn","ID","Accession","Symbol")) > plotMA(RG) > RG$genes<-readGAL("meebo.gal") > RG$printer<-getLayout(RG$genes) > MA.p<-normalizeWithinArrays(RG,method="loess") > MA.pAq<-normalizeBetweenArrays(MA.p,method="Aquantile") > design<-modelMatrix(targets,ref="WT.C57.chow") > design > contrast.matrix<-cbind("HFEvsWT"=c(1,0),"SlavsWT"=c(0,1)) > rownames(contrast.matrix)<-colnames(design) > contrast.matrix > fit<-lmFit(MA.pAq,design) > fit2<-contrasts.fit(fit,contrast.matrix) > fit2<-eBayes(fit2) > topTable(fit2,coef="HFEvsWT",adjust="BH") > plotMA(fit2,array=1) > topTable(fit2,coef="SlavsWT",adjust="BH") > plotMA(fit2,array=2) > results<-classifyTestsF(fit2, p.value=0.01) > summary(results) > table("HFEvsWT"=results[,1],"SlavsWT"=results[,2]) > vennDiagram(results,include="up") > vennDiagram(results,include="down") > > > -------------------------------------------------------------------- --- > Seung-Min Lee > > graduate student > 244 Morgan Hall > Molecular&Biochemical Nutrition > University of California at Berkeley > 94720-3104 > lab phone (510)643-2351 > lab fax(510)642-0535 > > > --------------------------------- > > [[alternative HTML version deleted]] > > _______________________________________________ > 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 >
ADD COMMENT
0
Entering edit mode
Hi Francois, Francois Pepin wrote: > Hi Seung-Min, > > The differences come from the classifyTestsF. It classifies the genes > based on the F statistics, rather than the B-values which topTable uses. > > Another way to get the information about the up genes both contrast > (Jim's way should work too): > > fit$genes[which(results[,1]>0,] ##set to <0 for down genes I don't think that will work. The first column of the results matrix gives information about the genes in the first contrast only. To get both contrasts, you need results[,1] > 0 & results[,2] > 0. In any case, you have to look at both contrasts to find the genes for any given cell of the Venn diagram. Best, Jim > > Please note that, unlike topTable, the list is ordered by position on > the chip, not by how significant the differences are. > > Francois > > On Tue, 2006-10-31 at 16:25 -0800, lee wrote: > >>Hello, >> I am using my two color array data. I want to know the genes that >>are significantly Up or Down in both "HFEvsWT" and "SlavsWT" groups >>from Venn diagram results. I also want to know the genes that are only >>significantly Up or Down in one group. When I tried using the gene >>list from topTable function, I got different number of genes compared >>to Venn Diagram results. Thus, I want to know what are the genes after >>Venndiagram analysis. >> Could you help me? >> Thank you so much.classifyTestsF >> >> Sincerely, Seungmin Lee >> >> >> >> >> library(limma) >>targets<-readTargets("Target4wkEnteroHFESla.txt") >>f<-function(x) as.numeric(x$Flags>-99) >>files<-targets[,c("FileName")] >>RG<-read.maimages(files,columns=list(R="F635 Mean",G="F532 Mean",Rb="B635 Median",Gb="F532 Median"),annotation=c("Block","Row","C olumn","ID","Accession","Symbol")) >> plotMA(RG) >>RG$genes<-readGAL("meebo.gal") >>RG$printer<-getLayout(RG$genes) >> MA.p<-normalizeWithinArrays(RG,method="loess") >>MA.pAq<-normalizeBetweenArrays(MA.p,method="Aquantile") >>design<-modelMatrix(targets,ref="WT.C57.chow") >>design >>contrast.matrix<-cbind("HFEvsWT"=c(1,0),"SlavsWT"=c(0,1)) >>rownames(contrast.matrix)<-colnames(design) >>contrast.matrix >>fit<-lmFit(MA.pAq,design) >>fit2<-contrasts.fit(fit,contrast.matrix) >>fit2<-eBayes(fit2) >> topTable(fit2,coef="HFEvsWT",adjust="BH") >>plotMA(fit2,array=1) >> topTable(fit2,coef="SlavsWT",adjust="BH") >>plotMA(fit2,array=2) >> results<-classifyTestsF(fit2, p.value=0.01) >>summary(results) >>table("HFEvsWT"=results[,1],"SlavsWT"=results[,2]) >>vennDiagram(results,include="up") >>vennDiagram(results,include="down") >> >> >>-------------------------------------------------------------------- --- >>Seung-Min Lee >> >>graduate student >>244 Morgan Hall >>Molecular&Biochemical Nutrition >>University of California at Berkeley >>94720-3104 >>lab phone (510)643-2351 >>lab fax(510)642-0535 >> >> >>--------------------------------- >> >> [[alternative HTML version deleted]] >> >>_______________________________________________ >>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 >> > > > _______________________________________________ > 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 -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD REPLY
0
Entering edit mode
Hi Jim, you are correct, my code only looks at one contrast at a time, the same way that topTable does it. Your modification is needed to look at the intersection. Francois On Wed, 2006-11-01 at 14:36 -0500, James W. MacDonald wrote: > Hi Francois, > > Francois Pepin wrote: > > Hi Seung-Min, > > > > The differences come from the classifyTestsF. It classifies the genes > > based on the F statistics, rather than the B-values which topTable uses. > > > > Another way to get the information about the up genes both contrast > > (Jim's way should work too): > > > > fit$genes[which(results[,1]>0,] ##set to <0 for down genes > > I don't think that will work. The first column of the results matrix > gives information about the genes in the first contrast only. To get > both contrasts, you need results[,1] > 0 & results[,2] > 0. In any case, > you have to look at both contrasts to find the genes for any given cell > of the Venn diagram. > > Best, > > Jim > > > > > > Please note that, unlike topTable, the list is ordered by position on > > the chip, not by how significant the differences are. > > > > Francois > > > > On Tue, 2006-10-31 at 16:25 -0800, lee wrote: > > > >>Hello, > >> I am using my two color array data. I want to know the genes that > >>are significantly Up or Down in both "HFEvsWT" and "SlavsWT" groups > >>from Venn diagram results. I also want to know the genes that are only > >>significantly Up or Down in one group. When I tried using the gene > >>list from topTable function, I got different number of genes compared > >>to Venn Diagram results. Thus, I want to know what are the genes after > >>Venndiagram analysis. > >> Could you help me? > >> Thank you so much.classifyTestsF > >> > >> Sincerely, Seungmin Lee > >> > >> > >> > >> > >> library(limma) > >>targets<-readTargets("Target4wkEnteroHFESla.txt") > >>f<-function(x) as.numeric(x$Flags>-99) > >>files<-targets[,c("FileName")] > >>RG<-read.maimages(files,columns=list(R="F635 Mean",G="F532 Mean",Rb="B635 Median",Gb="F532 Median"),annotation=c("Block","Row","C olumn","ID","Accession","Symbol")) > >> plotMA(RG) > >>RG$genes<-readGAL("meebo.gal") > >>RG$printer<-getLayout(RG$genes) > >> MA.p<-normalizeWithinArrays(RG,method="loess") > >>MA.pAq<-normalizeBetweenArrays(MA.p,method="Aquantile") > >>design<-modelMatrix(targets,ref="WT.C57.chow") > >>design > >>contrast.matrix<-cbind("HFEvsWT"=c(1,0),"SlavsWT"=c(0,1)) > >>rownames(contrast.matrix)<-colnames(design) > >>contrast.matrix > >>fit<-lmFit(MA.pAq,design) > >>fit2<-contrasts.fit(fit,contrast.matrix) > >>fit2<-eBayes(fit2) > >> topTable(fit2,coef="HFEvsWT",adjust="BH") > >>plotMA(fit2,array=1) > >> topTable(fit2,coef="SlavsWT",adjust="BH") > >>plotMA(fit2,array=2) > >> results<-classifyTestsF(fit2, p.value=0.01) > >>summary(results) > >>table("HFEvsWT"=results[,1],"SlavsWT"=results[,2]) > >>vennDiagram(results,include="up") > >>vennDiagram(results,include="down") > >> > >> > >>------------------------------------------------------------------ ----- > >>Seung-Min Lee > >> > >>graduate student > >>244 Morgan Hall > >>Molecular&Biochemical Nutrition > >>University of California at Berkeley > >>94720-3104 > >>lab phone (510)643-2351 > >>lab fax(510)642-0535 > >> > >> > >>--------------------------------- > >> > >> [[alternative HTML version deleted]] > >> > >>_______________________________________________ > >>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 > >> > > > > > > _______________________________________________ > > 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 > >
ADD REPLY
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20061101/ 303b280f/attachment.pl
ADD REPLY

Login before adding your answer.

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