MAGICC: Metagenome-Assembled Genome Inference of Completeness and Contamination
Project description
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file magicc-0.2.0.tar.gz.
File metadata
- Download URL: magicc-0.2.0.tar.gz
- Upload date:
- Size: 642.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d85df92b2475d810e67b3265c5b2876d407db27324f695986e5a90a24bdecfec
|
|
| MD5 |
6d553fef0d0a8e30a770813a85e33c8f
|
|
| BLAKE2b-256 |
056c6e357ac2191cbf2e99b71aebbdd69e1813e781f8cb85e11a03e81542676d
|
File details
Details for the file magicc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: magicc-0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54ffb76b253e37b22ed23192753d1c42814b4fbac2981e79814d3c5e7b70e60f
|
|
| MD5 |
5c6f85a9f94ae3d1ee7dc1f9e8a6aa56
|
|
| BLAKE2b-256 |
c1dfc4b122af79585aadaaaa824c8078c9cc4e734c5929c6026b3063fb019ef4
|