run_between_pca            package:bgafun            R Documentation

_r_u_n _P_C_A _t_o _i_d_e_n_t_i_f_y _f_u_n_c_t_i_o_n_a_l _p_o_s_i_t_i_o_n_s _i_n _a_n _a_l_i_g_n_m_e_n_t

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

     This is a cover function that runs supervised PCA on a matrix that
     represents an alignment. The matrix can either be a binary matrix
     (with or without pseudocounts) or one that represents the
     properties at each position of the alignment

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

      run_between_pca(x,z,y)

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

       x: Matrix representation of alignment generated by
          convert_aln_amino 

       z: Matrix representation of alignment generated by
          convert_aln_amino or convert_aln_AAP 

       y: Vector or factor that shows the group representation for each
          sequence in the alignment

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

     library(bgafun)
     data(LDH)
     data(LDH.groups)
     #Used to calculate the sequence weights
     data(LDH.amino.gapless)
     data(LDH.aap.ave)
     #Run the analysis
     LDH.aap.ave.bga=run_between_pca(LDH.amino.gapless,LDH.aap.ave,LDH.groups)
     class(LDH.aap.ave.bga)
     #to visualise the results
     plot(LDH.aap.ave.bga)

