Skip to main content

MAGICC: Metagenome-Assembled Genome Inference of Completeness and Contamination

Project description

MAGICC logo

MAGICC

Metagenome-Assembled Genome Inference of Completeness and Contamination

Accurate and 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: Accurate and 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.2.1.tar.gz (642.2 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.2.1-py3-none-any.whl (647.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for magicc-0.2.1.tar.gz
Algorithm Hash digest
SHA256 84ed4fef2e1b52eefdfe9b5d3acdd466f610369f69f5c72088a8dba582b5b90b
MD5 5717925abf960a20dd7f7210c78e8c2e
BLAKE2b-256 5f7da667fc706706b6169aaaa2c27195404209cfb1a9025f1aa1d313cf613b0b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for magicc-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbd3f02ee4da0dbcae25bf238ecb136946b81f74ef663ecea07da738c7846265
MD5 6a1e990d675d8359e7eee0674d6a9261
BLAKE2b-256 b6cfaac8d3f41def52dc1612acd55227e9eb16f3b428d0c2ca395949dc89696c

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