[BioC] vennDiagram in Limma
James Perkins
jperkins at biochem.ucl.ac.uk
Fri Jul 25 13:06:26 CEST 2008
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
More information about the Bioconductor
mailing list