Listing gene IDs from hyperGTest
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
hyperGTest compute Hypergeomtric p-values for over or under-representation of each GO term in the specified category among the specified gene set.
*geneSample* was used as an example.
> geneSample [1] "3987" "11167" "8683" "23576" "80173" "857" "64960" "3178" "93099" "100302736" "3916" "8663" "3383" "445582" [15] "10564" "5339" "6732" "4678" "10989" "55276" "29127" "10735" "51449" "55720" "11100" "2314" "51204" "11083" [29] "5694" "6605"
After using hyperGTest to test GO terms for over-representation, I get the result which were shown below:
> slotNames(hgOver) [1] "goDag" "pvalue.order" "conditional" "annotation" "geneIds" "testName" "pvalueCutoff" "testDirection" > summary(hgOver) GOBPID Pvalue OddsRatio ExpCount Count Size Term 1 GO:0044419 0.0002743002 10.32175 0.5988965 5 343 interspecies interaction between organisms
I want to know which subset of the input genes, which does not reported, represented in the significant GO term.
This can be done by using the genome wide annotation data, for human at this example, org.Hs.eg.db, for mapping Entrez gene IDs to GO IDs.
Since GO ontology is a directed acyclic graph, all genes that are annotated with a child GO term are also annotated with their parent terms. So, org.Hs.egGO2ALLEGS is using for mapping rather than org.Hs.egGO.
In the example above, we can get the corresponding gene set by:
> geneSample[geneSample %in% get("GO:0044419", org.Hs.egGO2ALLEGS)] [1] "857" "3178" "3383" "6732" "5694"
The gene set can further map to other identifiers or annotation data by biomaRt package.
Related Posts
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.