Commit 17e9c095 authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.cpp: the FineSegmenter segments the MAX_12 pseudo-germline

For the MAX_12 pseudo-germline, the FineSegmenter now calls override_rep5_rep3_from_labels,
and then continue by the regular way.

Note that IKmerStore:getLabel() returns *one* Fasta file, even when several files were used
for the same KmerAffect, such as in TRD+ or IGK+. In these cases, the FineSegmenter will
probably fail when the bad Fasta file is returned.
parent ec4f1357
......@@ -691,13 +691,12 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
CDR3start = -1;
CDR3end = -1;
if (!germline->rep_5.size() || !germline->rep_3.size())
if ((germline->seg_method == SEG_METHOD_MAX12) || (germline->seg_method == SEG_METHOD_MAX1U))
{
// We check whether this sequence is segmented with MAX12 or MAX1U (with default e-value parameters)
KmerSegmenter *kseg = new KmerSegmenter(seq, germline, THRESHOLD_NB_EXPECTED, 1);
if (kseg->isSegmented() && ((germline->seg_method == SEG_METHOD_MAX12)
|| (germline->seg_method == SEG_METHOD_MAX1U)))
if (kseg->isSegmented())
{
reversed = kseg->isReverse();
......@@ -710,8 +709,14 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
code_short += "/";
code_short += right.toStringSigns() + germline->index->getLabel(right).name;
info_extra += " " + left.toString() + "/" + right.toString() + " (" + code_short + ")";
if (germline->seg_method == SEG_METHOD_MAX1U)
return ;
germline->override_rep5_rep3_from_labels(left, right);
}
return ;
else
return ;
}
// TODO: factoriser tout cela, peut-etre en lancant deux segmenteurs, un +, un -, puis un qui chapote
......
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