Description Usage Arguments Details Value Author(s) See Also Examples
Counts occurrence of DNA k-mers in given DNA sequence.
The k-mers are searched in a set of search windows,
which are defined by 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.
1 | countDnaKmers(dna,k,start,width)
|
dna |
|
k |
|
start |
|
width |
|
The start positions for counting of DNA k-mers are all positions in
{start,...,start+width-1}.
As the identification of a DNA k-mer scans a sequence window of size k,
the last allowed start position counting a k-mer is nchar(dna)-k+1
.
The function throws the error 'Search region exceeds string end'
when a value start + width + k > nchar(dna) + 2
occurs.
matrix
. Each colum contains the motif-count values for one frame.
The column names are the values in the start vector.
Each row represents one DNA motif.
The DNA sequence of the DNA motif is given as row.name.
Wolfgang Kaisers
countGenomeKmers
1 2 | seq <- "ATAAATA"
countDnaKmers(seq, 2, 1:3, 3)
|
Loading required package: zlibbioc
1 2 3
AA 1 2 2
AC 0 0 0
AG 0 0 0
AT 1 0 1
CA 0 0 0
CC 0 0 0
CG 0 0 0
CT 0 0 0
GA 0 0 0
GC 0 0 0
GG 0 0 0
GT 0 0 0
TA 1 1 0
TC 0 0 0
TG 0 0 0
TT 0 0 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.