snpm2phase              package:GGtools              R Documentation

_c_o_n_v_e_r_t _i_n_f_o_r_m_a_t_i_o_n _i_n _a _s_n_p._m_a_t_r_i_x _t_o _P_H_A_S_E _i_n_p_u_t _f_o_r_m_a_t;
_i_n_v_o_k_e_P_h_a_s_e _c_a_n _r_u_n _a _s_u_i_t_a_b_l_y _i_n_s_t_a_l_l_e_d _v_e_r_s_i_o_n _o_f _P_H_A_S_E

_D_e_s_c_r_i_p_t_i_o_n:

     convert information in a snp.matrix to PHASE input format;
     invokePhase can run a suitably installed version of PHASE

_U_s_a_g_e:

     snpm2phase(snpm, cnum, outfilename)
     parsePh.out(fn)
     personalHap(x)

_A_r_g_u_m_e_n_t_s:

    snpm: snp.matrix instance

    cnum: chromosome number as chrnum instance

outfilename: character name of file to write

      fn: character name of PHASE .out file to read

       x: output of parsePh.out

_D_e_t_a_i_l_s:

     follows phase 2.1 documentation for input format

     a phaseInput container class can store relevant metadata

_V_a_l_u_e:

     writes to a file and gives a message

_A_u_t_h_o_r(_s):

     Vince Carey <stvjc@channing.harvard.edu>

_E_x_a_m_p_l_e_s:

     data(smtest)
     tt = tempfile()
     pin = snpm2phase(smtest, chrnum(20), tt)

     class(pin)
     getClass("phaseInput")
     pin
     readLines(tt)
     unlink(tt)
     pp = parsePh.out(system.file("phaseOut/cpne1_20k.out", package="GGtools"))
     pp[[1]][1:3]
     personalHap(pp)

