edawson / gfakluge

A C++ library and utilities for manipulating the Graphical Fragment Assembly format.
http://edawson.github.io/gfakluge/
MIT License
51 stars 20 forks source link

Add sensible default for gfak ids --start-ids #70

Closed kdm9 closed 2 years ago

kdm9 commented 2 years ago

There is no check that the user has supplied gfak ids --start-ids, but without it gfak crashes with an uncaught exception (invalid input to strtoul()). I'm not intimately familiar with the GFA spec, but I assume that start IDs of zero are appropriate for all five fields?

Otherwise, we would need to a "you didn't give --start-ids/-s" warning to ids_main() after arg parsing.

Best, kevin

edawson commented 2 years ago

Hi - thanks for the PR! I think this is probably valid, though I vaguely remember it being useful to have non-colliding seq/edge ID spaces (e.g., the first edge is numbered n+1 if the last seq is n). For now, this is good enough.