Skip to content
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

[augur ancestral] arg parsing improvements #1344

Merged
merged 4 commits into from
Dec 10, 2023

Commits on Dec 7, 2023

  1. [ancestral] Check invalid args up-front

    Check that provided arguments are compatible. Where possible we use
    argparse built-ins, but they don't cover everything we want to check.
    This checking isn't intended to replace conditional checks in the code
    which check for arg existence (as demonstrated by the additional
    conditional added here), however by checking for invalid combinations
    up-front we can exit quickly.
    jameshadfield committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    8bfaf13 View commit details
    Browse the repository at this point in the history
  2. [ancestral] only export VCF if requested

    This is consistent with augur's general behaviour of "request a file for
    it to be produced". Moreover, the previous code would ~always result in
    the VCF input file being overwritten.
    
    This is potentially a backwards compatible change. The number of users
    expected to be affected is minimal (perhaps zero).
    
    Closes #1343.
    jameshadfield committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    24f1fa0 View commit details
    Browse the repository at this point in the history
  3. [ancestral] use AugurError consistently

    This is the preferred method rather than printing to STDERR and exiting
    jameshadfield committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    3880bd0 View commit details
    Browse the repository at this point in the history
  4. [ancestral] Mutually exclusive ref/root seq arg

    For VCF alignments, `--vcf-reference` becomes the 'ref' variable and
    for FASTA alignments, `--root-sequence` becomes the 'ref' variable.
    If both was provided then (previously) one was silently ignored, but
    they are now mutually exclusive.
    
    The argument help messages are also improved.
    jameshadfield committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    5b0545f View commit details
    Browse the repository at this point in the history