Skip to content

Redesign the fgfa command-line interface #247

Description

@sampsyo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions