docs: update README and add pixi-based tests
- Add property-based tests for PixiRunner - Add HAN055.fna test data file - Update README with pixi installation and usage guide - Update .gitignore for pixi and test artifacts - Update CLI to remove Docker-related arguments
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Bttoxin single-FNA pipeline CLI (pixi-based).
|
||||
|
||||
This CLI uses pixi environments for execution:
|
||||
- digger environment: BtToxin_Digger with bioconda dependencies
|
||||
- pipeline environment: Python analysis with pandas/matplotlib/seaborn
|
||||
|
||||
Example:
|
||||
python -m bttoxin.cli --fna tests/test_data/HAN055.fna --lang zh
|
||||
|
||||
# With custom database
|
||||
python -m bttoxin.cli --fna tests/test_data/HAN055.fna --bttoxin_db_dir /path/to/bt_toxin
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
@@ -11,8 +23,8 @@ def main() -> int:
|
||||
ap.add_argument("--fna", type=Path, required=True, help="Path to a single .fna file")
|
||||
ap.add_argument("--toxicity_csv", type=Path, default=Path("Data/toxicity-data.csv"))
|
||||
ap.add_argument("--base_workdir", type=Path, default=None, help="Base working dir (default: runs/bttoxin under repo root)")
|
||||
ap.add_argument("--image", type=str, default="quay.io/biocontainers/bttoxin_digger:1.0.10--hdfd78af_0")
|
||||
ap.add_argument("--platform", type=str, default="linux/amd64")
|
||||
ap.add_argument("--bttoxin_db_dir", type=Path, default=None,
|
||||
help="外部 bt_toxin 数据库目录路径(默认自动检测 external_dbs/bt_toxin)")
|
||||
ap.add_argument("--min_identity", type=float, default=0.0)
|
||||
ap.add_argument("--min_coverage", type=float, default=0.0)
|
||||
ap.add_argument("--disallow_unknown_families", action="store_true", default=False)
|
||||
@@ -21,7 +33,7 @@ def main() -> int:
|
||||
ap.add_argument("--threads", type=int, default=4)
|
||||
args = ap.parse_args()
|
||||
|
||||
pipe = BtSingleFnaPipeline(image=args.image, platform=args.platform, base_workdir=args.base_workdir)
|
||||
pipe = BtSingleFnaPipeline(base_workdir=args.base_workdir)
|
||||
res = pipe.run(
|
||||
fna=args.fna,
|
||||
toxicity_csv=args.toxicity_csv,
|
||||
@@ -31,6 +43,7 @@ def main() -> int:
|
||||
require_index_hit=args.require_index_hit,
|
||||
lang=args.lang,
|
||||
threads=args.threads,
|
||||
bttoxin_db_dir=args.bttoxin_db_dir,
|
||||
)
|
||||
|
||||
if not res.get("ok"):
|
||||
|
||||
Reference in New Issue
Block a user