DNA sequence encoding, decoding, and analysis using (Integer) Chaos Game Representation
chaoscoder
is a high-performance Rust tool for transforming DNA sequences into visual or numerical formats using Chaos Game Representation (CGR) and its improved version, Integer Chaos Game Representation (iCGR). It is the first user-oriented implementation of iCGR, supporting encoding, decoding, visualization, and comparison workflows.
- ✅ iCGR Encoding/Decoding of DNA sequences using a robust, lossless integer-based method
- ✅ Efficient block-based encoding for long sequences (100 bp windows)
- ✅ CGR image generation from DNA sequences
- ✅ Similarity analysis using the DSSIM algorithm for comparing CGR images
You’ll need a Rust toolchain (stable
channel).
git clone https://github.com/Ebedthan/chaoscoder.git
cd chaoscoder
cargo build --release
Download binaries for your platform from the releases page:
- macOS (Apple Silicon): Download • Checksum
- macOS (Intel): Download • Checksum
- Linux (x86_64): Download • Checksum
- Windows (x86_64): Download • Checksum
Here are the main commands available
# Encode a FASTA sequence to iCGR format
chaoscoder encode seq.fa
# Decode an iCGR file back to the original sequence
chaoscoder decode seq.bicgr
# Generate a CGR image from a DNA sequence
chaoscoder draw seq.fa
# Compare CGR images in a folder using DSSIM
chaoscoder compare images_dir
For full details, do chaoscoder -h
.
Rust ≥ 1.82.0 (minimum supported version) Optional: fontconfig and pkg-config (for CGR rendering, may require system dependencies)
This crate's minimum supported rustc
version is 1.82.0
.
Found a bug? Have a feature request? Open an issue on the GitHub Issue Tracker.
This project is licensed under the MIT License. See LICENSE-MIT (or http://opensource.org/licenses/MIT) for details.