@inflexa-ai/harness 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +58 -0
- package/dist/agents/conversation-agent.d.ts +105 -0
- package/dist/agents/conversation-agent.js +140 -0
- package/dist/agents/report-builder.d.ts +32 -0
- package/dist/agents/report-builder.js +31 -0
- package/dist/agents/sandbox/__fixtures__/deps.d.ts +23 -0
- package/dist/agents/sandbox/__fixtures__/deps.js +96 -0
- package/dist/agents/sandbox/bulk-transcriptomics-agent.d.ts +8 -0
- package/dist/agents/sandbox/bulk-transcriptomics-agent.js +22 -0
- package/dist/agents/sandbox/cheminformatics-agent.d.ts +9 -0
- package/dist/agents/sandbox/cheminformatics-agent.js +62 -0
- package/dist/agents/sandbox/chromatin-agent.d.ts +8 -0
- package/dist/agents/sandbox/chromatin-agent.js +24 -0
- package/dist/agents/sandbox/data-profiler.d.ts +10 -0
- package/dist/agents/sandbox/data-profiler.js +24 -0
- package/dist/agents/sandbox/dna-methylation-agent.d.ts +8 -0
- package/dist/agents/sandbox/dna-methylation-agent.js +24 -0
- package/dist/agents/sandbox/drug-repurposing-agent.d.ts +8 -0
- package/dist/agents/sandbox/drug-repurposing-agent.js +54 -0
- package/dist/agents/sandbox/enrichment-agent.d.ts +8 -0
- package/dist/agents/sandbox/enrichment-agent.js +24 -0
- package/dist/agents/sandbox/ephemeral-executor.d.ts +9 -0
- package/dist/agents/sandbox/ephemeral-executor.js +29 -0
- package/dist/agents/sandbox/genomic-variant-agent.d.ts +8 -0
- package/dist/agents/sandbox/genomic-variant-agent.js +27 -0
- package/dist/agents/sandbox/immune-profiling-agent.d.ts +8 -0
- package/dist/agents/sandbox/immune-profiling-agent.js +43 -0
- package/dist/agents/sandbox/index.d.ts +31 -0
- package/dist/agents/sandbox/index.js +96 -0
- package/dist/agents/sandbox/metabolomics-agent.d.ts +8 -0
- package/dist/agents/sandbox/metabolomics-agent.js +15 -0
- package/dist/agents/sandbox/microbiome-agent.d.ts +8 -0
- package/dist/agents/sandbox/microbiome-agent.js +15 -0
- package/dist/agents/sandbox/multi-omics-integration-agent.d.ts +8 -0
- package/dist/agents/sandbox/multi-omics-integration-agent.js +33 -0
- package/dist/agents/sandbox/multimodal-sc-agent.d.ts +8 -0
- package/dist/agents/sandbox/multimodal-sc-agent.js +15 -0
- package/dist/agents/sandbox/network-agent.d.ts +8 -0
- package/dist/agents/sandbox/network-agent.js +25 -0
- package/dist/agents/sandbox/pkpd-clinical-response-agent.d.ts +8 -0
- package/dist/agents/sandbox/pkpd-clinical-response-agent.js +59 -0
- package/dist/agents/sandbox/proteomics-agent.d.ts +8 -0
- package/dist/agents/sandbox/proteomics-agent.js +15 -0
- package/dist/agents/sandbox/scientific-executor.d.ts +9 -0
- package/dist/agents/sandbox/scientific-executor.js +56 -0
- package/dist/agents/sandbox/shared.d.ts +100 -0
- package/dist/agents/sandbox/shared.js +195 -0
- package/dist/agents/sandbox/single-cell-agent.d.ts +8 -0
- package/dist/agents/sandbox/single-cell-agent.js +25 -0
- package/dist/agents/sandbox/spatial-omics-agent.d.ts +8 -0
- package/dist/agents/sandbox/spatial-omics-agent.js +15 -0
- package/dist/agents/sandbox/statistical-modeling-agent.d.ts +8 -0
- package/dist/agents/sandbox/statistical-modeling-agent.js +37 -0
- package/dist/agents/sandbox/translational-safety-agent.d.ts +8 -0
- package/dist/agents/sandbox/translational-safety-agent.js +59 -0
- package/dist/agents/sandbox/types.d.ts +34 -0
- package/dist/agents/sandbox/types.js +15 -0
- package/dist/agents/sandbox/validate-skills.d.ts +18 -0
- package/dist/agents/sandbox/validate-skills.js +40 -0
- package/dist/agents/sandbox-catalog.d.ts +33 -0
- package/dist/agents/sandbox-catalog.js +44 -0
- package/dist/agents/system-prompt.d.ts +25 -0
- package/dist/agents/system-prompt.js +23 -0
- package/dist/app/chat-turn.d.ts +35 -0
- package/dist/app/chat-turn.js +64 -0
- package/dist/app/data-profile-policy.d.ts +36 -0
- package/dist/app/data-profile-policy.js +37 -0
- package/dist/app/message-assembly.d.ts +65 -0
- package/dist/app/message-assembly.js +61 -0
- package/dist/app/synthesize-run.d.ts +57 -0
- package/dist/app/synthesize-run.js +103 -0
- package/dist/auth/local-auth-context.d.ts +19 -0
- package/dist/auth/local-auth-context.js +20 -0
- package/dist/auth/local-run-authorizer.d.ts +10 -0
- package/dist/auth/local-run-authorizer.js +23 -0
- package/dist/auth/types.d.ts +166 -0
- package/dist/auth/types.js +61 -0
- package/dist/billing/cached-resolver.d.ts +23 -0
- package/dist/billing/cached-resolver.js +61 -0
- package/dist/billing/noop-resolver.d.ts +6 -0
- package/dist/billing/noop-resolver.js +7 -0
- package/dist/billing/noop-run-charge.d.ts +6 -0
- package/dist/billing/noop-run-charge.js +10 -0
- package/dist/billing/resolver.d.ts +64 -0
- package/dist/billing/resolver.js +24 -0
- package/dist/billing/run-charge.d.ts +24 -0
- package/dist/billing/run-charge.js +9 -0
- package/dist/config/resource-limits.d.ts +76 -0
- package/dist/config/resource-limits.js +116 -0
- package/dist/contracts/analogy-report.d.ts +120 -0
- package/dist/contracts/analogy-report.js +50 -0
- package/dist/contracts/chat-events.d.ts +61 -0
- package/dist/contracts/chat-events.js +13 -0
- package/dist/contracts/chat-parts.d.ts +308 -0
- package/dist/contracts/chat-parts.js +13 -0
- package/dist/contracts/content-url.d.ts +49 -0
- package/dist/contracts/content-url.js +56 -0
- package/dist/contracts/index.d.ts +12 -0
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/message.d.ts +36 -0
- package/dist/contracts/message.js +9 -0
- package/dist/contracts/part-registry.d.ts +18 -0
- package/dist/contracts/part-registry.js +28 -0
- package/dist/contracts/schemas/chat-events.d.ts +90 -0
- package/dist/contracts/schemas/chat-events.js +43 -0
- package/dist/contracts/schemas/chat-parts.d.ts +683 -0
- package/dist/contracts/schemas/chat-parts.js +295 -0
- package/dist/contracts/schemas/index.d.ts +2 -0
- package/dist/contracts/schemas/index.js +2 -0
- package/dist/contracts/target-assessment-row.d.ts +85 -0
- package/dist/contracts/target-assessment-row.js +37 -0
- package/dist/contracts/target-dossier.d.ts +16720 -0
- package/dist/contracts/target-dossier.js +1339 -0
- package/dist/data/clinical-benchmarks.json +108 -0
- package/dist/data/protein-family-modality.json +101 -0
- package/dist/data/safety-panel-schema.d.ts +64 -0
- package/dist/data/safety-panel-schema.js +34 -0
- package/dist/data/safety-panel.json +436 -0
- package/dist/execution/artifact-metadata.d.ts +74 -0
- package/dist/execution/artifact-metadata.js +203 -0
- package/dist/execution/artifact-record.d.ts +19 -0
- package/dist/execution/artifact-record.js +7 -0
- package/dist/execution/artifact-registration.d.ts +36 -0
- package/dist/execution/artifact-registration.js +61 -0
- package/dist/execution/artifact-registry.d.ts +82 -0
- package/dist/execution/artifact-registry.js +17 -0
- package/dist/execution/dbos-run-launcher.d.ts +7 -0
- package/dist/execution/dbos-run-launcher.js +38 -0
- package/dist/execution/ephemeral-runner.d.ts +81 -0
- package/dist/execution/ephemeral-runner.js +161 -0
- package/dist/execution/filesystem-artifact-registry.d.ts +57 -0
- package/dist/execution/filesystem-artifact-registry.js +92 -0
- package/dist/execution/noop-artifact-registry.d.ts +11 -0
- package/dist/execution/noop-artifact-registry.js +17 -0
- package/dist/execution/post-step-pipeline.d.ts +70 -0
- package/dist/execution/post-step-pipeline.js +207 -0
- package/dist/execution/post-step.d.ts +20 -0
- package/dist/execution/post-step.js +65 -0
- package/dist/execution/reconcile-manifest.d.ts +25 -0
- package/dist/execution/reconcile-manifest.js +132 -0
- package/dist/execution/report-render.d.ts +39 -0
- package/dist/execution/report-render.js +98 -0
- package/dist/execution/report-runner.d.ts +87 -0
- package/dist/execution/report-runner.js +227 -0
- package/dist/execution/run-authorizer.d.ts +43 -0
- package/dist/execution/run-authorizer.js +17 -0
- package/dist/execution/run-launcher.d.ts +36 -0
- package/dist/execution/run-launcher.js +15 -0
- package/dist/execution/run-synthesis.d.ts +107 -0
- package/dist/execution/run-synthesis.js +329 -0
- package/dist/execution/staged-input.d.ts +41 -0
- package/dist/execution/staged-input.js +15 -0
- package/dist/execution/step-summary-metrics.d.ts +10 -0
- package/dist/execution/step-summary-metrics.js +22 -0
- package/dist/execution/step-summary.d.ts +55 -0
- package/dist/execution/step-summary.js +106 -0
- package/dist/execution/topo-sort.d.ts +33 -0
- package/dist/execution/topo-sort.js +99 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +157 -0
- package/dist/input-sanitization.d.ts +22 -0
- package/dist/input-sanitization.js +64 -0
- package/dist/lib/async-utils.d.ts +10 -0
- package/dist/lib/async-utils.js +24 -0
- package/dist/lib/chrome.d.ts +15 -0
- package/dist/lib/chrome.js +95 -0
- package/dist/lib/db-result.d.ts +93 -0
- package/dist/lib/db-result.js +197 -0
- package/dist/lib/fs-helpers.d.ts +74 -0
- package/dist/lib/fs-helpers.js +119 -0
- package/dist/lib/fs-result.d.ts +98 -0
- package/dist/lib/fs-result.js +137 -0
- package/dist/lib/host-concurrency.d.ts +16 -0
- package/dist/lib/host-concurrency.js +60 -0
- package/dist/lib/identifiers.d.ts +8 -0
- package/dist/lib/identifiers.js +10 -0
- package/dist/lib/metrics.d.ts +7 -0
- package/dist/lib/metrics.js +12 -0
- package/dist/lib/mime-detect.d.ts +17 -0
- package/dist/lib/mime-detect.js +29 -0
- package/dist/lib/otel.d.ts +30 -0
- package/dist/lib/otel.js +102 -0
- package/dist/lib/regulatory-corpus/fetch-fda-guidance.d.ts +35 -0
- package/dist/lib/regulatory-corpus/fetch-fda-guidance.js +107 -0
- package/dist/lib/regulatory-corpus/fetch-ich.d.ts +46 -0
- package/dist/lib/regulatory-corpus/fetch-ich.js +173 -0
- package/dist/lib/regulatory-corpus.d.ts +88 -0
- package/dist/lib/regulatory-corpus.js +141 -0
- package/dist/lib/result.d.ts +87 -0
- package/dist/lib/result.js +103 -0
- package/dist/lib/storage.d.ts +29 -0
- package/dist/lib/storage.js +37 -0
- package/dist/lib/streamed-download.d.ts +28 -0
- package/dist/lib/streamed-download.js +111 -0
- package/dist/lib/trace-context.d.ts +11 -0
- package/dist/lib/trace-context.js +49 -0
- package/dist/loop/__fixtures__/scripted-provider.d.ts +31 -0
- package/dist/loop/__fixtures__/scripted-provider.js +57 -0
- package/dist/loop/budget-exceeded.d.ts +22 -0
- package/dist/loop/budget-exceeded.js +41 -0
- package/dist/loop/metrics.d.ts +25 -0
- package/dist/loop/metrics.js +46 -0
- package/dist/loop/run-agent.d.ts +28 -0
- package/dist/loop/run-agent.js +204 -0
- package/dist/loop/run-step.d.ts +29 -0
- package/dist/loop/run-step.js +34 -0
- package/dist/loop/run-to-terminal.d.ts +46 -0
- package/dist/loop/run-to-terminal.js +51 -0
- package/dist/loop/types.d.ts +95 -0
- package/dist/loop/types.js +10 -0
- package/dist/memory/ai-sdk-message-storage.d.ts +20 -0
- package/dist/memory/ai-sdk-message-storage.js +114 -0
- package/dist/memory/card-builders.d.ts +114 -0
- package/dist/memory/card-builders.js +231 -0
- package/dist/memory/content-to-cortex.d.ts +42 -0
- package/dist/memory/content-to-cortex.js +85 -0
- package/dist/memory/count-tokens.d.ts +18 -0
- package/dist/memory/count-tokens.js +64 -0
- package/dist/memory/derive-thread-title.d.ts +14 -0
- package/dist/memory/derive-thread-title.js +26 -0
- package/dist/memory/message-backfill.d.ts +2 -0
- package/dist/memory/message-backfill.js +38 -0
- package/dist/memory/reconstruct-cards.d.ts +23 -0
- package/dist/memory/reconstruct-cards.js +64 -0
- package/dist/memory/thread-history.d.ts +80 -0
- package/dist/memory/thread-history.js +187 -0
- package/dist/memory/thread-store.d.ts +66 -0
- package/dist/memory/thread-store.js +88 -0
- package/dist/memory/working-memory.d.ts +135 -0
- package/dist/memory/working-memory.js +185 -0
- package/dist/prompts/SOUL.d.ts +17 -0
- package/dist/prompts/SOUL.js +173 -0
- package/dist/prompts/analogical-reasoner.d.ts +1 -0
- package/dist/prompts/analogical-reasoner.js +170 -0
- package/dist/prompts/conversation.d.ts +1 -0
- package/dist/prompts/conversation.js +697 -0
- package/dist/prompts/execute-analysis/step-summary.d.ts +1 -0
- package/dist/prompts/execute-analysis/step-summary.js +38 -0
- package/dist/prompts/literature-reviewer.d.ts +1 -0
- package/dist/prompts/literature-reviewer.js +107 -0
- package/dist/prompts/planner.d.ts +2 -0
- package/dist/prompts/planner.js +259 -0
- package/dist/prompts/report-builder.d.ts +1 -0
- package/dist/prompts/report-builder.js +127 -0
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.js +78 -0
- package/dist/prompts/sandbox/cheminformatics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/cheminformatics-agent.js +224 -0
- package/dist/prompts/sandbox/chromatin-agent.d.ts +1 -0
- package/dist/prompts/sandbox/chromatin-agent.js +100 -0
- package/dist/prompts/sandbox/data-profiler.d.ts +1 -0
- package/dist/prompts/sandbox/data-profiler.js +291 -0
- package/dist/prompts/sandbox/dna-methylation-agent.d.ts +1 -0
- package/dist/prompts/sandbox/dna-methylation-agent.js +96 -0
- package/dist/prompts/sandbox/drug-repurposing-agent.d.ts +1 -0
- package/dist/prompts/sandbox/drug-repurposing-agent.js +144 -0
- package/dist/prompts/sandbox/enrichment-agent.d.ts +1 -0
- package/dist/prompts/sandbox/enrichment-agent.js +89 -0
- package/dist/prompts/sandbox/ephemeral-executor.d.ts +1 -0
- package/dist/prompts/sandbox/ephemeral-executor.js +66 -0
- package/dist/prompts/sandbox/genomic-variant-agent.d.ts +1 -0
- package/dist/prompts/sandbox/genomic-variant-agent.js +83 -0
- package/dist/prompts/sandbox/immune-profiling-agent.d.ts +1 -0
- package/dist/prompts/sandbox/immune-profiling-agent.js +101 -0
- package/dist/prompts/sandbox/metabolomics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/metabolomics-agent.js +89 -0
- package/dist/prompts/sandbox/microbiome-agent.d.ts +1 -0
- package/dist/prompts/sandbox/microbiome-agent.js +109 -0
- package/dist/prompts/sandbox/multi-omics-integration-agent.d.ts +1 -0
- package/dist/prompts/sandbox/multi-omics-integration-agent.js +122 -0
- package/dist/prompts/sandbox/multimodal-sc-agent.d.ts +1 -0
- package/dist/prompts/sandbox/multimodal-sc-agent.js +90 -0
- package/dist/prompts/sandbox/network-agent.d.ts +1 -0
- package/dist/prompts/sandbox/network-agent.js +95 -0
- package/dist/prompts/sandbox/pkpd-clinical-response-agent.d.ts +1 -0
- package/dist/prompts/sandbox/pkpd-clinical-response-agent.js +71 -0
- package/dist/prompts/sandbox/proteomics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/proteomics-agent.js +93 -0
- package/dist/prompts/sandbox/scientific-executor.d.ts +1 -0
- package/dist/prompts/sandbox/scientific-executor.js +68 -0
- package/dist/prompts/sandbox/single-cell-agent.d.ts +1 -0
- package/dist/prompts/sandbox/single-cell-agent.js +129 -0
- package/dist/prompts/sandbox/spatial-omics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/spatial-omics-agent.js +94 -0
- package/dist/prompts/sandbox/statistical-modeling-agent.d.ts +1 -0
- package/dist/prompts/sandbox/statistical-modeling-agent.js +112 -0
- package/dist/prompts/sandbox/translational-safety-agent.d.ts +1 -0
- package/dist/prompts/sandbox/translational-safety-agent.js +105 -0
- package/dist/prompts/sandbox-standards.d.ts +18 -0
- package/dist/prompts/sandbox-standards.js +358 -0
- package/dist/prompts/synthesis-agent.d.ts +1 -0
- package/dist/prompts/synthesis-agent.js +289 -0
- package/dist/prompts/target-assessment/briefs/executive-recommendation.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/executive-recommendation.js +85 -0
- package/dist/prompts/target-assessment/briefs/index.d.ts +4 -0
- package/dist/prompts/target-assessment/briefs/index.js +4 -0
- package/dist/prompts/target-assessment/briefs/liability-bullets.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/liability-bullets.js +114 -0
- package/dist/prompts/target-assessment/briefs/target-organ-liabilities.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/target-organ-liabilities.js +29 -0
- package/dist/prompts/target-assessment/briefs/translational-commentary.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/translational-commentary.js +23 -0
- package/dist/prompts/target-assessment/drugs-in-class.d.ts +1 -0
- package/dist/prompts/target-assessment/drugs-in-class.js +29 -0
- package/dist/prompts/target-assessment/modulator-triage.d.ts +1 -0
- package/dist/prompts/target-assessment/modulator-triage.js +31 -0
- package/dist/prompts/target-assessment/off-target-annotator.d.ts +1 -0
- package/dist/prompts/target-assessment/off-target-annotator.js +28 -0
- package/dist/prompts/target-assessment/tox-voice/core.d.ts +1 -0
- package/dist/prompts/target-assessment/tox-voice/core.js +74 -0
- package/dist/prompts/target-assessment/tox-voice/critique.d.ts +7 -0
- package/dist/prompts/target-assessment/tox-voice/critique.js +109 -0
- package/dist/prompts/target-assessment/tox-voice/exemplars.d.ts +8 -0
- package/dist/prompts/target-assessment/tox-voice/exemplars.js +24 -0
- package/dist/prompts/target-assessment/tox-voice/index.d.ts +4 -0
- package/dist/prompts/target-assessment/tox-voice/index.js +4 -0
- package/dist/prompts/target-assessment/tox-voice/vocabulary.d.ts +15 -0
- package/dist/prompts/target-assessment/tox-voice/vocabulary.js +72 -0
- package/dist/provenance/collector.d.ts +148 -0
- package/dist/provenance/collector.js +296 -0
- package/dist/provenance/exec-frame.d.ts +36 -0
- package/dist/provenance/exec-frame.js +49 -0
- package/dist/provenance/types.d.ts +95 -0
- package/dist/provenance/types.js +64 -0
- package/dist/providers/__fixtures__/session.d.ts +16 -0
- package/dist/providers/__fixtures__/session.js +20 -0
- package/dist/providers/ai-sdk.d.ts +47 -0
- package/dist/providers/ai-sdk.js +142 -0
- package/dist/providers/anthropic.d.ts +22 -0
- package/dist/providers/anthropic.js +26 -0
- package/dist/providers/embedding.d.ts +32 -0
- package/dist/providers/embedding.js +42 -0
- package/dist/providers/errors.d.ts +80 -0
- package/dist/providers/errors.js +137 -0
- package/dist/providers/llm-capabilities.d.ts +33 -0
- package/dist/providers/llm-capabilities.js +58 -0
- package/dist/providers/streaming-chat.d.ts +23 -0
- package/dist/providers/streaming-chat.js +61 -0
- package/dist/providers/types.d.ts +59 -0
- package/dist/providers/types.js +8 -0
- package/dist/runtime/assemble.d.ts +68 -0
- package/dist/runtime/assemble.js +46 -0
- package/dist/runtime/boot.d.ts +73 -0
- package/dist/runtime/boot.js +65 -0
- package/dist/runtime/connection-budget.d.ts +48 -0
- package/dist/runtime/connection-budget.js +57 -0
- package/dist/runtime/dbos.d.ts +94 -0
- package/dist/runtime/dbos.js +160 -0
- package/dist/runtime/lifecycle.d.ts +12 -0
- package/dist/runtime/lifecycle.js +19 -0
- package/dist/runtime/pools.d.ts +25 -0
- package/dist/runtime/pools.js +30 -0
- package/dist/runtime/shutdown.d.ts +33 -0
- package/dist/runtime/shutdown.js +39 -0
- package/dist/sandbox/await-exec.d.ts +143 -0
- package/dist/sandbox/await-exec.js +406 -0
- package/dist/sandbox/client.d.ts +82 -0
- package/dist/sandbox/client.js +23 -0
- package/dist/sandbox/create-sandbox.d.ts +105 -0
- package/dist/sandbox/create-sandbox.js +132 -0
- package/dist/sandbox/deliver-exec-event.d.ts +25 -0
- package/dist/sandbox/deliver-exec-event.js +29 -0
- package/dist/sandbox/docker-client.d.ts +75 -0
- package/dist/sandbox/docker-client.js +315 -0
- package/dist/sandbox/estimate-data-profile-resources.d.ts +5 -0
- package/dist/sandbox/estimate-data-profile-resources.js +73 -0
- package/dist/sandbox/exec-id.d.ts +12 -0
- package/dist/sandbox/exec-id.js +20 -0
- package/dist/sandbox/execution-id.d.ts +30 -0
- package/dist/sandbox/execution-id.js +47 -0
- package/dist/sandbox/hmac.d.ts +54 -0
- package/dist/sandbox/hmac.js +67 -0
- package/dist/sandbox/identity.d.ts +15 -0
- package/dist/sandbox/identity.js +22 -0
- package/dist/sandbox/ignored-dirs.d.ts +7 -0
- package/dist/sandbox/ignored-dirs.js +7 -0
- package/dist/sandbox/k8s-client.d.ts +71 -0
- package/dist/sandbox/k8s-client.js +488 -0
- package/dist/sandbox/liveness.d.ts +60 -0
- package/dist/sandbox/liveness.js +82 -0
- package/dist/sandbox/mount-plan.d.ts +77 -0
- package/dist/sandbox/mount-plan.js +84 -0
- package/dist/sandbox/notification-sweep.d.ts +42 -0
- package/dist/sandbox/notification-sweep.js +74 -0
- package/dist/sandbox/reaper.d.ts +70 -0
- package/dist/sandbox/reaper.js +124 -0
- package/dist/sandbox/sandbox-error.d.ts +105 -0
- package/dist/sandbox/sandbox-error.js +92 -0
- package/dist/sandbox/sandbox-step-translate.d.ts +35 -0
- package/dist/sandbox/sandbox-step-translate.js +76 -0
- package/dist/sandbox/submit-exec.d.ts +33 -0
- package/dist/sandbox/submit-exec.js +68 -0
- package/dist/sandbox/types.d.ts +277 -0
- package/dist/sandbox/types.js +147 -0
- package/dist/sandbox/watchdog.d.ts +71 -0
- package/dist/sandbox/watchdog.js +150 -0
- package/dist/schemas/artifact-manifest.d.ts +34 -0
- package/dist/schemas/artifact-manifest.js +36 -0
- package/dist/schemas/data-profile-schemas.d.ts +92 -0
- package/dist/schemas/data-profile-schemas.js +89 -0
- package/dist/schemas/file-metadata.d.ts +51 -0
- package/dist/schemas/file-metadata.js +39 -0
- package/dist/schemas/plan-schemas.d.ts +110 -0
- package/dist/schemas/plan-schemas.js +50 -0
- package/dist/schemas/render-step-prompt.d.ts +32 -0
- package/dist/schemas/render-step-prompt.js +76 -0
- package/dist/schemas/run-synthesis.d.ts +148 -0
- package/dist/schemas/run-synthesis.js +87 -0
- package/dist/schemas/step-summary.d.ts +18 -0
- package/dist/schemas/step-summary.js +20 -0
- package/dist/schemas/validate-plan.d.ts +39 -0
- package/dist/schemas/validate-plan.js +120 -0
- package/dist/schemas/workflow-state.d.ts +314 -0
- package/dist/schemas/workflow-state.js +139 -0
- package/dist/state/active-sandboxes.d.ts +58 -0
- package/dist/state/active-sandboxes.js +100 -0
- package/dist/state/analyses-metrics.d.ts +21 -0
- package/dist/state/analyses-metrics.js +59 -0
- package/dist/state/analyses.d.ts +58 -0
- package/dist/state/analyses.js +132 -0
- package/dist/state/artifacts.d.ts +53 -0
- package/dist/state/artifacts.js +175 -0
- package/dist/state/data-profile.d.ts +176 -0
- package/dist/state/data-profile.js +284 -0
- package/dist/state/db.d.ts +10 -0
- package/dist/state/db.js +9 -0
- package/dist/state/index.d.ts +29 -0
- package/dist/state/index.js +20 -0
- package/dist/state/init.d.ts +14 -0
- package/dist/state/init.js +406 -0
- package/dist/state/plans.d.ts +56 -0
- package/dist/state/plans.js +117 -0
- package/dist/state/runs.d.ts +69 -0
- package/dist/state/runs.js +206 -0
- package/dist/state/schema.d.ts +150 -0
- package/dist/state/schema.js +100 -0
- package/dist/state/step-executions.d.ts +77 -0
- package/dist/state/step-executions.js +175 -0
- package/dist/state/target-assessments.d.ts +68 -0
- package/dist/state/target-assessments.js +222 -0
- package/dist/state/vector-store.d.ts +53 -0
- package/dist/state/vector-store.js +89 -0
- package/dist/tasks/data-profile.d.ts +171 -0
- package/dist/tasks/data-profile.js +461 -0
- package/dist/tasks/refresh-regulatory-corpus.d.ts +59 -0
- package/dist/tasks/refresh-regulatory-corpus.js +146 -0
- package/dist/tasks/regulatory-corpus-boot-refresh.d.ts +55 -0
- package/dist/tasks/regulatory-corpus-boot-refresh.js +149 -0
- package/dist/tools/__fixtures__/tool-context.d.ts +13 -0
- package/dist/tools/__fixtures__/tool-context.js +18 -0
- package/dist/tools/bio/check-safety-panel.d.ts +35 -0
- package/dist/tools/bio/check-safety-panel.js +76 -0
- package/dist/tools/bio/find-approval-precedent.d.ts +32 -0
- package/dist/tools/bio/find-approval-precedent.js +72 -0
- package/dist/tools/bio/get-article-details.d.ts +11 -0
- package/dist/tools/bio/get-article-details.js +20 -0
- package/dist/tools/bio/get-article-full-text.d.ts +19 -0
- package/dist/tools/bio/get-article-full-text.js +32 -0
- package/dist/tools/bio/get-bioactivity.d.ts +11 -0
- package/dist/tools/bio/get-bioactivity.js +23 -0
- package/dist/tools/bio/get-drug-info.d.ts +9 -0
- package/dist/tools/bio/get-drug-info.js +22 -0
- package/dist/tools/bio/get-impc-ko-profile.d.ts +9 -0
- package/dist/tools/bio/get-impc-ko-profile.js +20 -0
- package/dist/tools/bio/get-mechanism.d.ts +8 -0
- package/dist/tools/bio/get-mechanism.js +18 -0
- package/dist/tools/bio/get-pubchem-assays.d.ts +22 -0
- package/dist/tools/bio/get-pubchem-assays.js +107 -0
- package/dist/tools/bio/get-pubchem-cross-refs.d.ts +15 -0
- package/dist/tools/bio/get-pubchem-cross-refs.js +68 -0
- package/dist/tools/bio/get-target-safety.d.ts +18 -0
- package/dist/tools/bio/get-target-safety.js +26 -0
- package/dist/tools/bio/index.d.ts +41 -0
- package/dist/tools/bio/index.js +48 -0
- package/dist/tools/bio/keys.d.ts +31 -0
- package/dist/tools/bio/keys.js +30 -0
- package/dist/tools/bio/lookup-go-term.d.ts +31 -0
- package/dist/tools/bio/lookup-go-term.js +116 -0
- package/dist/tools/bio/search-bgee-expression.d.ts +10 -0
- package/dist/tools/bio/search-bgee-expression.js +24 -0
- package/dist/tools/bio/search-clinical-trials.d.ts +12 -0
- package/dist/tools/bio/search-clinical-trials.js +21 -0
- package/dist/tools/bio/search-clinvar.d.ts +13 -0
- package/dist/tools/bio/search-clinvar.js +28 -0
- package/dist/tools/bio/search-compounds.d.ts +22 -0
- package/dist/tools/bio/search-compounds.js +160 -0
- package/dist/tools/bio/search-ctx-chemical.d.ts +50 -0
- package/dist/tools/bio/search-ctx-chemical.js +130 -0
- package/dist/tools/bio/search-ctx-exposure.d.ts +55 -0
- package/dist/tools/bio/search-ctx-exposure.js +176 -0
- package/dist/tools/bio/search-ctx-hazard.d.ts +111 -0
- package/dist/tools/bio/search-ctx-hazard.js +178 -0
- package/dist/tools/bio/search-dgidb.d.ts +43 -0
- package/dist/tools/bio/search-dgidb.js +199 -0
- package/dist/tools/bio/search-disgenet.d.ts +30 -0
- package/dist/tools/bio/search-disgenet.js +84 -0
- package/dist/tools/bio/search-drugbank.d.ts +38 -0
- package/dist/tools/bio/search-drugbank.js +109 -0
- package/dist/tools/bio/search-faers.d.ts +11 -0
- package/dist/tools/bio/search-faers.js +23 -0
- package/dist/tools/bio/search-gene.d.ts +11 -0
- package/dist/tools/bio/search-gene.js +19 -0
- package/dist/tools/bio/search-geo-datasets.d.ts +20 -0
- package/dist/tools/bio/search-geo-datasets.js +86 -0
- package/dist/tools/bio/search-gwas-catalog.d.ts +33 -0
- package/dist/tools/bio/search-gwas-catalog.js +172 -0
- package/dist/tools/bio/search-interactions.d.ts +17 -0
- package/dist/tools/bio/search-interactions.js +31 -0
- package/dist/tools/bio/search-opentargets.d.ts +11 -0
- package/dist/tools/bio/search-opentargets.js +25 -0
- package/dist/tools/bio/search-pathway.d.ts +12 -0
- package/dist/tools/bio/search-pathway.js +32 -0
- package/dist/tools/bio/search-pharmgkb.d.ts +17 -0
- package/dist/tools/bio/search-pharmgkb.js +46 -0
- package/dist/tools/bio/search-pubchem-compound.d.ts +26 -0
- package/dist/tools/bio/search-pubchem-compound.js +110 -0
- package/dist/tools/bio/search-pubmed.d.ts +17 -0
- package/dist/tools/bio/search-pubmed.js +31 -0
- package/dist/tools/bio/search-targets.d.ts +9 -0
- package/dist/tools/bio/search-targets.js +20 -0
- package/dist/tools/bio/search-toxcast.d.ts +36 -0
- package/dist/tools/bio/search-toxcast.js +141 -0
- package/dist/tools/define-tool.d.ts +80 -0
- package/dist/tools/define-tool.js +48 -0
- package/dist/tools/display/index.d.ts +4 -0
- package/dist/tools/display/index.js +4 -0
- package/dist/tools/display/show-user.d.ts +33 -0
- package/dist/tools/display/show-user.js +67 -0
- package/dist/tools/execute-plan.d.ts +64 -0
- package/dist/tools/execute-plan.js +208 -0
- package/dist/tools/iterate-report.d.ts +172 -0
- package/dist/tools/iterate-report.js +521 -0
- package/dist/tools/lib/api-utils.d.ts +80 -0
- package/dist/tools/lib/api-utils.js +128 -0
- package/dist/tools/lib/bgee-client.d.ts +36 -0
- package/dist/tools/lib/bgee-client.js +150 -0
- package/dist/tools/lib/cbioportal-client.d.ts +34 -0
- package/dist/tools/lib/cbioportal-client.js +159 -0
- package/dist/tools/lib/chembl-client.d.ts +123 -0
- package/dist/tools/lib/chembl-client.js +458 -0
- package/dist/tools/lib/chembl-config.d.ts +5 -0
- package/dist/tools/lib/chembl-config.js +3 -0
- package/dist/tools/lib/clinical-benchmarks-client.d.ts +33 -0
- package/dist/tools/lib/clinical-benchmarks-client.js +54 -0
- package/dist/tools/lib/clinical-trials-client.d.ts +216 -0
- package/dist/tools/lib/clinical-trials-client.js +339 -0
- package/dist/tools/lib/clinicaltrials-config.d.ts +4 -0
- package/dist/tools/lib/clinicaltrials-config.js +2 -0
- package/dist/tools/lib/clinvar-client.d.ts +25 -0
- package/dist/tools/lib/clinvar-client.js +126 -0
- package/dist/tools/lib/disgenet-config.d.ts +2 -0
- package/dist/tools/lib/disgenet-config.js +11 -0
- package/dist/tools/lib/drugbank-config.d.ts +2 -0
- package/dist/tools/lib/drugbank-config.js +12 -0
- package/dist/tools/lib/ema-client.d.ts +45 -0
- package/dist/tools/lib/ema-client.js +127 -0
- package/dist/tools/lib/ema-config.d.ts +7 -0
- package/dist/tools/lib/ema-config.js +7 -0
- package/dist/tools/lib/ensembl-client.d.ts +27 -0
- package/dist/tools/lib/ensembl-client.js +82 -0
- package/dist/tools/lib/gwas-catalog-config.d.ts +4 -0
- package/dist/tools/lib/gwas-catalog-config.js +2 -0
- package/dist/tools/lib/identifier-resolver.d.ts +85 -0
- package/dist/tools/lib/identifier-resolver.js +333 -0
- package/dist/tools/lib/impc-client.d.ts +44 -0
- package/dist/tools/lib/impc-client.js +239 -0
- package/dist/tools/lib/iuphar-client.d.ts +75 -0
- package/dist/tools/lib/iuphar-client.js +230 -0
- package/dist/tools/lib/iuphar-config.d.ts +5 -0
- package/dist/tools/lib/iuphar-config.js +3 -0
- package/dist/tools/lib/ncbi-utils.d.ts +58 -0
- package/dist/tools/lib/ncbi-utils.js +286 -0
- package/dist/tools/lib/openfda-client.d.ts +53 -0
- package/dist/tools/lib/openfda-client.js +192 -0
- package/dist/tools/lib/openfda-config.d.ts +2 -0
- package/dist/tools/lib/openfda-config.js +2 -0
- package/dist/tools/lib/opentargets-client.d.ts +64 -0
- package/dist/tools/lib/opentargets-client.js +290 -0
- package/dist/tools/lib/opentargets-config.d.ts +5 -0
- package/dist/tools/lib/opentargets-config.js +5 -0
- package/dist/tools/lib/path-validation.d.ts +14 -0
- package/dist/tools/lib/path-validation.js +26 -0
- package/dist/tools/lib/pathway-client.d.ts +27 -0
- package/dist/tools/lib/pathway-client.js +149 -0
- package/dist/tools/lib/pharmgkb-config.d.ts +4 -0
- package/dist/tools/lib/pharmgkb-config.js +2 -0
- package/dist/tools/lib/preview-lock.d.ts +20 -0
- package/dist/tools/lib/preview-lock.js +35 -0
- package/dist/tools/lib/protein-family-modality.d.ts +16 -0
- package/dist/tools/lib/protein-family-modality.js +42 -0
- package/dist/tools/lib/protein-family-normalize.d.ts +12 -0
- package/dist/tools/lib/protein-family-normalize.js +46 -0
- package/dist/tools/lib/pubchem-client.d.ts +40 -0
- package/dist/tools/lib/pubchem-client.js +128 -0
- package/dist/tools/lib/pubchem-config.d.ts +5 -0
- package/dist/tools/lib/pubchem-config.js +3 -0
- package/dist/tools/lib/pubmed-client.d.ts +28 -0
- package/dist/tools/lib/pubmed-client.js +91 -0
- package/dist/tools/lib/report-preflight.d.ts +39 -0
- package/dist/tools/lib/report-preflight.js +283 -0
- package/dist/tools/lib/string-client.d.ts +33 -0
- package/dist/tools/lib/string-client.js +93 -0
- package/dist/tools/lib/toxcast-config.d.ts +2 -0
- package/dist/tools/lib/toxcast-config.js +11 -0
- package/dist/tools/lib/uniprot-client.d.ts +28 -0
- package/dist/tools/lib/uniprot-client.js +103 -0
- package/dist/tools/lib/uniprot-config.d.ts +5 -0
- package/dist/tools/lib/uniprot-config.js +3 -0
- package/dist/tools/memory/index.d.ts +4 -0
- package/dist/tools/memory/index.js +4 -0
- package/dist/tools/memory/update-working-memory.d.ts +25 -0
- package/dist/tools/memory/update-working-memory.js +112 -0
- package/dist/tools/registry.d.ts +15 -0
- package/dist/tools/registry.js +26 -0
- package/dist/tools/report/build-report.d.ts +13 -0
- package/dist/tools/report/build-report.js +26 -0
- package/dist/tools/report/index.d.ts +14 -0
- package/dist/tools/report/index.js +14 -0
- package/dist/tools/report/mint-preview-url.d.ts +26 -0
- package/dist/tools/report/mint-preview-url.js +44 -0
- package/dist/tools/report/preview-publisher.d.ts +37 -0
- package/dist/tools/report/preview-publisher.js +25 -0
- package/dist/tools/report/preview-snapshot.d.ts +26 -0
- package/dist/tools/report/preview-snapshot.js +121 -0
- package/dist/tools/report/submit-report.d.ts +25 -0
- package/dist/tools/report/submit-report.js +126 -0
- package/dist/tools/report/version-fs.d.ts +15 -0
- package/dist/tools/report/version-fs.js +154 -0
- package/dist/tools/research/context7-docs.d.ts +31 -0
- package/dist/tools/research/context7-docs.js +61 -0
- package/dist/tools/research/generate-analogy-report.d.ts +60 -0
- package/dist/tools/research/generate-analogy-report.js +288 -0
- package/dist/tools/research/generate-plan.d.ts +39 -0
- package/dist/tools/research/generate-plan.js +393 -0
- package/dist/tools/research/index.d.ts +15 -0
- package/dist/tools/research/index.js +15 -0
- package/dist/tools/research/inspect-run.d.ts +54 -0
- package/dist/tools/research/inspect-run.js +85 -0
- package/dist/tools/research/literature-reviewer.d.ts +29 -0
- package/dist/tools/research/literature-reviewer.js +84 -0
- package/dist/tools/research/search-arxiv.d.ts +32 -0
- package/dist/tools/research/search-arxiv.js +123 -0
- package/dist/tools/research/search-github-repos.d.ts +32 -0
- package/dist/tools/research/search-github-repos.js +86 -0
- package/dist/tools/research/search-semantic-scholar.d.ts +33 -0
- package/dist/tools/research/search-semantic-scholar.js +93 -0
- package/dist/tools/run-ephemeral.d.ts +33 -0
- package/dist/tools/run-ephemeral.js +65 -0
- package/dist/tools/sandbox/index.d.ts +7 -0
- package/dist/tools/sandbox/index.js +7 -0
- package/dist/tools/sandbox/list-available-packages.d.ts +7 -0
- package/dist/tools/sandbox/list-available-packages.js +27 -0
- package/dist/tools/sandbox/list-available-refs.d.ts +7 -0
- package/dist/tools/sandbox/list-available-refs.js +147 -0
- package/dist/tools/sandbox/report-blocker.d.ts +23 -0
- package/dist/tools/sandbox/report-blocker.js +39 -0
- package/dist/tools/sandbox/skills.d.ts +72 -0
- package/dist/tools/sandbox/skills.js +144 -0
- package/dist/tools/workspace/edit-file.d.ts +46 -0
- package/dist/tools/workspace/edit-file.js +100 -0
- package/dist/tools/workspace/execute-command.d.ts +80 -0
- package/dist/tools/workspace/execute-command.js +95 -0
- package/dist/tools/workspace/file-stat.d.ts +24 -0
- package/dist/tools/workspace/file-stat.js +37 -0
- package/dist/tools/workspace/grep.d.ts +57 -0
- package/dist/tools/workspace/grep.js +154 -0
- package/dist/tools/workspace/index.d.ts +26 -0
- package/dist/tools/workspace/index.js +27 -0
- package/dist/tools/workspace/list-files.d.ts +24 -0
- package/dist/tools/workspace/list-files.js +38 -0
- package/dist/tools/workspace/mutator.d.ts +83 -0
- package/dist/tools/workspace/mutator.js +81 -0
- package/dist/tools/workspace/read-file.d.ts +39 -0
- package/dist/tools/workspace/read-file.js +93 -0
- package/dist/tools/workspace/result-bounds.d.ts +42 -0
- package/dist/tools/workspace/result-bounds.js +50 -0
- package/dist/tools/workspace/run-exec.d.ts +32 -0
- package/dist/tools/workspace/run-exec.js +34 -0
- package/dist/tools/workspace/show-file.d.ts +37 -0
- package/dist/tools/workspace/show-file.js +54 -0
- package/dist/tools/workspace/show-plan.d.ts +23 -0
- package/dist/tools/workspace/show-plan.js +44 -0
- package/dist/tools/workspace/workspace-search.d.ts +25 -0
- package/dist/tools/workspace/workspace-search.js +78 -0
- package/dist/tools/workspace/write-file.d.ts +16 -0
- package/dist/tools/workspace/write-file.js +33 -0
- package/dist/workflows/execute-analysis-scheduler.d.ts +94 -0
- package/dist/workflows/execute-analysis-scheduler.js +186 -0
- package/dist/workflows/execute-analysis.d.ts +271 -0
- package/dist/workflows/execute-analysis.js +746 -0
- package/dist/workflows/execute-target-assessment.d.ts +101 -0
- package/dist/workflows/execute-target-assessment.js +528 -0
- package/dist/workflows/metrics.d.ts +37 -0
- package/dist/workflows/metrics.js +55 -0
- package/dist/workflows/plan/level.d.ts +12 -0
- package/dist/workflows/plan/level.js +12 -0
- package/dist/workflows/register-workflows.d.ts +51 -0
- package/dist/workflows/register-workflows.js +48 -0
- package/dist/workflows/resume-execute-analysis.d.ts +70 -0
- package/dist/workflows/resume-execute-analysis.js +80 -0
- package/dist/workflows/sandbox-step.d.ts +243 -0
- package/dist/workflows/sandbox-step.js +573 -0
- package/dist/workflows/target-assessment/assemblers/index.d.ts +5 -0
- package/dist/workflows/target-assessment/assemblers/index.js +4 -0
- package/dist/workflows/target-assessment/assemblers/literature.d.ts +299 -0
- package/dist/workflows/target-assessment/assemblers/literature.js +987 -0
- package/dist/workflows/target-assessment/assemblers/orchestrator.d.ts +109 -0
- package/dist/workflows/target-assessment/assemblers/orchestrator.js +835 -0
- package/dist/workflows/target-assessment/assemblers/safety.d.ts +352 -0
- package/dist/workflows/target-assessment/assemblers/safety.js +985 -0
- package/dist/workflows/target-assessment/assemblers/trials.d.ts +30 -0
- package/dist/workflows/target-assessment/assemblers/trials.js +75 -0
- package/dist/workflows/target-assessment/collectors/index.d.ts +105 -0
- package/dist/workflows/target-assessment/collectors/index.js +468 -0
- package/dist/workflows/target-assessment/correction-loop.d.ts +45 -0
- package/dist/workflows/target-assessment/correction-loop.js +62 -0
- package/dist/workflows/target-assessment/coverage.d.ts +81 -0
- package/dist/workflows/target-assessment/coverage.js +82 -0
- package/dist/workflows/target-assessment/decisions/index.d.ts +86 -0
- package/dist/workflows/target-assessment/decisions/index.js +127 -0
- package/dist/workflows/target-assessment/fanout/index.d.ts +31 -0
- package/dist/workflows/target-assessment/fanout/index.js +155 -0
- package/dist/workflows/target-assessment/lib/approval-precedents.d.ts +52 -0
- package/dist/workflows/target-assessment/lib/approval-precedents.js +119 -0
- package/dist/workflows/target-assessment/lib/citation-validator.d.ts +46 -0
- package/dist/workflows/target-assessment/lib/citation-validator.js +316 -0
- package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.d.ts +62 -0
- package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.js +172 -0
- package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.d.ts +45 -0
- package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.js +156 -0
- package/dist/workflows/target-assessment/lib/compute-derived.d.ts +19 -0
- package/dist/workflows/target-assessment/lib/compute-derived.js +252 -0
- package/dist/workflows/target-assessment/lib/compute-selectivity.d.ts +15 -0
- package/dist/workflows/target-assessment/lib/compute-selectivity.js +18 -0
- package/dist/workflows/target-assessment/lib/dedup-modulators.d.ts +37 -0
- package/dist/workflows/target-assessment/lib/dedup-modulators.js +157 -0
- package/dist/workflows/target-assessment/lib/evidence-conflict-detector.d.ts +17 -0
- package/dist/workflows/target-assessment/lib/evidence-conflict-detector.js +100 -0
- package/dist/workflows/target-assessment/lib/expression-constants.d.ts +21 -0
- package/dist/workflows/target-assessment/lib/expression-constants.js +21 -0
- package/dist/workflows/target-assessment/lib/family-complex-supplement.d.ts +21 -0
- package/dist/workflows/target-assessment/lib/family-complex-supplement.js +37 -0
- package/dist/workflows/target-assessment/lib/heterodimer-filter.d.ts +39 -0
- package/dist/workflows/target-assessment/lib/heterodimer-filter.js +54 -0
- package/dist/workflows/target-assessment/lib/intended-polypharm-filter.d.ts +4 -0
- package/dist/workflows/target-assessment/lib/intended-polypharm-filter.js +24 -0
- package/dist/workflows/target-assessment/lib/llm-step.d.ts +77 -0
- package/dist/workflows/target-assessment/lib/llm-step.js +99 -0
- package/dist/workflows/target-assessment/lib/meddra-organ-map.d.ts +30 -0
- package/dist/workflows/target-assessment/lib/meddra-organ-map.js +126 -0
- package/dist/workflows/target-assessment/lib/recommendation-quality-gates.d.ts +17 -0
- package/dist/workflows/target-assessment/lib/recommendation-quality-gates.js +99 -0
- package/dist/workflows/target-assessment/lib/recommendation-sanitizer.d.ts +2 -0
- package/dist/workflows/target-assessment/lib/recommendation-sanitizer.js +51 -0
- package/dist/workflows/target-assessment/lib/regulatory-actions.d.ts +26 -0
- package/dist/workflows/target-assessment/lib/regulatory-actions.js +147 -0
- package/dist/workflows/target-assessment/lib/structured-llm.d.ts +58 -0
- package/dist/workflows/target-assessment/lib/structured-llm.js +101 -0
- package/dist/workflows/target-assessment/lib/target-identity-filter.d.ts +60 -0
- package/dist/workflows/target-assessment/lib/target-identity-filter.js +86 -0
- package/dist/workflows/target-assessment/lib/therapeutic-programs.d.ts +20 -0
- package/dist/workflows/target-assessment/lib/therapeutic-programs.js +68 -0
- package/dist/workflows/target-assessment/metrics.d.ts +21 -0
- package/dist/workflows/target-assessment/metrics.js +42 -0
- package/dist/workflows/target-assessment/phase4-assemble.d.ts +1841 -0
- package/dist/workflows/target-assessment/phase4-assemble.js +39 -0
- package/dist/workflows/target-assessment/phase5-persist.d.ts +57 -0
- package/dist/workflows/target-assessment/phase5-persist.js +461 -0
- package/dist/workflows/target-assessment/progress.d.ts +38 -0
- package/dist/workflows/target-assessment/progress.js +76 -0
- package/dist/workflows/target-assessment/schemas.d.ts +931 -0
- package/dist/workflows/target-assessment/schemas.js +293 -0
- package/dist/workflows/target-assessment/steps/collectors/pathways.d.ts +15 -0
- package/dist/workflows/target-assessment/steps/collectors/pathways.js +58 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.d.ts +34 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.js +31 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.d.ts +57 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.js +54 -0
- package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.d.ts +35 -0
- package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.js +32 -0
- package/dist/workflows/target-assessment/steps/fanout/index.d.ts +14 -0
- package/dist/workflows/target-assessment/steps/fanout/index.js +10 -0
- package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.d.ts +28 -0
- package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.js +27 -0
- package/dist/workflows/target-assessment/steps/phase0-resolve.d.ts +71 -0
- package/dist/workflows/target-assessment/steps/phase0-resolve.js +21 -0
- package/dist/workflows/target-assessment/steps/phase1-aggregate.d.ts +1018 -0
- package/dist/workflows/target-assessment/steps/phase1-aggregate.js +25 -0
- package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +696 -0
- package/dist/workflows/target-assessment/steps/phase2-aggregate.js +38 -0
- package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +936 -0
- package/dist/workflows/target-assessment/steps/phase3-aggregate.js +22 -0
- package/dist/workflows/target-assessment/steps/synthesis/diagnostics.d.ts +34 -0
- package/dist/workflows/target-assessment/steps/synthesis/diagnostics.js +45 -0
- package/dist/workflows/target-assessment/sub-workflows/index.d.ts +15 -0
- package/dist/workflows/target-assessment/sub-workflows/index.js +11 -0
- package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.d.ts +41 -0
- package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.js +12 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.d.ts +41 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.js +12 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.d.ts +36 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.js +12 -0
- package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.d.ts +66 -0
- package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.js +12 -0
- package/dist/workflows/target-assessment/synthesis/index.d.ts +560 -0
- package/dist/workflows/target-assessment/synthesis/index.js +351 -0
- package/dist/workflows/target-assessment/synthesis-probes.d.ts +56 -0
- package/dist/workflows/target-assessment/synthesis-probes.js +320 -0
- package/dist/workspace/filesystem.d.ts +117 -0
- package/dist/workspace/filesystem.js +304 -0
- package/dist/workspace/mount-strategy.d.ts +50 -0
- package/dist/workspace/mount-strategy.js +67 -0
- package/dist/workspace/paths.d.ts +185 -0
- package/dist/workspace/paths.js +219 -0
- package/dist/workspace/provenance-collector.d.ts +34 -0
- package/dist/workspace/provenance-collector.js +16 -0
- package/dist/workspace/search-config.d.ts +23 -0
- package/dist/workspace/search-config.js +43 -0
- package/dist/workspace/workspace-paths.d.ts +26 -0
- package/dist/workspace/workspace-paths.js +31 -0
- package/package.json +101 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifier resolver — combines HGNC, UniProt, Ensembl, and ChEMBL gene-name
|
|
3
|
+
* fields into a single canonical entity payload with synonyms.
|
|
4
|
+
*
|
|
5
|
+
* Used by Phase 0 of the target-assessment workflow to resolve a user-
|
|
6
|
+
* supplied target string (gene symbol, alias, UniProt accession, Ensembl
|
|
7
|
+
* id, ChEMBL target id) to a canonical entity that downstream collectors
|
|
8
|
+
* can key off.
|
|
9
|
+
*
|
|
10
|
+
* Resolution order:
|
|
11
|
+
* 1. If the input matches a known id pattern (ENSG, UniProt 6-char,
|
|
12
|
+
* CHEMBL\d+), use that as the seed.
|
|
13
|
+
* 2. Otherwise treat as a gene symbol and resolve via HGNC, then enrich
|
|
14
|
+
* with UniProt, Ensembl, and ChEMBL.
|
|
15
|
+
*
|
|
16
|
+
* This is the only step in the workflow allowed to throw — a hard
|
|
17
|
+
* resolution failure aborts the assessment with `error.kind:
|
|
18
|
+
* "target-unresolved"` (per design §6).
|
|
19
|
+
*/
|
|
20
|
+
import { z } from "zod";
|
|
21
|
+
import { apiFetchValidated } from "./api-utils.js";
|
|
22
|
+
import { resolveSymbolToEnsemblId } from "./ensembl-client.js";
|
|
23
|
+
import { searchTargets as searchChemblTargets } from "./chembl-client.js";
|
|
24
|
+
import { normalizeProteinFamily } from "./protein-family-normalize.js";
|
|
25
|
+
const HGNC_BASE = "https://rest.genenames.org/fetch";
|
|
26
|
+
const UNIPROT_BASE = "https://rest.uniprot.org/uniprotkb/search";
|
|
27
|
+
const HGNC_HEADERS = { Accept: "application/json" };
|
|
28
|
+
const UNIPROT_HEADERS = { Accept: "application/json" };
|
|
29
|
+
const ENSG_RE = /^ENSG\d{11}$/;
|
|
30
|
+
const UNIPROT_RE = /^[A-Z][0-9][A-Z0-9]{3}[0-9](-\d+)?$/;
|
|
31
|
+
const CHEMBL_RE = /^CHEMBL\d+$/;
|
|
32
|
+
const HGNC_RE = /^HGNC:\d+$/;
|
|
33
|
+
// HGNC search payload, validated at the fetch boundary. Every field is optional
|
|
34
|
+
// because the API omits absent values; each read below is optional-chained /
|
|
35
|
+
// defaulted, so a missing field degrades gracefully rather than throwing.
|
|
36
|
+
const HgncResponseSchema = z.object({
|
|
37
|
+
response: z
|
|
38
|
+
.object({
|
|
39
|
+
docs: z
|
|
40
|
+
.array(z.object({
|
|
41
|
+
symbol: z.string().optional(),
|
|
42
|
+
name: z.string().optional(),
|
|
43
|
+
hgnc_id: z.string().optional(),
|
|
44
|
+
ensembl_gene_id: z.string().optional(),
|
|
45
|
+
uniprot_ids: z.array(z.string()).optional(),
|
|
46
|
+
entrez_id: z.string().optional(),
|
|
47
|
+
alias_symbol: z.array(z.string()).optional(),
|
|
48
|
+
prev_symbol: z.array(z.string()).optional(),
|
|
49
|
+
}))
|
|
50
|
+
.optional(),
|
|
51
|
+
})
|
|
52
|
+
.optional(),
|
|
53
|
+
});
|
|
54
|
+
// UniProt search payload, validated at the fetch boundary. Every field is
|
|
55
|
+
// optional because the API omits absent values.
|
|
56
|
+
const UniprotResponseSchema = z.object({
|
|
57
|
+
results: z
|
|
58
|
+
.array(z.object({
|
|
59
|
+
primaryAccession: z.string().optional(),
|
|
60
|
+
proteinDescription: z
|
|
61
|
+
.object({
|
|
62
|
+
recommendedName: z.object({ fullName: z.object({ value: z.string().optional() }).optional() }).optional(),
|
|
63
|
+
alternativeNames: z.array(z.object({ fullName: z.object({ value: z.string().optional() }).optional() })).optional(),
|
|
64
|
+
})
|
|
65
|
+
.optional(),
|
|
66
|
+
genes: z
|
|
67
|
+
.array(z.object({
|
|
68
|
+
geneName: z.object({ value: z.string().optional() }).optional(),
|
|
69
|
+
synonyms: z.array(z.object({ value: z.string().optional() })).optional(),
|
|
70
|
+
}))
|
|
71
|
+
.optional(),
|
|
72
|
+
proteinFamily: z.string().optional(),
|
|
73
|
+
extraAttributes: z.object({ uniParcId: z.string().optional() }).optional(),
|
|
74
|
+
keywords: z.array(z.object({ name: z.string().optional() })).optional(),
|
|
75
|
+
}))
|
|
76
|
+
.optional(),
|
|
77
|
+
});
|
|
78
|
+
async function fetchHgncBy(field, value) {
|
|
79
|
+
const url = `${HGNC_BASE}/${field}/${encodeURIComponent(value)}`;
|
|
80
|
+
const res = await apiFetchValidated(url, HgncResponseSchema, { headers: HGNC_HEADERS });
|
|
81
|
+
if (res.isErr())
|
|
82
|
+
return null;
|
|
83
|
+
const docs = res.value.response?.docs ?? [];
|
|
84
|
+
return docs[0] ?? null;
|
|
85
|
+
}
|
|
86
|
+
async function fetchUniprotByAccession(accession) {
|
|
87
|
+
const url = `${UNIPROT_BASE}?query=accession:${encodeURIComponent(accession)}&format=json&size=1`;
|
|
88
|
+
const res = await apiFetchValidated(url, UniprotResponseSchema, { headers: UNIPROT_HEADERS });
|
|
89
|
+
if (res.isErr())
|
|
90
|
+
return null;
|
|
91
|
+
return res.value.results?.[0] ?? null;
|
|
92
|
+
}
|
|
93
|
+
async function fetchUniprotBySymbol(symbol) {
|
|
94
|
+
const query = `gene_exact:${symbol} AND organism_id:9606 AND reviewed:true`;
|
|
95
|
+
const url = `${UNIPROT_BASE}?query=${encodeURIComponent(query)}&format=json&size=1`;
|
|
96
|
+
const res = await apiFetchValidated(url, UniprotResponseSchema, { headers: UNIPROT_HEADERS });
|
|
97
|
+
if (res.isErr())
|
|
98
|
+
return null;
|
|
99
|
+
return res.value.results?.[0] ?? null;
|
|
100
|
+
}
|
|
101
|
+
function extractProteinFamily(uniprotKeywords) {
|
|
102
|
+
if (!uniprotKeywords)
|
|
103
|
+
return null;
|
|
104
|
+
for (const kw of uniprotKeywords) {
|
|
105
|
+
const norm = normalizeProteinFamily(kw.name ?? null);
|
|
106
|
+
if (!norm)
|
|
107
|
+
continue;
|
|
108
|
+
if (norm.includes("kinase") ||
|
|
109
|
+
norm.includes("g protein-coupled receptor") ||
|
|
110
|
+
norm.includes("ion channel") ||
|
|
111
|
+
norm.includes("protease") ||
|
|
112
|
+
norm.includes("nuclear receptor") ||
|
|
113
|
+
norm.includes("transcription factor") ||
|
|
114
|
+
norm.includes("phosphatase") ||
|
|
115
|
+
norm.includes("transporter") ||
|
|
116
|
+
norm.includes("transferase")) {
|
|
117
|
+
return kw.name ?? null; // preserve original UniProt text on the entity for traceability
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return uniprotKeywords[0]?.name ?? null;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Resolve a free-form target identifier to a canonical entity.
|
|
124
|
+
*
|
|
125
|
+
* @throws when the input cannot be mapped to any human gene/protein.
|
|
126
|
+
*/
|
|
127
|
+
export async function resolveTarget(input) {
|
|
128
|
+
const trimmed = input.trim();
|
|
129
|
+
if (!trimmed)
|
|
130
|
+
throw new Error("Target identifier is required");
|
|
131
|
+
let seedSymbol = null;
|
|
132
|
+
let seedHgncId = null;
|
|
133
|
+
let seedEnsemblId = null;
|
|
134
|
+
let seedUniprot = null;
|
|
135
|
+
let seedChembl = null;
|
|
136
|
+
if (ENSG_RE.test(trimmed)) {
|
|
137
|
+
seedEnsemblId = trimmed;
|
|
138
|
+
}
|
|
139
|
+
else if (HGNC_RE.test(trimmed)) {
|
|
140
|
+
seedHgncId = trimmed;
|
|
141
|
+
}
|
|
142
|
+
else if (UNIPROT_RE.test(trimmed)) {
|
|
143
|
+
seedUniprot = trimmed;
|
|
144
|
+
}
|
|
145
|
+
else if (CHEMBL_RE.test(trimmed)) {
|
|
146
|
+
seedChembl = trimmed;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
seedSymbol = trimmed.toUpperCase();
|
|
150
|
+
}
|
|
151
|
+
// Step 1: HGNC anchor.
|
|
152
|
+
// `hgncDoc` holds a single doc from the HGNC search payload (all fields are
|
|
153
|
+
// optional on `HgncDoc`); every read below is optional-chained / defaulted, so
|
|
154
|
+
// a missing or renamed field degrades to null rather than throwing — the
|
|
155
|
+
// resolver never relies on any single HGNC field being present.
|
|
156
|
+
let hgncDoc = null;
|
|
157
|
+
if (seedSymbol) {
|
|
158
|
+
hgncDoc = await fetchHgncBy("symbol", seedSymbol);
|
|
159
|
+
if (!hgncDoc) {
|
|
160
|
+
hgncDoc = await fetchHgncBy("alias_symbol", seedSymbol);
|
|
161
|
+
}
|
|
162
|
+
if (!hgncDoc) {
|
|
163
|
+
hgncDoc = await fetchHgncBy("prev_symbol", seedSymbol);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else if (seedHgncId) {
|
|
167
|
+
hgncDoc = await fetchHgncBy("hgnc_id", seedHgncId.replace(/^HGNC:/, ""));
|
|
168
|
+
}
|
|
169
|
+
else if (seedEnsemblId) {
|
|
170
|
+
hgncDoc = await fetchHgncBy("ensembl_gene_id", seedEnsemblId);
|
|
171
|
+
}
|
|
172
|
+
else if (seedUniprot) {
|
|
173
|
+
hgncDoc = await fetchHgncBy("uniprot_ids", seedUniprot);
|
|
174
|
+
}
|
|
175
|
+
// Step 2: UniProt
|
|
176
|
+
let uniprotDoc = null;
|
|
177
|
+
const uniprotFromHgnc = hgncDoc?.uniprot_ids?.[0] ?? null;
|
|
178
|
+
const uniprotSeed = seedUniprot ?? uniprotFromHgnc ?? null;
|
|
179
|
+
if (uniprotSeed) {
|
|
180
|
+
uniprotDoc = await fetchUniprotByAccession(uniprotSeed);
|
|
181
|
+
}
|
|
182
|
+
else if (hgncDoc?.symbol) {
|
|
183
|
+
uniprotDoc = await fetchUniprotBySymbol(hgncDoc.symbol);
|
|
184
|
+
}
|
|
185
|
+
else if (seedSymbol) {
|
|
186
|
+
uniprotDoc = await fetchUniprotBySymbol(seedSymbol);
|
|
187
|
+
}
|
|
188
|
+
// Backfill HGNC if it was empty but UniProt produced a primary gene name.
|
|
189
|
+
const uniprotPrimaryGene = uniprotDoc?.genes?.[0]?.geneName?.value ?? null;
|
|
190
|
+
if (!hgncDoc && uniprotPrimaryGene) {
|
|
191
|
+
hgncDoc = await fetchHgncBy("symbol", uniprotPrimaryGene);
|
|
192
|
+
}
|
|
193
|
+
// Step 3: Ensembl
|
|
194
|
+
let ensemblId = seedEnsemblId ?? hgncDoc?.ensembl_gene_id ?? null;
|
|
195
|
+
const symbolForEnsembl = hgncDoc?.symbol ?? uniprotPrimaryGene ?? seedSymbol;
|
|
196
|
+
if (!ensemblId && symbolForEnsembl) {
|
|
197
|
+
ensemblId = await resolveSymbolToEnsemblId(symbolForEnsembl);
|
|
198
|
+
}
|
|
199
|
+
// Step 4: ChEMBL
|
|
200
|
+
let chemblId = seedChembl;
|
|
201
|
+
if (!chemblId && symbolForEnsembl) {
|
|
202
|
+
const targets = await searchChemblTargets(symbolForEnsembl, 5).catch(() => []);
|
|
203
|
+
const human = targets.find((t) => t.organism === "Homo sapiens");
|
|
204
|
+
chemblId = (human ?? targets[0])?.targetChemblId ?? null;
|
|
205
|
+
}
|
|
206
|
+
// Final canonical anchor — HGNC preferred, then Ensembl.
|
|
207
|
+
const hgncId = hgncDoc?.hgnc_id ?? null;
|
|
208
|
+
const finalSymbol = hgncDoc?.symbol ?? uniprotPrimaryGene ?? seedSymbol;
|
|
209
|
+
if (!finalSymbol) {
|
|
210
|
+
throw new Error(`Could not resolve target "${trimmed}" to a canonical human gene/protein identity`);
|
|
211
|
+
}
|
|
212
|
+
const finalName = uniprotDoc?.proteinDescription?.recommendedName?.fullName?.value ?? hgncDoc?.name ?? finalSymbol;
|
|
213
|
+
// The canonicalOntology field is the entity-resolution anchor for
|
|
214
|
+
// downstream collectors — falling back to a ChEMBL id (or worse, the
|
|
215
|
+
// raw input string) while labelling it "ensembl" would silently route
|
|
216
|
+
// every cross-reference through the wrong ontology. Require at least
|
|
217
|
+
// one of HGNC / Ensembl to anchor the row.
|
|
218
|
+
const canonicalId = hgncId ?? ensemblId;
|
|
219
|
+
const canonicalOntology = hgncId ? "hgnc" : "ensembl";
|
|
220
|
+
if (!canonicalId) {
|
|
221
|
+
throw new Error(`Resolved "${trimmed}" to symbol "${finalSymbol}" but could not anchor to HGNC or Ensembl — ChEMBL/UniProt-only matches cannot serve as the canonical entity id`);
|
|
222
|
+
}
|
|
223
|
+
const synonyms = new Set();
|
|
224
|
+
for (const s of hgncDoc?.alias_symbol ?? [])
|
|
225
|
+
synonyms.add(String(s));
|
|
226
|
+
for (const s of hgncDoc?.prev_symbol ?? [])
|
|
227
|
+
synonyms.add(String(s));
|
|
228
|
+
for (const g of uniprotDoc?.genes ?? []) {
|
|
229
|
+
for (const syn of g.synonyms ?? []) {
|
|
230
|
+
if (syn.value)
|
|
231
|
+
synonyms.add(syn.value);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
synonyms.delete(finalSymbol);
|
|
235
|
+
const proteinSynonyms = new Set();
|
|
236
|
+
for (const alt of uniprotDoc?.proteinDescription?.alternativeNames ?? []) {
|
|
237
|
+
if (alt.fullName?.value)
|
|
238
|
+
proteinSynonyms.add(alt.fullName.value);
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
canonicalId,
|
|
242
|
+
canonicalOntology,
|
|
243
|
+
geneSymbol: finalSymbol,
|
|
244
|
+
approvedName: finalName,
|
|
245
|
+
ids: {
|
|
246
|
+
hgnc: hgncId,
|
|
247
|
+
ensembl: ensemblId,
|
|
248
|
+
uniprot: uniprotDoc?.primaryAccession ?? uniprotSeed,
|
|
249
|
+
chembl: chemblId,
|
|
250
|
+
entrez: hgncDoc?.entrez_id ?? null,
|
|
251
|
+
},
|
|
252
|
+
synonyms: [...synonyms].filter(Boolean).sort(),
|
|
253
|
+
proteinSynonyms: [...proteinSynonyms].filter(Boolean).sort(),
|
|
254
|
+
proteinFamily: extractProteinFamily(uniprotDoc?.keywords) ?? null,
|
|
255
|
+
resolutionCoverage: {
|
|
256
|
+
hgnc: !!hgncDoc,
|
|
257
|
+
uniprot: !!uniprotDoc,
|
|
258
|
+
ensembl: !!ensemblId,
|
|
259
|
+
chembl: !!chemblId,
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Resolve a single gene-symbol query for the autocomplete UI by fanning
|
|
265
|
+
* out HGNC + UniProt + Ensembl in parallel and merging into one canonical
|
|
266
|
+
* candidate. Per `target-assessment/spec.md` "Autocomplete returns
|
|
267
|
+
* canonical identifiers" — three identifiers populated on one row, not
|
|
268
|
+
* three separate rows.
|
|
269
|
+
*
|
|
270
|
+
* Returns `null` when none of the upstream sources find a match. Throws
|
|
271
|
+
* never — failures of individual sources degrade to `null` for that field.
|
|
272
|
+
*
|
|
273
|
+
* Symbol handling mirrors `resolveTarget` so both entry points behave the
|
|
274
|
+
* same on edge cases:
|
|
275
|
+
* - The query is upper-cased before hitting upstream APIs (HGNC's
|
|
276
|
+
* `symbol` index is case-sensitive; `tp53` would miss).
|
|
277
|
+
* - HGNC is queried with a `symbol` → `alias_symbol` → `prev_symbol`
|
|
278
|
+
* fallback ladder so deprecated symbols still resolve.
|
|
279
|
+
*/
|
|
280
|
+
export async function searchTargetByName(symbol) {
|
|
281
|
+
const trimmed = symbol.trim();
|
|
282
|
+
if (!trimmed)
|
|
283
|
+
return null;
|
|
284
|
+
const upper = trimmed.toUpperCase();
|
|
285
|
+
async function lookupHgnc() {
|
|
286
|
+
return ((await fetchHgncBy("symbol", upper).catch(() => null)) ??
|
|
287
|
+
(await fetchHgncBy("alias_symbol", upper).catch(() => null)) ??
|
|
288
|
+
(await fetchHgncBy("prev_symbol", upper).catch(() => null)));
|
|
289
|
+
}
|
|
290
|
+
const [hgncDoc, uniprotDoc, ensemblId] = await Promise.all([
|
|
291
|
+
lookupHgnc(),
|
|
292
|
+
fetchUniprotBySymbol(upper).catch(() => null),
|
|
293
|
+
resolveSymbolToEnsemblId(upper).catch(() => null),
|
|
294
|
+
]);
|
|
295
|
+
if (!hgncDoc && !uniprotDoc && !ensemblId)
|
|
296
|
+
return null;
|
|
297
|
+
const symbolFromHgnc = hgncDoc?.symbol;
|
|
298
|
+
const uniprotGene = uniprotDoc?.genes?.[0]?.geneName?.value;
|
|
299
|
+
const resolvedSymbol = symbolFromHgnc ?? uniprotGene ?? upper;
|
|
300
|
+
// Case-insensitive synonym dedup — UniProt and HGNC normalize differently
|
|
301
|
+
// (e.g., HGNC "ERBB" vs. UniProt "Erbb"), and we don't want both shapes
|
|
302
|
+
// landing in the synonyms list.
|
|
303
|
+
const seenLower = new Set([resolvedSymbol.toLowerCase()]);
|
|
304
|
+
const synonyms = [];
|
|
305
|
+
const addSynonym = (raw) => {
|
|
306
|
+
if (!raw)
|
|
307
|
+
return;
|
|
308
|
+
const key = raw.toLowerCase();
|
|
309
|
+
if (seenLower.has(key))
|
|
310
|
+
return;
|
|
311
|
+
seenLower.add(key);
|
|
312
|
+
synonyms.push(raw);
|
|
313
|
+
};
|
|
314
|
+
for (const s of hgncDoc?.alias_symbol ?? [])
|
|
315
|
+
addSynonym(s);
|
|
316
|
+
for (const s of hgncDoc?.prev_symbol ?? [])
|
|
317
|
+
addSynonym(s);
|
|
318
|
+
// Pull synonyms from every UniProt gene record — read-through transcripts
|
|
319
|
+
// and multi-gene entries surface aliases beyond the primary record.
|
|
320
|
+
for (const g of uniprotDoc?.genes ?? []) {
|
|
321
|
+
for (const s of g.synonyms ?? [])
|
|
322
|
+
addSynonym(s.value);
|
|
323
|
+
}
|
|
324
|
+
const hgncEnsembl = hgncDoc?.ensembl_gene_id;
|
|
325
|
+
return {
|
|
326
|
+
symbol: resolvedSymbol,
|
|
327
|
+
displayName: hgncDoc?.name ?? uniprotDoc?.proteinDescription?.recommendedName?.fullName?.value ?? null,
|
|
328
|
+
hgncId: hgncDoc?.hgnc_id ?? null,
|
|
329
|
+
ensemblId: ensemblId ?? hgncEnsembl ?? null,
|
|
330
|
+
uniprotId: uniprotDoc?.primaryAccession ?? null,
|
|
331
|
+
synonyms: synonyms.sort((a, b) => a.localeCompare(b)),
|
|
332
|
+
};
|
|
333
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure async client functions for the IMPC (International Mouse Phenotyping
|
|
3
|
+
* Consortium) Solr API.
|
|
4
|
+
*
|
|
5
|
+
* Used by §3.10.1 (Knockout phenotype card).
|
|
6
|
+
*/
|
|
7
|
+
export interface MpTerm {
|
|
8
|
+
id: string;
|
|
9
|
+
term: string;
|
|
10
|
+
bestPValue: number | null;
|
|
11
|
+
}
|
|
12
|
+
export interface PhenotypeProfile {
|
|
13
|
+
mpTerms: MpTerm[];
|
|
14
|
+
organSystems: string[];
|
|
15
|
+
sexDimorphic: boolean;
|
|
16
|
+
phenotypeCount: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ViabilityCall {
|
|
19
|
+
zygosity: string;
|
|
20
|
+
parameterStableId: string;
|
|
21
|
+
mpTerm: {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
} | null;
|
|
25
|
+
}
|
|
26
|
+
export type ViabilityCategory = "lethal_pre_weaning" | "subviable" | "viable" | null;
|
|
27
|
+
export interface KoPhenotypeProfile {
|
|
28
|
+
geneSymbol: string;
|
|
29
|
+
mouseMarkerSymbol: string | null;
|
|
30
|
+
mgiAccessionId: string | null;
|
|
31
|
+
viability: ViabilityCategory;
|
|
32
|
+
viabilityCalls: ViabilityCall[];
|
|
33
|
+
mpTerms: MpTerm[];
|
|
34
|
+
organSystems: string[];
|
|
35
|
+
sexDimorphic: boolean;
|
|
36
|
+
phenotypeCount: number;
|
|
37
|
+
phenotypeDocsTotal: number;
|
|
38
|
+
phenotypesTruncated: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function parsePhenotypeResponse(raw: unknown): PhenotypeProfile;
|
|
41
|
+
export declare function buildViabilityCalls(docsB: unknown, docsC: unknown): ViabilityCall[];
|
|
42
|
+
export declare function derivedViability(calls: ViabilityCall[]): ViabilityCategory;
|
|
43
|
+
/** Full KO phenotype profile for a human gene. */
|
|
44
|
+
export declare function getKoPhenotypeProfile(geneSymbol: string): Promise<KoPhenotypeProfile>;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure async client functions for the IMPC (International Mouse Phenotyping
|
|
3
|
+
* Consortium) Solr API.
|
|
4
|
+
*
|
|
5
|
+
* Used by §3.10.1 (Knockout phenotype card).
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { apiFetchValidated, describeApiError, isUnexpectedApiError } from "./api-utils.js";
|
|
9
|
+
const IMPC_BASE = "https://www.ebi.ac.uk/mi/impc/solr";
|
|
10
|
+
const PHENOTYPE_ROW_CAP = 500;
|
|
11
|
+
const VIABILITY_PROCEDURE = "Viability Primary Screen";
|
|
12
|
+
const ORGAN_SYSTEM_MAP = {
|
|
13
|
+
"cardiovascular system phenotype": "cardiovascular",
|
|
14
|
+
"digestive/alimentary phenotype": "gastrointestinal",
|
|
15
|
+
"endocrine/exocrine gland phenotype": "endocrine",
|
|
16
|
+
"hematopoietic system phenotype": "hematologic",
|
|
17
|
+
"hearing/vestibular/ear phenotype": "auditory",
|
|
18
|
+
"homeostasis/metabolism phenotype": "metabolic",
|
|
19
|
+
"immune system phenotype": "immune",
|
|
20
|
+
"integument phenotype": "skin",
|
|
21
|
+
"liver/biliary system phenotype": "hepatic",
|
|
22
|
+
"muscle phenotype": "musculoskeletal",
|
|
23
|
+
"nervous system phenotype": "cns",
|
|
24
|
+
"renal/urinary system phenotype": "renal",
|
|
25
|
+
"reproductive system phenotype": "reproductive",
|
|
26
|
+
"respiratory system phenotype": "respiratory",
|
|
27
|
+
"skeleton phenotype": "skeleton",
|
|
28
|
+
"vision/eye phenotype": "vision",
|
|
29
|
+
"adipose tissue phenotype": "metabolic",
|
|
30
|
+
"behavior/neurological phenotype": "cns",
|
|
31
|
+
"growth/size/body region phenotype": "growth",
|
|
32
|
+
"mortality/aging": "mortality",
|
|
33
|
+
"craniofacial phenotype": "craniofacial",
|
|
34
|
+
"limbs/digits/tail phenotype": "musculoskeletal",
|
|
35
|
+
"pigmentation phenotype": "skin",
|
|
36
|
+
"embryo phenotype": "growth",
|
|
37
|
+
};
|
|
38
|
+
// A single IMPC Solr document — fields vary by core; all optional. `top_level_mp_term_name`
|
|
39
|
+
// and `sex` are `z.unknown()` because the code reads them defensively (`Array.isArray`,
|
|
40
|
+
// `typeof === "string"`) rather than trusting a wire type.
|
|
41
|
+
const ImpcSolrDocSchema = z.object({
|
|
42
|
+
mp_term_id: z.string().optional(),
|
|
43
|
+
mp_term_name: z.string().optional(),
|
|
44
|
+
p_value: z.number().optional(),
|
|
45
|
+
top_level_mp_term_name: z.unknown().optional(),
|
|
46
|
+
sex: z.unknown().optional(),
|
|
47
|
+
parameter_stable_id: z.string().optional(),
|
|
48
|
+
parameter_name: z.string().optional(),
|
|
49
|
+
marker_symbol: z.string().optional(),
|
|
50
|
+
mgi_accession_id: z.string().optional(),
|
|
51
|
+
});
|
|
52
|
+
// The `response` envelope shared by every IMPC Solr core, validated at the fetch boundary.
|
|
53
|
+
const ImpcSolrResponseSchema = z.object({
|
|
54
|
+
response: z.object({ docs: z.array(ImpcSolrDocSchema).optional(), numFound: z.number().optional() }).optional(),
|
|
55
|
+
});
|
|
56
|
+
function escapeSolrValue(value) {
|
|
57
|
+
return value.replace(/([+\-&|!(){}[\]^"~*?:\\/\s])/g, "\\$1");
|
|
58
|
+
}
|
|
59
|
+
export function parsePhenotypeResponse(raw) {
|
|
60
|
+
// `raw` is the untyped IMPC Solr response; we reach `.response.docs` defensively
|
|
61
|
+
// (optional-chained, defaulted to []) and treat each doc's fields as optional below.
|
|
62
|
+
const docs = raw?.response?.docs ?? [];
|
|
63
|
+
if (!Array.isArray(docs) || docs.length === 0) {
|
|
64
|
+
return { mpTerms: [], organSystems: [], sexDimorphic: false, phenotypeCount: 0 };
|
|
65
|
+
}
|
|
66
|
+
const byMp = new Map();
|
|
67
|
+
const organCounts = new Map();
|
|
68
|
+
const mpToSexes = new Map();
|
|
69
|
+
const allSexes = new Set();
|
|
70
|
+
for (const doc of docs) {
|
|
71
|
+
const mpId = doc.mp_term_id;
|
|
72
|
+
if (!mpId)
|
|
73
|
+
continue;
|
|
74
|
+
const newP = typeof doc.p_value === "number" && Number.isFinite(doc.p_value) ? doc.p_value : null;
|
|
75
|
+
const existing = byMp.get(mpId);
|
|
76
|
+
if (!existing) {
|
|
77
|
+
byMp.set(mpId, { id: mpId, term: doc.mp_term_name ?? "", bestPValue: newP });
|
|
78
|
+
}
|
|
79
|
+
else if (newP !== null && (existing.bestPValue === null || newP < existing.bestPValue)) {
|
|
80
|
+
existing.bestPValue = newP;
|
|
81
|
+
}
|
|
82
|
+
const tops = doc.top_level_mp_term_name;
|
|
83
|
+
if (Array.isArray(tops)) {
|
|
84
|
+
for (const t of tops) {
|
|
85
|
+
const key = typeof t === "string" ? t.toLowerCase() : "";
|
|
86
|
+
const bucket = ORGAN_SYSTEM_MAP[key];
|
|
87
|
+
if (bucket)
|
|
88
|
+
organCounts.set(bucket, (organCounts.get(bucket) ?? 0) + 1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const sex = typeof doc.sex === "string" ? doc.sex.toLowerCase() : "";
|
|
92
|
+
if (sex) {
|
|
93
|
+
allSexes.add(sex);
|
|
94
|
+
if (!mpToSexes.has(mpId))
|
|
95
|
+
mpToSexes.set(mpId, new Set());
|
|
96
|
+
mpToSexes.get(mpId).add(sex);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const mpTerms = [...byMp.values()].sort((a, b) => {
|
|
100
|
+
const ap = a.bestPValue ?? 1;
|
|
101
|
+
const bp = b.bestPValue ?? 1;
|
|
102
|
+
return ap - bp;
|
|
103
|
+
});
|
|
104
|
+
const organSystems = [...organCounts.entries()].sort((a, b) => b[1] - a[1]).map(([k]) => k);
|
|
105
|
+
const bothSexesTested = allSexes.has("male") && allSexes.has("female");
|
|
106
|
+
const sexDimorphic = bothSexesTested && [...mpToSexes.values()].some((sexes) => (sexes.has("male") && !sexes.has("female")) || (sexes.has("female") && !sexes.has("male")));
|
|
107
|
+
return { mpTerms, organSystems, sexDimorphic, phenotypeCount: byMp.size };
|
|
108
|
+
}
|
|
109
|
+
export function buildViabilityCalls(docsB, docsC) {
|
|
110
|
+
// `docsB`/`docsC` are untyped IMPC Solr responses; the `.response.docs` reach is
|
|
111
|
+
// optional-chained + defaulted, so a shape mismatch degrades to an empty result.
|
|
112
|
+
const bDocs = docsB?.response?.docs ?? [];
|
|
113
|
+
const cDocs = docsC?.response?.docs ?? [];
|
|
114
|
+
const seen = new Set();
|
|
115
|
+
const out = [];
|
|
116
|
+
for (const d of bDocs) {
|
|
117
|
+
const pid = d.parameter_stable_id;
|
|
118
|
+
if (!pid || seen.has(pid))
|
|
119
|
+
continue;
|
|
120
|
+
seen.add(pid);
|
|
121
|
+
out.push({
|
|
122
|
+
zygosity: d.parameter_name ?? "",
|
|
123
|
+
parameterStableId: pid,
|
|
124
|
+
mpTerm: d.mp_term_id && d.mp_term_name ? { id: d.mp_term_id, name: d.mp_term_name } : null,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
for (const d of cDocs) {
|
|
128
|
+
const pid = d.parameter_stable_id;
|
|
129
|
+
if (!pid || seen.has(pid))
|
|
130
|
+
continue;
|
|
131
|
+
seen.add(pid);
|
|
132
|
+
out.push({
|
|
133
|
+
zygosity: d.parameter_name ?? "",
|
|
134
|
+
parameterStableId: pid,
|
|
135
|
+
mpTerm: null,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return out;
|
|
139
|
+
}
|
|
140
|
+
export function derivedViability(calls) {
|
|
141
|
+
if (calls.length === 0)
|
|
142
|
+
return null;
|
|
143
|
+
if (calls.some((c) => c.mpTerm?.id === "MP:0011100"))
|
|
144
|
+
return "lethal_pre_weaning";
|
|
145
|
+
if (calls.some((c) => c.mpTerm?.id === "MP:0011110"))
|
|
146
|
+
return "subviable";
|
|
147
|
+
return "viable";
|
|
148
|
+
}
|
|
149
|
+
async function resolveImpcGene(humanSymbol) {
|
|
150
|
+
const q = `human_gene_symbol:${escapeSolrValue(humanSymbol)}`;
|
|
151
|
+
const url = `${IMPC_BASE}/gene/select?q=${encodeURIComponent(q)}` + `&rows=1&fl=marker_symbol,mgi_accession_id&wt=json`;
|
|
152
|
+
const res = await apiFetchValidated(url, ImpcSolrResponseSchema);
|
|
153
|
+
if (res.isErr()) {
|
|
154
|
+
if (isUnexpectedApiError(res.error))
|
|
155
|
+
throw new Error(describeApiError(res.error));
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const docs = res.value?.response?.docs ?? [];
|
|
159
|
+
if (!Array.isArray(docs) || docs.length === 0)
|
|
160
|
+
return null;
|
|
161
|
+
const doc = docs[0];
|
|
162
|
+
if (!doc.marker_symbol || !doc.mgi_accession_id)
|
|
163
|
+
return null;
|
|
164
|
+
return {
|
|
165
|
+
mouseMarkerSymbol: String(doc.marker_symbol),
|
|
166
|
+
mgiAccessionId: String(doc.mgi_accession_id),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
async function fetchPhenotypes(mouseSym) {
|
|
170
|
+
const q = `marker_symbol:${escapeSolrValue(mouseSym)}`;
|
|
171
|
+
const url = `${IMPC_BASE}/genotype-phenotype/select?q=${encodeURIComponent(q)}` + `&rows=${PHENOTYPE_ROW_CAP}&wt=json`;
|
|
172
|
+
const res = await apiFetchValidated(url, ImpcSolrResponseSchema);
|
|
173
|
+
if (res.isErr()) {
|
|
174
|
+
if (isUnexpectedApiError(res.error))
|
|
175
|
+
throw new Error(describeApiError(res.error));
|
|
176
|
+
return { raw: { response: { docs: [] } }, numFound: 0 };
|
|
177
|
+
}
|
|
178
|
+
const numFound = Number(res.value?.response?.numFound ?? 0);
|
|
179
|
+
return { raw: res.value, numFound };
|
|
180
|
+
}
|
|
181
|
+
async function fetchAssignedViability(mouseSym) {
|
|
182
|
+
const q = `marker_symbol:${escapeSolrValue(mouseSym)} AND procedure_name:"${VIABILITY_PROCEDURE}"`;
|
|
183
|
+
const url = `${IMPC_BASE}/genotype-phenotype/select?q=${encodeURIComponent(q)}` + `&rows=20&wt=json`;
|
|
184
|
+
const res = await apiFetchValidated(url, ImpcSolrResponseSchema);
|
|
185
|
+
if (res.isErr()) {
|
|
186
|
+
if (isUnexpectedApiError(res.error))
|
|
187
|
+
throw new Error(describeApiError(res.error));
|
|
188
|
+
return { response: { docs: [] } };
|
|
189
|
+
}
|
|
190
|
+
return res.value;
|
|
191
|
+
}
|
|
192
|
+
async function fetchScreenRan(mouseSym) {
|
|
193
|
+
const q = `marker_symbol:${escapeSolrValue(mouseSym)} AND parameter_stable_id:IMPC_VIA_*`;
|
|
194
|
+
const url = `${IMPC_BASE}/statistical-result/select?q=${encodeURIComponent(q)}` + `&rows=50&fl=parameter_stable_id,parameter_name&wt=json`;
|
|
195
|
+
const res = await apiFetchValidated(url, ImpcSolrResponseSchema);
|
|
196
|
+
if (res.isErr()) {
|
|
197
|
+
if (isUnexpectedApiError(res.error))
|
|
198
|
+
throw new Error(describeApiError(res.error));
|
|
199
|
+
return { response: { docs: [] } };
|
|
200
|
+
}
|
|
201
|
+
return res.value;
|
|
202
|
+
}
|
|
203
|
+
/** Full KO phenotype profile for a human gene. */
|
|
204
|
+
export async function getKoPhenotypeProfile(geneSymbol) {
|
|
205
|
+
const empty = {
|
|
206
|
+
geneSymbol,
|
|
207
|
+
mouseMarkerSymbol: null,
|
|
208
|
+
mgiAccessionId: null,
|
|
209
|
+
viability: null,
|
|
210
|
+
viabilityCalls: [],
|
|
211
|
+
mpTerms: [],
|
|
212
|
+
organSystems: [],
|
|
213
|
+
sexDimorphic: false,
|
|
214
|
+
phenotypeCount: 0,
|
|
215
|
+
phenotypeDocsTotal: 0,
|
|
216
|
+
phenotypesTruncated: false,
|
|
217
|
+
};
|
|
218
|
+
const gene = await resolveImpcGene(geneSymbol);
|
|
219
|
+
if (!gene)
|
|
220
|
+
return empty;
|
|
221
|
+
const [pheno, viaAssigned, viaRan] = await Promise.all([
|
|
222
|
+
fetchPhenotypes(gene.mouseMarkerSymbol),
|
|
223
|
+
fetchAssignedViability(gene.mouseMarkerSymbol),
|
|
224
|
+
fetchScreenRan(gene.mouseMarkerSymbol),
|
|
225
|
+
]);
|
|
226
|
+
const profile = parsePhenotypeResponse(pheno.raw);
|
|
227
|
+
const viabilityCalls = buildViabilityCalls(viaAssigned, viaRan);
|
|
228
|
+
const viability = derivedViability(viabilityCalls);
|
|
229
|
+
return {
|
|
230
|
+
geneSymbol,
|
|
231
|
+
mouseMarkerSymbol: gene.mouseMarkerSymbol,
|
|
232
|
+
mgiAccessionId: gene.mgiAccessionId,
|
|
233
|
+
viability,
|
|
234
|
+
viabilityCalls,
|
|
235
|
+
...profile,
|
|
236
|
+
phenotypeDocsTotal: pheno.numFound,
|
|
237
|
+
phenotypesTruncated: pheno.numFound > PHENOTYPE_ROW_CAP,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure async client functions for the IUPHAR Guide to Pharmacology
|
|
3
|
+
* (https://www.guidetopharmacology.org/services/) REST API.
|
|
4
|
+
*
|
|
5
|
+
* Used to discover, for any HGNC target or UniProt accession, the obligate
|
|
6
|
+
* heterodimer complexes that share the same primary protein (e.g., AMY1/
|
|
7
|
+
* AMY2/AMY3 amylin receptors share the CT receptor protein with the
|
|
8
|
+
* calcitonin receptor and differ only by their RAMP accessory). Powers
|
|
9
|
+
* data-driven heterodimer filtering in target-assessment so off-target
|
|
10
|
+
* panels never list a sibling receptor-complex as a developable hit.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
declare const IupharTargetSchema: z.ZodObject<{
|
|
14
|
+
targetId: z.ZodNumber;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
familyIds: z.ZodArray<z.ZodNumber>;
|
|
18
|
+
subunitIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
19
|
+
complexIds: z.ZodArray<z.ZodNumber>;
|
|
20
|
+
subunitType: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type IupharTarget = z.infer<typeof IupharTargetSchema>;
|
|
23
|
+
export interface IupharHeterodimer {
|
|
24
|
+
/** Complex target record (e.g., the AMY1 receptor). */
|
|
25
|
+
complex: IupharTarget;
|
|
26
|
+
/** All subunits of the complex, including the primary protein and accessory(ies). */
|
|
27
|
+
subunits: IupharTarget[];
|
|
28
|
+
/** Accessory-protein subunits only (type === "AccessoryProtein"). */
|
|
29
|
+
accessories: IupharTarget[];
|
|
30
|
+
}
|
|
31
|
+
export declare function findTargetByGeneSymbol(geneSymbol: string): Promise<IupharTarget | null>;
|
|
32
|
+
export declare function findTargetByUniprot(accession: string): Promise<IupharTarget | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a target by either a UniProt accession or HGNC gene symbol.
|
|
35
|
+
* Tries the format that matches the input shape first, then falls back.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveTarget(uniprotOrGeneSymbol: string): Promise<IupharTarget | null>;
|
|
38
|
+
export declare function getSubunits(complexId: number): Promise<IupharTarget[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Get the heterodimer / family complexes that contain the primary target
|
|
41
|
+
* (e.g., for CALCR → the AMY1/AMY2/AMY3 amylin receptors, each carrying a
|
|
42
|
+
* RAMP1/2/3 accessory). Names are stripped of IUPHAR's HTML subscript markup.
|
|
43
|
+
*
|
|
44
|
+
* Returns [] when the target isn't resolvable in GtoPdb or has no
|
|
45
|
+
* registered complexes.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getFamilyHeterodimers(uniprotOrGeneSymbol: string): Promise<IupharHeterodimer[]>;
|
|
48
|
+
/**
|
|
49
|
+
* Distinct accessory-protein gene symbols across all heterodimer complexes
|
|
50
|
+
* containing the primary target. Used to build a runtime regex alternation
|
|
51
|
+
* for heterodimer-name filtering instead of hardcoding RAMP/MRAP/RGS.
|
|
52
|
+
*
|
|
53
|
+
* Example: getAccessoryProteinNames("CALCR") → ["RAMP1", "RAMP2", "RAMP3"].
|
|
54
|
+
*/
|
|
55
|
+
export declare function getAccessoryProteinNames(uniprotOrGeneSymbol: string): Promise<string[]>;
|
|
56
|
+
declare const IupharFamilySchema: z.ZodObject<{
|
|
57
|
+
familyId: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
name: z.ZodOptional<z.ZodString>;
|
|
59
|
+
targetIds: z.ZodArray<z.ZodNumber>;
|
|
60
|
+
parentFamilyIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
61
|
+
subFamilyIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type IupharFamily = z.infer<typeof IupharFamilySchema>;
|
|
64
|
+
export declare function getFamily(familyId: number): Promise<IupharFamily | null>;
|
|
65
|
+
/** Fetch the UniProtKB cross-references (human only) for an IUPHAR target. */
|
|
66
|
+
export declare function getTargetHumanUniprots(targetId: number): Promise<string[]>;
|
|
67
|
+
/**
|
|
68
|
+
* UniProt accessions of sibling primary-GPCR targets in the same IUPHAR
|
|
69
|
+
* family as the input (excludes the input target itself and any target
|
|
70
|
+
* registered as a complex with subunits). For CALCR this returns the
|
|
71
|
+
* CALCRL accession; the AMY1/2/3 complexes are excluded because they are
|
|
72
|
+
* heterodimers, not separate primary proteins.
|
|
73
|
+
*/
|
|
74
|
+
export declare function getFamilySiblingUniprots(uniprotOrGeneSymbol: string): Promise<string[]>;
|
|
75
|
+
export {};
|