@jbrowse/cli 2.16.0 → 2.17.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/README.md +44 -12
- package/lib/commands/create.js +1 -1
- package/lib/commands/sort-bed.js +45 -0
- package/lib/commands/upgrade.js +1 -1
- package/oclif.manifest.json +39 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ It is likely preferable in most cases to install the tools globally with
|
|
|
57
57
|
- [`jbrowse make-pif FILE`](#jbrowse-make-pif-file)
|
|
58
58
|
- [`jbrowse remove-track TRACK`](#jbrowse-remove-track-track)
|
|
59
59
|
- [`jbrowse set-default-session`](#jbrowse-set-default-session)
|
|
60
|
+
- [`jbrowse sort-bed FILE`](#jbrowse-sort-bed-file)
|
|
60
61
|
- [`jbrowse sort-gff FILE`](#jbrowse-sort-gff-file)
|
|
61
62
|
- [`jbrowse text-index`](#jbrowse-text-index)
|
|
62
63
|
- [`jbrowse upgrade [LOCALPATH]`](#jbrowse-upgrade-localpath)
|
|
@@ -205,7 +206,7 @@ EXAMPLES
|
|
|
205
206
|
```
|
|
206
207
|
|
|
207
208
|
_See code:
|
|
208
|
-
[src/commands/add-assembly.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
209
|
+
[src/commands/add-assembly.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/add-assembly.ts)_
|
|
209
210
|
|
|
210
211
|
## `jbrowse add-connection CONNECTIONURLORPATH`
|
|
211
212
|
|
|
@@ -256,7 +257,7 @@ EXAMPLES
|
|
|
256
257
|
```
|
|
257
258
|
|
|
258
259
|
_See code:
|
|
259
|
-
[src/commands/add-connection.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
260
|
+
[src/commands/add-connection.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/add-connection.ts)_
|
|
260
261
|
|
|
261
262
|
## `jbrowse add-track TRACK`
|
|
262
263
|
|
|
@@ -337,7 +338,7 @@ EXAMPLES
|
|
|
337
338
|
```
|
|
338
339
|
|
|
339
340
|
_See code:
|
|
340
|
-
[src/commands/add-track.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
341
|
+
[src/commands/add-track.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/add-track.ts)_
|
|
341
342
|
|
|
342
343
|
## `jbrowse add-track-json TRACK`
|
|
343
344
|
|
|
@@ -367,7 +368,7 @@ EXAMPLES
|
|
|
367
368
|
```
|
|
368
369
|
|
|
369
370
|
_See code:
|
|
370
|
-
[src/commands/add-track-json.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
371
|
+
[src/commands/add-track-json.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/add-track-json.ts)_
|
|
371
372
|
|
|
372
373
|
## `jbrowse admin-server`
|
|
373
374
|
|
|
@@ -399,7 +400,7 @@ EXAMPLES
|
|
|
399
400
|
```
|
|
400
401
|
|
|
401
402
|
_See code:
|
|
402
|
-
[src/commands/admin-server.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
403
|
+
[src/commands/admin-server.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/admin-server.ts)_
|
|
403
404
|
|
|
404
405
|
## `jbrowse create LOCALPATH`
|
|
405
406
|
|
|
@@ -456,7 +457,7 @@ EXAMPLES
|
|
|
456
457
|
```
|
|
457
458
|
|
|
458
459
|
_See code:
|
|
459
|
-
[src/commands/create.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
460
|
+
[src/commands/create.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/create.ts)_
|
|
460
461
|
|
|
461
462
|
## `jbrowse help [COMMAND]`
|
|
462
463
|
|
|
@@ -507,7 +508,7 @@ EXAMPLES
|
|
|
507
508
|
```
|
|
508
509
|
|
|
509
510
|
_See code:
|
|
510
|
-
[src/commands/make-pif.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
511
|
+
[src/commands/make-pif.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/make-pif.ts)_
|
|
511
512
|
|
|
512
513
|
## `jbrowse remove-track TRACK`
|
|
513
514
|
|
|
@@ -535,7 +536,7 @@ EXAMPLES
|
|
|
535
536
|
```
|
|
536
537
|
|
|
537
538
|
_See code:
|
|
538
|
-
[src/commands/remove-track.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
539
|
+
[src/commands/remove-track.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/remove-track.ts)_
|
|
539
540
|
|
|
540
541
|
## `jbrowse set-default-session`
|
|
541
542
|
|
|
@@ -577,7 +578,38 @@ EXAMPLES
|
|
|
577
578
|
```
|
|
578
579
|
|
|
579
580
|
_See code:
|
|
580
|
-
[src/commands/set-default-session.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
581
|
+
[src/commands/set-default-session.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/set-default-session.ts)_
|
|
582
|
+
|
|
583
|
+
## `jbrowse sort-bed FILE`
|
|
584
|
+
|
|
585
|
+
Helper utility to sort GFF files for tabix. Moves all lines starting with # to
|
|
586
|
+
the top of the file, and sort by refname and start position using unix utilities
|
|
587
|
+
sort and grep
|
|
588
|
+
|
|
589
|
+
```
|
|
590
|
+
USAGE
|
|
591
|
+
$ jbrowse sort-bed FILE [-h]
|
|
592
|
+
|
|
593
|
+
ARGUMENTS
|
|
594
|
+
FILE GFF file
|
|
595
|
+
|
|
596
|
+
FLAGS
|
|
597
|
+
-h, --help Show CLI help.
|
|
598
|
+
|
|
599
|
+
DESCRIPTION
|
|
600
|
+
Helper utility to sort GFF files for tabix. Moves all lines starting with # to the top of the file, and sort by
|
|
601
|
+
refname and start position using unix utilities sort and grep
|
|
602
|
+
|
|
603
|
+
EXAMPLES
|
|
604
|
+
# sort gff and pipe to bgzip
|
|
605
|
+
|
|
606
|
+
$ jbrowse sort-gff input.gff | bgzip > sorted.gff.gz
|
|
607
|
+
|
|
608
|
+
$ tabix sorted.gff.gz
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
_See code:
|
|
612
|
+
[src/commands/sort-bed.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/sort-bed.ts)_
|
|
581
613
|
|
|
582
614
|
## `jbrowse sort-gff FILE`
|
|
583
615
|
|
|
@@ -608,7 +640,7 @@ EXAMPLES
|
|
|
608
640
|
```
|
|
609
641
|
|
|
610
642
|
_See code:
|
|
611
|
-
[src/commands/sort-gff.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
643
|
+
[src/commands/sort-gff.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/sort-gff.ts)_
|
|
612
644
|
|
|
613
645
|
## `jbrowse text-index`
|
|
614
646
|
|
|
@@ -675,7 +707,7 @@ EXAMPLES
|
|
|
675
707
|
```
|
|
676
708
|
|
|
677
709
|
_See code:
|
|
678
|
-
[src/commands/text-index.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
710
|
+
[src/commands/text-index.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/text-index.ts)_
|
|
679
711
|
|
|
680
712
|
## `jbrowse upgrade [LOCALPATH]`
|
|
681
713
|
|
|
@@ -738,7 +770,7 @@ EXAMPLES
|
|
|
738
770
|
```
|
|
739
771
|
|
|
740
772
|
_See code:
|
|
741
|
-
[src/commands/upgrade.ts](https://github.com/GMOD/jbrowse-components/blob/v2.
|
|
773
|
+
[src/commands/upgrade.ts](https://github.com/GMOD/jbrowse-components/blob/v2.17.0/products/jbrowse-cli/src/commands/upgrade.ts)_
|
|
742
774
|
|
|
743
775
|
<!-- commandsstop -->
|
|
744
776
|
|
package/lib/commands/create.js
CHANGED
|
@@ -88,7 +88,7 @@ Create.flags = {
|
|
|
88
88
|
char: 'f',
|
|
89
89
|
description: 'Overwrites existing JBrowse 2 installation if present in path',
|
|
90
90
|
}),
|
|
91
|
-
// will need to account for
|
|
91
|
+
// will need to account for pagination once there is a lot of releases
|
|
92
92
|
listVersions: core_1.Flags.boolean({
|
|
93
93
|
char: 'l',
|
|
94
94
|
description: 'Lists out all versions of JBrowse 2',
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const command_exists_1 = require("command-exists");
|
|
8
|
+
const child_process_1 = require("child_process");
|
|
9
|
+
const base_1 = __importDefault(require("../base"));
|
|
10
|
+
class SortGff extends base_1.default {
|
|
11
|
+
async run() {
|
|
12
|
+
const { args: { file }, } = await this.parse(SortGff);
|
|
13
|
+
if ((0, command_exists_1.sync)('sh') &&
|
|
14
|
+
(0, command_exists_1.sync)('sort') &&
|
|
15
|
+
(0, command_exists_1.sync)('grep')) {
|
|
16
|
+
// this command comes from the tabix docs http://www.htslib.org/doc/tabix.html
|
|
17
|
+
(0, child_process_1.spawn)('sh', [
|
|
18
|
+
'-c',
|
|
19
|
+
`(grep "^#" "${file}"; grep -v "^#" "${file}" | sort -t"\`printf '\t'\`" -k1,1 -k2,2n)`,
|
|
20
|
+
], {
|
|
21
|
+
env: { ...process.env, LC_ALL: 'C' },
|
|
22
|
+
stdio: 'inherit',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error('Unable to sort, requires unix type environment with sort, grep');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
SortGff.description = 'Helper utility to sort GFF files for tabix. Moves all lines starting with # to the top of the file, and sort by refname and start position using unix utilities sort and grep';
|
|
31
|
+
SortGff.examples = [
|
|
32
|
+
'# sort gff and pipe to bgzip',
|
|
33
|
+
'$ jbrowse sort-gff input.gff | bgzip > sorted.gff.gz',
|
|
34
|
+
'$ tabix sorted.gff.gz',
|
|
35
|
+
];
|
|
36
|
+
SortGff.args = {
|
|
37
|
+
file: core_1.Args.string({
|
|
38
|
+
required: true,
|
|
39
|
+
description: 'GFF file',
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
SortGff.flags = {
|
|
43
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
44
|
+
};
|
|
45
|
+
exports.default = SortGff;
|
package/lib/commands/upgrade.js
CHANGED
|
@@ -83,7 +83,7 @@ Upgrade.args = {
|
|
|
83
83
|
};
|
|
84
84
|
Upgrade.flags = {
|
|
85
85
|
help: core_1.Flags.help({ char: 'h' }),
|
|
86
|
-
// will need to account for
|
|
86
|
+
// will need to account for pagination once there is a lot of releases
|
|
87
87
|
listVersions: core_1.Flags.boolean({
|
|
88
88
|
char: 'l',
|
|
89
89
|
description: 'Lists out all versions of JBrowse 2',
|
package/oclif.manifest.json
CHANGED
|
@@ -859,6 +859,44 @@
|
|
|
859
859
|
"set-default-session.js"
|
|
860
860
|
]
|
|
861
861
|
},
|
|
862
|
+
"sort-bed": {
|
|
863
|
+
"aliases": [],
|
|
864
|
+
"args": {
|
|
865
|
+
"file": {
|
|
866
|
+
"description": "GFF file",
|
|
867
|
+
"name": "file",
|
|
868
|
+
"required": true
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
"description": "Helper utility to sort GFF files for tabix. Moves all lines starting with # to the top of the file, and sort by refname and start position using unix utilities sort and grep",
|
|
872
|
+
"examples": [
|
|
873
|
+
"# sort gff and pipe to bgzip",
|
|
874
|
+
"$ jbrowse sort-gff input.gff | bgzip > sorted.gff.gz",
|
|
875
|
+
"$ tabix sorted.gff.gz"
|
|
876
|
+
],
|
|
877
|
+
"flags": {
|
|
878
|
+
"help": {
|
|
879
|
+
"char": "h",
|
|
880
|
+
"description": "Show CLI help.",
|
|
881
|
+
"name": "help",
|
|
882
|
+
"allowNo": false,
|
|
883
|
+
"type": "boolean"
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
"hasDynamicHelp": false,
|
|
887
|
+
"hiddenAliases": [],
|
|
888
|
+
"id": "sort-bed",
|
|
889
|
+
"pluginAlias": "@jbrowse/cli",
|
|
890
|
+
"pluginName": "@jbrowse/cli",
|
|
891
|
+
"pluginType": "core",
|
|
892
|
+
"strict": true,
|
|
893
|
+
"isESM": false,
|
|
894
|
+
"relativePath": [
|
|
895
|
+
"lib",
|
|
896
|
+
"commands",
|
|
897
|
+
"sort-bed.js"
|
|
898
|
+
]
|
|
899
|
+
},
|
|
862
900
|
"sort-gff": {
|
|
863
901
|
"aliases": [],
|
|
864
902
|
"args": {
|
|
@@ -1127,5 +1165,5 @@
|
|
|
1127
1165
|
]
|
|
1128
1166
|
}
|
|
1129
1167
|
},
|
|
1130
|
-
"version": "2.
|
|
1168
|
+
"version": "2.17.0"
|
|
1131
1169
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "A command line tool for working with JBrowse 2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
|
|
77
77
|
}
|