Commit History
-
Remove outdated ESM1b/ΔΔG coverage warning
edohollou +1: Claude Sonnet 4.6Full proteome precomputation is complete — the banner noting '3 demo proteins' is no longer accurate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4e2d7ac
-
Fix mechanism sort: tier by displayed label, not raw mechLabel
edohollou +1: Claude Sonnet 4.6mechDisplay() shows ML predictions for Unassigned rows, so sorting by raw mechLabel grouped all Unassigned together regardless of what badge was displayed — causing Pockets (ML) badges to appear scattered after real Pockets, making the sort look broken. Three-tier sort: 0 = real named label (Interface / Pockets / Stability) — asc/desc 1 = Unassigned with ML prediction — asc/desc by ML label 2 = pure Unassigned — always last Tier ordering is fixed regardless of sort direction. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>94b6527 -
Sort mechanism column alphabetically, Unassigned always last
edohollou +1: Claude Sonnet 4.6Plain localeCompare treated 'Unassigned' as a regular string, placing it between S and V regardless of sort direction. New comparator pins Unassigned to the bottom on both asc and desc, then sorts the named labels A→Z or Z→A. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>55aab2c -
Replace list_repo_files() with per-protein lazy path probe
edohollou +1: Claude Sonnet 4.6_ensure_hf_index() scanned all 20K+ parquet paths on the first request (list_repo_files pagination, 60-120 s), causing a 504 on every cold start. New _hf_base_path() tries the known double-nested URL directly (covers 99.9% of proteins) with LIMIT 0 — reads only the parquet footer via a single HTTP range request (~few KB, completes in <5 s). Falls back to single-nested for the 13 hand-crafted proteins. Result cached in _hf_index so subsequent requests skip the probe entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a90e1fc -
Fix event-loop blocking: make DB endpoints sync + raise timeouts
edohollou +1: Claude Sonnet 4.6- Remove 'async' from search/stats/landscape/lookup/export handlers so FastAPI runs them in anyio's thread pool instead of the event loop; this lets /api/info remain responsive while a slow httpfs query runs - Raise DuckDB http_timeout from 8 s to 60 s (was causing silent drops of ESM1b/DDG/ml_preds views on cold HF fetches) - Raise nginx proxy_read_timeout from 30 s to 120 s to match - Raise frontend /api/info AbortSignal from 30 s to 60 s - Raise landscape fetch timeout from 30 s to 120 s - Add double-checked locking to _ensure_hf_index() for thread safety Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a9e9a70 -
Add precomputed ML mechanistic labels as parquet (ml_preds/)
edohollou +1: Claude Sonnet 4.6- scripts/precompute_ml_predictions.py: new script — downloads 20K variant parquets from HF, runs XGBoost lite classifier, writes ml_preds/protein_id=X/data_0.parquet (mutation_code | ml_mechLabel | ml_confidence) for all 216M variants; uploads back to edohollou/mutvar-variants - backend/main.py: add ML_PREDS_DIR + _local_has_ml_preds(); extend _create_variants_view() to LEFT JOIN ml_preds parquet; expose ml_mechLabel and ml_confidence in /api/search and /api/lookup responses; remove runtime sklearn/xgboost inference (_load_classifier, /api/predict-mechanism) - backend/requirements.txt: drop joblib/scikit-learn/xgboost; add requests - index.html: parse ml_mechLabel/ml_confidence from API; mechDisplay() shows dashed ML badge when structural label is Unassigned; remove async fetchMechPrediction — predictions now come directly from the JOIN - scripts/download_hf_dataset.py: route ml_preds/ parquets to /app/backend/data/ml_preds/ at Docker build time - Dockerfile.bac…8132ff2
-
Add Colab notebook for mechanistic label classifier
edohollou +1: Claude Sonnet 4.6Trains XGBoost + calibration on 32K labeled variants (3 proteins). Two models: lite (no PDB, for proteome-wide inference) and full (pLDDT + RSA). Additions beyond brief: - BLOSUM62 substitution score (evolutionary conservation proxy) - Interaction features: am × pred_ddg, am × esm1b_llr - Consensus score (0-3 pathogenicity signals) - XGBoost instead of RF (better calibrated for imbalanced tabular) - CalibratedClassifierCV (isotonic) for reliable probabilities - SMOTE inside each StratifiedKFold fold (Interface 6%, Pockets 10%) - position_relative (position / protein_length, generalises better) - Uploads both models + metadata to HF Space automatically Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>aa8824c -
Fix disk space management in join_rasp_ddg: skip re-extraction, delete early
edohollou +1: Claude Sonnet 4.6- _hdf5_is_valid(): integrity check before deciding to re-extract - Skip extraction if HDF5 already valid (was overwriting 105G file blindly) - Remove corrupt/partial HDF5 before fresh extraction - Delete zip immediately after extraction (frees 8.7 GB before conversion) - Delete HDF5 immediately after flat parquet written (frees 105 GB before DuckDB partitioning, not at end of script) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>faf5d0e
-
Replace vaex with h5py for RaSP conversion (no gcc required)
edohollou +1: Claude Sonnet 4.6vaex requires annoy which needs gcc to compile — not available on this machine. h5py was already installed successfully. Rewrote vaex_to_parquet to use h5py directly with 5M-row chunked reads to avoid OOM on 230M rows. Reads Vaex HDF5 layout (/table/columns/{col}/data) with robust fallbacks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>42193c2 -
Add RaSP ΔΔG JOIN + proteome-wide download script
edohollou +1: Claude Sonnet 4.6- scripts/join_rasp_ddg.py: download RaSP bulk Vaex (~8.6 GB), convert to flat parquet, DuckDB COPY partition by protein_id, upload_large_folder to HF as ddg/protein_id=X/data_0.parquet (resumable) - backend/main.py: refactor _create_variants_view to handle two enrichment tables (esm1b/ and ddg/) independently; each uses _try_enrich_view which probes the file eagerly to catch httpfs 404s before query time; COALESCE keeps existing ESM-IF1 values for 13 enriched proteins Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>699089e
-
Fix esm1b fallback: force eager validation to catch httpfs 404
edohollou +1: Claude Sonnet 4.6DuckDB defers file I/O to query time, so CREATE VIEW succeeds even if the esm1b parquet doesn't exist for a given protein. The try/except only caught CREATE VIEW errors (never raised). Fix: run SELECT 1 LIMIT 1 immediately after creating esm1b_scores to force the HTTP call, then catch the 404 and fall back to the plain variants view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7391d77 -
Bump CACHEBUST=8 + route esm1b/ parquets to separate data dir
edohollou +1: Claude Sonnet 4.6download_hf_dataset.py now splits the snapshot into two output dirs: - variants/protein_id=X/ -> /app/backend/data/variants/ (AM scores) - esm1b/protein_id=X/ -> /app/backend/data/esm1b/ (VESM++ ESM1b) Previously all parquets were copied to data/variants/ which would have overwritten AM scores with VESM++ data after the esm1b upload. CACHEBUST=8 forces a fresh snapshot_download on the next Space rebuild (to be pushed once the esm1b/ upload to HF is complete). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>01632ce -
Fix upload_large_folder: bake esm1b/ prefix into local dir structure
edohollou +1: Claude Sonnet 4.6upload_large_folder has no path_in_repo parameter. Fix: DuckDB writes parquets to out_dir/esm1b/protein_id=X/ and we upload out_dir/ to the repo root, so the esm1b/ prefix comes from the local directory layout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8064ddb -
Switch to upload_large_folder + persistent output dir for resumable upload
edohollou +1: Claude Sonnet 4.6upload_folder makes a single giant commit and cannot resume after Ctrl-C. upload_large_folder splits into chunked commits and is fully resumable. Also use ~/mutvar_esm1b_upload/ as default output dir (instead of a random tempdir) so if the upload is interrupted, re-running the script skips the 10-20 min DuckDB partition step and resumes the upload directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7d6be95 -
Add ESM1b/VESM++ JOIN to backend get_db() + fix hf_index scoping
edohollou +1: Claude Sonnet 4.6- New _create_variants_view() helper: LEFT JOINs esm1b/ partition into the variants VIEW, COALESCing with pre-computed values on the 13 enriched proteins so they keep their ESM2 scores while all others get VESM++ - Works for both local (data/esm1b/) and HF httpfs fallback paths - _ensure_hf_index now skips non-variants/ paths so esm1b/ files don't pollute the protein lookup table - join_vesm_scores.py already handles the upload; this wires up the read side Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>75800cf -
Fix join_vesm_scores: bulk download + local join + single upload_folder
edohollou +1: Claude Sonnet 4.6Previous approach: 20K individual API calls (one upload per protein) = ~17h. New approach: 1. snapshot_download() — full MutVar dataset to local dir (~2 GB, one shot) 2. DuckDB join local MutVar + local VESM (no HTTP rate limits) 3. upload_folder() — single git commit for all 20K files Estimated total: ~1-2h (same order as original AlphaMissense upload) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>10f7d90 -
Add VESM++ join script for proteome-wide ESM enrichment
edohollou +1: Claude Sonnet 4.6Replaces compute_esm2_llr_all.py GPU approach with a simpler download+join: - Source: ntranoslab/vesm_scores (UniProtKB_VESM++_scores.parquet.gzip) 216M variants, UniProtKB format, precomputed ESM1b+ESM2+structure scores - DuckDB queries per-protein from the local cached file (~no RAM spike) - Threshold: -7.0 (calibrated on TP53 vs AlphaMissense labels) TP53 R175H = -8.27 → PATH ✓ KRAS G12D = -12.53 → PATH ✓ - Full 100% variant coverage on tested proteins (1.2s/protein) - Checkpoint + resume for safe interruption - Estimated runtime: ~17h for 20K proteins (dominated by HF upload) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7b391d8 -
Add ESM2 LLR pipeline for full proteome (20K proteins)
edohollou +1: Claude Sonnet 4.6compute_esm2_llr_all.py: - ESM2-650M loaded once, processes all proteins sequentially - Positions masked in batches of 8 (configurable) to limit peak memory - CPU threads capped at 4 to avoid saturation - Skip proteins already enriched (esm1b_llr populated) - Checkpoint file for safe resume after interruption/crash - OOM fallback: auto-retry with batch=1 - Uploads each protein to HF immediately after processing colab_esm2_llr.ipynb: - Ready-to-run Colab notebook with GPU runtime (T4 free) - Test mode (--max-proteins 5) before full run - Checkpoint inspection cell Estimated runtime: ~20h on T4 GPU, ~13 days on CPU Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>79accb5
-
Add demo walkthrough + rewrite README for v2
edohollou +1: Claude Sonnet 4.6DEMO_WALKTHROUGH.md: 4-step narrative for Pedro covering beta-actin protein analysis, mutational landscape, Ubiquitin constraint contrast, cancer VCF triage, and KinaseAtlas pathway closure (CDK2→RB1, AKT1→MDM2→TP53, AURKB→H3-S10). Explains BRAF GOF caveat, missing ESM/DDG columns, and clinical VCF workflow. README.md: rewritten for v2 — tool index, scoring table, dataset/ architecture overview, enriched protein list, API endpoints, local dev. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>feab83c -
Add VEP debug logging + robust position/matching fallbacks
edohollou +1: Claude Sonnet 4.6- Log first 3 missense results with all key fields to diagnose drop cause - Use result.seq_region_name + result.start + allele_string for matching instead of parsing result.input string - More robust position extraction: handles range format "175-175", flexible HGVS regex for 1-3 letter codes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7e31cdb -
Fix VEP variant matching: parse result.input instead of exact string compare
edohollou +1: Claude Sonnet 4.6The previous code did result.input === inputStr which silently fails if VEP normalizes whitespace, chromosome format, or IDs. Now parses chrom/pos/ref/alt from result.input individually — much more robust. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d60c9d2 -
Fix buildRows not-a-function error + add VEP debug logging
edohollou +1: Claude Sonnet 4.6- Move buildRows to top-level function so setRiskFilter can call it without the window._buildVcfRows timing bug - Add per-batch VEP debug log: result count, transcripts, missense count, sample consequence when nothing is returned — helps diagnose VEP issues Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2e9790f -
Improve VCF results page: risk filter banner, row coloring, better labels
edohollou +1: Claude Sonnet 4.6- Add risk distribution banner with clickable filter pills (All / High Risk / Medium / Low Risk) - Color-coded left border on result rows by risk level - High-risk rows get subtle red background tint - Fix ESM1b threshold display: -4.0 (was -7.5) and ΔΔG threshold: 1.5 kcal/mol - Simplify consensus labels to High Risk / Medium / Low Risk - Update example button text: "7 canonical cancer driver mutations" - Add score detail tooltip on consensus badge Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0a024bc -
Add cancer driver structures + updated VCF example + CACHEBUST=7
Verified signature4f6ec35 -
Remove COPY mutfunc.html from Dockerfile
Verified signaturea249494 -
Remove mutfunc.html links from all nav menus
Verified signature6446e4b -
Remove mutfunc.html — redundant with mutvar
Verified signature6e7526f -
mutfunc: load pathogenic variants (min_am=0.5) so highlights span whole protein
Verified signatureabf9197 -
CACHEBUST=6: rebuild with ESM-IF1 DDG + Stability mechanism for 5 proteins
Verified signatureb77c71e -
Fix ESM1b/DDG null display: show — instead of +0.00, fix scatter plot & detail panel
Verified signaturea2b639a -
Add AlphaFold structures for 5 new proteins + AlphaFold EBI fallback + update demo chips
Verified signature81fb50f -
Update demo chips to ESM-enriched proteins + default to P60709 (β-actin)
Verified signature4a0829f -
Add 3D AlphaFold structure viewer with pLDDT coloring + variant highlighting
Verified signature6511ede -
CACHEBUST=5 + fix download script to always overwrite parquets
Verified signature3fc1113 -
Bump CACHEBUST=4 to pick up all 5 ESM2-enriched proteins
Verified signature1c8321e -
Bump CACHEBUST to re-download updated P60709/P61247 with ESM2 LLR
Verified signaturef82f502 -
fix: add huggingface_hub dep + httpfs fallback + cache bust
Verified signature1072085 -
fix: add huggingface_hub dep + httpfs fallback + cache bust
Verified signature63cd84d -
fix: add huggingface_hub dep + httpfs fallback + cache bust
Verified signature9ec0919 -
fix: remove volume mount that was shadowing baked-in parquet data
Verified signature5971eef -
refactor: serve parquet from local disk — baked in at build time
Verified signature9f38687 -
refactor: serve parquet from local disk — baked in at build time
Verified signature8d75342 -
refactor: serve parquet from local disk — baked in at build time
Verified signature4ae72ea -
refactor: serve parquet from local disk — baked in at build time
Verified signaturef7b5909 -
fix: proxy_read_timeout 30s→120s — HF httpfs reads can be slow
Verified signature6430355 -
fix: persistent httpfs conn + skip INSTALL on warm requests
Verified signature9ffce68 -
fix: hive_partitioning=true on direct-path reads — protein_id column was missing
Verified signature5233604 -
fix: increase /api/info fetch timeout to 30s for HF cold start
Verified signature0567733 -
fix: /api/info returns instantly on HF — no glob scan ever
Verified signatured039e5c -
fix: HF file index + direct-path reads — eliminates 429 rate-limit errors
Verified signature8573feb