@genobank/biofs 3.22.0 → 3.23.0
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/CHANGELOG.md +32 -0
- package/dist/abi/sequentia/ConsentGrant.json +1909 -0
- package/dist/commands/admin/verify-lab.js +1 -1
- package/dist/commands/admin/verify-lab.js.map +1 -1
- package/dist/commands/alphagenome/index.d.ts +26 -0
- package/dist/commands/alphagenome/index.d.ts.map +1 -0
- package/dist/commands/alphagenome/index.js +72 -0
- package/dist/commands/alphagenome/index.js.map +1 -0
- package/dist/commands/annotate/signed_headers.d.ts +5 -0
- package/dist/commands/annotate/signed_headers.d.ts.map +1 -0
- package/dist/commands/annotate/signed_headers.js +10 -0
- package/dist/commands/annotate/signed_headers.js.map +1 -0
- package/dist/commands/annotate/status.d.ts.map +1 -1
- package/dist/commands/annotate/status.js +4 -0
- package/dist/commands/annotate/status.js.map +1 -1
- package/dist/commands/annotate/submit.d.ts +4 -1
- package/dist/commands/annotate/submit.d.ts.map +1 -1
- package/dist/commands/annotate/submit.js +41 -12
- package/dist/commands/annotate/submit.js.map +1 -1
- package/dist/commands/biofiles.d.ts.map +1 -1
- package/dist/commands/biofiles.js +10 -2
- package/dist/commands/biofiles.js.map +1 -1
- package/dist/commands/clawbio/submit.d.ts +24 -0
- package/dist/commands/clawbio/submit.d.ts.map +1 -0
- package/dist/commands/clawbio/submit.js +175 -0
- package/dist/commands/clawbio/submit.js.map +1 -0
- package/dist/commands/consent.d.ts +1 -0
- package/dist/commands/consent.d.ts.map +1 -1
- package/dist/commands/consent.js +3 -2
- package/dist/commands/consent.js.map +1 -1
- package/dist/commands/context/create.d.ts.map +1 -1
- package/dist/commands/context/create.js +40 -5
- package/dist/commands/context/create.js.map +1 -1
- package/dist/commands/crypt4gh.d.ts +24 -0
- package/dist/commands/crypt4gh.d.ts.map +1 -0
- package/dist/commands/crypt4gh.js +220 -0
- package/dist/commands/crypt4gh.js.map +1 -0
- package/dist/commands/fluency/index.d.ts +6 -0
- package/dist/commands/fluency/index.d.ts.map +1 -1
- package/dist/commands/fluency/index.js +64 -0
- package/dist/commands/fluency/index.js.map +1 -1
- package/dist/commands/fourier-score.d.ts +2 -0
- package/dist/commands/fourier-score.d.ts.map +1 -1
- package/dist/commands/fourier-score.js +201 -107
- package/dist/commands/fourier-score.js.map +1 -1
- package/dist/commands/fusion-evidence/index.d.ts +25 -0
- package/dist/commands/fusion-evidence/index.d.ts.map +1 -0
- package/dist/commands/fusion-evidence/index.js +136 -0
- package/dist/commands/fusion-evidence/index.js.map +1 -0
- package/dist/commands/governance.d.ts +46 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +126 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/humanmark.d.ts +68 -0
- package/dist/commands/humanmark.d.ts.map +1 -0
- package/dist/commands/humanmark.js +278 -0
- package/dist/commands/humanmark.js.map +1 -0
- package/dist/commands/imaging/compare.d.ts +1 -0
- package/dist/commands/imaging/compare.d.ts.map +1 -1
- package/dist/commands/imaging/compare.js +1 -0
- package/dist/commands/imaging/compare.js.map +1 -1
- package/dist/commands/imaging/lesions.d.ts +1 -0
- package/dist/commands/imaging/lesions.d.ts.map +1 -1
- package/dist/commands/imaging/lesions.js +2 -1
- package/dist/commands/imaging/lesions.js.map +1 -1
- package/dist/commands/imaging/register.d.ts +1 -0
- package/dist/commands/imaging/register.d.ts.map +1 -1
- package/dist/commands/imaging/register.js +24 -0
- package/dist/commands/imaging/register.js.map +1 -1
- package/dist/commands/imaging/trajectory.d.ts +1 -0
- package/dist/commands/imaging/trajectory.d.ts.map +1 -1
- package/dist/commands/imaging/trajectory.js +2 -1
- package/dist/commands/imaging/trajectory.js.map +1 -1
- package/dist/commands/imaging/twin.d.ts +1 -0
- package/dist/commands/imaging/twin.d.ts.map +1 -1
- package/dist/commands/imaging/twin.js +1 -0
- package/dist/commands/imaging/twin.js.map +1 -1
- package/dist/commands/inventory-register-sqlite.d.ts +10 -0
- package/dist/commands/inventory-register-sqlite.d.ts.map +1 -1
- package/dist/commands/inventory-register-sqlite.js +62 -8
- package/dist/commands/inventory-register-sqlite.js.map +1 -1
- package/dist/commands/job/submit-clara.d.ts.map +1 -1
- package/dist/commands/job/submit-clara.js +71 -50
- package/dist/commands/job/submit-clara.js.map +1 -1
- package/dist/commands/kiosk/canon.d.ts +95 -0
- package/dist/commands/kiosk/canon.d.ts.map +1 -0
- package/dist/commands/kiosk/canon.js +120 -0
- package/dist/commands/kiosk/canon.js.map +1 -0
- package/dist/commands/kiosk/cli.d.ts +12 -0
- package/dist/commands/kiosk/cli.d.ts.map +1 -0
- package/dist/commands/kiosk/cli.js +784 -0
- package/dist/commands/kiosk/cli.js.map +1 -0
- package/dist/commands/kiosk/client.d.ts +32 -0
- package/dist/commands/kiosk/client.d.ts.map +1 -0
- package/dist/commands/kiosk/client.js +179 -0
- package/dist/commands/kiosk/client.js.map +1 -0
- package/dist/commands/kiosk/cryptobox.d.ts +41 -0
- package/dist/commands/kiosk/cryptobox.d.ts.map +1 -0
- package/dist/commands/kiosk/cryptobox.js +126 -0
- package/dist/commands/kiosk/cryptobox.js.map +1 -0
- package/dist/commands/kiosk/gate.d.ts +13 -0
- package/dist/commands/kiosk/gate.d.ts.map +1 -0
- package/dist/commands/kiosk/gate.js +174 -0
- package/dist/commands/kiosk/gate.js.map +1 -0
- package/dist/commands/kiosk/home.d.ts +80 -0
- package/dist/commands/kiosk/home.d.ts.map +1 -0
- package/dist/commands/kiosk/home.js +265 -0
- package/dist/commands/kiosk/home.js.map +1 -0
- package/dist/commands/kiosk/hooks.d.ts +24 -0
- package/dist/commands/kiosk/hooks.d.ts.map +1 -0
- package/dist/commands/kiosk/hooks.js +305 -0
- package/dist/commands/kiosk/hooks.js.map +1 -0
- package/dist/commands/kiosk/invitemail.d.ts +17 -0
- package/dist/commands/kiosk/invitemail.d.ts.map +1 -0
- package/dist/commands/kiosk/invitemail.js +58 -0
- package/dist/commands/kiosk/invitemail.js.map +1 -0
- package/dist/commands/kiosk/main.d.ts +7 -0
- package/dist/commands/kiosk/main.d.ts.map +1 -0
- package/dist/commands/kiosk/main.js +20 -0
- package/dist/commands/kiosk/main.js.map +1 -0
- package/dist/commands/kiosk/mcp.d.ts +28 -0
- package/dist/commands/kiosk/mcp.d.ts.map +1 -0
- package/dist/commands/kiosk/mcp.js +304 -0
- package/dist/commands/kiosk/mcp.js.map +1 -0
- package/dist/commands/kiosk/pairing.d.ts +28 -0
- package/dist/commands/kiosk/pairing.d.ts.map +1 -0
- package/dist/commands/kiosk/pairing.js +147 -0
- package/dist/commands/kiosk/pairing.js.map +1 -0
- package/dist/commands/kiosk/presence.d.ts +11 -0
- package/dist/commands/kiosk/presence.d.ts.map +1 -0
- package/dist/commands/kiosk/presence.js +105 -0
- package/dist/commands/kiosk/presence.js.map +1 -0
- package/dist/commands/kiosk/profile.d.ts +59 -0
- package/dist/commands/kiosk/profile.d.ts.map +1 -0
- package/dist/commands/kiosk/profile.js +266 -0
- package/dist/commands/kiosk/profile.js.map +1 -0
- package/dist/commands/kiosk/room.d.ts +252 -0
- package/dist/commands/kiosk/room.d.ts.map +1 -0
- package/dist/commands/kiosk/room.js +1057 -0
- package/dist/commands/kiosk/room.js.map +1 -0
- package/dist/commands/mirror.d.ts +16 -0
- package/dist/commands/mirror.d.ts.map +1 -0
- package/dist/commands/mirror.js +172 -0
- package/dist/commands/mirror.js.map +1 -0
- package/dist/commands/neoantigen/align.d.ts +15 -0
- package/dist/commands/neoantigen/align.d.ts.map +1 -0
- package/dist/commands/neoantigen/align.js +74 -0
- package/dist/commands/neoantigen/align.js.map +1 -0
- package/dist/commands/neoantigen/fabricate.d.ts +20 -0
- package/dist/commands/neoantigen/fabricate.d.ts.map +1 -0
- package/dist/commands/neoantigen/fabricate.js +119 -0
- package/dist/commands/neoantigen/fabricate.js.map +1 -0
- package/dist/commands/neoantigen/ingest.d.ts +14 -0
- package/dist/commands/neoantigen/ingest.d.ts.map +1 -0
- package/dist/commands/neoantigen/ingest.js +62 -0
- package/dist/commands/neoantigen/ingest.js.map +1 -0
- package/dist/commands/neoantigen/status.d.ts +4 -0
- package/dist/commands/neoantigen/status.d.ts.map +1 -0
- package/dist/commands/neoantigen/status.js +69 -0
- package/dist/commands/neoantigen/status.js.map +1 -0
- package/dist/commands/neoantigen-pipeline/index.d.ts +146 -2
- package/dist/commands/neoantigen-pipeline/index.d.ts.map +1 -1
- package/dist/commands/neoantigen-pipeline/index.js +413 -1
- package/dist/commands/neoantigen-pipeline/index.js.map +1 -1
- package/dist/commands/onramp/huggingface.d.ts +33 -0
- package/dist/commands/onramp/huggingface.d.ts.map +1 -0
- package/dist/commands/onramp/huggingface.js +124 -0
- package/dist/commands/onramp/huggingface.js.map +1 -0
- package/dist/commands/parabricks/index.d.ts +3 -1
- package/dist/commands/parabricks/index.d.ts.map +1 -1
- package/dist/commands/parabricks/index.js +16 -6
- package/dist/commands/parabricks/index.js.map +1 -1
- package/dist/commands/parabricks/registry.json +105 -3
- package/dist/commands/protein-impact/benchmark.d.ts +34 -0
- package/dist/commands/protein-impact/benchmark.d.ts.map +1 -0
- package/dist/commands/protein-impact/benchmark.js +75 -0
- package/dist/commands/protein-impact/benchmark.js.map +1 -0
- package/dist/commands/protein-impact/benchmark_v1.json +1 -0
- package/dist/commands/protein-impact/constants.d.ts +54 -0
- package/dist/commands/protein-impact/constants.d.ts.map +1 -0
- package/dist/commands/protein-impact/constants.js +47 -0
- package/dist/commands/protein-impact/constants.js.map +1 -0
- package/dist/commands/protein-impact/core.d.ts +145 -0
- package/dist/commands/protein-impact/core.d.ts.map +1 -0
- package/dist/commands/protein-impact/core.js +288 -0
- package/dist/commands/protein-impact/core.js.map +1 -0
- package/dist/commands/protein-impact/domain_table.json +23 -0
- package/dist/commands/protein-impact/domains.d.ts +9 -0
- package/dist/commands/protein-impact/domains.d.ts.map +1 -0
- package/dist/commands/protein-impact/domains.js +29 -0
- package/dist/commands/protein-impact/domains.js.map +1 -0
- package/dist/commands/protein-impact/estimate.d.ts +48 -0
- package/dist/commands/protein-impact/estimate.d.ts.map +1 -0
- package/dist/commands/protein-impact/estimate.js +101 -0
- package/dist/commands/protein-impact/estimate.js.map +1 -0
- package/dist/commands/protein-impact/exec.d.ts +60 -0
- package/dist/commands/protein-impact/exec.d.ts.map +1 -0
- package/dist/commands/protein-impact/exec.js +227 -0
- package/dist/commands/protein-impact/exec.js.map +1 -0
- package/dist/commands/protein-impact/features.d.ts +24 -0
- package/dist/commands/protein-impact/features.d.ts.map +1 -0
- package/dist/commands/protein-impact/features.js +93 -0
- package/dist/commands/protein-impact/features.js.map +1 -0
- package/dist/commands/protein-impact/gate.d.ts +94 -0
- package/dist/commands/protein-impact/gate.d.ts.map +1 -0
- package/dist/commands/protein-impact/gate.js +120 -0
- package/dist/commands/protein-impact/gate.js.map +1 -0
- package/dist/commands/protein-impact/gate_rules.json +10 -0
- package/dist/commands/protein-impact/guard.d.ts +44 -0
- package/dist/commands/protein-impact/guard.d.ts.map +1 -0
- package/dist/commands/protein-impact/guard.js +189 -0
- package/dist/commands/protein-impact/guard.js.map +1 -0
- package/dist/commands/protein-impact/metrics.d.ts +44 -0
- package/dist/commands/protein-impact/metrics.d.ts.map +1 -0
- package/dist/commands/protein-impact/metrics.js +178 -0
- package/dist/commands/protein-impact/metrics.js.map +1 -0
- package/dist/commands/protein-impact/numbering.d.ts +33 -0
- package/dist/commands/protein-impact/numbering.d.ts.map +1 -0
- package/dist/commands/protein-impact/numbering.js +115 -0
- package/dist/commands/protein-impact/numbering.js.map +1 -0
- package/dist/commands/protein-impact/register.d.ts +6 -0
- package/dist/commands/protein-impact/register.d.ts.map +1 -0
- package/dist/commands/protein-impact/register.js +139 -0
- package/dist/commands/protein-impact/register.js.map +1 -0
- package/dist/commands/protein-impact/request.d.ts +14 -0
- package/dist/commands/protein-impact/request.d.ts.map +1 -0
- package/dist/commands/protein-impact/request.js +73 -0
- package/dist/commands/protein-impact/request.js.map +1 -0
- package/dist/commands/protein-impact/submit.d.ts +117 -0
- package/dist/commands/protein-impact/submit.d.ts.map +1 -0
- package/dist/commands/protein-impact/submit.js +460 -0
- package/dist/commands/protein-impact/submit.js.map +1 -0
- package/dist/commands/protein-impact/tools.lock.json +53 -0
- package/dist/commands/protein-impact/tools_lock.d.ts +41 -0
- package/dist/commands/protein-impact/tools_lock.d.ts.map +1 -0
- package/dist/commands/protein-impact/tools_lock.js +52 -0
- package/dist/commands/protein-impact/tools_lock.js.map +1 -0
- package/dist/commands/psm-consensus.d.ts.map +1 -1
- package/dist/commands/psm-consensus.js +65 -26
- package/dist/commands/psm-consensus.js.map +1 -1
- package/dist/commands/reconcile-owners.d.ts +21 -0
- package/dist/commands/reconcile-owners.d.ts.map +1 -0
- package/dist/commands/reconcile-owners.js +86 -0
- package/dist/commands/reconcile-owners.js.map +1 -0
- package/dist/commands/reference-register/index.d.ts +8 -0
- package/dist/commands/reference-register/index.d.ts.map +1 -0
- package/dist/commands/reference-register/index.js +58 -0
- package/dist/commands/reference-register/index.js.map +1 -0
- package/dist/commands/register-derived-file.d.ts +9 -0
- package/dist/commands/register-derived-file.d.ts.map +1 -0
- package/dist/commands/register-derived-file.js +101 -0
- package/dist/commands/register-derived-file.js.map +1 -0
- package/dist/commands/rrm-consensus.d.ts.map +1 -1
- package/dist/commands/rrm-consensus.js +65 -26
- package/dist/commands/rrm-consensus.js.map +1 -1
- package/dist/commands/rrm-validate.d.ts +22 -0
- package/dist/commands/rrm-validate.d.ts.map +1 -0
- package/dist/commands/rrm-validate.js +109 -0
- package/dist/commands/rrm-validate.js.map +1 -0
- package/dist/commands/tele.d.ts +1 -0
- package/dist/commands/tele.d.ts.map +1 -1
- package/dist/commands/tele.js +37 -2
- package/dist/commands/tele.js.map +1 -1
- package/dist/commands/tokenize.d.ts.map +1 -1
- package/dist/commands/tokenize.js +35 -0
- package/dist/commands/tokenize.js.map +1 -1
- package/dist/commands/upload.d.ts +28 -1
- package/dist/commands/upload.d.ts.map +1 -1
- package/dist/commands/upload.js +174 -31
- package/dist/commands/upload.js.map +1 -1
- package/dist/commands/vault/mount.d.ts.map +1 -1
- package/dist/commands/vault/mount.js +6 -0
- package/dist/commands/vault/mount.js.map +1 -1
- package/dist/commands/workspace.d.ts +2 -0
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +16 -4
- package/dist/commands/workspace.js.map +1 -1
- package/dist/commands/x402/submit.d.ts.map +1 -1
- package/dist/commands/x402/submit.js +7 -4
- package/dist/commands/x402/submit.js.map +1 -1
- package/dist/index.js +810 -31
- package/dist/index.js.map +1 -1
- package/dist/lib/api/bionft-client.d.ts.map +1 -1
- package/dist/lib/api/bionft-client.js +1 -1
- package/dist/lib/api/bionft-client.js.map +1 -1
- package/dist/lib/api/fuse-client.d.ts.map +1 -1
- package/dist/lib/api/fuse-client.js +8 -1
- package/dist/lib/api/fuse-client.js.map +1 -1
- package/dist/lib/biofiles/resolver.d.ts.map +1 -1
- package/dist/lib/biofiles/resolver.js +5 -2
- package/dist/lib/biofiles/resolver.js.map +1 -1
- package/dist/lib/crypt4gh/bind.d.ts +51 -0
- package/dist/lib/crypt4gh/bind.d.ts.map +1 -0
- package/dist/lib/crypt4gh/bind.js +140 -0
- package/dist/lib/crypt4gh/bind.js.map +1 -0
- package/dist/lib/crypt4gh/index.d.ts +45 -0
- package/dist/lib/crypt4gh/index.d.ts.map +1 -0
- package/dist/lib/crypt4gh/index.js +391 -0
- package/dist/lib/crypt4gh/index.js.map +1 -0
- package/dist/lib/gene-map.d.ts.map +1 -1
- package/dist/lib/gene-map.js +13 -0
- package/dist/lib/gene-map.js.map +1 -1
- package/dist/lib/rrm_fft.py +555 -0
- package/dist/lib/sequentia/BioPIL.js +1 -1
- package/dist/lib/sequentia/BioPIL.js.map +1 -1
- package/dist/lib/sequentia/ConsentManager.js +1 -1
- package/dist/lib/sequentia/ConsentManager.js.map +1 -1
- package/dist/lib/sequentia/OpenCravatJobs.js +1 -1
- package/dist/lib/sequentia/OpenCravatJobs.js.map +1 -1
- package/dist/lib/sequentia/PaymentRouter.js +1 -1
- package/dist/lib/sequentia/PaymentRouter.js.map +1 -1
- package/dist/lib/sequentia/consent-grant-c2pa.d.ts +134 -0
- package/dist/lib/sequentia/consent-grant-c2pa.d.ts.map +1 -0
- package/dist/lib/sequentia/consent-grant-c2pa.js +218 -0
- package/dist/lib/sequentia/consent-grant-c2pa.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "schema": "genobank.protein-impact.benchmark/v1", "name": "gt_benchmark_v1", "tsv_sha256": "831a1f836136add44824976b290ae7a14572da155bb210581ab0f3da4951a60e", "rules": { "clinvar_min_stars": 2, "af_floor": 0.001, "hom_min_alleles": 20 }, "columns": ["variant_id", "gene", "hgvs_pos", "ref", "alt", "domain", "label", "tier", "evidence", "clinvar_vcv", "gnomad_af", "gnomad_hom"], "rows": [["ITGA2B:p.N33D", "ITGA2B", 33, "N", "D", "propeller", 1, "B", "clinvar_plp", "VCV001879065", null, null], ["ITGA2B:p.G44V", "ITGA2B", 44, "G", "V", "propeller", 1, "B", "clinvar_plp", "VCV000953032", null, null], ["ITGA2B:p.R63K", "ITGA2B", 63, "R", "K", "propeller", 1, "B", "clinvar_plp", "VCV001691490", 2.05222e-06, 0.0], ["ITGA2B:p.P71R", "ITGA2B", 71, "P", "R", "propeller", 1, "B", "clinvar_plp", "VCV002506413", null, null], ["ITGA2B:p.L86P", "ITGA2B", 86, "L", "P", "propeller", 1, "B", "clinvar_plp", "VCV000953037", 1.36977e-06, 0.0], ["ITGA2B:p.E106K", "ITGA2B", 106, "E", "K", "propeller", 0, "C", "gnomad_hom", "VCV002731059", 3.53338e-05, 1.0], ["ITGA2B:p.D133E", "ITGA2B", 133, "D", "E", "propeller", 1, "B", "clinvar_plp", "VCV002506415", 6.88582e-07, 0.0], ["ITGA2B:p.A139V", "ITGA2B", 139, "A", "V", "propeller", 1, "B", "clinvar_plp", "VCV001210192", null, null], ["ITGA2B:p.W141C", "ITGA2B", 141, "W", "C", "propeller", 1, "B", "clinvar_plp", "VCV001691484", null, null], ["ITGA2B:p.L147V", "ITGA2B", 147, "L", "V", "propeller", 0, "B", "clinvar_blb+gnomad", "VCV000242484", 0.0114085, 144.0], ["ITGA2B:p.P157H", "ITGA2B", 157, "P", "H", "propeller", 1, "B", "clinvar_plp", "VCV002498354", null, null], ["ITGA2B:p.G159S", "ITGA2B", 159, "G", "S", "propeller", 1, "B", "clinvar_plp", "VCV001879033", 6.8432e-07, 0.0], ["ITGA2B:p.G159V", "ITGA2B", 159, "G", "V", "propeller", 1, "B", "clinvar_plp", "VCV000977126", null, null], ["ITGA2B:p.S160R", "ITGA2B", 160, "S", "R", "propeller", 1, "B", "clinvar_plp", "VCV000953024", 1.36871e-06, 0.0], ["ITGA2B:p.Y174H", "ITGA2B", 174, "Y", "H", "propeller", 1, "B", "clinvar_plp", "VCV002498367", 1.37033e-06, 0.0], ["ITGA2B:p.P176A", "ITGA2B", 176, "P", "A", "propeller", 1, "B", "clinvar_plp", "VCV000953000", 3.10351e-06, 0.0], ["ITGA2B:p.P176H", "ITGA2B", 176, "P", "H", "propeller", 1, "B", "clinvar_plp", "VCV000953014", 1.24155e-06, 0.0], ["ITGA2B:p.P176L", "ITGA2B", 176, "P", "L", "propeller", 1, "B", "clinvar_plp", "VCV000953018", null, null], ["ITGA2B:p.I185M", "ITGA2B", 185, "I", "M", "propeller", 1, "B", "clinvar_plp", "VCV000952995", 6.91572e-07, 0.0], ["ITGA2B:p.F191V", "ITGA2B", 191, "F", "V", "propeller", 1, "B", "clinvar_plp", "VCV000996171", null, null], ["ITGA2B:p.G201S", "ITGA2B", 201, "G", "S", "propeller", 1, "B", "clinvar_plp", "VCV000996156", null, null], ["ITGA2B:p.F202C", "ITGA2B", 202, "F", "C", "propeller", 1, "B", "clinvar_plp", "VCV003242393", null, null], ["ITGA2B:p.T207I", "ITGA2B", 207, "T", "I", "propeller", 1, "B", "clinvar_plp", "VCV001330317", 6.84444e-07, 0.0], ["ITGA2B:p.L214P", "ITGA2B", 214, "L", "P", "propeller", 1, "B", "clinvar_plp", "VCV000002901", 2.47842e-06, 0.0], ["ITGA2B:p.L214R", "ITGA2B", 214, "L", "R", "propeller", 1, "B", "clinvar_plp", "VCV001210203", 6.84122e-07, 0.0], ["ITGA2B:p.A216V", "ITGA2B", 216, "A", "V", "propeller", 1, "B", "clinvar_plp", "VCV001210176", 1.36825e-06, 0.0], ["ITGA2B:p.Y220C", "ITGA2B", 220, "Y", "C", "propeller", 1, "B", "clinvar_plp", "VCV001330345", 6.84127e-07, 0.0], ["ITGA2B:p.S257G", "ITGA2B", 257, "S", "G", "propeller", 0, "C", "gnomad_hom", "", 1.43653e-05, 1.0], ["ITGA2B:p.G267E", "ITGA2B", 267, "G", "E", "propeller", 1, "B", "clinvar_plp", "VCV000953015", null, null], ["ITGA2B:p.A271G", "ITGA2B", 271, "A", "G", "propeller", 1, "B", "clinvar_plp", "VCV001330344", null, null], ["ITGA2B:p.G273D", "ITGA2B", 273, "G", "D", "propeller", 1, "B", "clinvar_plp", "VCV000002894", null, null], ["ITGA2B:p.T281I", "ITGA2B", 281, "T", "I", "propeller", 1, "B", "clinvar_plp", "VCV001210182", null, null], ["ITGA2B:p.V286D", "ITGA2B", 286, "V", "D", "propeller", 1, "B", "clinvar_plp", "VCV001210210", null, null], ["ITGA2B:p.G296R", "ITGA2B", 296, "G", "R", "propeller", 1, "B", "clinvar_plp", "VCV000953040", 1.36872e-06, 0.0], ["ITGA2B:p.A297P", "ITGA2B", 297, "A", "P", "propeller", 1, "B", "clinvar_plp", "VCV000953005", 3.42198e-06, 0.0], ["ITGA2B:p.S318L", "ITGA2B", 318, "S", "L", "propeller", 1, "B", "clinvar_plp", "VCV001879018", null, null], ["ITGA2B:p.F320S", "ITGA2B", 320, "F", "S", "propeller", 1, "B", "clinvar_plp", "VCV002581082", 6.84076e-07, 0.0], ["ITGA2B:p.G321V", "ITGA2B", 321, "G", "V", "propeller", 1, "B", "clinvar_plp", "VCV000996169", null, null], ["ITGA2B:p.G321W", "ITGA2B", 321, "G", "W", "propeller", 1, "B", "clinvar_plp", "VCV000996170", null, null], ["ITGA2B:p.V329F", "ITGA2B", 329, "V", "F", "propeller", 1, "B", "clinvar_plp", "VCV001030781", null, null], ["ITGA2B:p.N330I", "ITGA2B", 330, "N", "I", "propeller", 1, "B", "clinvar_plp", "VCV003391413", null, null], ["ITGA2B:p.A341T", "ITGA2B", 341, "A", "T", "propeller", 1, "B", "clinvar_plp", "VCV000996200", 2.79585e-06, 0.0], ["ITGA2B:p.L343P", "ITGA2B", 343, "L", "P", "propeller", 1, "B", "clinvar_plp", "VCV000953042", null, null], ["ITGA2B:p.E355K", "ITGA2B", 355, "E", "K", "propeller", 1, "B", "clinvar_plp", "VCV000002899", 1.18591e-05, 0.0], ["ITGA2B:p.R358H", "ITGA2B", 358, "R", "H", "propeller", 1, "B", "clinvar_plp", "VCV000002896", 2.75544e-06, 0.0], ["ITGA2B:p.D396N", "ITGA2B", 396, "D", "N", "propeller", 1, "B", "clinvar_plp", "VCV000627218", 6.17272e-06, 0.0], ["ITGA2B:p.R399Q", "ITGA2B", 399, "R", "Q", "propeller", 0, "C", "gnomad_hom", "VCV002416626", 0.000131732, 1.0], ["ITGA2B:p.G401C", "ITGA2B", 401, "G", "C", "propeller", 1, "B", "clinvar_plp", "VCV000996180", null, null], ["ITGA2B:p.I405T", "ITGA2B", 405, "I", "T", "propeller", 1, "B", "clinvar_plp", "VCV000953004", 2.05339e-06, 0.0], ["ITGA2B:p.G412R", "ITGA2B", 412, "G", "R", "propeller", 1, "B", "clinvar_plp", "VCV000381748", 8.05816e-06, 0.0], ["ITGA2B:p.V420A", "ITGA2B", 420, "V", "A", "propeller", 1, "B", "clinvar_plp", "VCV001691466", null, null], ["ITGA2B:p.R433C", "ITGA2B", 433, "R", "C", "propeller", 0, "C", "gnomad_hom", "VCV002601475", 6.25839e-05, 1.0], ["ITGA2B:p.G449D", "ITGA2B", 449, "G", "D", "propeller", 1, "B", "clinvar_plp", "VCV000691627", null, null], ["ITGA2B:p.L452R", "ITGA2B", 452, "L", "R", "propeller", 1, "B", "clinvar_plp", "VCV003391412", 1.36809e-06, 0.0], ["ITGA2B:p.G454D", "ITGA2B", 454, "G", "D", "propeller", 1, "B", "clinvar_plp", "VCV000977127", 6.56918e-06, 0.0], ["ITGA2B:p.V456I", "ITGA2B", 456, "V", "I", "propeller", 0, "C", "gnomad_hom", "VCV000888905", 4.33645e-05, 1.0], ["ITGA2B:p.I458M", "ITGA2B", 458, "I", "M", "propeller", 0, "B", "clinvar_blb+gnomad", "VCV001684814", 0.00020815, 3.0], ["ITGA2B:p.A477P", "ITGA2B", 477, "A", "P", "propeller", 1, "B", "clinvar_plp", "VCV002506407", null, null], ["ITGA2B:p.I518N", "ITGA2B", 518, "I", "N", "thigh", 1, "B", "clinvar_plp", "VCV002498358", 3.09782e-06, 0.0], ["ITGA2B:p.R543W", "ITGA2B", 543, "R", "W", "thigh", 0, "B", "clinvar_blb+gnomad", "VCV000323553", 0.000635772, 6.0], ["ITGA2B:p.R551Q", "ITGA2B", 551, "R", "Q", "thigh", 1, "B", "clinvar_plp", "VCV000996210", 7.43549e-06, 0.0], ["ITGA2B:p.R551W", "ITGA2B", 551, "R", "W", "thigh", 1, "B", "clinvar_plp", "VCV000953046", 8.67511e-06, 0.0], ["ITGA2B:p.D591A", "ITGA2B", 591, "D", "A", "thigh", 1, "B", "clinvar_plp", "VCV000627020", 4.33767e-06, 0.0], ["ITGA2B:p.I596T", "ITGA2B", 596, "I", "T", "thigh", 1, "B", "clinvar_plp", "VCV000002900", 6.44523e-05, 0.0], ["ITGA2B:p.P605L", "ITGA2B", 605, "P", "L", "thigh", 0, "C", "gnomad_hom", "VCV003356403", 1.67294e-05, 1.0], ["ITGA2B:p.V616M", "ITGA2B", 616, "V", "M", "thigh", 0, "B", "clinvar_blb+gnomad", "VCV000891088", 0.000591715, 10.0], ["ITGA2B:p.Q626H", "ITGA2B", 626, "Q", "H", "thigh", 1, "B", "clinvar_plp", "VCV000002903", 2.05249e-06, 0.0], ["ITGA2B:p.V638I", "ITGA2B", 638, "V", "I", "calf", 0, "C", "gnomad_hom", "VCV002883907", 1.73015e-05, 1.0], ["ITGA2B:p.V649L", "ITGA2B", 649, "V", "L", "calf", 0, "B", "clinvar_blb+gnomad", "VCV000323549", 0.000839495, 10.0], ["ITGA2B:p.A668T", "ITGA2B", 668, "A", "T", "calf", 0, "C", "gnomad_hom", "VCV002046855", 0.000242319, 1.0], ["ITGA2B:p.E677K", "ITGA2B", 677, "E", "K", "calf", 1, "B", "clinvar_plp", "VCV001210172", 1.36879e-06, 0.0], ["ITGA2B:p.A688V", "ITGA2B", 688, "A", "V", "calf", 1, "B", "clinvar_plp", "VCV001210185", 2.05365e-06, 0.0], ["ITGA2B:p.C705R", "ITGA2B", 705, "C", "R", "calf", 1, "B", "clinvar_plp", "VCV000953058", 3.09912e-06, 0.0], ["ITGA2B:p.L717P", "ITGA2B", 717, "L", "P", "calf", 1, "B", "clinvar_plp", "VCV001691477", null, null], ["ITGA2B:p.M724I", "ITGA2B", 724, "M", "I", "calf", 1, "B", "clinvar_plp", "VCV001330343", null, null], ["ITGA2B:p.L752R", "ITGA2B", 752, "L", "R", "calf", 1, "B", "clinvar_plp", "VCV001879049", null, null], ["ITGA2B:p.Q778P", "ITGA2B", 778, "Q", "P", "calf", 1, "B", "clinvar_plp", "VCV000225393", 9.5767e-06, 0.0], ["ITGA2B:p.A788D", "ITGA2B", 788, "A", "D", "calf", 0, "C", "gnomad_hom", "VCV000323546", 0.000573674, 1.0], ["ITGA2B:p.H813N", "ITGA2B", 813, "H", "N", "calf", 1, "B", "clinvar_plp", "VCV001691458", null, null], ["ITGA2B:p.Y815C", "ITGA2B", 815, "Y", "C", "calf", 1, "B", "clinvar_plp", "VCV000977129", 1.3681e-06, 0.0], ["ITGA2B:p.G823E", "ITGA2B", 823, "G", "E", "calf", 1, "B", "clinvar_plp", "VCV000996181", null, null], ["ITGA2B:p.Q837H", "ITGA2B", 837, "Q", "H", "calf", 0, "B", "clinvar_blb+gnomad", "VCV000323545", 0.000950553, 22.0], ["ITGA2B:p.V868M", "ITGA2B", 868, "V", "M", "calf", 0, "C", "gnomad_af", "VCV000695309", 0.00325755, 9.0], ["ITGA2B:p.L872M", "ITGA2B", 872, "L", "M", "calf", 0, "B", "clinvar_blb+gnomad", "VCV000323544", 0.00121076, 22.0], ["ITGA2B:p.I874S", "ITGA2B", 874, "I", "S", "calf", 0, "B", "clinvar_blb+gnomad", "VCV000002891", 0.379701, 114929.0], ["ITGA2B:p.R902K", "ITGA2B", 902, "R", "K", "calf", 0, "C", "gnomad_hom", "VCV001302939", 1.36823e-05, 1.0], ["ITGA2B:p.V934F", "ITGA2B", 934, "V", "F", "calf", 1, "B", "clinvar_plp", "VCV000996165", 0.0, 0.0], ["ITGA2B:p.P943L", "ITGA2B", 943, "P", "L", "calf", 1, "B", "clinvar_plp", "VCV003242397", 0.0, 0.0], ["ITGA2B:p.L955Q", "ITGA2B", 955, "L", "Q", "calf", 1, "B", "clinvar_plp", "VCV000952997", null, null], ["ITGA2B:p.V970A", "ITGA2B", 970, "V", "A", "calf", 0, "C", "gnomad_hom", "", 1.36324e-05, 1.0], ["ITGA2B:p.V982M", "ITGA2B", 982, "V", "M", "calf", 1, "B", "clinvar_plp", "VCV000381747", 3.71817e-06, 0.0], ["ITGA2B:p.T984K", "ITGA2B", 984, "T", "K", "calf", 1, "B", "clinvar_plp", "VCV000952998", null, null], ["ITGA2B:p.A989T", "ITGA2B", 989, "A", "T", "calf", 0, "B", "clinvar_blb+gnomad", "VCV000417951", 0.000478893, 4.0], ["ITGB3:p.C39G", "ITGB3", 39, "C", "G", "PSI", 1, "B", "clinvar_plp", "VCV000953043", null, null], ["ITGB3:p.L59P", "ITGB3", 59, "L", "P", "PSI", 0, "B", "clinvar_blb+gnomad", "VCV000013558", 0.139722, 16971.0], ["ITGB3:p.L59V", "ITGB3", 59, "L", "V", "PSI", 0, "B", "clinvar_blb", "VCV000953062", 2.47815e-06, 0.0], ["ITGB3:p.R63C", "ITGB3", 63, "R", "C", "PSI", 1, "B", "clinvar_plp", "VCV000631774", 2.84986e-05, 0.0], ["ITGB3:p.L66R", "ITGB3", 66, "L", "R", "PSI", 0, "B", "clinvar_blb+gnomad", "VCV000695335", 0.0023615, 9.0], ["ITGB3:p.L118H", "ITGB3", 118, "L", "H", "hybrid", 1, "B", "clinvar_plp", "VCV000996166", 3.71751e-06, 0.0], ["ITGB3:p.R131P", "ITGB3", 131, "R", "P", "hybrid", 1, "B", "clinvar_plp", "VCV001210198", 7.43498e-06, 0.0], ["ITGB3:p.D139H", "ITGB3", 139, "D", "H", "betaI", 1, "B", "clinvar_plp", "VCV001691483", null, null], ["ITGB3:p.Y141C", "ITGB3", 141, "Y", "C", "betaI", 1, "B", "clinvar_plp", "VCV001691482", 3.71736e-06, 0.0], ["ITGB3:p.L143S", "ITGB3", 143, "L", "S", "betaI", 1, "B", "clinvar_plp", "VCV003242394", null, null], ["ITGB3:p.L143W", "ITGB3", 143, "L", "W", "betaI", 1, "B", "clinvar_plp", "VCV000013567", 6.84053e-06, 0.0], ["ITGB3:p.M144R", "ITGB3", 144, "M", "R", "betaI", 1, "B", "clinvar_plp", "VCV000996188", 1.23912e-06, 0.0], ["ITGB3:p.D145N", "ITGB3", 145, "D", "N", "betaI", 1, "B", "clinvar_plp", "VCV000627066", null, null], ["ITGB3:p.D145Y", "ITGB3", 145, "D", "Y", "betaI", 1, "B", "clinvar_plp", "VCV000013554", null, null], ["ITGB3:p.M150I", "ITGB3", 150, "M", "I", "betaI", 1, "B", "clinvar_plp", "VCV004088267", 6.84046e-07, 0.0], ["ITGB3:p.M150V", "ITGB3", 150, "M", "V", "betaI", 1, "B", "clinvar_plp", "VCV000953053", 6.84045e-07, 0.0], ["ITGB3:p.R169Q", "ITGB3", 169, "R", "Q", "betaI", 0, "B", "clinvar_blb+gnomad", "VCV000013557", 0.000705648, 8.0], ["ITGB3:p.P186L", "ITGB3", 186, "P", "L", "betaI", 0, "B", "clinvar_blb+gnomad", "VCV000696041", 0.000359943, 4.0], ["ITGB3:p.S188L", "ITGB3", 188, "S", "L", "betaI", 1, "B", "clinvar_plp", "VCV003242406", 1.3681e-06, 0.0], ["ITGB3:p.P189S", "ITGB3", 189, "P", "S", "betaI", 1, "B", "clinvar_plp", "VCV000812736", 3.28372e-05, 0.0], ["ITGB3:p.C210S", "ITGB3", 210, "C", "S", "betaI", 1, "B", "clinvar_plp", "VCV000953047", null, null], ["ITGB3:p.Y216C", "ITGB3", 216, "Y", "C", "betaI", 1, "B", "clinvar_plp", "VCV000996202", null, null], ["ITGB3:p.Y216H", "ITGB3", 216, "Y", "H", "betaI", 1, "B", "clinvar_plp", "VCV002506412", null, null], ["ITGB3:p.V219M", "ITGB3", 219, "V", "M", "betaI", 1, "B", "clinvar_plp", "VCV002498348", 4.10431e-06, 0.0], ["ITGB3:p.L222P", "ITGB3", 222, "L", "P", "betaI", 1, "B", "clinvar_plp", "VCV000996163", 1.85866e-06, 0.0], ["ITGB3:p.R240Q", "ITGB3", 240, "R", "Q", "betaI", 1, "B", "clinvar_plp", "VCV000013553", 1.23912e-06, 0.0], ["ITGB3:p.R240W", "ITGB3", 240, "R", "W", "betaI", 1, "B", "clinvar_plp", "VCV000013555", 2.47825e-06, 0.0], ["ITGB3:p.R242Q", "ITGB3", 242, "R", "Q", "betaI", 1, "B", "clinvar_plp", "VCV001879043", 3.71726e-06, 0.0], ["ITGB3:p.D243H", "ITGB3", 243, "D", "H", "betaI", 1, "B", "clinvar_plp", "VCV000800945", 6.8405e-07, 0.0], ["ITGB3:p.D243V", "ITGB3", 243, "D", "V", "betaI", 1, "B", "clinvar_plp", "VCV001210177", null, null], ["ITGB3:p.D250G", "ITGB3", 250, "D", "G", "betaI", 1, "B", "clinvar_plp", "VCV000374016", null, null], ["ITGB3:p.I252V", "ITGB3", 252, "I", "V", "betaI", 0, "C", "gnomad_hom", "VCV000695644", 0.000852433, 3.0], ["ITGB3:p.Q254K", "ITGB3", 254, "Q", "K", "betaI", 1, "B", "clinvar_plp", "VCV000996175", null, null], ["ITGB3:p.Q254R", "ITGB3", 254, "Q", "R", "betaI", 1, "B", "clinvar_plp", "VCV000627131", null, null], ["ITGB3:p.H281P", "ITGB3", 281, "H", "P", "betaI", 1, "B", "clinvar_plp", "VCV001330335", null, null], ["ITGB3:p.G286R", "ITGB3", 286, "G", "R", "betaI", 1, "B", "clinvar_plp", "VCV001330339", 5.47298e-06, 0.0], ["ITGB3:p.L288P", "ITGB3", 288, "L", "P", "betaI", 1, "B", "clinvar_plp", "VCV001879009", 6.84126e-07, 0.0], ["ITGB3:p.H306P", "ITGB3", 306, "H", "P", "betaI", 1, "B", "clinvar_plp", "VCV001330311", 9.91452e-06, 0.0], ["ITGB3:p.D314A", "ITGB3", 314, "D", "A", "betaI", 1, "B", "clinvar_plp", "VCV000996159", 1.37288e-06, 0.0], ["ITGB3:p.D314Y", "ITGB3", 314, "D", "Y", "betaI", 1, "B", "clinvar_plp", "VCV000996176", null, null], ["ITGB3:p.K324E", "ITGB3", 324, "K", "E", "betaI", 0, "B", "clinvar_blb", "VCV000695750", 0.000174119, 0.0], ["ITGB3:p.N329D", "ITGB3", 329, "N", "D", "betaI", 0, "C", "gnomad_hom", "VCV000323865", 9.97511e-05, 1.0], ["ITGB3:p.I330N", "ITGB3", 330, "I", "N", "betaI", 1, "B", "clinvar_plp", "VCV001691459", null, null], ["ITGB3:p.Y344C", "ITGB3", 344, "Y", "C", "betaI", 1, "B", "clinvar_plp", "VCV001210199", null, null], ["ITGB3:p.Y344S", "ITGB3", 344, "Y", "S", "betaI", 1, "B", "clinvar_plp", "VCV001210200", 2.73906e-06, 0.0], ["ITGB3:p.N365S", "ITGB3", 365, "N", "S", "betaI", 1, "B", "clinvar_plp", "VCV001210186", 1.36818e-06, 0.0], ["ITGB3:p.C400Y", "ITGB3", 400, "C", "Y", "hybrid", 1, "B", "clinvar_plp", "VCV000013562", null, null], ["ITGB3:p.S411F", "ITGB3", 411, "S", "F", "hybrid", 0, "B", "clinvar_blb", "VCV000890711", 3.65543e-05, 0.0], ["ITGB3:p.V453I", "ITGB3", 453, "V", "I", "hybrid", 0, "C", "gnomad_hom", "VCV001996698", 9.23078e-05, 4.0], ["ITGB3:p.C463S", "ITGB3", 463, "C", "S", "EGF", 1, "B", "clinvar_plp", "VCV001691487", 1.36809e-06, 0.0], ["ITGB3:p.C483Y", "ITGB3", 483, "C", "Y", "EGF", 1, "B", "clinvar_plp", "VCV003242401", null, null], ["ITGB3:p.C486W", "ITGB3", 486, "C", "W", "EGF", 1, "B", "clinvar_plp", "VCV000953012", null, null], ["ITGB3:p.C499R", "ITGB3", 499, "C", "R", "EGF", 1, "B", "clinvar_plp", "VCV001330310", 6.84053e-07, 0.0], ["ITGB3:p.R515Q", "ITGB3", 515, "R", "Q", "EGF", 0, "B", "clinvar_blb+gnomad", "VCV000013561", 0.00114051, 9.0], ["ITGB3:p.R524Q", "ITGB3", 524, "R", "Q", "EGF", 0, "C", "gnomad_hom", "VCV003530574", 4.41199e-05, 1.0], ["ITGB3:p.R524W", "ITGB3", 524, "R", "W", "EGF", 0, "C", "gnomad_hom", "VCV001336647", 0.00010319, 1.0], ["ITGB3:p.C532F", "ITGB3", 532, "C", "F", "EGF", 1, "B", "clinvar_plp", "VCV001879032", null, null], ["ITGB3:p.C532R", "ITGB3", 532, "C", "R", "EGF", 1, "B", "clinvar_plp", "VCV000953010", 6.56987e-06, 0.0], ["ITGB3:p.C532Y", "ITGB3", 532, "C", "Y", "EGF", 1, "B", "clinvar_plp", "VCV000953007", null, null], ["ITGB3:p.C547G", "ITGB3", 547, "C", "G", "EGF", 1, "B", "clinvar_plp", "VCV001879045", 1.24534e-05, 0.0], ["ITGB3:p.C547W", "ITGB3", 547, "C", "W", "EGF", 1, "B", "clinvar_plp", "VCV001691476", 0.0, 0.0], ["ITGB3:p.C549S", "ITGB3", 549, "C", "S", "EGF", 1, "B", "clinvar_plp", "VCV000996174", 2.0656e-06, 0.0], ["ITGB3:p.G566D", "ITGB3", 566, "G", "D", "EGF", 1, "B", "clinvar_plp", "VCV000977132", 6.84209e-07, 0.0], ["ITGB3:p.C568R", "ITGB3", 568, "C", "R", "EGF", 1, "B", "clinvar_plp", "VCV000953008", null, null], ["ITGB3:p.C575R", "ITGB3", 575, "C", "R", "EGF", 1, "B", "clinvar_plp", "VCV002506153", null, null], ["ITGB3:p.C586R", "ITGB3", 586, "C", "R", "EGF", 1, "B", "clinvar_plp", "VCV002736610", null, null], ["ITGB3:p.C601G", "ITGB3", 601, "C", "G", "EGF", 1, "B", "clinvar_plp", "VCV000996182", null, null], ["ITGB3:p.C601R", "ITGB3", 601, "C", "R", "EGF", 1, "B", "clinvar_plp", "VCV001210194", 4.10434e-06, 0.0], ["ITGB3:p.G605D", "ITGB3", 605, "G", "D", "EGF", 1, "B", "clinvar_plp", "VCV001691461", null, null], ["ITGB3:p.G605S", "ITGB3", 605, "G", "S", "EGF", 1, "B", "clinvar_plp", "VCV001879042", 1.17709e-05, 0.0], ["ITGB3:p.C624Y", "ITGB3", 624, "C", "Y", "EGF", 1, "B", "clinvar_plp", "VCV000996162", 1.23906e-06, 0.0], ["ITGB3:p.E654K", "ITGB3", 654, "E", "K", "tail", 0, "B", "clinvar_blb+gnomad", "VCV000225395", 0.000179048, 1.0], ["ITGB3:p.V691I", "ITGB3", 691, "V", "I", "tail", 0, "C", "gnomad_hom", "VCV004088470", 2.60222e-05, 1.0], ["ITGB3:p.P711S", "ITGB3", 711, "P", "S", "tail", 0, "C", "gnomad_af", "VCV000323872", 0.00100859, 2.0], ["ITGB3:p.G716V", "ITGB3", 716, "G", "V", "tail", 1, "B", "clinvar_plp", "VCV001330333", null, null]] }
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* biofs protein-impact: constants shared by the client (submit) and the executor (exec).
|
|
3
|
+
*
|
|
4
|
+
* Research-grade, NOT clinical. Only public reference data (UniProt, RCSB) is fetched here; the
|
|
5
|
+
* proband's data enters only as (gene, ref, pos, alt) tuples from `biofs variants`. There is no
|
|
6
|
+
* free-text sequence input anywhere in this verb (see guard.ts).
|
|
7
|
+
*/
|
|
8
|
+
export declare const SCHEMA_REQUEST = "genobank.protein-impact.request/v1";
|
|
9
|
+
export declare const SCHEMA_MANIFEST = "genobank.protein-impact.manifest/v1";
|
|
10
|
+
export declare const SCHEMA_GATE = "genobank.protein-impact.gate/v1";
|
|
11
|
+
export declare const SCHEMA_GATE_RULES = "genobank.protein-impact.gate-rules/v1";
|
|
12
|
+
export declare const INPUT_TYPE_CPU = "protein-impact";
|
|
13
|
+
export declare const INPUT_TYPE_GPU = "protein-impact-gpu";
|
|
14
|
+
export interface GeneSpec {
|
|
15
|
+
gene: string;
|
|
16
|
+
uniprot: string;
|
|
17
|
+
length: number;
|
|
18
|
+
signal: number;
|
|
19
|
+
seq_sha256: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Genes this verb accepts. Verified against UniProt release 2026_03 on 2026-10-21:
|
|
23
|
+
* P08514 ITGA2B length 1039, signal 1..31; P05106 ITGB3 length 788, signal 1..26.
|
|
24
|
+
* `fetch` refuses to continue if UniProt serves a sequence whose sha256 differs from the pin.
|
|
25
|
+
* Adding a gene is a code change on purpose (nothing arbitrary can be scored).
|
|
26
|
+
*/
|
|
27
|
+
export declare const GENES: Record<string, GeneSpec>;
|
|
28
|
+
/** `gate:sha256:<64 hex>`: the content hash of a gate document that travels with the apply job. */
|
|
29
|
+
export declare const GATE_ID_RE: RegExp;
|
|
30
|
+
/** Source biocids the variants were read from; consent is verified against these by biofs-node. */
|
|
31
|
+
export declare const BIOCID_RE: RegExp;
|
|
32
|
+
export declare const MAX_SOURCES = 4;
|
|
33
|
+
export declare const RESEARCH_BANNER = "Research-grade analysis of missense substitutions. Not a clinical test, not a diagnosis, not medical advice.";
|
|
34
|
+
/** Process exit codes of `exec`; biofs-node records any non-zero exit as a failed job. */
|
|
35
|
+
export declare const EXIT: {
|
|
36
|
+
readonly OK: 0;
|
|
37
|
+
readonly FAILED: 1;
|
|
38
|
+
readonly GUARD: 2;
|
|
39
|
+
readonly EMPTY: 7;
|
|
40
|
+
readonly GATE_BLOCKED: 8;
|
|
41
|
+
readonly APPROVAL: 9;
|
|
42
|
+
};
|
|
43
|
+
export declare const STANDARD_AA = "ACDEFGHIKLMNPQRSTVWY";
|
|
44
|
+
export declare const AA3_TO_1: Record<string, string>;
|
|
45
|
+
export declare const AA1_TO_3: Record<string, string>;
|
|
46
|
+
/** Layers a request may ask for. `features` and `fetch` are CPU-only and need no images. */
|
|
47
|
+
export declare const LAYERS: readonly ["fetch", "features", "plm", "structure", "complex", "probe", "md"];
|
|
48
|
+
export type Layer = (typeof LAYERS)[number];
|
|
49
|
+
export declare const GPU_LAYERS: ReadonlyArray<Layer>;
|
|
50
|
+
export declare const MODES: readonly ["fetch", "validate", "apply", "probe"];
|
|
51
|
+
export type Mode = (typeof MODES)[number];
|
|
52
|
+
export declare const MAX_SUBS_PER_REQUEST = 20;
|
|
53
|
+
export declare const MAX_GENES_PER_REQUEST = 2;
|
|
54
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/commands/protein-impact/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,eAAO,MAAM,eAAe,wCAAwC,CAAC;AACrE,eAAO,MAAM,WAAW,oCAAoC,CAAC;AAC7D,eAAO,MAAM,iBAAiB,0CAA0C,CAAC;AAEzE,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAG1C,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,UAAU,QAA+B,CAAC;AACvD,mGAAmG;AACnG,eAAO,MAAM,SAAS,QAA0C,CAAC;AACjE,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,eAAe,iHAAiH,CAAC;AAE9I,0FAA0F;AAC1F,eAAO,MAAM,IAAI;;;;;;;CAAkF,CAAC;AAEpG,eAAO,MAAM,WAAW,yBAAyB,CAAC;AAElD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG3C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAE3C,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,MAAM,8EAA+E,CAAC;AACnG,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5C,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,KAAK,CAA8B,CAAC;AAE3E,eAAO,MAAM,KAAK,kDAAmD,CAAC;AACtE,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,qBAAqB,IAAI,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* biofs protein-impact: constants shared by the client (submit) and the executor (exec).
|
|
4
|
+
*
|
|
5
|
+
* Research-grade, NOT clinical. Only public reference data (UniProt, RCSB) is fetched here; the
|
|
6
|
+
* proband's data enters only as (gene, ref, pos, alt) tuples from `biofs variants`. There is no
|
|
7
|
+
* free-text sequence input anywhere in this verb (see guard.ts).
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.MAX_GENES_PER_REQUEST = exports.MAX_SUBS_PER_REQUEST = exports.MODES = exports.GPU_LAYERS = exports.LAYERS = exports.AA1_TO_3 = exports.AA3_TO_1 = exports.STANDARD_AA = exports.EXIT = exports.RESEARCH_BANNER = exports.MAX_SOURCES = exports.BIOCID_RE = exports.GATE_ID_RE = exports.GENES = exports.INPUT_TYPE_GPU = exports.INPUT_TYPE_CPU = exports.SCHEMA_GATE_RULES = exports.SCHEMA_GATE = exports.SCHEMA_MANIFEST = exports.SCHEMA_REQUEST = void 0;
|
|
11
|
+
exports.SCHEMA_REQUEST = 'genobank.protein-impact.request/v1';
|
|
12
|
+
exports.SCHEMA_MANIFEST = 'genobank.protein-impact.manifest/v1';
|
|
13
|
+
exports.SCHEMA_GATE = 'genobank.protein-impact.gate/v1';
|
|
14
|
+
exports.SCHEMA_GATE_RULES = 'genobank.protein-impact.gate-rules/v1';
|
|
15
|
+
exports.INPUT_TYPE_CPU = 'protein-impact';
|
|
16
|
+
exports.INPUT_TYPE_GPU = 'protein-impact-gpu';
|
|
17
|
+
/**
|
|
18
|
+
* Genes this verb accepts. Verified against UniProt release 2026_03 on 2026-10-21:
|
|
19
|
+
* P08514 ITGA2B length 1039, signal 1..31; P05106 ITGB3 length 788, signal 1..26.
|
|
20
|
+
* `fetch` refuses to continue if UniProt serves a sequence whose sha256 differs from the pin.
|
|
21
|
+
* Adding a gene is a code change on purpose (nothing arbitrary can be scored).
|
|
22
|
+
*/
|
|
23
|
+
exports.GENES = {
|
|
24
|
+
ITGA2B: { gene: 'ITGA2B', uniprot: 'P08514', length: 1039, signal: 31, seq_sha256: 'e85172b63418bae377c4c00c4dae573e7019ae1ee9f96a133c2be00977e1a9bb' },
|
|
25
|
+
ITGB3: { gene: 'ITGB3', uniprot: 'P05106', length: 788, signal: 26, seq_sha256: 'dd1f27b57d8ba531160f0b9e03b9ae50533fbe1b3205765e545b0daa3c82bb52' },
|
|
26
|
+
};
|
|
27
|
+
/** `gate:sha256:<64 hex>`: the content hash of a gate document that travels with the apply job. */
|
|
28
|
+
exports.GATE_ID_RE = /^gate:sha256:[a-f0-9]{64}$/;
|
|
29
|
+
/** Source biocids the variants were read from; consent is verified against these by biofs-node. */
|
|
30
|
+
exports.BIOCID_RE = /^biocid:\/\/[A-Za-z0-9._:\/-]{3,300}$/;
|
|
31
|
+
exports.MAX_SOURCES = 4;
|
|
32
|
+
exports.RESEARCH_BANNER = 'Research-grade analysis of missense substitutions. Not a clinical test, not a diagnosis, not medical advice.';
|
|
33
|
+
/** Process exit codes of `exec`; biofs-node records any non-zero exit as a failed job. */
|
|
34
|
+
exports.EXIT = { OK: 0, FAILED: 1, GUARD: 2, EMPTY: 7, GATE_BLOCKED: 8, APPROVAL: 9 };
|
|
35
|
+
exports.STANDARD_AA = 'ACDEFGHIKLMNPQRSTVWY';
|
|
36
|
+
exports.AA3_TO_1 = {
|
|
37
|
+
Ala: 'A', Arg: 'R', Asn: 'N', Asp: 'D', Cys: 'C', Gln: 'Q', Glu: 'E', Gly: 'G', His: 'H', Ile: 'I',
|
|
38
|
+
Leu: 'L', Lys: 'K', Met: 'M', Phe: 'F', Pro: 'P', Ser: 'S', Thr: 'T', Trp: 'W', Tyr: 'Y', Val: 'V',
|
|
39
|
+
};
|
|
40
|
+
exports.AA1_TO_3 = Object.fromEntries(Object.entries(exports.AA3_TO_1).map(([three, one]) => [one, three]));
|
|
41
|
+
/** Layers a request may ask for. `features` and `fetch` are CPU-only and need no images. */
|
|
42
|
+
exports.LAYERS = ['fetch', 'features', 'plm', 'structure', 'complex', 'probe', 'md'];
|
|
43
|
+
exports.GPU_LAYERS = ['complex', 'probe', 'md'];
|
|
44
|
+
exports.MODES = ['fetch', 'validate', 'apply', 'probe'];
|
|
45
|
+
exports.MAX_SUBS_PER_REQUEST = 20;
|
|
46
|
+
exports.MAX_GENES_PER_REQUEST = 2;
|
|
47
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/commands/protein-impact/constants.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEU,QAAA,cAAc,GAAG,oCAAoC,CAAC;AACtD,QAAA,eAAe,GAAG,qCAAqC,CAAC;AACxD,QAAA,WAAW,GAAG,iCAAiC,CAAC;AAChD,QAAA,iBAAiB,GAAG,uCAAuC,CAAC;AAE5D,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAClC,QAAA,cAAc,GAAG,oBAAoB,CAAC;AAUnD;;;;;GAKG;AACU,QAAA,KAAK,GAA6B;IAC7C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,kEAAkE,EAAE;IACvJ,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,kEAAkE,EAAE;CACrJ,CAAC;AAEF,mGAAmG;AACtF,QAAA,UAAU,GAAG,4BAA4B,CAAC;AACvD,mGAAmG;AACtF,QAAA,SAAS,GAAG,uCAAuC,CAAC;AACpD,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,eAAe,GAAG,8GAA8G,CAAC;AAE9I,0FAA0F;AAC7E,QAAA,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAW,CAAC;AAEvF,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAErC,QAAA,QAAQ,GAA2B;IAC9C,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAClG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACnG,CAAC;AAEW,QAAA,QAAQ,GAA2B,MAAM,CAAC,WAAW,CAChE,MAAM,CAAC,OAAO,CAAC,gBAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAC7D,CAAC;AAEF,4FAA4F;AAC/E,QAAA,MAAM,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAU,CAAC;AAEtF,QAAA,UAAU,GAAyB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAE9D,QAAA,KAAK,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAGzD,QAAA,oBAAoB,GAAG,EAAE,CAAC;AAC1B,QAAA,qBAAqB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrator of a protein-impact job. Pure of process and cloud calls: storage, network and the
|
|
3
|
+
* heavy stages are injected, so the control flow (guard, approval, gate, caching, manifest) is unit tested
|
|
4
|
+
* without GCP. `exec.ts` wires the production dependencies.
|
|
5
|
+
*
|
|
6
|
+
* Order of refusal, each before any stage runs:
|
|
7
|
+
* 1. the request passes the no-design guard and its job id matches its content;
|
|
8
|
+
* 2. GPU layers carry an approval that matches a fresh estimate;
|
|
9
|
+
* 3. apply carries a gate document that matches the request's gate id, passes the committed rules,
|
|
10
|
+
* was computed with this tools lock, is signed off, and does not contain the variants being scored.
|
|
11
|
+
*/
|
|
12
|
+
import { Layer } from './constants';
|
|
13
|
+
import { ProteinImpactRequest } from './guard';
|
|
14
|
+
import { GateDocument, GateRules } from './gate';
|
|
15
|
+
import { Estimate } from './estimate';
|
|
16
|
+
import { ToolsLock } from './tools_lock';
|
|
17
|
+
/** Bump a layer's version when its logic changes, so cached stage outputs are not reused. */
|
|
18
|
+
export declare const STAGE_VERSION: Record<Layer, number>;
|
|
19
|
+
export interface Storage {
|
|
20
|
+
/** The text at a gs:// uri, or null when it does not exist. */
|
|
21
|
+
readText(uri: string): string | null;
|
|
22
|
+
writeText(uri: string, text: string): void;
|
|
23
|
+
/** Copy a local file up to a gs:// uri. */
|
|
24
|
+
copyIn(localPath: string, uri: string): void;
|
|
25
|
+
}
|
|
26
|
+
export interface Fetcher {
|
|
27
|
+
get(url: string): Promise<Buffer>;
|
|
28
|
+
}
|
|
29
|
+
export interface SeqInfo {
|
|
30
|
+
uniprot: string;
|
|
31
|
+
sequence: string;
|
|
32
|
+
seq_sha256: string;
|
|
33
|
+
uri: string;
|
|
34
|
+
}
|
|
35
|
+
export interface SubInfo {
|
|
36
|
+
variant: string;
|
|
37
|
+
gene: string;
|
|
38
|
+
pos: number;
|
|
39
|
+
mature_pos: number;
|
|
40
|
+
ref: string;
|
|
41
|
+
alt: string;
|
|
42
|
+
}
|
|
43
|
+
export interface StageInput {
|
|
44
|
+
layer: Layer;
|
|
45
|
+
request: ProteinImpactRequest;
|
|
46
|
+
subs: SubInfo[];
|
|
47
|
+
sequences: Record<string, SeqInfo>;
|
|
48
|
+
workDir: string;
|
|
49
|
+
/** Outputs of earlier stages of this job, by layer. */
|
|
50
|
+
prior: Record<string, StageOutput>;
|
|
51
|
+
tools_lock_sha256: string;
|
|
52
|
+
/** Wall-clock limit for this stage in milliseconds (GPU stages: what is left of 1.5 x the approved total). */
|
|
53
|
+
timeout_ms?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface StageOutput {
|
|
56
|
+
/** One record per variant; the orchestrator files each under results[variant].layers[layer]. */
|
|
57
|
+
records?: Array<Record<string, unknown> & {
|
|
58
|
+
variant: string;
|
|
59
|
+
}>;
|
|
60
|
+
outputs?: Array<{
|
|
61
|
+
uri: string;
|
|
62
|
+
sha256?: string;
|
|
63
|
+
}>;
|
|
64
|
+
summary?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
export interface StageRunner {
|
|
67
|
+
run(input: StageInput): Promise<StageOutput>;
|
|
68
|
+
}
|
|
69
|
+
export interface ExecDeps {
|
|
70
|
+
storage: Storage;
|
|
71
|
+
fetcher: Fetcher;
|
|
72
|
+
runner: StageRunner;
|
|
73
|
+
now?: () => Date;
|
|
74
|
+
log?: (m: string) => void;
|
|
75
|
+
lock?: ToolsLock;
|
|
76
|
+
rules?: GateRules;
|
|
77
|
+
}
|
|
78
|
+
export interface ExecArgs {
|
|
79
|
+
jobId: string;
|
|
80
|
+
creator: string;
|
|
81
|
+
outBucket: string;
|
|
82
|
+
refBucket: string;
|
|
83
|
+
request: unknown;
|
|
84
|
+
gate?: unknown;
|
|
85
|
+
workDir: string;
|
|
86
|
+
}
|
|
87
|
+
export type JobStatus = 'OK' | 'EMPTY' | 'GATE_BLOCKED' | 'FAILED';
|
|
88
|
+
export interface StageRecord {
|
|
89
|
+
layer: Layer;
|
|
90
|
+
status: 'done' | 'cached' | 'failed';
|
|
91
|
+
stage_hash: string;
|
|
92
|
+
started_at: string;
|
|
93
|
+
finished_at: string;
|
|
94
|
+
out_uri?: string;
|
|
95
|
+
out_sha256?: string;
|
|
96
|
+
error?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface Manifest {
|
|
99
|
+
schema: string;
|
|
100
|
+
pipeline: 'protein-impact';
|
|
101
|
+
research_banner: string;
|
|
102
|
+
jobId: string;
|
|
103
|
+
mode: string;
|
|
104
|
+
biosampleId: string | null;
|
|
105
|
+
creator: string;
|
|
106
|
+
status: JobStatus;
|
|
107
|
+
request_hash: string;
|
|
108
|
+
request: ProteinImpactRequest | null;
|
|
109
|
+
diagnosis_assumption: string | null;
|
|
110
|
+
tools_lock_sha256: string;
|
|
111
|
+
rules_sha256: string;
|
|
112
|
+
estimate: Estimate | null;
|
|
113
|
+
gate: Record<string, unknown> | null;
|
|
114
|
+
/** validate only: the unsigned gate document (the verdict is inside it); sign it with `gate-sign`. */
|
|
115
|
+
gate_document: GateDocument | null;
|
|
116
|
+
stages: StageRecord[];
|
|
117
|
+
results: Array<{
|
|
118
|
+
variant: string;
|
|
119
|
+
gene: string;
|
|
120
|
+
hgvs_pos: number;
|
|
121
|
+
mature_pos: number;
|
|
122
|
+
ref: string;
|
|
123
|
+
alt: string;
|
|
124
|
+
layers: Record<string, unknown>;
|
|
125
|
+
}>;
|
|
126
|
+
errors: string[];
|
|
127
|
+
folder: string;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
}
|
|
130
|
+
export interface ExecResult {
|
|
131
|
+
status: JobStatus | 'GUARD' | 'APPROVAL';
|
|
132
|
+
exit: number;
|
|
133
|
+
manifest: Manifest | null;
|
|
134
|
+
log: string[];
|
|
135
|
+
}
|
|
136
|
+
export declare function jobFolder(a: {
|
|
137
|
+
outBucket: string;
|
|
138
|
+
creator: string;
|
|
139
|
+
jobId: string;
|
|
140
|
+
}): string;
|
|
141
|
+
export declare function parseFasta(text: string): string;
|
|
142
|
+
/** Sequences of the requested genes, from the reference store when cached, else UniProt; always hash checked. */
|
|
143
|
+
export declare function ensureSequences(genes: string[], d: ExecDeps, refStore: string, log: (m: string) => void): Promise<Record<string, SeqInfo>>;
|
|
144
|
+
export declare function runProteinImpact(args: ExecArgs, d: ExecDeps): Promise<ExecResult>;
|
|
145
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/commands/protein-impact/core.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Orchestrator of a protein-impact job. Pure of process and cloud calls: storage, network and the
|
|
4
|
+
* heavy stages are injected, so the control flow (guard, approval, gate, caching, manifest) is unit tested
|
|
5
|
+
* without GCP. `exec.ts` wires the production dependencies.
|
|
6
|
+
*
|
|
7
|
+
* Order of refusal, each before any stage runs:
|
|
8
|
+
* 1. the request passes the no-design guard and its job id matches its content;
|
|
9
|
+
* 2. GPU layers carry an approval that matches a fresh estimate;
|
|
10
|
+
* 3. apply carries a gate document that matches the request's gate id, passes the committed rules,
|
|
11
|
+
* was computed with this tools lock, is signed off, and does not contain the variants being scored.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.STAGE_VERSION = void 0;
|
|
15
|
+
exports.jobFolder = jobFolder;
|
|
16
|
+
exports.parseFasta = parseFasta;
|
|
17
|
+
exports.ensureSequences = ensureSequences;
|
|
18
|
+
exports.runProteinImpact = runProteinImpact;
|
|
19
|
+
const constants_1 = require("./constants");
|
|
20
|
+
const guard_1 = require("./guard");
|
|
21
|
+
const numbering_1 = require("./numbering");
|
|
22
|
+
const features_1 = require("./features");
|
|
23
|
+
const gate_1 = require("./gate");
|
|
24
|
+
const benchmark_1 = require("./benchmark");
|
|
25
|
+
const metrics_1 = require("./metrics");
|
|
26
|
+
const estimate_1 = require("./estimate");
|
|
27
|
+
const request_1 = require("./request");
|
|
28
|
+
const tools_lock_1 = require("./tools_lock");
|
|
29
|
+
/** Bump a layer's version when its logic changes, so cached stage outputs are not reused. */
|
|
30
|
+
exports.STAGE_VERSION = { fetch: 1, features: 1, plm: 1, structure: 1, complex: 1, probe: 1, md: 1 };
|
|
31
|
+
function jobFolder(a) {
|
|
32
|
+
return `gs://${a.outBucket}/biowallet/${a.creator.toLowerCase()}/protein-impact/${a.jobId}`;
|
|
33
|
+
}
|
|
34
|
+
const refStoreOf = (bucket) => `gs://${bucket}/protein`;
|
|
35
|
+
function parseFasta(text) {
|
|
36
|
+
const seq = text.split('\n').filter(l => l.trim() && !l.startsWith('>')).map(l => l.trim()).join('').toUpperCase();
|
|
37
|
+
if (!/^[ACDEFGHIKLMNPQRSTVWY]+$/.test(seq))
|
|
38
|
+
throw new Error('FASTA holds residues outside the 20 standard amino acids');
|
|
39
|
+
return seq;
|
|
40
|
+
}
|
|
41
|
+
/** Sequences of the requested genes, from the reference store when cached, else UniProt; always hash checked. */
|
|
42
|
+
async function ensureSequences(genes, d, refStore, log) {
|
|
43
|
+
const out = {};
|
|
44
|
+
for (const gene of genes) {
|
|
45
|
+
const g = constants_1.GENES[gene];
|
|
46
|
+
const uri = `${refStore}/uniprot/${g.uniprot}/${g.seq_sha256.slice(0, 12)}.fasta`;
|
|
47
|
+
let text = d.storage.readText(uri);
|
|
48
|
+
const cached = text !== null;
|
|
49
|
+
if (text === null) {
|
|
50
|
+
log(`[protein-impact] fetching ${g.uniprot} from UniProt`);
|
|
51
|
+
text = (await d.fetcher.get(`https://rest.uniprot.org/uniprotkb/${g.uniprot}.fasta`)).toString('utf8');
|
|
52
|
+
}
|
|
53
|
+
const sequence = parseFasta(text);
|
|
54
|
+
const sha = (0, request_1.sha256Hex)(sequence);
|
|
55
|
+
if (sha !== g.seq_sha256 || sequence.length !== g.length) {
|
|
56
|
+
throw new Error(`${g.uniprot} (${gene}): the sequence differs from the pinned UniProt 2026_03 entry (length ${sequence.length}, sha256 ${sha.slice(0, 12)}); stop and re-pin deliberately`);
|
|
57
|
+
}
|
|
58
|
+
if (!cached)
|
|
59
|
+
d.storage.writeText(uri, text);
|
|
60
|
+
out[gene] = { uniprot: g.uniprot, sequence, seq_sha256: sha, uri };
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
64
|
+
function variantsOf(req) {
|
|
65
|
+
const out = [];
|
|
66
|
+
for (const t of req.targets)
|
|
67
|
+
for (const s of t.subs) {
|
|
68
|
+
out.push({ variant: (0, numbering_1.formatVariant)({ gene: t.gene, ref: s.ref, pos: s.pos, alt: s.alt }), gene: t.gene, pos: s.pos, mature_pos: (0, numbering_1.toMature)(t.gene, s.pos), ref: s.ref, alt: s.alt });
|
|
69
|
+
}
|
|
70
|
+
return out;
|
|
71
|
+
}
|
|
72
|
+
const oneLetter = (s) => (0, numbering_1.formatVariant)({ gene: s.gene, ref: s.ref, pos: s.pos, alt: s.alt }, 'one');
|
|
73
|
+
/** The scores the validation ranks. Each is oriented so that a higher number means "more likely damaging". */
|
|
74
|
+
const COMPONENTS = [
|
|
75
|
+
{ name: 'esm2_650m', layer: 'plm', value: r => r.esm2_650m?.llr, sign: -1 }, // a lower log-likelihood ratio = less expected = more damaging
|
|
76
|
+
];
|
|
77
|
+
/** Stages that need no container: the numbering check and the baseline substitution features. */
|
|
78
|
+
async function runCpuStage(input) {
|
|
79
|
+
if (input.layer === 'features') {
|
|
80
|
+
const records = input.subs.map(s => {
|
|
81
|
+
(0, numbering_1.assertResidue)({ gene: s.gene, ref: s.ref, pos: s.pos, alt: s.alt }, input.sequences[s.gene].sequence);
|
|
82
|
+
return { variant: s.variant, ...(0, features_1.substitutionFeatures)(s.ref, s.alt), mature_pos: s.mature_pos, ref_residue_checked: true };
|
|
83
|
+
});
|
|
84
|
+
return { records };
|
|
85
|
+
}
|
|
86
|
+
throw new Error(`layer ${input.layer} has no built-in implementation`);
|
|
87
|
+
}
|
|
88
|
+
async function runProteinImpact(args, d) {
|
|
89
|
+
const lines = [];
|
|
90
|
+
const log = (m) => { lines.push(m); d.log?.(m); };
|
|
91
|
+
const now = d.now ?? (() => new Date());
|
|
92
|
+
const lock = d.lock ?? (0, tools_lock_1.loadToolsLock)();
|
|
93
|
+
const rules = d.rules ?? (0, gate_1.loadRules)();
|
|
94
|
+
const lockSha = (0, tools_lock_1.toolsLockSha256)(lock);
|
|
95
|
+
const folder = jobFolder(args);
|
|
96
|
+
// 1. guard, and the job id must be the one this request hashes to
|
|
97
|
+
let req;
|
|
98
|
+
try {
|
|
99
|
+
req = (0, guard_1.validateRequest)(args.request);
|
|
100
|
+
if ((0, request_1.jobIdFor)(req) !== args.jobId)
|
|
101
|
+
throw new guard_1.GuardError([`job id ${args.jobId} does not match the request (expected ${(0, request_1.jobIdFor)(req)})`]);
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
log(`[protein-impact] REFUSED: ${e.message}`);
|
|
105
|
+
return { status: 'GUARD', exit: constants_1.EXIT.GUARD, manifest: null, log: lines };
|
|
106
|
+
}
|
|
107
|
+
const rh = (0, request_1.requestHash)(req);
|
|
108
|
+
const bench = req.mode === 'validate' ? (0, benchmark_1.loadBenchmark)() : null;
|
|
109
|
+
const genes = req.targets.map(t => t.gene);
|
|
110
|
+
const subs = bench ? (0, benchmark_1.benchmarkSubs)(bench, genes) : variantsOf(req);
|
|
111
|
+
const base = {
|
|
112
|
+
schema: constants_1.SCHEMA_MANIFEST, pipeline: 'protein-impact', research_banner: constants_1.RESEARCH_BANNER,
|
|
113
|
+
jobId: args.jobId, mode: req.mode, biosampleId: req.serial ?? null, creator: args.creator.toLowerCase(),
|
|
114
|
+
request_hash: rh, request: req, diagnosis_assumption: req.diagnosis_assumption ?? null,
|
|
115
|
+
tools_lock_sha256: lockSha, rules_sha256: (0, gate_1.rulesSha256)(rules), folder, createdAt: now().toISOString(),
|
|
116
|
+
};
|
|
117
|
+
const writeManifest = (m) => {
|
|
118
|
+
d.storage.writeText(`${folder}/manifest.json`, JSON.stringify(m, null, 2));
|
|
119
|
+
d.storage.writeText(`${folder}/run.log`, lines.join('\n') + '\n');
|
|
120
|
+
};
|
|
121
|
+
const early = (status, result, exit, errors, est, gate) => {
|
|
122
|
+
const m = { ...base, status, estimate: est && est.gpu ? est : null, gate, gate_document: null, stages: [], results: [], errors };
|
|
123
|
+
writeManifest(m);
|
|
124
|
+
return { status: result, exit, manifest: m, log: lines };
|
|
125
|
+
};
|
|
126
|
+
// 2. approval for GPU layers (the client and biofs-node checked it too; a forged forward stops here)
|
|
127
|
+
let est = null;
|
|
128
|
+
try {
|
|
129
|
+
est = (0, estimate_1.estimate)(req, now());
|
|
130
|
+
(0, estimate_1.verifyApproval)(req, now());
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
if (e instanceof estimate_1.ApprovalError) {
|
|
134
|
+
log(`[protein-impact] APPROVAL REFUSED: ${e.message}`);
|
|
135
|
+
return early('FAILED', 'APPROVAL', constants_1.EXIT.APPROVAL, [e.message], est, null);
|
|
136
|
+
}
|
|
137
|
+
throw e;
|
|
138
|
+
}
|
|
139
|
+
// 3. gate (apply only)
|
|
140
|
+
let gateInfo = null;
|
|
141
|
+
if (req.mode === 'apply') {
|
|
142
|
+
try {
|
|
143
|
+
const doc = args.gate;
|
|
144
|
+
if (!doc)
|
|
145
|
+
throw new gate_1.GateBlockedError(['no gate document was supplied with the job']);
|
|
146
|
+
if ((0, gate_1.gateId)(doc) !== req.gate)
|
|
147
|
+
throw new gate_1.GateBlockedError(['the gate document does not match the request\'s gate id (it was altered or is a different document)']);
|
|
148
|
+
(0, gate_1.verifyGateForApply)(doc, rules, { tools_lock_sha256: lockSha, variants: subs.map(oneLetter) });
|
|
149
|
+
gateInfo = { id: req.gate, rules_sha256: doc.rules_sha256, benchmark_sha256: doc.benchmark_sha256, tools_lock_sha256: doc.tools_lock_sha256, signed_off: doc.signed_off, metrics: doc.metrics };
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
if (e instanceof gate_1.GateBlockedError) {
|
|
153
|
+
log(`[protein-impact] ${e.message}`);
|
|
154
|
+
return early('GATE_BLOCKED', 'GATE_BLOCKED', constants_1.EXIT.GATE_BLOCKED, e.reasons, est, { id: req.gate ?? null, blocked: true });
|
|
155
|
+
}
|
|
156
|
+
throw e;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// 3b. validate: the benchmark must be consistent and match the pinned sequences before anything is scored
|
|
160
|
+
let sequences = {};
|
|
161
|
+
if (bench) {
|
|
162
|
+
try {
|
|
163
|
+
sequences = await ensureSequences(genes, d, refStoreOf(args.refBucket), log);
|
|
164
|
+
const problems = (0, benchmark_1.validateBenchmark)(bench, Object.fromEntries(Object.entries(sequences).map(([g, sq]) => [g, sq.sequence])));
|
|
165
|
+
if (problems.length)
|
|
166
|
+
throw new Error(`benchmark problems: ${problems.slice(0, 5).join('; ')}${problems.length > 5 ? ` (+${problems.length - 5} more)` : ''}`);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
log(`[protein-impact] validate cannot start: ${e.message}`);
|
|
170
|
+
return early('FAILED', 'FAILED', constants_1.EXIT.FAILED, [String(e.message)], est, null);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// 4. stages in canonical order
|
|
174
|
+
const stages = [];
|
|
175
|
+
const prior = {};
|
|
176
|
+
const errors = [];
|
|
177
|
+
const ordered = constants_1.LAYERS.filter(l => req.layers.includes(l));
|
|
178
|
+
let gpuSpentUsd = 0;
|
|
179
|
+
const priciest = Math.max(...Object.values(estimate_1.MACHINES).filter(m => m.gpu).map(m => m.usd_per_hour));
|
|
180
|
+
for (const layer of ordered) {
|
|
181
|
+
const stageHash = (0, request_1.sha256Hex)((0, request_1.canonicalJson)({ request_hash: rh, layer, tools_lock_sha256: lockSha, version: exports.STAGE_VERSION[layer] }));
|
|
182
|
+
const dir = `${folder}/stages/${layer}`;
|
|
183
|
+
const started = now().toISOString();
|
|
184
|
+
// cache: an identical request does zero compute
|
|
185
|
+
const done = d.storage.readText(`${dir}/DONE`);
|
|
186
|
+
const outText = done ? d.storage.readText(`${dir}/out.json`) : null;
|
|
187
|
+
if (done && outText) {
|
|
188
|
+
try {
|
|
189
|
+
const meta = JSON.parse(done);
|
|
190
|
+
if (meta.stage_hash === stageHash && meta.out_sha256 === (0, request_1.sha256Hex)(outText)) {
|
|
191
|
+
prior[layer] = JSON.parse(outText);
|
|
192
|
+
stages.push({ layer, status: 'cached', stage_hash: stageHash, started_at: started, finished_at: started, out_uri: `${dir}/out.json`, out_sha256: meta.out_sha256 });
|
|
193
|
+
log(`[protein-impact] ${layer}: cached (${stageHash.slice(0, 12)})`);
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch (_) { /* fall through and recompute */ }
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
let out;
|
|
201
|
+
if (layer === 'fetch') {
|
|
202
|
+
sequences = await ensureSequences(genes, d, refStoreOf(args.refBucket), log);
|
|
203
|
+
out = { summary: { sequences: Object.fromEntries(Object.entries(sequences).map(([g, s]) => [g, { uniprot: s.uniprot, length: s.sequence.length, seq_sha256: s.seq_sha256, uri: s.uri }])) } };
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
if (!Object.keys(sequences).length)
|
|
207
|
+
sequences = await ensureSequences(genes, d, refStoreOf(args.refBucket), log);
|
|
208
|
+
const input = { layer, request: req, subs, sequences, workDir: args.workDir, prior: { ...prior }, tools_lock_sha256: lockSha };
|
|
209
|
+
if (constants_1.GPU_LAYERS.includes(layer)) {
|
|
210
|
+
const approved = req.approval.max_usd;
|
|
211
|
+
const leftUsd = approved * 1.5 - gpuSpentUsd;
|
|
212
|
+
if (leftUsd <= 0)
|
|
213
|
+
throw new Error('the 1.5 x approved budget is spent; the job stops here');
|
|
214
|
+
input.timeout_ms = Math.floor((leftUsd / priciest) * 3600 * 1000);
|
|
215
|
+
}
|
|
216
|
+
out = layer === 'features' ? await runCpuStage(input) : await d.runner.run(input);
|
|
217
|
+
if (constants_1.GPU_LAYERS.includes(layer))
|
|
218
|
+
gpuSpentUsd += ((now().getTime() - new Date(started).getTime()) / 3.6e6) * priciest;
|
|
219
|
+
}
|
|
220
|
+
const text = JSON.stringify(out, null, 2);
|
|
221
|
+
const outSha = (0, request_1.sha256Hex)(text);
|
|
222
|
+
d.storage.writeText(`${dir}/out.json`, text);
|
|
223
|
+
d.storage.writeText(`${dir}/DONE`, JSON.stringify({ stage_hash: stageHash, finished_at: now().toISOString(), out_sha256: outSha }));
|
|
224
|
+
prior[layer] = out;
|
|
225
|
+
stages.push({ layer, status: 'done', stage_hash: stageHash, started_at: started, finished_at: now().toISOString(), out_uri: `${dir}/out.json`, out_sha256: outSha });
|
|
226
|
+
log(`[protein-impact] ${layer}: done`);
|
|
227
|
+
}
|
|
228
|
+
catch (e) {
|
|
229
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
230
|
+
stages.push({ layer, status: 'failed', stage_hash: stageHash, started_at: started, finished_at: now().toISOString(), error: msg });
|
|
231
|
+
errors.push(`${layer}: ${msg}`);
|
|
232
|
+
log(`[protein-impact] ${layer}: FAILED ${msg}`);
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
// 4b. validate: rank the benchmark with the scoring layers and write the unsigned gate document
|
|
237
|
+
let gateDocument = null;
|
|
238
|
+
if (bench && !stages.some(st => st.status === 'failed')) {
|
|
239
|
+
try {
|
|
240
|
+
const comps = COMPONENTS.filter(c => prior[c.layer]);
|
|
241
|
+
if (!comps.length)
|
|
242
|
+
throw new Error('validate needs a scoring layer (plm)');
|
|
243
|
+
const columns = comps.map(c => {
|
|
244
|
+
const byVariant = new Map((prior[c.layer].records ?? []).map(r => [r.variant, r]));
|
|
245
|
+
return subs.map(sb => {
|
|
246
|
+
const rec = byVariant.get(sb.variant);
|
|
247
|
+
const v = rec ? c.value(rec) : undefined;
|
|
248
|
+
if (typeof v !== 'number' || !Number.isFinite(v))
|
|
249
|
+
throw new Error(`${c.name} gave no score for ${sb.variant}`);
|
|
250
|
+
return c.sign * v;
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
const metrics = (0, metrics_1.assembleMetrics)(bench.rows, (0, metrics_1.rankAverage)(columns));
|
|
254
|
+
const verdict = (0, gate_1.evaluateGate)(rules, metrics);
|
|
255
|
+
gateDocument = {
|
|
256
|
+
schema: constants_1.SCHEMA_GATE, created_at: now().toISOString(), rules_sha256: (0, gate_1.rulesSha256)(rules), benchmark_sha256: bench.sha256,
|
|
257
|
+
tools_lock_sha256: lockSha, benchmark_variants: bench.rows.map(r => r.variant_id), components: comps.map(c => c.name),
|
|
258
|
+
metrics, pass: verdict.pass, reasons: verdict.reasons,
|
|
259
|
+
};
|
|
260
|
+
d.storage.writeText(`${folder}/gate.json`, JSON.stringify(gateDocument, null, 2));
|
|
261
|
+
log(`[protein-impact] gate document written: ${verdict.pass ? 'PASS' : 'FAIL'}${verdict.reasons.length ? ' (' + verdict.reasons.join('; ') + ')' : ''}`);
|
|
262
|
+
}
|
|
263
|
+
catch (e) {
|
|
264
|
+
errors.push(`gate: ${e.message}`);
|
|
265
|
+
log(`[protein-impact] gate document FAILED: ${e.message}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// 5. results by variant
|
|
269
|
+
const results = subs.map(s => ({ variant: s.variant, gene: s.gene, hgvs_pos: s.pos, mature_pos: s.mature_pos, ref: s.ref, alt: s.alt, layers: {} }));
|
|
270
|
+
for (const [layer, out] of Object.entries(prior)) {
|
|
271
|
+
for (const rec of out.records ?? []) {
|
|
272
|
+
const row = results.find(r => r.variant === rec.variant);
|
|
273
|
+
if (row) {
|
|
274
|
+
const { variant: _v, ...rest } = rec;
|
|
275
|
+
row.layers[layer] = rest;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
const anyRecords = results.some(r => Object.keys(r.layers).length > 0);
|
|
280
|
+
const failed = stages.some(st => st.status === 'failed') || (!!bench && !gateDocument);
|
|
281
|
+
const wantsRecords = req.mode === 'apply' || req.mode === 'validate';
|
|
282
|
+
const status = failed ? 'FAILED' : (wantsRecords && !anyRecords ? 'EMPTY' : 'OK');
|
|
283
|
+
const m = { ...base, status, estimate: est.gpu ? est : null, gate: gateInfo, gate_document: gateDocument, stages, results, errors };
|
|
284
|
+
writeManifest(m);
|
|
285
|
+
log(`[protein-impact] ${status}: ${stages.length} stage(s), ${results.length} variant(s)`);
|
|
286
|
+
return { status, exit: status === 'OK' ? constants_1.EXIT.OK : status === 'EMPTY' ? constants_1.EXIT.EMPTY : constants_1.EXIT.FAILED, manifest: m, log: lines };
|
|
287
|
+
}
|
|
288
|
+
//# sourceMappingURL=core.js.map
|