5 Commits
0.3.0 ... 0.4.0

8 changed files with 25 additions and 14 deletions

View File

@@ -1,19 +1,25 @@
# autoBIGS.CLI # autoBIGS.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. A command-line interface (CLI) based program that allows quickly batched requests for obtaining MLST profiles on multiple FASTA sequences and exporting it as a convenient CSV. Capable of querying a variety of MLST databases from both Institut Pasteur and PubMLST.
This program is simply a command-line interface for [autoBIGS.Engine](https://pypi.org/project/autoBIGS.engine). This program is simply a command-line interface for [autoBIGS.engine](https://pypi.org/project/autoBIGS.engine).
## Features ## Features
This CLI is capable of exactly what [autoBIGS.Engine](https://pypi.org/project/autoBIGS.engine) is capable of: This CLI is capable of exactly what [autoBIGS.engine](https://pypi.org/project/autoBIGS.engine) is capable of:
- Import multiple FASTA files - Import multiple whole genome FASTA files
- Fetch the available BIGSdb databases that is currently live and available - Fetch the available BIGSdb databases that is currently live and available
- Fetch the available BIGSdb database schemas for a given MLST database - Fetch the available BIGSdb database schemas for a given MLST database
- Retrieve exact/non-exact MLST allele variant IDs based off a sequence - Retrieve exact/non-exact MLST allele variant IDs based off a sequence
- Retrieve MLST sequence type IDs based off a sequence - Retrieve MLST sequence type IDs based off a sequence
- Output all results to a single CSV - Output all results to a single CSV
## Planned Features for CLI
- Specifications of multi-threading capacity
- Session authentication for updated database schemas (as required by both PubMLST and Institut Pasteur)
Please refer to [autoBIGS.engine](https://pypi.org/project/autoBIGS.engine) for more planned features.
## Usage ## Usage
This CLI can be installed with `pip`. Please ensure [pip is installed](https://pip.pypa.io/en/stable/installation/). Then: This CLI can be installed with `pip`. Please ensure [pip is installed](https://pip.pypa.io/en/stable/installation/). Then:

View File

@@ -10,11 +10,16 @@ readme = "README.md"
dependencies = [ dependencies = [
"autoBIGS-engine" "autoBIGS-engine"
] ]
requires-python = ">=3.11" requires-python = ">=3.12"
description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases." description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases."
[project.urls]
Repository = "https://github.com/RealYHD/autoBIGS.cli"
Issues = "https://github.com/RealYHD/autoBIGS.cli/issues"
[project.scripts] [project.scripts]
autoBIGS = "autoBIGS.cli.program:run" autoBIGS = "autobigs.cli.program:run"
[tool.setuptools_scm] [tool.setuptools_scm]

View File

@@ -4,4 +4,4 @@ pytest-cov
build build
twine twine
setuptools_scm setuptools_scm
autobigsst.engine autoBIGS.engine

View File

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

View File

@@ -3,8 +3,8 @@ from importlib import metadata
from os import path from os import path
import os import os
from autoBIGS.cli import info, st from autobigs.cli import info, st
from autoBIGS.cli.meta import get_module_base_name from autobigs.cli.meta import get_module_base_name
import importlib import importlib
root_parser = argparse.ArgumentParser(epilog='Use "%(prog)s info -h" to learn how to get available MLST databases, and their available schemas.' root_parser = argparse.ArgumentParser(epilog='Use "%(prog)s info -h" to learn how to get available MLST databases, and their available schemas.'

View File

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