get_names: Get the full names of gene ontology categories given the IDs

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/get_names.R

Description

Returns the full names and the domains of GO-categories given the GO-IDs, e.g. 'GO:0042254'. By default the package's integrated GO-graph is used, but a custom ontology can be defined, too.

Usage

1
get_names(go_ids, term_df = NULL, godir = NULL)

Arguments

go_ids

a character() vector of GO-IDs, e.g. c('GO:0051082', 'GO:0042254').

term_df

optional data.frame() with an ontology 'term' table. Alternative to the default integrated GO-graph or godir.

godir

optional character() specifying a directory that contains the ontology table 'term.txt'. Alternative to the default integrated GO-graph or term_df.

Details

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.

Value

a data.frame() with three columns: go_id (character()), go_name (character()) and root_node (domain, character()).

Author(s)

Steffi Grote

References

[1] Ashburner, M. et al. (2000). Gene Ontology: tool for the unification of biology. Nature Genetics 25, 25-29.

See Also

get_ids
get_child_nodes
get_parent_nodes

Examples

1
2
## get the full names of three random GO-IDs
get_names(c('GO:0051082', 'GO:0042254', 'GO:0000109'))

Example output

Loading required package: vioplot
Loading required package: sm
Package 'sm', version 2.2-5.6: type help(sm) for summary information
Loading required package: zoo

Attaching package:zooThe following objects are masked frompackage:base:

    as.Date, as.Date.numeric

Warning message:
no DISPLAY variable so Tk is not available 
       go_id                            go_name          root_node
1 GO:0051082           unfolded protein binding molecular_function
2 GO:0042254                ribosome biogenesis biological_process
3 GO:0000109 nucleotide-excision repair complex cellular_component

GOfuncR documentation built on Nov. 8, 2020, 8:27 p.m.