[BioC] Venn Diagram Code

Anthony Bosco anthonyb at ichr.uwa.edu.au
Thu Jun 17 04:03:39 CEST 2004


To get a venn diagram for three lists of genes use the following code


library(limma)

list1 <-list of probe ID
list2 <-list of probe ID
list3 <-list of probe ID

dooby.all <- union(list1,union(list2,list3))
dooby.mat <- matrix(0,nrow=length(dooby.all),ncol=3)
colnames(dooby.mat) <- c("list1","list2","list3")
for (i in 1:length(dooby.all)) {
dooby.mat[i,1] <- dooby.all[i]%in%list1
dooby.mat[i,2] <- dooby.all[i]%in%list2
dooby.mat[i,3] <- dooby.all[i]%in%list3}
dooby.ven <- vennCounts(dooby.mat)
vennDiagram(dooby.ven)
-- 
______________________________________________

Anthony Bosco - PhD Student

Institute for Child Health Research
(Company Limited by Guarantee ACN 009 278 755)
Subiaco, Western Australia, 6008

Ph 61 8 9489  , Fax 61 8 9489 7700
email anthonyb at ichr.uwa.edu.au



More information about the Bioconductor mailing list