[BioC] vennDiagram in Limma
Francois Pepin
fpepin at cs.mcgill.ca
Fri Jul 25 17:06:40 CEST 2008
Hi James,
Unfortunately, there is nothing in the code to prevent that 0 from
appearing.
The two main solutions I would offer would be:
1- edit the image externally to remove the offending digit.
2- edit the source code using "fix(vennDiagram)" and comment out the
lines containing this code:
text(2.3, -2.1, counts[1], cex = cex, col = col,
adj = adj)
Note that there are 3 such calls for vennDiagrams with 1,2 and 3
categories. You can either comment out the 2nd one (for 2 categories) or
all 3.
I do not think it would be a good idea to add an option in the code to
hide this, as it is almost always crucial information for this plot.
Francois
James Perkins wrote:
> Im using vennDiagram and vennCounts with 2 lists of characters (set1 and
> set2), to show how they compare.
>
> However I notice that vennDiagram by defaults puts an 0 outside the
> circles, to show there was nothing in the universe which wasnt in the
> union of the two sets. I don't want this 0 appearing!
>
> http://i327.photobucket.com/albums/k454/jimineep/venn1.jpg
>
> example here.. notice the 0 at the bottom left of the image.
>
> Can I get rid of this? Have I missed something obvious in the limma user
> guide or the help page? I appreciate I am not using vennDiagram for its
> original purpose and as such this might not be possible, if not is there
> another way around it?
>
> Code:
>
> library(limma)
>
> set1 = scan("set1.txt",what='character',sep="\n")
>
> set2 = scan("set2.txt",what='character',sep="\n")
>
> set1 = set1[1:10]
>
> set2 = set2[1:10]
>
> universe = sort(union(set1,set2))
>
> Counts <- matrix(0, nrow=length(universe), ncol=2)
>
> colnames(Counts) <- c("label perm", "gene perm")
>
> for (i in 1:length(universe)) {
>
> Counts[i,1] <- universe[i] %in% set1
>
> Counts[i,2] <- universe[i] %in% set2
>
> }
>
> jpeg("venn1.jpg")
>
> vennDiagram(vennCounts(Counts))
>
> dev.off()
>
> Kindest regards,
>
> Jim Perkins
> PhD student,
> UCL
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list