https://github.com/ebedthan/chaoscoder
block-based integer chaos game representation for DNA sequences
https://github.com/ebedthan/chaoscoder
chaos-game-representation dna-sequence-analysis rust
Last synced: 9 months ago
JSON representation
block-based integer chaos game representation for DNA sequences
- Host: GitHub
- URL: https://github.com/ebedthan/chaoscoder
- Owner: Ebedthan
- License: mit
- Created: 2022-04-15T12:54:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-29T11:19:06.000Z (11 months ago)
- Last Synced: 2025-08-07T18:18:55.600Z (10 months ago)
- Topics: chaos-game-representation, dna-sequence-analysis, rust
- Language: Rust
- Homepage:
- Size: 2.34 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧬 chaoscoder
**DNA sequence encoding, decoding, and analysis using (Integer) Chaos Game Representation**
[](https://github.com/Ebedthan/chaoscoder/actions/workflows/ci.yml)
[](https://codecov.io/gh/Ebedthan/chaoscoder)
[](https://github.com/Ebedthan/chaoscoder/blob/master/LICENSE)
## 🌟 Overview
`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.
### ✨ Features
- ✅ **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](https://github.com/kornelski/dssim) for comparing CGR images
## 🚀 Installation
### 🛠️ From Source (via Cargo)
You’ll need a [Rust](https://rust-lang.org/tools/install) toolchain (`stable` channel).
```bash
git clone https://github.com/Ebedthan/chaoscoder.git
cd chaoscoder
cargo build --release
```
### 📁 Prebuilt Binaries
Download binaries for your platform from the [releases page](https://github.com/Ebedthan/chaoscoder/releases):
* macOS (Apple Silicon): [Download](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-aarch64-apple-darwin.tar.xz) • [Checksum](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-aarch64-apple-darwin.tar.xz.sh256)
* macOS (Intel): [Download](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-x86_64-apple-darwin.tar.xz) • [Checksum](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-x86_64-apple-darwin.tar.xz.sha256)
* Linux (x86\_64): [Download](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-x86_64-unknown-linux-gnu.tar.xz) • [Checksum](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-x86_64-unknown-linux-gnu.tar.xz.sha256)
* Windows (x86\_64): [Download](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-x86_64-pc-windows-msvc.zip) • [Checksum](https://github.com/Ebedthan/chaoscoder/releases/download/v1.0.0/chaoscoder-v1.0.0-x86_64-pc-windows-msvc.zip.sha256)
## 🛠️ Usage
Here are the main commands available
```bash
# 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`.
## 📦 Requirements
Rust ≥ 1.82.0 (minimum supported version)
Optional: fontconfig and pkg-config (for CGR rendering, may require system dependencies)
### Minimum Rust version policy
This crate's minimum supported `rustc` version is `1.82.0`.
### 🐛 Bugs & Feedback
Found a bug? Have a feature request?
Open an issue on the GitHub [Issue Tracker](https://github.com/Ebedthan/chaoscoder/issues).
### 📄 License
This project is licensed under the MIT License.
See [LICENSE-MIT](LICENSE-MIT) (or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)) for details.