-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let BandageNG parse W-lines from GFA v1.1? #149
Comments
This is already done in https://github.com/asl/BandageNG/tree/walks branch. Note that walks are quite different from paths and therefore different treatment is necessary. |
Cool! Thank you for pointing me to that branch, I hadn't seen it. However, there seems to be a small bug (here: https://github.com/asl/BandageNG/blob/walks/program/main.cpp#L100) when compiling:
edit: link should be to branch |
Unfortunately, the dependency (CLI11 lib) changed after branch was created in non-backward compatible way. So you'd either need to roll-back to previous version or fix the problem. Using https://github.com/CLIUtils/CLI11/releases/tag/v2.3.2 is probably the easiest way, for this you'd need to change
(note |
Hmm that solution gives the same compilation error for me. This one solves it though: diff --git a/program/main.cpp b/program/main.cpp
index b143b8e..669a22c 100644
--- a/program/main.cpp
+++ b/program/main.cpp
@@ -59,7 +59,7 @@ using SubCmd = std::variant<std::monostate,
QueryPathsCmd,
LayoutCmd>;
-static SubCmd parseCmdLine(CLI::App &app) {
+static SubCmd parseCmdLine(CLI::App &app, int argc, char *argv[]) {
SubCmd subcmd;
app.description(getBandageTitleAsciiArt() + '\n' +
@@ -97,7 +97,7 @@ static SubCmd parseCmdLine(CLI::App &app) {
app.footer("Online Bandage help: https://github.com/asl/BandageNG/wiki");
- app.parse();
+ app.parse(argc, argv);
if (app.got_subcommand(load)) {
g_memory->commandLineCommand = BANDAGE_LOAD; // FIXME: not needed
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]) {
g_settings.reset(new Settings());
try {
- cmd = parseCmdLine(cli);
+ cmd = parseCmdLine(cli, argc, argv);
} catch (const CLI::ParseError &e) {
return cli.exit(e);
} With this I can compile, load and draw my Minigraph-Cactus graph, but I cannot find any of the W-lines in the graph. I tried drawing one walk only, selecting nodes from an entire graph and clicking "Paths...", and searching one walk with "Find path". Is there a way for me to try debugging this (a |
You'd also need to wipe out what was already fetched and compiled. This is how cmake works, sadly.
You should use "Walks", not "Paths". Likely you're using wrong branch or so. |
Ah yeah sorry, you are right. After checking out the correct branch I see it. I do get a segmentation error on my macOS when loading the GFA file (and I am struggling to compile on Linux), so I'll look into this later :) Do you have any plans to include this in a future release? |
We should never segfault even on invalid input. Can you open separate issue with example gfa? |
I know that BandageNG can parse the P-line from a GFA and it's then retrieveable on the right side with "Paths..." when selecting a node. Would it be possible for BandageNG to also be able to parse W-lines and treat them the same as paths? The GFA (v1.1) files that come from the Minigraph-Cactus pipeline namely don't have P-lines but do have W-lines.
The text was updated successfully, but these errors were encountered: