How lorenzoorsini3/cpg-island-predictor works
CIP predicts CpG islands from FASTA sequences through either a command-line or Tkinter interface. The core workflow reads and filters sequences, extracts mono-, di-, and trinucleotide features, runs ONNX inference, reports predictions, and writes CSV output with optional BED/GFF3 files. Metadata describes model compatibility and provenance. The README documents the stacked ensemble and position-independent design; excerpts support the feature, inference, and output stages. Some internal details and CLI startup flow were not sampled, so uncertain links are omitted.
Main entry points: CIP.py Prediction orchestration · gui.py Tkinter GUI · logger.py Session logging · features_extractor.py K-mer features
Components 16
User interfaces
- CLI entry
CIP.py - Tkinter GUI
gui.py
Prediction workflow
- Prediction orchestration
CIP.py - Sequence reading
CIP.py - Sequence validation
CIP.py - K-mer features
modules/features_extractor.py - ONNX inference
CIP.py - Island predictions
CIP.py - Result files
CIP.py
Model and metadata
- Trained ensemble
config/model.onnx - Model metadata
config/metadata.json
Logging and errors
- Error handling
modules/exception_handler.py - Session logging
modules/logger.py - Log archiving
modules/logger.py
Other components
- Analyst
- FASTA input
Connections 16
- Analyst → CLI entry: runs
README.md - Analyst → Tkinter GUI: opens
README.md - FASTA input → Prediction orchestration: supplies sequences
README.md - CLI entry → Prediction orchestration: runs
README.md - Tkinter GUI → Prediction orchestration: calls predictor
gui.py - Prediction orchestration → Sequence reading: reads FASTA
CIP.py - Prediction orchestration → Sequence validation: validates sequences
CIP.py - Prediction orchestration → K-mer features: extracts features
CIP.py - Prediction orchestration → ONNX inference: runs batches
CIP.py - ONNX inference → Trained ensemble: runs model
CIP.py - Prediction orchestration → Island predictions: produces predictions
CIP.py - Prediction orchestration → Result files: writes results
CIP.py - Prediction orchestration → Model metadata: loads metadata
CIP.py - Prediction orchestration → Error handling: formats errors
CIP.py - Prediction orchestration → Session logging: logs activity
CIP.py - Session logging → Log archiving: archives logs
modules/logger.py