diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a71d33..76c17b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 1.0.2 -Added `bactopia-datasets` to download optional datasets outside of Nextflow +- Added `bactopia-datasets` to download optional datasets outside of Nextflow +- consistently use `--bactopia-path` across sub-commands ## 1.0.1 diff --git a/README.md b/README.md index 172b983..5b1240f 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,12 @@ Below is the `--help` output for each subcommand. Print out tools and citations used throughout Bactopia ╭─ Options ────────────────────────────────────────────────────────────────────────────╮ -│ --version -V Show the version and exit. │ -│ * --bactopia -b TEXT Directory where Bactopia repository is stored [required] │ -│ --name -n TEXT Only print citation matching a given name │ -│ --plain-text -p Disable rich formatting │ -│ --help Show this message and exit. │ +│ --version -V Show the version and exit. │ +│ * --bactopia-path -b TEXT Directory where Bactopia repository is stored │ +│ [required] │ +│ --name -n TEXT Only print citation matching a given name │ +│ --plain-text -p Disable rich formatting │ +│ --help Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ``` @@ -216,7 +217,7 @@ Below is the `--help` output for each subcommand. Generate a summary table from the Bactopia results. ╭─ Required Options ───────────────────────────────────────────────────────────────────╮ -│ * --bactopia -b TEXT Directory where Bactopia results are stored [required] │ +│ * --bactopia-path -b TEXT Directory where Bactopia results are stored [required] │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Gold Cutoffs ───────────────────────────────────────────────────────────────────────╮ │ --gold-coverage -gcov INTEGER Minimum amount of coverage required for Gold │ diff --git a/bactopia/cli/citations.py b/bactopia/cli/citations.py index b30f1e2..211ad82 100644 --- a/bactopia/cli/citations.py +++ b/bactopia/cli/citations.py @@ -39,17 +39,17 @@ def parse_citations(yml: str) -> list: @click.command() @click.version_option(bactopia.__version__, "--version", "-V") @click.option( - "--bactopia", + "--bactopia-path", "-b", required=True, help="Directory where Bactopia repository is stored", ) @click.option("--name", "-n", help="Only print citation matching a given name") @click.option("--plain-text", "-p", is_flag=True, help="Disable rich formatting") -def citations(bactopia: str, name: str, plain_text: bool) -> None: +def citations(bactopia_path: str, name: str, plain_text: bool) -> None: """Print out tools and citations used throughout Bactopia""" - citations_yml = validate_file(f"{bactopia}/citations.yml") + citations_yml = validate_file(f"{bactopia_path}/citations.yml") citations, module_citations = parse_citations(citations_yml) markdown = [] diff --git a/bactopia/cli/summary.py b/bactopia/cli/summary.py index f1cdffe..443aeb3 100644 --- a/bactopia/cli/summary.py +++ b/bactopia/cli/summary.py @@ -25,7 +25,7 @@ click.rich_click.USE_RICH_MARKUP = True click.rich_click.OPTION_GROUPS = { "bactopia-summary": [ - {"name": "Required Options", "options": ["--bactopia"]}, + {"name": "Required Options", "options": ["--bactopia-path"]}, { "name": "Gold Cutoffs", "options": [ @@ -144,7 +144,7 @@ def process_sample(df: pd.DataFrame, rank_cutoff: dict) -> list: @click.command() @click.version_option(bactopia.__version__, "--version", "-V") @click.option( - "--bactopia", + "--bactopia-path", "-b", required=True, help="Directory where Bactopia results are stored", @@ -274,7 +274,7 @@ def process_sample(df: pd.DataFrame, rank_cutoff: dict) -> list: @click.option("--verbose", is_flag=True, help="Increase the verbosity of output") @click.option("--silent", is_flag=True, help="Only critical errors will be printed") def summary( - bactopia, + bactopia_path, gold_coverage, gold_quality, gold_read_length, @@ -347,8 +347,8 @@ def summary( processed_samples = {} versions = [] dfs = [] - samples = parse_bactopia_directory(bactopia) - logging.info(f"Found {len(samples)} samples in {bactopia} to process") + samples = parse_bactopia_directory(bactopia_path) + logging.info(f"Found {len(samples)} samples in {bactopia_path} to process") if samples: for sample in samples: if sample["is_bactopia"]: