I have two gene sets: A and B. I would like to check which genes in B are enriched in A. As a result of the enrichment analysis, I to have a p-value for each gene in B.
Here is a reproducible example that you can use: I'm performing the analysis of gene IDs.
A = data.frame(c(100,200,300,400,500,600,700,100,800,900,1000,100,500,100)) #Gene IDs in set A B = data.frame(c(200,4,900,100,6)) #Gene IDs in set B #check if B geneIDs are enriched in set A, and generate a p-value for the enrichment of each gene go.obj <- newGeneOverlap(B,A) go.obj go.obj <- testGeneOverlap(go.obj) print(go.obj)
In the above example I attempted using GeneOverlap package, but it didn't give me p-values for every gene in B. Any suggestions on other methods to achieve what I'm aiming for?