Client-side neuropathy screen: CMT1A/HNPP/PTLS/SMS/YUHAL CNVs + 22k ClinVar pathogenic variants
1.7K
Github: funktionslust/neuropathy-dna-scanner Website: neuropathydnascanner.com
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.
File.slice(), only the relevant byte ranges are read from disk (typically <1% of a 50 GB CRAM).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.
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:
decode_take for Huffman-encoded quality scores was unimplemented (todo!()), causing panics on Sentieon-produced CRAMs.Ok(None) so records can be iterated for positions without full sequence decoding.See vendor/noodles-cram/PATCHES.md for details. These patches should be removed once upstream noodles publishes fixes.
wasm32-unknown-unknown target)# 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.json
This project demonstrates that Rust + WebAssembly can handle genomics workloads that were traditionally server-only:
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
Content type
Image
Digest
sha256:c90cfd999…
Size
23.6 MB
Last updated
5 months ago
docker pull funktionslust/neuropathy-dna-scanner