| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This project is a small, inspectable simulation of the central dogma:
DNA gene --transcription--> messenger RNA --ribosome--> amino-acid sequence / protein
It is intentionally a molecule-count model, not a chemically complete cell. A simulation step represents completed transcription and translation events. The cell keeps track of its genome, individual mRNA molecules, ribosomes, and protein copy counts. mRNA and proteins can degrade over time.
Python is the best starting point for the simulation core because it has a strong scientific ecosystem (NumPy, SciPy, JAX, PyTorch, BioPython) and makes model rules easy to inspect and change. If this becomes an interactive visual application, keep the simulation as a separate Python package or service and add a TypeScript/ JavaScript front end. If performance later becomes a bottleneck, profile first, then move only the hot loops to JAX, Rust, or C++.
No third-party packages are required.
python -m simple_cell examples/minimal_genome.fasta --steps 15 --seed 7
python -m unittest discover -s tests -vThe interactive viewer is a Next.js application in visualizer/. It mirrors the Python model's update order in the browser and renders the cell with Three.js and React Three Fiber.
cd visualizer
npm install
npm run devThen open http://localhost:3000. Use Play, Pause, Step, and Reset to control time; drag the cell to orbit and scroll to zoom.
Each FASTA record is treated as one already-annotated protein-coding gene. For example:
>green_gene
ATGAAACCCGGGTTTTAA
The coding DNA must start with ATG, end with an in-frame stop codon (TAA, TAG, or TGA), and contain only A, C, G, and T.
Useful options:
python -m simple_cell --help
python -m simple_cell examples/minimal_genome.fasta \
--steps 50 --ribosomes 20 --transcription-rate 0.8This is useful for learning and for establishing the software architecture. It does not yet model promoters, transcription factors, introns, alternative splicing, tRNA abundance, protein folding, metabolism, membranes, cell division, or spatial chemistry.
The most important scaling rule is to keep biology, simulation scheduling, and visualization separate. That lets the same Python cell run in a terminal today, inside a tissue simulator later, and behind a browser UI eventually.
| Back | FazBrowse Home | New Git URL |