Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

filterGOByOntology

Filter GO terms by a specified GO ontology


Description

Given a character vector containing GO identifiers, return a logical vector indicating which GO IDs are in the specified ontology (BP, CC, or MF).

Usage

filterGOByOntology(goids, ontology = c("BP", "CC", "MF"))

Arguments

goids

a character vector of GO IDs

ontology

One of "BP", "CC", or "MF"

Value

A logical vector with length equal to goids. A TRUE indicates that the corresponding GO ID in goids is a member of the ontology specified by ontology.

Author(s)

Seth Falcon

Examples

haveGO <- suppressWarnings(require("GO.db"))
if (haveGO) {
    ids <- c("GO:0001838", "GO:0001839")
    stopifnot(all(filterGOByOntology(ids, "BP")))
    stopifnot(!any(filterGOByOntology(ids, "MF")))
} else cat("Sorry, this example requires the GO package\n")

annotate

Annotation for microarrays

v1.68.0
Artistic-2.0
Authors
R. Gentleman
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.