-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Problem Description
When running povu gfa2vcf, the output VCF is always directed to stdout, even when the user specifies the --output-dir option.
The CLI help text leads users to believe they can output VCF files to a directory.
Expected Behaviour
When the user specifies the --output-dir option, the VCF output should be written as separate files in the specified directory.
Actual Behavior
Regardless of whether --output-dir is provided or not, the VCF output is always sent to stdout.
This is because of this https://github.com/pangenome/povu/blob/main/app/subcommand/gfa2vcf.cpp#L64
Suggested Solution
Make stdout the default output stream for VCF output (as it currently is), but fix the --output-dir option so that when the user sets --output-dir, the VCF should be written as files in the given directory.
This ensures the CLI options are mutually exclusive and their descriptions are consistent with the actual behavior.
Additional Context
$ povu gfa2vcf -h
Flag '--input-gfa' is required
povu gfa2vcf {OPTIONS} [refs...]
Convert GFA to VCF (decompose + call)
OPTIONS:
-i[gfa], --input-gfa=[gfa] path to input gfa [required]
Decompose options
-h, --hairpins Find hairpins in the variation graph
[default: false]
-s, --subflubbles Find subflubbles in the variation
graph [default: false]
Streaming options
-c[chunk_size],
--chunk-size=[chunk_size] Number of variants to process in each
chunk [default: 100]
-q[queue_length],
--queue-length=[queue_length] Number of chunks to buffer [default:
4]
Output destination (choose
exactly one)
-o[output_dir],
--output-dir=[output_dir] Output directory [default: .]
--stdout Output single VCF to stdout instead of
separate files [default: false]
Reference source (choose exactly
one)
-r[prefix_list],
--prefix-list=[prefix_list] path to file containing reference name
prefixes [optional]
-P[path_prefix...],
--path-prefix=[path_prefix...] All paths beginning with NAME used as
reference (multiple allowed)
[optional]
refs... list of refs to use as reference
haplotypes [optional]
"--" can be used to terminate flag options and force all following
arguments to be treated as positional options