venn diagram
5
0
Entering edit mode
@stephen-v-su-3604
Last seen 9.6 years ago
To whom this may concern:     I must first apologize for not being a bioinformaticist and really only "pretend" to know how to use R to analyze microarray.  But i do understand the concepts of Limma and when to apply it.  I think it is a really powerful way to analyze matrix data.  So, if you don't mind, I would like to ask you a question regarding Venn Diagrams.  I have generated a RMA-processed expression set for 3 different conditions (each condition has a minimum of 8 CEL files- Affy 0.5 genome rat chip), fed it through limma to create a statistical computation of all the genes that are differentially expressed and created a venn Diagram to depict the results.  A general input functions of what i just wrote is depicted here: > fit <- lmFit(x, design) > cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, + x3Dvsx2D = x3D - x2D, + x2Dvsinvivo = x2D - invivo, levels = design) > fit2 <- contrasts.fit(fit, cont.matrix) > fit2 <- eBayes(fit2) > results <- decideTests(fit2) > vennDiagram(results) My question is:  How do I extract out the genes that reside in each of the quadrant in the Venn diagram?  Is there a way for me to say, retrieve the 108 genes that are unique to condition A, 98 genes unique to condition B and C, and so on .... Your help is greatly appreciated and I thank-you in advance of your considerations Steve [[alternative HTML version deleted]]
Microarray affy limma Microarray affy limma • 2.2k views
ADD COMMENT
0
Entering edit mode
Jenny Drnevich ★ 2.0k
@jenny-drnevich-2812
Last seen 12 days ago
United States
Hi Stephen, Sean's suggestion of summary(result) will give you the individual sig up and sig down counts for each contrast. I looked at the help for "TestResults-class" and what it doesn't explicitly say either is that this object is basically a matrix of 1s, 0s or -1s. You can see this by looking at the first few rows: > results[1:10,] To use it to find the probe sets unique in each condition, you can do: > unique1 <- sampleNames(x) [results[,1] !=0 & results[,2]==0 & results[,3]==0] > unique2 <- sampleNames(x) [results[,1] ==0 & results[,2]!=0 & results[,3]==0] > unique3 <- sampleNames(x) [results[,1] ==0 & results[,2]==0 & results[,3]!=0] HTH, Jenny At 07:40 AM 7/30/2009, Sean Davis wrote: >On Thu, Jul 30, 2009 at 2:13 AM, Stephen V. Su <svs8 at="" yahoo.com=""> wrote: > > > To whom this may concern: > > > > I must first apologize for not being a bioinformaticist and really only > > "pretend" to know how to use R to analyze microarray. But i do understand > > the concepts of Limma and when to apply it. I think it is a really > > powerful way to analyze matrix data. So, if you don't mind, I > would like to > > ask you a question regarding Venn Diagrams. I have generated a > > RMA-processed expression set for 3 different conditions (each condition has > > a minimum of 8 CEL files- Affy 0.5 genome rat chip), fed it > through limma to > > create a statistical computation of all the genes that are differentially > > expressed and created a venn Diagram to depict the results. A > general input > > functions of what i just wrote is depicted here: > > > > > > > fit <- lmFit(x, design) > > > > > cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, > > + x3Dvsx2D = x3D - x2D, > > + x2Dvsinvivo = x2D - invivo, levels = design) > > > fit2 <- contrasts.fit(fit, cont.matrix) > > > fit2 <- eBayes(fit2) > > > results <- decideTests(fit2) > > > vennDiagram(results) > > > > My question is: How do I extract out the genes that reside in each of the > > quadrant in the Venn diagram? Is there a way for me to say, retrieve the > > 108 genes that are unique to condition A, 98 genes unique to > condition B and > > C, and so on .... > > >Hi, Steve. The answer is in the help system. If you read the help for >decideTests, you will see that the value from a call to decideTests is an >object of class "TestResults". Doing help("TestResults-class") will tell >you that an object of class "TestResults" can be treated like a matrix. It >also has a few methods, one of which is the summary method. So, try: > >summary(result) > >Does that help? > >Sean > > [[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 Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at illinois.edu
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Thu, Jul 30, 2009 at 2:13 AM, Stephen V. Su <svs8@yahoo.com> wrote: > To whom this may concern: > > I must first apologize for not being a bioinformaticist and really only > "pretend" to know how to use R to analyze microarray. But i do understand > the concepts of Limma and when to apply it. I think it is a really > powerful way to analyze matrix data. So, if you don't mind, I would like to > ask you a question regarding Venn Diagrams. I have generated a > RMA-processed expression set for 3 different conditions (each condition has > a minimum of 8 CEL files- Affy 0.5 genome rat chip), fed it through limma to > create a statistical computation of all the genes that are differentially > expressed and created a venn Diagram to depict the results. A general input > functions of what i just wrote is depicted here: > > > > fit <- lmFit(x, design) > > > cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, > + x3Dvsx2D = x3D - x2D, > + x2Dvsinvivo = x2D - invivo, levels = design) > > fit2 <- contrasts.fit(fit, cont.matrix) > > fit2 <- eBayes(fit2) > > results <- decideTests(fit2) > > vennDiagram(results) > > My question is: How do I extract out the genes that reside in each of the > quadrant in the Venn diagram? Is there a way for me to say, retrieve the > 108 genes that are unique to condition A, 98 genes unique to condition B and > C, and so on .... Hi, Steve. The answer is in the help system. If you read the help for decideTests, you will see that the value from a call to decideTests is an object of class "TestResults". Doing help("TestResults-class") will tell you that an object of class "TestResults" can be treated like a matrix. It also has a few methods, one of which is the summary method. So, try: summary(result) Does that help? Sean [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Scott Ochsner ▴ 300
@scott-ochsner-599
Last seen 9.6 years ago
Steve, I don't remember exactly where I picked this bit of code up so I apologize for not giving credit. I'm almost sure I got it from looking at the mail archives. It uses the makeIndices function within affycoretools. >vennDiagram(temp.results) # make an index of all the probeIds with a TRUE call. As the default for vennCounts() is "both" (and you have implicitly called vennCounts() in your call to vennDiagram()), you need to use "both" in the makeIndices call. alls<-affycoretools:::makeIndices(temp.results,"both") >length(which(alls[[3]]==T)) #extract from alls those genes in your venn diagram. >alls.genes<-lapply(alls,function(x)row.names(temp.results)[x]) or lapply(alls,function(x)fit2$genes$Name[x]) #test to see if the lists of all.genes agree with the venn diagram >length(alls.genes[[1]]) >length(alls.genes[[2]]) etc... >alls.genes[[3]] [1] "1417023_a_at" "1417561_at" "1417580_s_at" "1417867_at" Hope this helps, Scott Scott A. Ochsner, PhD One Baylor Plaza BCM130, Houston, TX 77030 Voice: (713) 798-6227 Fax: (713) 790-1275 -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor- bounces@stat.math.ethz.ch] On Behalf Of Stephen V. Su Sent: Thursday, July 30, 2009 1:13 AM To: bioconductor at stat.math.ethz.ch Subject: [BioC] venn diagram To whom this may concern: ??? I must first apologize for not being a bioinformaticist and?really only "pretend" to know how to use R to analyze microarray.? But i do understand the?concepts of Limma and when to apply it.? I?think it is a really powerful?way to analyze?matrix data.??So, if you don't mind, I would like to ask you a question regarding Venn Diagrams.? I have generated a RMA-processed expression set for 3 different conditions (each condition has a minimum of 8 CEL files- Affy 0.5 genome rat chip), fed it through limma to create a statistical computation of all the genes that are differentially expressed and created a venn Diagram to depict the results.? A general input functions of what i just wrote is depicted here: > fit <- lmFit(x, design) ? > cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, + x3Dvsx2D = x3D - x2D, + x2Dvsinvivo = x2D - invivo, levels = design) > fit2 <- contrasts.fit(fit, cont.matrix) > fit2 <- eBayes(fit2) > results <- decideTests(fit2) > vennDiagram(results) ? My question is:? How do I extract out the genes that reside in each of the quadrant in the Venn diagram?? Is there a way for me to say, retrieve the 108 genes that are unique to condition A, 98 genes unique to condition B and C, and so on .... ? Your help is greatly appreciated and I thank-you in advance of your considerations ? Steve [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
thanx Scott! your suggestions work like a charm ... and THANX TO ALL who responded to my inquiry.� I appreciated ... steve ________________________________ From: "Ochsner, Scott A" <sochsner@bcm.tmc.edu> Cc: bioconductor@stat.math.ethz.ch Sent: Thursday, July 30, 2009 9:13:43 AM Subject: RE: [BioC] venn diagram Steve, I don't remember exactly where I picked this bit of code up so I apologize for not giving credit.� I'm almost sure I got it from looking at the mail archives.� It uses the makeIndices function within affycoretools. >vennDiagram(temp.results) # make an index of all the probeIds with a TRUE call.� As the default for vennCounts() is "both" (and you have implicitly called vennCounts() in your call to vennDiagram()), you need to use "both" in the makeIndices call. alls<-affycoretools:::makeIndices(temp.results,"both") >length(which(alls[[3]]==T)) #extract from alls those genes in your venn diagram. >alls.genes<-lapply(alls,function(x)row.names(temp.results)[x]) or lapply(alls,function(x)fit2$genes$Name[x]) #test to see if the lists of all.genes agree with the venn diagram >length(alls.genes[[1]]) >length(alls.genes[[2]]) etc... >alls.genes[[3]] [1] "1417023_a_at" "1417561_at"� "1417580_s_at" "1417867_at" Hope this helps, Scott Scott A. Ochsner, PhD One Baylor Plaza BCM130, Houston, TX 77030 Voice: (713) 798-6227� Fax: (713) 790-1275 -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor- bounces@stat.math.ethz.ch] On Behalf Of Stephen V. Su Sent: Thursday, July 30, 2009 1:13 AM To: bioconductor@stat.math.ethz.ch Subject: [BioC] venn diagram To whom this may concern: ��� I must first apologize for not being a bioinformaticist and�really only "pretend" to know how to use R to analyze microarray.� But i do understand the�concepts of Limma and when to apply it.� I�think it is a really powerful�way to analyze�matrix data.��So, if you don't mind, I would like to ask you a question regarding Venn Diagrams.� I have generated a RMA-processed expression set for 3 different conditions (each condition has a minimum of 8 CEL files- Affy 0.5 genome rat chip), fed it through limma to create a statistical computation of all the genes that are differentially expressed and created a venn Diagram to depict the results.� A general input functions of what i just wrote is depicted here: > fit <- lmFit(x, design) � > cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, + x3Dvsx2D = x3D - x2D, + x2Dvsinvivo = x2D - invivo, levels = design) > fit2 <- contrasts.fit(fit, cont.matrix) > fit2 <- eBayes(fit2) > results <- decideTests(fit2) > vennDiagram(results) � My question is:� How do I extract out the genes that reside in each of the quadrant in the Venn diagram?� Is there a way for me to say, retrieve the 108 genes that are unique to condition A, 98 genes unique to condition B and C, and so on .... � Your help is greatly appreciated and I thank-you in advance of your considerations � Steve � � � ��� [[alternative HTML version deleted]] [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 10 hours ago
United States
Stephen V. Su wrote: > To whom this may concern: > > I must first apologize for not being a bioinformaticist and really > only "pretend" to know how to use R to analyze microarray. But i do > understand the concepts of Limma and when to apply it. I think it is > a really powerful way to analyze matrix data. So, if you don't mind, > I would like to ask you a question regarding Venn Diagrams. I have > generated a RMA-processed expression set for 3 different conditions > (each condition has a minimum of 8 CEL files- Affy 0.5 genome rat > chip), fed it through limma to create a statistical computation of > all the genes that are differentially expressed and created a venn > Diagram to depict the results. A general input functions of what i > just wrote is depicted here: > > >> fit <- lmFit(x, design) > >> cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, > + x3Dvsx2D = x3D - x2D, + x2Dvsinvivo = x2D - invivo, levels = > design) >> fit2 <- contrasts.fit(fit, cont.matrix) fit2 <- eBayes(fit2) >> results <- decideTests(fit2) vennDiagram(results) > > My question is: How do I extract out the genes that reside in each > of the quadrant in the Venn diagram? Is there a way for me to say, > retrieve the 108 genes that are unique to condition A, 98 genes > unique to condition B and C, and so on .... It depends on what you want when you say 'extract out the genes'. If perhaps you want to have annotated tables for each quadrant, then look at the vennSelect function in the affycoretools package. This will output either HTML or text tables that can be opened using a browser or spreadsheet program, respectively. Best, Jim > > Your help is greatly appreciated and I thank-you in advance of your > considerations > > Steve > > > > [[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 Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD COMMENT
0
Entering edit mode
Scott Ochsner ▴ 300
@scott-ochsner-599
Last seen 9.6 years ago
Steve, Subtract the list of genes bounded by circles from the total. You should be able to build a list of probeids bounded by circles with: >within<-c(alls.genes[[1]], alls.genes[[2]], alls.genes[[4]], etc...) #subtract these from the input by: >outside<-setdiff(rownames(temp.results),within) In the future please remember to cc the BioC list. Archiving solutions to problems is one of the most valuable assets provided by BioC. Scott Scott A. Ochsner, PhD One Baylor Plaza BCM130, Houston, TX 77030 Voice: (713) 798-6227 Fax: (713) 790-1275 ________________________________ From: Stephen V. Su [mailto:svs8@yahoo.com] Sent: Friday, July 31, 2009 4:15 AM To: Ochsner, Scott A Subject: Re: [BioC] venn diagram hey Scott, thanx for the help. I was able to retrieve the probe IDs following your code. However, I wasn't able to retrieve the probe IDs for those genes residing outside the 3 circles- the genes that are not expressed differently in the 3 conditions. In a 3 circle vennDiagram, there are 8 numbers, 7 of which are bounded by circles for comparison to each other. But the 8th number represents those genes not significantly expressed differently in the 3 conditions. I couldn't do: alls.genes[[8]] to retrieve probe IDs it gave the response: Error in alls.genes[[8]] : subscript out of bounds how do i retrieve those genes? thanx again for your insights, Steve ________________________________ From: "Ochsner, Scott A" <sochsner@bcm.tmc.edu> To: Stephen V. Su <svs8@yahoo.com> Cc: bioconductor@stat.math.ethz.ch Sent: Thursday, July 30, 2009 9:13:43 AM Subject: RE: [BioC] venn diagram Steve, I don't remember exactly where I picked this bit of code up so I apologize for not giving credit. I'm almost sure I got it from looking at the mail archives. It uses the makeIndices function within affycoretools. >vennDiagram(temp.results) # make an index of all the probeIds with a TRUE call. As the default for vennCounts() is "both" (and you have implicitly called vennCounts() in your call to vennDiagram()), you need to use "both" in the makeIndices call. alls<-affycoretools:::makeIndices(temp.results,"both") >length(which(alls[[3]]==T)) #extract from alls those genes in your venn diagram. >alls.genes<-lapply(alls,function(x)row.names(temp.results)[x]) or lapply(alls,function(x)fit2$genes$Name[x]) #test to see if the lists of all.genes agree with the venn diagram >length(alls.genes[[1]]) >length(alls.genes[[2]]) etc... >alls.genes[[3]] [1] "1417023_a_at" "1417561_at" "1417580_s_at" "1417867_at" Hope this helps, Scott Scott A. Ochsner, PhD One Baylor Plaza BCM130, Houston, TX 77030 Voice: (713) 798-6227 Fax: (713) 790-1275 -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces@stat.math.ethz.ch] On Behalf Of Stephen V. Su Sent: Thursday, July 30, 2009 1:13 AM To: bioconductor@stat.math.ethz.ch Subject: [BioC] venn diagram To whom this may concern: I must first apologize for not being a bioinformaticist and really only "pretend" to know how to use R to analyze microarray. But i do understand the concepts of Limma and when to apply it. I think it is a really powerful way to analyze matrix data. So, if you don't mind, I would like to ask you a question regarding Venn Diagrams. I have generated a RMA-processed expression set for 3 different conditions (each condition has a minimum of 8 CEL files- Affy 0.5 genome rat chip), fed it through limma to create a statistical computation of all the genes that are differentially expressed and created a venn Diagram to depict the results. A general input functions of what i just wrote is depicted here: > fit <- lmFit(x, design) > cont.matrix <- makeContrasts(x3Dvsinvivo = x3D - invivo, + x3Dvsx2D = x3D - x2D, + x2Dvsinvivo = x2D - invivo, levels = design) > fit2 <- contrasts.fit(fit, cont.matrix) > fit2 <- eBayes(fit2) > results <- decideTests(fit2) > vennDiagram(results) My question is: How do I extract out the genes that reside in each of the quadrant in the Venn diagram? Is there a way for me to say, retrieve the 108 genes that are unique to condition A, 98 genes unique to condition B and C, and so on .... Your help is greatly appreciated and I thank-you in advance of your considerations Steve [[alternative HTML version deleted]] [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

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