Commit 45099ddd authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}: use also e-value computation for threshold on D score in the FineSegmenter

parent d0246c45
......@@ -833,7 +833,7 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
}
void FineSegmenter::FineSegmentD(Germline *germline){
void FineSegmenter::FineSegmentD(Germline *germline, double evalue_threshold, int multiplier){
if (segmented){
......@@ -865,13 +865,12 @@ void FineSegmenter::FineSegmentD(Germline *germline){
string seq = getSequence().sequence;
float evalue_D = multiplier * (r-l) * germline->rep_4.totalSize() * segment_cost.toPValue(score_D[0].first);
// recompute remaining length for D
length = germline->rep_4.sequence(best_D).length() - del_D_right - del_D_left;
if (length < MIN_D_LENGTH)
return ;
if (evalue_D > evalue_threshold)
return ;
dSegmented=true;
......
......@@ -15,8 +15,6 @@
#define EXTEND_D_ZONE 5
#define MIN_D_LENGTH 5 /* If a D-REGION is smaller than this threshold, it is not output */
#define RATIO_STRAND 2 /* The ratio between the affectations in one
strand and the other, to safely attribute a
segment to a given strand */
......@@ -35,6 +33,7 @@
#define BAD_EVALUE 1e10
#define THRESHOLD_NB_EXPECTED 1.0 /* Threshold of the accepted expected value for number of found k-mers */
#define THRESHOLD_NB_EXPECTED_D .05 /* e-value threshold, D-REGION */
......@@ -274,7 +273,8 @@ class FineSegmenter : public Segmenter
* extend segmentation from VJ to VDJ
* @param germline: germline used
*/
void FineSegmentD(Germline *germline);
void FineSegmentD(Germline *germline,
double threshold = THRESHOLD_NB_EXPECTED_D, int multiplier=1);
void findCDR3();
json toJson();
......
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