incidence-methods          package:GSEABase          R Documentation

_M_e_t_h_o_d_s _f_o_r _C_o_n_s_t_r_u_c_t_i_n_g _I_n_c_i_d_e_n_c_e _M_a_t_r_i_c_i_e_s _B_e_t_w_e_e_n _G_e_n_e_S_e_t_s

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

     An incidence matrix summarizes shared membership of gene
     identifiers across (pairs of) gene sets.

_M_e_t_h_o_d_s:

          The return value is a matrix with rows representing gene sets
          and columns genes.

      '_s_i_g_n_a_t_u_r_e(_x = "_G_e_n_e_C_o_l_o_r", ...)'  All additional arguments '...'
          are 'GeneColor' sets. The incidence matrix is contains
          elements 0 (genes not present) or 1 (genes present).


      '_s_i_g_n_a_t_u_r_e(_x = "_G_e_n_e_S_e_t_C_o_l_l_e_c_t_i_o_n", ...)'  Additional arguments
          '...' can be of class 'GeneSetCollection' or 'GeneSet'. The
          incidence matrix contains elements 0 (genes not present) or 1
          (genes present).

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

     fl <- system.file("extdata", "Broad.xml", package="GSEABase")
     gss <- getBroadSets(fl) # GeneSetCollection of 2 sets
     ## From one or more GeneSetCollections...
     imat <- incidence(gss)
     dim(imat)
     imat[,c(1:3,ncol(imat)-3+1:3)]

     ## .. or GeneSets
     imat1 <- incidence(gss[[1]], gss[[2]], gss[[1]])
     imat1[,1:5]

