public class ReferenceSequenceDiscreteEmission extends AbstractConditionalDiscreteEmission
ReferenceSequenceAnnotation
at a certain reference position. This class can be used in so-called conditional profile HMM for
the match states.| Modifier and Type | Field and Description |
|---|---|
protected int |
refIdx
The index in the reference sequence
|
con, counter, ess, grad, hyperParams, logNorm, offset, params, paramsFile, probs, reader, samplingIndex, statistic, writer| Constructor and Description |
|---|
ReferenceSequenceDiscreteEmission(AlphabetContainer con,
AlphabetContainer refCon,
int refIdx,
double ess)
This is a simple constructor for a
ReferenceSequenceDiscreteEmission based on the equivalent sample size. |
ReferenceSequenceDiscreteEmission(AlphabetContainer con,
AlphabetContainer refCon,
int refIdx,
double[][] hyperParams)
This constructor creates a
ReferenceSequenceDiscreteEmission defining the individual hyper parameters. |
ReferenceSequenceDiscreteEmission(AlphabetContainer con,
AlphabetContainer refCon,
int refIdx,
double[][] hyperParams,
double[][] initHyperParams)
This constructor creates a
ReferenceSequenceDiscreteEmission defining the individual hyper parameters. |
ReferenceSequenceDiscreteEmission(AlphabetContainer con,
AlphabetContainer refCon,
int refIdx,
double ess,
double[][] initHyperParams)
This is a simple constructor for a
ReferenceSequenceDiscreteEmission based on the equivalent sample size. |
ReferenceSequenceDiscreteEmission(StringBuffer xml)
Creates a
ReferenceSequenceDiscreteEmission from its XML representation. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendFurtherInformation(StringBuffer xml)
This method appends further information to the XML representation.
|
protected void |
extractFurtherInformation(StringBuffer xml)
This method extracts further information from the XML representation.
|
protected int |
getConditionIndex(boolean forward,
int seqPos,
Sequence seq)
This method returns an index encoding the condition.
|
protected static Sequence |
getReferenceSequence(Sequence seq)
Returns the reference sequence annotated to
seq. |
String |
toString(NumberFormat nf)
This method returns a
String representation of the instance. |
acceptParameters, addGradientOfLogPriorTerm, addToStatistic, clone, drawParameters, drawParametersFromStatistic, estimateFromStatistic, extendSampling, fillCurrentParameter, fillSamplingGroups, finalize, fromXML, getAlphabetContainer, getHyperParams, getIndex, getLogGammaScoreFromStatistic, getLogPosteriorFromStatistic, getLogPriorTerm, getLogProbAndPartialDerivationFor, getLogProbFor, getNodeLabel, getNodeShape, getNumberOfParameters, getSizeOfEventSpace, initForSampling, initializeFunctionRandomly, isInSamplingMode, joinStatistics, parseNextParameterSet, parseParameterSet, precompute, resetStatistic, samplingStopped, setLinear, setParameter, setParameterOffset, setParameters, setShape, toXMLpublic ReferenceSequenceDiscreteEmission(AlphabetContainer con, AlphabetContainer refCon, int refIdx, double ess)
ReferenceSequenceDiscreteEmission based on the equivalent sample size.con - the AlphabetContainer of this emissionrefCon - the AlphabetContainer of the referencerefIdx - the index in the reference sequenceess - the equivalent sample size (ess) of this emission that is equally distributed over all parametersReferenceSequenceDiscreteEmission(AlphabetContainer, AlphabetContainer, int, double[][])public ReferenceSequenceDiscreteEmission(AlphabetContainer con, AlphabetContainer refCon, int refIdx, double ess, double[][] initHyperParams)
ReferenceSequenceDiscreteEmission based on the equivalent sample size.con - the AlphabetContainer of this emissionrefCon - the AlphabetContainer of the referencerefIdx - the index in the reference sequenceess - the equivalent sample size (ess) of this emission that is equally distributed over all parametersinitHyperParams - the individual hyper parameters for each parameter used in AbstractConditionalDiscreteEmission.initializeFunctionRandomly()ReferenceSequenceDiscreteEmission(AlphabetContainer, AlphabetContainer, int, double[][])public ReferenceSequenceDiscreteEmission(AlphabetContainer con, AlphabetContainer refCon, int refIdx, double[][] hyperParams) throws IllegalArgumentException
ReferenceSequenceDiscreteEmission defining the individual hyper parameters.con - the AlphabetContainer of this emissionrefCon - the AlphabetContainer of the referencerefIdx - the index in the reference sequencehyperParams - the individual hyper parameters for each parameterIllegalArgumentException - if the dimension of the hyper parameters and the size of the alphabet defined by reference AlphabetContainer do not matchpublic ReferenceSequenceDiscreteEmission(AlphabetContainer con, AlphabetContainer refCon, int refIdx, double[][] hyperParams, double[][] initHyperParams) throws IllegalArgumentException
ReferenceSequenceDiscreteEmission defining the individual hyper parameters.con - the AlphabetContainer of this emissionrefCon - the AlphabetContainer of the referencerefIdx - the index in the reference sequencehyperParams - the individual hyper parameters for each parameterinitHyperParams - the individual hyper parameters for each parameter used in AbstractConditionalDiscreteEmission.initializeFunctionRandomly()IllegalArgumentException - if the dimension of the hyper parameters and the size of the alphabet defined by reference AlphabetContainer do not matchpublic ReferenceSequenceDiscreteEmission(StringBuffer xml) throws NonParsableException
ReferenceSequenceDiscreteEmission from its XML representation.xml - the XML representation.NonParsableException - if the XML representation could not be parsedprotected static final Sequence getReferenceSequence(Sequence seq)
seq.seq - the sequenceReferenceSequenceAnnotationprotected int getConditionIndex(boolean forward,
int seqPos,
Sequence seq)
AbstractConditionalDiscreteEmissiongetConditionIndex in class AbstractConditionalDiscreteEmissionforward - a switch to decide whether to use the forward or the reverse complementary strand (e.g. for DNA sequences)seqPos - the position in the sequence seqseq - the sequencepublic String toString(NumberFormat nf)
EmissionString representation of the instance.nf - the NumberFormat for the String representation of parameters or probabilitiesString representation of the instanceprotected void appendFurtherInformation(StringBuffer xml)
AbstractConditionalDiscreteEmissionappendFurtherInformation in class AbstractConditionalDiscreteEmissionxml - the XML representationprotected void extractFurtherInformation(StringBuffer xml) throws NonParsableException
AbstractConditionalDiscreteEmissionextractFurtherInformation in class AbstractConditionalDiscreteEmissionxml - the XML representationNonParsableException - if the information could not be reconstructed out of the StringBuffer xml