Entering edit mode
2.6 years ago
axe880
•
0
Hi there,
Here is my script for generating a Venn diagram:
vennlistUp <- list( "Control" = UPDEGsTRCSRCgenes,
"40-min" = UPDEGsTR40SR40genes,
"120-min" = UPDEGsTR120SR120genes,
"Recovery" = UPDEGsTRRSRRgenes)
vennlistUp_venn <- ggvenn(vennlistUp, fill_color = c("orange", "#0073C2FF", "#EFC000FF", "#868686FF"),
stroke_size = 1, set_name_size = 8, text_size = 5)
vennlistUp_venn*
This works well and shows what I want it to.
My issue is, I need to extract the gene ID's that are shared across three time points: 40-min, 120-min, and Recovery. I do not want to observe the genes that overlap with the control.
Is there a method of doing this? I understand the intersect function can intersect the genes, but I seem to only be able to do this for all 4 time points at once.
Any help is appreciated, thanks!
Thank you but I think I tried this to no avail. If I show you my diagram:
I am trying to look at the 89 genes. This is because there is no overlap with the control. When I tried the suggested command, I instead got a number which included both the 89 and the 627, where 627 is the genes seen across all 4 points.
So, in theory, my problem is my inability to remove the 627 genes from the 89.
Is there any solution you could perhaps suggest for this?
Thanks again.
So you want the intersection of 40min,120min, Recovery, but not those genes that are also in the control? I might have overread this, but set operators in R are very powerful, so:
will remove the control genes from the intersection. Hope this works out
Worked perfect - appreciate the help.