|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.sequenceScores.statisticalModels.trainable.hmm.states.SimpleState
public class SimpleState
This class implements a State
based on Emission
that allows to reuse Emission
s for different State
s.
Field Summary | |
---|---|
protected Emission |
e
The emission that is internally used for scoring subsequences. |
protected boolean |
forward
A switch that decides whether to use the forward or the reverse complementary strand of a sequence. |
protected String |
name
The name of the state. |
Constructor Summary | |
---|---|
SimpleState(Emission e,
String name,
boolean forward)
This is the constructor of a SimpleState . |
Method Summary | |
---|---|
void |
addToStatistic(int startPos,
int endPos,
double weight,
Sequence seq)
This method allows to add a certain weight to the sufficient statistic of the parameters that
are used for scoring the specific subsequence(s). |
String |
getGraphvizNodeOptions(double weight,
double maxWeight,
NumberFormat nf)
This method returns a String representation of the node options that
can be used in Graphviz to create the node for this state. |
double |
getLogScoreFor(int startPos,
int endPos,
Sequence seq)
This method returns the logarithm of the score for a given sequence with given start and end position. |
boolean |
isSilent()
This method returns whether a state is silent or not. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Emission e
protected String name
protected boolean forward
Constructor Detail |
---|
public SimpleState(Emission e, String name, boolean forward)
SimpleState
.
e
- the emission that is internally used for scoring subsequencesname
- the name of the stateforward
- a switch that decides whether to use the forward or the reverse complementary strand of a sequenceMethod Detail |
---|
public String getGraphvizNodeOptions(double weight, double maxWeight, NumberFormat nf)
State
String
representation of the node options that
can be used in Graphviz to create the node for this state.
getGraphvizNodeOptions
in interface State
weight
- for statemaxWeight
- the maximal weight for the statenf
- the NumberFormat
for the output, can be null
String
representation of the statepublic double getLogScoreFor(int startPos, int endPos, Sequence seq) throws WrongLengthException, OperationNotSupportedException
State
getLogScoreFor
in interface State
startPos
- the start position within the sequence(s)endPos
- the end position within the sequence(s)seq
- the sequence(s)
WrongLengthException
- if the length can not be modeled
OperationNotSupportedException
- if the reverse complement of the sequence can not be computedpublic void addToStatistic(int startPos, int endPos, double weight, Sequence seq) throws OperationNotSupportedException
TrainableState
weight
to the sufficient statistic of the parameters that
are used for scoring the specific subsequence(s).
addToStatistic
in interface TrainableState
startPos
- the start positionendPos
- the end positionweight
- the weight which will be added to the sufficient statisticseq
- the Sequence
(s)
OperationNotSupportedException
- if the reverse complement of the sequence can not be computedpublic boolean isSilent()
State
isSilent
in interface State
true
if the state is silent, otherwise false
SilentEmission
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |