Documentation ¶
Overview ¶
Package hashmap is a collection of defined biological alphabets such as DNA, RNA, and Protein
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dna ¶
type Dna struct {
*Struct
}
Dna is the four letter standard encoding
type DnaIupac ¶
type DnaIupac struct {
*Struct
}
DnaIupac is the sixteen letter IUPAC encoding
func NewDnaIupac ¶
func NewDnaIupac() *DnaIupac
NewDnaIupac generates an IUPAC DNA alphabet
Example ¶
package main import ( "fmt" "github.com/bio-ext/bio-go/bio/alphabet/hashmap" ) func main() { a := hashmap.NewDnaIupac() fmt.Println(a) }
Output: -ABCDGHKMNRSTVWY
type Protein ¶
type Protein struct {
*Struct
}
Protein is the twenty letter standard encoding
func NewProtein ¶
func NewProtein() *Protein
NewProtein generates a protein alphabet
Example ¶
package main import ( "fmt" "github.com/bio-ext/bio-go/bio/alphabet/hashmap" ) func main() { a := hashmap.NewProtein() fmt.Println(a) }
Output: ACDEFGHIKLMNPQRSTVWY
type ProteinGapped ¶
type ProteinGapped struct {
*Struct
}
ProteinGapped is the twenty letter standard encoding plus a gap letter
func NewProteinGapped ¶
func NewProteinGapped() *ProteinGapped
NewProteinGapped generates a gapped protein alphabet
Example ¶
package main import ( "fmt" "github.com/bio-ext/bio-go/bio/alphabet/hashmap" ) func main() { a := hashmap.NewProteinGapped() fmt.Println(a) }
Output: -ACDEFGHIKLMNPQRSTVWY
type Rna ¶
type Rna struct {
*Struct
}
Rna is the four letter standard encoding
type RnaIupac ¶
type RnaIupac struct {
*Struct
}
RnaIupac is the sixteen letter IUPAC encoding
func NewRnaIupac ¶
func NewRnaIupac() *RnaIupac
NewRnaIupac generates an IUPAC RNA alphabet
Example ¶
package main import ( "fmt" "github.com/bio-ext/bio-go/bio/alphabet/hashmap" ) func main() { a := hashmap.NewRnaIupac() fmt.Println(a) }
Output: -ABCDGHKMNRSUVWY
type Struct ¶
type Struct struct {
// contains filtered or unexported fields
}
Struct is a collection of letters
func New ¶
New is a Struct generator
Example ¶
package main import ( "fmt" "github.com/bio-ext/bio-go/bio/alphabet/hashmap" ) func main() { a := hashmap.New("QWERTY") fmt.Println(a) }
Output: EQRTWY
func (Struct) Contains ¶
Contains confirms whether a potential letters are in the Alphabet
Example ¶
package main import ( "fmt" "github.com/bio-ext/bio-go/bio/alphabet/hashmap" ) func main() { a := hashmap.New("QWERTY") fmt.Println(a.Contains([]string{"Q", "WERTY", "A"}...)) }
Output: [true false false]