bpMatrix              package:ppiStats              R Documentation

_T_h_i_s _f_u_n_c_t_i_o_n _g_e_n_e_r_a_t_e_s _t_h_e _B_a_i_t-_P_r_e_y _M_a_t_r_i_x _f_o_r _a_n
_p_r_o_t_e_i_n-_p_r_o_t_e_i_n _i_n_t_e_r_a_c_t_i_o_n (_p_p_i) _e_x_p_e_r_i_m_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     This function takes in experimental ppi data and generates the
     bait to prey adjacency matrix.

_U_s_a_g_e:

     bpMatrix(y2h, symMat = TRUE, homodimer = FALSE, baitAsPrey = FALSE, 
                   unWeighted=TRUE, onlyRecip=FALSE, baitsOnly=FALSE)

_A_r_g_u_m_e_n_t_s:

     y2h: A named list of character vectors.  The names of the list
          correspond to the baits used in the experimental technology.
          The  entries of the character vectors are those  proteins
          found as prey or a character(0) if  the bait did not find any
          prey.

  symMat: A logical, if TRUE, the matrix will be square with all the
          proteins documented in the experiment indexing both the row
          and column; if FALSE, only the baits index the rows, preys
          the columns.

homodimer: A logical. If TRUE, the matrix will record the presence of
          homodimers; if FALSE, all homodimers data will be deleted.

baitAsPrey: A logical; if TRUE, the columns will be indexed by both the
          bait and prey population while the rows will remain indexed
          by the baits exclusively.

unWeighted: A logical. If TRUE, the entries of the adjacency will be 
          binary (0,1) which records the presence of interactions or
          not. If FALSE, the entries of the matrix will be a natrual
          number to record the  multiplicity of the interaction found
          by the experiment.

onlyRecip: A logical. If TRUE, the adjacency matrix will be restricted 
          to only those interactions which are symmetric.

baitsOnly: A logical. If TRUE, the matrix will be indexed by the baits
          for both the rows and columns. If baitsOnly is TRUE, then
          baitsAsPrey must also be TRUE and symMat must be FALSE

_D_e_t_a_i_l_s:

     It is important to note that the weight of each directed edge is
     recorded by the number of instances bait b finds prey p.

_V_a_l_u_e:

     An adjacency matrix with weighting. The rows are indexed by those
     proteins sampled as baits (if symMat is true, only those rows with
     non-trivial row sums were sampled as baits) and the colunms are
     indexed by proteins detected as baits (et cetera).

_A_u_t_h_o_r(_s):

     T Chiang

_E_x_a_m_p_l_e_s:

     library(ppiData)
     data(y2hSysGW)
     eg <- y2hSysGW[2:4]
     lapply(eg, bpMatrix)

