~/bend-docscommunity

EdlibTypes.bend checks

raw source on the hub · import bend-edit-distance@0.2.2.0/EdlibTypes.bend as EdlibTypes

1 import
import Base

Types

type Mode source · line 4 · raw

Data

Edlib sentinels are distinct constructors, never wrapped U32 values.

type Task source · line 9 · raw

Data

type Threshold source · line 14 · raw

Data

type EqualityPair source · line 18 · raw

Data

type CigarFormat source · line 21 · raw

Data

type AlignConfig source · line 25 · raw

Data

type AlignJob source · line 30 · raw

Data

Each independent batch job keeps its own configuration and orientation.

type Status source · line 33 · raw

Data

type EditDistance source · line 37 · raw

Data

type Coordinate source · line 41 · raw

Data

type Operation source · line 45 · raw

Data

type CigarRun source · line 53 · raw

Data

Encoded runs have positive counts and are merged after mapping to the selected alphabet: adjacent Match/Mismatch operations form one Standard M run.

type AlignResult source · line 56 · raw

Data

Definitions

def default_config source · line 62 · raw

AlignConfig

def pair_matches source · line 67 · raw

@pair:EqualityPair -> @+a:Char -> @+b:Char -> Bool

Literal equality plus explicitly configured symmetric pairs. Scanning the pairs never follows a chain, so shared endpoints do not imply transitivity.

def equal source · line 73 · raw

@pairs:List<&2, EqualityPair> -> @+a:Char -> @+b:Char -> Bool

def end_coordinate source · line 80 · raw

@length:Nat -> Coordinate

def distance_show source · line 87 · raw

@distance:EditDistance -> String

def coordinate_show source · line 94 · raw

@position:Coordinate -> String

def status_show source · line 101 · raw

@status:Status -> String

def operation_show source · line 108 · raw

@operation:Operation -> String

def operation_char source · line 119 · raw

@format:CigarFormat -> @operation:Operation -> Char

def cigar_run_step source · line 132 · raw

@runs:List<&2, CigarRun> -> @count:Nat -> @symbol:Char -> @next:Char -> @same:Bool -> List<&2, CigarRun>

def alignment_runs_reversed source · line 142 · raw

@operations:List<&2, Operation> -> @+format:CigarFormat -> @runs:List<&2, CigarRun> -> List<&2, CigarRun>

The current run depends on the preceding symbol, so this scan is sequential. Tail recursion keeps long homogeneous and alternating paths bounded in stack.

def alignment_runs source · line 154 · raw

@operations:List<&2, Operation> -> @format:CigarFormat -> List<&2, CigarRun>

def cigar_runs_show source · line 157 · raw

@runs:List<&2, CigarRun> -> String

def alignment_to_cigar source · line 164 · raw

@operations:List<&2, Operation> -> @format:CigarFormat -> String

def coordinates_show source · line 167 · raw

@locations:List<&2, Coordinate> -> String

def starts_show source · line 170 · raw

@locations:Maybe<&2, List<&2, Coordinate>> -> String

def alignment_show source · line 177 · raw

@alignment:Maybe<&2, List<&2, Operation>> -> String

def cigar_show source · line 185 · raw

@cigar:Maybe<&2, String> -> String

CIGAR contains only decimal counts and MID=X, so needs no JSON escaping.

def result_show source · line 192 · raw

@result:AlignResult -> String

def not_found source · line 202 · raw

AlignResult

def within_threshold source · line 205 · raw

@threshold:Threshold -> @distance:Nat -> Bool

def distance_result source · line 212 · raw

@distance:Nat -> @end:Coordinate -> @accepted:Bool -> AlignResult