Commit 68107039 authored by Mathieu Giraud's avatar Mathieu Giraud

vdj_assign: use AlignBox::refToString()

parent 5c8bbcd1
......@@ -72,8 +72,8 @@ int main(int argc, const char** argv)
exit(2);
}
AlignBox box_V("5");
AlignBox box_J("3");
AlignBox box_V("5", V_COLOR);
AlignBox box_J("3", J_COLOR);
if (read == "-") {
// Read on stdin
......@@ -85,11 +85,14 @@ int main(int argc, const char** argv)
// This should be handled directly into align_against_collection
box_J.start = box_J.end ;
box_J.del_left = box_J.del_right;
box_J.end = read.size() - 1;
int align_V_length = min(GENE_ALIGN, box_V.end - box_V.start + 1);
int align_J_length = min(GENE_ALIGN, (int)read.size() - box_J.end + 1);
int align_J_length = min(GENE_ALIGN, (int)read.size() - box_J.start + 1);
int start_V = box_V.end - align_V_length + 1;
int end_J = box_J.start + align_J_length + 1;
int end_J = box_J.start + align_J_length - 1;
cout << "read \t" << start_V << "\t" ;
cout << V_COLOR << read.substr(start_V, align_V_length)
<< NO_COLOR
......@@ -97,15 +100,10 @@ int main(int argc, const char** argv)
<< J_COLOR
<< read.substr(box_J.start, align_J_length)
<< NO_COLOR
<< endl
<< V_COLOR << box_V.ref.substr(box_V.ref.size() - box_V.del_right - align_V_length, align_V_length)
<< NO_COLOR << box_V.ref.substr(box_V.ref.size() - box_V.del_right, box_V.del_right)
<< endl;
for (int i = 0; i < box_J.start - start_V - box_J.del_left; i++) {
cout << " ";
}
cout << box_J.ref.substr(0, box_J.del_left)
<< J_COLOR << box_J.ref.substr(box_J.del_left, align_J_length) << NO_COLOR << endl;
<< "\t" << end_J << endl ;
cout << box_V.refToString(start_V, end_J) << "\t" << box_V << endl ;
cout << box_J.refToString(start_V, end_J) << "\t" << box_J << endl ;
exit (0);
}
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