@jbrowse/plugin-hic 3.0.5 → 3.2.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.
|
@@ -15,5 +15,18 @@ const HicAdapter = (0, configuration_1.ConfigurationSchema)('HicAdapter', {
|
|
|
15
15
|
defaultValue: 1,
|
|
16
16
|
description: 'Initial resolution multiplier',
|
|
17
17
|
},
|
|
18
|
-
}, {
|
|
18
|
+
}, {
|
|
19
|
+
explicitlyTyped: true,
|
|
20
|
+
preProcessSnapshot: snap => {
|
|
21
|
+
return snap.uri
|
|
22
|
+
? {
|
|
23
|
+
...snap,
|
|
24
|
+
hicLocation: {
|
|
25
|
+
uri: snap.uri,
|
|
26
|
+
baseUri: snap.baseUri,
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
: snap;
|
|
30
|
+
},
|
|
31
|
+
});
|
|
19
32
|
exports.default = HicAdapter;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.makeImageData = makeImageData;
|
|
7
7
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
8
|
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
9
|
+
const util_1 = require("@jbrowse/core/util");
|
|
9
10
|
const colord_1 = require("@jbrowse/core/util/colord");
|
|
10
11
|
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
11
12
|
const d3_interpolate_1 = require("@mui/x-charts-vendor/d3-interpolate");
|
|
@@ -64,8 +65,7 @@ async function makeImageData(ctx, props) {
|
|
|
64
65
|
ctx.translate(-width, 0);
|
|
65
66
|
}
|
|
66
67
|
ctx.rotate(-Math.PI / 4);
|
|
67
|
-
|
|
68
|
-
for (const { bin1, bin2, counts } of features) {
|
|
68
|
+
(0, util_1.forEachWithStopTokenCheck)(features, stopToken, ({ bin1, bin2, counts }) => {
|
|
69
69
|
ctx.fillStyle = (0, configuration_1.readConfObject)(config, 'color', {
|
|
70
70
|
count: counts,
|
|
71
71
|
maxScore,
|
|
@@ -74,11 +74,7 @@ async function makeImageData(ctx, props) {
|
|
|
74
74
|
useLogScale,
|
|
75
75
|
});
|
|
76
76
|
ctx.fillRect((bin1 - offset) * w, (bin2 - offset) * w, w, w);
|
|
77
|
-
|
|
78
|
-
(0, stopToken_1.checkStopToken)(stopToken);
|
|
79
|
-
start = performance.now();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
77
|
+
});
|
|
82
78
|
ctx.restore();
|
|
83
79
|
}
|
|
84
80
|
return undefined;
|
|
@@ -13,5 +13,18 @@ const HicAdapter = ConfigurationSchema('HicAdapter', {
|
|
|
13
13
|
defaultValue: 1,
|
|
14
14
|
description: 'Initial resolution multiplier',
|
|
15
15
|
},
|
|
16
|
-
}, {
|
|
16
|
+
}, {
|
|
17
|
+
explicitlyTyped: true,
|
|
18
|
+
preProcessSnapshot: snap => {
|
|
19
|
+
return snap.uri
|
|
20
|
+
? {
|
|
21
|
+
...snap,
|
|
22
|
+
hicLocation: {
|
|
23
|
+
uri: snap.uri,
|
|
24
|
+
baseUri: snap.baseUri,
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
: snap;
|
|
28
|
+
},
|
|
29
|
+
});
|
|
17
30
|
export default HicAdapter;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
2
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
3
|
+
import { forEachWithStopTokenCheck } from '@jbrowse/core/util';
|
|
3
4
|
import { colord } from '@jbrowse/core/util/colord';
|
|
4
5
|
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
6
|
import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
|
|
@@ -58,8 +59,7 @@ export async function makeImageData(ctx, props) {
|
|
|
58
59
|
ctx.translate(-width, 0);
|
|
59
60
|
}
|
|
60
61
|
ctx.rotate(-Math.PI / 4);
|
|
61
|
-
|
|
62
|
-
for (const { bin1, bin2, counts } of features) {
|
|
62
|
+
forEachWithStopTokenCheck(features, stopToken, ({ bin1, bin2, counts }) => {
|
|
63
63
|
ctx.fillStyle = readConfObject(config, 'color', {
|
|
64
64
|
count: counts,
|
|
65
65
|
maxScore,
|
|
@@ -68,11 +68,7 @@ export async function makeImageData(ctx, props) {
|
|
|
68
68
|
useLogScale,
|
|
69
69
|
});
|
|
70
70
|
ctx.fillRect((bin1 - offset) * w, (bin2 - offset) * w, w, w);
|
|
71
|
-
|
|
72
|
-
checkStopToken(stopToken);
|
|
73
|
-
start = performance.now();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
71
|
+
});
|
|
76
72
|
ctx.restore();
|
|
77
73
|
}
|
|
78
74
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-hic",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "JBrowse 2 hic adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jbrowse/core": "^3.0
|
|
40
|
-
"@jbrowse/plugin-linear-genome-view": "^3.0
|
|
39
|
+
"@jbrowse/core": "^3.2.0",
|
|
40
|
+
"@jbrowse/plugin-linear-genome-view": "^3.2.0",
|
|
41
41
|
"@mui/material": "^6.0.0",
|
|
42
42
|
"@mui/x-charts-vendor": "^7.12.0",
|
|
43
43
|
"hic-straw": "^2.0.3",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "c750e3f56706a490c19ba75abd807fec5e38aebf"
|
|
59
59
|
}
|