Hi Priya,

One way to do that is to use vennCounts and vennDiagram from the limma
package. If you got your results from limma then you can just follow the
manual page for the function; otherwise you can do something along these
lines: I am assuming that your significant results reside in two matrices
m1 and m2 with a column geneName that contains the gene name.

library(limma)
allGenesVector <- unique(m1$geneName, m2$geneName)  # Create a vector with
all the unique gene names

set1 <- allGenesVector  %in% m1$geneName  # boolean vector with true value
for every gene name which appears in m1
set2 <- allGenesVector  %in% m2$geneName   # Same as above but for matrix m2
inputToVenn <- data.frame(set1, set2)

vennCounts(inputToVenn)
# Or
vennDiagram(inputToVenn)

cheers,
Achilleas


On Thu, Nov 1, 2012 at 6:22 AM, priya [guest] <guest@bioconductor.org>wrote:

>
> I have two matrices with the list of differentially expressed genes and
> would like to find out the union of genes which are common in both the
> lists  using R . Maybe with a venn diagram or a similarity plot .
>
>  -- output of sessionInfo():
>
> R version 2.15
> Linux operating system
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

