Last data update: 2014.03.03
R: Fetch GO categories
Fetch GO categories
Description
Obtains all gene ontology (GO) categories associated with a set of genes using the relevant organism package.
Usage
getgo(genes, genome, id,fetch.cats=c("GO:CC","GO:BP","GO:MF"))
Arguments
genes
A vector or list of genes to get the associated GO categories.
genome
A string identifying the genome that genes
refer to. For a list of supported organisms run supportedGenomes
.
id
A string identifying the gene identifier used by genes
. For a list of supported gene IDs run supportedGeneIDs
.
fetch.cats
A vector specifying which categories to fetch the mapping between category names and genes for. See details for vaild options.
Details
This function attempts to make use of the organism packages (org.<Genome>.<GeneID>.db) to obtain the mapping between gene ID and GO categories. As with getlength
it is preferable that the same gene identifier system is used for both summarization and retrieving GO categories.
Valid options for the fetch.cats
arguement are any combination of "GO:CC", "GO:BP", "GO:MF" & "KEGG". The three GO terms refer to the Cellular Component, Biological Process and Molecular Function respectively. "KEGG" refers to KEGG pathways.
Note that getgo
is a convenience function, designed to make extracting mappings between GO categories and Gene ID easy. For less common organisms and/or gene ID getgo
may fail to return a mapping even when a legitimate mapping exists in the revelant organism package. If getgo
fails, you should always try to build the mapping yourself from the organism package (if one exists) before deciding that the information is unavailable. Further information and examples of this can be found in the package Vignette.
Value
A list where each entry is named by a gene and contains a vector of all the associated GO categories. This can be used directly with the gene2cat
option in goseq
.
Author(s)
Matthew D. Young myoung@wehi.edu.au
See Also
supportedGenomes
, supportedGeneIDs
, goseq
Examples
genes <- c("ENSG00000124208", "ENSG00000182463", "ENSG00000124201", "ENSG00000124205", "ENSG00000124207")
getgo(genes,'hg19','ensGene')
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(goseq)
Loading required package: BiasedUrn
Loading required package: geneLenDataBase
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/goseq/getgo.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getgo
> ### Title: Fetch GO categories
> ### Aliases: getgo
>
> ### ** Examples
>
> genes <- c("ENSG00000124208", "ENSG00000182463", "ENSG00000124201", "ENSG00000124205", "ENSG00000124207")
> getgo(genes,'hg19','ensGene')
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
$<NA>
NULL
$ENSG00000182463
[1] "GO:0006139" "GO:0006351" "GO:0006355" "GO:0006725" "GO:0006807"
[6] "GO:0007275" "GO:0008150" "GO:0008152" "GO:0009058" "GO:0009059"
[11] "GO:0009889" "GO:0009987" "GO:0010467" "GO:0010468" "GO:0010556"
[16] "GO:0016070" "GO:0018130" "GO:0019219" "GO:0019222" "GO:0019438"
[21] "GO:0031323" "GO:0031326" "GO:0032501" "GO:0032502" "GO:0032774"
[26] "GO:0034641" "GO:0034645" "GO:0034654" "GO:0043170" "GO:0044237"
[31] "GO:0044238" "GO:0044249" "GO:0044260" "GO:0044271" "GO:0044699"
[36] "GO:0044707" "GO:0044767" "GO:0046483" "GO:0050789" "GO:0050794"
[41] "GO:0051171" "GO:0051252" "GO:0060255" "GO:0065007" "GO:0071704"
[46] "GO:0080090" "GO:0090304" "GO:0097659" "GO:1901360" "GO:1901362"
[51] "GO:1901576" "GO:1903506" "GO:2000112" "GO:2001141" "GO:0005575"
[56] "GO:0005622" "GO:0005623" "GO:0005634" "GO:0043226" "GO:0043227"
[61] "GO:0043229" "GO:0043231" "GO:0044424" "GO:0044464" "GO:0003674"
[66] "GO:0003676" "GO:0003677" "GO:0005488" "GO:0005515" "GO:0043167"
[71] "GO:0043169" "GO:0046872" "GO:0097159" "GO:1901363"
$ENSG00000124201
[1] "GO:0003674" "GO:0003676" "GO:0003723" "GO:0005488" "GO:0043167"
[6] "GO:0043169" "GO:0044822" "GO:0046872" "GO:0097159" "GO:1901363"
$ENSG00000124205
[1] "GO:0000165" "GO:0000278" "GO:0000280" "GO:0001667" "GO:0001755"
[6] "GO:0001932" "GO:0001934" "GO:0001990" "GO:0002027" "GO:0002065"
[11] "GO:0002376" "GO:0002682" "GO:0002684" "GO:0002685" "GO:0002687"
[16] "GO:0002688" "GO:0002690" "GO:0002790" "GO:0003008" "GO:0003012"
[21] "GO:0003013" "GO:0003015" "GO:0003018" "GO:0003044" "GO:0003073"
[26] "GO:0003100" "GO:0006464" "GO:0006468" "GO:0006793" "GO:0006796"
[31] "GO:0006810" "GO:0006811" "GO:0006812" "GO:0006813" "GO:0006873"
[36] "GO:0006874" "GO:0006875" "GO:0006928" "GO:0006935" "GO:0006936"
[41] "GO:0006939" "GO:0006996" "GO:0007049" "GO:0007067" "GO:0007088"
[46] "GO:0007154" "GO:0007165" "GO:0007166" "GO:0007267" "GO:0007275"
[51] "GO:0007346" "GO:0007399" "GO:0007610" "GO:0008015" "GO:0008016"
[56] "GO:0008150" "GO:0008152" "GO:0008217" "GO:0008283" "GO:0008284"
[61] "GO:0009605" "GO:0009888" "GO:0009893" "GO:0009914" "GO:0009966"
[66] "GO:0009967" "GO:0009987" "GO:0010460" "GO:0010467" "GO:0010468"
[71] "GO:0010562" "GO:0010564" "GO:0010604" "GO:0010638" "GO:0010646"
[76] "GO:0010647" "GO:0010817" "GO:0010959" "GO:0010960" "GO:0010961"
[81] "GO:0014031" "GO:0014032" "GO:0014033" "GO:0014821" "GO:0014826"
[86] "GO:0014829" "GO:0015672" "GO:0015833" "GO:0016043" "GO:0016310"
[91] "GO:0016477" "GO:0019220" "GO:0019222" "GO:0019229" "GO:0019538"
[96] "GO:0019725" "GO:0019932" "GO:0022008" "GO:0022402" "GO:0023014"
[101] "GO:0023051" "GO:0023052" "GO:0023056" "GO:0023061" "GO:0030001"
[106] "GO:0030003" "GO:0030072" "GO:0030154" "GO:0030182" "GO:0030318"
[111] "GO:0030334" "GO:0030335" "GO:0030593" "GO:0030595" "GO:0030855"
[116] "GO:0031323" "GO:0031325" "GO:0031399" "GO:0031401" "GO:0032101"
[121] "GO:0032103" "GO:0032268" "GO:0032270" "GO:0032501" "GO:0032502"
[126] "GO:0032879" "GO:0032940" "GO:0033043" "GO:0033674" "GO:0034220"
[131] "GO:0034762" "GO:0034764" "GO:0034765" "GO:0034767" "GO:0035150"
[136] "GO:0035556" "GO:0036211" "GO:0040011" "GO:0040012" "GO:0040017"
[141] "GO:0042127" "GO:0042221" "GO:0042310" "GO:0042325" "GO:0042327"
[146] "GO:0042330" "GO:0042592" "GO:0042886" "GO:0043085" "GO:0043170"
[151] "GO:0043266" "GO:0043268" "GO:0043269" "GO:0043270" "GO:0043405"
[156] "GO:0043406" "GO:0043408" "GO:0043410" "GO:0043412" "GO:0043473"
[161] "GO:0043549" "GO:0044057" "GO:0044093" "GO:0044237" "GO:0044238"
[166] "GO:0044260" "GO:0044267" "GO:0044699" "GO:0044700" "GO:0044707"
[171] "GO:0044710" "GO:0044763" "GO:0044765" "GO:0044767" "GO:0045595"
[176] "GO:0045597" "GO:0045787" "GO:0045823" "GO:0045840" "GO:0045859"
[181] "GO:0045860" "GO:0045931" "GO:0045937" "GO:0046879" "GO:0046883"
[186] "GO:0046887" "GO:0046903" "GO:0048016" "GO:0048066" "GO:0048070"
[191] "GO:0048285" "GO:0048468" "GO:0048513" "GO:0048518" "GO:0048520"
[196] "GO:0048522" "GO:0048583" "GO:0048584" "GO:0048699" "GO:0048731"
[201] "GO:0048762" "GO:0048856" "GO:0048863" "GO:0048864" "GO:0048869"
[206] "GO:0048870" "GO:0048878" "GO:0050789" "GO:0050790" "GO:0050793"
[211] "GO:0050794" "GO:0050795" "GO:0050801" "GO:0050880" "GO:0050886"
[216] "GO:0050896" "GO:0050900" "GO:0050920" "GO:0050921" "GO:0050931"
[221] "GO:0051046" "GO:0051047" "GO:0051049" "GO:0051050" "GO:0051094"
[226] "GO:0051128" "GO:0051130" "GO:0051174" "GO:0051179" "GO:0051234"
[231] "GO:0051239" "GO:0051240" "GO:0051246" "GO:0051247" "GO:0051270"
[236] "GO:0051272" "GO:0051301" "GO:0051302" "GO:0051338" "GO:0051347"
[241] "GO:0051641" "GO:0051649" "GO:0051674" "GO:0051716" "GO:0051726"
[246] "GO:0051781" "GO:0051783" "GO:0051785" "GO:0055065" "GO:0055074"
[251] "GO:0055080" "GO:0055082" "GO:0055085" "GO:0060047" "GO:0060255"
[256] "GO:0060326" "GO:0060341" "GO:0060429" "GO:0060485" "GO:0060563"
[261] "GO:0065007" "GO:0065008" "GO:0065009" "GO:0070887" "GO:0071621"
[266] "GO:0071702" "GO:0071704" "GO:0071705" "GO:0071804" "GO:0071805"
[271] "GO:0071840" "GO:0071900" "GO:0071902" "GO:0072503" "GO:0072507"
[276] "GO:0080090" "GO:0090066" "GO:0090068" "GO:0097529" "GO:0097530"
[281] "GO:0098655" "GO:0098660" "GO:0098662" "GO:0098771" "GO:1901379"
[286] "GO:1901381" "GO:1902531" "GO:1902533" "GO:1902578" "GO:1902589"
[291] "GO:1903047" "GO:1903522" "GO:1903524" "GO:1903530" "GO:1903532"
[296] "GO:1904062" "GO:1904064" "GO:1990266" "GO:2000145" "GO:2000147"
[301] "GO:0005575" "GO:0005576" "GO:0005615" "GO:0005622" "GO:0005623"
[306] "GO:0044421" "GO:0044464" "GO:0001664" "GO:0003674" "GO:0005102"
[311] "GO:0005179" "GO:0005488" "GO:0005515" "GO:0031705" "GO:0031708"
[316] "GO:0071855"
$ENSG00000124207
[1] "GO:0006605" "GO:0006606" "GO:0006611" "GO:0006810" "GO:0006886"
[6] "GO:0006913" "GO:0006915" "GO:0008104" "GO:0008150" "GO:0008219"
[11] "GO:0008283" "GO:0009987" "GO:0012501" "GO:0015031" "GO:0016265"
[16] "GO:0016482" "GO:0017038" "GO:0033036" "GO:0033365" "GO:0034504"
[21] "GO:0034613" "GO:0044699" "GO:0044744" "GO:0044763" "GO:0044765"
[26] "GO:0045184" "GO:0046907" "GO:0051168" "GO:0051169" "GO:0051170"
[31] "GO:0051179" "GO:0051234" "GO:0051641" "GO:0051649" "GO:0070727"
[36] "GO:0071702" "GO:0072594" "GO:1902578" "GO:1902580" "GO:1902582"
[41] "GO:1902593" "GO:0005575" "GO:0005576" "GO:0005622" "GO:0005623"
[46] "GO:0005634" "GO:0005635" "GO:0005654" "GO:0005737" "GO:0005829"
[51] "GO:0012505" "GO:0016020" "GO:0031967" "GO:0031974" "GO:0031975"
[56] "GO:0031981" "GO:0031982" "GO:0031988" "GO:0043226" "GO:0043227"
[61] "GO:0043229" "GO:0043230" "GO:0043231" "GO:0043233" "GO:0044421"
[66] "GO:0044422" "GO:0044424" "GO:0044428" "GO:0044444" "GO:0044446"
[71] "GO:0044464" "GO:0065010" "GO:0070013" "GO:0070062" "GO:1903561"
[76] "GO:0003674" "GO:0005049" "GO:0005215" "GO:0005487" "GO:0005488"
[81] "GO:0005515" "GO:0008536" "GO:0008565" "GO:0017016" "GO:0019899"
[86] "GO:0022892" "GO:0031267" "GO:0051020"
>
>
>
>
>
> dev.off()
null device
1
>