decodeCallCodes         package:GeneticsBase         R Documentation

_C_o_n_v_e_r_t_s _i_n_t_e_g_e_r _c_o_d_e_s _i_n _a _c_a_l_l_C_o_d_e_s _m_a_t_r_i_x _t_o _c_h_a_r_a_c_t_e_r _s_t_r_i_n_g
_r_e_p_r_e_s_e_n_t_a_t_i_o_n_s _o_f _g_e_n_e_S_e_t.

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

     Converts integer codes in a callCodes matrix to character string
     representations of geneSet.

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

     decodeCallCodes(callCodes, transTables, markerInfo)

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

callCodes: matrix of positive integers, such as the callCodes slot of a
          geneSet object. 

transTables: list of code translation tables, such as the transTables
          slot of a geneSet object. 

markerInfo: dataframe, with one row for each row in the callCodes
          matrix, such as the markerInfo slot of a geneSet object. Must
          include at least column "TransTable". 

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

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

     a character matrix with the same dimension and dimnames as
     argument callCodes, giving character string representations of
     genotypes, as specified by a set of translation tables.

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

     Scott D. Chasalow

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

     geneSet

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

     library(GeneticsBase)
     tTabList <- makeTransTableList(c("Bb", "ATG"), c("Generic", "SNP"))
     locus <- c("c104t", "c2249t")
     ttab <- c("SNP", "Generic")
     minfo <- makeMarkerInfo(locus, ttab)
     misscodes <- list(Generic = c("NA", ".", "-"), SNP = "N")
     r1 <- c(1, 2, 1, 1)
     r2 <- c(1, 2, 3, 2)
     data <- rbind(r1, r2) # callCodes
     dimnames(data) <- list(locus, paste("Sample", seq(along = r1),
             sep = "."))
     decodeCallCodes(data, tTabList, minfo)

