align-utils            package:Biostrings            R Documentation

_U_t_i_l_i_t_y _f_u_n_c_t_i_o_n_s _r_e_l_a_t_e_d _t_o _s_e_q_u_e_n_c_e _a_l_i_g_n_m_e_n_t

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

     A variety of different functions used to deal with sequence
     alignments.

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

       consmat(x, freq=TRUE)

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

       x: A character vector, or an instance of either the BStringView,
          or the  XStringAlign classes. 

    freq: If 'TRUE' then letter frequencies (per position) are
          reported,  otherwise counts. 

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

     'consmat' computes a consensus matrix for a set of equal-length
     strings assumed to be aligned.

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

     XStringViews-class, XStringAlign

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

       file <- system.file("extdata", "someORF.fa", package="Biostrings")
       orf <- read.DNAStringSet(file, "fasta")

       ## To illustrate, the following example assumes the ORF data
       ## to be aligned for the first 10 positions (patently false):
       orf10 <- DNAStringSet(orf, end=10)
       consmat(orf10)

       ## For the character matrix containing the "exploded" representation
       ## of the views, do:
       as.matrix(orf10, mode="character")

