HomeMolecular BiologyMERFISH Codespace Embedding (2D)

MERFISH Codespace Embedding (2D)

A genuine 2D counterpart to the 3D MERFISH barcode simulator: instead of a 3D tissue scatter, this embeds the error-correcting codebook itself into a 2D plane by classical multidimensional scaling on real pairwise Hamming distances, then locates each noisy molecule readout in that plane by exact algebraic trilateration -- watch decode accuracy and embedding stress respond live to barcode length and error rate.

Molecular Biology2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-spatial-transcriptomics ↗ Open standalone

MERFISH-style spatial transcriptomics identifies individual mRNA molecules by reading a binary barcode across sequential rounds of hybridization and imaging, then decoding each noisy readout against an error-correcting codebook. The 3D version of this simulator renders that process as single molecules scattered through a tissue volume; this 2D counterpart instead visualizes the abstract combinatorics directly, by embedding the codebook's real pairwise Hamming distances into a 2D plane through classical multidimensional scaling — an eigendecomposition computed live in the browser — and then locating each decoded molecule in that same plane via exact algebraic trilateration from its own noisy distance-to-codeword vector. Decoding itself still runs the same nearest-codeword, error-correcting algorithm on the true bit strings; only the spatial layout is genuinely reinvented in 2D. Adjust barcode length, per-round error rate and the error-correction toggle to see decode accuracy, error-corrected count, and the embedding's own geometric distortion (stress) respond together live.

⚙ Under the hood

A genuine 2D counterpart to the 3D MERFISH barcode simulator: instead of a 3D tissue scatter, this embeds the error-correcting codebook itself into a 2D plane by classical multidimensional scaling on real pairwise Hamming distances, then locates each noisy molecule readout in that plane by exact algebraic trilateration -- watch decode accuracy and embedding stress respond live to barcode length and error rate.

MERFISHspatial transcriptomicsmultidimensional scalingerror-correcting codeHamming distance2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)