Skip to content
Snippets Groups Projects
Commit 39500cb1 authored by Salson Mikael's avatar Salson Mikael
Browse files

Rely on chromosome index rather than names for saving the BV

parent 678de1de
No related branches found
No related tags found
No related merge requests found
...@@ -149,8 +149,7 @@ void MultiCover<bv>::save(const std::string filename) { ...@@ -149,8 +149,7 @@ void MultiCover<bv>::save(const std::string filename) {
conf << nb_targets << std::endl; conf << nb_targets << std::endl;
for (size_t i = 0; i < nb_targets; i++) { for (size_t i = 0; i < nb_targets; i++) {
conf << target_names[i] << std::endl; conf << target_names[i] << std::endl;
// TODO: protect filename covers[i]->save(filename+"."+std::to_string(i));
covers[i]->save(filename+"."+target_names[i]);
} }
conf.close(); conf.close();
} }
...@@ -221,7 +220,7 @@ void MultiCover<bv>::loadIndex(const std::string filename) { ...@@ -221,7 +220,7 @@ void MultiCover<bv>::loadIndex(const std::string filename) {
covers = (Coverind<bv> **)malloc(sizeof(Coverind<bv>*)*nb_targets); covers = (Coverind<bv> **)malloc(sizeof(Coverind<bv>*)*nb_targets);
for (size_t i = 0; i < nb_targets; i++) { for (size_t i = 0; i < nb_targets; i++) {
conf >> target_names[i]; conf >> target_names[i];
covers[i] = new Coverind<bv>(filename+"."+target_names[i]); covers[i] = new Coverind<bv>(filename+"."+std::to_string(i));
} }
conf.close(); conf.close();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment