identity                package:bio3d                R Documentation

_P_e_r_c_e_n_t _I_d_e_n_t_i_t_y

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

     Determine the percent identity scores for aligned sequences.

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

       identity(alignment)

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

alignment: sequence alignment obtained from 'read.fasta' or an
          alignment character matrix. 

_D_e_t_a_i_l_s:

     The percent identity value is a single numeric score determined
     for each pair of aligned sequences.  It measures the number of
     identical residues ("matches") in relation to the length of the
     alignment.

_V_a_l_u_e:

     Returns a numeric matrix with all pairwise identity values.

_A_u_t_h_o_r(_s):

     Barry Grant

_R_e_f_e_r_e_n_c_e_s:

     Grant, B.J. et al. (2006) _Bioinformatics_ *22*, 2695-2696.

_S_e_e _A_l_s_o:

     'read.fasta', 'ide.filter', 'entropy', 'consensus'

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

     ## Not run: 
     #aln <- read.fasta( system.file("examples/kinesin_xray.fa",
     #                     package = "bio3d") )
     ## End(Not run)

     data(kinesin)
     attach(kinesin)

     ide.mat <- identity(aln)

     # Plot identity matrix
     plot.dmat(ide.mat, color.palette=mono.colors,
               main="Sequence Identity", xlab="Structure No.",
               ylab="Structure No.")

     # Histogram of pairwise identity values
     hist(ide.mat[upper.tri(ide.mat)], breaks=30,xlim=c(0,1),
          main="Sequence Identity", xlab="Identity")

     # Compare two sequences
     identity( rbind(aln$ali[1,], aln$ali[20,]) )

