Spaces:
Running
Running
Commit History
-
fix: pin python:3.11-slim-bookworm — trixie's gcc14 errors on fpocket's legacy C (incompatible-pointer-types); gcc12 builds clean
0f780df -
fix: fpocket clone tag 4.2.3 — tags carry no v prefix; wrong tag broke HF Space build (503s)
c7878ad -
feat: techspec additions — de novo tier-6 branch, structure export, page capture + final synthesis
Pre-work A1-A7: pymol2-wheel cleanup + fpocket source builds, migration 008 structure_prep_jobs with RLS, user-scoped reads, input validation, SSRF routing, chain_integrity + castp/fpocket status tags. S1: zero-hit proteins complete as de novo runs — composition/hints bundle, InterProScan5 sequence-search domains, ESMFold structure card; confidence tiers (identified/homolog/de_novo) threaded backend-to-frontend with badges, DeNovoPanel, unavailable-state messaging. S2: /api/structure-export router (PDB/CIF/styled PyMOL .pse), docking complex.pdb + ligand.sdf exports, StructureExportMenu on viewer + docking page, honest ChimeraX/VMD file+script bundles. S3: migration 009 page_captures, rate-limited allowlisted capture service wired per source, deterministic final-synthesis findings with confidence-tier tagging, FinalReport panel. 84 backend tests green across five suites; frontend tsc + lint clean.4939f56 -
feat: optimize CASTp SASA with KDTree, add sequence input to CASTp + Structure Prep, ESMFold integration for unknown genes
Backend: - castp.py: Replace O(n²) adjacency loop with scipy KDTree O(n log n), compute SASA on first model only - castp router: Accept pdb_id, sequence (auto-ESMFold), or pdb_text input - structure_prep.py: Add esmfold_predict() for raw sequences via HF Inference API - structure_prep router: Accept sequences for full pipeline (ESMFold → chain detection → repair → cleanup → pockets) Frontend: - CASTp page: PDB ID / amino acid sequence toggle, textarea with residue counter - Structure Prep page: PDB ID / amino acid sequence toggle, progress bar with ESMFold step - api.ts: Add runCastpSequence(), runStructurePrepSequence(), sequence_source on CastpResulte21c532 -
fix: remove fpocket from Dockerfiles to unblock HF Spaces build
fpocket compile fails silently in HF Docker build (can't see detailed error). Structure pipeline still works: CASTp runs as primary pocket detector, fpocket gracefully degrades to 'not installed'. Will add fpocket back once we can debug the build separately.9a46e30
-
fix: fpocket build — correct tag 4.2.3, add libnetcdf-dev dependency
Root cause: v2.1 tag doesn't exist, and fpocket needs libnetcdf-dev. Uses fpocket's own build pattern: make && make install3bb9505 -
feat: structure preparation pipeline — broken chains → SWISS-MODEL repair → PyMOL cleanup → fpocket + CASTp
- Broken chain detection: Biopython REMARK 465 + CA-CA gap >4.2Å - SWISS-MODEL auto-repair when broken chains found (SMR Repository API) - PyMOL cleanup (waters/hetero removal) with Biopython fallback - fpocket local pocket detection (compiled from source in Docker) - CASTp remote async via CASTpFold server (polls for results) - Combined pocket results panel (fpocket + CASTp side by side) - Pipeline status stepper UI with progress bar - Both Dockerfiles: fpocket compiled from Discngine/fpocket source - Frontend: analyze/structure-prep/page.tsx with full pipeline visualization - Wired into main.py + api.ts, TypeScript clean1b28e93 -
fix: switch runCastp to longApi (660s timeout)
c6a8542 -
fix: PDBParser.get_pdb -> get_structure in castp.py
8c37459 -
feat: add CASTp pockets, SWISS-MODEL, ESMFold + fix Dockerfiles
- CASTp pocket analysis: Biopython SASA + grid-based cavity detection, 3 endpoints - SWISS-MODEL Repository: query SMR API for homology models + experimental structures - ESMFold structure prediction: HF Inference API proxy, async job with progress - Fix root Dockerfile: add g++/libgl1/libgomp1/libopenblas-dev/libxml2/libxslt1.1 - Fix primer3-py quoting bug in both Dockerfiles (shell redirect issue) - Wire 3 routers into main.py, add API client functions, update analyze hub - TypeScript clean, zero errorsbe36a29 -
fix: NGS fallback to Python aligner when native tools missing; add missing re import in sequence_utils
34b3c94
-
fix: eliminate infinite re-render loop - remove ResizeObserver, fix ref prop conflict, simplify zoom/pan
1631264 -
fix: prevent infinite re-render loop in GenomeViewer (error #290)
444bafe -
feat: replace igv.js with custom SAM/VCF genome viewer
1d58553 -
fix: add --no-same-owner to worker Dockerfile tar command
e332064 -
fix: add --no-same-owner to backend Dockerfile tar commands
8438ee1 -
fix: retry NGS run on 503 (Render cold start)
12ba364 -
chore: remove samUrl prop from IgvBrowser (igv.js only supports BAM)
6c7f30f -
refactor: require native samtools/minimap2, delete hand-rolled BAM/BAI code
- Install samtools + minimap2 in backend/Dockerfile and build.sh - render.yaml now uses build.sh (installs native tools) - _run_alignment: raises RuntimeError if tools missing, checks returncode on every subprocess call (minimap2, samtools sort, samtools index) - Deleted ~350 lines of hand-rolled BAM/BAI code: _bgzf_compress, _voffset_for, _sam_to_bam, _write_bai, _seq_to_half_ints, _parse_cigar, _cigar_ref_len, _reg2bin - _python_alignment now produces SAM only (no BAM/BAI) - _run_variant_calling: added returncode checks on bcftools calls - _upload_ngs_files: removed Python fallback paths - IgvBrowser: removed 300-line JS BAM converter, fetches BAM/BAI/VCF as Blobs for igv.js (which only supports BAM for alignments)2fe9546
-
fix: igv.js fetch BAM/BAI as Blobs, client-side SAM-to-BAM conversion, proper BGZF
41d0a94 -
fix: correct BGZF virtual offsets in BAI, fix duplicate-read bug, install minimap2 everywhere
Bug 1 (critical): _bgzf_compress now produces multi-block BGZF with proper block boundary tracking. _write_bai receives correct BGZF virtual offsets (coffset<<16|uoffset) instead of raw uncompressed byte offsets. New helper _voffset_for() maps uncompressed offsets through the block table. Bug 2: reads.index() in _python_alignment replaced with enumerate-by-index so duplicate reads (common in real FASTQs) don't silently overwrite each other's mapping slots. Both Dockerfiles now install minimap2 + samtools so the native alignment path (minimap2+samtools sort+samtools index) is always available. Python fallback kept as last resort with 'degraded: True' flag and warning log.45a0eed -
fix: SAM-only igv.js track, indexed:false reference, debug logging
454af7f -
fix(ngs): dynamic locus + SAM-first igv.js for reliable genome browser
Root causes of blank igv.js browser: 1. Locus hardcoded to NC_045512v2:21000-25000 but synthetic reads align at position ~0 — browser was viewing an empty region 2. BAM format from pure-Python converter may still have subtle issues that igv.js strict parser rejects Fixes: - Backend: _python_alignment now computes read_region from actual mapped positions and returns it in the result - Backend: _compute_read_region() helper parses SAM for min/max positions - Backend: minimap2 path also gets read_region via the helper - Frontend: IgvBrowser prefers SAM over BAM (text format, zero risk) - Frontend: NGS page uses alignment.read_region for igv.js locus instead of hardcoded REFERENCE_LOCUS map - Frontend: Added read_region to NGSAlignment type132a669 -
fix: repair BAI index generation and BAM record format for igv.js compatibility
- Fix BAM record field order: swap flag and n_cigar to match BAM spec - Track pos and rec_len in record_info for proper BAI construction - Rewrite _write_bai(): correct chunk_end (voff+rec_len), per-window linear index entries instead of global min, forward-propagate empty windows - Install samtools in both Dockerfiles so native alignment path worksbd1c698 -
fix(ngs): correct BAM record format and BAI index for igv.js
Three critical bugs fixed: 1. Removed extra bin field in BAM records (BAM spec has no separate bin field; bin is embedded in bin_mq_nl). This was shifting all subsequent fields by 4 bytes, corrupting the entire BAM file. 2. Added reg2bin() to compute proper BAM bin numbers from reference coords. Previously hardcoded to 0, which caused igv.js to find no reads. 3. Rewrote _write_bai() with correct BAI format: proper reg2bin bin IDs, BAM virtual offsets (not genomic coordinates), and correct linear index. Previously used wrong bin numbers and genomic coords as offsets.70f89bb -
feat(ngs): pure-Python SAM to BAM converter with BGZF + BAI index for igv.js
- Added _sam_to_bam() for converting SAM to valid BGZF-compressed BAM - Added _bgzf_compress() producing proper BGZF blocks with raw deflate - Added _write_bai() generating minimal BAI index files - Python alignment now auto-generates BAM from SAM - Upload function finds aligned.bam as fallback - IgvBrowser prefers BAM over SAM with format detection - Removes duplicate helper functions0c59ad3 -
chore: remove NGS rate limits
86f2851 -
chore: increase daily rate limits for testing (50 global, 20 NGS)
ee4814e -
fix: load igv.js from CDN instead of ESM import
e32795d -
fix: igv.js white screen — CIGAR ops, qual strings, locus format
Backend (ngs.py): - CIGAR: replaced 1X with 1M (SAM spec: M = alignment match including mismatches). Added proper multi-digit collapse (63M37M -> 100M) - Quality strings: padded/truncated to match sequence length exactly - Unmapped reads: also get fixed-length quality strings Frontend: - IgvBrowser: added loading/error states, 100ms DOM delay, container clear before reinit, status feedback - Locus: changed from invalid gene names (SCoV2) to position format (NC_045512v2:21000-25000) for SARS-CoV-2 region of interest - SAM download link added alongside BAM/VCF/FASTA Verified: CIGAR collapse produces 100M, no X ops, all QUAL match seq len.a56b947 -
feat: add igv.js genome browser + proper 6-step NGS pipeline
Backend (ngs.py): - Step 1 QC: per-base quality distribution, GC windows, read length stats - Step 2 Trim: quality/length filtering with before/after metrics - Step 3 Align: Python seed-and-extend alignment (mapped reads, CIGAR) - Step 4 Variant: pileup-based variant calling with VCF output - Step 5 Annotation: SnpEff/cross-reference with protein changes - Step 6 Visualization: upload BAM/SAM/VCF/FASTA to Supabase Storage Frontend: - IgvBrowser component: lazy-loads igv.js, loads BAM/SAM + VCF tracks - Rebuilt NGS page with all 6 steps, per-base quality SVG chart - Download links for BAM/SAM/VCF/FASTA - TypeScript types updated for file_urls, quality charts, annotations Verified: end-to-end test produced 50 variants, uploaded SAM+VCF+reference.95e9035 -
fix: NGS pipeline stuck in queued - worker fallback + migration fix
Root cause: ngs_jobs table was created manually without created_at column and the claim_next_ngs_job RPC was never executed. Fix: - worker.py: _claim_direct() fallback uses direct Supabase queries when RPC is missing (no FOR UPDATE SKIP LOCKED, but atomic update prevents double-processing) - ngs.py: _ensure_ngs_table() attempts auto-migration on first job - 007_ngs_jobs.sql: adds IF NOT EXISTS for created_at column and uses EXCEPTION blocks for idempotent RLS policies Verified: end-to-end test claimed, ran, and completed both queued jobs.8b17c40 -
feat: add full 6-step NGS pipeline + fix sequencing WinError 193
NGS Pipeline (new): - tools/ngs.py: 6-step pipeline (QC, trim, align, variants, annotate, report) with native tool detection (fastqc/fastp/minimap2/samtools/bcftools/snpEff) and pure-Python fallbacks for every step (works on Windows + Linux/Docker) - routers/ngs.py: FastAPI router with POST /run, GET /status, GET /references - migrations/007_ngs_jobs.sql: ngs_jobs table + claim RPC + RLS policies - worker.py: wired ngs_jobs into durable worker dispatch - rate_limit.py: 5 NGS jobs/day per user - Frontend: /analyze/ngs page with 6-step progress stepper, QC stats, trimming retention, alignment mapping rate, variant table, annotation with known variant lookup, consensus FASTA download, BLAST bridge - api.ts: NGS types + runNGS/getNGSStatus/listNGSReferences functions Sequencing Pipeline fix: - Fixed [WinError 193] by detecting platform and refusing to execute Linux ELF binary on Windows; added Python fallback alignment5fa9145
-
feat(landing): 'Stop tab-switching' hero + docking sample, drop stale New badges
3e9306c -
feat(pipeline): multi-database UniProt identifier resolution
Resolve ANY BLAST-hit accession (RefSeq, GenBank, PDB, Ensembl, ...) or raw protein sequence to a UniProt accession via a strategy ladder: 1. direct - already a UniProt accession (Swiss-Prot / TrEMBL) 2. xref - synchronous xref: search (~1s, no job queue) 3. name - reviewed full-text search on hit description + gene hint 4. sequence - EBI BLAST of query against UniProtKB (e-value gated) 5. idmapping - UniProt ID-mapping queue as last resort _pipeline _run_uniprot now delegates to the resolver; the expensive sequence-BLAST fallback runs only for the top hit. Results carry a resolution block (accession, method, original accession). Verified live across 6 species and 6 accession types. 29 unit tests.59ba48b -
feat(seo): JSON-LD structured data — Organization/WebSite graph, SoftwareApplication+HowTo homepage, BreadcrumbList across tools
30a62d7 -
feat(branding): Synteny rebrand — new identity, signal-coded palette, and pipeline icons
6fdc858
-
fix(pipeline): stop abandoning slow NCBI BLAST jobs + EBI fallback
NCBI BLAST routinely exceeds its optimistic RTOE under load, but the stuck heuristic (max(RTOE*5, 180s)) declared jobs STUCK after ~3 minutes even with a 900s poll budget, then re-submitted and failed 3x. The poll now gives a job at least half its budget before declaring STUCK. Add a resilience net: when NCBI fails or returns unparsable output, the pipeline BLAST step falls back to EBI BLAST (uncached, so transient errors are not cached for 24h), mapping NCBI databases to EBI equivalents. The pipeline only fails when both providers fail. BlastTool stype mapping fixed for blastx/tblastn. Verified: 8 new resilience tests + full seq_tools (48) pass; frontend tsc clean.60c8e2d -
feat(results): in-app share dialog + self-normalized dotplot scoring
Share flow: replace native share sheet / clipboard-only sharing with a dedicated ShareDialog (copy link, native Web Share when available, and popup links for X, Facebook, LinkedIn, WhatsApp, Telegram, Reddit, Email). Wizard and job detail pages now create the link, open the dialog, and show a spinner while the link is being created. Dotplot: stringency now means percent of a window's perfect self-match for substitution scoring (residue-composition independent), so identical A-rich proteins render a full main diagonal and conserved regions appear regardless of amino-acid content. Both inputs must be protein for matrix scoring; protein-vs-DNA comparisons fall back to identity and report a mixed type. BLAST panels link dot plots against full-length subject sequences from the MSA instead of the aligned segment. Verified: backend test_seq_tools 48 passed; frontend tsc + next build clean.525a5b5
-
feat(admet): ProTox 3.0 ML toxicity prediction — backend client + endpoint, frontend ProTox tab, restored sidebar chevron
38e4510
-
feat(design): bioluminescent green+violet palette and re-tuned landing hero
- Swap the whole instrument palette to life-green (#4ADE80 / #15803D) primary, violet (#A78BFA / #5B21B6) secondary, amber (#FBBF24) warnings across globals.css tokens, tailwind config, and every hardcoded chart/sequence color in src (alignment, phylo, domains, structure, interactions, ADMET). - Landing hero: split layout with a live binary-DNA viewer panel (0/1 glyphs flowing along green/violet strands, pointer parallax, reduced-motion static frame, ResizeObserver tracking), new workflow-first subcopy, spring entrances. - Sidebar: remove the floating collapse chevron; sidebar always expanded. - Remove CursorGlow component and all usages. - Sync design.md to the new palette and contrast values.deb8696 -
feat(landing): trust & craft pass — sample result preview with confidence bands, honest service/status copy, unified CTA verbs, grouped database taxonomy, 44px nav touch targets, calmer motion (no chevron loop, glow under nav)
0d05012 -
feat(ui): apple-design conformance — springs for micro-interactions, reduced-motion/transparency/contrast support, typography tracking
4724c43
-
feat(theme): dual light/dark mode with Apple light theme, toggle, and theme-aware viewers
e83084c -
feat(seq-tools): share colored MSA viewer across BLAST job, alignment tool, report, shared and phylo surfaces
ec313db
-
feat(seq-tools): MSA match/mismatch/gap cell highlighting, consensus row and legend
773cf91 -
fix(seq-tools): stop auto-scrolling on job completion, fix structure highlight & AlphaFold viewer loading
9d96b4e -
feat(seq-tools): wire motif scanner into BLAST, structure, alignment and dot-plot workflows
fc75164 -
fix(seq-tools): only link motif highlights to structure when a protein UniProt accession is known
7292904 -
feat(seq-tools): motif categories & structure overlay, dot-plot scoring & features, cross-tool links
033540e