motif.find(motif, sequence)
Return Position Indices of a Short Sequence Motif Within a Larger Sequence.
The sequence and the motif can be given as a either a multiple or
single element character vector. The dot character and other valid
regexpr
characters are allowed in the motif, see examples.
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
# PDB server connection required - testing excluded aa.seq <- pdbseq( read.pdb( get.pdb("4q21", URLonly=TRUE) ) ) motif = c("G....GKS") motif.find(motif, aa.seq)[1] 10 11 12 13 14 15 16 17