venn plot data?
3
0
Entering edit mode
5.6 years ago
star ▴ 350

I like to draw a Venn diagram plot for my dataset but I couldn't do it. I can do it with other packages like Vennerable or VennDiagram, but I do not know how I can make a list of data as INPUT for venn R packages?

Data:

Names = c("A", "B", "C", "D", "E")
Intersect = c(`00000`= 0, `10000` = 1534, `01000` = 600, `00100` = 189978, `00010` = 2000,`00001` = 2750, 
`11000` = 9,`10100` = 1278, `10010` = 109, `10001` = 1,`01100` = 810, `01010` = 28, `01001` = 22, `00110` = 2343, `00101` = 1169, `00011` = 8, `11100` = 9, `11010` = 3, `11001` = 0, 
`10110` = 99, `10101` = 0, `10011` = 0, `01110` = 49, `01101` = 25, `01011` = 0, `00111` = 4, `11110` = 3, `11101` = 0, `11011` = 0, `10111` = 0, `01111` = 0, `11111` = 0)
R venndiagram venn dataframe RNA-Seq • 3.2k views
ADD COMMENT
1
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLY
0
Entering edit mode

Personally, i prefer to use online tools such as interactiveen or genevenn in order to build a venn diagram. Do you already tried it?

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

would you please let me know how can I use this tool? I have bed files contain genomic coordinates, and when I upload them this tool only give me the total number related to each beb file.

ADD REPLY
0
Entering edit mode

some times I have more than 5-6 datasets, so the online tools are not useful in that case, and I think the interactiveen tool also use Vennerable packages for drawing.

ADD REPLY
0
Entering edit mode

Interactiven is able toe draw from 2 to 6 datasets.

ADD REPLY
0
Entering edit mode

you are right, but it uses Vennerable packages that is not as fancy as venn package is.

ADD REPLY
0
Entering edit mode

Have you tried the examples from the documentation before using it in your data? If they work, then try to use the same format for your data.

ADD REPLY
2
Entering edit mode
5.6 years ago
Prakash ★ 2.2k

If you are interested to intersect bed file and show the no. of overlapping and unique regions, I would suggest to use upSet plot for representation, you could use online available tool Bedsect for this purpose .

ADD COMMENT
1
Entering edit mode
5.6 years ago
kanika.151 ▴ 160

I hope this helps:

https://stackoverflow.com/questions/37239128/how-to-put-comma-in-large-number-of-venndiagram

http://bioinfogp.cnb.csic.es/tools/venny/index2.0.2.html

An example code:

where d is your data-frame

p=draw.triple.venn(
   area1 = nrow(subset(d, d[,1] == 1)), 
   area2 = nrow(subset(d, d[,2] == 1)), 
   area3 = nrow(subset(d, d[,3] == 1)), 
   n12 = nrow(subset(d, d[,1] == 1 & d[,2] == 1)), 
   n23 = nrow(subset(d, d[,2] == 1 & d[,3] == 1)), 
   n13 = nrow(subset(d, d[,1] == 1 & d[,3] == 1)), 
   n123 = nrow(subset(d, d[,1] == 1 & d[,2] == 1 & d[,3] ==1)), 
   category = c(panels[1,2],panels[2,2],panels[3,2]), 
   lty = "blank",
   fill = c("skyblue", "pink1", "mediumorchid"));
ADD COMMENT
1
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLY
0
Entering edit mode

Thanks for your reply, but VennDiagram package does it and I have done it. I like to do it with venn R package.

ADD REPLY
0
Entering edit mode
5.6 years ago
kanika.151 ▴ 160

venn

Highlighting only 4 of them in your venn diagram.

venn("10000, 01000, 00100, 00010")
ADD COMMENT
0
Entering edit mode

Thanks. but I couldnot you mean! I like to know how can I use my intersect data to draw a plot using venn

ADD REPLY

Login before adding your answer.

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