get_ids: Get the ID of a GO-category given its name

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

View source: R/get_ids.R

Description

Returns GO-categories given (part of) their name. Matching is not case-sensitive.

Usage

1
    get_ids(go_name, term_df = NULL, godir = NULL)

Arguments

go_name

character(). (partial) name of a GO-category

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: the full names (character()) of the GO-categories that contain go_name; together with the GO-domain ('cellular_component', 'biological_process' or 'molecular_function') and the GO-category IDs (character()).

Note

This is just a grep(..., ignore.case=TRUE) on the node names of the ontology.
More sophisticated searches, e.g. with regular expressions, could be performed on the table returned by get_ids('') which lists all non-obsolete GO-categories.

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
get_child_nodes

Examples

1
2
3
4
5
6
7
8
9
## get GO-IDs of categories that contain 'gabaergic' in their names
get_ids('gabaergic')

## get GO-IDs of categories that contain 'blood-brain barrier' in their names
get_ids('blood-brain barrier')

## get all valid GO-categories
all_nodes = get_ids('')
head(all_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 
                                                 node_name          root_node
1          cerebral cortex GABAergic interneuron migration biological_process
2        GABAergic neuron differentiation in basal ganglia biological_process
3    cerebral cortex GABAergic interneuron differentiation biological_process
4    cerebral cortex GABAergic interneuron fate commitment biological_process
5        cerebral cortex GABAergic interneuron development biological_process
6           regulation of synaptic transmission, GABAergic biological_process
7  negative regulation of synaptic transmission, GABAergic biological_process
8  positive regulation of synaptic transmission, GABAergic biological_process
9                         synaptic transmission, GABAergic biological_process
10                        GABAergic neuron differentiation biological_process
        go_id
1  GO:0021853
2  GO:0021858
3  GO:0021892
4  GO:0021893
5  GO:0021894
6  GO:0032228
7  GO:0032229
8  GO:0032230
9  GO:0051932
10 GO:0097154
                                                                   node_name
1                           establishment of endothelial blood-brain barrier
2                         maintenance of permeability of blood-brain barrier
3                                       establishment of blood-brain barrier
4                                 establishment of glial blood-brain barrier
5                         regulation of establishment of blood-brain barrier
6                positive regulation of establishment of blood-brain barrier
7                negative regulation of establishment of blood-brain barrier
8                            copper ion transport across blood-brain barrier
9                                       transport across blood-brain barrier
10                  regulation of lipid transport across blood-brain barrier
11         negative regulation of lipid transport across blood-brain barrier
12         positive regulation of lipid transport across blood-brain barrier
13          regulation of maintenance of permeability of blood-brain barrier
14 negative regulation of maintenance of permeability of blood-brain barrier
15 positive regulation of maintenance of permeability of blood-brain barrier
16                                lipid transport across blood-brain barrier
17                           xenobiotic transport across blood-brain barrier
            root_node      go_id
1  biological_process GO:0014045
2  biological_process GO:0035633
3  biological_process GO:0060856
4  biological_process GO:0060857
5  biological_process GO:0090210
6  biological_process GO:0090211
7  biological_process GO:0090212
8  biological_process GO:0097716
9  biological_process GO:0150104
10 biological_process GO:1903000
11 biological_process GO:1903001
12 biological_process GO:1903002
13 biological_process GO:1905603
14 biological_process GO:1905604
15 biological_process GO:1905605
16 biological_process GO:1990379
17 biological_process GO:1990962
                         node_name          root_node      go_id
1        mitochondrion inheritance biological_process GO:0000001
2 mitochondrial genome maintenance biological_process GO:0000002
3                     reproduction biological_process GO:0000003
4              vacuole inheritance biological_process GO:0000011
5       single strand break repair biological_process GO:0000012
6        alpha-glucoside transport biological_process GO:0000017

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