Commit 4f8752cb authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

affectanalyser.{h,cpp}, segmenter.{h,cpp}: move getProbabilityAtLeastOrAbove to KmerAffectAnalyser

parent 793934aa
......@@ -174,6 +174,10 @@ affect_infos KmerAffectAnalyser::getMaximum(const KmerAffect &before,
}
double KmerAffectAnalyser::getProbabilityAtLeastOrAbove(int at_least) const {
return kms.getProbabilityAtLeastOrAbove(at_least, seq.size());
}
const string &KmerAffectAnalyser::getSequence() const{
return seq;
}
......
......@@ -171,6 +171,12 @@ class KmerAffectAnalyser: public AffectAnalyser {
float ratioMin=2.,
int maxOverlap=1) const;
/**
* @return probability that the number of kmers is 'at_least' or more
*/
double getProbabilityAtLeastOrAbove(int at_least) const;
const string &getSequence() const;
int first(const KmerAffect &affect) const;
......
......@@ -363,14 +363,8 @@ KmerMultiSegmenter::KmerMultiSegmenter(Sequence seq, MultiGermline *multigermlin
}
}
double KmerSegmenter::getProbabilityAtLeastOrAbove(int at_least) const {
return getKmerAffectAnalyser()->getIndex().getProbabilityAtLeastOrAbove(at_least,
getSequence().sequence.size());
}
double KmerMultiSegmenter::getNbExpected() const {
double proba = the_kseg->getProbabilityAtLeastOrAbove(the_kseg->score);
double proba = the_kseg->getKmerAffectAnalyser()->getProbabilityAtLeastOrAbove(the_kseg->score);
return multi_germline->germlines.size() * proba;
}
......
......@@ -182,11 +182,6 @@ class KmerSegmenter : public Segmenter
~KmerSegmenter();
/**
* @return probability that the score of the segmenter is 'at_least' or more
*/
double getProbabilityAtLeastOrAbove(int at_least) const;
/**
* @return the KmerAffectAnalyser of the current sequence.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment