needwunsQS            package:Biostrings            R Documentation

(_D_e_p_r_e_c_a_t_e_d) _N_e_e_d_l_e_m_a_n-_W_u_n_s_c_h _G_l_o_b_a_l _A_l_i_g_n_m_e_n_t

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

     Simple gap implementation of Needleman-Wunsch global alignment
     algorithm.

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

     needwunsQS(s1, s2, substmat, gappen = 8)

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

  s1, s2: an R character vector of length 1 or an XString object.

substmat: matrix of alignment score values.

  gappen: penalty for introducing a gap in the alignment.

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

     Follows specification of Durbin, Eddy, Krogh, Mitchison (1998).
     This function has been deprecated and is being replaced by
     'pairwiseAlignment'.

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

     An instance of class '"PairwiseAlignedXStringSet"'.

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

     Vince Carey (stvjc@channing.harvard.edu) (original author) and H.
     Pages (current maintainer).

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

     R. Durbin, S. Eddy, A. Krogh, G. Mitchison, Biological Sequence
     Analysis, Cambridge UP 1998, sec 2.3.

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

     pairwiseAlignment, PairwiseAlignedXStringSet-class,
     substitution.matrices

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

     ## Not run: 
       ## This function has been deprecated
       ## Use 'pairwiseAlignment' instead.

       ## nucleotide alignment
       mat <- matrix(-5L, nrow = 4, ncol = 4)
       for (i in seq_len(4)) mat[i, i] <- 0L
       rownames(mat) <- colnames(mat) <- DNA_ALPHABET[1:4]
       s1 <- DNAString(paste(sample(DNA_ALPHABET[1:4], 1000, replace=TRUE), collapse=""))
       s2 <- DNAString(paste(sample(DNA_ALPHABET[1:4], 1000, replace=TRUE), collapse=""))
       nw0 <- needwunsQS(s1, s2, mat, gappen = 0)
       nw1 <- needwunsQS(s1, s2, mat, gappen = 1)
       nw5 <- needwunsQS(s1, s2, mat, gappen = 5)

       ## amino acid alignment
       needwunsQS("PAWHEAE", "HEAGAWGHEE", substmat = "BLOSUM50")
     ## End(Not run)

