This function generates multiple motifs from alphabet

generate_motifs(
  alphabet,
  n_motifs,
  n_injections,
  n,
  d,
  motifProbs = NULL,
  validate = TRUE,
  sequence_length = 10
)

Arguments

alphabet

elements used to generate a motif

n_motifs

number of motifs to generate

n_injections

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`)

n

maximum number of alphabet elements

d

number of possible gaps

motifProbs

alphabet elements' probabilites

validate

if true, returns a set of motifs that can be injected to a sequence of length 10

sequence_length

length of a sequence that must contain all motifs

Value

list of generated motifs

Examples

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"
#>