resolveMaps            package:AnnBuilder            R Documentation

_F_u_n_c_t_i_o_n_s _t_o _o_b_t_a_i_n _u_n_i_f_i_e_d _m_a_p_p_i_n_g_s _b_e_t_w_e_e_n _i_d_s

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

     These functions are used to obtained unified mappings between
     between two sets of ids based on the mappings available from
     different sources. Each source provide mappings between two sets
     of ids.

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

     resolveMaps(maps, trusted, srcs, colNames = NULL, outName = "", asFile = TRUE)
     getVote(voters, sep = "\t")
     getUnified(voters)
     getNoDup(voters)
     hasDelimit(entry, deli = ";") 

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

    maps: 'maps' a matrix with mappings for a set of key ids to another
          set of ids provided by different sources. The first column is
          assumed to the key ids and the rest are mappings to another
          set of ids provided by different sources

 trusted: 'trusted' a vector of characters to indicate the column
          number of "maps" whose mappings are more reliable and should
          be used when there are conflicts

    srcs: 'srcs' a vector of character strings for the names of columns
          that contain mappings from different sources

colNames: 'colNames' a vector of character strings for the names of
          columns in "maps"

 outName: 'outName' a character string for the name of the file to
          contain the unified mappings

  asFile: 'asFile' a boolean to indicate whether the unfied mappings
          will be saved as a file

  voters: 'voters' a vector containing mappings from different sources

   entry: 'entry' a character string to be checked for the existence of
          a separater

    deli: 'deli' a character string for a separator

     sep: 'sep' same as deli

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

     Each source may have different mappings from the key ids to
     another set of ids. 'resolveMaps' resolves the confilicts and
     derives a set of unified mappings based on the mappings provided
     from several sources.

     'getVote' resolves the mappings for a given key id and returns a
     vector with unified mapping and the number of sources that agree
     with the unified mapping.

     'getUnified' finds agreement among values in a vactor passed. If
     some values agree, get the one agreed by mose sources.

     'getNoDup' gets a value based on predefined rules when values from
     different sources do not agree.

     'hasDelimit' checks to see if a delimiter exists

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

     'resolveMaps' returns a matrix with the first colum being the key
     id set, second being the unified mappings to another id set, and
     third the total number of agreements found among sources.

     'getVote' returns a two element vector.

     'getUnified' returns a character string.

     'getNoDup' returns a character string.

     'hasDelimit' returns TRUE or FALSE.

_N_o_t_e:

     The functions are part of the Bioconductor project at Dana-Farber
     Cancer Institute to provide Bioinformatics functionalities through
     R

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

     Jianhua Zhang

_S_e_e _A_l_s_o:

     'LL-class', 'UG-class'

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

     maps <- matrix(c("id1", "a", "a", "b", "id2", "c","d", "c",
     "id3", "e","e", "e", "id4", NA, "f", NA, "id5", "g", NA, "h", "id6", NA,
     "NA", "i", "id7", NA, NA, NA), ncol = 4, byrow = TRUE)
     unified <- resolveMaps(maps, c("srcll", "srcug"),
     c("srcll", "srcug", "srcgeo"),
     colNames = c("key1", "srcll", "srcug", "srcgeo"), outName = "",
     asFile = FALSE)

