util

package
v0.0.0-...-d966d87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Levenshtein

func Levenshtein(s1, s2, a1, a2 string) (distance int)

Levenshtein computes the Levenshtein distance between two barcodes, or the number of insertions, deletions, and substitutions it takes to transform one barcode (s1) into another (s2). Each step in the transformation "costs" one distance point. Because a fixed number of barcode bases are always sequenced, bases downstream of the barcode will be read in the event of a deletion in the barcode sequence. To account for this situation, we take in the sequence downstream of both barcodes (a1 and a2). Note that s1 and s2 must have the same length.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL