getGOInfo               package:ScISI               R Documentation

_A _f_u_n_c_t_i_o_n _t_h_a_t _p_a_r_s_e_s _t_h_r_o_u_g_h _t_h_e _G_O _d_a_t_a_b_a_s_e; _i_t _a_g_r_e_p_s _f_o_r _t_h_e
_t_e_r_m "_c_o_m_p_l_e_x" _a_n_d _g_r_e_p_s _s_u_f_f_i_x_e_s "-_a_s_e" _a_n_d "-_s_o_m_e" _a_n_d _r_e_t_u_r_n_s _n_o_d_e_s
_w_h_o_s_e _d_e_s_c_r_i_p_t_i_o_n _c_o_n_t_a_i_n_s _s_u_c_h _t_e_r_m_s.

_D_e_s_c_r_i_p_t_i_o_n:

     This function parses through the Cellular Component ontology for
     the GO nodes and searchs for the term "complex" or the suffix
     "-ase" (e.g. RNA Polymerase) or "-some" (e.g. ribosome) and (or)
     other user defined phrases in the description of these nodes.

_U_s_a_g_e:

     getGOInfo(wantDefault = TRUE, toGrep = NULL,
     parseType=NULL, eCode = NULL, wantAllComplexes = TRUE,
     includedGOTerms=NULL, not2BeIncluded=NULL)

_A_r_g_u_m_e_n_t_s:

wantDefault: A logical. If TRUE, the default parameters ("complex",
          "\Base\b" and "\Bsome\b") are used.

  toGrep: A character vector of the phrases (with Perl regular
          expressions) for which the function will parse through the GO
          database and search.

parseType: A character vector.This vector is in one to one
          correspondence with toGrep; it takes in the parse type such
          as "grep", "agrep", etc.

   eCode: A character vector of evidence codes (see
          "http://www.geneontology.org/GO.evidence.shtml" for details).
          The function will disallow any protein inclusion in the
          protein complexes if they are not indexed by evidence code
          other than those found in eCode.

wantAllComplexes: A logical. If TRUE, the function will incorporate all
          GO children of the nodes found by term searches. In addition,
          children of node GO:0043234 (the protein complex node) will
          also be incorporated.

includedGOTerms: A character vector of GO terms that will be parsed
          regardless of the default and parseType parameters. In 
          essence, these GO terms forced to be included.

not2BeIncluded: A character vector of GO terms that should not be
          parsed nor included in the output.

_D_e_t_a_i_l_s:

     This function's generic operation is to parse the GO database and
     search for pre-determined or chosen terms. It returns a named list
     of chracter vectors where the names are GO id's from the CC
     ontoloy and the vectors consist of proteins corresponding to that
     particular GO id. Running this function has multiple combinations:

     1. If the wantDefault parameter is TRUE, the function will agrep
     for "complex" and grep for "\Base\b" and "\Bsome\b".

     2. If toGrep is not NULL, it will be a character vector with terms
     and perl regular expressions that are intended for searching in
     the GO database. NB - it toGrep is not NULL, then parseType should
     also not be NULL as the parseType indicates how each term should
     be searched.

     3. parseType needs to be supplied if toGrep is not NULL. It is a
     character vector, either a single entry or of length equal to the
     length of toGrep, detailing how each term in toGrep will be parsed
     in the GO database. If only one term is supplied for parseType,
     then all the terms in toGrep will be parsed identically.
     Otherwise, the i-th term in parseType will reflect the parsing of
     the i-th term in toGrep.

     4. The eCode argument is a user determined refining mechanism. It
     takes in a vector of evidence codes (as detailed by the GO
     website). The function will dis-allow proteins if and only if
     these proteins are only indexed by evidence codes found within
     eCodes.

     5. If wantAllComplexes parameter is True, the function will also
     return the children of nodes found by parsing terms. In addition,
     the children of GO ID GD:0043234 (the protein complex ID) will be
     returned. The union of complexes is then returned.

_V_a_l_u_e:

     The return value is a list of size n (n depends on the current
     status of the GO database) where the name of each list element is
     a GO ID and each list element itself is a character vector
     consisting of the proteins corresponding to a particular GO ID:

"GO:XXXXXXX": A character vector containing proteins (not indexed by
          only eCode evidence codes) which make up protein complex
          "GO:XXXXXXXX"

_A_u_t_h_o_r(_s):

     Tony Chiang

_R_e_f_e_r_e_n_c_e_s:

     www.geneontology.org

_E_x_a_m_p_l_e_s:

     #go = getGOInfo(wantAllComplexes = FALSE)
     #goCoded = getGOInfo(code = c("IPI","ND","IDA"))
     #goPhrase = getGOInfo(wantDefault = FALSE, toGrep = "\Bsomal\b",
     #parseType = "grep", wantAllComplexes = FALSE)
     #nam1 = names(go)
     #nam2 = names(goCoded)
     #if(length(nam1) == length(nam2) && nam1 == nam2){
     #sapply(nam1, function(x) setdiff(go[[x]], goCoded[[x]]))
     #}

