hyperGTest, KEGG
2
0
Entering edit mode
@ivanborozanutorontoca-704
Last seen 10.2 years ago
Hi, I've used the script below to calculate over-represented KEGG categories however I can not get to gene ID's associated with each of the overrepresented KEGG terms/pathways ? hgCutoff <- 0.01 params <- new("KEGGHyperGParams", geneIds = selectedEntrezIds, universeGeneIds = entrezUniverse, annotation = "Hu19K8Build17102006", pvalueCutoff= hgCutoff, testDirection = "over") hgOver <- hyperGTest(params) summary(hgOver) gives KEGGID Pvalue OddsRatio ExpCount Count Size 1 04360 3.197873e-05 11.175439 1.0410959 5 19 2 05214 6.071664e-04 7.510345 1.1506849 7 21 3 01030 2.025983e-03 10.447619 0.6027397 3 11 however if I do > catToGeneId(hgOver) Error: could not find function "catToGeneId" My question, does catToGeneId() exist and how do I get to genes that are associated with each of the above pathways ? all the best, Ivan R version 2.4.0 (2006-10-03) attached base packages: [1] "splines" "tools" "methods" "stats" "graphics" "grDevices" [7] "utils" "datasets" "base" other attached packages: Hu19K8Build17102006 GOstats Category genefilter "1.1.0" "2.0.4" "2.0.3" "1.12.0" KEGG RBGL GO graph "1.14.1" "1.10.0" "1.14.0" "1.12.0" siggenes multtest survival annotate "1.8.0" "1.12.0" "2.29" "1.12.0" Biobase "1.12.1"
Annotation Pathways multtest siggenes RBGL GOstats Annotation Pathways multtest siggenes • 2.2k views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 10.2 years ago
Hi Ivan, ivan.borozan at utoronto.ca writes: > I've used the script below to calculate over-represented KEGG > categories however I can not get to gene ID's associated with each of > the overrepresented KEGG terms/pathways ? I've been working on making results easier to work with and also improving the documentation. This is all happening in the devel arm (which will soon become the next release). With a (very) recent version of Category you can get help on all accessors for the result objects returned by hyperGTest: help("HyperGResult-accessors") > My question, does catToGeneId() exist and how do I get to genes that > are associated with each of the above pathways ? To get the category to universe of gene IDs mapping: > geneIdUniverse(ans)[1:2] $`00625` [1] "YCR105W" "YCR107W" "YDL243C" "YDR368W" "YFL056C" "YHR104W" "YJR155W" [8] "YKR009C" "YNL331C" "YOR120W" $`04010` [1] "YAL041W" "YBL016W" "YBL105C" "YBR083W" "YBR200W" "YCL027W" "YDL159W" [8] "YDL235C" "YDR103W" "YDR461W" "YDR480W" "YER111C" "YER118C" "YFL026W" [15] "YGL089C" "YGR032W" "YGR040W" "YGR088W" "YHL007C" "YHR005C" "YHR030C" [22] "YHR084W" "YIL147C" "YJL095W" "YJL128C" "YJL157C" "YJR086W" "YKL062W" [29] "YKL178C" "YKR095W" "YLR006C" "YLR113W" "YLR182W" "YLR229C" "YLR332W" [36] "YLR342W" "YLR362W" "YML004C" "YMR037C" "YMR043W" "YNL053W" "YNL098C" [43] "YNL145W" "YNL271C" "YNL283C" "YNR031C" "YOL105C" "YOR008C" "YOR212W" [50] "YOR231W" "YPL049C" "YPL089C" "YPL140C" "YPL187W" "YPR165W" To get the category to _selected_ gene IDs mapping: > geneIdsByCategory(ans)[1:2] $`00625` [1] "YOR120W" $`04010` [1] "YFL026W" "YLR342W" The number of selected genes in each category (just the length of each element of the above): > geneCounts(ans)[1:2] 00625 04010 1 2 NOTE: I used the YEAST annotation data package as an example. It is non-typical in that it does not use Entrez Gene IDs as the base identifier. For your example, you will get Entrez IDs and you can map those to SYMBOL if you want using the appropriate annotation data package. The above examples were done using: R 2.5.0 beta, Category 2.1.36 sessionInfo() R version 2.5.0 beta (--) powerpc-apple-darwin8.9.0 locale: C attached base packages: [1] "splines" "tools" "stats" "graphics" "grDevices" "datasets" [7] "utils" "methods" "base" other attached packages: YEAST Category AnnotationDbi RSQLite DBI "1.15.13" "2.1.36" "0.0.58" "0.5-4" "0.2-1" Matrix lattice genefilter survival annotate "0.9975-11" "0.15-3" "1.13.12" "2.31" "1.13.7" GO KEGG graph Biobase "1.15.13" "1.15.13" "1.13.10" "1.13.48" Hope that helps. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org
ADD COMMENT
0
Entering edit mode
Hi Seth, Thanks I found one way around my problem (for the non devel version of the package Category): geneIds(hgOver)[geneIds(hgOver) %in% hgOver at catToGeneId[[i]]] where [[i]] runs over significant KEGG terms obtained from hyperGTest(params). Cheers, Ivan Quoting Seth Falcon <sfalcon at="" fhcrc.org="">: > Hi Ivan, > > ivan.borozan at utoronto.ca writes: >> I've used the script below to calculate over-represented KEGG >> categories however I can not get to gene ID's associated with each of >> the overrepresented KEGG terms/pathways ? > > I've been working on making results easier to work with and also > improving the documentation. This is all happening in the devel arm > (which will soon become the next release). > > With a (very) recent version of Category you can get help on all > accessors for the result objects returned by hyperGTest: > > help("HyperGResult-accessors") > >> My question, does catToGeneId() exist and how do I get to genes that >> are associated with each of the above pathways ? > > To get the category to universe of gene IDs mapping: > > > geneIdUniverse(ans)[1:2] > $`00625` > [1] "YCR105W" "YCR107W" "YDL243C" "YDR368W" "YFL056C" "YHR104W" > "YJR155W" > [8] "YKR009C" "YNL331C" "YOR120W" > > $`04010` > [1] "YAL041W" "YBL016W" "YBL105C" "YBR083W" "YBR200W" "YCL027W" > "YDL159W" > [8] "YDL235C" "YDR103W" "YDR461W" "YDR480W" "YER111C" "YER118C" > "YFL026W" > [15] "YGL089C" "YGR032W" "YGR040W" "YGR088W" "YHL007C" "YHR005C" > "YHR030C" > [22] "YHR084W" "YIL147C" "YJL095W" "YJL128C" "YJL157C" "YJR086W" > "YKL062W" > [29] "YKL178C" "YKR095W" "YLR006C" "YLR113W" "YLR182W" "YLR229C" > "YLR332W" > [36] "YLR342W" "YLR362W" "YML004C" "YMR037C" "YMR043W" "YNL053W" > "YNL098C" > [43] "YNL145W" "YNL271C" "YNL283C" "YNR031C" "YOL105C" "YOR008C" > "YOR212W" > [50] "YOR231W" "YPL049C" "YPL089C" "YPL140C" "YPL187W" "YPR165W" > > To get the category to _selected_ gene IDs mapping: > > > geneIdsByCategory(ans)[1:2] > $`00625` > [1] "YOR120W" > > $`04010` > [1] "YFL026W" "YLR342W" > > The number of selected genes in each category (just the length of each > element of the above): > > > geneCounts(ans)[1:2] > 00625 04010 > 1 2 > > NOTE: I used the YEAST annotation data package as an example. It is > non-typical in that it does not use Entrez Gene IDs as the base > identifier. For your example, you will get Entrez IDs and you can map > those to SYMBOL if you want using the appropriate annotation data > package. > > The above examples were done using: > > R 2.5.0 beta, Category 2.1.36 > > sessionInfo() > R version 2.5.0 beta (--) > powerpc-apple-darwin8.9.0 > > locale: > C > > attached base packages: > [1] "splines" "tools" "stats" "graphics" "grDevices" "datasets" > [7] "utils" "methods" "base" > > other attached packages: > YEAST Category AnnotationDbi RSQLite DBI > "1.15.13" "2.1.36" "0.0.58" "0.5-4" "0.2-1" > Matrix lattice genefilter survival annotate > "0.9975-11" "0.15-3" "1.13.12" "2.31" "1.13.7" > GO KEGG graph Biobase > "1.15.13" "1.15.13" "1.13.10" "1.13.48" > > Hope that helps. > > + seth > > -- > Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center > http://bioconductor.org >
ADD REPLY
0
Entering edit mode
Nianhua Li ▴ 870
@nianhua-li-1606
Last seen 10.2 years ago
Hi, Ivan, library(KEGG, lib="~/annoprep/bin-13") x <- c("04360", "05214", "01030") ## Assume Hu19K8Build17102006 is the annotation for human genes, ## you prefix the KEGG ID with human KEGG pathway code "hsa" x <- paste("hsa", x, sep="") g <- mget(x, KEGGPATHID2EXTID) ## then maybe you want to intersect g with selectedEntrezIds ... hope this helps nianhua
ADD COMMENT

Login before adding your answer.

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