How creatorzzy/chromosomal_structure_tools works
Chromosomal Structure Tools is a browser-based Hi-C reconstruction and 3D viewing app, with Deno command-line tools for matrix and coordinate exports. The main web workflow accepts a contact file, runs shared ShRec3D computation in a Web Worker, then displays and exports the resulting chromosome model. The stages and shared-core calls are documented in the README and sampled source; UI event wiring and some export handling are only partially sampled, so those links are kept at the supported module level.
Main entry points: main.js UI controller · fullsize-matrix.mjs Matrix CLI · coordinates.mjs Coordinates CLI · worker.mjs Compute worker
Components 17
Web application
- App page
index.html - UI controller
src/main.js - Compute worker
src/worker.mjs - Display controls
src/main.js - Help and tour
src/main.js
Reconstruction core
- Parse contacts
src/core.mjs - Build matrix
src/core.mjs - Contact distances
src/core.mjs - 3D coordinates
src/core.mjs - Curve smoothing
src/core.mjs - CSV serialization
src/core.mjs
Deno command line
- Matrix CLI
src/cli/fullsize-matrix.mjs - Coordinates CLI
src/cli/coordinates.mjs
3D viewing
- Structure viewer
src/viewer.js - Image/video export
src/viewer.js
Other components
- User
- Input/output files
Connections 32
- User → App page: opens
- User → UI controller: selects data
- App page → UI controller: hosts UI
- UI controller → Compute worker: sends text
- Compute worker → Parse contacts: runs pipeline
- Parse contacts → Build matrix: parsed contacts
- Build matrix → Contact distances: contact matrix
- Contact distances → 3D coordinates: distance matrix
- 3D coordinates → Compute worker: coordinates
- Build matrix → CSV serialization: matrix data
- 3D coordinates → CSV serialization: coordinates
- CSV serialization → Compute worker: CSV strings
- Compute worker → UI controller: results and progress
- UI controller → Structure viewer: sets structure
- Structure viewer → Curve smoothing: smooths coordinates
- UI controller → Display controls: updates options
- Display controls → Structure viewer: applies settings
- UI controller → Image/video export: requests export
- Image/video export → UI controller: image or video
- UI controller → Help and tour: opens help or tour
- User → Matrix CLI: runs command
- User → Coordinates CLI: runs command
- Input/output files → Matrix CLI: sparse matrix
- Matrix CLI → Parse contacts: parses contacts
- Matrix CLI → Build matrix: builds full matrix
- Matrix CLI → CSV serialization: formats CSV
- Matrix CLI → Input/output files: writes matrix CSV
- Input/output files → Coordinates CLI: matrix CSV
- Coordinates CLI → Contact distances: computes distances
- Coordinates CLI → 3D coordinates: computes coordinates
- Coordinates CLI → CSV serialization: formats coordinates
- Coordinates CLI → Input/output files: writes coordinates CSV