@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 @@
|
|
|
1
|
+
{"version":3,"file":"gene-map.d.ts","sourceRoot":"","sources":["../../src/lib/gene-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoDlD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyC/C,CAAC;AAEF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExD;AAED,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared gene-to-UniProt and gene-to-Pfam mapping for the biofs-rrm pipeline.
|
|
4
|
+
*
|
|
5
|
+
* Previously each verb (rrm-consensus, rrm-distribution, rrm-train, fourier-score)
|
|
6
|
+
* carried its own local copy of these maps, which led to drift and bugs where
|
|
7
|
+
* cohort-train would call rrm-train against a gene that rrm-consensus knew
|
|
8
|
+
* about but rrm-train did not. This module is the single source of truth.
|
|
9
|
+
*
|
|
10
|
+
* To add a new gene to the pipeline:
|
|
11
|
+
* 1. Add an entry to GENE_TO_UNIPROT with the canonical UniProt accession.
|
|
12
|
+
* 2. Add an entry to GENE_TO_PFAM with the most representative Pfam family
|
|
13
|
+
* ID (used by rrm-consensus for ortholog sequence retrieval).
|
|
14
|
+
* 3. No other code changes required; all verbs will see the new gene.
|
|
15
|
+
*
|
|
16
|
+
* Sources:
|
|
17
|
+
* - UniProt accessions verified against https://www.uniprot.org
|
|
18
|
+
* - Pfam family IDs from InterPro / Pfam at https://www.ebi.ac.uk/interpro
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.GENE_TO_PFAM = exports.GENE_TO_UNIPROT = void 0;
|
|
22
|
+
exports.getUniProt = getUniProt;
|
|
23
|
+
exports.getPfam = getPfam;
|
|
24
|
+
exports.listKnownGenes = listKnownGenes;
|
|
25
|
+
exports.GENE_TO_UNIPROT = {
|
|
26
|
+
// GT classifier base case (Case 1)
|
|
27
|
+
ITGA2B: 'P08514',
|
|
28
|
+
ITGB3: 'P05106',
|
|
29
|
+
// Case 2 (adult male, skeletal dysplasia, oligogenic candidates)
|
|
30
|
+
COL27A1: 'Q8IZC6',
|
|
31
|
+
NRCAM: 'Q92823',
|
|
32
|
+
TSPAN6: 'O43657',
|
|
33
|
+
PGAP1: 'Q75T13',
|
|
34
|
+
DCLK2: 'Q8N568',
|
|
35
|
+
HSPB2: 'Q16082',
|
|
36
|
+
SLC12A3: 'P55017',
|
|
37
|
+
// Case 3 (female pediatric epilepsy)
|
|
38
|
+
KMT5B: 'Q4FZB7', // Histone-lysine N-methyltransferase KMT5B (SUV4-20H1)
|
|
39
|
+
CHD2: 'O14647', // Chromodomain-helicase-DNA-binding protein 2
|
|
40
|
+
GRIN2A: 'Q12879', // Glutamate receptor ionotropic, NMDA 2A
|
|
41
|
+
// Case 4 (family vault fam_53a4ab0d299b — purine-pathway SCID carriers)
|
|
42
|
+
ADA: 'P00813', // Adenosine deaminase
|
|
43
|
+
PNP: 'P00491', // Purine nucleoside phosphorylase
|
|
44
|
+
// Case 5 (family vault fam_a42767ead27a)
|
|
45
|
+
AIRE: 'O43918',
|
|
46
|
+
// F7 is splice-region in Case 5, no missense scoring needed
|
|
47
|
+
// Cases 6, 8, 9
|
|
48
|
+
PDE11A: 'Q9HCR9', // Case 6
|
|
49
|
+
SLC24A4: 'Q8NFF2', // Case 6
|
|
50
|
+
KDM5C: 'P41229', // Case 9
|
|
51
|
+
HERC1: 'Q15751', // Case 9
|
|
52
|
+
// Cohort benchmark: periodicity-rich arm
|
|
53
|
+
COL1A1: 'P02452',
|
|
54
|
+
COL3A1: 'P02461',
|
|
55
|
+
COL7A1: 'Q02388',
|
|
56
|
+
FBN1: 'P35555',
|
|
57
|
+
TTN: 'Q8WZ42',
|
|
58
|
+
NEB: 'P20929',
|
|
59
|
+
// Cohort benchmark: compositional/structural arm
|
|
60
|
+
BRCA1: 'P38398',
|
|
61
|
+
BRCA2: 'P51587',
|
|
62
|
+
TP53: 'P04637',
|
|
63
|
+
MLH1: 'P40692',
|
|
64
|
+
MSH2: 'P43246',
|
|
65
|
+
CFTR: 'P13569',
|
|
66
|
+
LDLR: 'P01130',
|
|
67
|
+
// Case 1 son cross-reference (LCHAD candidate)
|
|
68
|
+
HADHA: 'P40939', // HADHA (alpha subunit MTP / LCHAD)
|
|
69
|
+
};
|
|
70
|
+
exports.GENE_TO_PFAM = {
|
|
71
|
+
ITGA2B: 'PF08441', // Integrin_alpha
|
|
72
|
+
ITGB3: 'PF00362', // Integrin beta
|
|
73
|
+
COL27A1: 'PF01391', // Collagen
|
|
74
|
+
NRCAM: 'PF00041', // fn3
|
|
75
|
+
TSPAN6: 'PF00335', // Tetraspanin
|
|
76
|
+
PGAP1: 'PF02230', // Abhydro_lipase
|
|
77
|
+
DCLK2: 'PF03607', // DCX doublecortin
|
|
78
|
+
HSPB2: 'PF00011', // HSP20
|
|
79
|
+
SLC12A3: 'PF03522', // SLC12
|
|
80
|
+
KMT5B: 'PF00856', // SET
|
|
81
|
+
CHD2: 'PF00271', // Helicase_C
|
|
82
|
+
GRIN2A: 'PF00060', // Lig_chan
|
|
83
|
+
ADA: 'PF00962', // A_deaminase
|
|
84
|
+
PNP: 'PF01048', // PNP_UDP_1
|
|
85
|
+
AIRE: 'PF00643', // zf-B_box
|
|
86
|
+
PDE11A: 'PF00233', // PDEase_I
|
|
87
|
+
SLC24A4: 'PF01699', // Na_Ca_exchanger
|
|
88
|
+
KDM5C: 'PF02373', // JmjC
|
|
89
|
+
HERC1: 'PF00400', // WD40
|
|
90
|
+
COL1A1: 'PF01391', // Collagen
|
|
91
|
+
COL3A1: 'PF01391',
|
|
92
|
+
COL7A1: 'PF01391',
|
|
93
|
+
FBN1: 'PF07645', // EGF_CA
|
|
94
|
+
TTN: 'PF00041', // fn3
|
|
95
|
+
NEB: 'PF00880', // Nebulin
|
|
96
|
+
BRCA1: 'PF00533', // BRCT
|
|
97
|
+
BRCA2: 'PF09104', // BRCA-2_helical
|
|
98
|
+
TP53: 'PF00870', // P53
|
|
99
|
+
MLH1: 'PF01119', // DNA_mis_repair
|
|
100
|
+
MSH2: 'PF01624', // MutS_I
|
|
101
|
+
CFTR: 'PF00664', // ABC_membrane
|
|
102
|
+
LDLR: 'PF00057', // Ldl_recept_a
|
|
103
|
+
HADHA: 'PF00378', // ECH_1
|
|
104
|
+
};
|
|
105
|
+
function getUniProt(gene) {
|
|
106
|
+
return exports.GENE_TO_UNIPROT[gene.toUpperCase()];
|
|
107
|
+
}
|
|
108
|
+
function getPfam(gene) {
|
|
109
|
+
return exports.GENE_TO_PFAM[gene.toUpperCase()];
|
|
110
|
+
}
|
|
111
|
+
function listKnownGenes() {
|
|
112
|
+
return Object.keys(exports.G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C3B,IAAI,EAAK,SAAS,EAAG,iBAAiB;IACtC,IAAI,EAAK,SAAS,EAAG,SAAS;IAC9B,IAAI,EAAK,SAAS,EAAG,eAAe;IACpC,IAAI,EAAK,SAAS,EAAG,eAAe;IAEpC,KAAK,EAAI,SAAS,EAAG,QAAQ;CAC9B,CAAC;AAEF,SAAgB,UAAU,CAAC,IAAY;IACrC,OAAO,uBAAe,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,OAAO,CAAC,IAAY;IAClC,OAAO,oBAAY,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,cAAc;IAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,uBAAe,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Fetches a ticket (a JSON pointer to one or more byte-range URLs) from the
|
|
5
5
|
* htsget endpoint, then the caller is responsible for streaming those URLs
|
|
6
|
-
* in order. This keeps us aligned with bcftools/samtools/pysam which all
|
|
6
|
+
* in order. This keeps us aligned with bcftools/samtools/pysam/IGV which all
|
|
7
7
|
* speak htsget natively.
|
|
8
8
|
*
|
|
9
9
|
* See: https://samtools.github.io/hts-specs/htsget.html
|
|
10
10
|
*/
|
|
11
|
+
export declare const DEFAULT_HTSGET_URL: string;
|
|
12
|
+
export declare const USER_AGENT = "biofs/3.18.0 (+https://genobank.io; telebioinformatics)";
|
|
11
13
|
export type HtsgetKind = 'variants' | 'reads';
|
|
12
14
|
export interface HtsgetTicketUrl {
|
|
13
15
|
url: string;
|
|
@@ -42,13 +44,34 @@ export interface HtsgetServiceInfo {
|
|
|
42
44
|
export interface HtsgetClientOpts {
|
|
43
45
|
/** Base URL of htsget service. Default: https://htsget.genobank.app */
|
|
44
46
|
baseUrl?: string;
|
|
45
|
-
/** Optional override for query params (e.g. referenceName, start, end). */
|
|
47
|
+
/** Optional override for query params (e.g. referenceName, start, end, annotated). */
|
|
46
48
|
query?: Record<string, string | number | undefined>;
|
|
47
49
|
}
|
|
50
|
+
export interface GenomicRegion {
|
|
51
|
+
referenceName: string;
|
|
52
|
+
start?: number;
|
|
53
|
+
end?: number;
|
|
54
|
+
raw: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parse regions like:
|
|
58
|
+
* chr17
|
|
59
|
+
* chr17:7661779
|
|
60
|
+
* chr17:7661779-7687538
|
|
61
|
+
* 17:7661779-7687538
|
|
62
|
+
*
|
|
63
|
+
* User coordinates are treated as 1-based inclusive (VCF/IGV style).
|
|
64
|
+
* htsget wants 0-based half-open; we convert start-=1 when start is set.
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseGenomicRegion(region: string): GenomicRegion | null;
|
|
67
|
+
/** Guess `variants` vs `reads` from a filename or biocid. */
|
|
68
|
+
export declare function guessKindFromFilename(filename: string): HtsgetKind;
|
|
69
|
+
/** Whether this name is streamable via htsget reads/variants. */
|
|
70
|
+
export declare function streamableExtension(filename: string): boolean;
|
|
48
71
|
/** Fetch the GA4GH service-info JSON. No auth required. */
|
|
49
72
|
export declare function getServiceInfo(opts?: HtsgetClientOpts): Promise<HtsgetServiceInfo>;
|
|
50
|
-
/** Fetch a ticket. `id` is usually
|
|
73
|
+
/** Fetch a ticket. `id` is usually a filename / ip_id but can also be a full BioCID URL. */
|
|
51
74
|
export declare function getTicket(kind: HtsgetKind, id: string, signature: string, opts?: HtsgetClientOpts): Promise<HtsgetTicket>;
|
|
52
|
-
/**
|
|
53
|
-
export declare function
|
|
75
|
+
/** Build a bookmarkable ticket request URL (without Bearer; for debugging). */
|
|
76
|
+
export declare function buildTicketRequestUrl(kind: HtsgetKind, id: string, opts?: HtsgetClientOpts): string;
|
|
54
77
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/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ACjB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAmBvE;AAED,6DAA6D;AAC7D,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAiBlE;AAED,iEAAiE;AACjE,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAgB7D;AAED,2DAA2D;AAC3D,wBAAsB,cAAc,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAS5F;AAED,4FAA4F;AAC5F,wBAAsB,SAAS,CAC7B,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAuCvB;AAED,+EAA+E;AAC/E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,gBAAqB,GAC1B,MAAM,CAaR"}
|
|
@@ -4,35 +4,104 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Fetches a ticket (a JSON pointer to one or more byte-range URLs) from the
|
|
6
6
|
* htsget endpoint, then the caller is responsible for streaming those URLs
|
|
7
|
-
* in order. This keeps us aligned with bcftools/samtools/pysam which all
|
|
7
|
+
* in order. This keeps us aligned with bcftools/samtools/pysam/IGV which all
|
|
8
8
|
* speak htsget natively.
|
|
9
9
|
*
|
|
10
10
|
* See: https://samtools.github.io/hts-specs/htsget.html
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.USER_AGENT = exports.DEFAULT_HTSGET_URL = void 0;
|
|
14
|
+
exports.parseGenomicRegion = parseGenomicRegion;
|
|
15
|
+
exports.guessKindFromFilename = guessKindFromFilename;
|
|
16
|
+
exports.streamableExtension = streamableExtension;
|
|
13
17
|
exports.getServiceInfo = getServiceInfo;
|
|
14
18
|
exports.getTicket = getTicket;
|
|
15
|
-
exports.
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
exports.buildTicketRequestUrl = buildTicketRequestUrl;
|
|
20
|
+
exports.DEFAULT_HTSGET_URL = process.env.BIOFS_HTSGET_URL || 'https://htsget.genobank.app';
|
|
21
|
+
exports.USER_AGENT = 'biofs/3.18.0 (+https://genobank.io; telebioinformatics)';
|
|
22
|
+
/**
|
|
23
|
+
* Parse regions like:
|
|
24
|
+
* chr17
|
|
25
|
+
* chr17:7661779
|
|
26
|
+
* chr17:7661779-7687538
|
|
27
|
+
* 17:7661779-7687538
|
|
28
|
+
*
|
|
29
|
+
* User coordinates are treated as 1-based inclusive (VCF/IGV style).
|
|
30
|
+
* htsget wants 0-based half-open; we convert start-=1 when start is set.
|
|
31
|
+
*/
|
|
32
|
+
function parseGenomicRegion(region) {
|
|
33
|
+
const raw = (region || '').trim();
|
|
34
|
+
if (!raw)
|
|
35
|
+
return null;
|
|
36
|
+
// chr:start-end | chr:start | chr
|
|
37
|
+
const m = raw.match(/^([^:]+)(?::(\d+)(?:-(\d+))?)?$/);
|
|
38
|
+
if (!m)
|
|
39
|
+
return null;
|
|
40
|
+
const referenceName = m[1];
|
|
41
|
+
const start1 = m[2] !== undefined ? parseInt(m[2], 10) : undefined;
|
|
42
|
+
const end1 = m[3] !== undefined ? parseInt(m[3], 10) : undefined;
|
|
43
|
+
const out = { referenceName, raw };
|
|
44
|
+
if (start1 !== undefined && !Number.isNaN(start1)) {
|
|
45
|
+
// htsget: 0-based inclusive start
|
|
46
|
+
out.start = Math.max(0, start1 - 1);
|
|
47
|
+
}
|
|
48
|
+
if (end1 !== undefined && !Number.isNaN(end1)) {
|
|
49
|
+
// htsget: 0-based exclusive end ≈ 1-based inclusive end
|
|
50
|
+
out.end = end1;
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
/** Guess `variants` vs `reads` from a filename or biocid. */
|
|
55
|
+
function guessKindFromFilename(filename) {
|
|
56
|
+
const lower = filename.toLowerCase();
|
|
57
|
+
if (lower.endsWith('.bam') ||
|
|
58
|
+
lower.endsWith('.cram') ||
|
|
59
|
+
lower.endsWith('.sam') ||
|
|
60
|
+
lower.endsWith('.fastq') ||
|
|
61
|
+
lower.endsWith('.fastq.gz') ||
|
|
62
|
+
lower.endsWith('.fq') ||
|
|
63
|
+
lower.endsWith('.fq.gz') ||
|
|
64
|
+
lower.includes('/bam/') ||
|
|
65
|
+
lower.includes('/cram/') ||
|
|
66
|
+
lower.includes('/fastq/')) {
|
|
67
|
+
return 'reads';
|
|
68
|
+
}
|
|
69
|
+
return 'variants';
|
|
70
|
+
}
|
|
71
|
+
/** Whether this name is streamable via htsget reads/variants. */
|
|
72
|
+
function streamableExtension(filename) {
|
|
73
|
+
const lower = filename.toLowerCase();
|
|
74
|
+
return (lower.endsWith('.vcf') ||
|
|
75
|
+
lower.endsWith('.vcf.gz') ||
|
|
76
|
+
lower.endsWith('.bcf') ||
|
|
77
|
+
lower.endsWith('.g.vcf') ||
|
|
78
|
+
lower.endsWith('.g.vcf.gz') ||
|
|
79
|
+
lower.endsWith('.bam') ||
|
|
80
|
+
lower.endsWith('.cram') ||
|
|
81
|
+
lower.endsWith('.sam') ||
|
|
82
|
+
lower.endsWith('.fastq') ||
|
|
83
|
+
lower.endsWith('.fastq.gz') ||
|
|
84
|
+
lower.endsWith('.fq') ||
|
|
85
|
+
lower.endsWith('.fq.gz'));
|
|
86
|
+
}
|
|
18
87
|
/** Fetch the GA4GH service-info JSON. No auth required. */
|
|
19
88
|
async function getServiceInfo(opts = {}) {
|
|
20
|
-
const base = (opts.baseUrl || DEFAULT_HTSGET_URL).replace(/\/+$/, '');
|
|
89
|
+
const base = (opts.baseUrl || exports.DEFAULT_HTSGET_URL).replace(/\/+$/, '');
|
|
21
90
|
const res = await fetch(`${base}/service-info`, {
|
|
22
|
-
headers: { 'User-Agent': USER_AGENT, Accept: 'application/json' },
|
|
91
|
+
headers: { 'User-Agent': exports.USER_AGENT, Accept: 'application/json' },
|
|
23
92
|
});
|
|
24
93
|
if (!res.ok) {
|
|
25
94
|
throw new Error(`htsget service-info → HTTP ${res.status}`);
|
|
26
95
|
}
|
|
27
96
|
return (await res.json());
|
|
28
97
|
}
|
|
29
|
-
/** Fetch a ticket. `id` is usually
|
|
98
|
+
/** Fetch a ticket. `id` is usually a filename / ip_id but can also be a full BioCID URL. */
|
|
30
99
|
async function getTicket(kind, id, signature, opts = {}) {
|
|
31
|
-
const base = (opts.baseUrl || DEFAULT_HTSGET_URL).replace(/\/+$/, '');
|
|
100
|
+
const base = (opts.baseUrl || exports.DEFAULT_HTSGET_URL).replace(/\/+$/, '');
|
|
32
101
|
// If caller passed a full BioCID URL, pull the last segment as the id.
|
|
33
102
|
let cleanId = id;
|
|
34
|
-
if (id.startsWith('biocid://')) {
|
|
35
|
-
const parts = id.replace(/\/+$/, '').split('/');
|
|
103
|
+
if (id.startsWith('biocid://') || id.startsWith('Biocid:')) {
|
|
104
|
+
const parts = id.replace(/^Biocid:/i, 'biocid://').replace(/\/+$/, '').split('/');
|
|
36
105
|
cleanId = parts[parts.length - 1];
|
|
37
106
|
}
|
|
38
107
|
const qs = new URLSearchParams();
|
|
@@ -45,7 +114,7 @@ async function getTicket(kind, id, signature, opts = {}) {
|
|
|
45
114
|
const url = `${base}/${kind}/${encodeURIComponent(cleanId)}${qs.toString() ? '?' + qs.toString() : ''}`;
|
|
46
115
|
const res = await fetch(url, {
|
|
47
116
|
headers: {
|
|
48
|
-
'User-Agent': USER_AGENT,
|
|
117
|
+
'User-Agent': exports.USER_AGENT,
|
|
49
118
|
Accept: 'application/json',
|
|
50
119
|
Authorization: `Bearer ${signature}`,
|
|
51
120
|
},
|
|
@@ -58,7 +127,7 @@ async function getTicket(kind, id, signature, opts = {}) {
|
|
|
58
127
|
try {
|
|
59
128
|
parsed = JSON.parse(bodyText);
|
|
60
129
|
}
|
|
61
|
-
catch
|
|
130
|
+
catch {
|
|
62
131
|
throw new Error(`htsget ticket not JSON: ${bodyText.slice(0, 200)}`);
|
|
63
132
|
}
|
|
64
133
|
if (!parsed.htsget || !parsed.htsget.urls) {
|
|
@@ -66,11 +135,20 @@ async function getTicket(kind, id, signature, opts = {}) {
|
|
|
66
135
|
}
|
|
67
136
|
return parsed.htsget;
|
|
68
137
|
}
|
|
69
|
-
/**
|
|
70
|
-
function
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
138
|
+
/** Build a bookmarkable ticket request URL (without Bearer; for debugging). */
|
|
139
|
+
function buildTicketRequestUrl(kind, id, opts = {}) {
|
|
140
|
+
const base = (opts.baseUrl || exports.DEFAULT_HTSGET_URL).replace(/\/+$/, '');
|
|
141
|
+
let cleanId = id;
|
|
142
|
+
if (id.startsWith('biocid://')) {
|
|
143
|
+
cleanId = id.replace(/\/+$/, '').split('/').pop() || id;
|
|
144
|
+
}
|
|
145
|
+
const qs = new URLSearchParams();
|
|
146
|
+
if (opts.query) {
|
|
147
|
+
for (const [k, v] of Object.entries(opts.query)) {
|
|
148
|
+
if (v !== undefined && v !== null && v !== '')
|
|
149
|
+
qs.set(k, String(v));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return `${base}/${kind}/${encodeURIComponent(cleanId)}${qs.toString() ? '?' + qs.toString() : ''}`;
|
|
75
153
|
}
|
|
76
154
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/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AAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE;gBAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IACD,OAAO,GAAG,IAAI,IAAI,IAAI,IAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACrG,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BioAgentRegistry — ERC-8004 AI Agent Identity + Reputation Registry (Sequentia)
|
|
3
|
+
*
|
|
4
|
+
* Thin ethers v6 wrapper over the deployed BioAgentRegistry contract
|
|
5
|
+
* (0x24e634E570Ca8aE366aF4ae8861492a1e9B06B6B on Sequentia chain 15132025).
|
|
6
|
+
*
|
|
7
|
+
* The contract implements the ERC-8004 Identity Registry + Reputation Registry
|
|
8
|
+
* and the x402 payment-proof flow:
|
|
9
|
+
* - register(agentURI, supportedFormats, x402Enabled) → one agent per wallet
|
|
10
|
+
* - requestBioAssetAccess(bioipId, paymentMethod) → initiates x402 access
|
|
11
|
+
* - submitPaymentProof(bioipId, txHash, chainId, usdc) → records a payment
|
|
12
|
+
* - getAgent(agentId) / walletToAgent(wallet) → discovery (read-only)
|
|
13
|
+
*
|
|
14
|
+
* Two modes:
|
|
15
|
+
* - read-only: new BioAgentRegistry() (provider only — getAgent/walletToAgent)
|
|
16
|
+
* - signing: new BioAgentRegistry(privateKey) (register / submitPaymentProof)
|
|
17
|
+
*
|
|
18
|
+
* The deployer/operator is the contract owner (verifyPayment is onlyOwner). Each
|
|
19
|
+
* agent registers ITSELF (register() is msg.sender-bound), so register() must be
|
|
20
|
+
* called from the agent's own wallet key.
|
|
21
|
+
*/
|
|
22
|
+
import { ethers } from 'ethers';
|
|
23
|
+
export declare const BIOAGENT_REGISTRY_ADDRESS: string;
|
|
24
|
+
export interface AgentRecord {
|
|
25
|
+
agentId: number;
|
|
26
|
+
agentURI: string;
|
|
27
|
+
agentWallet: string;
|
|
28
|
+
x402Enabled: boolean;
|
|
29
|
+
totalSpent: string;
|
|
30
|
+
reputationScore: number;
|
|
31
|
+
active: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PaymentProofResult {
|
|
34
|
+
paymentId: number | null;
|
|
35
|
+
bioipId: string;
|
|
36
|
+
paymentTxHash: string;
|
|
37
|
+
chainId: number;
|
|
38
|
+
usdcAmount: string;
|
|
39
|
+
proofTxHash: string;
|
|
40
|
+
}
|
|
41
|
+
export declare class BioAgentRegistry {
|
|
42
|
+
readonly provider: ethers.JsonRpcProvider;
|
|
43
|
+
readonly signer: ethers.Wallet | null;
|
|
44
|
+
readonly contract: ethers.Contract;
|
|
45
|
+
readonly address: string;
|
|
46
|
+
constructor(privateKey?: string);
|
|
47
|
+
get walletAddress(): string | null;
|
|
48
|
+
/** agentId for a wallet (0 = not registered). Read-only. */
|
|
49
|
+
agentIdOf(wallet: string): Promise<number>;
|
|
50
|
+
/** Full agent record by id, or null if id is 0 / unregistered. Read-only. */
|
|
51
|
+
getAgent(agentId: number): Promise<AgentRecord | null>;
|
|
52
|
+
/** Convenience: resolve an agent record straight from its wallet. */
|
|
53
|
+
getAgentByWallet(wallet: string): Promise<AgentRecord | null>;
|
|
54
|
+
/**
|
|
55
|
+
* Register the signing wallet as an ERC-8004 agent. Idempotent: returns the
|
|
56
|
+
* existing agentId if already registered (the contract reverts on re-register,
|
|
57
|
+
* so we pre-check walletToAgent).
|
|
58
|
+
*/
|
|
59
|
+
register(agentURI: string, supportedFormats: string[], x402Enabled?: boolean): Promise<{
|
|
60
|
+
agentId: number;
|
|
61
|
+
txHash: string | null;
|
|
62
|
+
alreadyRegistered: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Record an x402 payment proof against a BioAsset. msg.sender must be a
|
|
66
|
+
* registered agent (the agent submits proof that it was paid usdcAmount over
|
|
67
|
+
* the dataset identified by bioipId; paymentTxHash is the seqUSDC settlement).
|
|
68
|
+
*
|
|
69
|
+
* bioipId here is the PUBLIC asset identifier keccak256(biocid) — distinct from
|
|
70
|
+
* the salted consent bioipId, which only the BioRouter server can derive.
|
|
71
|
+
*/
|
|
72
|
+
submitPaymentProof(bioipId: string, paymentTxHash: string, chainId: number, usdcAmount6dec: bigint): Promise<PaymentProofResult>;
|
|
73
|
+
/** ERC-8004 access request (emits AccessRequested; checks BioRouter consent). */
|
|
74
|
+
requestBioAssetAccess(bioipId: string, paymentMethod?: string): Promise<string>;
|
|
75
|
+
/** Highest assigned paymentId (nextPaymentId - 1 = count of proofs submitted). */
|
|
76
|
+
paymentCount(): Promise<number>;
|
|
77
|
+
/** Read a payment proof record by id. Read-only. */
|
|
78
|
+
getPayment(paymentId: number): Promise<{
|
|
79
|
+
agentId: number;
|
|
80
|
+
bioipId: string;
|
|
81
|
+
paymentTxHash: string;
|
|
82
|
+
chainId: number;
|
|
83
|
+
usdcAmount: string;
|
|
84
|
+
bioipEquivalent: string;
|
|
85
|
+
timestamp: number;
|
|
86
|
+
verified: boolean;
|
|
87
|
+
} | null>;
|
|
88
|
+
/**
|
|
89
|
+
* Verify a payment proof (onlyOwner): marks it verified and credits the
|
|
90
|
+
* agent's totalSpent with the BIOIP-equivalent. Requires the registry OWNER
|
|
91
|
+
* key (the contract deployer/oracle).
|
|
92
|
+
*/
|
|
93
|
+
verifyPayment(paymentId: number): Promise<string>;
|
|
94
|
+
/** Public asset identifier for a BioCID (NOT the salted consent bioipId). */
|
|
95
|
+
static assetIdForBiocid(biocid: string): string;
|
|
96
|
+
}
|
|
97
|
+
export default BioAgentRegistry;
|
|
98
|
+
//# sourceMappingURL=BioAgentRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BioAgentRegistry.d.ts","source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