Venn Diagram for 2, 3 and 4 sets (can be extended for more)
1
0
Entering edit mode
@steffen-moeller-2412
Last seen 13 months ago
Germany
Dear all, I needed Venn Diagrams to accomodate 4 sets rather than the 3 that I got via the limma package and I could not find it elsewhere. # Some test data A<- 1:20 B<- 1:20 C<- 2:20 D<- 3:21 # input gathered into a list, the names # appear in the diagram input<-list(a=A,b=B,c=C,d=D) # calculation of values that should # go into all the fields vc <- getVennCounts(input) # drawing of diagram drawVennDiagram(vc) The diagrams look like the ones from limma, i.e., no variation of circle shape and to reflect the size of the sets. The only novelty is that is also works on 4 sets and it is avoiding the use of classes. What should I do with these 295 lines of code now? It does not seem enough for a package on its own. Is anybody interested? Gordon? Cheers, Steffen
GO limma GO limma • 1.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States
Hi Steffen, How exactly are you doing this? With more than three sets a true Venn diagram cannot be constructed with circles, although I think it can be done with ellipses. Best, Jim Steffen Moeller wrote: > Dear all, > > I needed Venn Diagrams to accomodate 4 sets rather than the 3 that I got via > the limma package and I could not find it elsewhere. > > # Some test data > A<- 1:20 > B<- 1:20 > C<- 2:20 > D<- 3:21 > > # input gathered into a list, the names > # appear in the diagram > input<-list(a=A,b=B,c=C,d=D) > > # calculation of values that should > # go into all the fields > vc <- getVennCounts(input) > > # drawing of diagram > drawVennDiagram(vc) > > The diagrams look like the ones from limma, i.e., no variation of circle shape > and to reflect the size of the sets. The only novelty is that is also works > on 4 sets and it is avoiding the use of classes. > > What should I do with these 295 lines of code now? It does not seem enough for > a package on its own. Is anybody interested? Gordon? > > Cheers, > > Steffen > > _______________________________________________ > 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
ADD COMMENT
0
Entering edit mode
Here is a script that does something similar: http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/R_BioCondManual.htm l#R_graphics_venn Thomas On Fri 10/05/07 09:29, James W. MacDonald wrote: > Hi Steffen, > > How exactly are you doing this? With more than three sets a true Venn > diagram cannot be constructed with circles, although I think it can be > done with ellipses. > > Best, > > Jim > > > > Steffen Moeller wrote: > > Dear all, > > > > I needed Venn Diagrams to accomodate 4 sets rather than the 3 that I got via > > the limma package and I could not find it elsewhere. > > > > # Some test data > > A<- 1:20 > > B<- 1:20 > > C<- 2:20 > > D<- 3:21 > > > > # input gathered into a list, the names > > # appear in the diagram > > input<-list(a=A,b=B,c=C,d=D) > > > > # calculation of values that should > > # go into all the fields > > vc <- getVennCounts(input) > > > > # drawing of diagram > > drawVennDiagram(vc) > > > > The diagrams look like the ones from limma, i.e., no variation of circle shape > > and to reflect the size of the sets. The only novelty is that is also works > > on 4 sets and it is avoiding the use of classes. > > > > What should I do with these 295 lines of code now? It does not seem enough for > > a package on its own. Is anybody interested? Gordon? > > > > Cheers, > > > > Steffen > > > > _______________________________________________ > > 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 > > _______________________________________________ > 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 > -- Thomas Girke Assistant Professor of Bioinformatics Director, IIGB Bioinformatic Facility Center for Plant Cell Biology (CEPCEB) Institute for Integrative Genome Biology (IIGB) Department of Botany and Plant Sciences 1008 Noel T. Keen Hall University of California Riverside, CA 92521 E-mail: thomas.girke at ucr.edu Website: http://faculty.ucr.edu/~tgirke Ph: 951-827-2469 Fax: 951-827-4437
ADD REPLY
0
Entering edit mode
That is very similar to what Steffen does. However, these are not Venn diagrams, as you are missing two of the intersections. There should be a total of 15 intersections choose(4,1) + choose(4,2) + choose(4,3) + choose(4,4) And you only have 13. Best, Jim Thomas Girke wrote: > Here is a script that does something similar: > http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/R_BioCondManual.h tml#R_graphics_venn > > Thomas > > On Fri 10/05/07 09:29, James W. MacDonald wrote: >> Hi Steffen, >> >> How exactly are you doing this? With more than three sets a true Venn >> diagram cannot be constructed with circles, although I think it can be >> done with ellipses. >> >> Best, >> >> Jim >> >> >> >> Steffen Moeller wrote: >>> Dear all, >>> >>> I needed Venn Diagrams to accomodate 4 sets rather than the 3 that I got via >>> the limma package and I could not find it elsewhere. >>> >>> # Some test data >>> A<- 1:20 >>> B<- 1:20 >>> C<- 2:20 >>> D<- 3:21 >>> >>> # input gathered into a list, the names >>> # appear in the diagram >>> input<-list(a=A,b=B,c=C,d=D) >>> >>> # calculation of values that should >>> # go into all the fields >>> vc <- getVennCounts(input) >>> >>> # drawing of diagram >>> drawVennDiagram(vc) >>> >>> The diagrams look like the ones from limma, i.e., no variation of circle shape >>> and to reflect the size of the sets. The only novelty is that is also works >>> on 4 sets and it is avoiding the use of classes. >>> >>> What should I do with these 295 lines of code now? It does not seem enough for >>> a package on its own. Is anybody interested? Gordon? >>> >>> Cheers, >>> >>> Steffen >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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
ADD REPLY
0
Entering edit mode
Well, the values of the remaining intersections are not missed by this function, since they are provided below the pseudo 4-way venn diagrams. To plot proper 4-way venn diagrams one would need to use ellipses or rectangles, which is possible, but a bit harder to print in a nice format with the core plotting utilities in R. Thomas On Fri 10/05/07 11:55, James W. MacDonald wrote: > That is very similar to what Steffen does. However, these are not Venn > diagrams, as you are missing two of the intersections. There should be a > total of 15 intersections > > choose(4,1) + choose(4,2) + choose(4,3) + choose(4,4) > > And you only have 13. > > Best, > > Jim > > > > Thomas Girke wrote: > > Here is a script that does something similar: > > http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/R_BioCondManual .html#R_graphics_venn > > > > Thomas > > > > On Fri 10/05/07 09:29, James W. MacDonald wrote: > >> Hi Steffen, > >> > >> How exactly are you doing this? With more than three sets a true Venn > >> diagram cannot be constructed with circles, although I think it can be > >> done with ellipses. > >> > >> Best, > >> > >> Jim > >> > >> > >> > >> Steffen Moeller wrote: > >>> Dear all, > >>> > >>> I needed Venn Diagrams to accomodate 4 sets rather than the 3 that I got via > >>> the limma package and I could not find it elsewhere. > >>> > >>> # Some test data > >>> A<- 1:20 > >>> B<- 1:20 > >>> C<- 2:20 > >>> D<- 3:21 > >>> > >>> # input gathered into a list, the names > >>> # appear in the diagram > >>> input<-list(a=A,b=B,c=C,d=D) > >>> > >>> # calculation of values that should > >>> # go into all the fields > >>> vc <- getVennCounts(input) > >>> > >>> # drawing of diagram > >>> drawVennDiagram(vc) > >>> > >>> The diagrams look like the ones from limma, i.e., no variation of circle shape > >>> and to reflect the size of the sets. The only novelty is that is also works > >>> on 4 sets and it is avoiding the use of classes. > >>> > >>> What should I do with these 295 lines of code now? It does not seem enough for > >>> a package on its own. Is anybody interested? Gordon? > >>> > >>> Cheers, > >>> > >>> Steffen > >>> > >>> _______________________________________________ > >>> 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 > >> > >> _______________________________________________ > >> 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 > > _______________________________________________ > 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 > -- Thomas Girke Assistant Professor of Bioinformatics Director, IIGB Bioinformatic Facility Center for Plant Cell Biology (CEPCEB) Institute for Integrative Genome Biology (IIGB) Department of Botany and Plant Sciences 1008 Noel T. Keen Hall University of California Riverside, CA 92521 E-mail: thomas.girke at ucr.edu Website: http://faculty.ucr.edu/~tgirke Ph: 951-827-2469 Fax: 951-827-4437
ADD REPLY

Login before adding your answer.

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