Barcode correction using Hamming and Levenshtein distances. (A) Hamming distance between two example codewords. (B) Example linear code of four codewords with the minimal Hamming distance . (C) A mutation is corrected on the basis of the minimal distance between barcodes and mutated sequence. (D,E,F) The same for Levenshtein distance and an example Levenshtein code with the minimum Levenshtein distance .