IniziaInizia gratis

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?

Questo esercizio fa parte del corso

Introduction to Bioconductor in R

Visualizza il corso

Esercizio pratico interattivo

Passa dalla teoria alla pratica con uno dei nostri esercizi interattivi

Inizia esercizio