@jbrowse/plugin-linear-comparative-view 2.6.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/LICENSE +201 -0
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +52 -0
- package/dist/LGVSyntenyDisplay/configSchemaF.js +18 -0
- package/dist/LGVSyntenyDisplay/configSchemaF.js.map +1 -0
- package/dist/LGVSyntenyDisplay/index.d.ts +3 -0
- package/dist/LGVSyntenyDisplay/index.js +24 -0
- package/dist/LGVSyntenyDisplay/index.js.map +1 -0
- package/dist/LGVSyntenyDisplay/model.d.ts +380 -0
- package/dist/LGVSyntenyDisplay/model.js +154 -0
- package/dist/LGVSyntenyDisplay/model.js.map +1 -0
- package/dist/LaunchLinearSyntenyView.d.ts +2 -0
- package/dist/LaunchLinearSyntenyView.js +58 -0
- package/dist/LaunchLinearSyntenyView.js.map +1 -0
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +5 -0
- package/dist/LinearComparativeDisplay/configSchemaF.js +18 -0
- package/dist/LinearComparativeDisplay/configSchemaF.js.map +1 -0
- package/dist/LinearComparativeDisplay/index.d.ts +3 -0
- package/dist/LinearComparativeDisplay/index.js +24 -0
- package/dist/LinearComparativeDisplay/index.js.map +1 -0
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +275 -0
- package/dist/LinearComparativeDisplay/stateModelFactory.js +172 -0
- package/dist/LinearComparativeDisplay/stateModelFactory.js.map +1 -0
- package/dist/LinearComparativeView/components/Header.d.ts +7 -0
- package/dist/LinearComparativeView/components/Header.js +89 -0
- package/dist/LinearComparativeView/components/Header.js.map +1 -0
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +8 -0
- package/dist/LinearComparativeView/components/LinearComparativeView.js +99 -0
- package/dist/LinearComparativeView/components/LinearComparativeView.js.map +1 -0
- package/dist/LinearComparativeView/components/Rubberband.d.ts +9 -0
- package/dist/LinearComparativeView/components/Rubberband.js +225 -0
- package/dist/LinearComparativeView/components/Rubberband.js.map +1 -0
- package/dist/LinearComparativeView/index.d.ts +3 -0
- package/dist/LinearComparativeView/index.js +42 -0
- package/dist/LinearComparativeView/index.js.map +1 -0
- package/dist/LinearComparativeView/model.d.ts +326 -0
- package/dist/LinearComparativeView/model.js +346 -0
- package/dist/LinearComparativeView/model.js.map +1 -0
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +7 -0
- package/dist/LinearReadVsRef/LinearReadVsRef.js +284 -0
- package/dist/LinearReadVsRef/LinearReadVsRef.js.map +1 -0
- package/dist/LinearReadVsRef/index.d.ts +2 -0
- package/dist/LinearReadVsRef/index.js +55 -0
- package/dist/LinearReadVsRef/index.js.map +1 -0
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +2 -0
- package/dist/LinearSyntenyDisplay/afterAttach.js +108 -0
- package/dist/LinearSyntenyDisplay/afterAttach.js.map +1 -0
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +6 -0
- package/dist/LinearSyntenyDisplay/components/Component.js +87 -0
- package/dist/LinearSyntenyDisplay/components/Component.js.map +1 -0
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +6 -0
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +160 -0
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js.map +1 -0
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +7 -0
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +83 -0
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js.map +1 -0
- package/dist/LinearSyntenyDisplay/components/util.d.ts +27 -0
- package/dist/LinearSyntenyDisplay/components/util.js +84 -0
- package/dist/LinearSyntenyDisplay/components/util.js.map +1 -0
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +23 -0
- package/dist/LinearSyntenyDisplay/configSchemaF.js +36 -0
- package/dist/LinearSyntenyDisplay/configSchemaF.js.map +1 -0
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +5 -0
- package/dist/LinearSyntenyDisplay/drawSynteny.js +235 -0
- package/dist/LinearSyntenyDisplay/drawSynteny.js.map +1 -0
- package/dist/LinearSyntenyDisplay/index.d.ts +3 -0
- package/dist/LinearSyntenyDisplay/index.js +47 -0
- package/dist/LinearSyntenyDisplay/index.js.map +1 -0
- package/dist/LinearSyntenyDisplay/model.d.ts +333 -0
- package/dist/LinearSyntenyDisplay/model.js +179 -0
- package/dist/LinearSyntenyDisplay/model.js.map +1 -0
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +86 -0
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js.map +1 -0
- package/dist/LinearSyntenyView/components/Icons.d.ts +4 -0
- package/dist/LinearSyntenyView/components/Icons.js +19 -0
- package/dist/LinearSyntenyView/components/Icons.js.map +1 -0
- package/dist/LinearSyntenyView/components/ImportCustomTrack.d.ts +11 -0
- package/dist/LinearSyntenyView/components/ImportCustomTrack.js +180 -0
- package/dist/LinearSyntenyView/components/ImportCustomTrack.js.map +1 -0
- package/dist/LinearSyntenyView/components/ImportForm.d.ts +6 -0
- package/dist/LinearSyntenyView/components/ImportForm.js +127 -0
- package/dist/LinearSyntenyView/components/ImportForm.js.map +1 -0
- package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.d.ts +9 -0
- package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.js +63 -0
- package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.js.map +1 -0
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +7 -0
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +38 -0
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js.map +1 -0
- package/dist/LinearSyntenyView/index.d.ts +3 -0
- package/dist/LinearSyntenyView/index.js +42 -0
- package/dist/LinearSyntenyView/index.js.map +1 -0
- package/dist/LinearSyntenyView/model.d.ts +754 -0
- package/dist/LinearSyntenyView/model.js +170 -0
- package/dist/LinearSyntenyView/model.js.map +1 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +6 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +13 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js.map +1 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +4 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +85 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js.map +1 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +66 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js.map +1 -0
- package/dist/SyntenyFeatureDetail/index.d.ts +3 -0
- package/dist/SyntenyFeatureDetail/index.js +58 -0
- package/dist/SyntenyFeatureDetail/index.js.map +1 -0
- package/dist/SyntenyTrack/configSchema.d.ts +75 -0
- package/dist/SyntenyTrack/configSchema.js +16 -0
- package/dist/SyntenyTrack/configSchema.js.map +1 -0
- package/dist/SyntenyTrack/index.d.ts +3 -0
- package/dist/SyntenyTrack/index.js +19 -0
- package/dist/SyntenyTrack/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/util.d.ts +25 -0
- package/dist/util.js +77 -0
- package/dist/util.js.map +1 -0
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +52 -0
- package/esm/LGVSyntenyDisplay/configSchemaF.js +16 -0
- package/esm/LGVSyntenyDisplay/configSchemaF.js.map +1 -0
- package/esm/LGVSyntenyDisplay/index.d.ts +3 -0
- package/esm/LGVSyntenyDisplay/index.js +19 -0
- package/esm/LGVSyntenyDisplay/index.js.map +1 -0
- package/esm/LGVSyntenyDisplay/model.d.ts +380 -0
- package/esm/LGVSyntenyDisplay/model.js +152 -0
- package/esm/LGVSyntenyDisplay/model.js.map +1 -0
- package/esm/LaunchLinearSyntenyView.d.ts +2 -0
- package/esm/LaunchLinearSyntenyView.js +55 -0
- package/esm/LaunchLinearSyntenyView.js.map +1 -0
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +5 -0
- package/esm/LinearComparativeDisplay/configSchemaF.js +16 -0
- package/esm/LinearComparativeDisplay/configSchemaF.js.map +1 -0
- package/esm/LinearComparativeDisplay/index.d.ts +3 -0
- package/esm/LinearComparativeDisplay/index.js +19 -0
- package/esm/LinearComparativeDisplay/index.js.map +1 -0
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +275 -0
- package/esm/LinearComparativeDisplay/stateModelFactory.js +170 -0
- package/esm/LinearComparativeDisplay/stateModelFactory.js.map +1 -0
- package/esm/LinearComparativeView/components/Header.d.ts +7 -0
- package/esm/LinearComparativeView/components/Header.js +61 -0
- package/esm/LinearComparativeView/components/Header.js.map +1 -0
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +8 -0
- package/esm/LinearComparativeView/components/LinearComparativeView.js +94 -0
- package/esm/LinearComparativeView/components/LinearComparativeView.js.map +1 -0
- package/esm/LinearComparativeView/components/Rubberband.d.ts +9 -0
- package/esm/LinearComparativeView/components/Rubberband.js +200 -0
- package/esm/LinearComparativeView/components/Rubberband.js.map +1 -0
- package/esm/LinearComparativeView/index.d.ts +3 -0
- package/esm/LinearComparativeView/index.js +14 -0
- package/esm/LinearComparativeView/index.js.map +1 -0
- package/esm/LinearComparativeView/model.d.ts +326 -0
- package/esm/LinearComparativeView/model.js +318 -0
- package/esm/LinearComparativeView/model.js.map +1 -0
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +7 -0
- package/esm/LinearReadVsRef/LinearReadVsRef.js +258 -0
- package/esm/LinearReadVsRef/LinearReadVsRef.js.map +1 -0
- package/esm/LinearReadVsRef/index.d.ts +2 -0
- package/esm/LinearReadVsRef/index.js +49 -0
- package/esm/LinearReadVsRef/index.js.map +1 -0
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +2 -0
- package/esm/LinearSyntenyDisplay/afterAttach.js +104 -0
- package/esm/LinearSyntenyDisplay/afterAttach.js.map +1 -0
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +6 -0
- package/esm/LinearSyntenyDisplay/components/Component.js +59 -0
- package/esm/LinearSyntenyDisplay/components/Component.js.map +1 -0
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +6 -0
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +132 -0
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js.map +1 -0
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +7 -0
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +58 -0
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js.map +1 -0
- package/esm/LinearSyntenyDisplay/components/util.d.ts +27 -0
- package/esm/LinearSyntenyDisplay/components/util.js +77 -0
- package/esm/LinearSyntenyDisplay/components/util.js.map +1 -0
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +23 -0
- package/esm/LinearSyntenyDisplay/configSchemaF.js +31 -0
- package/esm/LinearSyntenyDisplay/configSchemaF.js.map +1 -0
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +5 -0
- package/esm/LinearSyntenyDisplay/drawSynteny.js +229 -0
- package/esm/LinearSyntenyDisplay/drawSynteny.js.map +1 -0
- package/esm/LinearSyntenyDisplay/index.d.ts +3 -0
- package/esm/LinearSyntenyDisplay/index.js +19 -0
- package/esm/LinearSyntenyDisplay/index.js.map +1 -0
- package/esm/LinearSyntenyDisplay/model.d.ts +333 -0
- package/esm/LinearSyntenyDisplay/model.js +151 -0
- package/esm/LinearSyntenyDisplay/model.js.map +1 -0
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +60 -0
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js.map +1 -0
- package/esm/LinearSyntenyView/components/Icons.d.ts +4 -0
- package/esm/LinearSyntenyView/components/Icons.js +11 -0
- package/esm/LinearSyntenyView/components/Icons.js.map +1 -0
- package/esm/LinearSyntenyView/components/ImportCustomTrack.d.ts +11 -0
- package/esm/LinearSyntenyView/components/ImportCustomTrack.js +152 -0
- package/esm/LinearSyntenyView/components/ImportCustomTrack.js.map +1 -0
- package/esm/LinearSyntenyView/components/ImportForm.d.ts +6 -0
- package/esm/LinearSyntenyView/components/ImportForm.js +99 -0
- package/esm/LinearSyntenyView/components/ImportForm.js.map +1 -0
- package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.d.ts +9 -0
- package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.js +38 -0
- package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.js.map +1 -0
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +7 -0
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +10 -0
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js.map +1 -0
- package/esm/LinearSyntenyView/index.d.ts +3 -0
- package/esm/LinearSyntenyView/index.js +14 -0
- package/esm/LinearSyntenyView/index.js.map +1 -0
- package/esm/LinearSyntenyView/model.d.ts +754 -0
- package/esm/LinearSyntenyView/model.js +141 -0
- package/esm/LinearSyntenyView/model.js.map +1 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +6 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +7 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js.map +1 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +4 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +78 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js.map +1 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +38 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js.map +1 -0
- package/esm/SyntenyFeatureDetail/index.d.ts +3 -0
- package/esm/SyntenyFeatureDetail/index.js +30 -0
- package/esm/SyntenyFeatureDetail/index.js.map +1 -0
- package/esm/SyntenyTrack/configSchema.d.ts +75 -0
- package/esm/SyntenyTrack/configSchema.js +14 -0
- package/esm/SyntenyTrack/configSchema.js.map +1 -0
- package/esm/SyntenyTrack/index.d.ts +3 -0
- package/esm/SyntenyTrack/index.js +14 -0
- package/esm/SyntenyTrack/index.js.map +1 -0
- package/esm/index.d.ts +7 -0
- package/esm/index.js +41 -0
- package/esm/index.js.map +1 -0
- package/esm/util.d.ts +25 -0
- package/esm/util.js +69 -0
- package/esm/util.js.map +1 -0
- package/package.json +67 -0
- package/src/LGVSyntenyDisplay/configSchemaF.ts +22 -0
- package/src/LGVSyntenyDisplay/index.ts +20 -0
- package/src/LGVSyntenyDisplay/model.ts +177 -0
- package/src/LaunchLinearSyntenyView.ts +86 -0
- package/src/LinearComparativeDisplay/configSchemaF.ts +22 -0
- package/src/LinearComparativeDisplay/index.ts +21 -0
- package/src/LinearComparativeDisplay/stateModelFactory.ts +212 -0
- package/src/LinearComparativeView/components/Header.tsx +103 -0
- package/src/LinearComparativeView/components/LinearComparativeView.tsx +152 -0
- package/src/LinearComparativeView/components/Rubberband.tsx +329 -0
- package/src/LinearComparativeView/index.ts +15 -0
- package/src/LinearComparativeView/model.ts +395 -0
- package/src/LinearReadVsRef/LinearReadVsRef.tsx +360 -0
- package/src/LinearReadVsRef/index.ts +58 -0
- package/src/LinearSyntenyDisplay/afterAttach.ts +149 -0
- package/src/LinearSyntenyDisplay/components/Component.tsx +75 -0
- package/src/LinearSyntenyDisplay/components/LinearSyntenyRendering.tsx +200 -0
- package/src/LinearSyntenyDisplay/components/SyntenyTooltip.tsx +82 -0
- package/src/LinearSyntenyDisplay/components/util.ts +142 -0
- package/src/LinearSyntenyDisplay/configSchemaF.ts +38 -0
- package/src/LinearSyntenyDisplay/drawSynteny.ts +266 -0
- package/src/LinearSyntenyDisplay/index.ts +21 -0
- package/src/LinearSyntenyDisplay/model.ts +187 -0
- package/src/LinearSyntenyView/components/ExportSvgDialog.tsx +148 -0
- package/src/LinearSyntenyView/components/Icons.tsx +24 -0
- package/src/LinearSyntenyView/components/ImportCustomTrack.tsx +262 -0
- package/src/LinearSyntenyView/components/ImportForm.tsx +221 -0
- package/src/LinearSyntenyView/components/ImportSyntenyTrackSelector.tsx +82 -0
- package/src/LinearSyntenyView/components/LinearSyntenyView.tsx +20 -0
- package/src/LinearSyntenyView/index.ts +15 -0
- package/src/LinearSyntenyView/model.test.ts +1605 -0
- package/src/LinearSyntenyView/model.ts +169 -0
- package/src/LinearSyntenyView/svgcomponents/SVGBackground.tsx +21 -0
- package/src/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.tsx +176 -0
- package/src/SyntenyFeatureDetail/SyntenyFeatureDetail.tsx +64 -0
- package/src/SyntenyFeatureDetail/index.ts +36 -0
- package/src/SyntenyTrack/configSchema.ts +23 -0
- package/src/SyntenyTrack/index.tsx +15 -0
- package/src/index.tsx +42 -0
- package/src/util.ts +124 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.drawMouseoverSynteny = exports.drawRef = exports.getId = exports.MAX_COLOR_RANGE = void 0;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const util_2 = require("./components/util");
|
|
6
|
+
exports.MAX_COLOR_RANGE = 255 * 255 * 255; // max color range
|
|
7
|
+
function makeColor(idx) {
|
|
8
|
+
const r = Math.floor(idx / (255 * 255)) % 255;
|
|
9
|
+
const g = Math.floor(idx / 255) % 255;
|
|
10
|
+
const b = idx % 255;
|
|
11
|
+
return `rgb(${r},${g},${b})`;
|
|
12
|
+
}
|
|
13
|
+
const colorMap = {
|
|
14
|
+
I: '#ff03',
|
|
15
|
+
N: '#0a03',
|
|
16
|
+
D: '#00f3',
|
|
17
|
+
X: 'brown',
|
|
18
|
+
M: '#f003',
|
|
19
|
+
'=': '#f003',
|
|
20
|
+
};
|
|
21
|
+
const lineLimit = 3;
|
|
22
|
+
const oobLimit = 1600;
|
|
23
|
+
function getId(r, g, b, unitMultiplier) {
|
|
24
|
+
return Math.floor((r * 255 * 255 + g * 255 + b - 1) / unitMultiplier);
|
|
25
|
+
}
|
|
26
|
+
exports.getId = getId;
|
|
27
|
+
function drawRef(model, ctx1, ctx3) {
|
|
28
|
+
var _a;
|
|
29
|
+
const view = (0, util_1.getContainingView)(model);
|
|
30
|
+
const drawCurves = view.drawCurves;
|
|
31
|
+
const drawCIGAR = view.drawCIGAR;
|
|
32
|
+
const height = view.middleComparativeHeight;
|
|
33
|
+
const width = view.width;
|
|
34
|
+
const bpPerPxs = view.views.map(v => v.bpPerPx);
|
|
35
|
+
if (ctx3) {
|
|
36
|
+
ctx3.imageSmoothingEnabled = false;
|
|
37
|
+
}
|
|
38
|
+
ctx1.beginPath();
|
|
39
|
+
const featPos = model.featPositions;
|
|
40
|
+
const offsets = view.views.map(v => v.offsetPx);
|
|
41
|
+
const unitMultiplier = Math.floor(exports.MAX_COLOR_RANGE / featPos.length);
|
|
42
|
+
// this loop is optimized to draw many thin lines with a single ctx.stroke
|
|
43
|
+
// call, a separate loop below draws larger boxes
|
|
44
|
+
ctx1.fillStyle = colorMap.M;
|
|
45
|
+
ctx1.strokeStyle = colorMap.M;
|
|
46
|
+
for (let i = 0; i < featPos.length; i++) {
|
|
47
|
+
const { p11, p12, p21, p22 } = featPos[i];
|
|
48
|
+
const x11 = p11.offsetPx - offsets[0];
|
|
49
|
+
const x12 = p12.offsetPx - offsets[0];
|
|
50
|
+
const x21 = p21.offsetPx - offsets[1];
|
|
51
|
+
const x22 = p22.offsetPx - offsets[1];
|
|
52
|
+
const l1 = Math.abs(x12 - x11);
|
|
53
|
+
const l2 = Math.abs(x22 - x21);
|
|
54
|
+
const y1 = 0;
|
|
55
|
+
const y2 = height;
|
|
56
|
+
const mid = (y2 - y1) / 2;
|
|
57
|
+
// drawing a line if the results are thin results in much less pixellation
|
|
58
|
+
// than filling in a thin polygon
|
|
59
|
+
if (l1 <= lineLimit &&
|
|
60
|
+
l2 <= lineLimit &&
|
|
61
|
+
x21 < width + oobLimit &&
|
|
62
|
+
x21 > -oobLimit) {
|
|
63
|
+
ctx1.moveTo(x11, y1);
|
|
64
|
+
if (drawCurves) {
|
|
65
|
+
ctx1.bezierCurveTo(x11, mid, x21, mid, x21, y2);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
ctx1.lineTo(x21, y2);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
ctx1.stroke();
|
|
73
|
+
// this loop only draws small lines as a polyline, the polyline calls
|
|
74
|
+
// ctx.stroke once is much more efficient than calling stroke() many times
|
|
75
|
+
ctx1.fillStyle = colorMap.M;
|
|
76
|
+
ctx1.strokeStyle = colorMap.M;
|
|
77
|
+
for (let i = 0; i < featPos.length; i++) {
|
|
78
|
+
const { p11, p12, p21, p22, f, cigar } = featPos[i];
|
|
79
|
+
const x11 = p11.offsetPx - offsets[0];
|
|
80
|
+
const x12 = p12.offsetPx - offsets[0];
|
|
81
|
+
const x21 = p21.offsetPx - offsets[1];
|
|
82
|
+
const x22 = p22.offsetPx - offsets[1];
|
|
83
|
+
const l1 = Math.abs(x12 - x11);
|
|
84
|
+
const l2 = Math.abs(x22 - x21);
|
|
85
|
+
const minX = Math.min(x21, x22);
|
|
86
|
+
const maxX = Math.max(x21, x22);
|
|
87
|
+
const y1 = 0;
|
|
88
|
+
const y2 = height;
|
|
89
|
+
const mid = (y2 - y1) / 2;
|
|
90
|
+
if (!(l1 <= lineLimit && l2 <= lineLimit) &&
|
|
91
|
+
(0, util_1.doesIntersect2)(minX, maxX, -oobLimit, view.width + oobLimit)) {
|
|
92
|
+
const s1 = f.get('strand');
|
|
93
|
+
const k1 = s1 === -1 ? x12 : x11;
|
|
94
|
+
const k2 = s1 === -1 ? x11 : x12;
|
|
95
|
+
// rev1/rev2 flip the direction of the CIGAR drawing in horizontally flipped
|
|
96
|
+
// modes. somewhat heuristically determined, but tested for
|
|
97
|
+
const rev1 = k1 < k2 ? 1 : -1;
|
|
98
|
+
const rev2 = (x21 < x22 ? 1 : -1) * s1;
|
|
99
|
+
// cx1/cx2 are the current x positions on top and bottom rows
|
|
100
|
+
let cx1 = k1;
|
|
101
|
+
let cx2 = s1 === -1 ? x22 : x21;
|
|
102
|
+
if ((cigar === null || cigar === void 0 ? void 0 : cigar.length) && drawCIGAR) {
|
|
103
|
+
// continuingFlag skips drawing commands on very small CIGAR features
|
|
104
|
+
let continuingFlag = false;
|
|
105
|
+
// px1/px2 are the previous x positions on the top and bottom rows
|
|
106
|
+
let px1 = 0;
|
|
107
|
+
let px2 = 0;
|
|
108
|
+
const unitMultiplier2 = Math.floor(exports.MAX_COLOR_RANGE / cigar.length);
|
|
109
|
+
for (let j = 0; j < cigar.length; j += 2) {
|
|
110
|
+
const idx = j * unitMultiplier2 + 1;
|
|
111
|
+
const len = +cigar[j];
|
|
112
|
+
const op = cigar[j + 1];
|
|
113
|
+
if (!continuingFlag) {
|
|
114
|
+
px1 = cx1;
|
|
115
|
+
px2 = cx2;
|
|
116
|
+
}
|
|
117
|
+
const d1 = len / bpPerPxs[0];
|
|
118
|
+
const d2 = len / bpPerPxs[1];
|
|
119
|
+
if (op === 'M' || op === '=' || op === 'X') {
|
|
120
|
+
cx1 += d1 * rev1;
|
|
121
|
+
cx2 += d2 * rev2;
|
|
122
|
+
}
|
|
123
|
+
else if (op === 'D' || op === 'N') {
|
|
124
|
+
cx1 += d1 * rev1;
|
|
125
|
+
}
|
|
126
|
+
else if (op === 'I') {
|
|
127
|
+
cx2 += d2 * rev2;
|
|
128
|
+
}
|
|
129
|
+
// check that we are even drawing in view here, e.g. that all
|
|
130
|
+
// points are not all less than 0 or greater than width
|
|
131
|
+
if (!(Math.max(px1, px2, cx1, cx2) < 0 ||
|
|
132
|
+
Math.min(px1, px2, cx1, cx2) > width)) {
|
|
133
|
+
// if it is a small feature and not the last element of the
|
|
134
|
+
// CIGAR (which could skip rendering it entire if we did turn
|
|
135
|
+
// it on), then turn on continuing flag
|
|
136
|
+
const isNotLast = j < cigar.length - 2;
|
|
137
|
+
if (Math.abs(cx1 - px1) <= 1 &&
|
|
138
|
+
Math.abs(cx2 - px2) <= 1 &&
|
|
139
|
+
isNotLast) {
|
|
140
|
+
continuingFlag = true;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
continuingFlag = false;
|
|
144
|
+
// allow rendering the dominant color when using continuing
|
|
145
|
+
// flag if the last element of continuing was a large
|
|
146
|
+
// feature, else just use match
|
|
147
|
+
ctx1.fillStyle =
|
|
148
|
+
colorMap[(continuingFlag && d1 > 1) || d2 > 1 ? op : 'M'];
|
|
149
|
+
(0, util_2.draw)(ctx1, px1, cx1, y1, cx2, px2, y2, mid, drawCurves);
|
|
150
|
+
if (ctx3) {
|
|
151
|
+
ctx3.fillStyle = makeColor(idx);
|
|
152
|
+
(0, util_2.draw)(ctx3, px1, cx1, y1, cx2, px2, y2, mid, drawCurves);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
(0, util_2.draw)(ctx1, x11, x12, y1, x22, x21, y2, mid, drawCurves);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// draw click map
|
|
164
|
+
const ctx2 = (_a = model.clickMapCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
165
|
+
if (!ctx2) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
ctx2.imageSmoothingEnabled = false;
|
|
169
|
+
ctx2.clearRect(0, 0, width, height);
|
|
170
|
+
for (let i = 0; i < featPos.length; i++) {
|
|
171
|
+
const feature = featPos[i];
|
|
172
|
+
const idx = i * unitMultiplier + 1;
|
|
173
|
+
ctx2.fillStyle = makeColor(idx);
|
|
174
|
+
// too many click map false positives with colored stroked lines
|
|
175
|
+
(0, util_2.drawMatchSimple)({
|
|
176
|
+
cb: ctx => ctx.fill(),
|
|
177
|
+
feature,
|
|
178
|
+
ctx: ctx2,
|
|
179
|
+
drawCurves,
|
|
180
|
+
offsets,
|
|
181
|
+
oobLimit,
|
|
182
|
+
viewWidth: view.width,
|
|
183
|
+
hideTiny: true,
|
|
184
|
+
height,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.drawRef = drawRef;
|
|
189
|
+
function drawMouseoverSynteny(model) {
|
|
190
|
+
var _a;
|
|
191
|
+
const { clickId, mouseoverId } = model;
|
|
192
|
+
const highResolutionScaling = 1;
|
|
193
|
+
const view = (0, util_1.getContainingView)(model);
|
|
194
|
+
const drawCurves = view.drawCurves;
|
|
195
|
+
const height = view.middleComparativeHeight;
|
|
196
|
+
const width = view.width;
|
|
197
|
+
const ctx = (_a = model.mouseoverCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
198
|
+
const offsets = view.views.map(v => v.offsetPx);
|
|
199
|
+
if (!ctx) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
ctx.resetTransform();
|
|
203
|
+
ctx.scale(highResolutionScaling, highResolutionScaling);
|
|
204
|
+
ctx.clearRect(0, 0, width, height);
|
|
205
|
+
const feature1 = model.featMap[mouseoverId || ''];
|
|
206
|
+
if (feature1) {
|
|
207
|
+
ctx.fillStyle = 'rgb(0,0,0,0.1)';
|
|
208
|
+
(0, util_2.drawMatchSimple)({
|
|
209
|
+
cb: ctx => ctx.fill(),
|
|
210
|
+
feature: feature1,
|
|
211
|
+
ctx,
|
|
212
|
+
oobLimit,
|
|
213
|
+
viewWidth: view.width,
|
|
214
|
+
drawCurves,
|
|
215
|
+
offsets,
|
|
216
|
+
height,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
const feature2 = model.featMap[clickId || ''];
|
|
220
|
+
if (feature2) {
|
|
221
|
+
ctx.strokeStyle = 'rgb(0, 0, 0, 0.9)';
|
|
222
|
+
(0, util_2.drawMatchSimple)({
|
|
223
|
+
cb: ctx => ctx.stroke(),
|
|
224
|
+
feature: feature2,
|
|
225
|
+
ctx,
|
|
226
|
+
oobLimit,
|
|
227
|
+
viewWidth: view.width,
|
|
228
|
+
drawCurves,
|
|
229
|
+
offsets,
|
|
230
|
+
height,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
exports.drawMouseoverSynteny = drawMouseoverSynteny;
|
|
235
|
+
//# sourceMappingURL=drawSynteny.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawSynteny.js","sourceRoot":"","sources":["../../src/LinearSyntenyDisplay/drawSynteny.ts"],"names":[],"mappings":";;;AAAA,6CAAsE;AAGtE,4CAAyD;AAE5C,QAAA,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA,CAAC,kBAAkB;AAEjE,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAA;IAC7C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;IACrC,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAA;IACnB,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAA;AAC9B,CAAC;AAED,MAAM,QAAQ,GAAG;IACf,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,GAAG,EAAE,OAAO;C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;IACD,GAAG,CAAC,cAAc,EAAE,CAAA;IACpB,GAAG,CAAC,KAAK,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAA;IACvD,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAClC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC,CAAA;IACjD,IAAI,QAAQ,EAAE;QACZ,GAAG,CAAC,SAAS,GAAG,gBAAgB,CAAA;QAChC,IAAA,sBAAe,EAAC;YACd,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE;YACrB,OAAO,EAAE,QAAQ;YACjB,GAAG;YACH,QAAQ;YACR,SAAS,EAAE,IAAI,CAAC,KAAK;YACrB,UAAU;YACV,OAAO;YACP,MAAM;SACP,CAAC,CAAA;KACH;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;IAC7C,IAAI,QAAQ,EAAE;QACZ,GAAG,CAAC,WAAW,GAAG,mBAAmB,CAAA;QAErC,IAAA,sBAAe,EAAC;YACd,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE;YACvB,OAAO,EAAE,QAAQ;YACjB,GAAG;YACH,QAAQ;YACR,SAAS,EAAE,IAAI,CAAC,KAAK;YACrB,UAAU;YACV,OAAO;YACP,MAAM;SACP,CAAC,CAAA;KACH;AACH,CAAC;AA7CD,oDA6CC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
30
|
+
// locals
|
|
31
|
+
const configSchemaF_1 = __importDefault(require("./configSchemaF"));
|
|
32
|
+
const model_1 = __importDefault(require("./model"));
|
|
33
|
+
const react_1 = require("react");
|
|
34
|
+
exports.default = (pluginManager) => {
|
|
35
|
+
pluginManager.addDisplayType(() => {
|
|
36
|
+
const configSchema = (0, configSchemaF_1.default)(pluginManager);
|
|
37
|
+
return new DisplayType_1.default({
|
|
38
|
+
name: 'LinearSyntenyDisplay',
|
|
39
|
+
configSchema,
|
|
40
|
+
stateModel: (0, model_1.default)(configSchema),
|
|
41
|
+
trackType: 'SyntenyTrack',
|
|
42
|
+
viewType: 'LinearSyntenyView',
|
|
43
|
+
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/Component')))),
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/LinearSyntenyDisplay/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kGAAyE;AAGzE,SAAS;AACT,oEAA2C;AAC3C,oDAAuC;AACvC,iCAA4B;AAE5B,kBAAe,CAAC,aAA4B,EAAE,EAAE;IAC9C,aAAa,CAAC,cAAc,CAAC,GAAG,EAAE;QAChC,MAAM,YAAY,GAAG,IAAA,uBAAa,EAAC,aAAa,CAAC,CAAA;QACjD,OAAO,IAAI,qBAAW,CAAC;YACrB,IAAI,EAAE,sBAAsB;YAC5B,YAAY;YACZ,UAAU,EAAE,IAAA,eAAiB,EAAC,YAAY,CAAC;YAC3C,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,mBAAmB;YAC7B,cAAc,EAAE,IAAA,YAAI,EAAC,GAAG,EAAE,mDAAQ,wBAAwB,GAAC,CAAC;SAC7D,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Instance } from 'mobx-state-tree';
|
|
3
|
+
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
4
|
+
import { Feature } from '@jbrowse/core/util';
|
|
5
|
+
interface Pos {
|
|
6
|
+
offsetPx: number;
|
|
7
|
+
}
|
|
8
|
+
interface FeatPos {
|
|
9
|
+
p11: Pos;
|
|
10
|
+
p12: Pos;
|
|
11
|
+
p21: Pos;
|
|
12
|
+
p22: Pos;
|
|
13
|
+
f: Feature;
|
|
14
|
+
cigar: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* #stateModel LinearSyntenyDisplay
|
|
18
|
+
* extends `LinearComparativeDisplay` model
|
|
19
|
+
*/
|
|
20
|
+
declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
21
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
22
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
23
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
24
|
+
} & {
|
|
25
|
+
type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
|
|
26
|
+
configuration: AnyConfigurationSchemaType;
|
|
27
|
+
height: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
28
|
+
} & {
|
|
29
|
+
/**
|
|
30
|
+
* #property
|
|
31
|
+
*/
|
|
32
|
+
type: import("mobx-state-tree").ISimpleType<"LinearSyntenyDisplay">;
|
|
33
|
+
/**
|
|
34
|
+
* #property
|
|
35
|
+
*/
|
|
36
|
+
configuration: AnyConfigurationSchemaType;
|
|
37
|
+
}, {
|
|
38
|
+
rendererTypeName: string;
|
|
39
|
+
error: unknown;
|
|
40
|
+
message: string | undefined;
|
|
41
|
+
} & {
|
|
42
|
+
readonly RenderingComponent: import("react").FC<{
|
|
43
|
+
model: {
|
|
44
|
+
id: string;
|
|
45
|
+
type: string;
|
|
46
|
+
rpcDriverName: string | undefined;
|
|
47
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
48
|
+
rendererTypeName: string;
|
|
49
|
+
error: unknown;
|
|
50
|
+
message: string | undefined;
|
|
51
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
52
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
53
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
54
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
55
|
+
}, {
|
|
56
|
+
rendererTypeName: string;
|
|
57
|
+
error: unknown;
|
|
58
|
+
message: string | undefined;
|
|
59
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
60
|
+
onHorizontalScroll?: Function | undefined;
|
|
61
|
+
blockState?: Record<string, any> | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
readonly DisplayBlurb: import("react").FC<{
|
|
64
|
+
model: {
|
|
65
|
+
id: string;
|
|
66
|
+
type: string;
|
|
67
|
+
rpcDriverName: string | undefined;
|
|
68
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
69
|
+
rendererTypeName: string;
|
|
70
|
+
error: unknown;
|
|
71
|
+
message: string | undefined;
|
|
72
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
73
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
74
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
75
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
76
|
+
}, {
|
|
77
|
+
rendererTypeName: string;
|
|
78
|
+
error: unknown;
|
|
79
|
+
message: string | undefined;
|
|
80
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
81
|
+
* #action
|
|
82
|
+
*/
|
|
83
|
+
}> | null;
|
|
84
|
+
readonly adapterConfig: any;
|
|
85
|
+
readonly parentTrack: any;
|
|
86
|
+
renderProps(): any;
|
|
87
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
88
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
89
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
90
|
+
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
91
|
+
regionCannotBeRendered(): null;
|
|
92
|
+
} & {
|
|
93
|
+
setMessage(arg?: string | undefined): void;
|
|
94
|
+
setError(error?: unknown): void;
|
|
95
|
+
setRpcDriverName(rpcDriverName: string): void;
|
|
96
|
+
reload(): void;
|
|
97
|
+
} & {
|
|
98
|
+
renderInProgress: AbortController | undefined;
|
|
99
|
+
features: Feature[] | undefined;
|
|
100
|
+
message: string | undefined;
|
|
101
|
+
} & {
|
|
102
|
+
renderProps(): {
|
|
103
|
+
rpcDriverName: string | undefined;
|
|
104
|
+
displayModel: {
|
|
105
|
+
id: string;
|
|
106
|
+
type: "LinearComparativeDisplay";
|
|
107
|
+
rpcDriverName: string | undefined;
|
|
108
|
+
configuration: {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
111
|
+
setSubschema(slotName: string, data: unknown): any;
|
|
112
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
113
|
+
height: number;
|
|
114
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
115
|
+
rendererTypeName: string;
|
|
116
|
+
error: unknown;
|
|
117
|
+
message: string | undefined;
|
|
118
|
+
} & {
|
|
119
|
+
readonly RenderingComponent: import("react").FC<{
|
|
120
|
+
model: {
|
|
121
|
+
id: string;
|
|
122
|
+
type: string;
|
|
123
|
+
rpcDriverName: string | undefined;
|
|
124
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
125
|
+
rendererTypeName: string;
|
|
126
|
+
error: unknown;
|
|
127
|
+
message: string | undefined;
|
|
128
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
129
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
130
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
131
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
132
|
+
}, {
|
|
133
|
+
rendererTypeName: string;
|
|
134
|
+
error: unknown;
|
|
135
|
+
message: string | undefined;
|
|
136
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
137
|
+
onHorizontalScroll?: Function | undefined;
|
|
138
|
+
blockState?: Record<string, any> | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
readonly DisplayBlurb: import("react").FC<{
|
|
141
|
+
model: {
|
|
142
|
+
id: string;
|
|
143
|
+
type: string;
|
|
144
|
+
rpcDriverName: string | undefined;
|
|
145
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
146
|
+
rendererTypeName: string;
|
|
147
|
+
error: unknown;
|
|
148
|
+
message: string | undefined;
|
|
149
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
150
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
151
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
152
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
153
|
+
}, {
|
|
154
|
+
rendererTypeName: string;
|
|
155
|
+
error: unknown;
|
|
156
|
+
message: string | undefined;
|
|
157
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
158
|
+
* #action
|
|
159
|
+
*/
|
|
160
|
+
}> | null;
|
|
161
|
+
readonly adapterConfig: any;
|
|
162
|
+
readonly parentTrack: any;
|
|
163
|
+
renderProps(): any;
|
|
164
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
165
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
166
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
167
|
+
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
168
|
+
regionCannotBeRendered(): null;
|
|
169
|
+
} & {
|
|
170
|
+
setMessage(arg?: string | undefined): void;
|
|
171
|
+
setError(error?: unknown): void;
|
|
172
|
+
setRpcDriverName(rpcDriverName: string): void;
|
|
173
|
+
reload(): void;
|
|
174
|
+
} & {
|
|
175
|
+
renderInProgress: AbortController | undefined;
|
|
176
|
+
features: Feature[] | undefined;
|
|
177
|
+
message: string | undefined;
|
|
178
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
179
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
180
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
181
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
182
|
+
} & {
|
|
183
|
+
type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
|
|
184
|
+
configuration: AnyConfigurationSchemaType;
|
|
185
|
+
height: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
186
|
+
}, {
|
|
187
|
+
rendererTypeName: string;
|
|
188
|
+
error: unknown;
|
|
189
|
+
message: string | undefined;
|
|
190
|
+
} & {
|
|
191
|
+
readonly RenderingComponent: import("react").FC<{
|
|
192
|
+
model: {
|
|
193
|
+
id: string;
|
|
194
|
+
type: string;
|
|
195
|
+
rpcDriverName: string | undefined;
|
|
196
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
197
|
+
rendererTypeName: string;
|
|
198
|
+
error: unknown;
|
|
199
|
+
message: string | undefined;
|
|
200
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
201
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
202
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
203
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
204
|
+
}, {
|
|
205
|
+
rendererTypeName: string;
|
|
206
|
+
error: unknown;
|
|
207
|
+
message: string | undefined;
|
|
208
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
209
|
+
onHorizontalScroll?: Function | undefined;
|
|
210
|
+
blockState?: Record<string, any> | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
readonly DisplayBlurb: import("react").FC<{
|
|
213
|
+
model: {
|
|
214
|
+
id: string;
|
|
215
|
+
type: string;
|
|
216
|
+
rpcDriverName: string | undefined;
|
|
217
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
218
|
+
rendererTypeName: string;
|
|
219
|
+
error: unknown;
|
|
220
|
+
message: string | undefined;
|
|
221
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
222
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
223
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
224
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
225
|
+
}, {
|
|
226
|
+
rendererTypeName: string;
|
|
227
|
+
error: unknown;
|
|
228
|
+
message: string | undefined;
|
|
229
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
|
|
230
|
+
* #action
|
|
231
|
+
*/
|
|
232
|
+
}> | null;
|
|
233
|
+
readonly adapterConfig: any;
|
|
234
|
+
readonly parentTrack: any;
|
|
235
|
+
renderProps(): any;
|
|
236
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
237
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
238
|
+
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
239
|
+
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
240
|
+
regionCannotBeRendered(): null;
|
|
241
|
+
} & {
|
|
242
|
+
setMessage(arg?: string | undefined): void;
|
|
243
|
+
setError(error?: unknown): void;
|
|
244
|
+
setRpcDriverName(rpcDriverName: string): void;
|
|
245
|
+
reload(): void;
|
|
246
|
+
} & {
|
|
247
|
+
renderInProgress: AbortController | undefined;
|
|
248
|
+
features: Feature[] | undefined;
|
|
249
|
+
message: string | undefined;
|
|
250
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
251
|
+
highResolutionScaling: number;
|
|
252
|
+
};
|
|
253
|
+
} & {
|
|
254
|
+
setLoading(abortController: AbortController): void;
|
|
255
|
+
setMessage(messageText: string): void;
|
|
256
|
+
setRendered(args?: {
|
|
257
|
+
features: Feature[];
|
|
258
|
+
} | undefined): void;
|
|
259
|
+
setError(error: unknown): void;
|
|
260
|
+
} & {
|
|
261
|
+
afterAttach(): void;
|
|
262
|
+
} & {
|
|
263
|
+
mainCanvas: HTMLCanvasElement | null;
|
|
264
|
+
clickMapCanvas: HTMLCanvasElement | null;
|
|
265
|
+
cigarClickMapCanvas: HTMLCanvasElement | null;
|
|
266
|
+
mouseoverCanvas: HTMLCanvasElement | null;
|
|
267
|
+
featPositions: FeatPos[];
|
|
268
|
+
mouseoverId: string | undefined;
|
|
269
|
+
clickId: string | undefined;
|
|
270
|
+
cigarMouseoverId: number;
|
|
271
|
+
} & {
|
|
272
|
+
/**
|
|
273
|
+
* #action
|
|
274
|
+
*/
|
|
275
|
+
setFeatPositions(arg: FeatPos[]): void;
|
|
276
|
+
/**
|
|
277
|
+
* #action
|
|
278
|
+
*/
|
|
279
|
+
setMainCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
280
|
+
/**
|
|
281
|
+
* #action
|
|
282
|
+
*/
|
|
283
|
+
setClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
284
|
+
/**
|
|
285
|
+
* #action
|
|
286
|
+
*/
|
|
287
|
+
setCigarClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
288
|
+
/**
|
|
289
|
+
* #action
|
|
290
|
+
*/
|
|
291
|
+
setMouseoverCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
292
|
+
/**
|
|
293
|
+
* #action
|
|
294
|
+
*/
|
|
295
|
+
setMouseoverId(arg?: string): void;
|
|
296
|
+
/**
|
|
297
|
+
* #action
|
|
298
|
+
*/
|
|
299
|
+
setCigarMouseoverId(arg: number): void;
|
|
300
|
+
/**
|
|
301
|
+
* #action
|
|
302
|
+
*/
|
|
303
|
+
setClickId(arg?: string): void;
|
|
304
|
+
} & {
|
|
305
|
+
/**
|
|
306
|
+
* #getter
|
|
307
|
+
*/
|
|
308
|
+
readonly adapterConfig: any;
|
|
309
|
+
/**
|
|
310
|
+
* #getter
|
|
311
|
+
*/
|
|
312
|
+
readonly trackIds: string[];
|
|
313
|
+
/**
|
|
314
|
+
* #getter
|
|
315
|
+
*/
|
|
316
|
+
readonly numFeats: number;
|
|
317
|
+
/**
|
|
318
|
+
* #getter
|
|
319
|
+
* used for synteny svg rendering
|
|
320
|
+
*/
|
|
321
|
+
readonly ready: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* #getter
|
|
324
|
+
*/
|
|
325
|
+
readonly featMap: {
|
|
326
|
+
[k: string]: FeatPos;
|
|
327
|
+
};
|
|
328
|
+
} & {
|
|
329
|
+
afterAttach(): void;
|
|
330
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
331
|
+
export type LinearSyntenyDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
332
|
+
export type LinearSyntenyDisplayModel = Instance<LinearSyntenyDisplayStateModel>;
|
|
333
|
+
export default stateModelFactory;
|