public class GaussianLikePositionPrior extends PositionPrior
motifLength
Constructor and Description |
---|
GaussianLikePositionPrior(int length,
double max,
double sigma)
This constructor creates an instance with given sequence length, maximal
value and sigma for the Gaussian.
|
GaussianLikePositionPrior(StringBuffer rep)
The standard constructor for the interface
Storable . |
Modifier and Type | Method and Description |
---|---|
protected void |
extractAdditionalInformation(StringBuffer xml)
This method extracts additional information from a
StringBuffer . |
protected StringBuffer |
getAdditionalInformation()
This method returns a
StringBuffer containing additional
information for the XML representation. |
String |
getInstanceName()
Returns the instance name.
|
int |
getLength()
Returns the length that is supported by this prior.
|
double |
getLogPriorForPositions(int seqLength,
int... starts)
Returns only the important part and leaving the logarithm of the
normalization constant out.
|
void |
setMotifLength(int motifLength)
Sets the length of the current motif.
|
clone, toXML
public GaussianLikePositionPrior(int length, double max, double sigma)
length
- the sequence lengthmax
- the maximal positionsigma
- the standard deviation (sigma) of the Gaussianpublic GaussianLikePositionPrior(StringBuffer rep) throws NonParsableException
Storable
.
Creates a new GaussianLikePositionPrior
out of a
StringBuffer
.rep
- the StringBuffer
NonParsableException
- if the StringBuffer
can not be parsedpublic void setMotifLength(int motifLength)
PositionPrior
setMotifLength
in class PositionPrior
motifLength
- the motif lengthpublic double getLogPriorForPositions(int seqLength, int... starts) throws IllegalArgumentException
getLogPriorForPositions
in class PositionPrior
seqLength
- the length of the sequencestarts
- the start positions of the part motifsIllegalArgumentException
- if something went wrong, e.g. the motif length is not set.public int getLength()
PositionPrior
getLength
in class PositionPrior
public String getInstanceName()
PositionPrior
getInstanceName
in class PositionPrior
protected StringBuffer getAdditionalInformation()
PositionPrior
StringBuffer
containing additional
information for the XML representation.getAdditionalInformation
in class PositionPrior
StringBuffer
containing additional information for the
XML representationprotected void extractAdditionalInformation(StringBuffer xml) throws NonParsableException
PositionPrior
StringBuffer
.extractAdditionalInformation
in class PositionPrior
xml
- the StringBuffer
containing the additional information
of the XML representationNonParsableException
- if the StringBuffer
is not parsable