Edlib.Edlib
— ModuleJulia bindings for the edlib string alignment library.
See edit_distance
, alignment_locations
, alignment
and align
for computing alignment information.
Also see cigar
for producing a cigar string from an alignment.
Edlib.align
— Functionalign(query, target; ...)
Align the query
and target
strings, returning the edit distance, start and end locations of opimal alignments, and the character alignment of the first one. Inputs are as for edit_distance
.
Edlib.alignment
— Methodalignment(query, target; opts...)
The edit distance, and the range, character alignments and cigar of an optimal alignment. Inputs are as for edit_distance
.
Edlib.alignment_end_locations
— Methodalignment_end_locations(query, target; opts...)
The edit distance and vector of end locations of optimal alignments. Inputs are as for edit_distance
.
Edlib.alignment_locations
— Methodalignment_locations(query, target; opts...)
The edit distance and vectors of ranges of optimal alignments. Inputs are as for edit_distance
.
Edlib.cigar
— Methodcigar(a::Vector{Alignment}; extended=true)
cigar(query, target; extended=false, ...)
The cigar string of the given Vector{Alignment}
(e.g. as returned from align
or alignment
).
It consists of pairs of multiplicities followed by a character I
(inerstion), D
(deletion), =
/X
(match/mismatch, extended only), M
(match/mismatch).
The second form computes the cigar string for the alignment of query
and target
. The inputs are as for edit_distance
.
Edlib.edit_distance
— Methodedit_distance(query, target; max_distance=missing, mode=:global, equalities=nothing)
The edit distance between query
and target
strings, or vectors of bytes.
The available options are:
max_distance
: The maximum edit distance to compute. If the actual edit distance is larger, it is reported asmissing
.mode
: One of:global
(standard edit distance, the default),:prefix
(gaps after the query don't count),:infix
(gaps before and after the query don't count).equalities
: A vector of 2-tuples of characters which are considered equal. If you are calling this function many times, this should be aVector{Tuple{UInt8,UInt8}}
to avoid conversion.
If max_distance
is given and the actual edit distance is larger, missing
is returned.