Commit f0ea6e1a authored by Mikaël Salson's avatar Mikaël Salson

vidjil.cpp: Use set_index for setting the Germline index

set_index() keeps track of the number of germlines refeering to it.
This is necessary so that the last germline destructor can actually
delete the index.
parent 940630da
Pipeline #15730 passed with stages
in 53 minutes and 18 seconds
...@@ -868,7 +868,7 @@ int main (int argc, char **argv) ...@@ -868,7 +868,7 @@ int main (int argc, char **argv)
if (multi_germline_unexpected_recombinations_12) { if (multi_germline_unexpected_recombinations_12) {
Germline *pseudo = new Germline(PSEUDO_UNEXPECTED, PSEUDO_UNEXPECTED_CODE, "", trim_sequences); Germline *pseudo = new Germline(PSEUDO_UNEXPECTED, PSEUDO_UNEXPECTED_CODE, "", trim_sequences);
pseudo->seg_method = SEG_METHOD_MAX12 ; pseudo->seg_method = SEG_METHOD_MAX12 ;
pseudo->index = multigermline->index ; pseudo->set_index(multigermline->index);
multigermline->germlines.push_back(pseudo); multigermline->germlines.push_back(pseudo);
} }
...@@ -876,7 +876,7 @@ int main (int argc, char **argv) ...@@ -876,7 +876,7 @@ int main (int argc, char **argv)
Germline *pseudo_u = new Germline(PSEUDO_UNEXPECTED, PSEUDO_UNEXPECTED_CODE, "", trim_sequences); Germline *pseudo_u = new Germline(PSEUDO_UNEXPECTED, PSEUDO_UNEXPECTED_CODE, "", trim_sequences);
pseudo_u->seg_method = SEG_METHOD_MAX1U ; pseudo_u->seg_method = SEG_METHOD_MAX1U ;
// TODO: there should be more up/downstream regions for the PSEUDO_UNEXPECTED germline. And/or smaller seeds ? // TODO: there should be more up/downstream regions for the PSEUDO_UNEXPECTED germline. And/or smaller seeds ?
pseudo_u->index = multigermline->index ; pseudo_u->set_index(multigermline->index);
multigermline->germlines.push_back(pseudo_u); multigermline->germlines.push_back(pseudo_u);
} }
......
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