start and width parameter.
From each position of the search window, a DNA k-mer is identified
on the right hand side on the given DNA sequence.
Each value in the start vector defines the left border
of a search window.
The size of the search window is given by the appropriate value in the
width vector.
The function is intended to count DNA k-mers in selected regions (e.g. exons)
on DNA sequence.
countDnaKmers(dna,k,start,width)character. Single DNA sequence (vector of length 1).
dna must not contain other characters than "ATCGN".
Capitalization does not matter.
When a 'N' character is found, the current DNA k-mer is skipped.numeric. Number of nucleotides in tabled DNA motifs.numeric. Vector of (1-based) start positions for
reading frames.
Reading frame is counted to the right side of the DNA string.numeric. Defines size of search window for each start
position. Must have the same length as start or length 1
(in which case the values of width are recycled.nchar(dna)-k+1.
The function throws the error 'Search region exceeds string end'
when a value start + width + k > nchar(dna) + 2 occurs.seq <- "ATAAATA"
countDnaKmers(seq, 2, 1:3, 3)
Run the code above in your browser using DataLab