Description Usage Arguments Details Value Examples
Estimate the occurance frequency of k-mers in a reference sequence.
1 | kmerFrequency(ref, n = 1e4, k = 1, ranges = as(seqinfo(ref), "GRanges"))
|
ref |
A 'BSgenome' or 'FaFile' object matching the respective reference sequence [required]. |
n |
The number of samples to draw [integer, default: 1e4]. |
k |
The 'k'-mer size of the context, including the variant position [integer, default: 3]. |
ranges |
Ranges in respect to the reference sequence to sample from [GRanges, default: take from the 'seqinfo' slot]. |
The k-mer frequency is estimated by random sampling of 'n' locations across the specified 'ranges' of the reference sequence.
A named vector, with names corresponding the the k-mer and value to the frequency.
1 2 3 | library(BSgenome.Hsapiens.1000genomes.hs37d5)
kmer_freq = kmerFrequency(BSgenome.Hsapiens.1000genomes.hs37d5, 1e2, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.