@genobank/biofs 3.17.3 → 3.19.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/dist/commands/benchmark.d.ts.map +1 -1
- package/dist/commands/benchmark.js +2 -1
- package/dist/commands/benchmark.js.map +1 -1
- 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/duet.d.ts.map +1 -1
- package/dist/commands/duet.js +2 -1
- package/dist/commands/duet.js.map +1 -1
- 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/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/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/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/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.map +1 -1
- package/dist/commands/researcher/register.js +4 -2
- package/dist/commands/researcher/register.js.map +1 -1
- 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/somatic-mutect/exec.d.ts +32 -0
- package/dist/commands/somatic-mutect/exec.d.ts.map +1 -0
- package/dist/commands/somatic-mutect/exec.js +266 -0
- package/dist/commands/somatic-mutect/exec.js.map +1 -0
- package/dist/commands/somatic-mutect/submit.d.ts +25 -0
- package/dist/commands/somatic-mutect/submit.d.ts.map +1 -0
- package/dist/commands/somatic-mutect/submit.js +85 -0
- package/dist/commands/somatic-mutect/submit.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/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/index.js +597 -21
- package/dist/index.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/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/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/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const commander_1 = require("commander");
|
|
8
8
|
// FLUENCY_LINEAGE_VERBS_20260730
|
|
9
9
|
const fluency_1 = require("./commands/fluency");
|
|
10
|
+
// CONSENT_VERBS_20260730
|
|
11
|
+
const consent_1 = require("./commands/consent");
|
|
10
12
|
const lineage_1 = require("./commands/lineage");
|
|
13
|
+
// BIODATA_ROOM_20260801: dual profiles + researcher biodata room
|
|
14
|
+
const profile_1 = require("./commands/profile");
|
|
15
|
+
const room_1 = require("./commands/room");
|
|
11
16
|
const version_1 = require("./version");
|
|
12
17
|
const chalk_1 = __importDefault(require("chalk"));
|
|
13
18
|
const login_1 = require("./commands/login");
|
|
@@ -48,10 +53,12 @@ const results_1 = require("./commands/job/results");
|
|
|
48
53
|
const list_3 = require("./commands/job/list");
|
|
49
54
|
const pipelines_1 = require("./commands/job/pipelines");
|
|
50
55
|
// v2.7.0: htsget + smart streaming + aliases
|
|
56
|
+
// v3.18.0: TeleBioinformatics (`biofs tele`) + region stream
|
|
51
57
|
const stream_1 = require("./commands/stream");
|
|
52
58
|
const pipe_1 = require("./commands/pipe");
|
|
53
59
|
const alias_1 = require("./commands/alias");
|
|
54
60
|
const htsget_1 = require("./commands/htsget");
|
|
61
|
+
const tele_1 = require("./commands/tele");
|
|
55
62
|
const submit_clara_1 = require("./commands/job/submit-clara");
|
|
56
63
|
const recall_1 = require("./commands/job/recall");
|
|
57
64
|
const create_2 = require("./commands/context/create");
|
|
@@ -106,12 +113,14 @@ const submit_13 = require("./commands/phase/submit");
|
|
|
106
113
|
const exec_11 = require("./commands/phase/exec");
|
|
107
114
|
const submit_14 = require("./commands/hifi-deepvariant/submit");
|
|
108
115
|
const exec_12 = require("./commands/hifi-deepvariant/exec");
|
|
109
|
-
const submit_15 = require("./commands/
|
|
110
|
-
const exec_13 = require("./commands/
|
|
111
|
-
const submit_16 = require("./commands/
|
|
112
|
-
const exec_14 = require("./commands/
|
|
113
|
-
const submit_17 = require("./commands/
|
|
114
|
-
const exec_15 = require("./commands/
|
|
116
|
+
const submit_15 = require("./commands/somatic-mutect/submit");
|
|
117
|
+
const exec_13 = require("./commands/somatic-mutect/exec");
|
|
118
|
+
const submit_16 = require("./commands/liftover/submit");
|
|
119
|
+
const exec_14 = require("./commands/liftover/exec");
|
|
120
|
+
const submit_17 = require("./commands/dipcall/submit");
|
|
121
|
+
const exec_15 = require("./commands/dipcall/exec");
|
|
122
|
+
const submit_18 = require("./commands/hifi-methyl/submit");
|
|
123
|
+
const exec_16 = require("./commands/hifi-methyl/exec");
|
|
115
124
|
const workspace_1 = require("./commands/workspace");
|
|
116
125
|
const duet_1 = require("./commands/duet");
|
|
117
126
|
const benchmark_1 = require("./commands/benchmark");
|
|
@@ -120,7 +129,7 @@ const route_1 = require("./commands/route");
|
|
|
120
129
|
const anchor_1 = require("./commands/route/anchor");
|
|
121
130
|
const status_6 = require("./commands/annotate/status");
|
|
122
131
|
const x402_1 = require("./commands/x402");
|
|
123
|
-
const
|
|
132
|
+
const submit_19 = require("./commands/interpret/submit");
|
|
124
133
|
const status_7 = require("./commands/interpret/status");
|
|
125
134
|
const somos_1 = require("./commands/ancestry/somos");
|
|
126
135
|
const status_8 = require("./commands/ancestry/status");
|
|
@@ -170,6 +179,7 @@ const claim_1 = require("./commands/claim");
|
|
|
170
179
|
const fingerprint_1 = require("./commands/fingerprint");
|
|
171
180
|
const register_2 = require("./commands/researcher/register");
|
|
172
181
|
const status_9 = require("./commands/researcher/status");
|
|
182
|
+
const passport_1 = require("./commands/researcher/passport");
|
|
173
183
|
const errorReporter_1 = require("./utils/errorReporter");
|
|
174
184
|
const logger_1 = require("./lib/utils/logger");
|
|
175
185
|
const errorReporter_2 = require("./utils/errorReporter");
|
|
@@ -481,10 +491,15 @@ program
|
|
|
481
491
|
// stream - htsget stream to stdout (pipes into any bioinformatics tool)
|
|
482
492
|
program
|
|
483
493
|
.command('stream <id>')
|
|
484
|
-
.description('Stream a BioNFT-gated VCF/BAM to stdout via htsget (pipe into bcftools/samtools/pysam)')
|
|
494
|
+
.description('Stream a BioNFT-gated VCF/BAM/CRAM/FASTQ to stdout via htsget (pipe into bcftools/samtools/pysam/seqkit)')
|
|
485
495
|
.option('--kind <variants|reads>', 'force datatype (default: auto-detect from filename)')
|
|
486
496
|
.option('--htsget-url <url>', 'override htsget endpoint (default: https://htsget.genobank.app)')
|
|
487
497
|
.option('--annotated', 'stream the OpenCRAVAT-annotated VCF sibling (Phase D) instead of raw')
|
|
498
|
+
.option('--region <chr:start-end>', 'genomic region (forwarded to htsget; client tools may also filter)')
|
|
499
|
+
.option('--referenceName <chr>', 'htsget referenceName (alias of region chrom)')
|
|
500
|
+
.option('--start <n>', 'htsget start (0-based if set with --referenceName)')
|
|
501
|
+
.option('--end <n>', 'htsget end')
|
|
502
|
+
.option('--raw', 'treat as raw byte stream (still via htsget inventory)')
|
|
488
503
|
.option('-q, --quiet', 'suppress info messages')
|
|
489
504
|
.action(async (id, options) => {
|
|
490
505
|
try {
|
|
@@ -495,18 +510,20 @@ program
|
|
|
495
510
|
process.exit(6);
|
|
496
511
|
}
|
|
497
512
|
});
|
|
498
|
-
// pipe - auto-pipe htsget stream into bcftools/samtools
|
|
513
|
+
// pipe - auto-pipe htsget stream into bcftools/samtools/seqkit
|
|
499
514
|
// (distinct from the existing `view` command, which prints file content)
|
|
500
515
|
program
|
|
501
516
|
.command('pipe <id>')
|
|
502
|
-
.description('Pipe a BioIP stream into bcftools view (VCF)
|
|
503
|
-
.option('--tool <bcftools|samtools>', 'force tool (default: auto-detect from filename)')
|
|
517
|
+
.description('Pipe a BioIP stream into bcftools view (VCF), samtools view (BAM), or seqkit stats (FASTQ)')
|
|
518
|
+
.option('--tool <bcftools|samtools|seqkit>', 'force tool (default: auto-detect from filename)')
|
|
504
519
|
.option('--htsget-url <url>', 'override htsget endpoint')
|
|
520
|
+
.option('--region <chr:start-end>', 'genomic region forwarded to htsget')
|
|
521
|
+
.option('--annotated', 'prefer OpenCRAVAT-annotated VCF sibling')
|
|
505
522
|
.option('-q, --quiet', 'suppress info messages')
|
|
506
523
|
.allowUnknownOption(true)
|
|
507
524
|
.action(async (id, options, cmd) => {
|
|
508
525
|
try {
|
|
509
|
-
// Everything after `--` is passed through to
|
|
526
|
+
// Everything after `--` is passed through to the tool
|
|
510
527
|
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
511
528
|
await (0, pipe_1.pipeCommand)(id, { ...options, extra });
|
|
512
529
|
}
|
|
@@ -515,6 +532,253 @@ program
|
|
|
515
532
|
process.exit(6);
|
|
516
533
|
}
|
|
517
534
|
});
|
|
535
|
+
// ========================================================================
|
|
536
|
+
// v3.18.0 — TeleBioinformatics (`biofs tele`)
|
|
537
|
+
// Consent-gated htsget → local tools (Tier A) + IGV/Jupyter (Tier B).
|
|
538
|
+
// Heavy calling/annotation remains Tier C (annotate / job / skills).
|
|
539
|
+
// ========================================================================
|
|
540
|
+
const teleCmd = program
|
|
541
|
+
.command('tele')
|
|
542
|
+
.description('TeleBioinformatics: consent-gated streams into local tools (stats, IGV, jupyter, …)');
|
|
543
|
+
function teleCommon(cmd) {
|
|
544
|
+
return cmd
|
|
545
|
+
.option('--kind <variants|reads>', 'force htsget datatype')
|
|
546
|
+
.option('--htsget-url <url>', 'override htsget endpoint')
|
|
547
|
+
.option('--region <chr:start-end>', 'genomic region')
|
|
548
|
+
.option('--annotated', 'OpenCRAVAT-annotated VCF sibling when available')
|
|
549
|
+
.option('-q, --quiet', 'suppress progress on stderr')
|
|
550
|
+
.option('--json', 'JSON output where supported');
|
|
551
|
+
}
|
|
552
|
+
teleCommon(teleCmd
|
|
553
|
+
.command('tools')
|
|
554
|
+
.description('Catalog of TeleBioinformatics tools and tiers (A stream / B fuse / C server)')).action(async (options) => {
|
|
555
|
+
try {
|
|
556
|
+
await (0, tele_1.teleToolsCommand)(options);
|
|
557
|
+
}
|
|
558
|
+
catch (e) {
|
|
559
|
+
logger_1.Logger.error(e?.message || e);
|
|
560
|
+
process.exit(6);
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
teleCommon(teleCmd
|
|
564
|
+
.command('stats <id>')
|
|
565
|
+
.description('bcftools stats | samtools stats | seqkit stats (auto by filetype)')).action(async (id, options) => {
|
|
566
|
+
try {
|
|
567
|
+
await (0, tele_1.teleStatsCommand)(id, options);
|
|
568
|
+
}
|
|
569
|
+
catch (e) {
|
|
570
|
+
logger_1.Logger.error(e?.message || e);
|
|
571
|
+
process.exit(6);
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
teleCommon(teleCmd
|
|
575
|
+
.command('header <id>')
|
|
576
|
+
.description('VCF/BAM header only (bcftools view -h | samtools view -H)')).action(async (id, options) => {
|
|
577
|
+
try {
|
|
578
|
+
await (0, tele_1.teleHeaderCommand)(id, options);
|
|
579
|
+
}
|
|
580
|
+
catch (e) {
|
|
581
|
+
logger_1.Logger.error(e?.message || e);
|
|
582
|
+
process.exit(6);
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
teleCommon(teleCmd
|
|
586
|
+
.command('flagstat <id>')
|
|
587
|
+
.description('samtools flagstat on a streamed BAM/CRAM')).action(async (id, options) => {
|
|
588
|
+
try {
|
|
589
|
+
await (0, tele_1.teleFlagstatCommand)(id, options);
|
|
590
|
+
}
|
|
591
|
+
catch (e) {
|
|
592
|
+
logger_1.Logger.error(e?.message || e);
|
|
593
|
+
process.exit(6);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
teleCommon(teleCmd
|
|
597
|
+
.command('count <id>')
|
|
598
|
+
.description('Count variants (bcftools) or reads (samtools view -c)')).action(async (id, options) => {
|
|
599
|
+
try {
|
|
600
|
+
await (0, tele_1.teleCountCommand)(id, options);
|
|
601
|
+
}
|
|
602
|
+
catch (e) {
|
|
603
|
+
logger_1.Logger.error(e?.message || e);
|
|
604
|
+
process.exit(6);
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
teleCommon(teleCmd
|
|
608
|
+
.command('region <id> <region>')
|
|
609
|
+
.description('Stream a genomic region (chr:start-end) via htsget + tool filter')).action(async (id, region, options) => {
|
|
610
|
+
try {
|
|
611
|
+
await (0, tele_1.teleRegionCommand)(id, region, options);
|
|
612
|
+
}
|
|
613
|
+
catch (e) {
|
|
614
|
+
logger_1.Logger.error(e?.message || e);
|
|
615
|
+
process.exit(6);
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
teleCommon(teleCmd
|
|
619
|
+
.command('query <id>')
|
|
620
|
+
.description('bcftools query (pass -f after --)')
|
|
621
|
+
.option('--format <fmt>', 'bcftools -f format string')
|
|
622
|
+
.allowUnknownOption(true)).action(async (id, options, cmd) => {
|
|
623
|
+
try {
|
|
624
|
+
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
625
|
+
await (0, tele_1.teleQueryCommand)(id, extra, options);
|
|
626
|
+
}
|
|
627
|
+
catch (e) {
|
|
628
|
+
logger_1.Logger.error(e?.message || e);
|
|
629
|
+
process.exit(6);
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
teleCommon(teleCmd
|
|
633
|
+
.command('filter <id>')
|
|
634
|
+
.description('bcftools view with -i/-e filters')
|
|
635
|
+
.option('--include <expr>', 'bcftools -i expression')
|
|
636
|
+
.option('--exclude <expr>', 'bcftools -e expression')
|
|
637
|
+
.allowUnknownOption(true)).action(async (id, options, cmd) => {
|
|
638
|
+
try {
|
|
639
|
+
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
640
|
+
await (0, tele_1.teleFilterCommand)(id, extra, options);
|
|
641
|
+
}
|
|
642
|
+
catch (e) {
|
|
643
|
+
logger_1.Logger.error(e?.message || e);
|
|
644
|
+
process.exit(6);
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
teleCommon(teleCmd
|
|
648
|
+
.command('view <id>')
|
|
649
|
+
.description('Generic bcftools/samtools view (args after --)')
|
|
650
|
+
.allowUnknownOption(true)).action(async (id, options, cmd) => {
|
|
651
|
+
try {
|
|
652
|
+
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
653
|
+
await (0, tele_1.teleViewCommand)(id, extra, options);
|
|
654
|
+
}
|
|
655
|
+
catch (e) {
|
|
656
|
+
logger_1.Logger.error(e?.message || e);
|
|
657
|
+
process.exit(6);
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
teleCommon(teleCmd
|
|
661
|
+
.command('seqkit <id>')
|
|
662
|
+
.description('seqkit stats on streamed FASTQ/FASTA')).action(async (id, options) => {
|
|
663
|
+
try {
|
|
664
|
+
await (0, tele_1.teleSeqkitCommand)(id, options);
|
|
665
|
+
}
|
|
666
|
+
catch (e) {
|
|
667
|
+
logger_1.Logger.error(e?.message || e);
|
|
668
|
+
process.exit(6);
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
teleCommon(teleCmd
|
|
672
|
+
.command('seqtk <id>')
|
|
673
|
+
.description('seqtk on streamed FASTQ (args after --)')
|
|
674
|
+
.allowUnknownOption(true)).action(async (id, options, cmd) => {
|
|
675
|
+
try {
|
|
676
|
+
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
677
|
+
await (0, tele_1.teleSeqtkCommand)(id, extra, options);
|
|
678
|
+
}
|
|
679
|
+
catch (e) {
|
|
680
|
+
logger_1.Logger.error(e?.message || e);
|
|
681
|
+
process.exit(6);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
teleCommon(teleCmd
|
|
685
|
+
.command('bedtools <id>')
|
|
686
|
+
.description('bedtools on stream (e.g. -- intersect -b genes.bed)')
|
|
687
|
+
.allowUnknownOption(true)).action(async (id, options, cmd) => {
|
|
688
|
+
try {
|
|
689
|
+
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
690
|
+
await (0, tele_1.teleBedtoolsCommand)(id, extra, options);
|
|
691
|
+
}
|
|
692
|
+
catch (e) {
|
|
693
|
+
logger_1.Logger.error(e?.message || e);
|
|
694
|
+
process.exit(6);
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
teleCommon(teleCmd
|
|
698
|
+
.command('vt <id>')
|
|
699
|
+
.description('vt on VCF stream (e.g. -- normalize -r ref.fa)')
|
|
700
|
+
.allowUnknownOption(true)).action(async (id, options, cmd) => {
|
|
701
|
+
try {
|
|
702
|
+
const extra = cmd.args.slice(cmd.args.indexOf(id) + 1);
|
|
703
|
+
await (0, tele_1.teleVtCommand)(id, extra, options);
|
|
704
|
+
}
|
|
705
|
+
catch (e) {
|
|
706
|
+
logger_1.Logger.error(e?.message || e);
|
|
707
|
+
process.exit(6);
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
teleCommon(teleCmd
|
|
711
|
+
.command('mosdepth <id>')
|
|
712
|
+
.description('mosdepth coverage (materializes temp BAM; prefer fuse for large WGS)')
|
|
713
|
+
.option('--out <prefix>', 'output prefix')).action(async (id, options) => {
|
|
714
|
+
try {
|
|
715
|
+
await (0, tele_1.teleMosdepthCommand)(id, options);
|
|
716
|
+
}
|
|
717
|
+
catch (e) {
|
|
718
|
+
logger_1.Logger.error(e?.message || e);
|
|
719
|
+
process.exit(6);
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
teleCommon(teleCmd
|
|
723
|
+
.command('igv <id>')
|
|
724
|
+
.description('Write IGV desktop batch + IGV.js HTML session for the stream URL')
|
|
725
|
+
.option('--web', 'also open IGV.js HTML')
|
|
726
|
+
.option('--open', 'open the HTML session in the default browser')
|
|
727
|
+
.option('--out <path>', 'output HTML path')).action(async (id, options) => {
|
|
728
|
+
try {
|
|
729
|
+
await (0, tele_1.teleIgvCommand)(id, options);
|
|
730
|
+
}
|
|
731
|
+
catch (e) {
|
|
732
|
+
logger_1.Logger.error(e?.message || e);
|
|
733
|
+
process.exit(6);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
teleCommon(teleCmd
|
|
737
|
+
.command('jupyter <id>')
|
|
738
|
+
.description('Emit a Jupyter/Python cell that streams via biofs into pysam or line parser')
|
|
739
|
+
.option('--out <file>', 'write cell to file')).action(async (id, options) => {
|
|
740
|
+
try {
|
|
741
|
+
await (0, tele_1.teleJupyterCommand)(id, options);
|
|
742
|
+
}
|
|
743
|
+
catch (e) {
|
|
744
|
+
logger_1.Logger.error(e?.message || e);
|
|
745
|
+
process.exit(6);
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
teleCommon(teleCmd
|
|
749
|
+
.command('pysam <id>')
|
|
750
|
+
.description('Alias of tele jupyter (pysam-oriented snippet)')
|
|
751
|
+
.option('--out <file>', 'write snippet to file')).action(async (id, options) => {
|
|
752
|
+
try {
|
|
753
|
+
await (0, tele_1.telePysamCommand)(id, options);
|
|
754
|
+
}
|
|
755
|
+
catch (e) {
|
|
756
|
+
logger_1.Logger.error(e?.message || e);
|
|
757
|
+
process.exit(6);
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
teleCommon(teleCmd
|
|
761
|
+
.command('stream <id>')
|
|
762
|
+
.description('Same as biofs stream (raw htsget bytes to stdout)')).action(async (id, options) => {
|
|
763
|
+
try {
|
|
764
|
+
await (0, tele_1.teleStreamCommand)(id, options);
|
|
765
|
+
}
|
|
766
|
+
catch (e) {
|
|
767
|
+
logger_1.Logger.error(e?.message || e);
|
|
768
|
+
process.exit(6);
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
teleCommon(teleCmd
|
|
772
|
+
.command('ticket <id>')
|
|
773
|
+
.description('Show htsget ticket JSON for an id (TeleBioinformatics debug)')).action(async (id, options) => {
|
|
774
|
+
try {
|
|
775
|
+
await (0, tele_1.teleTicketCommand)(id, options);
|
|
776
|
+
}
|
|
777
|
+
catch (e) {
|
|
778
|
+
logger_1.Logger.error(e?.message || e);
|
|
779
|
+
process.exit(6);
|
|
780
|
+
}
|
|
781
|
+
});
|
|
518
782
|
// alias - manage local shortcuts for ip_ids / BioCIDs
|
|
519
783
|
program
|
|
520
784
|
.command('alias [name] [target]')
|
|
@@ -551,13 +815,19 @@ htsgetCmd
|
|
|
551
815
|
htsgetCmd
|
|
552
816
|
.command('ticket <kind> <id>')
|
|
553
817
|
.description('Fetch a raw htsget ticket for debugging (kind = variants | reads)')
|
|
554
|
-
.
|
|
818
|
+
.option('--region <chr:start-end>', 'genomic region (htsget referenceName/start/end)')
|
|
819
|
+
.option('--referenceName <chr>', 'htsget referenceName')
|
|
820
|
+
.option('--start <n>', 'htsget start')
|
|
821
|
+
.option('--end <n>', 'htsget end')
|
|
822
|
+
.option('--annotated', 'request annotated VCF sibling')
|
|
823
|
+
.option('--htsget-url <url>', 'override htsget endpoint')
|
|
824
|
+
.action(async (kind, id, options) => {
|
|
555
825
|
try {
|
|
556
826
|
if (kind !== 'variants' && kind !== 'reads') {
|
|
557
827
|
logger_1.Logger.error(`kind must be 'variants' or 'reads' (got '${kind}')`);
|
|
558
828
|
process.exit(2);
|
|
559
829
|
}
|
|
560
|
-
await (0, htsget_1.htsgetTicketCommand)(kind, id);
|
|
830
|
+
await (0, htsget_1.htsgetTicketCommand)(kind, id, options);
|
|
561
831
|
}
|
|
562
832
|
catch (error) {
|
|
563
833
|
logger_1.Logger.error(`ticket failed: ${error?.message || error}`);
|
|
@@ -1377,7 +1647,7 @@ interpretCmd
|
|
|
1377
1647
|
.option('--json', 'Emit JSON')
|
|
1378
1648
|
.action(async (biosampleSerial, options) => {
|
|
1379
1649
|
try {
|
|
1380
|
-
await (0,
|
|
1650
|
+
await (0, submit_19.interpretSubmitCommand)(biosampleSerial, options);
|
|
1381
1651
|
}
|
|
1382
1652
|
catch (error) {
|
|
1383
1653
|
logger_1.Logger.error(`Interpretation submission failed: ${error}`);
|
|
@@ -2192,6 +2462,50 @@ hifiDvCmd
|
|
|
2192
2462
|
process.exit(1);
|
|
2193
2463
|
}
|
|
2194
2464
|
});
|
|
2465
|
+
// somatic-mutect command group — tumor/normal somatic calling (Parabricks Mutect2, GPU)
|
|
2466
|
+
const somaticMutectCmd = program
|
|
2467
|
+
.command('somatic-mutect')
|
|
2468
|
+
.description('Tumor/normal somatic small-variant calling (Parabricks mutectcaller = GPU Mutect2): submit (client) + exec (GPU runner)');
|
|
2469
|
+
somaticMutectCmd
|
|
2470
|
+
.command('submit <caseId>', { isDefault: true })
|
|
2471
|
+
.description('Submit a tumor/normal Mutect2 job to biofs-node (panel-design source for tumor-informed MRD)')
|
|
2472
|
+
.requiredOption('--tumor-bam <gs>', 'gs:// aligned tumor BAM')
|
|
2473
|
+
.requiredOption('--normal-bam <gs>', 'gs:// aligned matched-normal BAM (same reference)')
|
|
2474
|
+
.option('--ref-fasta <gs>', 'Explicit gs:// reference fasta the BAMs were aligned to')
|
|
2475
|
+
.option('--no-low-memory', 'Disable pbrun --mutect-low-memory')
|
|
2476
|
+
.option('--json', 'Output as JSON')
|
|
2477
|
+
.action(async (caseId, options) => {
|
|
2478
|
+
try {
|
|
2479
|
+
await (0, submit_15.somaticMutectSubmitCommand)(caseId, options);
|
|
2480
|
+
}
|
|
2481
|
+
catch (error) {
|
|
2482
|
+
logger_1.Logger.error(`somatic-mutect submit failed: ${error}`);
|
|
2483
|
+
process.exit(1);
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
somaticMutectCmd
|
|
2487
|
+
.command('exec')
|
|
2488
|
+
.description('GPU-side executor: pbrun mutectcaller over NVMe-staged tumor/normal BAMs, persist somatic VCF to GCS')
|
|
2489
|
+
.requiredOption('--sample <caseId>', 'Case id (sample names come from the BAM @RG SM tags)')
|
|
2490
|
+
.requiredOption('--tumor-bam <gs>', 'gs:// aligned tumor BAM')
|
|
2491
|
+
.requiredOption('--normal-bam <gs>', 'gs:// aligned matched-normal BAM')
|
|
2492
|
+
.option('--ref-fasta <gs>', 'Explicit gs:// reference fasta')
|
|
2493
|
+
.option('--no-low-memory', 'Disable pbrun --mutect-low-memory')
|
|
2494
|
+
.option('--hotspot <ctg:pos>', 'Identity sanity pileup locus', '12:25398284')
|
|
2495
|
+
.option('--job-id <id>', 'Job id')
|
|
2496
|
+
.option('--batch-id <id>', 'Batch id')
|
|
2497
|
+
.option('--creator <wallet>', 'Creator wallet (lowercased for GCS path)')
|
|
2498
|
+
.option('--out-bucket <name>', 'Output bucket', 'genobank-parabricks-output')
|
|
2499
|
+
.option('--ref-bucket <name>', 'Reference bucket', 'deepvariant-fastq-to-vcf-genobank-app')
|
|
2500
|
+
.action(async (options) => {
|
|
2501
|
+
try {
|
|
2502
|
+
await (0, exec_13.somaticMutectExecCommand)(options);
|
|
2503
|
+
}
|
|
2504
|
+
catch (error) {
|
|
2505
|
+
logger_1.Logger.error(`somatic-mutect exec failed: ${error}`);
|
|
2506
|
+
process.exit(1);
|
|
2507
|
+
}
|
|
2508
|
+
});
|
|
2195
2509
|
// liftover command group — cross-reference VCF liftover (CrossMap, CHM13 -> GRCh38)
|
|
2196
2510
|
const liftoverCmd = program
|
|
2197
2511
|
.command('liftover')
|
|
@@ -2204,7 +2518,7 @@ liftoverCmd
|
|
|
2204
2518
|
.option('--json', 'Output as JSON')
|
|
2205
2519
|
.action(async (serial, options) => {
|
|
2206
2520
|
try {
|
|
2207
|
-
await (0,
|
|
2521
|
+
await (0, submit_16.liftoverSubmitCommand)(serial, options);
|
|
2208
2522
|
}
|
|
2209
2523
|
catch (error) {
|
|
2210
2524
|
logger_1.Logger.error(`liftover submit failed: ${error}`);
|
|
@@ -2227,7 +2541,7 @@ liftoverCmd
|
|
|
2227
2541
|
.option('--ref-bucket <name>', 'Reference bucket', 'genobank-references')
|
|
2228
2542
|
.action(async (options) => {
|
|
2229
2543
|
try {
|
|
2230
|
-
await (0,
|
|
2544
|
+
await (0, exec_14.liftoverExecCommand)(options);
|
|
2231
2545
|
}
|
|
2232
2546
|
catch (error) {
|
|
2233
2547
|
logger_1.Logger.error(`liftover exec failed: ${error}`);
|
|
@@ -2244,7 +2558,7 @@ dipcallCmd.command('submit <serial>', { isDefault: true })
|
|
|
2244
2558
|
.option('--json', 'Output as JSON')
|
|
2245
2559
|
.action(async (serial, options) => {
|
|
2246
2560
|
try {
|
|
2247
|
-
await (0,
|
|
2561
|
+
await (0, submit_17.dipcallSubmitCommand)(serial, options);
|
|
2248
2562
|
}
|
|
2249
2563
|
catch (error) {
|
|
2250
2564
|
logger_1.Logger.error(`dipcall submit failed: ${error}`);
|
|
@@ -2264,7 +2578,7 @@ dipcallCmd.command('exec')
|
|
|
2264
2578
|
.option('--ref-bucket <name>', 'Reference bucket', 'genobank-references')
|
|
2265
2579
|
.action(async (options) => {
|
|
2266
2580
|
try {
|
|
2267
|
-
await (0,
|
|
2581
|
+
await (0, exec_15.dipcallExecCommand)(options);
|
|
2268
2582
|
}
|
|
2269
2583
|
catch (error) {
|
|
2270
2584
|
logger_1.Logger.error(`dipcall exec failed: ${error}`);
|
|
@@ -2426,7 +2740,7 @@ hifiMethylCmd.command('submit <serial>', { isDefault: true })
|
|
|
2426
2740
|
.option('--json', 'Output as JSON')
|
|
2427
2741
|
.action(async (serial, options) => {
|
|
2428
2742
|
try {
|
|
2429
|
-
await (0,
|
|
2743
|
+
await (0, submit_18.hifiMethylSubmitCommand)(serial, options);
|
|
2430
2744
|
}
|
|
2431
2745
|
catch (error) {
|
|
2432
2746
|
logger_1.Logger.error(`hifi-methyl submit failed: ${error}`);
|
|
@@ -2444,7 +2758,7 @@ hifiMethylCmd.command('exec')
|
|
|
2444
2758
|
.option('--ref-bucket <name>', 'Reference bucket', 'genobank-references')
|
|
2445
2759
|
.action(async (options) => {
|
|
2446
2760
|
try {
|
|
2447
|
-
await (0,
|
|
2761
|
+
await (0, exec_16.hifiMethylExecCommand)(options);
|
|
2448
2762
|
}
|
|
2449
2763
|
catch (error) {
|
|
2450
2764
|
logger_1.Logger.error(`hifi-methyl exec failed: ${error}`);
|
|
@@ -2630,6 +2944,35 @@ researcherCmd
|
|
|
2630
2944
|
process.exit(1);
|
|
2631
2945
|
}
|
|
2632
2946
|
});
|
|
2947
|
+
researcherCmd
|
|
2948
|
+
.command('passport')
|
|
2949
|
+
.description('Publish or show known-identity passport (shown on Biodata Room admit / Telegram)')
|
|
2950
|
+
.option('--publish', 'Publish/update passport on biofs-node (default if no --show)')
|
|
2951
|
+
.option('--show', 'Show passport for a wallet')
|
|
2952
|
+
.option('--name <name>', 'Display name')
|
|
2953
|
+
.option('--provider <provider>', 'orcid|linkedin|twitter|google|metamask|…')
|
|
2954
|
+
.option('--orcid <id>', 'ORCID iD')
|
|
2955
|
+
.option('--linkedin <url>', 'LinkedIn profile URL')
|
|
2956
|
+
.option('--twitter <handle>', 'X / Twitter handle')
|
|
2957
|
+
.option('--institution <name>', 'Institution')
|
|
2958
|
+
.option('--ga4gh <level>', 'NONE|BASIC|LITE|FULL', 'BASIC')
|
|
2959
|
+
.option('--wallet <addr>', 'Wallet for --show')
|
|
2960
|
+
.option('--json', 'JSON output')
|
|
2961
|
+
.option('--quiet', 'Quiet')
|
|
2962
|
+
.action(async (options) => {
|
|
2963
|
+
try {
|
|
2964
|
+
if (options.show || options.wallet) {
|
|
2965
|
+
await (0, passport_1.researcherPassportShowCommand)(options);
|
|
2966
|
+
}
|
|
2967
|
+
else {
|
|
2968
|
+
await (0, passport_1.researcherPassportPublishCommand)(options);
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
catch (error) {
|
|
2972
|
+
logger_1.Logger.error(`Passport failed: ${error}`);
|
|
2973
|
+
process.exit(1);
|
|
2974
|
+
}
|
|
2975
|
+
});
|
|
2633
2976
|
// Lab Registry - List approved research labs
|
|
2634
2977
|
program
|
|
2635
2978
|
.command('labnfts')
|
|
@@ -3500,6 +3843,237 @@ program
|
|
|
3500
3843
|
program.outputHelp();
|
|
3501
3844
|
}
|
|
3502
3845
|
});
|
|
3846
|
+
// BIODATA_ROOM_20260801: dual-role profiles (patient vault vs known researcher)
|
|
3847
|
+
const profileCmd = program
|
|
3848
|
+
.command('profile')
|
|
3849
|
+
.description('Manage dual BioFS profiles (patient vs researcher credential roots)');
|
|
3850
|
+
profileCmd
|
|
3851
|
+
.command('list')
|
|
3852
|
+
.description('List local profiles under ~/.biofs/profiles/*')
|
|
3853
|
+
.option('--json', 'JSON output')
|
|
3854
|
+
.action(async (o) => {
|
|
3855
|
+
try {
|
|
3856
|
+
await (0, profile_1.profileListCommand)(o);
|
|
3857
|
+
}
|
|
3858
|
+
catch (e) {
|
|
3859
|
+
logger_1.Logger.error(String(e));
|
|
3860
|
+
process.exit(1);
|
|
3861
|
+
}
|
|
3862
|
+
});
|
|
3863
|
+
profileCmd
|
|
3864
|
+
.command('use <name>')
|
|
3865
|
+
.description('Prepare a named profile; print export BIOFS_PROFILE=... (--print for shell eval)')
|
|
3866
|
+
.option('--print', 'Print shell exports only (for eval "$(biofs profile use researcher --print)")')
|
|
3867
|
+
.option('--json', 'JSON output')
|
|
3868
|
+
.action(async (name, o) => {
|
|
3869
|
+
try {
|
|
3870
|
+
await (0, profile_1.profileUseCommand)(name, o);
|
|
3871
|
+
}
|
|
3872
|
+
catch (e) {
|
|
3873
|
+
logger_1.Logger.error(String(e));
|
|
3874
|
+
process.exit(1);
|
|
3875
|
+
}
|
|
3876
|
+
});
|
|
3877
|
+
profileCmd
|
|
3878
|
+
.command('status')
|
|
3879
|
+
.description('Show active profile, config dir, and wallet')
|
|
3880
|
+
.option('--json', 'JSON output')
|
|
3881
|
+
.action(async (o) => {
|
|
3882
|
+
try {
|
|
3883
|
+
await (0, profile_1.profileStatusCommand)(o);
|
|
3884
|
+
}
|
|
3885
|
+
catch (e) {
|
|
3886
|
+
logger_1.Logger.error(String(e));
|
|
3887
|
+
process.exit(1);
|
|
3888
|
+
}
|
|
3889
|
+
});
|
|
3890
|
+
// BIODATA_ROOM_20260801: investor-style biodata room for researcher deep dives
|
|
3891
|
+
const roomCmd = program
|
|
3892
|
+
.command('room')
|
|
3893
|
+
.description('Researcher Biodata Room: create, request, admit, enter, scoped files (via biofs-node)');
|
|
3894
|
+
roomCmd
|
|
3895
|
+
.command('create')
|
|
3896
|
+
.description('Owner: create a room over one or more biocid:// assets')
|
|
3897
|
+
.requiredOption('--biocids <list>', 'Comma/space-separated biocid:// list')
|
|
3898
|
+
.option('--purpose <text>', 'Research purpose shown to the owner', 'research deep dive')
|
|
3899
|
+
.option('--skills <list>', 'Allowed verbs (comma-separated)')
|
|
3900
|
+
.option('--days <n>', 'TTL days after admit (1-30)', '7')
|
|
3901
|
+
.option('--researcher <wallet>', 'Optional pre-assign researcher wallet')
|
|
3902
|
+
.option('--json', 'JSON output')
|
|
3903
|
+
.option('--quiet', 'Quiet mode')
|
|
3904
|
+
.action(async (o) => {
|
|
3905
|
+
try {
|
|
3906
|
+
await (0, room_1.roomCreateCommand)(o);
|
|
3907
|
+
}
|
|
3908
|
+
catch (e) {
|
|
3909
|
+
logger_1.Logger.error(String(e));
|
|
3910
|
+
process.exit(1);
|
|
3911
|
+
}
|
|
3912
|
+
});
|
|
3913
|
+
roomCmd
|
|
3914
|
+
.command('request <room_id>')
|
|
3915
|
+
.description('Researcher: request admission to a room')
|
|
3916
|
+
.option('--purpose <text>', 'Purpose of the deep dive')
|
|
3917
|
+
.option('--message <text>', 'Message to the data owner')
|
|
3918
|
+
.option('--skills <list>', 'Requested skills')
|
|
3919
|
+
.option('--json', 'JSON output')
|
|
3920
|
+
.option('--quiet', 'Quiet mode')
|
|
3921
|
+
.action(async (roomId, o) => {
|
|
3922
|
+
try {
|
|
3923
|
+
await (0, room_1.roomRequestCommand)(roomId, o);
|
|
3924
|
+
}
|
|
3925
|
+
catch (e) {
|
|
3926
|
+
logger_1.Logger.error(String(e));
|
|
3927
|
+
process.exit(1);
|
|
3928
|
+
}
|
|
3929
|
+
});
|
|
3930
|
+
roomCmd
|
|
3931
|
+
.command('status <room_id>')
|
|
3932
|
+
.description('Show room status (members see full card)')
|
|
3933
|
+
.option('--json', 'JSON output')
|
|
3934
|
+
.action(async (roomId, o) => {
|
|
3935
|
+
try {
|
|
3936
|
+
await (0, room_1.roomStatusCommand)(roomId, o);
|
|
3937
|
+
}
|
|
3938
|
+
catch (e) {
|
|
3939
|
+
logger_1.Logger.error(String(e));
|
|
3940
|
+
process.exit(1);
|
|
3941
|
+
}
|
|
3942
|
+
});
|
|
3943
|
+
roomCmd
|
|
3944
|
+
.command('admit <room_id>')
|
|
3945
|
+
.description('Owner (patient): admit the researcher and open the room')
|
|
3946
|
+
.option('--json', 'JSON output')
|
|
3947
|
+
.option('--quiet', 'Quiet mode')
|
|
3948
|
+
.action(async (roomId, o) => {
|
|
3949
|
+
try {
|
|
3950
|
+
await (0, room_1.roomAdmitCommand)(roomId, o);
|
|
3951
|
+
}
|
|
3952
|
+
catch (e) {
|
|
3953
|
+
logger_1.Logger.error(String(e));
|
|
3954
|
+
process.exit(1);
|
|
3955
|
+
}
|
|
3956
|
+
});
|
|
3957
|
+
roomCmd
|
|
3958
|
+
.command('revoke <room_id>')
|
|
3959
|
+
.description('Owner or researcher: revoke/leave the room')
|
|
3960
|
+
.option('--json', 'JSON output')
|
|
3961
|
+
.option('--quiet', 'Quiet mode')
|
|
3962
|
+
.action(async (roomId, o) => {
|
|
3963
|
+
try {
|
|
3964
|
+
await (0, room_1.roomRevokeCommand)(roomId, o);
|
|
3965
|
+
}
|
|
3966
|
+
catch (e) {
|
|
3967
|
+
logger_1.Logger.error(String(e));
|
|
3968
|
+
process.exit(1);
|
|
3969
|
+
}
|
|
3970
|
+
});
|
|
3971
|
+
roomCmd
|
|
3972
|
+
.command('list')
|
|
3973
|
+
.description('List rooms for the active profile wallet')
|
|
3974
|
+
.option('--json', 'JSON output')
|
|
3975
|
+
.action(async (o) => {
|
|
3976
|
+
try {
|
|
3977
|
+
await (0, room_1.roomListCommand)(o);
|
|
3978
|
+
}
|
|
3979
|
+
catch (e) {
|
|
3980
|
+
logger_1.Logger.error(String(e));
|
|
3981
|
+
process.exit(1);
|
|
3982
|
+
}
|
|
3983
|
+
});
|
|
3984
|
+
roomCmd
|
|
3985
|
+
.command('enter <room_id>')
|
|
3986
|
+
.description('Enter an OPEN room (sets local active_room.json session)')
|
|
3987
|
+
.option('--json', 'JSON output')
|
|
3988
|
+
.option('--quiet', 'Quiet mode')
|
|
3989
|
+
.action(async (roomId, o) => {
|
|
3990
|
+
try {
|
|
3991
|
+
await (0, room_1.roomEnterCommand)(roomId, o);
|
|
3992
|
+
}
|
|
3993
|
+
catch (e) {
|
|
3994
|
+
logger_1.Logger.error(String(e));
|
|
3995
|
+
process.exit(1);
|
|
3996
|
+
}
|
|
3997
|
+
});
|
|
3998
|
+
roomCmd
|
|
3999
|
+
.command('leave')
|
|
4000
|
+
.description('Clear the local active room session')
|
|
4001
|
+
.option('--json', 'JSON output')
|
|
4002
|
+
.action(async (o) => {
|
|
4003
|
+
try {
|
|
4004
|
+
await (0, room_1.roomLeaveCommand)(o);
|
|
4005
|
+
}
|
|
4006
|
+
catch (e) {
|
|
4007
|
+
logger_1.Logger.error(String(e));
|
|
4008
|
+
process.exit(1);
|
|
4009
|
+
}
|
|
4010
|
+
});
|
|
4011
|
+
roomCmd
|
|
4012
|
+
.command('files [room_id]')
|
|
4013
|
+
.description('List biocids in a room (defaults to active room). No gs:// paths returned.')
|
|
4014
|
+
.option('--json', 'JSON output')
|
|
4015
|
+
.action(async (roomId, o) => {
|
|
4016
|
+
try {
|
|
4017
|
+
await (0, room_1.roomFilesCommand)(roomId, o);
|
|
4018
|
+
}
|
|
4019
|
+
catch (e) {
|
|
4020
|
+
logger_1.Logger.error(String(e));
|
|
4021
|
+
process.exit(1);
|
|
4022
|
+
}
|
|
4023
|
+
});
|
|
4024
|
+
roomCmd
|
|
4025
|
+
.command('signing-url <room_id>')
|
|
4026
|
+
.description('Get patient web + Telegram signing links for a room')
|
|
4027
|
+
.option('--json', 'JSON output')
|
|
4028
|
+
.action(async (roomId, o) => {
|
|
4029
|
+
try {
|
|
4030
|
+
await (0, room_1.roomSigningUrlCommand)(roomId, o);
|
|
4031
|
+
}
|
|
4032
|
+
catch (e) {
|
|
4033
|
+
logger_1.Logger.error(String(e));
|
|
4034
|
+
process.exit(1);
|
|
4035
|
+
}
|
|
4036
|
+
});
|
|
4037
|
+
// CONSENT_VERBS_20260730: subject-signed consent for an AI-agent session. Two steps because the
|
|
4038
|
+
// node cannot sign for the data owner, which is the property that stops consent being
|
|
4039
|
+
// minted ABOUT a person instead of BY them.
|
|
4040
|
+
const consentCmd = program
|
|
4041
|
+
.command('consent')
|
|
4042
|
+
.description('Grant or inspect consent for an AI-agent session (dispatched through biofs-node)');
|
|
4043
|
+
consentCmd
|
|
4044
|
+
.command('payload')
|
|
4045
|
+
.description('Build the consent terms the data owner must sign for one MCP session')
|
|
4046
|
+
.requiredOption('--session <id>', 'MCP session id (Mcp-Session-Id)')
|
|
4047
|
+
.requiredOption('--biocid <biocid>', 'The biocid:// the grant covers')
|
|
4048
|
+
.option('--days <n>', 'Validity in days (1-30)', '1')
|
|
4049
|
+
.option('--json', 'Emit JSON')
|
|
4050
|
+
.option('--quiet', 'Suppress progress')
|
|
4051
|
+
.action(async (o) => {
|
|
4052
|
+
try {
|
|
4053
|
+
await (0, consent_1.consentPayloadCommand)(o.session, o.biocid, o);
|
|
4054
|
+
}
|
|
4055
|
+
catch (e) {
|
|
4056
|
+
logger_1.Logger.error(`consent payload failed: ${e}`);
|
|
4057
|
+
process.exit(1);
|
|
4058
|
+
}
|
|
4059
|
+
});
|
|
4060
|
+
consentCmd
|
|
4061
|
+
.command('submit')
|
|
4062
|
+
.description('Relay a data-owner-signed consent grant on-chain (the node pays the gas)')
|
|
4063
|
+
.requiredOption('--session <id>', 'MCP session id')
|
|
4064
|
+
.requiredOption('--message <json>', 'The signed grant message, inline JSON or a path')
|
|
4065
|
+
.requiredOption('--signature <sig>', 'EIP-712 signature by the data owner')
|
|
4066
|
+
.option('--json', 'Emit JSON')
|
|
4067
|
+
.option('--quiet', 'Suppress progress')
|
|
4068
|
+
.action(async (o) => {
|
|
4069
|
+
try {
|
|
4070
|
+
await (0, consent_1.consentSubmitCommand)(o.session, o.message, o.signature, o);
|
|
4071
|
+
}
|
|
4072
|
+
catch (e) {
|
|
4073
|
+
logger_1.Logger.error(`consent submit failed: ${e}`);
|
|
4074
|
+
process.exit(1);
|
|
4075
|
+
}
|
|
4076
|
+
});
|
|
3503
4077
|
// FLUENCY_LINEAGE_VERBS_20260730: make a genomics store AI-conversable, and report the metamorphosis.
|
|
3504
4078
|
// Registered with the other groups, BEFORE the welcome banner and program.parse().
|
|
3505
4079
|
const fluencyCmd = program
|
|
@@ -3562,6 +4136,8 @@ if (process.argv.length === 2) {
|
|
|
3562
4136
|
console.log(` ${chalk_1.default.green('biofiles')} - List your BioFiles (all sources)`);
|
|
3563
4137
|
console.log(` ${chalk_1.default.green('download')} - Download files (GDPR consent)`);
|
|
3564
4138
|
console.log(` ${chalk_1.default.green('mount')} - Mount all files (GDPR consent)`);
|
|
4139
|
+
console.log(` ${chalk_1.default.green('profile')} - Dual profiles (patient vs researcher credentials)`);
|
|
4140
|
+
console.log(` ${chalk_1.default.green('room')} - Researcher Biodata Room (admit + scoped deep dive)`);
|
|
3565
4141
|
console.log(` ${chalk_1.default.green('fluency')} - Make a store AI-conversable (coverage + per-gene rollups)`);
|
|
3566
4142
|
console.log(` ${chalk_1.default.green('lineage')} - Biodata metamorphosis: parents, derivatives, owners`);
|
|
3567
4143
|
console.log(` ${chalk_1.default.green('mount-remote')} - Mount biosample on agent`);
|