|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojavax.ga.functions.MutationFunction.NoMutation
public static final class MutationFunction.NoMutation
Place Holder class that doesn't mutate its SymbolLists
| 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 | |
|---|---|
MutationFunction.NoMutation()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener cl)
Add a listener that will be informed of all changes. |
void |
addChangeListener(ChangeListener cl,
ChangeType ct)
Add a listener that will be informed of changes of a given type. |
double[] |
getMutationProbs()
|
OrderNDistribution |
getMutationSpectrum()
|
boolean |
isUnchanging(ChangeType ct)
A particular ChangeType can never be raised by this Changeable. |
SymbolList |
mutate(SymbolList syml)
Produces a new SymbolList by mutation. |
void |
removeChangeListener(ChangeListener c)
Remove a listener that was interested in all types of changes. |
void |
removeChangeListener(ChangeListener cl,
ChangeType ct)
Remove a listener that was interested in a specific types of changes. |
void |
setMutationProbs(double[] muts)
Set the probability of a mutation occuring at a certain position Position 0 in the array corresponds to the probability of the first residue of seq mutating. |
void |
setMutationSpectrum(OrderNDistribution odn)
Sets the Distribution of Symbols that will be selected
from when a mutation occurs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MutationFunction.NoMutation()
| Method Detail |
|---|
public double[] getMutationProbs()
getMutationProbs in interface MutationFunctionpublic OrderNDistribution getMutationSpectrum()
getMutationSpectrum in interface MutationFunctionpublic SymbolList mutate(SymbolList syml)
MutationFunctionseq
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.
mutate in interface MutationFunctionsyml - the sequence to mutate
public void setMutationProbs(double[] muts)
throws ChangeVetoException
MutationFunctionseq 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.
setMutationProbs in interface MutationFunctionmuts - an array of double values representing mutation probabilities
ChangeVetoException - if a ChangeListener vetoes the change.
public void setMutationSpectrum(OrderNDistribution odn)
throws ChangeVetoException
MutationFunctionDistribution of Symbols that will be selected
from when a mutation occurs. An OrderNDistribution is
used so that you can model a situation where the
identity of the 'mutant' Symbol is dependent on the original
Symbol. The primary use is to prevent Symbols mutating to
themselves. Another use would be to model transitions and transversions.
setMutationSpectrum in interface MutationFunctionodn - the Distribution of 'mutant' bases to choose from.
ChangeVetoException - if a ChangeListener vetoes the change.public boolean isUnchanging(ChangeType ct)
ChangeableA particular ChangeType can never be raised by this Changeable.
If this returns true, then it is guaranteed that change events of this type (and all child types) can never under any circumstances be fired by this Changeable instance. If it returns false, that does not mean that this type of event will or even can be raised, but that it is worth registering listeners incase.
isUnchanging in interface Changeablect - the ChangeType to check
public void removeChangeListener(ChangeListener c)
Changeable
removeChangeListener in interface Changeablec - a ChangeListener to removepublic void addChangeListener(ChangeListener cl)
Changeable
addChangeListener in interface Changeablecl - the ChangeListener to add
public void addChangeListener(ChangeListener cl,
ChangeType ct)
Changeable
addChangeListener in interface Changeablecl - the ChangeListenerct - the ChangeType it is to be informed of
public void removeChangeListener(ChangeListener cl,
ChangeType ct)
Changeable
removeChangeListener in interface Changeablecl - a ChangeListener to removect - the ChangeType that it was interested in
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||