Predicates
The following predicate functions from BioSequences.jl are compatible with Kmer
s. Some have an optimised method defined in Kmers.jl.
BioSequences.isrepetitive
— Functionisrepetitive(seq::BioSequence, n::Integer = length(seq))
Return true
if and only if seq
contains a repetitive subsequence of length ≥ n
.
BioSequences.ispalindromic
— Functionispalindromic(seq::BioSequence)
Return true
if seq
is a palindromic sequence; otherwise return false
.
BioSequences.hasambiguity
— Functionhasambiguity(seq::BioSequence)
Returns true
if seq
has an ambiguous symbol; otherwise return false
.
BioSequences.iscanonical
— Functioniscanonical(seq::NucleotideSeq)
Returns true
if seq
is canonical.
For any sequence, there is a reverse complement, which is the same sequence, but on the complimentary strand of DNA:
------->
ATCGATCG
CGATCGAT
<-------
Using the reverse_complement
of a DNA sequence will give give this reverse complement.
Of the two sequences, the canonical of the two sequences is the lesser of the two i.e. canonical_seq < other_seq
.