Hi All,
I am using 'GoStat' package for GO enrichment analysis and so far I have been able to generate results from 'hyperGTest' without any issue. Here is my dummy code:
top.genes = read.delim("Top200_others.txt") ## Test set ########### entrezTest.AF = top.genes[[1]] ## ENTREZ IDs ## Background set ####### all.genes = keys(org.Mm.eg.db, keytype="SYMBOL");all.genes[1:5] ## Using all genes as background entrezUniverse.AF = select(org.Mm.eg.db,as.character(all.genes), columns= "ENTREZID",keytype = "SYMBOL") b = entrezUniverse.AF[[2]] ## Select the Entrez ids b <- b[!is.na(b)];length(b) ## Perform Test ########## hgCutoff <- 0.005 params <- new("GOHyperGParams",geneIds=entrezTest.AF,universeGeneIds=b,annotation="org.Mm.eg.db", ontology="BP",pvalueCutoff=hgCutoff,conditional=FALSE,testDirection="over") paramsCond <- params conditional(paramsCond) <- TRUE hgOver <- hyperGTest(params) ## Write Results ######## htmlReport(hgOver, file=paste("IL_Mand_RClustGO2",".html",sep=""))
Now all I need is the list of test genes under enriched go categories. For Ex:
GOBPID Pvalue OddsRatio ExpCount Count Size Term
GO:0009888 0.000 5.988 9 41 1449 tissue development
GO:0009887 0.000 7.597 5 30 789 organ morphogenesis
Which test genes (entrez ids) were present in 'tissue developemnt'? Is is possible?
Thanks in Advance
AK