Commit 07b56de2 authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}, vidjil.cpp: FineSegmenter takes threshold and multiplier from vidjil.cpp

parent bec109c6
......@@ -628,7 +628,7 @@ string format_del(int deletions)
return deletions ? *"(" + string_of_int(deletions) + " del)" : "" ;
}
FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c, double threshold, int multiplier)
{
segmented = false;
dSegmented = false;
......@@ -739,7 +739,6 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
}
/* E-values */
int multiplier = 1 ;
evalue_left = multiplier * segment_cost.toPValue(score_V[0].first);
evalue_right = multiplier * segment_cost.toPValue(score_J[0].first);
evalue = evalue_left + evalue_right ;
......@@ -760,7 +759,6 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
evalue_right = BAD_EVALUE ;
}
double threshold = THRESHOLD_NB_EXPECTED ;
checkLeftRightEvaluesThreshold(threshold, reversed ? -1 : 1);
if (because != NOT_PROCESSED)
......
......@@ -246,7 +246,8 @@ class FineSegmenter : public Segmenter
* @param seq: An object read from a FASTA/FASTQ file
* @param germline: germline used
*/
FineSegmenter(Sequence seq, Germline *germline, Cost segment_cost);
FineSegmenter(Sequence seq, Germline *germline, Cost segment_cost,
double threshold = THRESHOLD_NB_EXPECTED, int multiplier=1);
/**
* extend segmentation from VJ to VDJ
......
......@@ -1474,7 +1474,7 @@ int main (int argc, char **argv)
KmerSegmenter *seg = kmseg.the_kseg ;
Germline *germline = seg->segmented_germline ;
FineSegmenter s(seq, germline, segment_cost);
FineSegmenter s(seq, germline, segment_cost, expected_value, nb_reads_for_evalue);
if (s.isSegmented())
{
......
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