matchLRPatterns          package:Biostrings          R Documentation

_F_i_n_d _p_a_t_t_e_r_n_s _d_e_f_i_n_e_d _b_y _a _l_e_f_t _a_n_d _a _r_i_g_h_t _p_a_r_t _i_n _a _s_e_q_u_e_n_c_e

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

     [TODO]

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

       matchLRPatterns(Lpattern, Rpattern, max.ngaps, subject,
                       max.Lmismatch=0, max.Rmismatch=0,
                       Lfixed=TRUE, Rfixed=TRUE)

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

Lpattern: The left part of the pattern. 

Rpattern: The right part of the pattern. 

max.ngaps: The max number of gaps in the middle i.e the max distance
          between the left and right parts of the pattern. 

 subject: An XString, XStringViews or MaskedXString object containing
          the target sequence. 

max.Lmismatch: The maximum number of mismatching letters allowed in the
          left part of the pattern. If non-zero, an inexact matching
          algorithm is used (see the 'matchPattern' function for more
          information). 

max.Rmismatch: Same as 'max.Lmismatch' but for the right part of the
          pattern. 

  Lfixed: Only with a DNAString or RNAString subject can a 'Lfixed'
          value other than the default ('TRUE') be used.

          With 'Lfixed=FALSE', ambiguities (i.e. letters from the IUPAC
          Extended Genetic Alphabet (see 'IUPAC_CODE_MAP') that are not
          from the base alphabet) in the left pattern _and_ in the
          subject are interpreted as wildcards i.e. they match any
          letter that they stand for.

          See the 'fixed' argument of the 'matchPattern' function for
          more information. 

  Rfixed: Same as 'Lfixed' but for the right part of the pattern. 

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

     An XStringViews object containing all the matches, even when they
     are overlapping (see the examples below), and where the matches
     are ordered from left to right (i.e. by ascending starting
     position).

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

     H. Pages

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

     'matchPattern', 'matchProbePair', 'findPalindromes',
     'reverseComplement', XString-class, XStringViews-class,
     MaskedXString-class

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

       library(BSgenome.Dmelanogaster.UCSC.dm3)
       subject <- Dmelanogaster$chr3R
       Lpattern <- "AGCTCCGAG"
       Rpattern <- "TTGTTCACA"
       matchLRPatterns(Lpattern, Rpattern, 500, subject) # 1 match

       ## Note that matchLRPatterns() will return all matches, even when they are
       ## overlapping:
       subject <- DNAString("AAATTAACCCTT")
       matchLRPatterns("AA", "TT", 0, subject) # 1 match
       matchLRPatterns("AA", "TT", 1, subject) # 2 matches
       matchLRPatterns("AA", "TT", 3, subject) # 3 matches
       matchLRPatterns("AA", "TT", 7, subject) # 4 matches

