vmatchPattern2: String searching function.

Description Usage Arguments Details Examples

View source: R/vmatchPattern2.R

Description

A functions for finding all the occurrences (aka "matches" or "hits") of a given pattern (typically short) in a (typically long) reference sequence or set of reference sequences (aka the subject). This is an updated version of vmatchPattern that take indels into account. Provided by Hervé Pagès on https://support.bioconductor.org/p/58350/

Usage

1
2
3
4
5
6
7
8
9
vmatchPattern2(
  pattern,
  subject,
  max.mismatch = 0,
  min.mismatch = 0,
  with.indels = FALSE,
  fixed = TRUE,
  algorithm = "auto"
)

Arguments

pattern

The pattern string.

subject

The String object for matching.

max.mismatch, min.mismatch

The minimum and maximum number of mismatching letters allowed.

with.indels

If TRUE then indels are allowed.

fixed

If TRUE (the default), an IUPAC ambiguity code in the pattern can only match the same code in the subject, and vice versa.

algorithm

One of the following: "auto", "naive-exact", "naive-inexact", "boyer-moore", "shift-or" or "indels".

...

Additional arguments for methods.

Details

See vmatchPattern for details.

Examples

1
2
3
x <- DNAString("AAGCGCGATATG")
m1 <- matchPattern("GCNNNAT", x)
m1

vroh/BC32_BarSeq documentation built on Jan. 25, 2021, 9:24 p.m.