|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.substmodel.AbstractRateMatrix
pal.substmodel.CodonModel
pal.substmodel.YangCodonModel
public class YangCodonModel
Yang's model of codon evolution More advanced codon Substitution Models (of Neilson and Yang) are now included (the M1, and M2 models). They appear to be correct compare to PAML for the purposes of evaluating the likelihood. More models (eg M3 and others) will be added over time.
Nested Class Summary | |
---|---|
static class |
YangCodonModel.SimpleNeutralSelection
A Substitution Model which can be used to implment the Neutral Model (with out continuous rate stuff) Codon model of [1] which uses the weighted sum of trwo base YangCodon models where omega=0, omega=1 repectively [1] Nielsen, R., Yang Z., 1998 Likelihood Models for Detecting Positively Selected Amino Acid Sites and Applications to the HIV-1 Envelope Gene. |
static class |
YangCodonModel.SimplePositiveSelection
A Substitution Model which can be used to implment the Postitive Selection (with out continuous rate stuff) Codon model of [1] which uses the weighted sum of a three base Codon model where omega=0, omega=1 and omega=free [1] Nielsen, R., Yang Z., 1998 Likelihood Models for Detecting Positively Selected Amino Acid Sites and Applications to the HIV-1 Envelope Gene. |
static class |
YangCodonModel.Utils
A Utility class |
Nested classes/interfaces inherited from interface pal.misc.Parameterized |
---|
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser |
Field Summary | |
---|---|
static double |
DEFAULT_KAPPA
|
static double |
DEFAULT_OMEGA
|
static int |
KAPPA_PARAMETER
|
static double |
MAXIMUM_KAPPA
|
static double |
MAXIMUM_OMEGA
|
static double |
MINIMUM_KAPPA
|
static double |
MINIMUM_OMEGA
|
static int |
OMEGA_PARAMETER
|
Fields inherited from class pal.substmodel.AbstractRateMatrix |
---|
format |
Constructor Summary | |
---|---|
YangCodonModel(double[] params,
double[] freq)
constructor 4 (universal codon table) |
|
YangCodonModel(double[] params,
double[] freq,
CodonTable codonTable)
constructor 3 |
|
YangCodonModel(double omega,
double kappa,
double[] freq)
constructor 2 (universal codon table) |
|
YangCodonModel(double omega,
double kappa,
double[] freq,
CodonTable codonTable)
constructor 1 |
Method Summary | |
---|---|
static MutableDouble |
createKappaStore(double initialValue)
|
static MutableDouble |
createKappaStore(double initialValue,
java.lang.String name)
|
static MutableDouble |
createOmegaStore(double initialValue)
|
static MutableDouble |
createOmegaStore(double initialValue,
java.lang.String name)
|
double |
getDefaultValue(int n)
get default value of parameter |
double |
getKappa()
|
double |
getKappaDefaultValue()
|
double |
getKappaLowerLimit()
|
double |
getKappaUpperLimit()
|
double |
getLowerLimit(int n)
get lower parameter limit |
int |
getModelID()
get numerical code describing the model type |
int |
getNumParameters()
get number of parameters |
double |
getOmega()
|
double |
getOmegaDefaultValue()
|
double |
getOmegaLowerLimit()
|
double |
getOmegaUpperLimit()
|
java.lang.String |
getParameterName(int i)
|
java.lang.String |
getUniqueName()
|
double |
getUpperLimit(int n)
get upper parameter limit |
protected void |
rebuildRateMatrix(double[][] rate,
double[] parameters)
|
void |
report(java.io.PrintWriter out)
print human readable report (e.g., on parameters and associated model) |
void |
setKappa(double value)
|
void |
setKappaSE(double value)
|
void |
setOmega(double value)
|
void |
setOmegaSE(double value)
|
void |
setParameterSE(double paramSE,
int n)
set standard errors for model parameter |
java.lang.String |
toString()
|
Methods inherited from class pal.substmodel.CodonModel |
---|
getInstance, printFrequencies, printRatios |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface pal.substmodel.RateMatrix |
---|
addPalObjectListener, clone, getDataType, getDimension, getEquilibriumFrequencies, getEquilibriumFrequency, getOrthogonalHints, getRelativeRates, getTransitionProbabilities, getTransitionProbability, getTypeID, removePalObjectListener, scale, setDistance, setDistanceTranspose, setParametersNoScale |
Methods inherited from interface pal.misc.Parameterized |
---|
getParameter, setParameter |
Field Detail |
---|
public static final double MAXIMUM_OMEGA
public static final double MAXIMUM_KAPPA
public static final double MINIMUM_OMEGA
public static final double MINIMUM_KAPPA
public static final double DEFAULT_KAPPA
public static final double DEFAULT_OMEGA
public static final int KAPPA_PARAMETER
public static final int OMEGA_PARAMETER
Constructor Detail |
---|
public YangCodonModel(double omega, double kappa, double[] freq, CodonTable codonTable)
omega
- N/S rate ratiokappa
- transition/transversion rate ratiofreq
- codon frequenciescodonTable
- codon tablepublic YangCodonModel(double omega, double kappa, double[] freq)
omega
- N/S rate ratiokappa
- transition/transversion rate ratiofreq
- codon frequenciespublic YangCodonModel(double[] params, double[] freq)
params
- parameter listfreq
- nucleotide frequenciespublic YangCodonModel(double[] params, double[] freq, CodonTable codonTable)
params
- parameter listfreq
- nucleotide frequenciescodonTable
- codon tableMethod Detail |
---|
public int getModelID()
AbstractRateMatrix
getModelID
in interface RateMatrix
getModelID
in class AbstractRateMatrix
public void report(java.io.PrintWriter out)
Report
report
in interface Report
out
- output streampublic int getNumParameters()
Parameterized
getNumParameters
in interface Parameterized
public void setParameterSE(double paramSE, int n)
Parameterized
setParameterSE
in interface Parameterized
paramSE
- standard error of parameter valuen
- parameter numberpublic final double getKappaLowerLimit()
public final double getOmegaLowerLimit()
public final double getKappaUpperLimit()
public final double getOmegaUpperLimit()
public final double getKappaDefaultValue()
public final double getOmegaDefaultValue()
public final double getOmega()
public final double getKappa()
public final void setKappaSE(double value)
public final void setOmegaSE(double value)
public final void setKappa(double value)
public final void setOmega(double value)
public double getLowerLimit(int n)
Parameterized
getLowerLimit
in interface Parameterized
n
- parameter number
public double getUpperLimit(int n)
Parameterized
getUpperLimit
in interface Parameterized
n
- parameter number
public double getDefaultValue(int n)
Parameterized
getDefaultValue
in interface Parameterized
n
- parameter number
public java.lang.String getParameterName(int i)
getParameterName
in interface NamedParameterized
public java.lang.String getUniqueName()
getUniqueName
in interface RateMatrix
protected void rebuildRateMatrix(double[][] rate, double[] parameters)
rebuildRateMatrix
in class AbstractRateMatrix
public java.lang.String toString()
toString
in class java.lang.Object
public static final MutableDouble createKappaStore(double initialValue)
public static final MutableDouble createKappaStore(double initialValue, java.lang.String name)
public static final MutableDouble createOmegaStore(double initialValue)
public static final MutableDouble createOmegaStore(double initialValue, java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |