count_kmers_str: Count k-mers for string sequences (the size of k-mer should...

Description Usage Arguments Details Value Examples

View source: R/RcppExports.R

Description

Count k-mers for string sequences (the size of k-mer should be larger than one)

Usage

1
count_kmers_str(s, d, alphabet, pos)

Arguments

s

a string vector representing an input sequence

d

an integer vector representing gaps between consecutive elements of k-mer

alphabet

a string vector representing valid elements of k-mer

pos

a logical value that denotes whether positional k-mers should be generated

Details

K-mers that contain elements from alphabet but do not exist in the input sequence are also generated.

Value

a named vector with counts of k-mers

Examples

1
2
3
4
5
count_kmers_str(
c("a", "b", "c", "d", "x", "y", "z", "z", "a", "a"),
d=c(0,0),
c("a", "b", "c", "z"),
pos=FALSE)

piotr-ole/kmer documentation built on Nov. 14, 2019, 8:10 p.m.