Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SnapCorrector ¶
type SnapCorrector struct {
// contains filtered or unexported fields
}
SnapCorrector implements "snap" correction of UMIs. A umi U is snappable if there is a known non-random umi U1 that is closer to U than all other known umis, in terms of Levenshtein edit distance.
func NewSnapCorrector ¶
func NewSnapCorrector(knownUMIs []byte) *SnapCorrector
NewSnapCorrector creates a new snap corrector. The knownUMIs are a \n separated list of UMIs (identical to the file content of a list of UMIs, where each line contains a UMI). Each UMI should consist of characters ACGTN.
func (*SnapCorrector) CorrectUMI ¶
func (c *SnapCorrector) CorrectUMI(umi string) (correctedUMI string, edits int, corrected bool)
CorrectUMI returns a corrected umi, number of edits to the corrected umi, and true if there is exactly one known UMI that is closest to the original umi with respect to Levenshtein edit distance. Otherwise, return the original umi, -1, and false.