Documentation ¶
Overview ¶
Package encoding provides mappings between character representations of nucleotides and bitwise encodings, for fast sequence comparison.
The coding scheme is Emmanual Paradis' design, which is described here: http://ape-package.ird.fr/misc/BitLevelCodingScheme.html
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeToString ¶ added in v1.2.0
func MakeDecodingArray ¶
func MakeDecodingArray() [256]string
MakeDecodingArray returns an array whose indices are Emmanual Paradis encodings of IUPAC codes and whose contents are IUPAC codes as strings
func MakeEncodedScoreArray ¶
func MakeEncodedScoreArray() [256]int64
MakeEncodedScoreArray is like MakeScoreArray() but the indices are EP bitwise representations of nucleotides
func MakeEncodingArray ¶
func MakeEncodingArray() [256]byte
MakeEncodingArray returns an array whose indices are the byte representations of IUPAC codes and whose contents are Emmanual Paradis encodings. Lower case nucleotides are mapped to their upper case nucleotides's encoding
func MakeEncodingArrayHardGaps ¶
func MakeEncodingArrayHardGaps() [256]byte
MakeEncodingArrayHardGaps is as MakeEncodingArray but with '-' set to EP's original code (4; character is not completely unknown, character represents NONE of ACTG)
func MakeScoreArray ¶
func MakeScoreArray() [256]int64
MakeScoreArray makes an array that maps (the byte value of) IUPAC nucleotide characters (which are the arrays indices) to a score for how ambiguous that nucleotide is. The score is caculated as: 12 * 1/possible real nucleotides. E.g. an 'A' scores 12, but an 'N' (A, C, G or T) scores 3
Types ¶
This section is empty.