@apollo-annotation/cli 0.3.6 → 0.3.8

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/README.md CHANGED
@@ -16,7 +16,7 @@ $ npm install -g @apollo-annotation/cli
16
16
  $ apollo COMMAND
17
17
  running command...
18
18
  $ apollo (--version)
19
- @apollo-annotation/cli/0.3.6 linux-x64 node-v18.20.8
19
+ @apollo-annotation/cli/0.3.8 linux-x64 node-v20.19.5
20
20
  $ apollo --help [COMMAND]
21
21
  USAGE
22
22
  $ apollo COMMAND
@@ -55,6 +55,7 @@ USAGE
55
55
  - [`apollo file get`](#apollo-file-get)
56
56
  - [`apollo file upload INPUT-FILE`](#apollo-file-upload-input-file)
57
57
  - [`apollo help [COMMANDS]`](#apollo-help-commands)
58
+ - [`apollo jbrowse desktop JBROWSEFILE`](#apollo-jbrowse-desktop-jbrowsefile)
58
59
  - [`apollo jbrowse get-config`](#apollo-jbrowse-get-config)
59
60
  - [`apollo jbrowse set-config INPUTFILE`](#apollo-jbrowse-set-config-inputfile)
60
61
  - [`apollo login`](#apollo-login)
@@ -114,7 +115,7 @@ EXAMPLES
114
115
  ```
115
116
 
116
117
  _See code:
117
- [src/commands/assembly/add-from-fasta.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/assembly/add-from-fasta.ts)_
118
+ [src/commands/assembly/add-from-fasta.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/assembly/add-from-fasta.ts)_
118
119
 
119
120
  ## `apollo assembly add-from-gff INPUT-FILE`
120
121
 
@@ -150,7 +151,7 @@ EXAMPLES
150
151
  ```
151
152
 
152
153
  _See code:
153
- [src/commands/assembly/add-from-gff.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/assembly/add-from-gff.ts)_
154
+ [src/commands/assembly/add-from-gff.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/assembly/add-from-gff.ts)_
154
155
 
155
156
  ## `apollo assembly check`
156
157
 
@@ -192,7 +193,7 @@ EXAMPLES
192
193
  ```
193
194
 
194
195
  _See code:
195
- [src/commands/assembly/check.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/assembly/check.ts)_
196
+ [src/commands/assembly/check.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/assembly/check.ts)_
196
197
 
197
198
  ## `apollo assembly delete`
198
199
 
@@ -220,7 +221,7 @@ EXAMPLES
220
221
  ```
221
222
 
222
223
  _See code:
223
- [src/commands/assembly/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/assembly/delete.ts)_
224
+ [src/commands/assembly/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/assembly/delete.ts)_
224
225
 
225
226
  ## `apollo assembly get`
226
227
 
@@ -242,7 +243,7 @@ DESCRIPTION
242
243
  ```
243
244
 
244
245
  _See code:
245
- [src/commands/assembly/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/assembly/get.ts)_
246
+ [src/commands/assembly/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/assembly/get.ts)_
246
247
 
247
248
  ## `apollo assembly sequence`
248
249
 
@@ -277,7 +278,7 @@ EXAMPLES
277
278
  ```
278
279
 
279
280
  _See code:
280
- [src/commands/assembly/sequence.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/assembly/sequence.ts)_
281
+ [src/commands/assembly/sequence.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/assembly/sequence.ts)_
281
282
 
282
283
  ## `apollo change get`
283
284
 
@@ -301,7 +302,7 @@ DESCRIPTION
301
302
  ```
302
303
 
303
304
  _See code:
304
- [src/commands/change/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/change/get.ts)_
305
+ [src/commands/change/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/change/get.ts)_
305
306
 
306
307
  ## `apollo config [KEY] [VALUE]`
307
308
 
@@ -353,7 +354,7 @@ EXAMPLES
353
354
  ```
354
355
 
355
356
  _See code:
356
- [src/commands/config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/config.ts)_
357
+ [src/commands/config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/config.ts)_
357
358
 
358
359
  ## `apollo export gff3 ASSEMBLY`
359
360
 
@@ -381,7 +382,7 @@ EXAMPLES
381
382
  ```
382
383
 
383
384
  _See code:
384
- [src/commands/export/gff3.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/export/gff3.ts)_
385
+ [src/commands/export/gff3.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/export/gff3.ts)_
385
386
 
386
387
  ## `apollo feature add-child`
387
388
 
@@ -412,7 +413,7 @@ EXAMPLES
412
413
  ```
413
414
 
414
415
  _See code:
415
- [src/commands/feature/add-child.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/add-child.ts)_
416
+ [src/commands/feature/add-child.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/add-child.ts)_
416
417
 
417
418
  ## `apollo feature check`
418
419
 
@@ -445,7 +446,7 @@ EXAMPLES
445
446
  ```
446
447
 
447
448
  _See code:
448
- [src/commands/feature/check.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/check.ts)_
449
+ [src/commands/feature/check.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/check.ts)_
449
450
 
450
451
  ## `apollo feature copy`
451
452
 
@@ -476,7 +477,7 @@ EXAMPLES
476
477
  ```
477
478
 
478
479
  _See code:
479
- [src/commands/feature/copy.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/copy.ts)_
480
+ [src/commands/feature/copy.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/copy.ts)_
480
481
 
481
482
  ## `apollo feature delete`
482
483
 
@@ -500,7 +501,7 @@ DESCRIPTION
500
501
  ```
501
502
 
502
503
  _See code:
503
- [src/commands/feature/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/delete.ts)_
504
+ [src/commands/feature/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/delete.ts)_
504
505
 
505
506
  ## `apollo feature edit`
506
507
 
@@ -542,7 +543,7 @@ EXAMPLES
542
543
  ```
543
544
 
544
545
  _See code:
545
- [src/commands/feature/edit.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/edit.ts)_
546
+ [src/commands/feature/edit.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/edit.ts)_
546
547
 
547
548
  ## `apollo feature edit-attribute`
548
549
 
@@ -582,7 +583,7 @@ EXAMPLES
582
583
  ```
583
584
 
584
585
  _See code:
585
- [src/commands/feature/edit-attribute.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/edit-attribute.ts)_
586
+ [src/commands/feature/edit-attribute.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/edit-attribute.ts)_
586
587
 
587
588
  ## `apollo feature edit-coords`
588
589
 
@@ -616,7 +617,7 @@ EXAMPLES
616
617
  ```
617
618
 
618
619
  _See code:
619
- [src/commands/feature/edit-coords.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/edit-coords.ts)_
620
+ [src/commands/feature/edit-coords.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/edit-coords.ts)_
620
621
 
621
622
  ## `apollo feature edit-type`
622
623
 
@@ -640,7 +641,7 @@ DESCRIPTION
640
641
  ```
641
642
 
642
643
  _See code:
643
- [src/commands/feature/edit-type.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/edit-type.ts)_
644
+ [src/commands/feature/edit-type.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/edit-type.ts)_
644
645
 
645
646
  ## `apollo feature get`
646
647
 
@@ -674,7 +675,7 @@ EXAMPLES
674
675
  ```
675
676
 
676
677
  _See code:
677
- [src/commands/feature/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/get.ts)_
678
+ [src/commands/feature/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/get.ts)_
678
679
 
679
680
  ## `apollo feature get-id`
680
681
 
@@ -702,7 +703,7 @@ EXAMPLES
702
703
  ```
703
704
 
704
705
  _See code:
705
- [src/commands/feature/get-id.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/get-id.ts)_
706
+ [src/commands/feature/get-id.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/get-id.ts)_
706
707
 
707
708
  ## `apollo feature import INPUT-FILE`
708
709
 
@@ -733,7 +734,7 @@ EXAMPLES
733
734
  ```
734
735
 
735
736
  _See code:
736
- [src/commands/feature/import.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/import.ts)_
737
+ [src/commands/feature/import.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/import.ts)_
737
738
 
738
739
  ## `apollo feature search`
739
740
 
@@ -784,7 +785,7 @@ EXAMPLES
784
785
  ```
785
786
 
786
787
  _See code:
787
- [src/commands/feature/search.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/feature/search.ts)_
788
+ [src/commands/feature/search.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/feature/search.ts)_
788
789
 
789
790
  ## `apollo file delete`
790
791
 
@@ -811,7 +812,7 @@ EXAMPLES
811
812
  ```
812
813
 
813
814
  _See code:
814
- [src/commands/file/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/file/delete.ts)_
815
+ [src/commands/file/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/file/delete.ts)_
815
816
 
816
817
  ## `apollo file download`
817
818
 
@@ -839,7 +840,7 @@ EXAMPLES
839
840
  ```
840
841
 
841
842
  _See code:
842
- [src/commands/file/download.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/file/download.ts)_
843
+ [src/commands/file/download.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/file/download.ts)_
843
844
 
844
845
  ## `apollo file get`
845
846
 
@@ -866,7 +867,7 @@ EXAMPLES
866
867
  ```
867
868
 
868
869
  _See code:
869
- [src/commands/file/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/file/get.ts)_
870
+ [src/commands/file/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/file/get.ts)_
870
871
 
871
872
  ## `apollo file upload INPUT-FILE`
872
873
 
@@ -903,7 +904,7 @@ EXAMPLES
903
904
  ```
904
905
 
905
906
  _See code:
906
- [src/commands/file/upload.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/file/upload.ts)_
907
+ [src/commands/file/upload.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/file/upload.ts)_
907
908
 
908
909
  ## `apollo help [COMMANDS]`
909
910
 
@@ -926,6 +927,51 @@ DESCRIPTION
926
927
  _See code:
927
928
  [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.8/src/commands/help.ts)_
928
929
 
930
+ ## `apollo jbrowse desktop JBROWSEFILE`
931
+
932
+ Generate JBrowse file for use with desktop client
933
+
934
+ ```
935
+ USAGE
936
+ $ apollo jbrowse desktop JBROWSEFILE [--profile <value>] [--config-file <value>] [-o | -w <value>] [-f <value>]
937
+
938
+ ARGUMENTS
939
+ JBROWSEFILE Generated JBrowse file
940
+
941
+ FLAGS
942
+ -f, --gff3-file=<value> generated session will open the specified file
943
+ -o, --open open generated file
944
+ -w, --open-with=<value> open generated file with specified application
945
+ --config-file=<value> Use this config file (mostly for testing)
946
+ --profile=<value> Use credentials from this profile
947
+
948
+ DESCRIPTION
949
+ Generate JBrowse file for use with desktop client
950
+
951
+ Generates a file that can be opened with JBrowse Desktop. This file has Apollo already configured and, optionally, a
952
+ GFF3 for local editing configured as well.
953
+
954
+ EXAMPLES
955
+ Generate JBrowse file:
956
+
957
+ $ apollo jbrowse desktop apollo.jbrowse
958
+
959
+ Generate JBrowse file and open with default handler:
960
+
961
+ $ apollo jbrowse desktop apollo.jbrowse --open
962
+
963
+ Generate JBrowse file and open with specified application:
964
+
965
+ $ apollo jbrowse desktop apollo.jbrowse --open-with=path/to/jbrowse.AppImage
966
+
967
+ Generate JBrowse file opening specified gff3 file:
968
+
969
+ $ apollo jbrowse desktop apollo.jbrowse --gff3-file=path/to/file.gff3
970
+ ```
971
+
972
+ _See code:
973
+ [src/commands/jbrowse/desktop.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/jbrowse/desktop.ts)_
974
+
929
975
  ## `apollo jbrowse get-config`
930
976
 
931
977
  Get JBrowse configuration from Apollo
@@ -950,7 +996,7 @@ EXAMPLES
950
996
  ```
951
997
 
952
998
  _See code:
953
- [src/commands/jbrowse/get-config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/jbrowse/get-config.ts)_
999
+ [src/commands/jbrowse/get-config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/jbrowse/get-config.ts)_
954
1000
 
955
1001
  ## `apollo jbrowse set-config INPUTFILE`
956
1002
 
@@ -979,7 +1025,7 @@ EXAMPLES
979
1025
  ```
980
1026
 
981
1027
  _See code:
982
- [src/commands/jbrowse/set-config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/jbrowse/set-config.ts)_
1028
+ [src/commands/jbrowse/set-config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/jbrowse/set-config.ts)_
983
1029
 
984
1030
  ## `apollo login`
985
1031
 
@@ -1018,7 +1064,7 @@ EXAMPLES
1018
1064
  ```
1019
1065
 
1020
1066
  _See code:
1021
- [src/commands/login.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/login.ts)_
1067
+ [src/commands/login.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/login.ts)_
1022
1068
 
1023
1069
  ## `apollo logout`
1024
1070
 
@@ -1048,7 +1094,7 @@ EXAMPLES
1048
1094
  ```
1049
1095
 
1050
1096
  _See code:
1051
- [src/commands/logout.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/logout.ts)_
1097
+ [src/commands/logout.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/logout.ts)_
1052
1098
 
1053
1099
  ## `apollo refseq add-alias INPUT-FILE`
1054
1100
 
@@ -1079,7 +1125,7 @@ EXAMPLES
1079
1125
  ```
1080
1126
 
1081
1127
  _See code:
1082
- [src/commands/refseq/add-alias.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/refseq/add-alias.ts)_
1128
+ [src/commands/refseq/add-alias.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/refseq/add-alias.ts)_
1083
1129
 
1084
1130
  ## `apollo refseq get`
1085
1131
 
@@ -1111,7 +1157,7 @@ EXAMPLES
1111
1157
  ```
1112
1158
 
1113
1159
  _See code:
1114
- [src/commands/refseq/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/refseq/get.ts)_
1160
+ [src/commands/refseq/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/refseq/get.ts)_
1115
1161
 
1116
1162
  ## `apollo status`
1117
1163
 
@@ -1133,7 +1179,7 @@ DESCRIPTION
1133
1179
  ```
1134
1180
 
1135
1181
  _See code:
1136
- [src/commands/status.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/status.ts)_
1182
+ [src/commands/status.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/status.ts)_
1137
1183
 
1138
1184
  ## `apollo user get`
1139
1185
 
@@ -1169,6 +1215,6 @@ EXAMPLES
1169
1215
  ```
1170
1216
 
1171
1217
  _See code:
1172
- [src/commands/user/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.6/packages/apollo-cli/src/commands/user/get.ts)_
1218
+ [src/commands/user/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.8/packages/apollo-cli/src/commands/user/get.ts)_
1173
1219
 
1174
1220
  <!-- commandsstop -->
@@ -112,13 +112,10 @@ these checks use `apollo feature check`.';
112
112
  inputCheckIds = await convertCheckNameToId(access.address, access.accessToken, flags.check);
113
113
  const newChecks = new Set();
114
114
  if (flags.delete) {
115
- const currentCheckIds = new Set();
116
115
  for (const chk of currentChecks) {
117
- currentCheckIds.add(chk['_id']);
118
- }
119
- for (const id of inputCheckIds) {
120
- if (!currentCheckIds.has(id)) {
121
- newChecks.add(id);
116
+ const chkId = chk['_id'];
117
+ if (!inputCheckIds.includes(chkId)) {
118
+ newChecks.add(chkId);
122
119
  }
123
120
  }
124
121
  }
@@ -62,31 +62,39 @@ terms to non-existing terms';
62
62
  if (featureJson.attributes === undefined) {
63
63
  featureJson.attributes = {};
64
64
  }
65
+ const oldAttributes = {};
66
+ for (const [key, val] of Object.entries(featureJson.attributes)) {
67
+ if (!val) {
68
+ continue;
69
+ }
70
+ oldAttributes[key] = [...val];
71
+ }
65
72
  if (flags.value === undefined && !flags.delete) {
66
- this.log(JSON.stringify(featureJson.attributes[flags.attribute]));
73
+ this.log(JSON.stringify(oldAttributes[flags.attribute]));
67
74
  return;
68
75
  }
76
+ const newAttributes = {};
77
+ for (const [key, val] of Object.entries(oldAttributes)) {
78
+ newAttributes[key] = [...val];
79
+ }
69
80
  if (flags.delete) {
70
81
  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
71
- delete featureJson.attributes[flags.attribute];
82
+ delete newAttributes[flags.attribute];
83
+ }
84
+ else if (flags.value) {
85
+ newAttributes[flags.attribute] = flags.value;
72
86
  }
73
87
  else {
74
- featureJson.attributes[flags.attribute] = flags.value;
88
+ throw new Error(`Unexpected condition: value is "${flags.value}"`);
75
89
  }
76
90
  const assembly = await getAssemblyFromRefseq(access.address, access.accessToken, featureJson.refSeq);
77
- const attrs = {};
78
- for (const [key, val] of Object.entries(featureJson.attributes)) {
79
- if (!val) {
80
- continue;
81
- }
82
- attrs[key] = [...val];
83
- }
84
91
  const changeJson = {
85
92
  typeName: 'FeatureAttributeChange',
86
93
  changedIds: [featureId],
87
94
  assembly,
88
95
  featureId,
89
- attributes: attrs,
96
+ oldAttributes,
97
+ newAttributes,
90
98
  };
91
99
  const url = new URL(localhostToAddress(`${access.address}/changes`));
92
100
  const auth = {
@@ -0,0 +1,18 @@
1
+ import { BaseCommand } from '../../baseCommand.js';
2
+ export default class Desktop extends BaseCommand<typeof Desktop> {
3
+ static summary: string;
4
+ static description: string;
5
+ static examples: {
6
+ description: string;
7
+ command: string;
8
+ }[];
9
+ static args: {
10
+ jbrowseFile: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
11
+ };
12
+ static flags: {
13
+ open: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
14
+ 'open-with': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
15
+ 'gff3-file': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
+ };
17
+ run(): Promise<void>;
18
+ }
@@ -0,0 +1,163 @@
1
+ import fsPromises from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { Args, Flags } from '@oclif/core';
4
+ import { nanoid } from 'nanoid';
5
+ import open from 'open';
6
+ import { BaseCommand } from '../../baseCommand.js';
7
+ class Gff3File {
8
+ filepath;
9
+ stem;
10
+ uid;
11
+ constructor(filepath) {
12
+ this.stem = path.basename(filepath, path.extname(filepath));
13
+ this.uid = `${this.stem}-${path.basename(filepath)}-${nanoid(8)}`;
14
+ this.filepath = path.resolve(filepath);
15
+ }
16
+ assemblyConfig() {
17
+ return {
18
+ name: this.uid,
19
+ aliases: [this.stem],
20
+ sequence: {
21
+ type: 'ReferenceSequenceTrack',
22
+ trackId: `sequenceConfigId-${this.stem}`,
23
+ adapter: {
24
+ type: 'ApolloSequenceAdapter',
25
+ assemblyId: this.uid,
26
+ },
27
+ metadata: {
28
+ apollo: true,
29
+ file: this.filepath,
30
+ },
31
+ },
32
+ displayName: this.stem,
33
+ };
34
+ }
35
+ trackConfig() {
36
+ return {
37
+ type: 'ApolloTrack',
38
+ trackId: this.uid,
39
+ name: `Annotations (${this.stem})`,
40
+ assemblyNames: [this.uid],
41
+ };
42
+ }
43
+ }
44
+ export default class Desktop extends BaseCommand {
45
+ static summary = 'Generate JBrowse file for use with desktop client';
46
+ static description = 'Generates a file that can be opened with JBrowse Desktop. This file has Apollo already configured and, optionally, a GFF3 for local editing configured as well.';
47
+ static examples = [
48
+ {
49
+ description: 'Generate JBrowse file:',
50
+ command: '<%= config.bin %> <%= command.id %> apollo.jbrowse',
51
+ },
52
+ {
53
+ description: 'Generate JBrowse file and open with default handler:',
54
+ command: '<%= config.bin %> <%= command.id %> apollo.jbrowse --open',
55
+ },
56
+ {
57
+ description: 'Generate JBrowse file and open with specified application:',
58
+ command: '<%= config.bin %> <%= command.id %> apollo.jbrowse --open-with=path/to/jbrowse.AppImage',
59
+ },
60
+ {
61
+ description: 'Generate JBrowse file opening specified gff3 file:',
62
+ command: '<%= config.bin %> <%= command.id %> apollo.jbrowse --gff3-file=path/to/file.gff3',
63
+ },
64
+ ];
65
+ static args = {
66
+ jbrowseFile: Args.string({
67
+ description: 'Generated JBrowse file',
68
+ required: true,
69
+ }),
70
+ };
71
+ static flags = {
72
+ open: Flags.boolean({
73
+ char: 'o',
74
+ description: 'open generated file',
75
+ exclusive: ['open-with'],
76
+ }),
77
+ 'open-with': Flags.string({
78
+ char: 'w',
79
+ description: 'open generated file with specified application',
80
+ exclusive: ['open'],
81
+ }),
82
+ 'gff3-file': Flags.string({
83
+ char: 'f',
84
+ description: 'generated session will open the specified file',
85
+ }),
86
+ };
87
+ async run() {
88
+ const { args, flags } = await this.parse(Desktop);
89
+ const jbrowseFileContent = {
90
+ plugins: [
91
+ {
92
+ name: 'Apollo',
93
+ umdUrl: 'https://cdn.jsdelivr.net/npm/@apollo-annotation/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.production.min.js',
94
+ },
95
+ ],
96
+ assemblies: [],
97
+ tracks: [],
98
+ configuration: {
99
+ theme: {
100
+ palette: {
101
+ primary: {
102
+ main: '#0c4f4b',
103
+ },
104
+ secondary: {
105
+ main: '#1AA39B',
106
+ },
107
+ tertiary: {
108
+ main: '#4f0c10',
109
+ },
110
+ quaternary: {
111
+ main: '#571AA3',
112
+ },
113
+ framesCDS: [
114
+ null,
115
+ {
116
+ main: 'rgb(204,121,167)',
117
+ },
118
+ {
119
+ main: 'rgb(230,159,0)',
120
+ },
121
+ {
122
+ main: 'rgb(240,228,66)',
123
+ },
124
+ {
125
+ main: 'rgb(86,180,233)',
126
+ },
127
+ {
128
+ main: 'rgb(0,114,178)',
129
+ },
130
+ {
131
+ main: 'rgb(0,158,115)',
132
+ },
133
+ ],
134
+ },
135
+ },
136
+ ApolloPlugin: {
137
+ ontologies: [
138
+ {
139
+ name: 'Sequence Ontology',
140
+ source: {
141
+ uri: 'https://github.com/The-Sequence-Ontology/SO-Ontologies/raw/refs/heads/master/Ontology_Files/so.json',
142
+ locationType: 'UriLocation',
143
+ },
144
+ },
145
+ ],
146
+ },
147
+ },
148
+ };
149
+ if (flags['gff3-file']) {
150
+ const gff3 = new Gff3File(flags['gff3-file']);
151
+ jbrowseFileContent.assemblies.push(gff3.assemblyConfig());
152
+ jbrowseFileContent.tracks.push(gff3.trackConfig());
153
+ }
154
+ await fsPromises.writeFile(args.jbrowseFile, JSON.stringify(jbrowseFileContent));
155
+ if (flags.open || flags['open-with']) {
156
+ let options = {};
157
+ if (flags['open-with']) {
158
+ options = { app: { name: flags['open-with'] } };
159
+ }
160
+ await open(args.jbrowseFile, options);
161
+ }
162
+ }
163
+ }
@@ -6,6 +6,6 @@
6
6
  *
7
7
  * Run only matching pattern:
8
8
  *
9
- * yarn test:cli --test-name-pattern='Print help|Feature get'
9
+ * yarn tsx --test-name-pattern='Print help|Feature get' src/test/test.ts
10
10
  */
11
11
  export {};
package/dist/test/test.js CHANGED
@@ -13,13 +13,13 @@
13
13
  *
14
14
  * Run only matching pattern:
15
15
  *
16
- * yarn test:cli --test-name-pattern='Print help|Feature get'
16
+ * yarn tsx --test-name-pattern='Print help|Feature get' src/test/test.ts
17
17
  */
18
18
  import assert from 'node:assert';
19
19
  import * as crypto from 'node:crypto';
20
20
  import fs from 'node:fs';
21
21
  import { afterEach, before, beforeEach, describe } from 'node:test';
22
- import { Shell } from './utils.js';
22
+ import { Shell, deleteAllChecks } from './utils.js';
23
23
  const apollo = 'yarn dev';
24
24
  const P = '--profile testAdmin';
25
25
  let configFile = '';
@@ -421,7 +421,7 @@ void describe('Test CLI', () => {
421
421
  p = new Shell(`${apollo} feature get ${P} -r ${refseq} | jq '.[] | select(.type == "contig") | ._id'`);
422
422
  const fid = p.stdout.trim();
423
423
  // Edit existing attribute value
424
- p = new Shell(`${apollo} feature edit-attribute ${P} -i $${fid} -a source -v 'Eggs & Stuff'`);
424
+ p = new Shell(`${apollo} feature edit-attribute ${P} -i ${fid} -a source -v 'Eggs & Stuff'`);
425
425
  p = new Shell(`${apollo} feature edit-attribute ${P} -i ${fid} -a source`);
426
426
  let out = JSON.parse(p.stdout);
427
427
  assert.deepStrictEqual(out.at(0), `Eggs & Stuff`);
@@ -665,11 +665,12 @@ void describe('Test CLI', () => {
665
665
  let p = new Shell(`${apollo} assembly check ${P}`);
666
666
  let out = JSON.parse(p.stdout);
667
667
  assert.ok(p.stdout.includes('CDSCheck'));
668
+ assert.ok(p.stdout.includes('TranscriptCheck'));
668
669
  const cdsCheckId = out.find((x) => x.name === 'CDSCheck')._id;
669
670
  // Test view checks set for assembly
670
671
  p = new Shell(`${apollo} assembly check ${P} -a v1`);
671
672
  out = JSON.parse(p.stdout);
672
- assert.strictEqual(out.length, 1);
673
+ assert.strictEqual(out.length, 2);
673
674
  // Test non-existant assembly
674
675
  p = new Shell(`${apollo} assembly check ${P} -a non-existant`, false);
675
676
  assert.strictEqual(p.returncode, 1);
@@ -683,20 +684,22 @@ void describe('Test CLI', () => {
683
684
  new Shell(`${apollo} assembly check ${P} -a v1 -c CDSCheck CDSCheck`);
684
685
  p = new Shell(`${apollo} assembly check ${P} -a v1`);
685
686
  out = JSON.parse(p.stdout);
686
- assert.strictEqual(out.length, 1);
687
+ assert.strictEqual(out.length, 2);
687
688
  assert.deepStrictEqual(out.at(0).name, 'CDSCheck');
688
689
  // Works also with check id
689
690
  new Shell(`${apollo} assembly add-from-gff ${P} test_data/tiny.fasta.gff3 -a v2 -f`);
690
691
  new Shell(`${apollo} assembly check ${P} -a v2 -c ${cdsCheckId}`);
691
692
  p = new Shell(`${apollo} assembly check ${P} -a v2`);
692
693
  out = JSON.parse(p.stdout);
693
- assert.strictEqual(out.length, 1);
694
+ assert.strictEqual(out.length, 2);
694
695
  assert.deepStrictEqual(out.at(0).name, 'CDSCheck');
695
696
  // Delete check
696
697
  new Shell(`${apollo} assembly check ${P} -a v1 -d -c CDSCheck`);
697
698
  p = new Shell(`${apollo} assembly check ${P} -a v1`);
698
699
  out = JSON.parse(p.stdout);
699
- assert.deepStrictEqual(p.stdout.trim(), '[]');
700
+ assert.strictEqual(out.length, 1);
701
+ assert.ok(!p.stdout.includes('CDSCheck'));
702
+ assert.ok(p.stdout.includes('TranscriptCheck'));
700
703
  });
701
704
  void globalThis.itName('Feature checks', () => {
702
705
  new Shell(`${apollo} assembly add-from-gff ${P} test_data/tiny.fasta.gff3 -a v1 -f`);
@@ -729,6 +732,25 @@ void describe('Test CLI', () => {
729
732
  p = new Shell(`${apollo} feature check ${P} -i ${xid}`);
730
733
  assert.ok(p.stdout.includes('InternalStopCodon'));
731
734
  });
735
+ void globalThis.itName('Delete check results when unregistering a check', () => {
736
+ new Shell(`${apollo} assembly add-from-gff ${P} test_data/tiny.fasta.gff3 -a v1 -f`);
737
+ let p = new Shell(`${apollo} feature check ${P} -a v1`);
738
+ let checkResults = JSON.parse(p.stdout);
739
+ assert.ok(checkResults.length > 1);
740
+ // Delete all checks and consequently delete all check results
741
+ p = new Shell(`${apollo} assembly check ${P} -a v1`);
742
+ const checkNames = JSON.parse(p.stdout).map((x) => x.name);
743
+ new Shell(`${apollo} assembly check ${P} -a v1 -d -c ${checkNames.join(' ')}`);
744
+ p = new Shell(`${apollo} feature check ${P} -a v1`);
745
+ checkResults = JSON.parse(p.stdout);
746
+ assert.deepEqual(checkResults.length, 0);
747
+ // Put one check back
748
+ new Shell(`${apollo} assembly check ${P} -a v1 -c CDSCheck`);
749
+ p = new Shell(`${apollo} feature check ${P} -a v1`);
750
+ checkResults = JSON.parse(p.stdout);
751
+ assert.ok(checkResults.length > 0);
752
+ assert.deepEqual(checkResults.filter((x) => x.name === 'CDSCheck').length, checkResults.length);
753
+ });
732
754
  void globalThis.itName('User', () => {
733
755
  let p = new Shell(`${apollo} user get ${P}`);
734
756
  let out = JSON.parse(p.stdout);
@@ -999,6 +1021,8 @@ void describe('Test CLI', () => {
999
1021
  });
1000
1022
  void globalThis.itName('Position of internal stop codon warning in forward', () => {
1001
1023
  new Shell(`${apollo} assembly add-from-gff ${P} test_data/warningPositionForward.gff -a vv1 -f`);
1024
+ deleteAllChecks(apollo, P, 'vv1');
1025
+ new Shell(`${apollo} assembly check ${P} -a vv1 -c CDSCheck`);
1002
1026
  const p = new Shell(`${apollo} feature check ${P} -a vv1`);
1003
1027
  const out = JSON.parse(p.stdout);
1004
1028
  assert.deepStrictEqual(out.length, 2);
@@ -1011,6 +1035,8 @@ void describe('Test CLI', () => {
1011
1035
  });
1012
1036
  void globalThis.itName('Position of internal stop codon warning in reverse', () => {
1013
1037
  new Shell(`${apollo} assembly add-from-gff ${P} test_data/warningPositionReverse.gff -a vv1 -f`);
1038
+ deleteAllChecks(apollo, P, 'vv1');
1039
+ new Shell(`${apollo} assembly check ${P} -a vv1 -c CDSCheck`);
1014
1040
  const p = new Shell(`${apollo} feature check ${P} -a vv1`);
1015
1041
  const out = JSON.parse(p.stdout);
1016
1042
  assert.deepStrictEqual(out.length, 2);
@@ -1023,6 +1049,8 @@ void describe('Test CLI', () => {
1023
1049
  });
1024
1050
  void globalThis.itName('Detect missing start codon forward', () => {
1025
1051
  new Shell(`${apollo} assembly add-from-gff ${P} test_data/missingStartCodonForward.gff3 -a m1 -f`);
1052
+ deleteAllChecks(apollo, P, 'm1');
1053
+ new Shell(`${apollo} assembly check ${P} -a m1 -c CDSCheck`);
1026
1054
  const p = new Shell(`${apollo} feature check ${P} -a m1`);
1027
1055
  const out = JSON.parse(p.stdout);
1028
1056
  assert.strictEqual(out.length, 1);
@@ -1033,6 +1061,8 @@ void describe('Test CLI', () => {
1033
1061
  });
1034
1062
  void globalThis.itName('Detect missing start codon reverse', () => {
1035
1063
  new Shell(`${apollo} assembly add-from-gff ${P} test_data/missingStartCodonReverse.gff3 -a m1 -f`);
1064
+ deleteAllChecks(apollo, P, 'm1');
1065
+ new Shell(`${apollo} assembly check ${P} -a m1 -c CDSCheck`);
1036
1066
  const p = new Shell(`${apollo} feature check ${P} -a m1`);
1037
1067
  const out = JSON.parse(p.stdout);
1038
1068
  assert.strictEqual(out.length, 1);
@@ -1061,4 +1091,62 @@ void describe('Test CLI', () => {
1061
1091
  out = JSON.parse(p.stdout);
1062
1092
  assert.deepStrictEqual(out.at(0)?.max, 30);
1063
1093
  });
1094
+ void globalThis.itName('Check splice site', () => {
1095
+ new Shell(`${apollo} assembly add-from-gff ${P} test_data/checkSplice.fasta.gff3 -f`);
1096
+ deleteAllChecks(apollo, P, 'checkSplice.fasta.gff3');
1097
+ new Shell(`${apollo} assembly check ${P} -a checkSplice.fasta.gff3 -c TranscriptCheck`);
1098
+ let p = new Shell(`${apollo} feature get ${P} -a checkSplice.fasta.gff3`);
1099
+ const features = JSON.parse(p.stdout);
1100
+ const okMrnaId = [];
1101
+ let warnMrnaIdForw;
1102
+ let warnMrnaIdRev;
1103
+ for (const x of features) {
1104
+ const children = Object.values(x.children);
1105
+ for (const child of children) {
1106
+ if (!child.attributes) {
1107
+ throw new Error('Error getting attributes');
1108
+ }
1109
+ if (JSON.stringify(child.attributes.gff_id) ===
1110
+ JSON.stringify(['EDEN.1']) ||
1111
+ JSON.stringify(child.attributes.gff_id) ===
1112
+ JSON.stringify(['EDEN2.1'])) {
1113
+ okMrnaId.push(child._id);
1114
+ }
1115
+ if (JSON.stringify(child.attributes.gff_id) === JSON.stringify(['EDEN.2'])) {
1116
+ warnMrnaIdForw = child._id;
1117
+ }
1118
+ if (JSON.stringify(child.attributes.gff_id) ===
1119
+ JSON.stringify(['EDEN2.2'])) {
1120
+ warnMrnaIdRev = child._id;
1121
+ }
1122
+ }
1123
+ }
1124
+ p = new Shell(`${apollo} feature check ${P} -a checkSplice.fasta.gff3 -i ${okMrnaId.join(' ')}`);
1125
+ let out = JSON.parse(p.stdout);
1126
+ assert.deepStrictEqual(out, []);
1127
+ // Check forward transcript
1128
+ p = new Shell(`${apollo} feature check ${P} -a checkSplice.fasta.gff3 -i ${warnMrnaIdForw}`);
1129
+ out = JSON.parse(p.stdout);
1130
+ assert.strictEqual(out.length, 4);
1131
+ let chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtFivePrime' && x.start === 11);
1132
+ assert.strictEqual(chk.length, 1);
1133
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtFivePrime' && x.start === 31);
1134
+ assert.strictEqual(chk.length, 1);
1135
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtThreePrime' && x.start === 17);
1136
+ assert.strictEqual(chk.length, 1);
1137
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtThreePrime' && x.start === 37);
1138
+ assert.strictEqual(chk.length, 1);
1139
+ // Check reverse transcript
1140
+ p = new Shell(`${apollo} feature check ${P} -a checkSplice.fasta.gff3 -i ${warnMrnaIdRev}`);
1141
+ out = JSON.parse(p.stdout);
1142
+ assert.strictEqual(out.length, 4);
1143
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtThreePrime' && x.start === 11);
1144
+ assert.strictEqual(chk.length, 1);
1145
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtThreePrime' && x.start === 31);
1146
+ assert.strictEqual(chk.length, 1);
1147
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtFivePrime' && x.start === 17);
1148
+ assert.strictEqual(chk.length, 1);
1149
+ chk = out.filter((x) => x.cause === 'NonCanonicalSpliceSiteAtFivePrime' && x.start === 37);
1150
+ assert.strictEqual(chk.length, 1);
1151
+ });
1064
1152
  });
@@ -7,3 +7,4 @@ export declare class Shell {
7
7
  stderr: string;
8
8
  constructor(cmd: string, strict?: boolean, timeout?: number);
9
9
  }
10
+ export declare function deleteAllChecks(apollo: string, profile: string, assembly: string): void;
@@ -26,3 +26,9 @@ export class Shell {
26
26
  }
27
27
  }
28
28
  }
29
+ export function deleteAllChecks(apollo, profile, assembly) {
30
+ const p = new Shell(`${apollo} assembly check ${profile}`);
31
+ const out = JSON.parse(p.stdout);
32
+ const checks = out.map((chk) => chk.name);
33
+ new Shell(`${apollo} assembly check ${profile} --assembly ${assembly} --delete --check ${checks.join(' ')}`);
34
+ }
@@ -684,22 +684,10 @@
684
684
  "sequence.js"
685
685
  ]
686
686
  },
687
- "export:gff3": {
687
+ "change:get": {
688
688
  "aliases": [],
689
- "args": {
690
- "assembly": {
691
- "description": "Export annotations for this assembly name or id",
692
- "name": "assembly",
693
- "required": true
694
- }
695
- },
696
- "description": "Export the annotations for an assembly to stdout as gff3",
697
- "examples": [
698
- {
699
- "description": "Export annotations for myAssembly:",
700
- "command": "<%= config.bin %> <%= command.id %> myAssembly > out.gff3"
701
- }
702
- ],
689
+ "args": {},
690
+ "description": "Return the change log in json format. Note that when an assembly is deleted the link between common name and ID is lost (it can still be recovered by inspecting the change log but at present this task is left to the user). In such cases you need to use the assembly ID.",
703
691
  "flags": {
704
692
  "profile": {
705
693
  "description": "Use credentials from this profile",
@@ -715,33 +703,48 @@
715
703
  "multiple": false,
716
704
  "type": "option"
717
705
  },
718
- "include-fasta": {
719
- "description": "Include fasta sequence in output",
720
- "name": "include-fasta",
721
- "allowNo": false,
722
- "type": "boolean"
706
+ "assembly": {
707
+ "char": "a",
708
+ "description": "Get changes only for these assembly names or IDs (but see description)",
709
+ "name": "assembly",
710
+ "hasDynamicHelp": false,
711
+ "multiple": true,
712
+ "type": "option"
723
713
  }
724
714
  },
725
715
  "hasDynamicHelp": false,
726
716
  "hiddenAliases": [],
727
- "id": "export:gff3",
717
+ "id": "change:get",
728
718
  "pluginAlias": "@apollo-annotation/cli",
729
719
  "pluginName": "@apollo-annotation/cli",
730
720
  "pluginType": "core",
731
721
  "strict": true,
722
+ "summary": "Get list of changes",
732
723
  "enableJsonFlag": false,
733
724
  "isESM": true,
734
725
  "relativePath": [
735
726
  "dist",
736
727
  "commands",
737
- "export",
738
- "gff3.js"
728
+ "change",
729
+ "get.js"
739
730
  ]
740
731
  },
741
- "change:get": {
732
+ "export:gff3": {
742
733
  "aliases": [],
743
- "args": {},
744
- "description": "Return the change log in json format. Note that when an assembly is deleted the link between common name and ID is lost (it can still be recovered by inspecting the change log but at present this task is left to the user). In such cases you need to use the assembly ID.",
734
+ "args": {
735
+ "assembly": {
736
+ "description": "Export annotations for this assembly name or id",
737
+ "name": "assembly",
738
+ "required": true
739
+ }
740
+ },
741
+ "description": "Export the annotations for an assembly to stdout as gff3",
742
+ "examples": [
743
+ {
744
+ "description": "Export annotations for myAssembly:",
745
+ "command": "<%= config.bin %> <%= command.id %> myAssembly > out.gff3"
746
+ }
747
+ ],
745
748
  "flags": {
746
749
  "profile": {
747
750
  "description": "Use credentials from this profile",
@@ -757,30 +760,27 @@
757
760
  "multiple": false,
758
761
  "type": "option"
759
762
  },
760
- "assembly": {
761
- "char": "a",
762
- "description": "Get changes only for these assembly names or IDs (but see description)",
763
- "name": "assembly",
764
- "hasDynamicHelp": false,
765
- "multiple": true,
766
- "type": "option"
763
+ "include-fasta": {
764
+ "description": "Include fasta sequence in output",
765
+ "name": "include-fasta",
766
+ "allowNo": false,
767
+ "type": "boolean"
767
768
  }
768
769
  },
769
770
  "hasDynamicHelp": false,
770
771
  "hiddenAliases": [],
771
- "id": "change:get",
772
+ "id": "export:gff3",
772
773
  "pluginAlias": "@apollo-annotation/cli",
773
774
  "pluginName": "@apollo-annotation/cli",
774
775
  "pluginType": "core",
775
776
  "strict": true,
776
- "summary": "Get list of changes",
777
777
  "enableJsonFlag": false,
778
778
  "isESM": true,
779
779
  "relativePath": [
780
780
  "dist",
781
781
  "commands",
782
- "change",
783
- "get.js"
782
+ "export",
783
+ "gff3.js"
784
784
  ]
785
785
  },
786
786
  "feature:add-child": {
@@ -1833,6 +1833,96 @@
1833
1833
  "upload.js"
1834
1834
  ]
1835
1835
  },
1836
+ "jbrowse:desktop": {
1837
+ "aliases": [],
1838
+ "args": {
1839
+ "jbrowseFile": {
1840
+ "description": "Generated JBrowse file",
1841
+ "name": "jbrowseFile",
1842
+ "required": true
1843
+ }
1844
+ },
1845
+ "description": "Generates a file that can be opened with JBrowse Desktop. This file has Apollo already configured and, optionally, a GFF3 for local editing configured as well.",
1846
+ "examples": [
1847
+ {
1848
+ "description": "Generate JBrowse file:",
1849
+ "command": "<%= config.bin %> <%= command.id %> apollo.jbrowse"
1850
+ },
1851
+ {
1852
+ "description": "Generate JBrowse file and open with default handler:",
1853
+ "command": "<%= config.bin %> <%= command.id %> apollo.jbrowse --open"
1854
+ },
1855
+ {
1856
+ "description": "Generate JBrowse file and open with specified application:",
1857
+ "command": "<%= config.bin %> <%= command.id %> apollo.jbrowse --open-with=path/to/jbrowse.AppImage"
1858
+ },
1859
+ {
1860
+ "description": "Generate JBrowse file opening specified gff3 file:",
1861
+ "command": "<%= config.bin %> <%= command.id %> apollo.jbrowse --gff3-file=path/to/file.gff3"
1862
+ }
1863
+ ],
1864
+ "flags": {
1865
+ "profile": {
1866
+ "description": "Use credentials from this profile",
1867
+ "name": "profile",
1868
+ "hasDynamicHelp": false,
1869
+ "multiple": false,
1870
+ "type": "option"
1871
+ },
1872
+ "config-file": {
1873
+ "description": "Use this config file (mostly for testing)",
1874
+ "name": "config-file",
1875
+ "hasDynamicHelp": false,
1876
+ "multiple": false,
1877
+ "type": "option"
1878
+ },
1879
+ "open": {
1880
+ "char": "o",
1881
+ "description": "open generated file",
1882
+ "exclusive": [
1883
+ "open-with"
1884
+ ],
1885
+ "name": "open",
1886
+ "allowNo": false,
1887
+ "type": "boolean"
1888
+ },
1889
+ "open-with": {
1890
+ "char": "w",
1891
+ "description": "open generated file with specified application",
1892
+ "exclusive": [
1893
+ "open"
1894
+ ],
1895
+ "name": "open-with",
1896
+ "hasDynamicHelp": false,
1897
+ "multiple": false,
1898
+ "type": "option"
1899
+ },
1900
+ "gff3-file": {
1901
+ "char": "f",
1902
+ "description": "generated session will open the specified file",
1903
+ "name": "gff3-file",
1904
+ "hasDynamicHelp": false,
1905
+ "multiple": false,
1906
+ "type": "option"
1907
+ }
1908
+ },
1909
+ "hasDynamicHelp": false,
1910
+ "hiddenAliases": [],
1911
+ "id": "jbrowse:desktop",
1912
+ "pluginAlias": "@apollo-annotation/cli",
1913
+ "pluginName": "@apollo-annotation/cli",
1914
+ "pluginType": "core",
1915
+ "strict": true,
1916
+ "summary": "Generate JBrowse file for use with desktop client",
1917
+ "enableJsonFlag": false,
1918
+ "isESM": true,
1919
+ "relativePath": [
1920
+ "dist",
1921
+ "commands",
1922
+ "jbrowse",
1923
+ "desktop.js"
1924
+ ]
1925
+ },
1836
1926
  "jbrowse:get-config": {
1837
1927
  "aliases": [],
1838
1928
  "args": {},
@@ -2106,5 +2196,5 @@
2106
2196
  ]
2107
2197
  }
2108
2198
  },
2109
- "version": "0.3.6"
2199
+ "version": "0.3.8"
2110
2200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo-annotation/cli",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Command line interface for the Apollo annotation server",
5
5
  "repository": {
6
6
  "type": "git",
@@ -82,14 +82,15 @@
82
82
  "cli-progress": "^3.12.0",
83
83
  "conf": "^12.0.0",
84
84
  "joi": "^17.7.0",
85
+ "nanoid": "^4.0.2",
85
86
  "open": "^10.1.0",
86
87
  "tslib": "^2.3.1",
87
88
  "undici": "^6.7.0",
88
89
  "yaml": "^2.3.4"
89
90
  },
90
91
  "devDependencies": {
91
- "@apollo-annotation/mst": "^0.3.6",
92
- "@apollo-annotation/shared": "^0.3.6",
92
+ "@apollo-annotation/mst": "^0.3.8",
93
+ "@apollo-annotation/shared": "^0.3.8",
93
94
  "@istanbuljs/esm-loader-hook": "^0.2.0",
94
95
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
95
96
  "@oclif/test": "^3.1.3",