1 import Base 2 import ./EdlibTypes.bend as Types 3 import ./src/Myers.bend as Myers 4 import ./src/Batch.bend as Batch 5 6 # Public CPU library entry point, independent of CLI and foreign transport. 7 def distance(query: String, target: String) -> Nat: 8 Myers.distance(query, target) 9 10 def default_config() -> Types.AlignConfig: 11 Types.default_config() 12 13 def align(query: String, target: String, config: Types.AlignConfig) -> Types.AlignResult: 14 Myers.edlib_align(query, target, config) 15 16 # One result per job, in input order, with independent CPU alignment leaves. 17 def align_batch(jobs: List<&2, Types.AlignJob>) -> List<&2, Types.AlignResult>: 18 Batch.align_batch(jobs) 19 20 # Format any path, including an explicitly empty path, independently of align. 21 def alignment_to_cigar(operations: List<&2, Types.Operation>, format: Types.CigarFormat) -> String: 22 Types.alignment_to_cigar(operations, format)