Split sequences into k-mers
seq_split_kmer(x, k)
A DNA, RNA or AA vector.
an integer giving the size of the k-mer.
a list of k-mer vectors of same class as x
.
Other string operations:
seq-replace
,
seq_combine()
,
seq_count_pattern()
,
seq_crop_pattern()
,
seq_crop_position()
,
seq_detect_pattern()
,
seq_extract_pattern()
,
seq_extract_position()
,
seq_remove_pattern()
,
seq_remove_position()
,
seq_replace_position()
,
seq_split_pattern()
x <- dna(a ="ACGTTAGTGTAGCCGT", b = "CTCGAAATGA")
seq_split_kmer(x, k = 5)
#> $a
#> DNA vector of 12 sequences
#> > ACGTT
#> > CGTTA
#> > GTTAG
#> > TTAGT
#> > TAGTG
#> > AGTGT
#> > GTGTA
#> > TGTAG
#> > GTAGC
#> > TAGCC
#> > AGCCG
#> > GCCGT
#>
#> $b
#> DNA vector of 6 sequences
#> > CTCGA
#> > TCGAA
#> > CGAAA
#> > GAAAT
#> > AAATG
#> > AATGA
#>