This function is a wrapper for seqR counters

count_seq_kmers(sequences, alphabet, n = 4, d = 6)

Arguments

sequences

input data for k-mer counting

alphabet

elements used to generate a motif

n

maximum number of alphabet elements

d

number of possible gaps

Examples

n_seq <- 20
sequence_length <- 10
alph <- letters[1:6]
motifs <- generate_motifs(alph, 3, 3, 3, 2)
seq_data <- generate_sequence_data(n_seq, sequence_length, alph, motifs, 1)
count_seq_kmers(seq_data, alph)
#> 20 x 6156 sparse Matrix of class "dgCMatrix"
#>   [[ suppressing 33 column names ‘a’, ‘f’, ‘d’ ... ]]
#>                                                                               
#>  [1,] 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . . . . . . . . . . . . . . . . . . . ......
#>  [2,] . 1 . 1 1 1 . 1 . . . . . . 1 1 1 1 . . . . . . . . . . . . . . . ......
#>  [3,] . 1 1 1 1 . . 1 . . . . . . 1 . . . 1 1 1 1 1 1 . . . . . . . . . ......
#>  [4,] 1 1 1 1 1 1 . . . . . 1 . . . 1 1 . 1 . . 1 . 1 1 1 . . . . . . . ......
#>  [5,] 1 1 1 1 1 . . . . . . . 1 . . . . 1 . 1 . . . 1 . . 1 1 1 1 . . . ......
#>  [6,] . 1 1 1 1 . . . . 1 . . . . . . . 1 . . 1 1 . 1 . . 1 . . . 1 1 . ......
#>  [7,] 1 . 1 . 1 . . . . 1 . . . 1 . . . . . . 1 . . . . . . . 1 . 1 . 1 ......
#>  [8,] 1 1 1 . 1 . 1 . . 1 . . . . . . . . . . . . . 1 1 . . . 1 1 . . . ......
#>  [9,] 1 1 1 1 1 1 . . . . . . 1 1 . . . . . . . . 1 1 . 1 . . . . 1 . . ......
#> [10,] . 1 1 1 1 1 . 1 . 1 . . . . . . 1 . . . . 1 . 1 . . . 1 . . . . . ......
#> [11,] . . . 1 1 1 . . . . . . . . . . 1 . . 1 1 . . . . 1 1 . . . . . . ......
#> [12,] 1 1 1 1 . 1 1 . . 1 1 . . . 1 . . . . . . . . . . . . . . . . 1 . ......
#> [13,] 1 1 1 1 1 1 . . . 1 . . 1 . . . . . . 1 . . 1 . . . 1 1 . . . 1 . ......
#> [14,] 1 1 1 1 1 . 1 1 1 . 1 1 1 1 . . . 1 . . . . . . . . . . . . . . 1 ......
#> [15,] 1 1 1 1 1 1 1 . . . . . . . . 1 . . 1 . . 1 . . . . . 1 1 1 . 1 . ......
#> [16,] 1 1 . . 1 1 . . . . . . . . . . . . . . . . . . . 1 . . 1 1 . . . ......
#> [17,] 1 1 1 . 1 1 1 . . . . . . . . . 1 . . . . . . 1 . . . . . 1 . . 1 ......
#> [18,] 1 . 1 1 1 1 1 1 . . . . . . . . . . . . 1 . . . . . . . . 1 1 . . ......
#> [19,] 1 1 . . 1 1 . . . . . . . . . . 1 . 1 . . 1 . . 1 . . . 1 1 . . . ......
#> [20,] 1 1 . 1 1 1 . . . . . 1 . . . . . . . 1 . . . . . . . . 1 . . . . ......
#> 
#>  .....suppressing 6123 columns in show(); maybe adjust options(max.print=, width=)
#>  ..............................