get_child_nodes {GOfuncR} | R Documentation

## Get all child nodes of gene ontology categories

### 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

    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

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

[Package GOfuncR version 1.4.0 Index]