Skip to content

Commit

Permalink
auto-add rgfa prefix during rgfa conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhickey committed Apr 5, 2024
1 parent 9680149 commit 89af9b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/subcommand/convert_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "../algorithms/find_gbwtgraph.hpp"
#include "../io/save_handle_graph.hpp"
#include "../gfa.hpp"
#include "../rgfa.hpp"
#include "../gbwt_helper.hpp"
#include "../gbwtgraph_helper.hpp"
#include <vg/io/stream.hpp>
Expand Down Expand Up @@ -236,6 +237,13 @@ int main_convert(int argc, char** argv) {
cerr << "[vg convert] warning: vg-protobuf output (-v / --vg-out) is deprecated. please use -p instead." << endl;
}

// we interpret the user path selections as reference path selections (consistent with vg paths)
// so we need to add the rgfa keyword to pick up the nonref paths
if ((!rgfa_paths.empty() || !rgfa_prefixes.empty()) &&
std::find(rgfa_prefixes.begin(), rgfa_prefixes.end(), RGFACover::rgfa_sample_name) == rgfa_prefixes.end()) {
rgfa_prefixes.push_back(RGFACover::rgfa_sample_name);
}


// with -F or -G we convert an alignment and not a graph
if (input == input_gam || input == input_gaf) {
Expand Down

1 comment on commit 89af9b6

@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 rgfa2. View the full report here.

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

Please sign in to comment.