substitution.matrices       package:Biostrings       R Documentation

_S_c_o_r_i_n_g _m_a_t_r_i_c_e_s

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

     Predefined substitution matrices for nucleotide and amino acid
     alignments.

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

       data(BLOSUM45)
       data(BLOSUM50)
       data(BLOSUM62)
       data(BLOSUM80)
       data(BLOSUM100)
       data(PAM30)
       data(PAM40)
       data(PAM70)
       data(PAM120)
       data(PAM250)

_F_o_r_m_a_t:

     A square symmetric matrix with integer coefficients. The row and
     column names are identical and unique: each name is a single
     letter representing a nucleotide or an amino acid.

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

     Note that there can exist different versions of a given
     substitution matrix. For example, definition of widely used
     BLOSUM62 matrix varies depending on the source. Even a given
     source can provide different versions of it but the name is always
     BLOSUM62 and they provide no history or versioning mechanism! NCBI
     for example provides many matrices here
     ftp://ftp.ncbi.nih.gov/blast/matrices/ but their definitions don't
     match those of the matrices bundled with their stand-alone BLAST
     software available here ftp://ftp.ncbi.nih.gov/blast/

     The BLOSUM45, BLOSUM62, BLOSUM80, PAM30 and PAM70 matrices were
     taken from NCBI stand-alone BLAST software.

     The BLOSUM50, BLOSUM100, PAM40, PAM120 and PAM250 matrices were
     taken from ftp://ftp.ncbi.nih.gov/blast/matrices/

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

     H. Pages

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

     'pairwiseAlignment', XStringAlign-class, DNAString-class,
     AAString-class

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

       ## Align 2 amino acid sequences with the BLOSUM62 matrix
       aa1 <- AAString("HXBLVYMGCHFDCXVBEHIKQZ")
       aa2 <- AAString("QRNYMYCFQCISGNEYKQN")
       pairwiseAlignment(aa1, aa2, substitutionMatrix = "BLOSUM62", gapOpening = -3, gapExtension = -1)

       ## See how the gap penalty influences the alignment
       pairwiseAlignment(aa1, aa2, substitutionMatrix = "BLOSUM62", gapOpening = -6, gapExtension = -2)

       ## See how the substitution matrix influences the alignment
       pairwiseAlignment(aa1, aa2, substitutionMatrix = "BLOSUM50", gapOpening = -3, gapExtension = -1)

       ## Compare our BLOSUM62 with BLOSUM62 from ftp://ftp.ncbi.nih.gov/blast/matrices/
       data(BLOSUM62)
       BLOSUM62["Q", "Z"]
       file <- "ftp://ftp.ncbi.nih.gov/blast/matrices/BLOSUM62"
       b62 <- as.matrix(read.table(file, check.names=FALSE))
       b62["Q", "Z"]

