I have a list of genes from sequencing. This list of genes is annotated to a GEN-ID. An example of one list is shown on the link below.
In this list a number means the gen is found in the sample. NA means the gen is not found.
I want to take for example two such lists and do a Venn diagram with them. The code I use for this is as follows:
listA <- read.csv("young.csv", header = FALSE)
A <- listA
A
listB <- read.csv("old.csv", header = FALSE)
B <- listB
B
length(A$V2)
length(B$V2)
A[is.na(A)] <- ""
B[is.na(B)] <- ""
library(VennDiagram)
xx.1 <- venn.diagram(list("young_control" =A$V2, "old_control" = B$V2), fill = c("yellow","cyan"), cex
=4.0, filename = "venn_excersice.png")
with this, I generate a Venn diagram displaying the genes which are in listA only, listB only or in both listA and listB.
My question now is: If I want to get a list, of Gen-IDs from each area of the generated Venn how do I do that? I tried attr, output, intersect, and other functions but somehow it won't work and I have no idea why this is the case.
Further on, I would like to generate an interactive Venn diagram. One in which you can click on the area and immediately get a visual representation of the Gen-IDs which are in this area.
If anybody has any recommendations on what I can try to reach this goal I would be super happy!
List format:
List A
ID.........Y
G-1........1
G-2.......NA
G-3........3
G-4........4
List B
ID.........O
G-1........1
G-2....... 2
G-3........3
G-4........NA