top_residues_2_groups         package:bgafun         R Documentation

_R_e_t_u_r_n _a _l_i_s_t _o_f _t_h_e _t_o_p _r_e_s_i_d_u_e_s _a_t _e_i_t_h_e_r _e_n_d _o_f _t_h_e _a_x_i_s

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

     This will identify the residues that are most discriminating
     between the two groups, and as such are most likely to be
     specifity determining resdius It will return a list of the
     residues at the end of the axis in a bga analysis. It is used when
     there are two groups.  The function create_profile_strings can be 
     used to look at the amino acid content in the column that the
     analysis identifies

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

      top_residues_2_groups(bga_results,residue_number=20)

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

bga_results: Results of BGA analysis, either from BGA or
          run_between_pca function  

residue_number: Number of positions at each end of the axis to return 

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

     library(bgafun)
     data(LDH.groups)
     data(LDH.amino.gapless)
     LDH.binary.bga=bga(t(LDH.amino.gapless+1),LDH.groups)
     top_res=top_residues_2_groups(LDH.binary.bga)
     #To tidy up the results
     names(top_res)=sub("X","",names(top_res))
     # to look at the amino acid content in the alignment 
     LDH.profiles=create_profile_strings(LDH.amino.gapless,LDH.groups)
     LDH.profiles[, colnames(LDH.profiles) %in% names(top_res)]

