diff options
author | Arun Isaac | 2025-07-17 19:20:09 +0100 |
---|---|---|
committer | Arun Isaac | 2025-07-17 20:45:58 +0100 |
commit | 050a88e80419acd747704c82d1a431601c1aaafe (patch) | |
tree | 2f6079d6405d49971bf1ea9d28e3347d30a73d96 | |
parent | b253be6baa14a5c530589e75055029a58a575c90 (diff) | |
download | pyhegp-050a88e80419acd747704c82d1a431601c1aaafe.tar.gz pyhegp-050a88e80419acd747704c82d1a431601c1aaafe.tar.lz pyhegp-050a88e80419acd747704c82d1a431601c1aaafe.zip |
Turn arguments of the encrypt subcommand into options.
Prefixed options are easier to follow than the order of positional
arguments.
* pyhegp/pyhegp.py (encrypt): Turn summary, key and ciphertext
arguments into options.
-rw-r--r-- | pyhegp/pyhegp.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pyhegp/pyhegp.py b/pyhegp/pyhegp.py index 0c0d237..2f0bdb4 100644 --- a/pyhegp/pyhegp.py +++ b/pyhegp/pyhegp.py @@ -90,9 +90,15 @@ def pool(pooled_summary_file, summary_files): @main.command() @click.argument("genotype-file", type=click.File("r")) -@click.argument("summary-file", type=click.File("rb")) -@click.argument("key-path", type=click.Path()) -@click.argument("ciphertext-path", type=click.Path()) +@click.option("--summary", "-s", "summary_file", type=click.File("rb"), + help="Summary statistics file", + required=True) +@click.option("--key", "-k", "key_path", type=click.Path(), + help="Output key", + required=True) +@click.option("--output", "-o", "ciphertext_path", type=click.Path(), + default="-", + help="Output ciphertext") def encrypt(genotype_file, summary_file, key_path, ciphertext_path): genotype = read_genotype(genotype_file) summary = read_summary(summary_file) |