|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.ga.functions.AbstractMutationFunction
org.biojavax.ga.functions.SimpleMutationFunction
public final class SimpleMutationFunction
Simple no frills Implementation of the MutationFunction interface
This class is final, custom implementations should extend
AbstractMutationFunction
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.biojavax.ga.functions.MutationFunction |
---|
MutationFunction.NoMutation |
Field Summary |
---|
Fields inherited from interface org.biojavax.ga.functions.MutationFunction |
---|
DEFAULT_MUTATION_PROBS, MUTATION_PROBS, MUTATION_SPECTRUM, NO_MUTATION |
Constructor Summary | |
---|---|
SimpleMutationFunction()
|
Method Summary | |
---|---|
SymbolList |
mutate(SymbolList seq)
Produces a new SymbolList by mutation. |
Methods inherited from class org.biojavax.ga.functions.AbstractMutationFunction |
---|
getMutationProbs, getMutationSpectrum, setMutationProbs, setMutationSpectrum |
Methods inherited from class org.biojava.utils.AbstractChangeable |
---|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.biojava.utils.Changeable |
---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Constructor Detail |
---|
public SimpleMutationFunction()
Method Detail |
---|
public SymbolList mutate(SymbolList seq) throws ChangeVetoException, IllegalAlphabetException, IllegalSymbolException
MutationFunction
seq
is mutated with probability getMutationProbs[i]
. The new residue is selected at random
from the Distribution mutation
. The use of an array of probabilities
allows the modelling of mutational hotspots. Position 0 in the array corresponds to the
probability of the first residue of seq
mutating.
If the length of the array defined in getMutationProbs()
is shorter
than the length of the sequence the default behaivour of implementations will
be to apply the last probability to each subsequence residue. A single member
array will mutate all bases with equal probability.
seq
- the sequence to mutate
ChangeVetoException
- if seq
is unmodifiable
IllegalAlphabetException
- If the mutationSpectrum Distribution
is not
emitting Symbols from the same Alphabet
as seq
.
IllegalSymbolException
- if the mutationSpectrum Distribution
is not
conditioned with the same Alphabet
as the seq Alphabet
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |