Skip to main content

MAGICC: Metagenome-Assembled Genome Inference of Completeness and Contamination

Project description

MAGICC

Metagenome-Assembled Genome Inference of Completeness and Contamination

Ultra-fast genome quality assessment using core gene k-mer profiles and deep learning.

Installation

pip install magicc

Or from source:

git clone https://github.com/renmaotian/magicc.git
cd magicc
pip install -e .

Note: Git LFS is required to clone the repository (the ONNX model is ~180 MB).

Dependencies

  • Python >= 3.8
  • numpy >= 1.20
  • numba >= 0.53
  • scipy >= 1.7
  • h5py >= 3.0
  • onnxruntime >= 1.10

Usage

# Predict quality for all FASTA files in a directory (uses all CPUs by default)
magicc predict --input /path/to/genomes/ --output predictions.tsv

# Single genome
magicc predict --input genome.fasta --output predictions.tsv

# Specify threads and file extension
magicc predict --input /path/to/genomes/ --output predictions.tsv --threads 8 --extension .fa

Options

magicc predict [OPTIONS]

Required:
  --input, -i       Path to genome FASTA file(s) or directory
  --output, -o      Output TSV file path

Optional:
  --threads, -t     Number of threads (default: 0 = all CPUs)
  --batch-size      Batch size for ONNX inference (default: 64)
  --extension, -x   Genome file extension filter (default: .fasta)
  --model           Path to ONNX model file (auto-downloads if not found)
  --quiet, -q       Suppress progress output
  --verbose, -v     Verbose debug output

Output

Tab-separated file with three columns:

genome_name pred_completeness pred_contamination
genome_001 95.2341 2.1567
genome_002 78.4521 15.3421
  • pred_completeness: Predicted completeness (%), range [50, 100]
  • pred_contamination: Predicted contamination (%), range [0, 100]

Citation

If you use MAGICC in your research, please cite:

Tian, R. (2026). MAGICC: Ultra-fast genome quality assessment using core gene k-mer profiles and deep learning. In preparation.

License

MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magicc-0.1.0.tar.gz (649.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magicc-0.1.0-py3-none-any.whl (654.2 kB view details)

Uploaded Python 3

File details

Details for the file magicc-0.1.0.tar.gz.

File metadata

  • Download URL: magicc-0.1.0.tar.gz
  • Upload date:
  • Size: 649.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for magicc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ef2974c3c046bba7721b65419255e3ad2cb6c106365ea4ec790c7d0d3be33c6
MD5 3b012b542ca75b13f2893c3bab7d0d9b
BLAKE2b-256 9cc853370edbacbe7aee05823c0ef7133588f10f2a428bd015b92b7249e03880

See more details on using hashes here.

File details

Details for the file magicc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: magicc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 654.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for magicc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72c33d5e40811418de7ea964e0037788e1694b10673fc279c48ca79870801e5d
MD5 2fcfa74269fa319b9a6a630e042e8378
BLAKE2b-256 c91520e1612aa1401f321b9eed189934e5e8df4350f6179c4c8d72fa7e7995e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page