Refactoring package name

This commit is contained in:
Harrison Deng 2025-01-22 18:43:21 +00:00
parent ba72199efc
commit 47c8951916
8 changed files with 25 additions and 25 deletions

View File

@ -1,12 +1,12 @@
# autoMLST.CLI
# autoBIGSst.CLI
A command-line interface based program that allows quickly batched requests for obtaining MLST profiles on multiple FASTA sequences and exporting it as a convenient CSV.
This program is simply a command-line interface for [autoMLST.Engine](https://pypi.org/project/automlst.engine).
This program is simply a command-line interface for [autoBIGSst.Engine](https://pypi.org/project/autoBIGSst.engine).
## Features
This CLI is capable of exactly what [autoMLST.Engine](https://pypi.org/project/automlst.engine) is capable of:
This CLI is capable of exactly what [autoBIGSst.Engine](https://pypi.org/project/autoBIGSst.engine) is capable of:
- Import multiple FASTA files
- Fetch the available BIGSdb databases that is currently live and available
- Fetch the available BIGSdb database schemas for a given MLST database
@ -18,22 +18,22 @@ This CLI is capable of exactly what [autoMLST.Engine](https://pypi.org/project/a
This CLI can be installed with `pip`. Please ensure [pip is installed](https://pip.pypa.io/en/stable/installation/). Then:
1. Run `pip install automlst-cli` to install the latest version of the CLI for autoMLST.
1. Run `pip install autoBIGSst-cli` to install the latest version of the CLI for autoBIGSst.
2. Once installation is complete, run `automlst --version` to test that the installation succeeded (and that you are running the appropriate version).
2. Once installation is complete, run `autoBIGSst --version` to test that the installation succeeded (and that you are running the appropriate version).
3. Run `automlst -h` to get information on how to get started.
3. Run `autoBIGSst -h` to get information on how to get started.
### Example
Let's say you have a fasta called `seq.fasta` which contains several sequences. You know all sequences in `seq.fasta` are Bordetella pertussis sequences, and you know you have the sequences for the necessary targets of your schema in each of them. You want to retrieve MLST profiles for all of them. This can be done by:
1. Running `automlst info -l` to list all available `seqdef` databases and find the database associated with Bordetella (you should see one called `pubmlst_bordetella_seqdef`).
1. Running `autoBIGSst info -l` to list all available `seqdef` databases and find the database associated with Bordetella (you should see one called `pubmlst_bordetella_seqdef`).
2. Then, run `automlst info -lschema pubmlst_bordetella_seqdef` to get the available typing schemas and their associated IDs. In this example, let's assume we want a normal MLST scheme. In this case, we would pay attention to the number next to `MLST` (it should be `3`).
2. Then, run `autoBIGSst info -lschema pubmlst_bordetella_seqdef` to get the available typing schemas and their associated IDs. In this example, let's assume we want a normal MLST scheme. In this case, we would pay attention to the number next to `MLST` (it should be `3`).
3. Then, run `automlst st -h` and familiarize yourself with the parameters needed for sequence typing.
3. Then, run `autoBIGSst st -h` and familiarize yourself with the parameters needed for sequence typing.
4. Namely, you should find that you will need to run `automlst st seq.fasta pubmlst_bordetella_seqdef 3 output.csv`. You can optionally include multiple `FASTA` files, and/or `--exact` to only retrieve exact sequence types, and/or `--stop-on-fail` to stop typing if one of your sequences fail to retrieve any type.
4. Namely, you should find that you will need to run `autoBIGSst st seq.fasta pubmlst_bordetella_seqdef 3 output.csv`. You can optionally include multiple `FASTA` files, and/or `--exact` to only retrieve exact sequence types, and/or `--stop-on-fail` to stop typing if one of your sequences fail to retrieve any type.
5. Sit tight, and wait. The `output.csv` will contain your results once completed.

View File

@ -3,18 +3,18 @@ requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "automlst.cli"
name = "autoBIGSst.cli"
dynamic = ["version"]
readme = "README.md"
dependencies = [
"automlst-engine"
"autoBIGSst-engine"
]
requires-python = ">=3.11"
description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases."
[project.scripts]
automlst = "automlst.cli.program:run"
autoBIGSst = "autoBIGSst.cli.program:run"
[tool.setuptools_scm]

View File

@ -4,4 +4,4 @@ pytest-cov
build
twine
setuptools_scm
automlst-engine
autoBIGSst-engine

View File

@ -1,6 +1,6 @@
from argparse import ArgumentParser, Namespace
import asyncio
from automlst.engine.data.remote.databases.bigsdb import BIGSdbIndex
from autoBIGSst.engine.data.remote.databases.bigsdb import BIGSdbIndex
def setup_parser(parser: ArgumentParser):
parser.description = "Fetches the latest BIGSdb MLST database definitions."

View File

@ -3,8 +3,8 @@ from importlib import metadata
from os import path
import os
from automlst.cli import info, st
from automlst.cli.meta import get_module_base_name
from autoBIGSst.cli import info, st
from autoBIGSst.cli.meta import get_module_base_name
import importlib
root_parser = argparse.ArgumentParser(epilog='Use "%(prog)s info -h" to learn how to get available MLST databases, and their available schemas.'
@ -20,17 +20,17 @@ root_parser.add_argument(
action="store_true",
default=False,
required=False,
help="Displays the autoMLST.CLI version, and the autoMLST.Engine version."
help="Displays the autoBIGSst.CLI version, and the autoBIGSst.Engine version."
)
def run():
args = root_parser.parse_args()
if args.version:
print(f'autoMLST.CLI is running version {
metadata.version("automlst-cli")}.')
print(f'autoMLST.Engine is running version {
metadata.version("automlst-engine")}.')
print(f'autoBIGSst.CLI is running version {
metadata.version("autoBIGSst-cli")}.')
print(f'autoBIGSst.Engine is running version {
metadata.version("autoBIGSst-engine")}.')
if hasattr(args, "run"):
args.run(args)

View File

@ -2,9 +2,9 @@
from argparse import ArgumentParser, Namespace
import asyncio
import datetime
from automlst.engine.data.local.csv import write_mlst_profiles_as_csv
from automlst.engine.data.local.fasta import read_multiple_fastas
from automlst.engine.data.remote.databases.bigsdb import BIGSdbIndex
from autoBIGSst.engine.data.local.csv import write_mlst_profiles_as_csv
from autoBIGSst.engine.data.local.fasta import read_multiple_fastas
from autoBIGSst.engine.data.remote.databases.bigsdb import BIGSdbIndex
def setup_parser(parser: ArgumentParser):