Commit c513e55a authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}, vidjil.cpp: FineSegmenter.checkWarning()

Ad-hoc code for W61, D7-27/J1 non-recombined sequence.
Closes #2232.

See also #3358/#3360.
parent c3dafa86
Pipeline #32737 failed with stages
in 24 minutes and 17 seconds
......@@ -1317,6 +1317,20 @@ void FineSegmenter::findCDR3(){
// Reminder: JUNCTIONstart is 1-based
}
void FineSegmenter::checkWarnings(json &json_clone)
{
if (isSegmented())
{
// Non-recombined D7-27/J1 sequence
if ((box_V->ref_label.find("IGHD7-27") != string::npos)
&& (box_J->ref_label.find("IGHJ1") != string::npos)
&& ((getMidLength() >= 90) || (getMidLength() <= 94)))
{
json_add_warning(json_clone, "W61", "Non-recombined D7-27/J1 sequence", LEVEL_ERROR);
}
}
}
json FineSegmenter::toJson(){
json seg;
......
......@@ -397,6 +397,7 @@ class FineSegmenter : public Segmenter
*/
void findCDR3();
void checkWarnings(json &json_clone);
json toJson();
};
......
......@@ -1424,6 +1424,8 @@ int main (int argc, char **argv)
out_clone << endl;
} // end if (seg.isSegmented())
seg.checkWarnings(json_clone);
json_data_segment[it->first] = json_clone;
if (output_sequences_by_cluster) // -a option, output all sequences
......
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