get_child_nodes: Get all child nodes of gene ontology categories

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

View source: R/get_child_parent_nodes.R

Description

Returns all child nodes (sub-categories) of GO-categories given their GO-IDs, e.g. c('GO:0042254', 'GO:0000109'). The output also states the shortest distance to the child node. Note that a GO-ID itself is also considered as child with distance 0.

Usage

1
get_child_nodes(go_ids, term_df = NULL, graph_path_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. Also needs graph_path_df.

graph_path_df

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

godir

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

Details

By default the package's integrated GO-graph is used, but a custom ontology can be defined, too. For details on how to use a custom ontology with term_df + graph_path_df or godir please refer to the package's vignette. The advantage of term_df + graph_path_df over godir is that the latter reads the files 'term.txt' and 'graph_path.txt' from disk and therefore takes longer.

Value

a data.frame() with four columns: parent GO-ID (character()), child GO-ID (character()), child GO-name (character()) and distance (numeric()).

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_names
get_parent_nodes

Examples

1
2
3
## get the child nodes (sub-categories) of two random GO-IDs
child_nodes = get_child_nodes(c('GO:0090070', 'GO:0000112'))
child_nodes

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 
  parent_go_id child_go_id
1   GO:0000112  GO:0000112
2   GO:0000112  GO:0000440
3   GO:0090070  GO:0090070
4   GO:0090070  GO:2000202
5   GO:0090070  GO:2000234
6   GO:0090070  GO:2000205
7   GO:0090070  GO:2000208
                                                          child_name distance
1                        nucleotide-excision repair factor 3 complex        0
2                         core TFIIH complex portion of NEF3 complex        1
3                         positive regulation of ribosome biogenesis        0
4       positive regulation of ribosomal subunit export from nucleus        1
5                             positive regulation of rRNA processing        1
6 positive regulation of ribosomal large subunit export from nucleus        2
7 positive regulation of ribosomal small subunit export from nucleus        2

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