From 94855ac019064831a3d0c8f3cf78ca11787a0f1c Mon Sep 17 00:00:00 2001 From: zietzm Date: Tue, 27 Aug 2024 15:45:00 -0700 Subject: [PATCH] feat: use options for more command line arguments --- src/maxgcp/cli.py | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/maxgcp/cli.py b/src/maxgcp/cli.py index 2f37642..7333455 100644 --- a/src/maxgcp/cli.py +++ b/src/maxgcp/cli.py @@ -338,15 +338,11 @@ def compute_genetic_covariance( def fit_command( genetic_covariance_file: Annotated[ Path, - typer.Argument( - exists=True, help="Path to genetic covariance file", show_default=False - ), + typer.Option("--gcov", exists=True, help="Path to genetic covariance file"), ], phenotypic_covariance_file: Annotated[ Path, - typer.Argument( - exists=True, help="Path to phenotypic covariance file", show_default=False - ), + typer.Option("--pcov", exists=True, help="Path to phenotypic covariance file"), ], target: Annotated[str, typer.Option(help="Target phenotype for MaxGCP")], output_file: Annotated[ @@ -410,15 +406,11 @@ def run_indirect_gwas( ], projection_coefficient_file: Annotated[ Path, - typer.Argument( - exists=True, help="Path to projection coefficient file", show_default=False - ), + typer.Option("--proj", exists=True, help="Path to projection coefficient file"), ], phenotype_covariance_file: Annotated[ Path, - typer.Argument( - exists=True, help="Path to phenotypic covariance file", show_default=False - ), + typer.Option("--pcov", exists=True, help="Path to phenotypic covariance file"), ], n_covar: Annotated[ int, @@ -426,7 +418,7 @@ def run_indirect_gwas( ], output_file: Annotated[ Path, - typer.Argument(exists=False, help="Path to output file", show_default=False), + typer.Option("--out", help="Path to output file"), ], snp_col: Annotated[str, typer.Option("--snp", help="Name of SNP column")] = "ID", beta_col: Annotated[ @@ -485,21 +477,14 @@ def run_command( ], phenotype_covariance_file: Annotated[ Path, - typer.Argument( - exists=True, help="Path to phenotypic covariance file", show_default=False - ), + typer.Option("--pcov", exists=True, help="Path to phenotypic covariance file"), ], tag_file: Annotated[ Path, typer.Option("--tagfile", exists=True, help="Path to tag file"), ], output_file: Annotated[ - Path, - typer.Argument( - exists=False, - help="Path to output GWAS summary statistics file", - show_default=False, - ), + Path, typer.Option("--out", help="Path to output GWAS summary statistics file") ], target: Annotated[ Path, typer.Option(exists=True, help="Target phenotype for MaxGCP")