11#include " gfa_to_handle.hpp"
2+ #include " gfaz_to_handle.hpp"
23#include " ../path.hpp"
4+ #include " ../utility.hpp"
35
46#include < gbwtgraph/utils.h>
57
@@ -325,19 +327,23 @@ static void add_path_listeners(GFAParser& parser, MutablePathMutableHandleGraph*
325327}
326328
327329void gfa_to_handle_graph (const string& filename, MutableHandleGraph* graph,
328- GFAIDMapInfo* translation) {
330+ GFAIDMapInfo* translation, int num_threads) {
331+ if (filename != " -" && ends_with (filename, " .gfaz" )) {
332+ gfaz_to_handle_graph (filename, graph, translation, num_threads);
333+ return ;
334+ }
329335
330336 get_input_file (filename, [&](istream& in) {
331337 gfa_to_handle_graph (in, graph, translation);
332338 });
333339}
334340
335341void gfa_to_handle_graph (const string& filename, MutableHandleGraph* graph,
336- const string& translation_filename) {
342+ const string& translation_filename, int num_threads ) {
337343
338344
339345 GFAIDMapInfo id_map_info;
340- gfa_to_handle_graph (filename, graph, &id_map_info);
346+ gfa_to_handle_graph (filename, graph, &id_map_info, num_threads );
341347 write_gfa_translation (id_map_info, translation_filename);
342348}
343349
@@ -357,19 +363,23 @@ void gfa_to_handle_graph(istream& in, MutableHandleGraph* graph,
357363
358364void gfa_to_path_handle_graph (const string& filename, MutablePathMutableHandleGraph* graph,
359365 GFAIDMapInfo* translation, int64_t max_rgfa_rank,
360- unordered_set<PathSense>* ignore_sense) {
366+ unordered_set<PathSense>* ignore_sense, int num_threads) {
367+ if (filename != " -" && ends_with (filename, " .gfaz" )) {
368+ gfaz_to_path_handle_graph (filename, graph, translation, max_rgfa_rank, ignore_sense, num_threads);
369+ return ;
370+ }
361371
362372 get_input_file (filename, [&](istream& in) {
363- gfa_to_path_handle_graph (in, graph, translation, max_rgfa_rank);
373+ gfa_to_path_handle_graph (in, graph, translation, max_rgfa_rank, ignore_sense );
364374 });
365375}
366376
367377void gfa_to_path_handle_graph (const string& filename, MutablePathMutableHandleGraph* graph,
368378 int64_t max_rgfa_rank, const string& translation_filename,
369- unordered_set<PathSense>* ignore_sense) {
379+ unordered_set<PathSense>* ignore_sense, int num_threads ) {
370380
371381 GFAIDMapInfo id_map_info;
372- gfa_to_path_handle_graph (filename, graph, &id_map_info, max_rgfa_rank);
382+ gfa_to_path_handle_graph (filename, graph, &id_map_info, max_rgfa_rank, ignore_sense, num_threads );
373383 write_gfa_translation (id_map_info, translation_filename);
374384
375385}
0 commit comments