public abstract class PositionPrior extends Object implements Storable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected int |
motifLength
The length of the motif.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PositionPrior()
This empty constructor creates an instance with motif length -1.
|
protected |
PositionPrior(StringBuffer rep)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
PositionPrior |
clone() |
protected abstract void |
extractAdditionalInformation(StringBuffer xml)
This method extracts additional information from a
StringBuffer. |
protected abstract StringBuffer |
getAdditionalInformation()
This method returns a
StringBuffer containing additional
information for the XML representation. |
abstract String |
getInstanceName()
Returns the instance name.
|
abstract int |
getLength()
Returns the length that is supported by this prior.
|
abstract double |
getLogPriorForPositions(int seqLength,
int... starts)
The logarithmic value of the prior for specified start positions of the
part motifs.
|
void |
setMotifLength(int motifLength)
Sets the length of the current motif.
|
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
protected PositionPrior()
protected PositionPrior(StringBuffer rep) throws NonParsableException
Storable.
Creates a new PositionPrior out of a StringBuffer.rep - the StringBuffer containing the modelNonParsableException - if the StringBuffer can not be parsedpublic PositionPrior clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic abstract double getLogPriorForPositions(int seqLength,
int... starts)
throws IllegalArgumentException
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 abstract int getLength()
public abstract String getInstanceName()
public void setMotifLength(int motifLength)
throws IllegalArgumentException
motifLength - the motif lengthIllegalArgumentException - if the length is not positive or to bigpublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.protected abstract StringBuffer getAdditionalInformation()
StringBuffer containing additional
information for the XML representation.StringBuffer containing additional information for the
XML representationprotected abstract void extractAdditionalInformation(StringBuffer xml) throws NonParsableException
StringBuffer.xml - the StringBuffer containing the additional information
of the XML representationNonParsableException - if the StringBuffer is not parsable