[BioC] hello

Francois Pepin fpepin at cs.mcgill.ca
Tue Jul 21 23:10:12 CEST 2009

Hi Amrit,

please don't just e-mail me. The list is archived in case other other 
people want to search for the same issue. Also other people can have 
more advice and more time to offer it.

Also, please post a _reproducible_ code and the output of sessionInfo().

With the following content, the code works just fine for me:

Since I have no clue what you have in list1 and list2, I'm going to say 
this is likely the issue.

Also, you can completely remove the for loop, making the code simpler 
and quite a bit faster:
dooby.mat[,1] <- dooby.all%in%list1
dooby.mat[,2] <- dooby.all%in%list2


amrit karki wrote:
> Dear Francois pepin
> I used following code to construct venn diagram but it gave me the 
> diagram and also gave me the number in set A and set b but could not 
> enter number in Intersection. So, if you have time, i would like to 
> request you to edit my codes. Thank you.
> my probel is i havr 1769 genes in set A only, 2292 genes in set B only 
> and 3451 (2100 from set B and 1351 genes from set A) genes are common 
> (in interesection) set only. So, would you mind to suggest how it is 
> possible to construct venn diagram in r.
> list1 <-data.1[,1]
> list2 <-data.2[,1]
> dooby.all <- union(list1,list2)
> dooby.mat <- matrix(0,nrow=length(dooby.all),ncol=2)
> colnames(dooby.mat) <- c("Set A","Set B")
> 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.ven <- vennCounts(dooby.mat)
> vennDiagram(dooby.ven)
> Thank you.
> With best regards.
> Amrit Karki
> Graduate student

More information about the Bioconductor mailing list