# BtToxin_Digger (pixi) reproduction This repo is a **reproducible runtime environment + example outputs** for BtToxin_Digger 1.0.10 with **BLAST v5 database compatibility**. It is **not** an official fork or a new BtToxin_Digger release. ## License / Citation / Disclaimer - **BtToxin_Digger** is developed by its original authors; cite the upstream publication if you use it in research. - **This repository** only provides an environment wrapper (pixi) and example runs for reproducibility; it does not modify BtToxin_Digger source code. - **Disclaimer**: This is an independent, community-maintained setup and is not endorsed by the upstream authors. This directory reproduces the BtToxin_Digger environment from `quay.io/biocontainers/bttoxin_digger:1.0.10--hdfd78af_0` using pixi so the `scripts/run_single_fna_pipeline.py` digger step can be run without Docker. ## 1) Environment definition (vs docker image) - `pixi.toml` keeps `bttoxin_digger=1.0.10` + `perl=5.26.2` (legacy stack) while upgrading `blast` to a v5-capable release for BLASTDB v5. - Changes relative to `quay.io/biocontainers/bttoxin_digger:1.0.10--hdfd78af_0`: - BLAST+ upgraded from 2.12.0 to 2.16.0 (required to read v5 databases). - Explicitly pinned `perl-file-tee==0.07` and `perl-list-util==1.38`. - `channel-priority = "disabled"` to allow mixing bioconda/conda-forge and the legacy label for perl compatibility. Create the environment: ``` cd /home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro pixi install ``` ## 2) Database wiring (BLAST v4 vs v5) The external BTTCMP database under `external_dbs/bt_toxin` ships with a BLAST v5 index (built by newer BLAST+). If you run with BLAST 2.7, you must rebuild v4 databases; with BLAST >= 2.10, you can use the v5 database directly. ### Recommended: use the shared `external_dbs` (no copy) Keep a single source of truth and link it into the pixi environment: ``` ENV_BIN=/home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro/.pixi/envs/default/bin ln -sfn /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin \ "$ENV_BIN/BTTCMP_db/bt_toxin" ``` This avoids duplicating a large database inside the repo. ### Optional: freeze a snapshot inside this repo If you want this repo to be self-contained, copy a snapshot and point the environment at it (note: consider Git LFS if you intend to push it): ``` SNAPSHOT=/home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro/external_dbs_snapshot mkdir -p "$SNAPSHOT" cp -a /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin "$SNAPSHOT/" ln -sfn "$SNAPSHOT/bt_toxin" "$ENV_BIN/BTTCMP_db/bt_toxin" ``` Rebuild `bt_toxin` using the external FASTA: ``` ENV_BIN=/home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro/.pixi/envs/default/bin V4_DB=/home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro/bt_toxin_v4 mkdir -p "$V4_DB" cp -a /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin/db "$V4_DB/" ln -sfn /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin/seq "$V4_DB/seq" "$ENV_BIN/makeblastdb" \ -in /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin/seq/bt_toxin20251104.fas \ -dbtype prot \ -out "$V4_DB/db/bt_toxin" \ -parse_seqids ln -sfn "$V4_DB" "$ENV_BIN/BTTCMP_db/bt_toxin" ``` For BLAST v5 (current pixi.toml), point back to the external DB: ``` ln -sfn /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin \ "$ENV_BIN/BTTCMP_db/bt_toxin" ``` Rebuild the negative-set (back) database bundled with BtToxin_Digger: ``` "$ENV_BIN/makeblastdb" \ -in "$ENV_BIN/BTTCMP_db/back/seq/negative_set-20210607" \ -dbtype prot \ -out "$ENV_BIN/BTTCMP_db/back/db/back" \ -parse_seqids ``` ## 3) Run BtToxin_Digger (assembled genome) `run_digger_pixi.sh` sets `RATTLER_CACHE_DIR` inside this directory so pixi can write its cache in the workspace (the default `~/.cache` path is blocked by the sandbox). Example for a single `.fna` (use a clean working directory): ``` mkdir -p /home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro/work/C15_pixi_run_v5 cd /home/zly/project/bttoxin-pipeline/runs/bttoxin_digger_v5_repro/work/C15_pixi_run_v5 bash ../run_digger_pixi.sh ../examples/inputs .fna 4 ``` If you want to bind `external_dbs/bt_toxin` explicitly: ``` bash ../run_digger_pixi.sh ../examples/inputs .fna 4 /home/zly/project/bttoxin-pipeline/external_dbs/bt_toxin ``` Outputs land under `Results/` in the working directory. ### 参数说明(pixi run_digger_pixi.sh) - `input_dir`: 输入目录(里面放 `.fna` 文件) - `scaf_suffix`: 输入文件后缀(例如 `.fna`) - `threads`: 线程数(默认 4) - `bttoxin_db_dir`: 外部 bt_toxin 数据库路径(可选) ### 与 scripts/run_single_fna_pipeline.py 的一致性 pixi 脚本调用的 BtToxin_Digger 参数与 `scripts/run_single_fna_pipeline.py` 里的 docker 调用一致,核心参数对照如下: - `--SeqPath