phac-nml / biohansel

Rapidly subtype microbial genomes using single-nucleotide variant (SNV) subtyping schemes
Apache License 2.0
25 stars 7 forks source link

Command-line arg variable name and SubtypingParams instance variable name synchronization #63

Open peterk87 opened 5 years ago

peterk87 commented 5 years ago

Command-line arg variable names should be synchronized with the SubtypingParams so that they can be all checked for and assigned with a couple lines of code, e.g.:

for param_key in subtyping_params.__dict__.keys():
    if param_key in args.__dict__:
        subtyping_params.__dict__[param_key] = args.__dict__[param_key]

This would allow new user-adjustable params to be added with less boilerplate to ensure they are set appropriate and to easily reference where a particular command-line parameter is used.

Related to #61

glabbe commented 5 years ago

Sounds good, thanks for the suggestion Peter!