Strains2rac             package:GGtools             R Documentation

_c_o_n_v_e_r_t _a _W_e_l_l_c_o_m_e '_S_t_r_a_i_n_s' _g_e_n_o_t_y_p_i_n_g _f_i_l_e _t_o _r_a_r_e _a_l_l_e_l_e _c_o_u_n_t _f_o_r_m

_D_e_s_c_r_i_p_t_i_o_n:

     convert a Wellcome 'Strains' genotyping file to rare allele count
     form, or create a racExSet using such a file

_U_s_a_g_e:

     Strains2rac(strfile)
     INBREDSworkflow(inbfile, emat, estrains, pd, mi, anno, fixup= NULL, fixchr =
          function(x) gsub("_random", "", x))

_A_r_g_u_m_e_n_t_s:

 strfile: name of the text file to be converted

 inbfile: name of the text file to be converted

    emat: matrix of expression data 

estrains: character vector of strains corresponding to columns of
          'emat'

      pd: 'AnnotatedDataFrame-class' instance for 'emat'

      mi: 'MIAME-class' instance

    anno: character string for annotation environment package

   fixup: transformation from columns of strain genotype file 'strfile'
          to 'estrains' tokens, if necessary

  fixchr: modify the chromosome tags if necessary 

_D_e_t_a_i_l_s:

_V_a_l_u_e:

     'Strains2rac' creates a list with genotype matrix, chr and pos

     'INBREDSworkflow' creates a list with components 'racExSet' and
     'snpMetaWhole' (because the INBREDS files are whole-genome, not
     chromosome specific)

_N_o_t_e:

     See the commented example for build 34 Wellcome Inbreds file for
     BXD strains, 'INB34snpMeta'.

_A_u_t_h_o_r(_s):

     Vince Carey <stvjc@channing.harvard.edu>

_R_e_f_e_r_e_n_c_e_s:

_S_e_e _A_l_s_o:

_E_x_a_m_p_l_e_s:

     fi = system.file("fileDemos/StrainInit.txt", package="GGtools")
     dem = Strains2rac(fi)
     names(dem)
     dim(dem[[1]])
     data(gse2031GG)
     fixbxd = function(x) {
     # because such various labels are used in the INBREDS file
      gsub("BXD\\.", "BXD", gsub(".Ty", "", gsub(".TyJ", "", x)))
     }
     INBREDSworkflow( fi, exprs(gse2031GG), as.character(gse2031GG$str),
             phenoData(gse2031GG), new("MIAME"), "mgu74av2", fixbxd )
     #
     # the real INB34snpMeta structure is built by
     # fixchr = function(x) gsub("_random", "", x)
     #INBREDSworkflow( "Strains-0.09052005.txt", exprs(gse2031GG), as.character(gse2031GG$str),
     #       phenoData(gse2031GG), new("MIAME"), "mgu74av2", fixbxd, fixchr )

