Spaces:
Running
Running
Commit History
-
fix(md): surface real OpenMM error message + traceback in fallback diagnostics
13c2094 -
fix(md): add missing C-terminal OXT so unterminated termini (1TIM HIS 248) build in OpenMM
a28c4bb
-
fix(md): BioPython fallback crash on Atom.element.name ('str' object has no attribute 'name')
atom.element is already the element string in BioPython; use it directly for the SASA heavy-atom scan instead of elem.name. Regression test runs the fallback on a mini PDB.be32f12 -
feat(md): temperature/KE, Rg and SASA traces; fix OpenMM in deployed image
- Add temperature (from kinetic energy), radius-of-gyration and Shrake-Ruger SASA time series to OpenMM production results; static single points in the BioPython fallback; avg summary keys. - Correct nm->A conversion in _positions_to_np (RMSD/Rg/SASA were 10x too small and mislabeled as angstrom). - Self-calibrating production length: probe real platform throughput so runs fit the budget on fast local OpenCL and slow CPU-only containers (HF Spaces). - Deployment: install openmm>=8.0 via pip (PyPI since 8.0) instead of the broken micromamba+site-packages symlink; add libgomp1 to worker image; fix libgl1-mesa-glx -> libgl1 for bookworm base. Verified in a built image: OpenMM 8.5.2 imports and a full 1CRN production run completes with sane temperature/Rg/SASA. - Random-data unit tests for Rg, SASA, temperature-from-KE and Langevin thermostat; production integration test asserts the new keys. - Frontend: charts for temperature, Rg and SASA; SASA avg in summary.8e3419e -
feat(md): real OpenMM production runs with accurate Ca RMSD
- OpenMM 8.x implicit-solvent fix (explicit obc2 forcefield, NoCutoff) - Strip non-standard residues before parameterization - Adaptive production length (target 250 ps, cap 1 ns) sized to atom count - Ca-atom Kabsch RMSD + per-residue Ca RMSF, minimization drift metric - Graceful fallback to BioPython analysis when OpenMM cannot build structure - Fix rdkit/OpenMM DLL conflict (preload openmm before rdkit in worker/conftest) - Frontend: adaptive production progress bar + extended result typescbef588 -
fix(blast): handle NCBI server overload gracefully
- Sync-mode fallback now uses a 300s httpx timeout (was 60s, which broke NCBI blocking responses for slow nr queries) and short-circuits inline READY results without a second poll cycle - Poll interval lowered to 5s when an API key is present (NCBI allows 3 req/s with a key) - Stuck-job threshold raised to max(5x RTOE, 180s) so overloaded NCBI jobs aren't abandoned prematurely - Fast-mode BLAST budget raised 180s -> 600s, normal mode 600s -> 900s to survive NCBI overload windows908c122
-
fix: increase axios timeout for long-running endpoints and fix Render config
- Add longApi (660s timeout) for BLAST, docking, MD, function prediction - Keep 30s timeout for fast queries (structure, uniprot, domains, etc.) - Fix render.yaml: DEMO_MODE=false, add CORS_ORIGIN for all Vercel domains - Add NCBI_API_KEY and NCBI_EMAIL to Render env vars240d7ca -
fix: harden BLAST pipeline against NCBI timeouts and server overload
- Add EMAIL parameter to NCBI submit_blast (required by NCBI API) - Catch httpx.TimeoutException and HTTPStatusError in _request_with_retry - Add stuck-job detection in check_status_until_ready (5x RTOE threshold) - Add synchronous mode fallback when async RTOE is unreasonable (>300s) - Tolerate up to 3 consecutive poll failures before giving up - Increase retries from 1 to 2 (3 total attempts) - Increase poll start delay from 5s to 10s (NCBI rate limit guidance) - Add QUEUED status handling in poll loop - Fix EBI BlastTool: increase poll timeout (120->180s), add failure tolerance - Pipeline v2: pass retries=2 to run_blast_with_retry - Add comprehensive BLAST test suite (test_blast_comprehensive.py) with: * Multiple protein datasets (crambin, insulin, GFP, lysozyme, hemoglobin) * Full NCBI roundtrip tests, XML parsing, retry verification * EBI BLAST tool tests, error handling (empty/invalid/long sequences) * Random fuzz tests (5 random sequences), consecutive reliability tests …2dadeea -
feat: expanded Domain & Motif Analysis with all features and cross-project links
- Added domain_analysis.py tool with 12 analysis functions (InterPro, UniProt features, sites, PTMs, topology, motifs, variants, disulfide, composition, GO, pathways, full analysis) - Expanded domains router with 12 endpoints (/features, /sites, /ptm, /topology, /motifs, /variants, /disulfide, /composition, /go, /pathways, /all) - Updated DomainArchitecture.tsx with tabbed interface (9 tabs), multi-track SVG visualizations, cross-feature links - Updated domains page.tsx with richer UI, example accessions, bridge links to BLAST/Structure/UniProt/Interactions - Fixed fetch_uniprot_raw to handle 400 status codes gracefully - Added 19 new domain/motif endpoint tests (206 passed, 17 skipped, 0 failed)9c0c10a -
test: comprehensive validation & fuzz testing with bug fixes
- Add 84-test feature validation suite (test_feature_validation.py) covering all 19 platform features against real biological data (aspirin, caffeine, ibuprofen, 4HHB, TP53, P00698, etc.) - Add 71-test fuzz/random data suite (test_fuzz_random.py) with random SMILES, PDB IDs, sequences, SQL injection, XSS, path traversal, huge payloads, malformed JSON, Unicode, control characters - Fix Foldseek structure comparison: handle nested list-of-lists alignment format from updated API (structure_analysis.py:257) - Fix input sanitization for control characters in interactions, pathways, uniprot, and domains routers to prevent httpx.InvalidURL unhandled 500s - Fix KEGG search URL encoding with urllib.parse.quote - Fix ADMET BalabanJ segfault on Windows (os.name guard) and MolVolume exception handling - Add subprocess isolation for RDKit on Windows (admet router) - Add missing reportlab submodule mocks to conftest.py - Add asyncio_mode=auto to pytest.ini for async test support - 187 …d17fdb8
-
fix: increase BLAST timeout from 5min to 10min for long proteins
- blast.py: max_wait_seconds default 300 -> 600 - pipeline_v2.py: non-fast-mode timeout 300 -> 600 - TP63 (761aa) against nr needs >5min, was timing out1ed0170
-
fix: remove all rate limiters blocking pipeline runs
- deps.py: remove slowapi 60/minute default limit - pipelines.py: remove daily limit + 10/minute limiter from /run - pipeline_v2.py: remove daily limit + 10/minute limiter from /run - ai.py: remove daily limit from /interpret and /interpret/stream - sequencing.py: remove daily limit + 10/minute limiter from /run51ed454 -
fix: NCBI_API_KEY not loading - blast.py read os.environ before dotenv
- Add NCBI_API_KEY to Settings class in config.py - blast.py now reads from settings instead of raw os.environ - Fixes 429 rate limiting on all NCBI BLAST requestscd964d7 -
fix: remove NCBI rate limiting, retry only on connection errors
16dd8be -
feat: show PDB structures, GO terms, and expanded features in UniProt panel
- UniprotPanel: add PDB structure links (up to 12, with RCSB links) - UniprotPanel: add GO terms display (up to 15) - assembler.py: expand feature types to include DOMAIN, HELIX, STRAND, TURN, TRANSMEM, SIGNAL, PROPEPTID, CHAIN, REGION864aa53 -
fix: UniProt fallback search by protein name when NCBI mapping fails
When BLAST returns NCBI accessions that can't be mapped to UniProt, the pipeline now searches UniProt by protein name (from BLAST hit description) to find the real entry with PDB cross-references. This fixes missing Ramachandran, Comparison, Domains, Interactions, and AlphaFold for proteins like TP63 where BLAST returns NCBI-only hits.579ccb3 -
feat: Gemini fallback for AI interpretation when Groq fails
336a23e -
fix: Ramachandran tab hidden for proteins without PDB IDs + AI interpretation error
14dd32c -
fix: PDB IDs like 1TIM rejected as NCBI accessions causing 400 error
- detect_source_from_accession: add 4-char alphanumeric PDB detection before fallthrough - sequences.py: add PDB branch that resolves PDB -> protein sequence via RCSB FASTA - PDB IDs no longer misclassified as NCBI, eliminating the 400 Bad Request826daa4 -
fix: case-insensitive accession lookup - normalize to uppercase at entry points
- sequences.py: .upper() accession before detect_source and API calls - ncbi_service.py: .upper() accession in fetch_by_accession - uniprot.py: .upper() accession in run() - Fixes: p04637 vs P04637 producing different results / cache misses9be3066 -
fix: AlphaFold lookup for NCBI RefSeq accessions
- _lookup(): map NCBI RefSeq IDs to UniProt before querying AlphaFold API - run(): skip cache for NCBI accessions (they need mapping, not caching) - Fixes: AlphaFold 404 when BLAST returns NP_/XP_/YP_ accessions93a4e13 -
fix: UniProt mapping resilience - skip gracefully instead of failing pipeline
- map_refseq_to_uniprot(): skip direct lookup for known UniProt accessions - map_refseq_to_uniprot(): try RefSeq_Protein first for NP_/XP_/YP_ IDs - map_refseq_to_uniprot(): add logging for debugging mapping failures - map_refseq_to_uniprot(): extend poll to 15 iterations - _run_uniprot(): when mapping fails, return partial BLAST data instead of error - Pipeline continues with BLAST-only results when UniProt is unavailable3683b86 -
perf: parallelize post-BLAST steps + fast_mode Swiss-Prot toggle
- _execute(): UniProt, MSA, Pathway Enrichment run in parallel via asyncio.gather - _execute(): Domains + AlphaFold run in parallel after UniProt completes - Total post-BLAST time: ~8min sequential -> ~4min (limited by MSA) - Add fast_mode toggle: Swiss-Prot (~560K seqs, 5-10s) vs nr (~300M seqs, 30s-2min) - Frontend: fast mode toggle in BLAST wizard advanced settings - Backend: fast_mode flows through pipelines.py -> worker -> pipeline_v2 -> blast.pyf3682aa -
fix: BLAST reliability - API key, exponential backoff, retry, error tracking
7bbb868
-
feat: live pipeline status progression — worker pushes status to Supabase at each step
- Add status_callback parameter to run_pipeline() and _execute() - Worker passes async callback that PATCHes job status in Supabase - BLAST sub-phases: submitted_to_ncbi -> polling_ncbi -> parsing - Post-BLAST phases: fetching_uniprot, running_msa, pathway_enrichment, fetching_alphafold, interpreting - Frontend STATUS_ORDER, isActive, STEP_LABELS updated with new statuses - Progress tracker now animates through each step in real-time96b3a54
-
chore: increase rate limit 3/min -> 10/min for pipeline and sequencing endpoints
dd97183 -
fix: prevent GROQ restricted-key hang in interpret and audit steps
- Wrap acompletion() in asyncio.wait_for(timeout=30) to prevent indefinite hang when GROQ API key is restricted/organization blocked - Add proper logging for GROQ timeouts and errors - Fix audit engine: add timeout=15, strip markdown fences from LLM JSON output, handle json.JSONDecodeError separately6891fff -
fix: rewrite map_refseq_to_uniprot to use two-step ID mapping API
Old endpoint rest.uniprot.org/idmapping/uniprotkb/search returns 404. New flow: POST /idmapping/run (form-encoded), then poll GET /idmapping/uniprotkb/results/{jobId} every 1s for up to 10s. Also try direct UniProtKB GET first as fast-path for accessions already in UniProt format (e.g. P01308). Also adds UNIPROT_BASE constant.d5fed69 -
fix: correct column name 'results' -> 'result' in PATCH payload
- process_job was PATCHing 'results' which does not exist in the jobs table (column is 'result'). PostgREST returns 400, but _patch() silently swallowed it (no raise_for_status), so every pipeline job stayed 'running' forever while the worker thread completed normally and released the semaphore. - Add resp.raise_for_status() to _patch so column mismatches are surfaced immediately. - Convert heartbeat's bare except: pass to logger.warning so future PATCH failures appear in the logs.45082e3 -
fix: wrap sequence/length under query key for frontend AssembledContext
cacae61 -
fix: rebind httpx.AsyncClient when event loop changes
76b3f3f -
fix: strip NCBI QBlastInfo preamble before XML parsing
a0c9dbc -
fix: hydrate context_json from storage_url so frontend can render pipeline results
804afcc
-
fix: pipeline robustness — UniProt hit fallback, sweep timeout, heartbeat
- pipeline_v2 _execute: try next BLAST hits for UniProt if top hit fails - worker: increase STUCK_JOB_TIMEOUT_MIN from 10 to 30 minutes - pipeline_worker: add heartbeat that refreshes claimed_at every 2 min to prevent sweep from reclaiming legitimately-running pipelines7abea8b
-
fix: BLAST pipeline crash — accession misclassification + missing error handling
Root cause: NCBI accession QMS45324 (insulin hit) was misclassified as UniProt by detect_source_from_accession due to bare 'P/Q/O' prefix check. UniProt lookup then failed with 400, crashing the entire pipeline. Fixes: - detect_source_from_accession: regex-based detection ([OPQ][0-9]xxx for UniProt, A0A[A-Z0-9]{5,}[0-9] for new format) — QMS45324 now correctly classified as NCBI - UniprotTool._fetch: handle 400/500 errors (not just 404) - _run_uniprot: wrap in try/except so UniProt failures don't crash pipeline - pipeline_v2._execute: each step wrapped in individual try/except so one failed step doesn't kill the whole pipeline - map_refseq_to_uniprot: try RefSeq_Protein, EMBL, and PDB sourceseb567da -
fix: BLAST sequence not read - store full sequence in query_preview, fix context_json fallback
211c4f9 -
fix: BLAST pipeline stuck in queue — 3 root causes
1. Full sequence never stored: only 100 chars in query_preview, worker reads non-existent query_sequence/query columns - Fix: store full sequence in context_json, read from there with fallbacks 2. Wrong status 'completed' violates DB constraint (allows 'complete' only) - Fix: 'completed' -> 'complete' 3. 'updated_at' column doesn't exist on jobs table, silently rejected by PostgREST - Fix: removed from all pipeline_worker PATCH payloads59765e9 -
fix: num_aromatic_rings -> n_aromatic_rings in CYP panel
45628dd -
feat: add smoke-test suite — ADMET/MD/function/docking endpoint validation (27 tests)
5370232 -
feat: ADMET 3a/3b split — mark RDKit descriptors as production, toxicity/ADMET as rule-based heuristic
fe8fda4 -
fix: wrap all Fragments.fr_* calls in safe _fg() wrapper
b3640c4
-
fix: mol_volume fallback referenced labute_asa before definition
aec45b0 -
fix: MolVolume with triple fallback (CalcMolecularVolume -> Descriptors3D -> ASA estimate)
e4295b1 -
fix: MolVolume -> CalcMolecularVolume + wrap optional descriptors in try/except
3aea338 -
fix: include smiles in docking payload dict for when ligand_smiles column is missing
2e692a0 -
fix: remove rate limiting from docking endpoint (429 error)
a3d3e7d -
fix: ADMET import error + MD secondary structure accuracy
- admet.py: replaced GraphMolDescriptors.FractionCSP3 with Descriptors.FractionCSP3 (correct import path) - admet.py: removed unused rdm alias and rdFineMD import - md_sim.py: fixed phi/psi Ramachandran ranges for better sheet detection (beta sheet: psi 90-180 and -180 to -120, helix: -160 to -40 / -75 to 45) - md/page.tsx: Interpretation now checks sheets, not just helices (TIM barrel = sheet-rich, not coil) - md/page.tsx: Structural analysis mode hides meaningless zero values (temperature, timestep, integration steps, energy) - md/page.tsx: Shows 'Mode', 'Chains' instead for BioPython modeec85a6b -
feat: industrial-grade ADMET + detailed MD/function results
Backend (admet.py): - 50+ molecular descriptors (Fsp3, MR, volume, E-state, Wiener, Zagreb) - Full functional group analysis (12 groups) - 5 drug-likeness filters (Lipinski, Veber, Ghose, Egan, MDDR) - ADMET predictions: absorption (oral bio, Caco-2, Pgp, HIA), distribution (Vd, BBB, PPB, CNS), metabolism (CYP panel, half-life, LipE), toxicity (AMES, hERG, DILI, skin, LD50), clearance - Structural alerts: PAINS + Brenk - Composite drug-likeness score (0-100) and toxicity risk score (0-10) - Fixed imports (removed rdFineMD, Fragkins typo) Frontend (admet/page.tsx): - Tabbed layout: Overview, Properties, Drug-likeness, ADMET, Alerts - Risk badge components (color-coded pass/fail/risk levels) - Detailed ADMET category breakdowns - Structural alert summary with progress bar Frontend (md/page.tsx): - Simulation parameters card with engine/forcefield/solvent details - Integration steps progress bars - Energy analysis with convergence + production trace - RMSD/RMSF statistics (min/max/avg) …24c3fcb -
fix: ADMET 422 - remove stray untyped request param from endpoint
b92ecb8 -
fix: stale job polling + 5min timeout + backend staleness guard
- Frontend: both MD and function prediction polls now timeout after 5 min - Backend status endpoints: auto-fail jobs stuck in queued/running for > 10 min - Prevents infinite polling of orphaned jobs (e.g. adfcd000)b5d0e97