Documentation
¶
Index ¶
- func Cost(k PointSet1D, problem AssemblyProblem) int
- func Distinct(sa []string) []string
- func OptimizeAssembly(query string, seqs wtype.ReallySimpleAlignment, constraints Constraints) ([][]string, []string)
- func ScaledFitnessTest(f int, fs []int) bool
- func Transition(a, b string) bool
- type Assembly
- type AssemblyMethod
- type AssemblyOptimizer
- type AssemblyOptimizerEnvironment
- type AssemblyOptimizerParameters
- type AssemblyParameters
- type AssemblyProblem
- type AssemblyStep
- type AssemblyStrategy
- type Constraints
- type FitnessValues
- type GAParameters
- func (gmp GAParameters) GetBool(s string) (bool, bool)
- func (gmp GAParameters) GetFloat(s string) (float64, bool)
- func (gmp GAParameters) GetInt(s string) (int, bool)
- func (gmp GAParameters) GetString(s string) (string, bool)
- func (gap GAParameters) MaxIterations() int
- func (gap GAParameters) MethodName() string
- func (gmp GAParameters) Set(s string, v interface{})
- type Point2D
- type Point3D
- type PointSet1D
- type PointSet2D
- type PointSet3D
- type Population
- func (pop *Population) Assess() FitnessValues
- func (p *Population) Mutate(mem PointSet1D, prm AssemblyOptimizerParameters, cnstr Constraints) PointSet1D
- func (p *Population) Pick(fit FitnessValues, m PointSet1D) PointSet1D
- func (p *Population) Recombine(m1, m2 PointSet1D, prm AssemblyOptimizerParameters, cnstr Constraints) PointSet1D
- func (p *Population) Regenerate(scores FitnessValues, prm AssemblyOptimizerParameters, cnstr Constraints) *Population
- type SeqSet
- type SequenceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cost ¶
func Cost(k PointSet1D, problem AssemblyProblem) int
func OptimizeAssembly ¶
func OptimizeAssembly(query string, seqs wtype.ReallySimpleAlignment, constraints Constraints) ([][]string, []string)
func ScaledFitnessTest ¶
func Transition ¶
Types ¶
type Assembly ¶
type Assembly struct { Method AssemblyMethod Raw []string Assembled []string }
type AssemblyMethod ¶
type AssemblyMethod interface { Name() string // what is this method called Type() string // method classification CanAssemble([]string) bool // can these parts work? Validate([]string, string) (bool, error) // do these parts make this output? Assemble([]string) ([]string, error) // what do these parts make? Disassemble(string, AssemblyParameters) ([]string, error) // split this sequence into parts RawToParts([]string) ([]string, error) // convert each part PartsToRaw([]string) ([]string, error) // return each part to its raw state }
type AssemblyOptimizer ¶
type AssemblyOptimizer interface {
OptimizeAssembly(sequences []string, environment AssemblyOptimizerEnvironment, parameters AssemblyOptimizerParameters) AssemblyStrategy
}
type AssemblyOptimizerEnvironment ¶
type AssemblyOptimizerEnvironment struct { AssemblyMethods []AssemblyMethod SequenceProviders []SequenceProvider }
type AssemblyOptimizerParameters ¶
type AssemblyOptimizerParameters interface { MethodName() string MaxIterations() int Set(string, interface{}) GetInt(string) (int, bool) GetFloat(string) (float64, bool) GetString(string) (string, bool) GetBool(string) (bool, bool) }
func DefaultParameters ¶
func DefaultParameters() AssemblyOptimizerParameters
type AssemblyParameters ¶
type AssemblyParameters interface {
SplitPoints() []int
}
type AssemblyProblem ¶
type AssemblyProblem struct { Mutations PointSet2D // set of mutations Seq string // actual sequence }
type AssemblyStep ¶
type AssemblyStep struct {
Assemblies []Assembly
}
type AssemblyStrategy ¶
type AssemblyStrategy struct { Cost int // in pence Steps []AssemblyStep // ordered Orders map[string]SequenceProvider }
type Constraints ¶
type Constraints struct { MaxSplits int MinLen int MaxLen int MinDistToMut int Query string EndsToAvoid []string EndLen int NoTransitions bool }
func DefaultConstraints ¶
func DefaultConstraints() Constraints
type FitnessValues ¶
type FitnessValues struct { Fit []int BestScore int BestMember PointSet1D }
type GAParameters ¶
type GAParameters struct {
// contains filtered or unexported fields
}
func NewGAParameters ¶
func NewGAParameters() GAParameters
func (GAParameters) MaxIterations ¶
func (gap GAParameters) MaxIterations() int
func (GAParameters) MethodName ¶
func (gap GAParameters) MethodName() string
type PointSet1D ¶
type PointSet1D []int
func NewMember ¶
func NewMember(problem AssemblyProblem, constraints Constraints, parameters AssemblyOptimizerParameters) PointSet1D
func (PointSet1D) Dup ¶
func (ps1D PointSet1D) Dup() PointSet1D
type PointSet2D ¶
type PointSet2D []Point2D
func (PointSet2D) Len ¶
func (ps2d PointSet2D) Len() int
func (PointSet2D) Less ¶
func (ps2d PointSet2D) Less(i, j int) bool
func (PointSet2D) MinDistTo ¶
func (ps2d PointSet2D) MinDistTo(i int) int
func (PointSet2D) Swap ¶
func (ps2d PointSet2D) Swap(i, j int)
type PointSet3D ¶
type PointSet3D []Point3D
func (PointSet3D) Len ¶
func (ps3d PointSet3D) Len() int
func (PointSet3D) Less ¶
func (ps3d PointSet3D) Less(i, j int) bool
func (PointSet3D) Swap ¶
func (ps3d PointSet3D) Swap(i, j int)
type Population ¶
type Population struct { Members []PointSet1D Problem AssemblyProblem FitnessTest func(f int, fs []int) bool }
func NewPop ¶
func NewPop(problem AssemblyProblem, constraints Constraints, parameters AssemblyOptimizerParameters) *Population
func (*Population) Assess ¶
func (pop *Population) Assess() FitnessValues
func (*Population) Mutate ¶
func (p *Population) Mutate(mem PointSet1D, prm AssemblyOptimizerParameters, cnstr Constraints) PointSet1D
func (*Population) Pick ¶
func (p *Population) Pick(fit FitnessValues, m PointSet1D) PointSet1D
func (*Population) Recombine ¶
func (p *Population) Recombine(m1, m2 PointSet1D, prm AssemblyOptimizerParameters, cnstr Constraints) PointSet1D
func (*Population) Regenerate ¶
func (p *Population) Regenerate(scores FitnessValues, prm AssemblyOptimizerParameters, cnstr Constraints) *Population
type SequenceProvider ¶
type SequenceProvider interface { Name() string MethodsImplemented() []string GetMethod(string) AssemblyMethod }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.