motif.find | R Documentation |
Return Position Indices of a Short Sequence Motif Within a Larger Sequence.
motif.find(motif, sequence)
motif |
a character vector of the short sequence motif. |
sequence |
a character vector of the 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.
Returns a vector of position indices within the sequence where the motif was found, see examples.
Barry Grant
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
regexpr
, read.fasta
, pdbseq
# PDB server connection required - testing excluded
try({
aa.seq <- pdbseq( read.pdb( get.pdb("4q21", URLonly=TRUE) ) )
motif = c("G....GKS")
motif.find(motif, aa.seq)
}, silent=TRUE)
if(inherits(.Last.value, "try-error")) {
message("Need internet to run the example")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.