@jbrowse/img 1.7.10 → 2.0.1
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 +5 -17
- package/dist/index.js +4 -0
- package/dist/index.testmod.js +4 -0
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -29,8 +29,6 @@ guide](DEVELOPER.md) for details
|
|
|
29
29
|
|
|
30
30
|
## Example usages
|
|
31
31
|
|
|
32
|
-
This will show some example usages
|
|
33
|
-
|
|
34
32
|
### Use with local files
|
|
35
33
|
|
|
36
34
|
We can call this script on local files, and it doesn't require a web browser,
|
|
@@ -56,7 +54,7 @@ If `--out` is not specified it writes to out.svg
|
|
|
56
54
|
Supply a file with the png extension to `--out`, uses rsvg-convert so you will
|
|
57
55
|
need to install rsvg-convert to your system e.g. with `sudo apt install librsvg2-bin`
|
|
58
56
|
|
|
59
|
-
```
|
|
57
|
+
```bash
|
|
60
58
|
jb2export --fasta yourfile.fa --bam yourfile.bam --loc chr1:1,000,000-1,001,000 --out file.png
|
|
61
59
|
```
|
|
62
60
|
|
|
@@ -65,7 +63,7 @@ jb2export --fasta yourfile.fa --bam yourfile.bam --loc chr1:1,000,000-1,001,000
|
|
|
65
63
|
Supply a file with the pdf extension to `--out`, uses rsvg-convert so you will
|
|
66
64
|
need to install rsvg-convert to your system e.g. with `sudo apt install librsvg2-bin`
|
|
67
65
|
|
|
68
|
-
```
|
|
66
|
+
```bash
|
|
69
67
|
jb2export --fasta yourfile.fa --bam yourfile.bam --loc chr1:1,000,000-1,001,000 --out file.pdf
|
|
70
68
|
```
|
|
71
69
|
|
|
@@ -76,8 +74,7 @@ This example shows using remote files, e.g. with human hg19 and several tracks
|
|
|
76
74
|
Note the use of --aliases, which smoothes over refname differences e.g. fasta
|
|
77
75
|
contains 1 for chr1, and bigbed contains chr1, gff contains NC_000001.10
|
|
78
76
|
|
|
79
|
-
```
|
|
80
|
-
|
|
77
|
+
```bash
|
|
81
78
|
jb2export --fasta https://jbrowse.org/genomes/hg19/fasta/hg19.fa.gz \
|
|
82
79
|
--aliases https://jbrowse.org/genomes/hg19/hg19_aliases.txt \
|
|
83
80
|
--bigbed https://hgdownload.soe.ucsc.edu/gbdb/hg19/bbi/clinvar/clinvarMain.bb \
|
|
@@ -158,7 +155,7 @@ If you use jbrowse-web, you can select File->Export session which produces a
|
|
|
158
155
|
session.json file, and then use the --session parameter. Make sure to specify
|
|
159
156
|
the assembly also, it currently does not infer the assembly from the session
|
|
160
157
|
|
|
161
|
-
```
|
|
158
|
+
```bash
|
|
162
159
|
jb2export --config data/skbr3/config.json \
|
|
163
160
|
--session session.json \
|
|
164
161
|
--assembly hg19
|
|
@@ -210,7 +207,7 @@ Then you can call it like above
|
|
|
210
207
|
|
|
211
208
|
```bash
|
|
212
209
|
jb2export --config data/volvox/config.json \
|
|
213
|
-
--assembly volvox
|
|
210
|
+
--assembly volvox \
|
|
214
211
|
--configtracks volvox_sv \
|
|
215
212
|
--loc ctgA:1-50,000
|
|
216
213
|
```
|
|
@@ -340,10 +337,6 @@ convert -size 2048x out.svg out.png
|
|
|
340
337
|
|
|
341
338
|
## Troubleshooting
|
|
342
339
|
|
|
343
|
-
### I see the message 'useLayoutEffect does nothing on the server'
|
|
344
|
-
|
|
345
|
-
This is a harmless warning, we are working on fixing it though
|
|
346
|
-
|
|
347
340
|
### I don't get any outputted svg and no message
|
|
348
341
|
|
|
349
342
|
The error reporting from the app is not very good at the moment so often has
|
|
@@ -357,8 +350,3 @@ There are some new features in the latest NPM (2021, v7) related to
|
|
|
357
350
|
peerDependencies that may produce some warnings. It should work even despite
|
|
358
351
|
making warnings, but you can use yarn to install or use legacy peer
|
|
359
352
|
dependencies if you want to avoid install time warningsvg
|
|
360
|
-
|
|
361
|
-
### The program keeps running after saying it completed?
|
|
362
|
-
|
|
363
|
-
We are looking into this still. The file should have been generated though, and
|
|
364
|
-
the program will complete
|
package/dist/index.js
CHANGED
|
@@ -26,11 +26,15 @@ var _nodeFetch = _interopRequireWildcard(require("node-fetch"));
|
|
|
26
26
|
|
|
27
27
|
var _jsdom = require("jsdom");
|
|
28
28
|
|
|
29
|
+
var _canvas = require("canvas");
|
|
30
|
+
|
|
29
31
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
32
|
|
|
31
33
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
34
|
|
|
33
35
|
/* eslint-disable no-console */
|
|
36
|
+
global.nodeImage = _canvas.Image;
|
|
37
|
+
global.nodeCreateCanvas = _canvas.createCanvas;
|
|
34
38
|
var document = new _jsdom.JSDOM("...").window.document;
|
|
35
39
|
global.document = document;
|
|
36
40
|
|
package/dist/index.testmod.js
CHANGED
|
@@ -14,8 +14,12 @@ var _jsdom = require("jsdom");
|
|
|
14
14
|
|
|
15
15
|
require("abortcontroller-polyfill/dist/abortcontroller-polyfill-only");
|
|
16
16
|
|
|
17
|
+
var _canvas = require("canvas");
|
|
18
|
+
|
|
17
19
|
var document = new _jsdom.JSDOM("...").window.document;
|
|
18
20
|
global.document = document;
|
|
21
|
+
global.nodeImage = _canvas.Image;
|
|
22
|
+
global.nodeCreateCanvas = _canvas.createCanvas;
|
|
19
23
|
|
|
20
24
|
function hashCode(str) {
|
|
21
25
|
var hash = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/img",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "JBrowse Team",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,19 +29,20 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.17.9",
|
|
32
|
-
"@jbrowse/plugin-linear-genome-view": "^
|
|
33
|
-
"@jbrowse/react-linear-genome-view": "^
|
|
32
|
+
"@jbrowse/plugin-linear-genome-view": "^2.0.1",
|
|
33
|
+
"@jbrowse/react-linear-genome-view": "^2.0.1",
|
|
34
34
|
"abortcontroller-polyfill": "^1.7.3",
|
|
35
|
+
"canvas": "^2.9.1",
|
|
35
36
|
"jsdom": "^19.0.0",
|
|
36
|
-
"mobx": "^
|
|
37
|
+
"mobx": "^6.6.0",
|
|
37
38
|
"node-fetch": "^2.6.7",
|
|
38
|
-
"react": "^17.0.
|
|
39
|
-
"react-dom": "^17.0.
|
|
39
|
+
"react": "^17.0.0",
|
|
40
|
+
"react-dom": "^17.0.0",
|
|
40
41
|
"tmp": "^0.2.1",
|
|
41
42
|
"yargs": "^17.3.0"
|
|
42
43
|
},
|
|
43
44
|
"publishConfig": {
|
|
44
45
|
"access": "public"
|
|
45
46
|
},
|
|
46
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "ed935bf5612af3818abdc8ef52d100d5d81d33a2"
|
|
47
48
|
}
|