searchGO: Search GO terms for a matching pattern

Description Usage Arguments Details Value Author(s) Examples

View source: R/searchGO.R

Description

This function searches the the Gene Ontology terms for a specific pattern. If run in interactive mode and if the pattern matches more then one term, the user is presented in a menu to choose one term.

Usage

1
2
searchGO(pattern, namespace = c("CC", "BP", "MF"), ignore.case = TRUE,
  interactive = TRUE, graphics = getOption("menu.graphics"), ...)

Arguments

pattern

A character of length 1 (subsequent elements are ignored with a warning) to search for in GO.

namespace

One or multiple GO namespaces to search for pattern. Must match "CC", "MF" and "BP".

ignore.case

Should case be ignored. Default is TRUE.

interactive

If TRUE (default) and several GO terms matched pattern, a menu is provided to the user to select one term.

graphics

Should a graphical menu be used. Defaults to getOption("menu.graphics").

...

Additional parameters, except ignore.case (see above), passed to grep.

Details

This function searches the identifier, term and synonym fields of all Gene Ontology or only a subset of the possible namespaces. The pattern is cases insensitive, unless otherwise stated, and more pattern matching can be further parametrised by passing additional arguments to the underlying grep function.

If more than one match is found and the function is used interactively, the user is presented with a menu to select a single term. If the users exits the menu without any selection (by choosing 0 or cancel), all matching identifiers are returned, as if the search was performed in non-interactive mode.

If not match is found, NULL is returned invisibly with a message.

Value

A character with the identifiers of matched GO terms of invisibly NULL if no matches were found.

Author(s)

Laurent Gatto

Examples

1
2
3
4
5
6
i <- interactive()
searchGO("Golgi", interactive = i)
searchGO("Golgi apparatus", interactive = i)
searchGO("Golgi apparatus", namespace = "CC", interactive = i)
searchGO("Golgi apparatus", namespace = "BP", interactive = i)
searchGO("Golgi apparatus", namespace = "MF", interactive = i)

lgatto/yagop documentation built on May 21, 2019, 6:08 a.m.