Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/get_anno_categories.R
Returns all associated GO-categories given a vector of gene-symbols, e.g. c('SPAG5', 'BTC').
1 2 | get_anno_categories(genes, database = 'Homo.sapiens', annotations = NULL,
term_df = NULL, godir = NULL, silent = FALSE)
|
genes |
a character() vector of gene-symbols, e.g. c('SPAG5', 'BTC'). |
database |
optional character() defining an OrganismDb or OrgDb annotation package from Bioconductor, like 'Mus.musculus' (mouse) or 'org.Pt.eg.db' (chimp). |
annotations |
optional data.frame() with two character() columns: gene-symbols and GO-categories. Alternative to 'database'. |
term_df |
optional data.frame() with an ontology 'term' table.
Alternative to the default integrated GO-graph or |
godir |
optional character() specifying a directory that
contains the ontology table 'term.txt'.
Alternative to the default integrated GO-graph or |
silent |
logical. If TRUE all output to the screen except for warnings and errors is suppressed. |
Besides the default 'Homo.sapiens', also other OrganismDb or OrgDb packages from Bioconductor, like 'Mus.musculus' (mouse) or 'org.Pt.eg.db' (chimp), can be used. It is also possible to directly provide a dataframe with annotations, which is then searched for the input genes and filtered for GO-categories that are present in the ontology.
By default the package's integrated ontology is used, but a custom ontology can be defined, too.
For details on how to use a custom ontology with
term_df
or godir
please refer to the package's vignette.
The advantage of term_df
over godir
is that the latter
reads the file 'term.txt' from disk and therefore takes longer.
a data.frame() with four columns: gene (character()), GO-ID (character(), GO-name (character() and GO-domain (character()).
This gives only direct annotations of genes to GO-categories. By definition genes are also indirectly annotated to all parent nodes of those categories. Use get_parent_nodes
to get the higher level categories of the directly annotated GO-categories.
Also note that GO-categories which are not represented or obsolete in the internal GO-graph of GOfuncR or the custom ontology provided through term_df
or godir
are removed to be consistent with the annotations used in go_enrich
.
Steffi Grote
[1] Ashburner, M. et al. (2000). Gene Ontology: tool for the unification of biology. Nature Genetics 25, 25-29.
get_anno_genes
get_parent_nodes
get_names
1 2 3 | ## get the GO-annotations for two random genes
anno1 = get_anno_categories(c('BTC', 'SPAG5'))
head(anno1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.