where

0th

Percentile

Find Patterns in DNA Sequences

This function finds patterns in a single or a set of DNA sequences.

Keywords
manip
Usage
where(x, pattern)
Arguments
x

an object of class "DNAbin".

pattern

a character string to be searched in x.

Details

If x is a vector, the function returns a single vector giving the position(s) where the pattern was found. If x is a matrix or a list, it returns a list with the positions of the pattern for each sequence.

Patterns may be overlapping. For instance, if pattern = "tata" and the sequence starts with `tatata', then the output will be c(1, 3).

Value

a vector of integers or a list of such vectors.

See Also

DNAbin, image.DNAbin

Aliases
  • where
Examples
# NOT RUN {
data(woodmouse)
where(woodmouse, "tata")
# }
Documentation reproduced from package ape, version 4.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.