findSubComp              package:ScISI              R Documentation

_A _f_u_n_c_t_i_o_n _t_h_a_t _l_o_o_k_s _f_o_r _e_i_t_h_e_r _e_q_u_a_l_i_t_y _b_e_t_w_e_e_n _t_w_o _c_o_m_p_l_e_x_e_s
_o_r _c_o_m_p_l_e_t_e _c_o_n_t_a_i_n_m_e_n_t _o_f _o_n_e _c_o_m_p_l_e_x _i_n _a_n_o_t_h_e_r

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

     This function determines if either a complex C-i of bg1 is equal
     to some complex K-j of bg2 or if a complex C-i (or K-j) is a
     subcomplex to K-j (or C-i).

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

     findSubComp(bg1, bg2, interSectMat, simMat)

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

     bg1: The first bipartite graph matrix

     bg2: The second bipartite graph matrix; bg2 may be equal to bg1

interSectMat: A matrix whose rows and columns are indexed by protein
          complexes: the rows are indexed by complexes of bg1 (colnames
          of bg1) and the columns indexed by complexes of bg2 (colnames
          of bg2). The (i,j) entries is the cardinality of the
          intersection between the i-th complex of bg1 and the j-th
          complex of bg2.

  simMat: A matrix of similarity measures (e.g. Jaccard Index) between
          two bipartite graphs where the rows are indexed by complexes
          of the first bipartite graph, bg1, and the columns are
          indexed by the complexes of the second bipartite graph, bg2.
          The (i,j) entry of this matrix would be the similarity
          between C-i of bg1 and K-j of bg2.

_D_e_t_a_i_l_s:

     This function uses interSectMat and simMat to determine which
     complexes C-i of bg1 is equal to which complexes K-j of bg2. When
     the function finds an equality, C-i = K-j, it produces 5
     statistics:

     1. The name of C-i 2. The name of K-j 3. The cardinality of C-i 4.
     The cardinality of K-j 5. The cardinality of (C-i intersect K-j)

     When all the equality of complexes have been found, this function
     also uses interSectMat and simMat to find which complexes C-i (or
     K-j) completely contain complexes K-n (or C-m respectively), i.e.
     which complexes are subcomplexes. It also returns the 5 statistics
     listed above.

     NB - from the 5 statistics above, it will be clear if the
     relationship between the complexes is that of equality or
     sub-ordination.

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

 record1: A list of lists. The value of each sublist is: 1. a complex
          of bg1, 2. a complex of bg2, 3. the cardinality of the
          complex of bg1, 4. the cardinality of the complex of bg2, 5.
          the cardinality of these two complexes mutual intersection.

 record3: A list of lists. The value of each sublist is: 1. a complex
          of bg1, 2. a complex of bg2, 3. the cardinality of the
          complex of bg1, 4. the cardinality of the complex of bg2, 5.
          the cardinality of these two complexes mutual intersection.

 toBeRm1: A character vector of the names of complexes in bg1 that
          equal some complex in bg2. These complexes should be deleted
          to avoid redundancy if these two bipartite graphs are merged.

 toBeRm2: A character vector of the names of complexes from either bg1
          or bg2 which are sub-complexes of another protein complex.

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

     Tony Chiang

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

     go = getGOInfo()
     mips = getMipsInfo()
     goM = createGOMatrix(go)
     mipsM = createMipsMatrix(mips)
     cc = runCompareComplex(mipsM, goM, byWhich = "ROW")

