Documentation
¶
Index ¶
Constants ¶
View Source
const ( AMINOACIDS = 0 // Amino acid sequence alphabet NUCLEOTIDS = 1 // Nucleotid sequence alphabet GAP = '-' OTHER = '*' PSSM_NORM_NONE = 0 // No normalization PSSM_NORM_FREQ = 1 // Normalization by freq in the site PSSM_NORM_DATA = 2 // Normalization by aa/nt frequency in data PSSM_NORM_UNIF = 3 // Normalization by uniform frequency )
Variables ¶
This section is empty.
Functions ¶
func DetectAlphabet ¶
func NewSequence ¶
func RandomSequence ¶ added in v0.1.3
Types ¶
type Alignment ¶
type Alignment interface {
AddSequence(name string, sequence string, comment string) error
AddSequenceChar(name string, sequence []rune, comment string) error
GetSequence(name string) (string, bool)
GetSequenceChar(ith int) ([]rune, bool)
GetSequenceName(ith int) (string, bool)
SetSequenceChar(ithAlign, ithSite int, char rune) error
Iterate(it func(name string, sequence string))
IterateChar(it func(name string, sequence []rune))
IterateAll(it func(name string, sequence []rune, comment string))
NbSequences() int
Length() int
ShuffleSequences()
ShuffleSites(rate float64, roguerate float64) []string
SimulateRogue(prop float64, proplen float64) ([]string, []string)
RemoveGaps(cutoff float64)
Sample(nb int) (Alignment, error)
BuildBootstrap() Alignment
Entropy(site int, removegaps bool) (float64, error) // Entropy of the given site
Swap(rate float64)
Recombine(rate float64, lenprop float64)
Rename(namemap map[string]string)
Pssm(log bool, pseudocount float64, normalization int) (pssm map[rune][]float64, err error) // Normalization: PSSM_NORM_NONE, PSSM_NORM_UNIF, PSSM_NORM_DATA
TrimNames(size int) (map[string]string, error)
TrimSequences(trimsize int, fromStart bool) error
AppendSeqIdentifier(identifier string, right bool)
AvgAllelesPerSite() float64
CharStats() map[rune]int64
Alphabet() int
AlphabetCharacters() []rune
Clone() (Alignment, error)
}
func RandomAlignment ¶ added in v0.1.3
Click to show internal directories.
Click to hide internal directories.