This function validates if given motifs can be injected to a sequence of given length

validate_motifs(motifs, sequence_length)

Arguments

motifs

list of motifs we are checking

sequence_length

length of sequence we want to inject

Value

logical value if such injection is possible

Examples

set.seed(42)
motifs <- generate_motifs(1:4, n_motifs = 2, n_injections = 2, n = 3, d = 3)
validate_motifs(motifs, 7)
#> [1] TRUE
validate_motifs(motifs, 9)
#> [1] TRUE