Commit d0c3b05a authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}: compute and store CDR3nuc, CDR3aa, JUNCTIONaa

parent e0bbf0d2
......@@ -1057,6 +1057,12 @@ void FineSegmenter::findCDR3(){
// IMGT-CDR3 is, on each side, 3 nucleotides shorter than IMGT-JUNCTION
CDR3start = JUNCTIONstart + 3;
CDR3end = JUNCTIONend - 3;
CDR3nuc = subsequence(getSequence().sequence, CDR3start, CDR3end);
CDR3aa = nuc_to_aa(CDR3nuc);
JUNCTIONaa = nuc_to_aa(subsequence(getSequence().sequence, JUNCTIONstart, CDR3start-1))
+ CDR3aa + nuc_to_aa(subsequence(getSequence().sequence, CDR3end+1, JUNCTIONend));
}
json FineSegmenter::toJson(){
......
......@@ -121,7 +121,11 @@ protected:
string sequence_or_rc;
int JUNCTIONstart, JUNCTIONend;
string JUNCTIONaa;
int CDR3start, CDR3end;
string CDR3nuc;
string CDR3aa;
bool reversed, segmented, dSegmented;
int because;
......
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