generate_motifs.Rd
This function generates multiple motifs from alphabet
generate_motifs(
alphabet,
n_motifs,
n_injections,
n,
d,
motifProbs = NULL,
validate = TRUE,
sequence_length = 10
)
elements used to generate a motif
number of motifs to generate
number of injections (for validation purposes: checks if each subset of motifs of size `n_injections` can be injected to a sequence of length `sequence_length`)
maximum number of alphabet elements
number of possible gaps
alphabet elements' probabilites
if true, returns a set of motifs that can be injected to a sequence of length 10
length of a sequence that must contain all motifs
list of generated motifs
generate_motifs(1:4, 5, 3, n = 6, d = 6)
#> Warning: longer object length is not a multiple of shorter object length
#> Warning: number of items to replace is not a multiple of replacement length
#> Warning: longer object length is not a multiple of shorter object length
#> Warning: number of items to replace is not a multiple of replacement length
#> Warning: longer object length is not a multiple of shorter object length
#> Warning: longer object length is not a multiple of shorter object length
#> Warning: number of items to replace is not a multiple of replacement length
#> [[1]]
#> [1] "4" "_" "_" "3" "1" "2"
#>
#> [[2]]
#> [1] "4" "_" "_" "1"
#>
#> [[3]]
#> [1] "3" "_" "_" "_" "2"
#>
#> [[4]]
#> [1] "3" "_" "_" "_" "3"
#>
#> [[5]]
#> [1] "2" "_" "_" "4" "_" "_" "_" "_" "3" "4" "2"
#>
generate_motifs(1:4, 5, 3, n = 6, d = 2, motifProbs = c(0.7, 0.1, 0.1, 0.1))
#> [[1]]
#> [1] "1" "1" "_" "_" "2"
#>
#> [[2]]
#> [1] "1" "_" "_" "1" "1"
#>
#> [[3]]
#> [1] "1" "_" "4"
#>
#> [[4]]
#> [1] "2" "_" "1"
#>
#> [[5]]
#> [1] "3" "1" "1" "_" "2" "2"
#>