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
genesrefer to. For a list of supported organisms runsupportedGenomes.- id
A string identifying the gene identifier used by
genes. For a list of supported gene IDs runsupportedGeneIDs.- fetch.cats
A vector specifying which categories to fetch the mapping between category names and genes for. See details for valid options.
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.
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 argument 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 relevant 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.
See also
supportedGenomes, supportedGeneIDs,
goseq
Author
Matthew D. Young myoung@wehi.edu.au
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: generics
#>
#> Attaching package: ‘generics’
#> The following objects are masked from ‘package:base’:
#>
#> as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
#> setequal, union
#>
#> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:stats’:
#>
#> IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#>
#> Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#> as.data.frame, basename, cbind, colnames, dirname, do.call,
#> duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply,
#> mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#> rank, rbind, rownames, sapply, saveRDS, table, tapply, unique,
#> unsplit, which.max, which.min
#> 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 object is masked from ‘package:geneLenDataBase’:
#>
#> unfactor
#> The following object is masked from ‘package:utils’:
#>
#> findMatches
#> The following objects are masked from ‘package:base’:
#>
#> I, expand.grid, unname
#>
#> $<NA>
#> NULL
#>
#> $ENSG00000182463
#> [1] "GO:0006139" "GO:0006351" "GO:0006355" "GO:0006357" "GO:0006366"
#> [6] "GO:0008150" "GO:0008152" "GO:0009058" "GO:0009059" "GO:0009889"
#> [11] "GO:0009987" "GO:0010467" "GO:0010468" "GO:0010556" "GO:0016070"
#> [16] "GO:0019219" "GO:0019222" "GO:0032774" "GO:0034654" "GO:0043170"
#> [21] "GO:0044238" "GO:0050789" "GO:0050794" "GO:0051252" "GO:0060255"
#> [26] "GO:0065007" "GO:0080090" "GO:0090304" "GO:0141187" "GO:2001141"
#> [31] "GO:0000785" "GO:0005575" "GO:0005622" "GO:0005634" "GO:0005694"
#> [36] "GO:0043226" "GO:0043227" "GO:0043228" "GO:0043229" "GO:0043231"
#> [41] "GO:0043232" "GO:0110165" "GO:0000981" "GO:0003674" "GO:0003676"
#> [46] "GO:0003677" "GO:0003700" "GO:0005488" "GO:0005515" "GO:0036094"
#> [51] "GO:0043167" "GO:0043169" "GO:0046872" "GO:0140110"
#>
#> $ENSG00000124201
#> [1] "GO:0002218" "GO:0002253" "GO:0002376" "GO:0002682" "GO:0002684"
#> [6] "GO:0002831" "GO:0002833" "GO:0006325" "GO:0006338" "GO:0006950"
#> [11] "GO:0006952" "GO:0006955" "GO:0008150" "GO:0008152" "GO:0009058"
#> [16] "GO:0009059" "GO:0009605" "GO:0009607" "GO:0009615" "GO:0009617"
#> [21] "GO:0009889" "GO:0009890" "GO:0009892" "GO:0009987" "GO:0010467"
#> [26] "GO:0010468" "GO:0010556" "GO:0010558" "GO:0010605" "GO:0010629"
#> [31] "GO:0016032" "GO:0016043" "GO:0019058" "GO:0019079" "GO:0019222"
#> [36] "GO:0031047" "GO:0031048" "GO:0031347" "GO:0031349" "GO:0031507"
#> [41] "GO:0032101" "GO:0032103" "GO:0040029" "GO:0042742" "GO:0043170"
#> [46] "GO:0043207" "GO:0044419" "GO:0045069" "GO:0045071" "GO:0045087"
#> [51] "GO:0045088" "GO:0045089" "GO:0045814" "GO:0048518" "GO:0048519"
#> [56] "GO:0048523" "GO:0048525" "GO:0048583" "GO:0048584" "GO:0050776"
#> [61] "GO:0050778" "GO:0050789" "GO:0050792" "GO:0050794" "GO:0050896"
#> [66] "GO:0051607" "GO:0051707" "GO:0060255" "GO:0065007" "GO:0071840"
#> [71] "GO:0080134" "GO:0098542" "GO:0140546" "GO:1903900" "GO:0005575"
#> [76] "GO:0005622" "GO:0005634" "GO:0005737" "GO:0005739" "GO:0005740"
#> [81] "GO:0005741" "GO:0010494" "GO:0016020" "GO:0019867" "GO:0030880"
#> [86] "GO:0031090" "GO:0031379" "GO:0031380" "GO:0031966" "GO:0031967"
#> [91] "GO:0031968" "GO:0032991" "GO:0035770" "GO:0036464" "GO:0043226"
#> [96] "GO:0043227" "GO:0043228" "GO:0043229" "GO:0043231" "GO:0043232"
#> [101] "GO:0061695" "GO:0098588" "GO:0099080" "GO:0110165" "GO:0140513"
#> [106] "GO:0140535" "GO:1902494" "GO:1990234" "GO:0003674" "GO:0003676"
#> [111] "GO:0003723" "GO:0003824" "GO:0004386" "GO:0005488" "GO:0008270"
#> [116] "GO:0036094" "GO:0043167" "GO:0043169" "GO:0046872" "GO:0046914"
#> [121] "GO:0140640" "GO:0140657"
#>
#> $ENSG00000124205
#> [1] "GO:0000165" "GO:0000278" "GO:0000280" "GO:0000902" "GO:0001667"
#> [6] "GO:0001755" "GO:0001932" "GO:0001934" "GO:0001990" "GO:0002027"
#> [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:0006468" "GO:0006793" "GO:0006796" "GO:0006810"
#> [31] "GO:0006811" "GO:0006812" "GO:0006813" "GO:0006873" "GO:0006874"
#> [36] "GO:0006935" "GO:0006936" "GO:0006937" "GO:0006939" "GO:0006940"
#> [41] "GO:0006996" "GO:0007049" "GO:0007088" "GO:0007154" "GO:0007165"
#> [46] "GO:0007166" "GO:0007267" "GO:0007275" "GO:0007346" "GO:0007399"
#> [51] "GO:0007409" "GO:0007411" "GO:0008015" "GO:0008016" "GO:0008150"
#> [56] "GO:0008152" "GO:0008217" "GO:0008283" "GO:0008284" "GO:0009058"
#> [61] "GO:0009059" "GO:0009605" "GO:0009653" "GO:0009888" "GO:0009889"
#> [66] "GO:0009893" "GO:0009914" "GO:0009966" "GO:0009967" "GO:0009987"
#> [71] "GO:0010460" "GO:0010467" "GO:0010468" "GO:0010556" "GO:0010562"
#> [76] "GO:0010564" "GO:0010604" "GO:0010638" "GO:0010646" "GO:0010647"
#> [81] "GO:0010817" "GO:0010959" "GO:0010960" "GO:0010961" "GO:0014032"
#> [86] "GO:0014033" "GO:0014821" "GO:0014826" "GO:0014829" "GO:0015833"
#> [91] "GO:0016043" "GO:0016049" "GO:0016310" "GO:0016477" "GO:0019220"
#> [96] "GO:0019222" "GO:0019229" "GO:0019538" "GO:0019725" "GO:0022008"
#> [101] "GO:0022402" "GO:0023051" "GO:0023052" "GO:0023056" "GO:0023061"
#> [106] "GO:0030001" "GO:0030003" "GO:0030030" "GO:0030072" "GO:0030154"
#> [111] "GO:0030182" "GO:0030318" "GO:0030334" "GO:0030335" "GO:0030593"
#> [116] "GO:0030595" "GO:0031175" "GO:0031399" "GO:0031401" "GO:0032101"
#> [121] "GO:0032103" "GO:0032501" "GO:0032502" "GO:0032879" "GO:0032940"
#> [126] "GO:0033043" "GO:0033674" "GO:0034220" "GO:0034762" "GO:0034764"
#> [131] "GO:0034765" "GO:0034767" "GO:0035150" "GO:0035296" "GO:0035556"
#> [136] "GO:0036211" "GO:0040007" "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:0044238" "GO:0045595"
#> [166] "GO:0045597" "GO:0045787" "GO:0045823" "GO:0045840" "GO:0045859"
#> [171] "GO:0045860" "GO:0045933" "GO:0045937" "GO:0045987" "GO:0046879"
#> [176] "GO:0046883" "GO:0046887" "GO:0046903" "GO:0048066" "GO:0048070"
#> [181] "GO:0048285" "GO:0048468" "GO:0048513" "GO:0048518" "GO:0048522"
#> [186] "GO:0048583" "GO:0048584" "GO:0048588" "GO:0048589" "GO:0048666"
#> [191] "GO:0048667" "GO:0048675" "GO:0048699" "GO:0048731" "GO:0048762"
#> [196] "GO:0048812" "GO:0048856" "GO:0048858" "GO:0048863" "GO:0048864"
#> [201] "GO:0048869" "GO:0048870" "GO:0048878" "GO:0050789" "GO:0050790"
#> [206] "GO:0050793" "GO:0050794" "GO:0050801" "GO:0050886" "GO:0050896"
#> [211] "GO:0050900" "GO:0050920" "GO:0050921" "GO:0050931" "GO:0051046"
#> [216] "GO:0051047" "GO:0051049" "GO:0051050" "GO:0051094" "GO:0051128"
#> [221] "GO:0051130" "GO:0051174" "GO:0051179" "GO:0051234" "GO:0051239"
#> [226] "GO:0051240" "GO:0051246" "GO:0051247" "GO:0051338" "GO:0051347"
#> [231] "GO:0051641" "GO:0051649" "GO:0051716" "GO:0051726" "GO:0051783"
#> [236] "GO:0051785" "GO:0055074" "GO:0055080" "GO:0055082" "GO:0055085"
#> [241] "GO:0060047" "GO:0060255" "GO:0060326" "GO:0060485" "GO:0060560"
#> [246] "GO:0061564" "GO:0065007" "GO:0065008" "GO:0065009" "GO:0070887"
#> [251] "GO:0071621" "GO:0071705" "GO:0071805" "GO:0071840" "GO:0071900"
#> [256] "GO:0071902" "GO:0080090" "GO:0090066" "GO:0090068" "GO:0090257"
#> [261] "GO:0090497" "GO:0097485" "GO:0097529" "GO:0097530" "GO:0097746"
#> [266] "GO:0098655" "GO:0098660" "GO:0098662" "GO:0098771" "GO:0120036"
#> [271] "GO:0120039" "GO:0120305" "GO:0140014" "GO:0140352" "GO:0141124"
#> [276] "GO:1901379" "GO:1901381" "GO:1902531" "GO:1902533" "GO:1903047"
#> [281] "GO:1903522" "GO:1903524" "GO:1903530" "GO:1903532" "GO:1904062"
#> [286] "GO:1904064" "GO:1990138" "GO:1990266" "GO:2000145" "GO:2000147"
#> [291] "GO:0005575" "GO:0005576" "GO:0005615" "GO:0110165" "GO:0001664"
#> [296] "GO:0003674" "GO:0005102" "GO:0005179" "GO:0005488" "GO:0005515"
#> [301] "GO:0030545" "GO:0030546" "GO:0031705" "GO:0031708" "GO:0048018"
#> [306] "GO:0071855" "GO:0098772" "GO:0140677"
#>
#> $ENSG00000124207
#> [1] "GO:0006606" "GO:0006611" "GO:0006810" "GO:0006886" "GO:0006913"
#> [6] "GO:0008104" "GO:0008150" "GO:0009987" "GO:0015031" "GO:0033036"
#> [11] "GO:0033365" "GO:0034504" "GO:0045184" "GO:0046907" "GO:0051168"
#> [16] "GO:0051169" "GO:0051170" "GO:0051179" "GO:0051234" "GO:0051641"
#> [21] "GO:0051649" "GO:0070727" "GO:0071705" "GO:0072594" "GO:0005575"
#> [26] "GO:0005576" "GO:0005615" "GO:0005622" "GO:0005634" "GO:0005635"
#> [31] "GO:0005654" "GO:0005737" "GO:0005829" "GO:0012505" "GO:0016020"
#> [36] "GO:0031967" "GO:0031974" "GO:0031981" "GO:0031982" "GO:0043226"
#> [41] "GO:0043227" "GO:0043229" "GO:0043230" "GO:0043231" "GO:0043233"
#> [46] "GO:0065010" "GO:0070013" "GO:0070062" "GO:0110165" "GO:1903561"
#> [51] "GO:0003674" "GO:0005049" "GO:0005488" "GO:0005515" "GO:0019899"
#> [56] "GO:0031267" "GO:0051020" "GO:0140104" "GO:0140142"
#>