Documentation ¶
Overview ¶
Package sequence defines the abstract interface for a biological sequence.
Index ¶
- Constants
- func LetterCount(s Interface) map[string]uint
- func TestAlphabetIs(s interface{}, exp interface{}) func(t *testing.T)
- func TestLengthIs(s Interface, exp uint) func(t *testing.T)
- func TestPositionIs(s Interface, p uint, exp string) func(t *testing.T)
- func TestRangeIs(s Interface, st, sp uint, exp string) func(t *testing.T)
- type Alphabeter
- type Complementer
- type Generator
- type Interface
- type LetterCounter
- type RevComper
- type Reverser
- type Transcriber
- type Translater
- type ValFunc
- type Validator
Constants ¶
const TestableLength uint = 1000
TestableLength is a realistic, testable length for generating random sequences in tests
Variables ¶
This section is empty.
Functions ¶
func LetterCount ¶
LetterCount iterates over a sequence.Interface and counts how many times each letter has been seen.
func TestAlphabetIs ¶
TestAlphabetIs is a test helper that wraps a check for expected alphabet
func TestLengthIs ¶
TestLengthIs is a test helper that wraps a check for known length
func TestPositionIs ¶
TestPositionIs is a test helper that wraps a check for known position
Types ¶
type Alphabeter ¶
Alphabeter s you what alphabet.Interface it uses
type Complementer ¶
Complementer can complement the sequence
type Interface ¶
type Interface interface { // Length is the number of elements in the Interface Length() uint // Position is the n-th element Position(n uint) (string, error) // Range returns elements from start (inclusive) to stop (exclusive) Range(start, stop uint) (string, error) }
Interface is the basic functionality of any biological sequence (DNA, RNA, Protein, or other)
type LetterCounter ¶
LetterCounter counts the letters observed when reading the sequence
type Transcriber ¶
Transcriber can transcribe the sequence
type Translater ¶
Translater can translate the sequence
type ValFunc ¶
ValFunc is a function that validates a sequence
func AlphabetIs ¶
AlphabetIs specifies whether a sequence conforms to a given Alphabet
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package immutable is an implementation of biological sequences that have immutability.
|
Package immutable is an implementation of biological sequences that have immutability. |
Package mutable is an implementation of biological sequences that mutate internally.
|
Package mutable is an implementation of biological sequences that mutate internally. |