@genobank/biofs 3.1.0 → 3.18.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 +663 -462
- package/dist/abi/USDC.json +33 -0
- package/dist/abi/sequentia/BioAgentRegistry.json +20 -0
- package/dist/abi/sequentia/BioCIDRegistry.json +139 -0
- package/dist/abi/sequentia/BioPIL.json +130 -0
- package/dist/abi/sequentia/ConsentManager.json +620 -0
- package/dist/abi/sequentia/OpenCravatJobs.json +988 -0
- package/dist/abi/sequentia/PaymentRouter.json +638 -0
- package/dist/commands/agent/list-sequentia.d.ts +17 -0
- package/dist/commands/agent/list-sequentia.d.ts.map +1 -0
- package/dist/commands/agent/list-sequentia.js +87 -0
- package/dist/commands/agent/list-sequentia.js.map +1 -0
- package/dist/commands/agent/register-sequentia.d.ts +33 -0
- package/dist/commands/agent/register-sequentia.d.ts.map +1 -0
- package/dist/commands/agent/register-sequentia.js +145 -0
- package/dist/commands/agent/register-sequentia.js.map +1 -0
- package/dist/commands/align-shard/exec.d.ts +45 -0
- package/dist/commands/align-shard/exec.d.ts.map +1 -0
- package/dist/commands/align-shard/exec.js +549 -0
- package/dist/commands/align-shard/exec.js.map +1 -0
- package/dist/commands/align-shard/submit.d.ts +37 -0
- package/dist/commands/align-shard/submit.d.ts.map +1 -0
- package/dist/commands/align-shard/submit.js +117 -0
- package/dist/commands/align-shard/submit.js.map +1 -0
- package/dist/commands/ancestry/ingest.d.ts +34 -0
- package/dist/commands/ancestry/ingest.d.ts.map +1 -0
- package/dist/commands/ancestry/ingest.js +175 -0
- package/dist/commands/ancestry/ingest.js.map +1 -0
- package/dist/commands/ancestry/share.d.ts +33 -0
- package/dist/commands/ancestry/share.d.ts.map +1 -0
- package/dist/commands/ancestry/share.js +154 -0
- package/dist/commands/ancestry/share.js.map +1 -0
- package/dist/commands/ancestry/somos.d.ts +34 -0
- package/dist/commands/ancestry/somos.d.ts.map +1 -0
- package/dist/commands/ancestry/somos.js +151 -0
- package/dist/commands/ancestry/somos.js.map +1 -0
- package/dist/commands/ancestry/status.d.ts +14 -0
- package/dist/commands/ancestry/status.d.ts.map +1 -0
- package/dist/commands/ancestry/status.js +74 -0
- package/dist/commands/ancestry/status.js.map +1 -0
- package/dist/commands/annotate/status.d.ts +11 -4
- package/dist/commands/annotate/status.d.ts.map +1 -1
- package/dist/commands/annotate/status.js +66 -99
- package/dist/commands/annotate/status.js.map +1 -1
- package/dist/commands/annotate/submit.d.ts +15 -5
- package/dist/commands/annotate/submit.d.ts.map +1 -1
- package/dist/commands/annotate/submit.js +86 -266
- package/dist/commands/annotate/submit.js.map +1 -1
- package/dist/commands/benchmark.d.ts +50 -0
- package/dist/commands/benchmark.d.ts.map +1 -0
- package/dist/commands/benchmark.js +608 -0
- package/dist/commands/benchmark.js.map +1 -0
- package/dist/commands/biofiles.d.ts +1 -0
- package/dist/commands/biofiles.d.ts.map +1 -1
- package/dist/commands/biofiles.js +19 -6
- package/dist/commands/biofiles.js.map +1 -1
- package/dist/commands/biowallet/bind.d.ts +12 -0
- package/dist/commands/biowallet/bind.d.ts.map +1 -0
- package/dist/commands/biowallet/bind.js +85 -0
- package/dist/commands/biowallet/bind.js.map +1 -0
- package/dist/commands/biowallet/create.d.ts +40 -0
- package/dist/commands/biowallet/create.d.ts.map +1 -0
- package/dist/commands/biowallet/create.js +191 -0
- package/dist/commands/biowallet/create.js.map +1 -0
- package/dist/commands/biowallet/family.d.ts +48 -0
- package/dist/commands/biowallet/family.d.ts.map +1 -0
- package/dist/commands/biowallet/family.js +310 -0
- package/dist/commands/biowallet/family.js.map +1 -0
- package/dist/commands/biowallet/list.d.ts +15 -0
- package/dist/commands/biowallet/list.d.ts.map +1 -0
- package/dist/commands/biowallet/list.js +81 -0
- package/dist/commands/biowallet/list.js.map +1 -0
- package/dist/commands/bode.d.ts +34 -0
- package/dist/commands/bode.d.ts.map +1 -0
- package/dist/commands/bode.js +257 -0
- package/dist/commands/bode.js.map +1 -0
- package/dist/commands/claim.d.ts +32 -0
- package/dist/commands/claim.d.ts.map +1 -0
- package/dist/commands/claim.js +138 -0
- package/dist/commands/claim.js.map +1 -0
- package/dist/commands/clinical.d.ts +49 -0
- package/dist/commands/clinical.d.ts.map +1 -0
- package/dist/commands/clinical.js +273 -0
- package/dist/commands/clinical.js.map +1 -0
- package/dist/commands/cohort-acmg.d.ts +42 -0
- package/dist/commands/cohort-acmg.d.ts.map +1 -0
- package/dist/commands/cohort-acmg.js +319 -0
- package/dist/commands/cohort-acmg.js.map +1 -0
- package/dist/commands/cohort-fourier-score.d.ts +57 -0
- package/dist/commands/cohort-fourier-score.d.ts.map +1 -0
- package/dist/commands/cohort-fourier-score.js +390 -0
- package/dist/commands/cohort-fourier-score.js.map +1 -0
- package/dist/commands/cohort-pipeline.d.ts +49 -0
- package/dist/commands/cohort-pipeline.d.ts.map +1 -0
- package/dist/commands/cohort-pipeline.js +308 -0
- package/dist/commands/cohort-pipeline.js.map +1 -0
- package/dist/commands/cohort-train.d.ts +45 -0
- package/dist/commands/cohort-train.d.ts.map +1 -0
- package/dist/commands/cohort-train.js +308 -0
- package/dist/commands/cohort-train.js.map +1 -0
- package/dist/commands/comethyl/exec.d.ts +40 -0
- package/dist/commands/comethyl/exec.d.ts.map +1 -0
- package/dist/commands/comethyl/exec.js +493 -0
- package/dist/commands/comethyl/exec.js.map +1 -0
- package/dist/commands/comethyl/submit.d.ts +35 -0
- package/dist/commands/comethyl/submit.d.ts.map +1 -0
- package/dist/commands/comethyl/submit.js +98 -0
- package/dist/commands/comethyl/submit.js.map +1 -0
- package/dist/commands/consent.d.ts +10 -0
- package/dist/commands/consent.d.ts.map +1 -0
- package/dist/commands/consent.js +114 -0
- package/dist/commands/consent.js.map +1 -0
- package/dist/commands/dipcall/exec.d.ts +25 -0
- package/dist/commands/dipcall/exec.d.ts.map +1 -0
- package/dist/commands/dipcall/exec.js +207 -0
- package/dist/commands/dipcall/exec.js.map +1 -0
- package/dist/commands/dipcall/submit.d.ts +22 -0
- package/dist/commands/dipcall/submit.d.ts.map +1 -0
- package/dist/commands/dipcall/submit.js +81 -0
- package/dist/commands/dipcall/submit.js.map +1 -0
- package/dist/commands/download-with-consent.d.ts +1 -0
- package/dist/commands/download-with-consent.d.ts.map +1 -1
- package/dist/commands/download-with-consent.js +32 -0
- package/dist/commands/download-with-consent.js.map +1 -1
- package/dist/commands/download.d.ts +2 -0
- package/dist/commands/download.d.ts.map +1 -1
- package/dist/commands/download.js +31 -0
- package/dist/commands/download.js.map +1 -1
- package/dist/commands/duet.d.ts +39 -0
- package/dist/commands/duet.d.ts.map +1 -0
- package/dist/commands/duet.js +323 -0
- package/dist/commands/duet.js.map +1 -0
- package/dist/commands/erase.d.ts +29 -0
- package/dist/commands/erase.d.ts.map +1 -0
- package/dist/commands/erase.js +136 -0
- package/dist/commands/erase.js.map +1 -0
- package/dist/commands/family-status.d.ts +3 -0
- package/dist/commands/family-status.d.ts.map +1 -1
- package/dist/commands/family-status.js +279 -166
- package/dist/commands/family-status.js.map +1 -1
- package/dist/commands/fingerprint.d.ts +2 -0
- package/dist/commands/fingerprint.d.ts.map +1 -1
- package/dist/commands/fingerprint.js +4 -0
- package/dist/commands/fingerprint.js.map +1 -1
- package/dist/commands/fluency/index.d.ts +7 -0
- package/dist/commands/fluency/index.d.ts.map +1 -0
- package/dist/commands/fluency/index.js +122 -0
- package/dist/commands/fluency/index.js.map +1 -0
- package/dist/commands/fourier-score.d.ts +36 -0
- package/dist/commands/fourier-score.d.ts.map +1 -0
- package/dist/commands/fourier-score.js +713 -0
- package/dist/commands/fourier-score.js.map +1 -0
- package/dist/commands/fuse.d.ts.map +1 -1
- package/dist/commands/fuse.js +29 -7
- package/dist/commands/fuse.js.map +1 -1
- package/dist/commands/hifi-align/exec.d.ts +23 -0
- package/dist/commands/hifi-align/exec.d.ts.map +1 -0
- package/dist/commands/hifi-align/exec.js +224 -0
- package/dist/commands/hifi-align/exec.js.map +1 -0
- package/dist/commands/hifi-align/submit.d.ts +22 -0
- package/dist/commands/hifi-align/submit.d.ts.map +1 -0
- package/dist/commands/hifi-align/submit.js +82 -0
- package/dist/commands/hifi-align/submit.js.map +1 -0
- package/dist/commands/hifi-deepvariant/exec.d.ts +29 -0
- package/dist/commands/hifi-deepvariant/exec.d.ts.map +1 -0
- package/dist/commands/hifi-deepvariant/exec.js +280 -0
- package/dist/commands/hifi-deepvariant/exec.js.map +1 -0
- package/dist/commands/hifi-deepvariant/submit.d.ts +23 -0
- package/dist/commands/hifi-deepvariant/submit.d.ts.map +1 -0
- package/dist/commands/hifi-deepvariant/submit.js +80 -0
- package/dist/commands/hifi-deepvariant/submit.js.map +1 -0
- package/dist/commands/hifi-methyl/exec.d.ts +25 -0
- package/dist/commands/hifi-methyl/exec.d.ts.map +1 -0
- package/dist/commands/hifi-methyl/exec.js +243 -0
- package/dist/commands/hifi-methyl/exec.js.map +1 -0
- package/dist/commands/hifi-methyl/submit.d.ts +22 -0
- package/dist/commands/hifi-methyl/submit.d.ts.map +1 -0
- package/dist/commands/hifi-methyl/submit.js +78 -0
- package/dist/commands/hifi-methyl/submit.js.map +1 -0
- package/dist/commands/htsget.d.ts +6 -0
- package/dist/commands/htsget.d.ts.map +1 -1
- package/dist/commands/htsget.js +31 -6
- package/dist/commands/htsget.js.map +1 -1
- package/dist/commands/imaging/attribute.d.ts +19 -0
- package/dist/commands/imaging/attribute.d.ts.map +1 -0
- package/dist/commands/imaging/attribute.js +102 -0
- package/dist/commands/imaging/attribute.js.map +1 -0
- package/dist/commands/imaging/characterize.d.ts +20 -0
- package/dist/commands/imaging/characterize.d.ts.map +1 -0
- package/dist/commands/imaging/characterize.js +105 -0
- package/dist/commands/imaging/characterize.js.map +1 -0
- package/dist/commands/imaging/compare.d.ts +33 -0
- package/dist/commands/imaging/compare.d.ts.map +1 -0
- package/dist/commands/imaging/compare.js +129 -0
- package/dist/commands/imaging/compare.js.map +1 -0
- package/dist/commands/imaging/enrich.d.ts +28 -0
- package/dist/commands/imaging/enrich.d.ts.map +1 -0
- package/dist/commands/imaging/enrich.js +130 -0
- package/dist/commands/imaging/enrich.js.map +1 -0
- package/dist/commands/imaging/findings.d.ts +21 -0
- package/dist/commands/imaging/findings.d.ts.map +1 -0
- package/dist/commands/imaging/findings.js +134 -0
- package/dist/commands/imaging/findings.js.map +1 -0
- package/dist/commands/imaging/lesions.d.ts +21 -0
- package/dist/commands/imaging/lesions.d.ts.map +1 -0
- package/dist/commands/imaging/lesions.js +131 -0
- package/dist/commands/imaging/lesions.js.map +1 -0
- package/dist/commands/imaging/submit.d.ts +32 -0
- package/dist/commands/imaging/submit.d.ts.map +1 -0
- package/dist/commands/imaging/submit.js +118 -0
- package/dist/commands/imaging/submit.js.map +1 -0
- package/dist/commands/imaging/trajectory.d.ts +23 -0
- package/dist/commands/imaging/trajectory.d.ts.map +1 -0
- package/dist/commands/imaging/trajectory.js +134 -0
- package/dist/commands/imaging/trajectory.js.map +1 -0
- package/dist/commands/imaging/twin.d.ts +32 -0
- package/dist/commands/imaging/twin.d.ts.map +1 -0
- package/dist/commands/imaging/twin.js +168 -0
- package/dist/commands/imaging/twin.js.map +1 -0
- package/dist/commands/ingest-rna-tpm.d.ts +33 -0
- package/dist/commands/ingest-rna-tpm.d.ts.map +1 -0
- package/dist/commands/ingest-rna-tpm.js +104 -0
- package/dist/commands/ingest-rna-tpm.js.map +1 -0
- package/dist/commands/interpret/status.d.ts +14 -0
- package/dist/commands/interpret/status.d.ts.map +1 -0
- package/dist/commands/interpret/status.js +83 -0
- package/dist/commands/interpret/status.js.map +1 -0
- package/dist/commands/interpret/submit.d.ts +22 -0
- package/dist/commands/interpret/submit.d.ts.map +1 -0
- package/dist/commands/interpret/submit.js +103 -0
- package/dist/commands/interpret/submit.js.map +1 -0
- package/dist/commands/inventory/cohort.d.ts +29 -0
- package/dist/commands/inventory/cohort.d.ts.map +1 -0
- package/dist/commands/inventory/cohort.js +136 -0
- package/dist/commands/inventory/cohort.js.map +1 -0
- package/dist/commands/inventory-register-sqlite.d.ts +36 -0
- package/dist/commands/inventory-register-sqlite.d.ts.map +1 -0
- package/dist/commands/inventory-register-sqlite.js +178 -0
- package/dist/commands/inventory-register-sqlite.js.map +1 -0
- package/dist/commands/job/recall.d.ts +6 -0
- package/dist/commands/job/recall.d.ts.map +1 -0
- package/dist/commands/job/recall.js +59 -0
- package/dist/commands/job/recall.js.map +1 -0
- package/dist/commands/job/reconcile.d.ts +19 -0
- package/dist/commands/job/reconcile.d.ts.map +1 -0
- package/dist/commands/job/reconcile.js +67 -0
- package/dist/commands/job/reconcile.js.map +1 -0
- package/dist/commands/lab/refreshCoverage.d.ts +53 -0
- package/dist/commands/lab/refreshCoverage.d.ts.map +1 -0
- package/dist/commands/lab/refreshCoverage.js +244 -0
- package/dist/commands/lab/refreshCoverage.js.map +1 -0
- package/dist/commands/liftover/exec.d.ts +27 -0
- package/dist/commands/liftover/exec.d.ts.map +1 -0
- package/dist/commands/liftover/exec.js +258 -0
- package/dist/commands/liftover/exec.js.map +1 -0
- package/dist/commands/liftover/submit.d.ts +22 -0
- package/dist/commands/liftover/submit.d.ts.map +1 -0
- package/dist/commands/liftover/submit.js +79 -0
- package/dist/commands/liftover/submit.js.map +1 -0
- package/dist/commands/lineage.d.ts +6 -0
- package/dist/commands/lineage.d.ts.map +1 -0
- package/dist/commands/lineage.js +126 -0
- package/dist/commands/lineage.js.map +1 -0
- package/dist/commands/methyl/exec.d.ts +47 -0
- package/dist/commands/methyl/exec.d.ts.map +1 -0
- package/dist/commands/methyl/exec.js +565 -0
- package/dist/commands/methyl/exec.js.map +1 -0
- package/dist/commands/methyl/submit.d.ts +25 -0
- package/dist/commands/methyl/submit.d.ts.map +1 -0
- package/dist/commands/methyl/submit.js +98 -0
- package/dist/commands/methyl/submit.js.map +1 -0
- package/dist/commands/mount.d.ts +17 -2
- package/dist/commands/mount.d.ts.map +1 -1
- package/dist/commands/mount.js +158 -6
- package/dist/commands/mount.js.map +1 -1
- package/dist/commands/myvariant.d.ts +60 -0
- package/dist/commands/myvariant.d.ts.map +1 -0
- package/dist/commands/myvariant.js +433 -0
- package/dist/commands/myvariant.js.map +1 -0
- package/dist/commands/ont-variants/exec.d.ts +24 -0
- package/dist/commands/ont-variants/exec.d.ts.map +1 -0
- package/dist/commands/ont-variants/exec.js +230 -0
- package/dist/commands/ont-variants/exec.js.map +1 -0
- package/dist/commands/ont-variants/submit.d.ts +22 -0
- package/dist/commands/ont-variants/submit.d.ts.map +1 -0
- package/dist/commands/ont-variants/submit.js +78 -0
- package/dist/commands/ont-variants/submit.js.map +1 -0
- package/dist/commands/pbsv/exec.d.ts +24 -0
- package/dist/commands/pbsv/exec.d.ts.map +1 -0
- package/dist/commands/pbsv/exec.js +231 -0
- package/dist/commands/pbsv/exec.js.map +1 -0
- package/dist/commands/pbsv/submit.d.ts +22 -0
- package/dist/commands/pbsv/submit.d.ts.map +1 -0
- package/dist/commands/pbsv/submit.js +78 -0
- package/dist/commands/pbsv/submit.js.map +1 -0
- package/dist/commands/phase/exec.d.ts +26 -0
- package/dist/commands/phase/exec.d.ts.map +1 -0
- package/dist/commands/phase/exec.js +246 -0
- package/dist/commands/phase/exec.js.map +1 -0
- package/dist/commands/phase/submit.d.ts +24 -0
- package/dist/commands/phase/submit.d.ts.map +1 -0
- package/dist/commands/phase/submit.js +83 -0
- package/dist/commands/phase/submit.js.map +1 -0
- package/dist/commands/pipe.d.ts +4 -2
- package/dist/commands/pipe.d.ts.map +1 -1
- package/dist/commands/pipe.js +55 -50
- package/dist/commands/pipe.js.map +1 -1
- package/dist/commands/pipeline/runWes.d.ts +28 -0
- package/dist/commands/pipeline/runWes.d.ts.map +1 -0
- package/dist/commands/pipeline/runWes.js +276 -0
- package/dist/commands/pipeline/runWes.js.map +1 -0
- package/dist/commands/profile.d.ts +8 -0
- package/dist/commands/profile.d.ts.map +1 -0
- package/dist/commands/profile.js +193 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/commands/psm-consensus.d.ts +72 -0
- package/dist/commands/psm-consensus.d.ts.map +1 -0
- package/dist/commands/psm-consensus.js +338 -0
- package/dist/commands/psm-consensus.js.map +1 -0
- package/dist/commands/qc/exec.d.ts +32 -0
- package/dist/commands/qc/exec.d.ts.map +1 -0
- package/dist/commands/qc/exec.js +350 -0
- package/dist/commands/qc/exec.js.map +1 -0
- package/dist/commands/qc/submit.d.ts +23 -0
- package/dist/commands/qc/submit.d.ts.map +1 -0
- package/dist/commands/qc/submit.js +88 -0
- package/dist/commands/qc/submit.js.map +1 -0
- package/dist/commands/query.d.ts +37 -0
- package/dist/commands/query.d.ts.map +1 -0
- package/dist/commands/query.js +170 -0
- package/dist/commands/query.js.map +1 -0
- package/dist/commands/repeat-genotype/exec.d.ts +26 -0
- package/dist/commands/repeat-genotype/exec.d.ts.map +1 -0
- package/dist/commands/repeat-genotype/exec.js +245 -0
- package/dist/commands/repeat-genotype/exec.js.map +1 -0
- package/dist/commands/repeat-genotype/submit.d.ts +23 -0
- package/dist/commands/repeat-genotype/submit.d.ts.map +1 -0
- package/dist/commands/repeat-genotype/submit.js +82 -0
- package/dist/commands/repeat-genotype/submit.js.map +1 -0
- package/dist/commands/researcher/passport.d.ts +15 -0
- package/dist/commands/researcher/passport.d.ts.map +1 -0
- package/dist/commands/researcher/passport.js +98 -0
- package/dist/commands/researcher/passport.js.map +1 -0
- package/dist/commands/researcher/register.d.ts +18 -0
- package/dist/commands/researcher/register.d.ts.map +1 -0
- package/dist/commands/researcher/register.js +277 -0
- package/dist/commands/researcher/register.js.map +1 -0
- package/dist/commands/researcher/status.d.ts +6 -0
- package/dist/commands/researcher/status.d.ts.map +1 -0
- package/dist/commands/researcher/status.js +111 -0
- package/dist/commands/researcher/status.js.map +1 -0
- package/dist/commands/room.d.ts +31 -0
- package/dist/commands/room.d.ts.map +1 -0
- package/dist/commands/room.js +486 -0
- package/dist/commands/room.js.map +1 -0
- package/dist/commands/route/anchor.d.ts +42 -0
- package/dist/commands/route/anchor.d.ts.map +1 -0
- package/dist/commands/route/anchor.js +213 -0
- package/dist/commands/route/anchor.js.map +1 -0
- package/dist/commands/route/index.d.ts +27 -0
- package/dist/commands/route/index.d.ts.map +1 -0
- package/dist/commands/route/index.js +82 -0
- package/dist/commands/route/index.js.map +1 -0
- package/dist/commands/rrm-consensus.d.ts +74 -0
- package/dist/commands/rrm-consensus.d.ts.map +1 -0
- package/dist/commands/rrm-consensus.js +334 -0
- package/dist/commands/rrm-consensus.js.map +1 -0
- package/dist/commands/rrm-distribution.d.ts +34 -0
- package/dist/commands/rrm-distribution.d.ts.map +1 -0
- package/dist/commands/rrm-distribution.js +743 -0
- package/dist/commands/rrm-distribution.js.map +1 -0
- package/dist/commands/rrm-train.d.ts +33 -0
- package/dist/commands/rrm-train.d.ts.map +1 -0
- package/dist/commands/rrm-train.js +549 -0
- package/dist/commands/rrm-train.js.map +1 -0
- package/dist/commands/samples.d.ts +25 -0
- package/dist/commands/samples.d.ts.map +1 -0
- package/dist/commands/samples.js +184 -0
- package/dist/commands/samples.js.map +1 -0
- package/dist/commands/score-protein.d.ts +13 -0
- package/dist/commands/score-protein.d.ts.map +1 -0
- package/dist/commands/score-protein.js +360 -0
- package/dist/commands/score-protein.js.map +1 -0
- package/dist/commands/stream.d.ts +7 -0
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +26 -41
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/sv-call/exec.d.ts +23 -0
- package/dist/commands/sv-call/exec.d.ts.map +1 -0
- package/dist/commands/sv-call/exec.js +233 -0
- package/dist/commands/sv-call/exec.js.map +1 -0
- package/dist/commands/sv-call/submit.d.ts +21 -0
- package/dist/commands/sv-call/submit.d.ts.map +1 -0
- package/dist/commands/sv-call/submit.js +77 -0
- package/dist/commands/sv-call/submit.js.map +1 -0
- package/dist/commands/tele.d.ts +42 -0
- package/dist/commands/tele.d.ts.map +1 -0
- package/dist/commands/tele.js +559 -0
- package/dist/commands/tele.js.map +1 -0
- package/dist/commands/tokenize-spectrum.d.ts +58 -0
- package/dist/commands/tokenize-spectrum.d.ts.map +1 -0
- package/dist/commands/tokenize-spectrum.js +297 -0
- package/dist/commands/tokenize-spectrum.js.map +1 -0
- package/dist/commands/umount.d.ts.map +1 -1
- package/dist/commands/umount.js +42 -1
- package/dist/commands/umount.js.map +1 -1
- package/dist/commands/variants.d.ts +42 -0
- package/dist/commands/variants.d.ts.map +1 -0
- package/dist/commands/variants.js +237 -0
- package/dist/commands/variants.js.map +1 -0
- package/dist/commands/verkko/exec.d.ts +27 -0
- package/dist/commands/verkko/exec.d.ts.map +1 -0
- package/dist/commands/verkko/exec.js +223 -0
- package/dist/commands/verkko/exec.js.map +1 -0
- package/dist/commands/verkko/submit.d.ts +24 -0
- package/dist/commands/verkko/submit.d.ts.map +1 -0
- package/dist/commands/verkko/submit.js +96 -0
- package/dist/commands/verkko/submit.js.map +1 -0
- package/dist/commands/wavelet-consensus.d.ts +69 -0
- package/dist/commands/wavelet-consensus.d.ts.map +1 -0
- package/dist/commands/wavelet-consensus.js +338 -0
- package/dist/commands/wavelet-consensus.js.map +1 -0
- package/dist/commands/workspace.d.ts +59 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +419 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/commands/x402/index.d.ts +8 -0
- package/dist/commands/x402/index.d.ts.map +1 -1
- package/dist/commands/x402/index.js +100 -2
- package/dist/commands/x402/index.js.map +1 -1
- package/dist/commands/x402/pipeline-cancer-twin.d.ts +119 -0
- package/dist/commands/x402/pipeline-cancer-twin.d.ts.map +1 -0
- package/dist/commands/x402/pipeline-cancer-twin.js +326 -0
- package/dist/commands/x402/pipeline-cancer-twin.js.map +1 -0
- package/dist/commands/x402/submit.d.ts +72 -0
- package/dist/commands/x402/submit.d.ts.map +1 -0
- package/dist/commands/x402/submit.js +227 -0
- package/dist/commands/x402/submit.js.map +1 -0
- package/dist/commands/x402/verify-payment.d.ts +24 -0
- package/dist/commands/x402/verify-payment.d.ts.map +1 -0
- package/dist/commands/x402/verify-payment.js +113 -0
- package/dist/commands/x402/verify-payment.js.map +1 -0
- package/dist/index.js +2804 -196
- package/dist/index.js.map +1 -1
- package/dist/lib/api/client.d.ts +1 -0
- package/dist/lib/api/client.d.ts.map +1 -1
- package/dist/lib/api/client.js +22 -0
- package/dist/lib/api/client.js.map +1 -1
- package/dist/lib/api/fuse-client.d.ts +281 -0
- package/dist/lib/api/fuse-client.d.ts.map +1 -1
- package/dist/lib/api/fuse-client.js +428 -0
- package/dist/lib/api/fuse-client.js.map +1 -1
- package/dist/lib/biofiles/resolver.d.ts +1 -1
- package/dist/lib/biofiles/resolver.d.ts.map +1 -1
- package/dist/lib/biofiles/resolver.js +173 -138
- package/dist/lib/biofiles/resolver.js.map +1 -1
- package/dist/lib/config/constants.d.ts +1 -0
- package/dist/lib/config/constants.d.ts.map +1 -1
- package/dist/lib/config/constants.js +1 -0
- package/dist/lib/config/constants.js.map +1 -1
- package/dist/lib/config/paths.d.ts +6 -6
- package/dist/lib/config/paths.d.ts.map +1 -1
- package/dist/lib/config/paths.js +56 -17
- package/dist/lib/config/paths.js.map +1 -1
- package/dist/lib/gene-map.d.ts +24 -0
- package/dist/lib/gene-map.d.ts.map +1 -0
- package/dist/lib/gene-map.js +114 -0
- package/dist/lib/gene-map.js.map +1 -0
- package/dist/lib/htsget/client.d.ts +28 -5
- package/dist/lib/htsget/client.d.ts.map +1 -1
- package/dist/lib/htsget/client.js +96 -18
- package/dist/lib/htsget/client.js.map +1 -1
- package/dist/lib/sequentia/BioAgentRegistry.d.ts +98 -0
- package/dist/lib/sequentia/BioAgentRegistry.d.ts.map +1 -0
- package/dist/lib/sequentia/BioAgentRegistry.js +209 -0
- package/dist/lib/sequentia/BioAgentRegistry.js.map +1 -0
- package/dist/lib/tele/core.d.ts +71 -0
- package/dist/lib/tele/core.d.ts.map +1 -0
- package/dist/lib/tele/core.js +387 -0
- package/dist/lib/tele/core.js.map +1 -0
- package/dist/lib/x402/cancer-twin-agents.d.ts +65 -0
- package/dist/lib/x402/cancer-twin-agents.d.ts.map +1 -0
- package/dist/lib/x402/cancer-twin-agents.js +114 -0
- package/dist/lib/x402/cancer-twin-agents.js.map +1 -0
- package/dist/lib/x402/sequentia-pay.d.ts +51 -0
- package/dist/lib/x402/sequentia-pay.d.ts.map +1 -0
- package/dist/lib/x402/sequentia-pay.js +186 -0
- package/dist/lib/x402/sequentia-pay.js.map +1 -0
- package/dist/types/biofiles.d.ts +1 -1
- package/dist/types/biofiles.d.ts.map +1 -1
- package/dist/utils/errorReporter.d.ts +1 -0
- package/dist/utils/errorReporter.d.ts.map +1 -1
- package/dist/utils/errorReporter.js +39 -1
- package/dist/utils/errorReporter.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +20 -0
- package/dist/version.js.map +1 -0
- package/package.json +5 -4
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* biofs clinical
|
|
4
|
+
*
|
|
5
|
+
* Phenotype-driven, multi-exome ACMG/AMP 2015 + ClinGen-SVI 2024 clinical
|
|
6
|
+
* variant classifier. Server-side; no genomic bytes touch the laptop.
|
|
7
|
+
*
|
|
8
|
+
* Flow:
|
|
9
|
+
* 1. Local wallet signature; serials passed as a list.
|
|
10
|
+
* 2. Server resolves each serial → OpenCRAVAT sqlite via bioroutes.inventory
|
|
11
|
+
* (or accepts a sqlite path override via --sqlite-path for the operator).
|
|
12
|
+
* 3. Server maps phenotype text → HPO codes via local HPOA annotations,
|
|
13
|
+
* OR accepts explicit --hpo codes, OR (if --photo + face2gene-key)
|
|
14
|
+
* runs a Face2Gene-style syndrome predictor and folds into HPO.
|
|
15
|
+
* 4. Server filters variants to the (panel ∪ HPO-curated) gene set, applies
|
|
16
|
+
* ACMG criteria (PVS1/PS/PM/PP/BA1/BS/BP) per Pejaver-2022 calibrated
|
|
17
|
+
* thresholds, and returns a joint ranked list with HTML + JSON.
|
|
18
|
+
* 5. Client writes both files under the operator's output dir, keyed on a
|
|
19
|
+
* privacy-safe case label (no proper names; biowallet or label only).
|
|
20
|
+
*
|
|
21
|
+
* Usage:
|
|
22
|
+
* biofs clinical 55052008714014 \
|
|
23
|
+
* --serials 55052008714014,55052008714060,55052008713972,55052008714008 \
|
|
24
|
+
* --phenotype "skeletal disability, bone fractures, under development, wheelchair" \
|
|
25
|
+
* --panel skeletal_dysplasia \
|
|
26
|
+
* --case-label proband-0x01a2D260 \
|
|
27
|
+
* --output ./clinical_reports/
|
|
28
|
+
*
|
|
29
|
+
* biofs clinical 55052008714014 \
|
|
30
|
+
* --hpo HP:0000924,HP:0002659,HP:0001263 \
|
|
31
|
+
* --photo ./patient.jpg
|
|
32
|
+
*
|
|
33
|
+
* Privacy: Per CLAUDE.md, never use proper names. Use --case-label for
|
|
34
|
+
* audit/display, biowallet address otherwise.
|
|
35
|
+
*/
|
|
36
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
37
|
+
if (k2 === undefined) k2 = k;
|
|
38
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
39
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
40
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
41
|
+
}
|
|
42
|
+
Object.defineProperty(o, k2, desc);
|
|
43
|
+
}) : (function(o, m, k, k2) {
|
|
44
|
+
if (k2 === undefined) k2 = k;
|
|
45
|
+
o[k2] = m[k];
|
|
46
|
+
}));
|
|
47
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
48
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
49
|
+
}) : function(o, v) {
|
|
50
|
+
o["default"] = v;
|
|
51
|
+
});
|
|
52
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
53
|
+
var ownKeys = function(o) {
|
|
54
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
55
|
+
var ar = [];
|
|
56
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
57
|
+
return ar;
|
|
58
|
+
};
|
|
59
|
+
return ownKeys(o);
|
|
60
|
+
};
|
|
61
|
+
return function (mod) {
|
|
62
|
+
if (mod && mod.__esModule) return mod;
|
|
63
|
+
var result = {};
|
|
64
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
65
|
+
__setModuleDefault(result, mod);
|
|
66
|
+
return result;
|
|
67
|
+
};
|
|
68
|
+
})();
|
|
69
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
70
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
71
|
+
};
|
|
72
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
|
+
exports.clinicalCommand = clinicalCommand;
|
|
74
|
+
const fs = __importStar(require("fs"));
|
|
75
|
+
const path = __importStar(require("path"));
|
|
76
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
77
|
+
const ora_1 = __importDefault(require("ora"));
|
|
78
|
+
const axios_1 = __importDefault(require("axios"));
|
|
79
|
+
const credentials_1 = require("../lib/auth/credentials");
|
|
80
|
+
const constants_1 = require("../lib/config/constants");
|
|
81
|
+
function parseSerials(primary, listOpt) {
|
|
82
|
+
const set = new Set();
|
|
83
|
+
if (primary)
|
|
84
|
+
set.add(primary.trim());
|
|
85
|
+
if (listOpt)
|
|
86
|
+
for (const s of listOpt.split(',')) {
|
|
87
|
+
const t = s.trim();
|
|
88
|
+
if (t)
|
|
89
|
+
set.add(t);
|
|
90
|
+
}
|
|
91
|
+
return Array.from(set);
|
|
92
|
+
}
|
|
93
|
+
async function clinicalCommand(biosample, options) {
|
|
94
|
+
if (!biosample) {
|
|
95
|
+
console.error(chalk_1.default.red('Usage: biofs clinical <biosample_serial> [--serials list] --phenotype "..."'));
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
if (!options.hpo && !options.phenotype) {
|
|
99
|
+
console.error(chalk_1.default.red('Provide at least one of --phenotype "<text>" or --hpo HP:0001,HP:0002'));
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
const creds = await credentials_1.CredentialsManager.getInstance().loadCredentials();
|
|
103
|
+
if (!creds) {
|
|
104
|
+
console.error(chalk_1.default.red('Not authenticated. Run: biofs login'));
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
const serials = parseSerials(biosample, options.serials);
|
|
108
|
+
const outDir = path.resolve(options.output || './clinical_reports/');
|
|
109
|
+
const caseLabel = options.caseLabel || `proband-${creds.wallet_address.slice(0, 10)}`;
|
|
110
|
+
const panel = options.panel || 'skeletal_dysplasia';
|
|
111
|
+
const maxAf = options.maxAf || '0.01';
|
|
112
|
+
const format = (options.format || 'both').toLowerCase();
|
|
113
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
114
|
+
// Optional photo → base64 (graceful fallback if photo missing or no API key on server)
|
|
115
|
+
let photoB64;
|
|
116
|
+
if (options.photo) {
|
|
117
|
+
if (!fs.existsSync(options.photo)) {
|
|
118
|
+
console.warn(chalk_1.default.yellow(`Photo not found at ${options.photo} — continuing with phenotype-text/HPO only`));
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const buf = fs.readFileSync(options.photo);
|
|
122
|
+
photoB64 = buf.toString('base64');
|
|
123
|
+
if (!options.quiet) {
|
|
124
|
+
console.log(chalk_1.default.cyan(`Photo loaded (${buf.length} bytes) — server will attempt syndrome match if Face2Gene key configured.`));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (!options.quiet) {
|
|
129
|
+
console.log(chalk_1.default.bold.cyan('\nbiofs clinical — Phenotype-driven ACMG variant classifier'));
|
|
130
|
+
console.log(`Case label: ${chalk_1.default.bold(caseLabel)} ${chalk_1.default.gray('(privacy-safe; no proper names)')}`);
|
|
131
|
+
console.log(`Exomes: ${serials.length} ${serials.length === 1 ? 'serial' : 'serials (joint pass)'}`);
|
|
132
|
+
serials.forEach(s => console.log(` - ${s}`));
|
|
133
|
+
if (options.hpo)
|
|
134
|
+
console.log(`HPO codes: ${options.hpo}`);
|
|
135
|
+
if (options.phenotype)
|
|
136
|
+
console.log(`Phenotype: "${options.phenotype}"`);
|
|
137
|
+
console.log(`Panel: ${panel}`);
|
|
138
|
+
console.log(`Max gnomAD AF: ${maxAf}`);
|
|
139
|
+
console.log(`Photo: ${options.photo ? options.photo : '(none)'}`);
|
|
140
|
+
console.log(`Output: ${outDir}\n`);
|
|
141
|
+
}
|
|
142
|
+
const spinner = options.quiet ? null : (0, ora_1.default)('Submitting to /api_biofs_fuse/clinical_acmg ...').start();
|
|
143
|
+
const baseUrl = `${constants_1.API_CONFIG.base}${constants_1.API_CONFIG.fuse}`;
|
|
144
|
+
const payload = {
|
|
145
|
+
serials,
|
|
146
|
+
hpo: options.hpo || '',
|
|
147
|
+
phenotype: options.phenotype || '',
|
|
148
|
+
panel,
|
|
149
|
+
max_af: maxAf,
|
|
150
|
+
photo_b64: photoB64 || '',
|
|
151
|
+
case_label: caseLabel,
|
|
152
|
+
wallet: creds.wallet_address,
|
|
153
|
+
signature: creds.user_signature,
|
|
154
|
+
};
|
|
155
|
+
let resp;
|
|
156
|
+
try {
|
|
157
|
+
const r = await axios_1.default.post(`${baseUrl}/clinical_acmg`, payload, {
|
|
158
|
+
timeout: 60 * 60000, // 1 hr — large joint passes can be slow
|
|
159
|
+
maxContentLength: 200 * 1024 * 1024,
|
|
160
|
+
});
|
|
161
|
+
resp = r.data;
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
spinner?.fail('clinical_acmg API call failed');
|
|
165
|
+
const serverMsg = err?.response?.data?.error || err?.message;
|
|
166
|
+
console.error(chalk_1.default.red(`Error: ${serverMsg}`));
|
|
167
|
+
if (options.debug)
|
|
168
|
+
console.error(err?.response?.data || err);
|
|
169
|
+
process.exit(1);
|
|
170
|
+
}
|
|
171
|
+
spinner?.succeed(`classified ${resp.summary.total_variants_classified} variants across ${resp.exomes.length} exome(s)`);
|
|
172
|
+
// Render summary table
|
|
173
|
+
const by = resp.summary.by_class || {};
|
|
174
|
+
console.log('\n' + chalk_1.default.bold('Classification summary:'));
|
|
175
|
+
console.log(` ${chalk_1.default.red.bold(by['Pathogenic'] || 0)} Pathogenic`);
|
|
176
|
+
console.log(` ${chalk_1.default.hex('#cc5500').bold(by['Likely Pathogenic'] || 0)} Likely Pathogenic`);
|
|
177
|
+
console.log(` ${chalk_1.default.gray(by['VUS'] || 0)} VUS`);
|
|
178
|
+
console.log(` ${chalk_1.default.green(by['Likely Benign'] || 0)} Likely Benign`);
|
|
179
|
+
console.log(` ${chalk_1.default.green.bold(by['Benign'] || 0)} Benign`);
|
|
180
|
+
// Print P + LP variants
|
|
181
|
+
const top = (resp.variants || []).filter(v => v.classification === 'Pathogenic' || v.classification === 'Likely Pathogenic');
|
|
182
|
+
if (top.length > 0) {
|
|
183
|
+
console.log('\n' + chalk_1.default.bold('Diagnostic candidates (P / LP):'));
|
|
184
|
+
for (const v of top) {
|
|
185
|
+
const tag = v.classification === 'Pathogenic' ? chalk_1.default.red.bold(' [P] ') : chalk_1.default.hex('#cc5500').bold(' [LP] ');
|
|
186
|
+
const hpoMatch = (v.phenotype_hpo_matched || []).length;
|
|
187
|
+
console.log(`${tag} ${chalk_1.default.bold(v.gene)} chr${v.chrom}:${v.pos} ${v.ref}>${v.alt} ` +
|
|
188
|
+
`${v.cchange || ''} ${v.achange || ''} ` +
|
|
189
|
+
chalk_1.default.gray(`(${(v.so || '').toLowerCase()}; HPO=${hpoMatch}; ` +
|
|
190
|
+
`AM=${fmt(v.am_path)} REVEL=${fmt(v.revel)} SpliceAI=${fmt(v.spliceai_max)})`));
|
|
191
|
+
if (v.clinvar_disease) {
|
|
192
|
+
console.log(` ${chalk_1.default.gray('ClinVar: ' + (v.clinvar_sig || '') + ' — ' + (v.clinvar_disease || '').slice(0, 120))}`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// Write outputs
|
|
197
|
+
if (format === 'json' || format === 'both') {
|
|
198
|
+
const jsonPath = path.join(outDir, `${caseLabel}__clinical_acmg.json`);
|
|
199
|
+
fs.writeFileSync(jsonPath, JSON.stringify(resp, null, 2));
|
|
200
|
+
if (!options.quiet)
|
|
201
|
+
console.log(chalk_1.default.green(`\n✓ JSON report: ${jsonPath}`));
|
|
202
|
+
}
|
|
203
|
+
if (format === 'html' || format === 'both') {
|
|
204
|
+
const htmlPath = path.join(outDir, `${caseLabel}__clinical_acmg.html`);
|
|
205
|
+
if (resp.html) {
|
|
206
|
+
fs.writeFileSync(htmlPath, resp.html);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
fs.writeFileSync(htmlPath, renderClientFallbackHtml(resp));
|
|
210
|
+
}
|
|
211
|
+
if (!options.quiet)
|
|
212
|
+
console.log(chalk_1.default.green(`✓ HTML report: ${htmlPath}`));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function fmt(v) {
|
|
216
|
+
if (v == null)
|
|
217
|
+
return '·';
|
|
218
|
+
if (typeof v === 'number')
|
|
219
|
+
return v.toFixed(2);
|
|
220
|
+
return String(v);
|
|
221
|
+
}
|
|
222
|
+
function renderClientFallbackHtml(r) {
|
|
223
|
+
// Fallback HTML render if server didn't include r.html. Mirrors server output
|
|
224
|
+
// style — light theme, no dark backgrounds, per Daniel's preference.
|
|
225
|
+
const variants = r.variants || [];
|
|
226
|
+
const rows = variants.map(v => {
|
|
227
|
+
const cls = v.classification.replace(' ', '-');
|
|
228
|
+
return `<tr class="${cls}">
|
|
229
|
+
<td><strong>${v.gene || ''}</strong>${v.panel_member ? ' <span class="badge">PANEL</span>' : ''}</td>
|
|
230
|
+
<td>chr${v.chrom}:${v.pos} ${v.ref}>${v.alt}</td>
|
|
231
|
+
<td>${v.so || ''}<br><span class="small">${v.cchange || ''} ${v.achange || ''}</span></td>
|
|
232
|
+
<td><strong>${v.classification}</strong></td>
|
|
233
|
+
<td>AM=${fmt(v.am_path)}<br>REVEL=${fmt(v.revel)}<br>CADD=${fmt(v.cadd)}<br>SpliceAI=${fmt(v.spliceai_max)}</td>
|
|
234
|
+
<td>${v.gnomad_af == null ? 'absent' : v.gnomad_af}</td>
|
|
235
|
+
<td>${v.clinvar_sig || ''}<br><span class="small">${(v.clinvar_disease || '').slice(0, 80)}</span></td>
|
|
236
|
+
<td>${v.zygosity || ''}<br><span class="small">${v.sqlite_source || ''}</span></td>
|
|
237
|
+
<td>${v.phenotype_score || 0}<br><span class="small">${(v.phenotype_hpo_matched || []).join(',').slice(0, 40)}</span></td>
|
|
238
|
+
</tr>`;
|
|
239
|
+
}).join('');
|
|
240
|
+
const css = `
|
|
241
|
+
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
242
|
+
background: #ffffff; color: #212529; margin: 24px; max-width: 1200px; }
|
|
243
|
+
h1, h2 { color: #1a3550; }
|
|
244
|
+
table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
|
|
245
|
+
th, td { padding: 6px 10px; border: 1px solid #dee2e6; text-align: left; vertical-align: top; }
|
|
246
|
+
th { background: #f5f8fb; }
|
|
247
|
+
.Pathogenic { background: #fde8e8; }
|
|
248
|
+
.Likely-Pathogenic { background: #fff4e0; }
|
|
249
|
+
.VUS { background: #f7f7f7; }
|
|
250
|
+
.badge { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px;
|
|
251
|
+
background: #1a3550; color: #fff; }
|
|
252
|
+
.small { color: #6c757d; font-size: 11px; }
|
|
253
|
+
code { background: #f4f4f4; padding: 1px 4px; border-radius: 3px; }
|
|
254
|
+
`;
|
|
255
|
+
return `<!DOCTYPE html><html><head><meta charset="UTF-8">
|
|
256
|
+
<title>Clinical ACMG — ${r.case_label}</title><style>${css}</style></head><body>
|
|
257
|
+
<h1>Clinical ACMG Report</h1>
|
|
258
|
+
<p><strong>Case:</strong> <code>${r.case_label}</code><br>
|
|
259
|
+
<strong>Generated:</strong> ${r.generated_at}<br>
|
|
260
|
+
<strong>Exomes:</strong> ${r.exomes.length} <strong>HPO:</strong> ${r.hpo_codes.join(', ')}<br>
|
|
261
|
+
<strong>Panel:</strong> ${r.panel_used} (${r.n_hpo_genes_curated} HPO-curated genes)
|
|
262
|
+
<strong>Photo:</strong> ${r.photo_phenotyping?.status || 'none'}
|
|
263
|
+
</p>
|
|
264
|
+
<h2>Summary</h2>
|
|
265
|
+
<p>${Object.entries(r.summary.by_class).map(([k, v]) => `${k}: <strong>${v}</strong>`).join(' · ')}</p>
|
|
266
|
+
<h2>Variants</h2>
|
|
267
|
+
<table>
|
|
268
|
+
<thead><tr><th>Gene</th><th>Locus</th><th>HGVS</th><th>Class</th><th>In-silico</th><th>gnomAD</th><th>ClinVar</th><th>Zygosity / exome</th><th>Phenotype</th></tr></thead>
|
|
269
|
+
<tbody>${rows}</tbody></table>
|
|
270
|
+
<p class="small">${r.methodology}</p>
|
|
271
|
+
</body></html>`;
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=clinical.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clinical.js","sourceRoot":"","sources":["../../src/commands/clinical.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDH,0CAoIC;AArLD,uCAAyB;AACzB,2CAA6B;AAC7B,kDAA0B;AAC1B,8CAAsB;AACtB,kDAA0B;AAC1B,yDAA6D;AAC7D,uDAAqD;AAiCrD,SAAS,YAAY,CAAC,OAAe,EAAE,OAAgB;IACrD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,IAAI,OAAO;QAAE,GAAG,CAAC,GAAG,CAAC,OAAO,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GAAG;;kCAExB,CAAC,CAAC,UAAU;8BAChB,CAAC,CAAC,YAAY;2BACjB,CAAC,CAAC,MAAM,CAAC,MAAM,iCAAiC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;0BACvE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,mBAAmB;0BACtC,CAAC,CAAC,iBAAiB,EAAE,MAAM,IAAE,MAAM;;;KAGxD,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAE,CAAA,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC;;;;SAIpG,IAAI;mBACM,CAAC,CAAC,WAAW;eACjB,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* biofs cohort-acmg
|
|
3
|
+
*
|
|
4
|
+
* Batch ACMG / ClinGen-SVI-compliant pathogenicity report for a cohort of
|
|
5
|
+
* biosample serials, served entirely server-side. The Mac CLI sends only
|
|
6
|
+
* (serials, wallet, signature) and receives per-serial findings as JSON.
|
|
7
|
+
* No genomic bytes ever touch the laptop.
|
|
8
|
+
*
|
|
9
|
+
* Per CLAUDE.md: "Daniel's MacBook is for codebase work only" + "MANDATORY:
|
|
10
|
+
* Use gcsfuse for ALL Genomic Files — NEVER Download". Replaces the prior
|
|
11
|
+
* pattern that did 51× `gcloud storage cp` of 250-MB sqlites into
|
|
12
|
+
* ~/.biofs/cache/cravat/.
|
|
13
|
+
*
|
|
14
|
+
* Flow:
|
|
15
|
+
* 1. Operator wallet signature verified once at request time.
|
|
16
|
+
* 2. For each serial, the server resolves the OC sqlite via bioroutes,
|
|
17
|
+
* runs sqlite3 in-process against /mnt/gcsfuse-bioroutes/.../...sqlite,
|
|
18
|
+
* applies ACMG-SVI evidence stacks per Section 2.7 of the biofs-rrm
|
|
19
|
+
* paper, returns the ClinVar P+LP findings.
|
|
20
|
+
* 3. The Mac client maps each serial to its operator-private biowallet
|
|
21
|
+
* from ~/.biofs/biowallets/index.json (chmod 600), mints one if absent,
|
|
22
|
+
* and writes per-biowallet JSON reports.
|
|
23
|
+
*
|
|
24
|
+
* Output files:
|
|
25
|
+
* - <output-dir>/<biowallet>.json — per-proband ACMG-SVI report
|
|
26
|
+
* - <output-dir>/cohort_summary.json — cohort-wide aggregation
|
|
27
|
+
*
|
|
28
|
+
* Usage:
|
|
29
|
+
* biofs cohort-acmg --serials /tmp/aug_cohort_v1.txt
|
|
30
|
+
* biofs cohort-acmg --serials cohort.txt --output ~/cohort_reports/ --limit 5
|
|
31
|
+
* biofs cohort-acmg --serials cohort.txt --skip-existing
|
|
32
|
+
*/
|
|
33
|
+
export interface CohortAcmgOptions {
|
|
34
|
+
serials?: string;
|
|
35
|
+
output?: string;
|
|
36
|
+
limit?: string;
|
|
37
|
+
skipExisting?: boolean;
|
|
38
|
+
quiet?: boolean;
|
|
39
|
+
maxAf?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function cohortAcmgCommand(opts: CohortAcmgOptions): Promise<void>;
|
|
42
|
+
//# sourceMappingURL=cohort-acmg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cohort-acmg.d.ts","sourceRoot":"","sources":["../../src/commands/cohort-acmg.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAaH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAuCD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2N9E"}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* biofs cohort-acmg
|
|
4
|
+
*
|
|
5
|
+
* Batch ACMG / ClinGen-SVI-compliant pathogenicity report for a cohort of
|
|
6
|
+
* biosample serials, served entirely server-side. The Mac CLI sends only
|
|
7
|
+
* (serials, wallet, signature) and receives per-serial findings as JSON.
|
|
8
|
+
* No genomic bytes ever touch the laptop.
|
|
9
|
+
*
|
|
10
|
+
* Per CLAUDE.md: "Daniel's MacBook is for codebase work only" + "MANDATORY:
|
|
11
|
+
* Use gcsfuse for ALL Genomic Files — NEVER Download". Replaces the prior
|
|
12
|
+
* pattern that did 51× `gcloud storage cp` of 250-MB sqlites into
|
|
13
|
+
* ~/.biofs/cache/cravat/.
|
|
14
|
+
*
|
|
15
|
+
* Flow:
|
|
16
|
+
* 1. Operator wallet signature verified once at request time.
|
|
17
|
+
* 2. For each serial, the server resolves the OC sqlite via bioroutes,
|
|
18
|
+
* runs sqlite3 in-process against /mnt/gcsfuse-bioroutes/.../...sqlite,
|
|
19
|
+
* applies ACMG-SVI evidence stacks per Section 2.7 of the biofs-rrm
|
|
20
|
+
* paper, returns the ClinVar P+LP findings.
|
|
21
|
+
* 3. The Mac client maps each serial to its operator-private biowallet
|
|
22
|
+
* from ~/.biofs/biowallets/index.json (chmod 600), mints one if absent,
|
|
23
|
+
* and writes per-biowallet JSON reports.
|
|
24
|
+
*
|
|
25
|
+
* Output files:
|
|
26
|
+
* - <output-dir>/<biowallet>.json — per-proband ACMG-SVI report
|
|
27
|
+
* - <output-dir>/cohort_summary.json — cohort-wide aggregation
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* biofs cohort-acmg --serials /tmp/aug_cohort_v1.txt
|
|
31
|
+
* biofs cohort-acmg --serials cohort.txt --output ~/cohort_reports/ --limit 5
|
|
32
|
+
* biofs cohort-acmg --serials cohort.txt --skip-existing
|
|
33
|
+
*/
|
|
34
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
35
|
+
if (k2 === undefined) k2 = k;
|
|
36
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
37
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
38
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
39
|
+
}
|
|
40
|
+
Object.defineProperty(o, k2, desc);
|
|
41
|
+
}) : (function(o, m, k, k2) {
|
|
42
|
+
if (k2 === undefined) k2 = k;
|
|
43
|
+
o[k2] = m[k];
|
|
44
|
+
}));
|
|
45
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
46
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
47
|
+
}) : function(o, v) {
|
|
48
|
+
o["default"] = v;
|
|
49
|
+
});
|
|
50
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
51
|
+
var ownKeys = function(o) {
|
|
52
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
53
|
+
var ar = [];
|
|
54
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
55
|
+
return ar;
|
|
56
|
+
};
|
|
57
|
+
return ownKeys(o);
|
|
58
|
+
};
|
|
59
|
+
return function (mod) {
|
|
60
|
+
if (mod && mod.__esModule) return mod;
|
|
61
|
+
var result = {};
|
|
62
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
63
|
+
__setModuleDefault(result, mod);
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
})();
|
|
67
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
68
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
69
|
+
};
|
|
70
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71
|
+
exports.cohortAcmgCommand = cohortAcmgCommand;
|
|
72
|
+
const child_process_1 = require("child_process");
|
|
73
|
+
const fs = __importStar(require("fs"));
|
|
74
|
+
const path = __importStar(require("path"));
|
|
75
|
+
const os = __importStar(require("os"));
|
|
76
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
77
|
+
const ora_1 = __importDefault(require("ora"));
|
|
78
|
+
const fuse_client_1 = require("../lib/api/fuse-client");
|
|
79
|
+
const credentials_1 = require("../lib/auth/credentials");
|
|
80
|
+
const BIOWALLET_INDEX = path.join(os.homedir(), '.biofs', 'biowallets', 'index.json');
|
|
81
|
+
function loadBiowalletIndex() {
|
|
82
|
+
if (!fs.existsSync(BIOWALLET_INDEX))
|
|
83
|
+
return [];
|
|
84
|
+
return JSON.parse(fs.readFileSync(BIOWALLET_INDEX, 'utf8'));
|
|
85
|
+
}
|
|
86
|
+
function findBiowalletForSerial(idx, serial) {
|
|
87
|
+
for (const e of idx) {
|
|
88
|
+
if ((e.bound_biosamples || []).includes(serial))
|
|
89
|
+
return e.address;
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
function mintBiowalletForSerial(serial) {
|
|
94
|
+
const r = (0, child_process_1.spawnSync)('biofs', [
|
|
95
|
+
'biowallet', 'create',
|
|
96
|
+
'--label', 'Cohort proband (auto-bound to one biosample)',
|
|
97
|
+
'--bind-biosample', serial,
|
|
98
|
+
'--quiet',
|
|
99
|
+
], { encoding: 'utf8', maxBuffer: 20 * 1024 * 1024, timeout: 60000 });
|
|
100
|
+
if (r.status !== 0)
|
|
101
|
+
throw new Error(`biofs biowallet create failed: ${r.stderr || r.stdout}`);
|
|
102
|
+
// Output line: "Address (EIP-55): 0x...". The literal "55" inside the
|
|
103
|
+
// "(EIP-55)" label means any `[^0-9]*` regex short-circuits before the
|
|
104
|
+
// address; grab the first 0x-prefixed 40-hex string on the Address line.
|
|
105
|
+
let addrLine = r.stdout.split('\n').find(l => l.includes('Address (EIP-55)'));
|
|
106
|
+
if (!addrLine)
|
|
107
|
+
addrLine = r.stdout;
|
|
108
|
+
const m = addrLine.match(/0x[0-9a-fA-F]{40}/);
|
|
109
|
+
if (!m)
|
|
110
|
+
throw new Error(`Could not parse biowallet address from output: ${r.stdout.slice(0, 300)}`);
|
|
111
|
+
return m[0];
|
|
112
|
+
}
|
|
113
|
+
async function cohortAcmgCommand(opts) {
|
|
114
|
+
if (!opts.serials)
|
|
115
|
+
throw new Error('--serials <file> is required (one biosample serial per line)');
|
|
116
|
+
if (!fs.existsSync(opts.serials))
|
|
117
|
+
throw new Error(`Serials file not found: ${opts.serials}`);
|
|
118
|
+
const outDir = path.resolve(opts.output || './cohort_acmg_reports/');
|
|
119
|
+
const limit = parseInt(opts.limit || '0', 10);
|
|
120
|
+
const skipExisting = !!opts.skipExisting;
|
|
121
|
+
const allSerials = fs.readFileSync(opts.serials, 'utf8')
|
|
122
|
+
.split('\n').map(s => s.trim()).filter(s => s && !s.startsWith('#'));
|
|
123
|
+
const cohort = limit > 0 ? allSerials.slice(0, limit) : allSerials;
|
|
124
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
125
|
+
const biowalletIdx = loadBiowalletIndex();
|
|
126
|
+
// Mint biowallets up front for any serial that doesn't have one. This keeps
|
|
127
|
+
// the operator-private serial→biowallet mapping local; only biowallets are
|
|
128
|
+
// returned to the API caller in summary outputs.
|
|
129
|
+
const serialToBiowallet = {};
|
|
130
|
+
for (const serial of cohort) {
|
|
131
|
+
let biowallet = findBiowalletForSerial(biowalletIdx, serial);
|
|
132
|
+
if (!biowallet) {
|
|
133
|
+
biowallet = mintBiowalletForSerial(serial);
|
|
134
|
+
// refresh index
|
|
135
|
+
const updated = loadBiowalletIndex();
|
|
136
|
+
biowalletIdx.length = 0;
|
|
137
|
+
biowalletIdx.push(...updated);
|
|
138
|
+
}
|
|
139
|
+
serialToBiowallet[serial] = biowallet;
|
|
140
|
+
}
|
|
141
|
+
// Filter out serials whose biowallet report already exists if --skip-existing.
|
|
142
|
+
const todoSerials = [];
|
|
143
|
+
const reusedReports = {};
|
|
144
|
+
for (const serial of cohort) {
|
|
145
|
+
const biowallet = serialToBiowallet[serial];
|
|
146
|
+
const outPath = path.join(outDir, `${biowallet}.json`);
|
|
147
|
+
if (skipExisting && fs.existsSync(outPath)) {
|
|
148
|
+
try {
|
|
149
|
+
const existing = JSON.parse(fs.readFileSync(outPath, 'utf8'));
|
|
150
|
+
if (existing && (existing.status === 'ok' || existing.status === 'no_annotation')) {
|
|
151
|
+
reusedReports[serial] = existing;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
// fallthrough to re-run
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
todoSerials.push(serial);
|
|
160
|
+
}
|
|
161
|
+
if (!opts.quiet) {
|
|
162
|
+
process.stderr.write(chalk_1.default.cyan(`\n🧬 biofs cohort-acmg | ${cohort.length} probands | ACMG-SVI evidence stacks per Section 2.7\n`));
|
|
163
|
+
process.stderr.write(chalk_1.default.gray(` biowallets known: ${biowalletIdx.length}; output dir: ${outDir}\n`));
|
|
164
|
+
process.stderr.write(chalk_1.default.gray(` server-side (NFT-gated gcsfuse on prod); zero genomic bytes on laptop\n`));
|
|
165
|
+
process.stderr.write(chalk_1.default.gray(` skipped (existing): ${Object.keys(reusedReports).length}\n`));
|
|
166
|
+
process.stderr.write(chalk_1.default.gray(` to process: ${todoSerials.length}\n\n`));
|
|
167
|
+
}
|
|
168
|
+
const credMgr = credentials_1.CredentialsManager.getInstance();
|
|
169
|
+
const creds = await credMgr.loadCredentials();
|
|
170
|
+
if (!creds) {
|
|
171
|
+
throw new Error('Not authenticated. Run `biofs login` first.');
|
|
172
|
+
}
|
|
173
|
+
// Iterate per-proband against the /variants endpoint with clinvar=patho +
|
|
174
|
+
// with_acmg=true. This avoids the Cloudflare 100s edge timeout that would
|
|
175
|
+
// kill a batched cohort_acmg call once N×t_per_proband > 100 s. We process
|
|
176
|
+
// 3 serials in parallel for throughput.
|
|
177
|
+
const apiResults = {};
|
|
178
|
+
if (todoSerials.length > 0) {
|
|
179
|
+
const spinner = opts.quiet ? null : (0, ora_1.default)(`Querying ${todoSerials.length} probands on prod (NFT-gated, 3-way parallel)…`).start();
|
|
180
|
+
const api = new fuse_client_1.FuseAPIClient();
|
|
181
|
+
const CONCURRENCY = 2;
|
|
182
|
+
let processed = 0;
|
|
183
|
+
let okCount = 0;
|
|
184
|
+
let totalFindings = 0;
|
|
185
|
+
for (let i = 0; i < todoSerials.length; i += CONCURRENCY) {
|
|
186
|
+
const chunk = todoSerials.slice(i, i + CONCURRENCY);
|
|
187
|
+
// Promise.allSettled so one stuck/timed-out call doesn't block siblings
|
|
188
|
+
// or the next chunk. Each call has its own 90 s AbortController in the
|
|
189
|
+
// FuseAPIClient.
|
|
190
|
+
await Promise.allSettled(chunk.map(async (serial) => {
|
|
191
|
+
try {
|
|
192
|
+
const r = await api.variants(serial, creds.wallet_address, creds.user_signature, {
|
|
193
|
+
clinvar: 'patho',
|
|
194
|
+
maxAf: opts.maxAf || '0.01',
|
|
195
|
+
withAcmg: true,
|
|
196
|
+
});
|
|
197
|
+
apiResults[serial] = {
|
|
198
|
+
status: 'ok',
|
|
199
|
+
job_id: r.job_id,
|
|
200
|
+
biocid: r.biocid,
|
|
201
|
+
n_clinvar_p_lp_findings: r.count,
|
|
202
|
+
findings: r.rows,
|
|
203
|
+
};
|
|
204
|
+
okCount += 1;
|
|
205
|
+
totalFindings += r.count;
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
const msg = e.message;
|
|
209
|
+
// "No OpenCRAVAT sqlite registered" → no_annotation; otherwise fetch_failed
|
|
210
|
+
if (/No OpenCRAVAT sqlite|not mounted on prod/i.test(msg)) {
|
|
211
|
+
apiResults[serial] = { status: 'no_annotation', error: msg };
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
apiResults[serial] = { status: 'failed', error: msg };
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
processed += 1;
|
|
218
|
+
if (spinner) {
|
|
219
|
+
spinner.text = `[${processed}/${todoSerials.length}] proband processed; ok=${okCount}, findings=${totalFindings}`;
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
if (spinner) {
|
|
224
|
+
spinner.succeed(`Server processed ${okCount}/${todoSerials.length} probands ok, ${totalFindings} total findings`);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
// Merge reused + freshly fetched results, write per-biowallet JSON reports.
|
|
228
|
+
const summary = {
|
|
229
|
+
cohort_size: cohort.length,
|
|
230
|
+
processed: 0,
|
|
231
|
+
ok: 0,
|
|
232
|
+
no_annotation: 0,
|
|
233
|
+
fetch_failed: 0,
|
|
234
|
+
skipped_existing: Object.keys(reusedReports).length,
|
|
235
|
+
findings_per_proband: {},
|
|
236
|
+
findings_per_gene: {},
|
|
237
|
+
started_at: new Date().toISOString(),
|
|
238
|
+
methodology: 'Server-side sqlite3 query against NFT-gated gcsfuse mount on genobank.app/api_biofs_fuse/cohort_acmg. ACMG-SVI evidence per Section 2.7 of biofs-rrm paper (AlphaMissense single PP3, REVEL context-only, PVS1 canonical LoF, PM2 AF<1e-4).',
|
|
239
|
+
};
|
|
240
|
+
for (const serial of cohort) {
|
|
241
|
+
const biowallet = serialToBiowallet[serial];
|
|
242
|
+
const outPath = path.join(outDir, `${biowallet}.json`);
|
|
243
|
+
let per = reusedReports[serial];
|
|
244
|
+
let fromReuse = !!per;
|
|
245
|
+
if (!per) {
|
|
246
|
+
per = apiResults[serial];
|
|
247
|
+
}
|
|
248
|
+
if (!per) {
|
|
249
|
+
// Server returned nothing for this serial — record as fetch_failed
|
|
250
|
+
const rep = {
|
|
251
|
+
biowallet,
|
|
252
|
+
status: 'fetch_failed',
|
|
253
|
+
error: 'No server response for this serial',
|
|
254
|
+
generated_at: new Date().toISOString(),
|
|
255
|
+
};
|
|
256
|
+
fs.writeFileSync(outPath, JSON.stringify(rep, null, 2));
|
|
257
|
+
summary.processed += 1;
|
|
258
|
+
summary.fetch_failed += 1;
|
|
259
|
+
summary.findings_per_proband[biowallet] = 0;
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
const report = {
|
|
263
|
+
biowallet,
|
|
264
|
+
status: per.status,
|
|
265
|
+
job_id: per.job_id,
|
|
266
|
+
biocid: per.biocid,
|
|
267
|
+
n_clinvar_p_lp_findings: per.n_clinvar_p_lp_findings || 0,
|
|
268
|
+
findings: per.findings || [],
|
|
269
|
+
error: per.error,
|
|
270
|
+
methodology: summary.methodology,
|
|
271
|
+
generated_at: new Date().toISOString(),
|
|
272
|
+
from_reused_cache: fromReuse,
|
|
273
|
+
};
|
|
274
|
+
fs.writeFileSync(outPath, JSON.stringify(report, null, 2));
|
|
275
|
+
summary.processed += 1;
|
|
276
|
+
if (per.status === 'ok')
|
|
277
|
+
summary.ok += 1;
|
|
278
|
+
else if (per.status === 'no_annotation')
|
|
279
|
+
summary.no_annotation += 1;
|
|
280
|
+
else
|
|
281
|
+
summary.fetch_failed += 1;
|
|
282
|
+
const n = report.n_clinvar_p_lp_findings;
|
|
283
|
+
summary.findings_per_proband[biowallet] = n;
|
|
284
|
+
for (const f of report.findings || []) {
|
|
285
|
+
// Accept either new server schema (base__hugo) or legacy local schema (gene)
|
|
286
|
+
const fr = f;
|
|
287
|
+
const gene = String(fr.base__hugo || fr.gene || '-');
|
|
288
|
+
summary.findings_per_gene[gene] = (summary.findings_per_gene[gene] || 0) + 1;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
summary.finished_at = new Date().toISOString();
|
|
292
|
+
const summaryPath = path.join(outDir, 'cohort_summary.json');
|
|
293
|
+
fs.writeFileSync(summaryPath, JSON.stringify(summary, null, 2));
|
|
294
|
+
if (!opts.quiet) {
|
|
295
|
+
console.log('');
|
|
296
|
+
console.log(chalk_1.default.cyan('═'.repeat(80)));
|
|
297
|
+
console.log(chalk_1.default.bold(' COHORT ACMG SUMMARY'));
|
|
298
|
+
console.log(chalk_1.default.cyan('═'.repeat(80)));
|
|
299
|
+
console.log(` cohort_size: ${summary.cohort_size}`);
|
|
300
|
+
console.log(` processed: ${summary.processed}`);
|
|
301
|
+
console.log(` ok: ${summary.ok}`);
|
|
302
|
+
console.log(` no_annotation: ${summary.no_annotation}`);
|
|
303
|
+
console.log(` fetch_failed: ${summary.fetch_failed}`);
|
|
304
|
+
console.log(` skipped_existing: ${summary.skipped_existing}`);
|
|
305
|
+
console.log(chalk_1.default.cyan('─'.repeat(80)));
|
|
306
|
+
const probandsWithFindings = Object.values(summary.findings_per_proband).filter(n => n > 0).length;
|
|
307
|
+
console.log(` probands with >=1 P+LP finding: ${probandsWithFindings}`);
|
|
308
|
+
const totalFindings = Object.values(summary.findings_per_proband).reduce((a, b) => a + b, 0);
|
|
309
|
+
console.log(` total P+LP findings: ${totalFindings}`);
|
|
310
|
+
const topGenes = Object.entries(summary.findings_per_gene)
|
|
311
|
+
.sort((a, b) => b[1] - a[1]).slice(0, 10);
|
|
312
|
+
console.log(` top genes by hit count:`);
|
|
313
|
+
for (const [g, n] of topGenes)
|
|
314
|
+
console.log(` ${g.padEnd(14)} ${n}`);
|
|
315
|
+
console.log(chalk_1.default.cyan('═'.repeat(80)));
|
|
316
|
+
console.log(chalk_1.default.green(`✓ Summary at ${summaryPath}`));
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=cohort-acmg.js.map
|