Learn R Programming

kmeRtone (version 1.0)

buildRangedKmerTable: Count kmers from a sequence in given ranges and build a data.table of k-mer counts.

Description

Count kmers from a sequence in given ranges and build a data.table of k-mer counts.

Usage

buildRangedKmerTable(
  dna.seq,
  starts,
  ends,
  k,
  method = "sliding",
  chopping.method = "auto",
  remove.N = TRUE
)

Value

A data.table object with column kmer and N.

Arguments

dna.seq

String of sequence.

starts

Start positions.

ends

End positions.

k

Size of kmer.

method

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

Chopping method: "Biostrings" or "substring". Default is "auto".

remove.N

Remove unknown base N? Default is TRUE.