expandedLevel           package:goProfiles           R Documentation

_F_u_n_c_t_i_o_n _t_o _c_r_e_a_t_e _e_x_p_a_n_d_e_d _l_e_v_e_l_s _w_h_i_c_h _c_a_n _c_o_n_t_a_i_n _G_O _T_e_r_m_s _a_t
_d_i_f_f_e_r_e_n_t _G_O _l_e_v_e_l_s

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

     This function, combined with function 'expandTerm', allows to
     create mixed levels which can contain terms belonging to different
     GO levels. Specifically one can take one (or several, but one by
     one) term at a given GO level and expand it into its children
     terms using function expandTerm and then combine them into a new
     level using this function.

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

     expandedLevel(LevelTerms, Term2Expand, onto)
     expandTerm(GOTerm, onto)

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

LevelTerms: Other terms which have not been expanded, and will be
          combined with the expanded ones

Term2Expand: The GO term which will be substituted by its children
          terms

  GOTerm: The GO term which will be substituted by its children terms

    onto: The ontology ('MF','BP','CC'

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

     The value returned is the vector combining the original terms with
     the children of the term that had to be expanded.

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

     Alex Sanchez

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

     got<-toTable(GOTERM)[,2:3]
     desc<-function(s) got[got[,1]==s,2]
     MFLevel2<-getGOLevel("MF",2)
     bindingLevel2<-MFLevel2 [2]
     bindingLevel3 <- expandTerm(bindingLevel2,"MF")
     print(descbindingLevel3<-as.matrix(sapply(bindingLevel3,desc )))
     mixedLevel<-c(MFLevel2[-2],bindingLevel3)
     print(mixedLevel<-as.matrix(sapply(mixedLevel,desc )))

