How mwasifanwar/biosynther works
Project Type and Purpose
• BioSynther is a Python-based CLI/library tool—a generative AI pipeline for designing synthetic biological circuits and organisms.
• Its use cases include environmental cleanup, medicine production, and sustainable manufacturing.
File Structure
Top-level entry points and directories:
• design_organism.py & train_generator.py – CLI scripts or orchestration.
• src/ – core pipeline modules:
– circuit_designer.py
– dna_generator.py
– protein_designer.py
– metabolic_engine.py
– fitness_evaluator.py
– config.py
– utils/ (bioinformatics.py, chemistry.py)
• models/ – machine-learning or generative models (empty init suggests future extensibility).
• tests/ – unit tests for dna generation and metabolic engineering.
• setup.py & requirements.txt – packaging and dependencies.
README
– “Generative AI system” emphasizes a multi-stage pipeline driven by AI/ML.
– No frontend; interactions occur via CLI or library calls.
Main Components and Their Interactions
a. Entry Points
• design_organism.py – user invokes full design pipeline.
• train_generator.py – trains or fine-tunes generative models.
b. Configuration Loader
• src/config.py – reads parameters (target pathways, organism constraints).
c. Generation Modules (Design Stage)
• dna_generator.py – proposes DNA sequences.
• protein_designer.py – translates sequences into protein structures.
d. Simulation & Evaluation
• metabolic_engine.py – simulates metabolic pathways in silico.
• fitness_evaluator.py – scores or ranks designs against objectives.
e. Circuit Composition
• circuit_designer.py – combines high-scoring elements into a final circuit.
f. Utilities & Models
• src/utils/bioinformatics.py & chemistry.py – shared helpers (format conversions, scoring functions).
• models/ – stores trained generative or predictive models.
g. Tests
• tests/ – validate correctness of key modules.
Architectural Patterns and Principles
– Pipeline/chain of responsibility: data flows sequentially through generation → simulation → evaluation → assembly.
– Modular separation: each domain (DNA, protein, metabolism, fitness, circuit) is a standalone component.
– Layered utilities: common helpers abstract bioinformatics and chemical operations.
– Extensibility: models/ and utils/ allow plugging in new algorithms or ML models.
User CLI → Config → DNA Generator → Protein Designer → Metabolic Engine → Fitness Evaluator → Circuit Designer → Output
c. Off to the side, show:
– models/ as a data store that both dna_generator.py and train_generator.py read from/write to.
– utils/ as a shared library used by all core modules.
– tests/ as a separate validation layer (can be depicted beneath core pipeline).
– Orchestration (CLI scripts)
– Core pipeline modules
– Utility libraries
– Data/model repositories
– Testing components
f. Technologies: Python, any key libraries from requirements.txt (e.g., TensorFlow/PyTorch if present), JSON/YAML for config, etc.