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 )

