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.3.0.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.3.0-py3-none-any.whl (647.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: magicc-0.3.0.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.3.0.tar.gz
Algorithm Hash digest
SHA256 0c744ed5d797f861ad2e90d41864d22301e6915f270a8e704f504bb9f9a80520
MD5 209b8c3a103c613dd4a65e9c240d8376
BLAKE2b-256 82b01a94606ec713581e3d89033910c468e2b55278f502ffb3bd6b50a2bd12ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: magicc-0.3.0-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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc2e24f7e2d3a777649b621464f4c7af8a70f5756adfeb8cebf0a1f5ba25d1b
MD5 f33fa772d025851cb033d636745f7963
BLAKE2b-256 04de53eb2705966b330092d412c038fba12bd7ff627bb959d9a93514de8cd1df

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