Skip to content

CLI Commands

Arx ships a manage_arx.py script (run inside the container, next to manage.py) for administrative tasks that aren't exposed in the web UI. This page covers the commonly used commands; run python manage_arx.py <command> --help for the full list of options for any command.

Some commands are already covered in more detail elsewhere:

Common commands

sanity-check-folder-structure

Validates the folder structure and metadata files (organism.json, genome.json, ...) without touching the database. Useful to run before an import to catch issues early.

python manage_arx.py sanity-check-folder-structure

import-organism

Imports or updates a single organism (and its genomes) from the folder structure into the database, without re-importing everything else. Faster than import-folder-structure when only one organism changed.

python manage_arx.py import-organism ORGANISM_NAME

remove-organism

Removes one or more organisms from the database. Pass --ignore to also create a .ignore file in the organism's folder, so it's skipped by future imports instead of being re-imported.

python manage_arx.py remove-organism ORGANISM_NAME
python manage_arx.py remove-organism ORGANISM_A ORGANISM_B --ignore

remove-missing-organisms

Removes organisms/genomes from the database that are no longer present in the folder structure (e.g. their folder was deleted). Prompts for confirmation per organism/genome unless --auto_delete_missing is set. This runs automatically as part of import-folder-structure.

python manage_arx.py remove-missing-organisms

import-contigs

Backfills contig records (from the .gbk file) for genomes that were imported before contig tracking was added, or where contigs are otherwise missing. Skips genomes that already have contigs.

python manage_arx.py import-contigs

recount-genome-annotypes

Recomputes cached annotation-type counts for one or more genomes, or for all genomes with --all. Runs automatically after imports; only needed manually if counts drift out of sync.

python manage_arx.py recount-genome-annotypes --all

rebuild-blast-dbs

Completely wipes and rebuilds the BLAST databases (custom-taxonomy + alias DBs), for all genomes or a single --genome. Required as a one-time step on a fresh installation (see Installation Guide); afterwards the database is updated automatically as genomes are added or removed, so it's mainly needed again if the databases become corrupted or out of sync.

python manage_arx.py rebuild-blast-dbs

Advanced commands

These are safe to run, but are more specialized - typically used when troubleshooting.

check-blast-dbs

Read-only audit that reports inconsistencies between the database, taxid_map.json, and the BLAST DB files on disk. Makes no changes; run rebuild-blast-dbs to fix anything it finds.

python manage_arx.py check-blast-dbs

load-blast-dbs

(Re)builds BLAST databases for genomes that don't have one yet, or for a single --genome. Unlike rebuild-blast-dbs, this does not wipe existing databases first.

python manage_arx.py load-blast-dbs

update-taxids

Refreshes Arx's TaxID records against the NCBI taxdump. Pass --download_taxdump to also download the latest taxdump first.

python manage_arx.py update-taxids --download_taxdump

reload-color-css

Regenerates the CSS files used to color-code tags, TaxIDs, and annotation types. Needed if these colors look out of date after editing tags/TaxIDs directly in the database.

python manage_arx.py reload-color-css