This function check if at least one of provided motifs is contained in the provided sequence.

contains_motif(sequence, motifs)

Arguments

sequence

a vector of characters

motifs

list of motifs

Value

randomly generated sequences

Examples

alph <- 1:4
motifs <- generate_motifs(alph, 3, 3, 3, 2)
sequence <- sample(alph,  100, replace = TRUE)
contains_motif(sequence, motifs)
#> [1] TRUE