to find out the union of two sets of genes
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.2 years ago
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.
• 1.8k views
ADD COMMENT
0
Entering edit mode
@achilleas-pitsillides-4316
Last seen 10.2 years ago
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]]
ADD COMMENT

Login before adding your answer.

Traffic: 803 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6