Skip to content

Commit

Permalink
restrict to gbwt alts by default
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhickey committed May 18, 2021
1 parent dc1a25e commit 231f57c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/subcommand/deconstruct_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,23 @@ int main_deconstruct(int argc, char** argv){
}
}

if (gbwt_index.get() && !altpath_prefixes.empty()) {
if (gbwt_index.get()) {
for (size_t i = 0; i < gbwt_index->metadata.paths(); i++) {
string sample_name = thread_sample(*gbwt_index.get(), i);
// if no prefixes were specified, we add them all. this way
// we make sure we only use gbwt alts. an option could be added
// to incorporate graph paths by toggling this (ie only adding to
// the map if prefixes given)
bool add_prefix = altpath_prefixes.empty();
for (auto& prefix : altpath_prefixes) {
if (sample_name.compare(0, prefix.size(), prefix) == 0) {
alt_path_to_prefix[sample_name] = sample_name;
add_prefix = true;
break;
}
}
if (add_prefix) {
alt_path_to_prefix[sample_name] = sample_name;
}
}
}
}
Expand Down

1 comment on commit 231f57c

@adamnovak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch deconstruct. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 11185 seconds

Please sign in to comment.