Currently, the input and output file options are global options for the fgfa command. So you do stuff like this:
fgfa -i something.flatgfa stats
Instead of:
fgfa stats -i something.flatgfa
Or even:
fgfa stats something.flatgfa
As a purely cosmetic thing like that, this wouldn't be worth worrying about. But it actually causes a bunch of annoyance for the growing number of commands that don't read and/or write a variation graph. All these special cases are just to ignore the GFA/FlatGFA input arguments, for example, in cases where we don't need it:
|
// Another special case for parsing BED files, |
|
// since we do not parse a GFA file for that. |
|
if let Some(Command::BedIntersect(sub_args)) = args.command { |
|
cmds::bed_intersect(sub_args); |
|
return Ok(()); |
|
} |
|
|
|
// Yet more special cases for sequence compression/decompression, which only |
|
// deal with raw sequence data and not GFA files. |
|
if let Some(Command::SeqExport(sub_args)) = args.command { |
|
cmds::seq_export(sub_args); |
|
return Ok(()); |
|
} |
|
|
|
if let Some(Command::SeqImport(sub_args)) = args.command { |
|
cmds::seq_import(sub_args); |
|
return Ok(()); |
|
} |
Let's redesign the CLI so the input and output flags are per-subcommand.
Currently, the input and output file options are global options for the
fgfacommand. So you do stuff like this:Instead of:
Or even:
As a purely cosmetic thing like that, this wouldn't be worth worrying about. But it actually causes a bunch of annoyance for the growing number of commands that don't read and/or write a variation graph. All these special cases are just to ignore the GFA/FlatGFA input arguments, for example, in cases where we don't need it:
pollen/flatgfa/src/cli/main.rs
Lines 67 to 84 in c243c6f
Let's redesign the CLI so the input and output flags are per-subcommand.