Searching for a pattern
Let's find some occurrences of a pattern in the zikaVirus
set using vmatchPattern()
. Then, let's try the same pattern search using matchPattern()
with a single sequence, zikv
.
# For Sets
vmatchPattern(pattern = "ACATGGGCCTACCATGGGAG",
subject = zikaVirus, max.mismatch = 1)
# For single sequences
matchPattern(pattern = "ACATGGGCCTACCATGGGAG",
subject = zikv, max.mismatch = 1)
Both functions should find the same number of occurrences, but you will notice a different output. How many matches do we get when running each pattern search individually?
Este ejercicio forma parte del curso
Introduction to Bioconductor in R
Ejercicio interactivo práctico
Pon en práctica la teoría con uno de nuestros ejercicios interactivos
