|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbil.sequence.AbstractFixedLengthSequenceModel
jbil.sequence.UniformFixedLengthSequenceModel
public class UniformFixedLengthSequenceModel
This class represents a uniform model for words of a fixed length W over a given alphabet A.
Under this model, all sequences of length W have the same probability 1/(|A|^W).
Constructor Summary | |
---|---|
UniformFixedLengthSequenceModel(Alphabet alphabet,
int length)
Creates a new fixed length uniform model. |
Method Summary | |
---|---|
Alphabet |
getAlphabet()
Returns the base alphabet of the modelled sequences. |
int |
length()
Returns the length of the modelled sequences. |
double |
likelihood(Sequence word,
int beginIndex)
Returns the likelihod of the subword of the given word starting at beginIndex and with the appropriate length. |
double |
likelihoodThreshold(double significance)
Computes the likelihood threshold for the given significance with a default null model. |
double |
likelihoodThreshold(double significance,
SequenceModel nullModel)
Given p in [0,1], we define the p-value of p as the as the probability under a null model for a sequence to have a likelihood greater or equal to p. |
double |
positionProbability(int position,
Sequence neighbourhoodSeq,
int beginIndex,
int endIndex,
int letterPosition)
Computes the probability of observing a letter in a given position of the sequence. |
double |
prefixLikelihood(Sequence sequence,
int beginIndex,
int endIndex)
Returns the likelihod of the given prefix under this model, that is, the sum of the probabilities of all words starting with the subword of sequence starting at position beginIndex and ending at position endIndex-1. |
double |
pvalue(Sequence word,
int beginIndex)
Returns the p-value of the subword of the given word starting at beginIndex and of the appropriate length with a default null model (typically the uniform model). |
double |
pvalue(Sequence word,
int beginIndex,
SequenceModel nullModel)
Returns the p-value of the subword of the given word starting at beginIndex and with the appropriate length. |
Sequence |
sample()
Samples a sequence with the apropriate length from this model. |
Methods inherited from class jbil.sequence.AbstractFixedLengthSequenceModel |
---|
likelihood, likelihood, prefixLikelihood, pvalue, pvalue, pvalue, pvalue, sample, sampleN, sampleN |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniformFixedLengthSequenceModel(Alphabet alphabet, int length)
alphabet
- The base alphabet.length
- The length of the modelled words.Method Detail |
---|
public int length()
FixedLengthSequenceModel
public double likelihood(Sequence word, int beginIndex)
FixedLengthSequenceModel
public double prefixLikelihood(Sequence sequence, int beginIndex, int endIndex)
SequenceModel
public double pvalue(Sequence word, int beginIndex)
FixedLengthSequenceModel
pvalue
in interface FixedLengthSequenceModel
pvalue
in class AbstractFixedLengthSequenceModel
SequenceModel.pvalue(Sequence, SequenceModel)
public double pvalue(Sequence word, int beginIndex, SequenceModel nullModel)
FixedLengthSequenceModel
SequenceModel.pvalue(Sequence, SequenceModel)
public Sequence sample()
FixedLengthSequenceModel
public Alphabet getAlphabet()
SequenceModel
public double likelihoodThreshold(double significance)
SequenceModel
likelihoodThreshold
in interface SequenceModel
likelihoodThreshold
in class AbstractFixedLengthSequenceModel
SequenceModel.likelihoodThreshold(double, SequenceModel)
public double likelihoodThreshold(double significance, SequenceModel nullModel)
SequenceModel
significance
- The p of the description above.nullModel
- The null model m0 of the description above.public double positionProbability(int position, Sequence neighbourhoodSeq, int beginIndex, int endIndex, int letterPosition)
SequenceModel
position
- the position at which the letter appears.neighbourhoodSeq
- A sequence containing the neighbourhood.beginIndex
- The start of the neighbourhood within neighbourhoodSeq.endIndex
- The end of the neighbourhood within neighbourhoodSeq.letterPosition
- The position of the target letter within neighbourhoodSeq.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |