Skip to content

Module aggregate

jamesck2 edited this page Jun 21, 2026 · 1 revision

Module: aggregate

Merges the results from annotate and de-novo into a single report. The functional classifications and viral-origin confidence from annotate are combined with the annotation-independent AVG/viral predictions from de-novo, so AVGs supported by either approach (or both) appear in one table.

This module is run automatically as the final step of end-to-end. Run it directly when you have produced annotate and de-novo outputs separately.

Basic usage

checkamg aggregate \
  -a /path/to/annotate_output \
  -d /path/to/denovo_output \
  -o /path/to/aggregate_output

Parameters

Input directories

Argument Description
-a, --annotate-dir Path to the CheckAMG annotate output directory (required).
-d, --denovo-dir Path to the CheckAMG de-novo output directory (required).

Outputs

Argument Default Description
-o, --output required Output directory for the aggregated results.
-pq, --save-to-parquet / --no-... off Write the final aggregated results as parquet instead of TSV (smaller, not human-readable without tools). Recommended for large datasets.

Resources

Argument Default Description
-t, --threads 25% of available Maximum number of threads.
-m, --mem 80% of available Memory limit in GB.
--debug / --no-debug off Enable debug-level logging.

Outputs

The output directory contains three aggregated tables (TSV, or parquet with --save-to-parquet), plus CheckAMG_aggregate.log, config_aggregate.yaml, and a snakemake/ directory. Every table has one row per protein from the joined annotate and de-novo results (proteins present in only one module are retained).

  • aggregated_results.tsv: the simplified per-protein table. Columns: Protein, Contig, Genome, Final AVG Probability, and Final AVG Confidence Level. Here Classification and Function come from annotate, while Final AVG Probability/Final AVG Confidence Level come from de-novo and are the combined probability/confidence that a protein is both auxiliary-like AND viral.
  • aggregated_results_detailed.tsv: the same rows but keeping both modules' predictions side by side. It has separate Viral Probability (annotate) / Viral Confidence Level (annotate) (the annotate LightGBM viral-origin call) and Viral Probability (de-novo) / Viral Confidence Level (de-novo) columns, alongside Classification (annotate), Function (annotate), and the de-novo AVG-like * and Final AVG * columns.
  • aggregated_results_categories.tsv: the simplified table with three multi-level functional category columns (category_L1, category_L2, category_L3) inserted after Classification. Categories are taken from annotate's metabolic/physiological/regulatory category tables. Proteins with no mapped category are filled with Unknown when they have no annotate function (e.g. de-novo-only proteins) and Other when they are unclassified with no category. A single AVG (especially an AMG) can list multiple categories because its matched reference family has been described in multiple pathways; this does not mean the gene acts in all of them (or any). See Why does one AVG have multiple function categories?.

Clone this wiki locally