filterGOByOntology         package:annotate         R Documentation

_F_i_l_t_e_r _G_O _t_e_r_m_s _b_y _a _s_p_e_c_i_f_i_e_d _G_O _o_n_t_o_l_o_g_y

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

   goids: a character vector of GO IDs

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

_V_a_l_u_e:

     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'.

_A_u_t_h_o_r(_s):

     Seth Falcon

_E_x_a_m_p_l_e_s:

     haveGO <- suppressWarnings(require("GO"))
     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")

