Description Usage Arguments Value Examples
Find locations of matches of vector of k-mers in each element of a named character vector. Not case sensitive.
1 | locateKmers(kmers, seqs, directional = TRUE, showMatch = FALSE)
|
kmers |
character vector or XStringSet of k-mers to search for |
seqs |
named character vector or XStringSet of sequences in which to locate kmer |
directional |
logical value: if FALSE, counts occurrences of either kmers or their reverse-complements. Makes sense only if applying to DNA sequences! |
showMatch |
logical value; if true add additional column to output indicating what the exact regex match for each occurrence (can be slow) |
data.frame with three columns: ‘seqid’ containing the name of the sequence from seqs in which the k-mer was found; ‘kmer’ indicating the k-mer located; and ‘location’ giving the 1-based position at which the match was found.
1 2 | data(simulatedSeqs)
kmerLoci <- locateKmers(c('AAAAA', 'CATACTGAGA'), simulatedSeqs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.