From c5b545b33743c87a9165b259093839f9e78b78f9 Mon Sep 17 00:00:00 2001 From: Erik Garrison Date: Wed, 5 Oct 2022 16:49:24 +0200 Subject: [PATCH] non-binary halotype matrix --- src/subcommand/paths_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/subcommand/paths_main.cpp b/src/subcommand/paths_main.cpp index 73e1f652..387ed4e1 100644 --- a/src/subcommand/paths_main.cpp +++ b/src/subcommand/paths_main.cpp @@ -47,7 +47,7 @@ int main_paths(int argc, char** argv) { " identifier. This parameter should only be set in combination with" " **-H, --haplotypes**. Prints an additional, first column" " **group.name** to stdout.", {'D', "delim"}); - args::Flag haplo_matrix(path_investigation_opts, "haplo", "Print to stdout the paths in an approximate binary haplotype matrix" + args::Flag haplo_matrix(path_investigation_opts, "haplo", "Print to stdout the paths in a path coverage haplotype matrix" " based on the graph’s sort order. The output is tab-delimited:" " *path.name*, *path.length*, *path.step.count*, *node.1*," " *node.2*, *node.n*. Each path entry is printed in its own line.", {'H', "haplotypes"}); @@ -170,14 +170,14 @@ int main_paths(int argc, char** argv) { std::string path_name = (delim ? full_path_name.substr(full_path_name.find(delim)+1) : full_path_name); uint64_t path_length = 0; uint64_t path_step_count = 0; - std::vector row(graph.get_node_count()); + std::vector row(graph.get_node_count()); graph.for_each_step_in_path( p, [&](const step_handle_t& s) { const handle_t& h = graph.get_handle_of_step(s); path_length += graph.get_length(h); ++path_step_count; - row[graph.get_id(h)-1] = 1; + row[graph.get_id(h)-1]++; }); if (delim) { std::cout << group_name << "\t";