A browser-based tool that screens whole-genome sequencing (WGS) data for inherited neuropathies. It reads BAM and CRAM files directly in the browser using Rust compiled to WebAssembly. No data leaves your computer.
The tool runs two independent analyses on your genome data:
Structural variant detection examines read depth across chromosome 17p to identify large duplications and deletions. It detects CMT1A (PMP22 duplication), HNPP (PMP22 deletion), Potocki-Lupski syndrome (RAI1 duplication), Smith-Magenis syndrome (RAI1 deletion), and YUHAL syndrome (contiguous PMP22+RAI1 duplication). The algorithm compares PMP22 region depth against a chr2 autosomal control, then scans for boundary breakpoints using a sliding window.
Point mutation screening checks 22,748 known pathogenic single-nucleotide variants across 165 neuropathy-associated genes. For each variant position in the catalog, the tool queries the alignment file, extracts the base from each overlapping read using CIGAR-aware position mapping, and counts reference vs. alternate alleles. Variants are classified as heterozygous, homozygous, hemizygous (chrX in males), or carrier (heterozygous recessive) based on allele balance, strand distribution, base quality, and mapping quality thresholds.
The variant catalog is generated from ClinVar (pathogenic and likely pathogenic variants, review status >= 1 star) filtered to the Genomics England PanelApp hereditary neuropathy gene panel. It is embedded in the WebAssembly binary at build time.
The entire analysis runs in the browser. There is no server-side processing.
- The user selects a BAM or CRAM file, its index (BAI or CRAI), and optionally a reference FASTA (GRCh38 or GRCh37, auto-detected from the header).
- JavaScript reads the index to compute which byte ranges of the alignment file are needed.
- Using
File.slice(), only the relevant byte ranges are read from disk (typically <1% of a 50 GB CRAM). - The byte ranges are passed to the WebAssembly module, which uses noodles to parse the BAM/CRAM records.
- Structural variant analysis runs first (depth ratio + boundary scan on chr17 and chr2).
- Point mutation screening runs chromosome-by-chromosome, loading one chromosome's reference sequence and CRAM data at a time to bound memory usage.
- Results are rendered in Vue 3 as they arrive.
For CRAM files, the reference FASTA is needed because CRAM encodes sequences as differences from the reference. The tool scans the FASTA once to build an in-memory index, then reads chromosome sequences on demand.
BAM files work without a reference FASTA because they store full sequences.
- No VCF support. The tool reads raw alignments (BAM/CRAM), not variant call files. It does its own pileup-based genotyping from read data.
- No indel detection. The current pileup engine handles single-nucleotide variants only. The 10,312 insertions and deletions in the ClinVar catalog are listed but not yet screened. This is a planned addition.
- No novel variant discovery. Only variants in the embedded ClinVar catalog are checked. Mutations not yet reported to ClinVar will not be found.
- Not a diagnostic tool. This is a screening tool that gives a first impression. Positive findings should be confirmed by a clinical geneticist.
cmt1a-detector/
core/ Rust library: depth analysis, boundary detection,
pileup classification, variant catalog, interpretation
wasm/ WebAssembly bindings (wasm-bindgen)
web/ Vue 3 + TypeScript frontend
tools/ CLI tools: catalog generator, fixture builder
vendor/ Patched noodles-cram (see below)
scripts/ Reference genome download script
The core library has no WASM dependencies and is fully testable with cargo test. The WASM crate wraps it with wasm-bindgen exports. The Vue frontend communicates with WASM through typed JavaScript bindings.
The variant catalog, gene panel, syndrome definitions, and screening manifest all originate from Rust code. The Vue frontend reads them from WASM exports at runtime. There are no hardcoded gene lists or variant positions in the TypeScript code.
The tool vendors a patched copy of noodles-cram 0.92.0. The patches fix:
- Huffman byte codec -- the upstream
decode_takefor Huffman-encoded quality scores was unimplemented (todo!()), causing panics on Sentieon-produced CRAMs. - Missing reference handling -- the upstream panicked when querying a CRAM with reads on chromosomes whose reference wasn't loaded. The patch returns
Ok(None)so records can be iterated for positions without full sequence decoding. - Sequence iterator -- an infinite loop when emitting placeholder bases for records without a reference sequence.
- Query optimization -- skip containers before the query range without seeking to them.
See vendor/noodles-cram/PATCHES.md for details. These patches should be removed once upstream noodles publishes fixes.
- Rust (stable, with
wasm32-unknown-unknowntarget) - wasm-pack
- Node.js 18+
- samtools (for fixture generation and reference indexing)
# 1. Build the WASM module
cd wasm
wasm-pack build --target web --release
cp pkg/* ../web/public/pkg/
# 2. Install frontend dependencies and start dev server
cd ../web
npm install
npm run dev# Rust unit + integration tests (174 tests)
cargo test -p nds-core
# CRAM fixture tests require the GRCh38 reference:
./scripts/download-reference.sh
cargo run --release --bin build_test_fixtures -- \
--catalog core/data/catalog.json \
--reference ref/GRCh38_no_alt_plus_hs38d1.fna \
--output-dir fixtures# Downloads current ClinVar VCF + PanelApp panel, filters, and writes catalog.json
cargo run --release --bin build_catalog -- \
--output core/data/catalog.jsonThis project demonstrates that Rust + WebAssembly can handle genomics workloads that were traditionally server-only:
- Parsing 50+ GB CRAM files in the browser using sparse byte-range reads
- CIGAR-aware pileup genotyping across 22,748 positions without a variant caller
- Reference-based CRAM decoding with a 3 GB FASTA indexed on the fly
- Per-chromosome streaming to bound memory usage in a single browser tab
- Sex detection from CRAI alignment statistics for hemizygous chrX calling
The approach proves that privacy-sensitive genomic analysis can run entirely client-side with acceptable performance (under 2 minutes for a full 30x WGS scan on consumer hardware).
MIT License, Funktionslust GmbH, Wolfgang Stark
The tool screens for the following inherited neuropathies and related syndromes, also known as Hereditary Motor and Sensory Neuropathies (HMSN). Detection is either via copy-number analysis (structural variants) or pileup-based genotyping of known pathogenic single-nucleotide variants from ClinVar.
Structural variants on chromosome 17p (copy-number changes):
- Charcot-Marie-Tooth disease type 1A (CMT1A, HMSN-I)
- Hereditary Neuropathy with liability to Pressure Palsies (HNPP)
- Potocki-Lupski Syndrome (PTLS)
- Smith-Magenis Syndrome (SMS)
- Yuan-Harel-Lupski Syndrome (YUHAL)
Point mutations across 169 neuropathy-associated genes, including:
- Charcot-Marie-Tooth disease types 1B, 1C, 1D, 1E, 1F, 1G
- Charcot-Marie-Tooth disease types 2A, 2B, 2C, 2E, 2F, 2I, 2J, 2K, 2L, 2M, 2O, 2P, 2R, 2S, 2T, 2X, 2Y, 2Z (axonal forms)
- Charcot-Marie-Tooth disease types 4A, 4B1, 4B2, 4B3, 4C, 4D, 4E, 4F, 4G, 4H, 4J, 4K (recessive forms)
- Charcot-Marie-Tooth dominant and recessive intermediate forms (A, B, C, D, E, F, G)
- Charcot-Marie-Tooth X-linked types (CMTX1, CMTX4, CMTX5)
- Hereditary Sensory and Autonomic Neuropathy (HSAN, also HSN) types 1, 2, 6
- Dejerine-Sottas disease (autosomal dominant and recessive forms)
- Roussy-Lévy syndrome
- Refsum disease
- Friedreich ataxia
- Giant axonal neuropathy
- Hereditary spastic paraplegia (multiple types)
- Congenital hypomyelinating neuropathy
- Familial amyloid polyneuropathy (ATTR amyloidosis)
Selected genes in the panel:
PMP22, MPZ, GJB1, MFN2, GDAP1, SH3TC2, NEFL, EGR2, PRX, NDRG1, LITAF, HSPB1, HSPB8, MTMR2, SBF1, SBF2, DNM2, FIG4, FGD4, RAB7A, TRPV4, LMNA, BSCL2, IGHMBP2, LRSAM1, DNAJB2, AIFM1, PRPS1, NTRK1, SPTLC1, SPTLC2, WNK1, NGF, TTR, FXN, GAN, PHYH, PEX7, SPG7, SPG11, SPAST, PLP1, ATP7A, POLG, SACS, and more.
Full panel: 169 genes, 22,844 pathogenic and likely-pathogenic variants from ClinVar, curated via the Genomics England PanelApp hereditary neuropathy panel.

