@jbrowse/cli 4.0.4 → 4.1.3
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 +269 -111
- package/bin/run +2 -1
- package/bundle/index.js +289 -538
- package/dist/base.js +1 -2
- package/dist/bin.js +2 -4
- package/dist/cliFetch.js +3 -0
- package/dist/commands/add-assembly/index.js +19 -22
- package/dist/commands/add-assembly/utils.js +75 -92
- package/dist/commands/add-connection.js +16 -22
- package/dist/commands/add-track-json.js +13 -16
- package/dist/commands/add-track-utils/adapter-utils.js +6 -13
- package/dist/commands/add-track-utils/file-operations.js +8 -14
- package/dist/commands/add-track-utils/track-config.js +10 -18
- package/dist/commands/add-track-utils/validators.js +15 -27
- package/dist/commands/add-track.js +27 -33
- package/dist/commands/admin-server/index.js +24 -30
- package/dist/commands/admin-server/utils.js +27 -38
- package/dist/commands/create.js +16 -22
- package/dist/commands/make-pif/cigar-utils.js +3 -8
- package/dist/commands/make-pif/file-utils.js +10 -18
- package/dist/commands/make-pif/index.js +13 -16
- package/dist/commands/make-pif/pif-generator.js +14 -23
- package/dist/commands/process-utils.js +1 -4
- package/dist/commands/remove-track.js +8 -11
- package/dist/commands/set-default-session.js +13 -19
- package/dist/commands/shared/config-operations.js +7 -11
- package/dist/commands/shared/sort-utils.js +7 -14
- package/dist/commands/shared/validators.js +4 -8
- package/dist/commands/sort-bed.js +14 -17
- package/dist/commands/sort-gff.js +14 -17
- package/dist/commands/text-index/adapter-utils.js +5 -10
- package/dist/commands/text-index/aggregate.js +12 -15
- package/dist/commands/text-index/command.js +9 -12
- package/dist/commands/text-index/config-utils.js +24 -38
- package/dist/commands/text-index/file-list.js +11 -17
- package/dist/commands/text-index/index.js +4 -11
- package/dist/commands/text-index/indexing-utils.js +59 -43
- package/dist/commands/text-index/per-track.js +13 -16
- package/dist/commands/text-index/validators.js +3 -8
- package/dist/commands/track-utils.js +22 -33
- package/dist/commands/upgrade.js +20 -26
- package/dist/index.js +31 -39
- package/dist/types/common.js +5 -107
- package/dist/util.js +13 -20
- package/dist/utils.js +82 -58
- package/dist/version.js +1 -0
- package/package.json +7 -6
- package/dist/fetchWithProxy.js +0 -12
- package/dist/types/gff3Adapter.js +0 -42
- package/dist/types/streamUtils.js +0 -66
- package/dist/types/vcfAdapter.js +0 -39
package/README.md
CHANGED
|
@@ -82,13 +82,22 @@ Downloads and installs the latest JBrowse 2 release
|
|
|
82
82
|
Usage: jbrowse create [localPath] [options]
|
|
83
83
|
|
|
84
84
|
Options:
|
|
85
|
-
-h, --help
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
85
|
+
-h, --help Show help
|
|
86
|
+
|
|
87
|
+
-f, --force Overwrites existing JBrowse 2 installation if
|
|
88
|
+
present in path
|
|
89
|
+
|
|
90
|
+
-l, --listVersions Lists out all versions of JBrowse 2
|
|
91
|
+
|
|
92
|
+
--branch Download a development build from a named git
|
|
93
|
+
branch
|
|
94
|
+
|
|
95
|
+
--nightly Download the latest development build from the main
|
|
96
|
+
branch
|
|
97
|
+
|
|
98
|
+
-u, --url A direct URL to a JBrowse 2 release
|
|
99
|
+
|
|
100
|
+
-t, --tag Version of JBrowse 2 to install. Format is v1.0.0.
|
|
92
101
|
Defaults to latest
|
|
93
102
|
|
|
94
103
|
# Download latest release from github, and put in specific path
|
|
@@ -116,40 +125,79 @@ Add an assembly to a JBrowse 2 configuration
|
|
|
116
125
|
Usage: jbrowse add-assembly <sequence> [options]
|
|
117
126
|
|
|
118
127
|
Options:
|
|
119
|
-
-t, --type
|
|
128
|
+
-t, --type type of sequence, by default inferred from sequence
|
|
129
|
+
file
|
|
120
130
|
|
|
121
|
-
indexedFasta
|
|
122
|
-
|
|
131
|
+
indexedFasta - An index FASTA (e.g. .fa or .fasta)
|
|
132
|
+
file; can optionally specify --faiLocation
|
|
123
133
|
|
|
124
|
-
bgzipFasta
|
|
125
|
-
|
|
134
|
+
bgzipFasta - A block-gzipped and indexed FASTA
|
|
135
|
+
(e.g. .fa.gz or .fasta.gz) file; can optionally
|
|
136
|
+
specify --faiLocation and/or --gziLocation
|
|
126
137
|
|
|
127
|
-
twoBit
|
|
138
|
+
twoBit - A twoBit (e.g. .2bit) file
|
|
128
139
|
|
|
129
|
-
chromSizes
|
|
140
|
+
chromSizes - A chromosome sizes (e.g. .chrom.sizes)
|
|
141
|
+
file
|
|
130
142
|
|
|
131
|
-
custom
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
143
|
+
custom - Either a JSON file location or inline JSON
|
|
144
|
+
that defines a custom sequence adapter; must
|
|
145
|
+
provide --name if using inline JSON [choices:
|
|
146
|
+
indexedFasta, bgzipFasta, twoBit, chromSizes,
|
|
147
|
+
custom]
|
|
148
|
+
|
|
149
|
+
-n, --name Name of the assembly; if not specified, will be
|
|
150
|
+
guessed using the sequence file name
|
|
151
|
+
|
|
152
|
+
-a, --alias An alias for the assembly name (e.g. "hg38" if the
|
|
153
|
+
name of the assembly is "GRCh38"); can be specified
|
|
154
|
+
multiple times
|
|
155
|
+
|
|
156
|
+
--displayName The display name to specify for the assembly, e.g.
|
|
157
|
+
"Homo sapiens (hg38)" while the name can be a
|
|
158
|
+
shorter identifier like "hg38"
|
|
159
|
+
|
|
160
|
+
--faiLocation [default: <fastaLocation>.fai] FASTA index file or
|
|
161
|
+
URL
|
|
162
|
+
|
|
163
|
+
--gziLocation [default: <fastaLocation>.gzi] FASTA gzip index
|
|
164
|
+
file or URL
|
|
165
|
+
|
|
166
|
+
--refNameAliases Reference sequence name aliases file or URL;
|
|
167
|
+
assumed to be a tab-separated aliases file unless
|
|
168
|
+
--refNameAliasesType is specified
|
|
169
|
+
|
|
170
|
+
--refNameAliasesType Type of aliases defined by --refNameAliases; if
|
|
171
|
+
"custom", --refNameAliases is either a JSON file
|
|
172
|
+
location or inline JSON that defines a custom
|
|
173
|
+
sequence adapter [choices: aliases, custom]
|
|
174
|
+
|
|
175
|
+
--refNameColors A comma-separated list of color strings for the
|
|
176
|
+
reference sequence names; will cycle through colors
|
|
177
|
+
if there are fewer colors than sequences
|
|
178
|
+
|
|
179
|
+
--target path to config file in JB2 installation directory
|
|
180
|
+
to write out to. Creates ./config.json if
|
|
181
|
+
nonexistent
|
|
182
|
+
|
|
183
|
+
--out synonym for target
|
|
184
|
+
|
|
185
|
+
-h, --help Display help for command
|
|
186
|
+
|
|
187
|
+
-l, --load Required flag when using a local file. Choose how
|
|
188
|
+
to manage the data directory. Copy, symlink, or
|
|
189
|
+
move the data directory to the JBrowse directory.
|
|
190
|
+
Or use inPlace to modify the config without doing
|
|
191
|
+
any file operations [choices: copy, symlink, move,
|
|
192
|
+
inPlace]
|
|
193
|
+
|
|
194
|
+
--skipCheck Don't check whether or not the sequence file or URL
|
|
195
|
+
exists or if you are in a JBrowse directory
|
|
196
|
+
|
|
197
|
+
--overwrite Overwrite existing assembly if one with the same
|
|
198
|
+
name exists
|
|
199
|
+
|
|
200
|
+
-f, --force Equivalent to `--skipCheck --overwrite`
|
|
153
201
|
|
|
154
202
|
# add assembly to installation in current directory. assumes .fai file also exists, and copies GRCh38.fa and GRCh38.fa.fai to current directory
|
|
155
203
|
$ jbrowse add-assembly GRCh38.fa --load copy
|
|
@@ -185,25 +233,51 @@ Add a track to a JBrowse 2 configuration
|
|
|
185
233
|
Usage: jbrowse add-track <track> [options]
|
|
186
234
|
|
|
187
235
|
Options:
|
|
188
|
-
-h, --help
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
236
|
+
-h, --help
|
|
237
|
+
|
|
238
|
+
-t, --trackType Type of track, by default inferred from track file
|
|
239
|
+
|
|
240
|
+
-n, --name Name of the track. Will be defaulted to the trackId
|
|
241
|
+
if none specified
|
|
242
|
+
|
|
243
|
+
--indexFile Optional index file for the track
|
|
244
|
+
|
|
245
|
+
-d, --description Optional description of the track
|
|
246
|
+
|
|
247
|
+
-a, --assemblyNames Assembly name or names for track as comma separated
|
|
248
|
+
string
|
|
249
|
+
|
|
250
|
+
--category Optional comma separated string of categories to
|
|
251
|
+
group tracks
|
|
252
|
+
|
|
253
|
+
--config Any extra config settings to add to a track
|
|
254
|
+
|
|
255
|
+
--target Path to config file in JB2 installation to write
|
|
256
|
+
out to
|
|
257
|
+
|
|
258
|
+
--out Synonym for target
|
|
259
|
+
|
|
260
|
+
--subDir When using --load a file, output to a subdirectory
|
|
261
|
+
of the target dir
|
|
262
|
+
|
|
263
|
+
--trackId trackId for the track, by default inferred from
|
|
264
|
+
filename
|
|
265
|
+
|
|
266
|
+
-l, --load How to manage the track (copy, symlink, move,
|
|
267
|
+
inPlace)
|
|
268
|
+
|
|
269
|
+
--skipCheck Skip check for whether file or URL exists
|
|
270
|
+
|
|
271
|
+
--overwrite Overwrites existing track if it shares the same
|
|
272
|
+
trackId
|
|
273
|
+
|
|
274
|
+
-f, --force Equivalent to --skipCheck --overwrite
|
|
275
|
+
|
|
276
|
+
--protocol Force protocol to a specific value
|
|
277
|
+
|
|
278
|
+
--bed1 Used only for mcscan anchors/simpleAnchors types
|
|
279
|
+
|
|
280
|
+
--bed2 Used only for mcscan anchors/simpleAnchors types
|
|
207
281
|
|
|
208
282
|
# copy /path/to/my.bam and /path/to/my.bam.bai to current directory and adds track to config.json
|
|
209
283
|
$ jbrowse add-track /path/to/my.bam --load copy
|
|
@@ -233,21 +307,53 @@ Make a text-indexing file for any given track(s).
|
|
|
233
307
|
Usage: jbrowse text-index [options]
|
|
234
308
|
|
|
235
309
|
Options:
|
|
236
|
-
-h, --help
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
310
|
+
-h, --help Show CLI help
|
|
311
|
+
|
|
312
|
+
--tracks Specific tracks to index, formatted as comma
|
|
313
|
+
separated trackIds. If unspecified, indexes all
|
|
314
|
+
available tracks
|
|
315
|
+
|
|
316
|
+
--excludeTracks Specific tracks to exclude from indexing, formatted
|
|
317
|
+
as comma separated trackIds
|
|
318
|
+
|
|
319
|
+
--target Path to config file in JB2 installation directory
|
|
320
|
+
to read from.
|
|
321
|
+
|
|
322
|
+
--out Synonym for target
|
|
323
|
+
|
|
324
|
+
--attributes Comma separated list of attributes to index
|
|
325
|
+
[default: Name,ID]
|
|
326
|
+
|
|
327
|
+
-a, --assemblies Specify the assembl(ies) to create an index for. If
|
|
328
|
+
unspecified, creates an index for each assembly in
|
|
329
|
+
the config
|
|
330
|
+
|
|
331
|
+
--force Overwrite previously existing indexes [default:
|
|
332
|
+
false]
|
|
333
|
+
|
|
334
|
+
-q, --quiet Hide the progress bars [default: false]
|
|
335
|
+
|
|
336
|
+
--perTrack If set, creates an index per track [default: false]
|
|
337
|
+
|
|
338
|
+
--exclude Adds gene type to list of excluded types [default:
|
|
339
|
+
CDS,exon]
|
|
340
|
+
|
|
341
|
+
--prefixSize Specify the prefix size for the ixx index. We
|
|
342
|
+
attempt to automatically calculate this, but you
|
|
343
|
+
can manually specify this too. If many genes have
|
|
344
|
+
similar gene IDs e.g. Z000000001, Z000000002 the
|
|
345
|
+
prefix size should be larger so that they get split
|
|
346
|
+
into different bins
|
|
347
|
+
|
|
348
|
+
--file File or files to index (can be used to create trix
|
|
349
|
+
indexes for embedded component use cases not using
|
|
350
|
+
a config.json for example)
|
|
351
|
+
|
|
352
|
+
--fileId Set the trackId used for the indexes generated with
|
|
353
|
+
the --file argument
|
|
354
|
+
|
|
355
|
+
--dryrun Just print out tracks that will be indexed by the
|
|
356
|
+
process, without doing any indexing
|
|
251
357
|
|
|
252
358
|
# indexes all tracks that it can find in the current directory's config.json
|
|
253
359
|
$ jbrowse text-index
|
|
@@ -277,10 +383,14 @@ Start up a small admin server for JBrowse configuration
|
|
|
277
383
|
Usage: jbrowse admin-server [options]
|
|
278
384
|
|
|
279
385
|
Options:
|
|
280
|
-
-h, --help
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
386
|
+
-h, --help
|
|
387
|
+
|
|
388
|
+
-p, --port Specified port to start the server on (default:
|
|
389
|
+
9090)
|
|
390
|
+
|
|
391
|
+
--root Path to the root of the JB2 installation
|
|
392
|
+
|
|
393
|
+
--bodySizeLimit Size limit of the update message (default: 25mb)
|
|
284
394
|
|
|
285
395
|
$ jbrowse admin-server
|
|
286
396
|
$ jbrowse admin-server -p 8888
|
|
@@ -295,14 +405,23 @@ Upgrades JBrowse 2 to latest version
|
|
|
295
405
|
Usage: jbrowse upgrade [localPath] [options]
|
|
296
406
|
|
|
297
407
|
Options:
|
|
298
|
-
-h, --help
|
|
299
|
-
|
|
300
|
-
-
|
|
408
|
+
-h, --help Display help for command
|
|
409
|
+
|
|
410
|
+
-l, --listVersions Lists out all versions of JBrowse 2
|
|
411
|
+
|
|
412
|
+
-t, --tag Version of JBrowse 2 to install. Format is v1.0.0.
|
|
301
413
|
Defaults to latest
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
414
|
+
|
|
415
|
+
--branch Download a development build from a named git
|
|
416
|
+
branch
|
|
417
|
+
|
|
418
|
+
--nightly Download the latest development build from the main
|
|
419
|
+
branch
|
|
420
|
+
|
|
421
|
+
--clean Removes old js,map,and LICENSE files in the
|
|
422
|
+
installation
|
|
423
|
+
|
|
424
|
+
-u, --url A direct URL to a JBrowse 2 release
|
|
306
425
|
|
|
307
426
|
# Upgrades current directory to latest jbrowse release
|
|
308
427
|
$ jbrowse upgrade
|
|
@@ -332,9 +451,12 @@ creates pairwise indexed PAF (PIF), with bgzip and tabix
|
|
|
332
451
|
Usage: jbrowse make-pif <file> [options]
|
|
333
452
|
|
|
334
453
|
Options:
|
|
335
|
-
-h, --help
|
|
336
|
-
|
|
337
|
-
|
|
454
|
+
-h, --help
|
|
455
|
+
|
|
456
|
+
--out Where to write the output file. will write
|
|
457
|
+
${file}.pif.gz and ${file}.pif.gz.tbi
|
|
458
|
+
|
|
459
|
+
--csi Create a CSI index for the PIF file instead of TBI
|
|
338
460
|
|
|
339
461
|
$ jbrowse make-pif input.paf # creates input.pif.gz in same directory
|
|
340
462
|
|
|
@@ -350,7 +472,7 @@ Helper utility to sort GFF files for tabix. Moves all lines starting with # to t
|
|
|
350
472
|
Usage: jbrowse sort-gff [file] [options]
|
|
351
473
|
|
|
352
474
|
Options:
|
|
353
|
-
-h, --help
|
|
475
|
+
-h, --help
|
|
354
476
|
|
|
355
477
|
# sort gff and pipe to bgzip
|
|
356
478
|
$ jbrowse sort-gff input.gff | bgzip > sorted.gff.gz
|
|
@@ -369,7 +491,7 @@ Helper utility to sort BED files for tabix. Moves all lines starting with # to t
|
|
|
369
491
|
Usage: jbrowse sort-bed [file] [options]
|
|
370
492
|
|
|
371
493
|
Options:
|
|
372
|
-
-h, --help
|
|
494
|
+
-h, --help
|
|
373
495
|
|
|
374
496
|
# sort bed and pipe to bgzip
|
|
375
497
|
$ jbrowse sort-bed input.bed | bgzip > sorted.bed.gz
|
|
@@ -387,17 +509,35 @@ Add a connection to a JBrowse 2 configuration
|
|
|
387
509
|
Usage: jbrowse add-connection <connectionUrlOrPath> [options]
|
|
388
510
|
|
|
389
511
|
Options:
|
|
390
|
-
-h, --help
|
|
391
|
-
|
|
392
|
-
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
512
|
+
-h, --help
|
|
513
|
+
|
|
514
|
+
-t, --type Type of connection (e.g. JBrowse1Connection,
|
|
515
|
+
UCSCTrackHubConnection, custom)
|
|
516
|
+
|
|
517
|
+
-a, --assemblyNames For UCSC: optional comma separated list of assembly
|
|
518
|
+
names to filter. For JBrowse1: a single assembly
|
|
519
|
+
name
|
|
520
|
+
|
|
521
|
+
-c, --config Extra config settings to add to connection in JSON
|
|
522
|
+
object format
|
|
523
|
+
|
|
524
|
+
--connectionId Id for the connection that must be unique to
|
|
525
|
+
JBrowse
|
|
526
|
+
|
|
527
|
+
-n, --name Name of the connection. Defaults to connectionId if
|
|
528
|
+
not provided
|
|
529
|
+
|
|
530
|
+
--target Path to config file in JB2 installation directory
|
|
531
|
+
to write out to
|
|
532
|
+
|
|
533
|
+
--out Synonym for target
|
|
534
|
+
|
|
535
|
+
--skipCheck Don't check whether the data directory URL exists
|
|
536
|
+
|
|
537
|
+
--overwrite Overwrites any existing connections if same
|
|
538
|
+
connection id
|
|
539
|
+
|
|
540
|
+
-f, --force Equivalent to --skipCheck --overwrite
|
|
401
541
|
|
|
402
542
|
$ jbrowse add-connection http://mysite.com/jbrowse/data/ -a hg19
|
|
403
543
|
$ jbrowse add-connection http://mysite.com/jbrowse/custom_data_folder/ --type JBrowse1Connection -a hg38
|
|
@@ -416,10 +556,15 @@ Add a track configuration directly from a JSON hunk to the JBrowse 2 configurati
|
|
|
416
556
|
Usage: jbrowse add-track-json <track> [options]
|
|
417
557
|
|
|
418
558
|
Options:
|
|
419
|
-
-h, --help
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
559
|
+
-h, --help
|
|
560
|
+
|
|
561
|
+
-u, --update Update the contents of an existing track, matched
|
|
562
|
+
based on trackId
|
|
563
|
+
|
|
564
|
+
--target Path to config file in JB2 installation directory
|
|
565
|
+
to write out to
|
|
566
|
+
|
|
567
|
+
--out Synonym for target
|
|
423
568
|
|
|
424
569
|
$ jbrowse add-track-json track.json
|
|
425
570
|
$ jbrowse add-track-json track.json --update
|
|
@@ -434,9 +579,12 @@ Remove a track configuration from a JBrowse 2 configuration. Be aware that this
|
|
|
434
579
|
Usage: jbrowse remove-track <trackId> [options]
|
|
435
580
|
|
|
436
581
|
Options:
|
|
437
|
-
-h, --help
|
|
438
|
-
|
|
439
|
-
|
|
582
|
+
-h, --help
|
|
583
|
+
|
|
584
|
+
--target Path to config file in JB2 installation directory
|
|
585
|
+
to write out to
|
|
586
|
+
|
|
587
|
+
--out Synonym for target
|
|
440
588
|
|
|
441
589
|
$ jbrowse remove-track trackId
|
|
442
590
|
```
|
|
@@ -450,13 +598,23 @@ Set a default session with views and tracks
|
|
|
450
598
|
Usage: jbrowse add-track <track> [options]
|
|
451
599
|
|
|
452
600
|
Options:
|
|
453
|
-
-s, --session
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
601
|
+
-s, --session set path to a file containing session in json
|
|
602
|
+
format (required, unless using
|
|
603
|
+
delete/currentSession flags)
|
|
604
|
+
|
|
605
|
+
-n, --name Give a name for the default session [default: New
|
|
606
|
+
Default Session]
|
|
607
|
+
|
|
608
|
+
-c, --currentSession List out the current default session
|
|
609
|
+
|
|
610
|
+
--target path to config file in JB2 installation directory
|
|
611
|
+
to write out to
|
|
612
|
+
|
|
613
|
+
--out synonym for target
|
|
614
|
+
|
|
615
|
+
--delete Delete any existing default session.
|
|
616
|
+
|
|
617
|
+
-h, --help Show help
|
|
460
618
|
|
|
461
619
|
# set default session for the config.json in your current directory
|
|
462
620
|
$ jbrowse set-default-session --session /path/to/default/session.json
|
package/bin/run
CHANGED