cleanup-blastdb-volumes-py
Quick Start
- Command:
cleanup-blastdb-volumes.py -db <dbname> -dbtype <prot|nucl> [-dry-run] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/cleanup-blastdb-volumes.py - Full reference: See
references/help.md
When To Use This Tool
- Remove orphaned BLAST database volumes after database updates or alias changes.
- Reclaim disk space when a
.palor.nalalias DB no longer references all volumes on disk. - Audit what would be deleted first with
-dry-run. - Resolve clutter in BLAST DB directories found through
BLASTDBor NCBI config lookup.
Common Patterns
# 1) Preview cleanup for a protein alias database
cleanup-blastdb-volumes.py \
-db nr \
-dbtype prot \
-dry-run
# 2) Remove extra nucleotide volumes after review
cleanup-blastdb-volumes.py \
-db nt \
-dbtype nucl
# 3) Verbose preview when the DB is discovered via BLASTDB
BLASTDB=/data/blastdb \
cleanup-blastdb-volumes.py \
-db swissprot \
-dbtype prot \
-dry-run \
-verbose
Recommended Workflow
- Confirm the target database is an alias-style BLAST DB with a
.palor.nalfile. - Run
-dry-runfirst and inspect the extra volumes listed from the alias file'sDBLIST. - Re-run without
-dry-runonly after confirming the leftover volumes are genuinely stale. - Finish with
blastdbcheckor a representative BLAST query if the database is business-critical.
Guardrails
- This script cleans alias databases; if there is no
.palor.nalfile, it exits without doing useful work. - Database lookup is path-sensitive: it searches the current directory,
BLASTDB, and.ncbirc/ncbi.iniconfiguration. - Always use
-dry-runfirst because the non-dry mode deletes files immediately. - The cleanup removes companion files for orphaned volumes, not just the
.pin/.ninindex stub. - Both
-dband-dbtypeare required.