How to get genes within a GO category of 'GOstat' results?
2
0
Entering edit mode
Bade ▴ 310
@bade-5877
Last seen 3.3 years ago
Delaware

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

GO • 1.8k views
ADD COMMENT
2
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

The following code gives the Entrez IDs of all genes associated with "tissue development".

library(org.Mm.eg.db)
x <- org.Mm.egGO2ALLEGS
keys(x) <- "GO:0009888"
mappedLkeys(x)

 

ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 4 hours ago
United States

Hi Atul,

See ?probeSetSummary. You can also use ReportingTools to create a nicer version of the HTML table you have made, but with links to sub-tables that contain the significant genes that caused that term to be significant (see
pages 4-5 in the ReportingTools basics vignette

http://bioconductor.org/packages/release/bioc/vignettes/ReportingTools/inst/doc/microarrayAnalysis.pdf ).

Best,

Jim

--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099

ADD COMMENT

Login before adding your answer.

Traffic: 673 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