Documentation ¶
Overview ¶
Package alphabet defines the abstract interface for a biological alphabet.
Index ¶
Constants ¶
View Source
const ( // GapLetter is the character used to represent a sequence gap. GapLetter = "-" // IupacLetters are the IUPAC ambiguous encodings IupacLetters = "RYSWKM" + "BDHV" + "N" // DnaLetters is the strict four-letter representation of DNA. // ATGC: Any of one nucleotide codes (i.e., 4 choose 1) DnaLetters = "ATGC" // DnaIupacLetters is the IUPAC representation of DNA. // -: Any of zero nucleotide codes (i.e., 4 choose 0) // ATGC: Any of one nucleotide codes (i.e., 4 choose 1) // RYSWKM: Any of two nucleotide codes (i.e., 4 choose 2) // BDHV: Any of three nucleotide codes (i.e., 4 choose 3) // N: Any of four nucleotide codes (i.e., 4 choose 4) DnaIupacLetters = DnaLetters + IupacLetters + GapLetter // RnaLetters is the strict four-letter representation of DNA. // AUGC: Any of one nucleotide codes (i.e., 4 choose 1) RnaLetters = "AUGC" // RnaIupacLetters is the IUPAC representation of RNA. // -: Any of zero nucleotide codes (i.e., 4 choose 0) // AUGC: Any of one nucleotide codes (i.e., 4 choose 1) // RYSWKM: Any of two nucleotide codes (i.e., 4 choose 2) // BDHV: Any of three nucleotide codes (i.e., 4 choose 3) // N: Any of four nucleotide codes (i.e., 4 choose 4) RnaIupacLetters = RnaLetters + IupacLetters + GapLetter // ProteinLetters is the gapless standard protein letters. ProteinLetters = "ACDEFGHIKLMNPQRSTVWY" )
Variables ¶
This section is empty.
Functions ¶
func TestExcludesSingleLetters ¶
TestExcludesSingleLetters a test helper that returns all ASCII letters not in the input set
func TestHasExpectedLetter ¶
TestHasExpectedLetter is a test helper to wrap a check for an alphabet.Interface implementation having a given letter
Types ¶
type Complementer ¶
Complementer is any alphabet that has complementing characters
type Interface ¶
type Interface interface { // Must be stringable fmt.Stringer // Contains checks that the given elements are in the Alphabet Contains(...string) []bool // Length is the number of letters in the Alphabet Length() int }
Interface is the abstract representation of a finite-letter alphabet where validity of a given letter can be checked.
Click to show internal directories.
Click to hide internal directories.