Count kmers from a sequence in given ranges and build a data.table of k-mer counts.
buildRangedKmerTable(
dna.seq,
starts,
ends,
k,
method = "sliding",
chopping.method = "auto",
remove.N = TRUE
)
A data.table
object with column kmer and N.
String of sequence.
Start positions.
End positions.
Size of kmer.
Method options: "sliding" or "chopping". Chopping consumes a lot of memory for extremely long sequence using "substring" method. Using "Biostrings" for k > 12 is memory consuming. Default is "sliding".
Chopping method: "Biostrings" or "substring". Default is "auto".
Remove unknown base N? Default is TRUE.