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)

