Automated discovery and curation of Auxiliary Metabolic Genes (AMGs), Auxiliary Regulatory Genes (AReGs), and Auxiliary Physiology Genes (APGs) encoded by viral genomes
⚠️ This tool is in active development and has not yet been peer-reviewed.
CheckAMG identifies and curates high-confidence auxiliary viral genes (AVGs: AMGs, AReGs, and APGs) in viral genomes. It combines two complementary approaches: a reference-based path that uses curated functional annotations and viral genome context, and a reference-independent path that uses a protein genome language model (Protein Set Transformer, PST). Its prediction approach reflects years of community-defined standards for identifying auxiliary genes, validating that they are virus-encoded, and filtering common misannotations.
CheckAMG supports:
- Nucleotide or protein input
- Single-contig viral genomes or vMAGs (multi-contig)
- Running on viral genomes or viromes/metagenomes directly
- CPU-only or GPU-accelerated execution
Full documentation, detailed installation instructions, parameter descriptions, an FAQ, and notebooks to reproduce the analyses in the manuscript are located in the CheckAMG Wiki.
CheckAMG depends on PyTorch and the source-built torch_scatter extension (via PST), which must be installed before CheckAMG so the correct CPU/CUDA build is selected. The short version:
# Create a minimal conda environment
conda create -y -n CheckAMG python=3.11
conda activate CheckAMG
python -m ensurepip --upgrade
python -m pip install --upgrade pip setuptools wheel packaging uv
# Install torch + PyG extensions + FAISS (CPU example; see Wiki for GPU/CUDA)
uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu
uv pip install torch_geometric
uv cache clean torch_scatter 2>/dev/null || true
uv pip install torch_scatter --no-build-isolation --no-binary torch_scatter --refresh
uv pip install faiss-cpu
# Install CheckAMG (pulls PST and the remaining ML dependencies)
uv pip install checkamgGPU builds, ABI/torch_scatter troubleshooting, the full dependency list, and conda-pack instructions are in the Installation guide.
Download the databases (~116 GB, reducible to ~21 GB with --rm-hmm and excluding the de novo module's database):
checkamg download -d /path/to/db/destination --rm-hmmCheckAMG predicts AVGs through two independent approaches that can be combined:
annotate(annotation-based): predicts and curates AVGs from functional annotations (profile HMM searches) and viral genome context. It classifies predictions as metabolic (AMG), physiological (APG), or regulatory (AReG) and assigns a viral-origin confidence. This path is conservative and produces curated, trustworthy predictions on its own.de-novo(annotation-independent): embeds query proteins with the PST genome language model and predicts, by nearest-neighbor search against a labeled reference, whether each protein is virus-encoded and auxiliary. It does not assign specific functions, but it is more sensitive thanannotateand can recover AVGs that have no informative annotation, whichannotatecannot detect.aggregate: mergesannotateandde-novoresults into a single report.end-to-end: runsannotate, thende-novo(reusing the proteins fromannotate), thenaggregate, into one organized output.download: fetches the required databases.train: finetunes a custom CheckAMG-PST model forde-novo.
We recommend running end-to-end by default when feasible. Because de-novo is more sensitive than annotate alone, the combined run often identifies additional AVGs that annotation cannot. de-novo benefits substantially from a GPU, but GPU access is not required. If a GPU is unavailable or de-novo is impractical for your input size, running annotate alone is perfectly fine and will still produce curated, trustworthy AVG predictions.
Example data to test your installation are provided in examples/example_data.
End-to-end (recommended):
checkamg end-to-end \
-d /path/to/db/destination \
-i examples/example_data/single_contig_viruses.fasta \
-I examples/example_data/multi_contig_vMAGs \
-o CheckAMG_example_outAnnotate only:
checkamg annotate \
-d /path/to/db/destination \
-i examples/example_data/single_contig_viruses.fasta \
-I examples/example_data/multi_contig_vMAGs \
-o CheckAMG_annotate_outRun checkamg -h or checkamg <module> -h for all options, and see the Wiki for detailed descriptions of every parameter and output. By default, CheckAMG runs only on scaffolds that are at least 5 kb long, but this threshold can be adjusted using the --min-len argument.
Each results folder includes a README.txt describing its files. Start with avg_predictions.tsv (one row per predicted AVG) and genome_summary.tsv (one row per genome), found in 03_aggregate/ for end-to-end runs and in results/ for annotate runs. Example outputs are in examples/example_outputs.
To report bugs or request features, please use the GitHub Issues page. To help diagnose issues and debug, please re-run your command that led to the error with the --debug flag, and provide all log files (including module-specific logs within the 01_annotate, 02_denovo, and 03_aggregate outputs if running checkamg end-to-end).
A preprint of the manuscript describing CheckAMG is now available on bioRxiv. If you use CheckAMG in your work, please cite:
Kosmopoulos, J. C., Martin, C., Wainaina, J. M., Bolduc, B., Urvoy, M., Sullivan, M. B., & Anantharaman, K. (2026). CheckAMG: Accurate Identification of Auxiliary Viral Genes with Genome-Language Models. bioRxiv, https://doi.org/10.64898/2026.09.23.753886.
- James C. Kosmopoulos (kosmopoulos [at] wisc [dot] edu)
- Karthik Anantharaman (karthik [at] bact [dot] wisc [dot] edu)