@jbrowse/plugin-alignments 2.11.2 → 2.12.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/dist/AlignmentsFeatureDetail/Flags.js +1 -1
- package/dist/AlignmentsFeatureDetail/Formatter.js +1 -1
- package/dist/AlignmentsFeatureDetail/LaunchBreakpointSplitViewPanel.js +2 -9
- package/dist/AlignmentsFeatureDetail/PairLink.js +1 -1
- package/dist/AlignmentsFeatureDetail/SuppAlignments.js +1 -1
- package/dist/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.js +2 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +1 -2
- package/dist/AlignmentsFeatureDetail/index.js +1 -1
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.js +1 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +27 -1
- package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -2
- package/dist/AlignmentsFeatureDetail/util.js +2 -3
- package/dist/AlignmentsTrack/configSchemaF.js +1 -1
- package/dist/AlignmentsTrack/index.js +1 -1
- package/dist/BamAdapter/BamAdapter.d.ts +1 -1
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +0 -1
- package/dist/BamAdapter/index.js +1 -1
- package/dist/CramAdapter/CramTestAdapters.js +2 -2
- package/dist/CramAdapter/index.js +1 -1
- package/dist/CramAdapter/util.js +2 -3
- package/dist/GuessAlignmentsTypes/index.js +1 -1
- package/dist/HtsgetBamAdapter/index.js +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +1 -1
- package/dist/LinearAlignmentsDisplay/models/alignmentsModel.js +1 -2
- package/dist/LinearAlignmentsDisplay/models/configSchema.d.ts +1 -3
- package/dist/LinearAlignmentsDisplay/models/configSchema.js +1 -1
- package/dist/LinearAlignmentsDisplay/models/model.d.ts +23 -13
- package/dist/LinearAlignmentsDisplay/models/util.js +1 -2
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +37 -40
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +1 -2
- package/dist/LinearPileupDisplay/components/ModificationsTable.js +1 -1
- package/dist/LinearPileupDisplay/configSchema.d.ts +2 -6
- package/dist/LinearPileupDisplay/index.js +1 -1
- package/dist/LinearPileupDisplay/model.d.ts +53 -44
- package/dist/LinearReadArcsDisplay/drawFeats.js +1 -2
- package/dist/LinearReadArcsDisplay/index.js +1 -1
- package/dist/LinearReadArcsDisplay/model.d.ts +12 -20
- package/dist/LinearReadArcsDisplay/util.js +1 -2
- package/dist/LinearReadCloudDisplay/configSchema.d.ts +0 -3
- package/dist/LinearReadCloudDisplay/drawFeats.js +1 -2
- package/dist/LinearReadCloudDisplay/drawLongReadChains.js +1 -2
- package/dist/LinearReadCloudDisplay/drawPairChains.js +2 -3
- package/dist/LinearReadCloudDisplay/index.js +1 -1
- package/dist/LinearReadCloudDisplay/model.d.ts +18 -24
- package/dist/LinearReadCloudDisplay/util.js +2 -3
- package/dist/LinearSNPCoverageDisplay/index.js +1 -1
- package/dist/LinearSNPCoverageDisplay/models/configSchema.js +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +9 -18
- package/dist/MismatchParser/index.d.ts +0 -1
- package/dist/MismatchParser/index.js +17 -18
- package/dist/PileupRPC/index.js +1 -1
- package/dist/PileupRPC/util.js +2 -3
- package/dist/PileupRenderer/PileupRenderer.d.ts +5 -6
- package/dist/PileupRenderer/colorBy.js +5 -6
- package/dist/PileupRenderer/getAlignmentShapeColor.js +1 -2
- package/dist/PileupRenderer/index.js +1 -1
- package/dist/PileupRenderer/layoutFeature.js +1 -2
- package/dist/PileupRenderer/layoutFeatures.js +1 -2
- package/dist/PileupRenderer/makeImageData.js +1 -2
- package/dist/PileupRenderer/renderAlignment.js +1 -2
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -2
- package/dist/PileupRenderer/renderMethylation.js +1 -2
- package/dist/PileupRenderer/renderMismatches.js +1 -2
- package/dist/PileupRenderer/renderModifications.js +1 -2
- package/dist/PileupRenderer/renderPerBaseLettering.js +1 -2
- package/dist/PileupRenderer/renderPerBaseQuality.js +1 -2
- package/dist/PileupRenderer/renderSoftClipping.js +1 -2
- package/dist/PileupRenderer/util.js +6 -7
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +1 -1
- package/dist/SNPCoverageAdapter/index.js +1 -1
- package/dist/SNPCoverageRenderer/index.js +1 -1
- package/dist/shared/afterAttach.js +1 -2
- package/dist/shared/color.js +4 -4
- package/dist/shared/fetchChains.js +1 -2
- package/dist/shared/index.js +3 -3
- package/dist/shared/renderSvg.js +1 -2
- package/dist/shared/util.js +1 -2
- package/dist/util.d.ts +1 -1
- package/dist/util.js +8 -8
- package/esm/AlignmentsFeatureDetail/LaunchBreakpointSplitViewPanel.js +1 -8
- package/esm/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.js +1 -1
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +27 -1
- package/esm/BamAdapter/BamAdapter.d.ts +1 -1
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +0 -1
- package/esm/LinearAlignmentsDisplay/models/configSchema.d.ts +1 -3
- package/esm/LinearAlignmentsDisplay/models/model.d.ts +23 -13
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +37 -40
- package/esm/LinearPileupDisplay/configSchema.d.ts +2 -6
- package/esm/LinearPileupDisplay/model.d.ts +53 -44
- package/esm/LinearReadArcsDisplay/model.d.ts +12 -20
- package/esm/LinearReadCloudDisplay/configSchema.d.ts +0 -3
- package/esm/LinearReadCloudDisplay/model.d.ts +18 -24
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +9 -18
- package/esm/MismatchParser/index.d.ts +0 -1
- package/esm/PileupRenderer/PileupRenderer.d.ts +5 -6
- package/esm/util.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderModifications =
|
|
3
|
+
exports.renderModifications = renderModifications;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
const MismatchParser_1 = require("../MismatchParser");
|
|
6
6
|
const util_2 = require("../util");
|
|
@@ -46,4 +46,3 @@ function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, canvasWid
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
exports.renderModifications = renderModifications;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderPerBaseLettering =
|
|
3
|
+
exports.renderPerBaseLettering = renderPerBaseLettering;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
const MismatchParser_1 = require("../MismatchParser");
|
|
6
6
|
const util_2 = require("./util");
|
|
@@ -43,4 +43,3 @@ function renderPerBaseLettering({ ctx, feat, region, bpPerPx, colorForBase, cont
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.renderPerBaseLettering = renderPerBaseLettering;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderPerBaseQuality =
|
|
3
|
+
exports.renderPerBaseQuality = renderPerBaseQuality;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
const MismatchParser_1 = require("../MismatchParser");
|
|
6
6
|
const util_2 = require("./util");
|
|
@@ -35,4 +35,3 @@ function renderPerBaseQuality({ ctx, feat, region, bpPerPx, canvasWidth, }) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
exports.renderPerBaseQuality = renderPerBaseQuality;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderSoftClipping =
|
|
3
|
+
exports.renderSoftClipping = renderSoftClipping;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
5
|
const util_1 = require("@jbrowse/core/util");
|
|
6
6
|
// locals
|
|
@@ -61,4 +61,3 @@ function renderSoftClipping({ ctx, feat, renderArgs, config, theme, colorForBase
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
exports.renderSoftClipping = renderSoftClipping;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.fillRect = fillRect;
|
|
4
|
+
exports.getColorBaseMap = getColorBaseMap;
|
|
5
|
+
exports.getContrastBaseMap = getContrastBaseMap;
|
|
6
|
+
exports.shouldDrawSNPsMuted = shouldDrawSNPsMuted;
|
|
7
|
+
exports.shouldDrawIndels = shouldDrawIndels;
|
|
8
|
+
exports.getCharWidthHeight = getCharWidthHeight;
|
|
4
9
|
const util_1 = require("@jbrowse/core/util");
|
|
5
10
|
function fillRect(ctx, l, t, w, h, cw, color) {
|
|
6
11
|
if (l + w < 0 || l > cw) {
|
|
@@ -13,7 +18,6 @@ function fillRect(ctx, l, t, w, h, cw, color) {
|
|
|
13
18
|
ctx.fillRect(l, t, w, h);
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
|
-
exports.fillRect = fillRect;
|
|
17
21
|
function getColorBaseMap(theme) {
|
|
18
22
|
const { bases } = theme.palette;
|
|
19
23
|
return {
|
|
@@ -24,22 +28,18 @@ function getColorBaseMap(theme) {
|
|
|
24
28
|
deletion: '#808080', // gray
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
|
-
exports.getColorBaseMap = getColorBaseMap;
|
|
28
31
|
function getContrastBaseMap(theme) {
|
|
29
32
|
return Object.fromEntries(Object.entries(getColorBaseMap(theme)).map(([key, value]) => [
|
|
30
33
|
key,
|
|
31
34
|
theme.palette.getContrastText(value),
|
|
32
35
|
]));
|
|
33
36
|
}
|
|
34
|
-
exports.getContrastBaseMap = getContrastBaseMap;
|
|
35
37
|
function shouldDrawSNPsMuted(type) {
|
|
36
38
|
return ['methylation', 'modifications'].includes(type || '');
|
|
37
39
|
}
|
|
38
|
-
exports.shouldDrawSNPsMuted = shouldDrawSNPsMuted;
|
|
39
40
|
function shouldDrawIndels() {
|
|
40
41
|
return true;
|
|
41
42
|
}
|
|
42
|
-
exports.shouldDrawIndels = shouldDrawIndels;
|
|
43
43
|
// get width and height of chars the height is an approximation: width letter M
|
|
44
44
|
// is approximately the height
|
|
45
45
|
function getCharWidthHeight() {
|
|
@@ -47,4 +47,3 @@ function getCharWidthHeight() {
|
|
|
47
47
|
const charHeight = (0, util_1.measureText)('M') - 2;
|
|
48
48
|
return { charWidth, charHeight };
|
|
49
49
|
}
|
|
50
|
-
exports.getCharWidthHeight = getCharWidthHeight;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = generateCoverageBins;
|
|
3
4
|
const util_1 = require("../util");
|
|
4
5
|
const MismatchParser_1 = require("../MismatchParser");
|
|
5
6
|
const util_2 = require("@jbrowse/core/util");
|
|
@@ -208,4 +209,3 @@ async function generateCoverageBins(features, region, opts, fetchSequence) {
|
|
|
208
209
|
}
|
|
209
210
|
return { bins, skipmap };
|
|
210
211
|
}
|
|
211
|
-
exports.default = generateCoverageBins;
|
|
@@ -26,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.default = SNPCoverageAdapterF;
|
|
29
30
|
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
30
31
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
31
32
|
function SNPCoverageAdapterF(pluginManager) {
|
|
@@ -41,4 +42,3 @@ function SNPCoverageAdapterF(pluginManager) {
|
|
|
41
42
|
});
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
|
-
exports.default = SNPCoverageAdapterF;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = register;
|
|
6
7
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
7
8
|
const SNPCoverageRenderer_1 = __importDefault(require("./SNPCoverageRenderer"));
|
|
8
9
|
const plugin_wiggle_1 = require("@jbrowse/plugin-wiggle");
|
|
@@ -14,4 +15,3 @@ function register(pluginManager) {
|
|
|
14
15
|
pluginManager,
|
|
15
16
|
}));
|
|
16
17
|
}
|
|
17
|
-
exports.default = register;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.doAfterAttach =
|
|
3
|
+
exports.doAfterAttach = doAfterAttach;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
const util_2 = require("../util");
|
|
6
6
|
const fetchChains_1 = require("./fetchChains");
|
|
@@ -40,4 +40,3 @@ function doAfterAttach(self, cb) {
|
|
|
40
40
|
draw(view);
|
|
41
41
|
}, { delay: 1000 });
|
|
42
42
|
}
|
|
43
|
-
exports.doAfterAttach = doAfterAttach;
|
package/dist/shared/color.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColorByModel = exports.
|
|
3
|
+
exports.ColorByModel = exports.strokeColor = exports.fillColor = void 0;
|
|
4
|
+
exports.getPairedInsertSizeColor = getPairedInsertSizeColor;
|
|
5
|
+
exports.getPairedInsertSizeAndOrientationColor = getPairedInsertSizeAndOrientationColor;
|
|
6
|
+
exports.getPairedOrientationColor = getPairedOrientationColor;
|
|
4
7
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
8
|
const util_1 = require("../util");
|
|
6
9
|
exports.fillColor = {
|
|
@@ -61,11 +64,9 @@ function getPairedInsertSizeColor(f1, f2, stats) {
|
|
|
61
64
|
}
|
|
62
65
|
return undefined;
|
|
63
66
|
}
|
|
64
|
-
exports.getPairedInsertSizeColor = getPairedInsertSizeColor;
|
|
65
67
|
function getPairedInsertSizeAndOrientationColor(f1, f2, stats) {
|
|
66
68
|
return (getPairedInsertSizeColor(f1, f2, stats) || getPairedOrientationColor(f1));
|
|
67
69
|
}
|
|
68
|
-
exports.getPairedInsertSizeAndOrientationColor = getPairedInsertSizeAndOrientationColor;
|
|
69
70
|
function getPairedOrientationColor(f) {
|
|
70
71
|
const type = util_1.orientationTypes.fr;
|
|
71
72
|
const type2 = util_1.pairMap[type[f.pair_orientation || '']];
|
|
@@ -74,7 +75,6 @@ function getPairedOrientationColor(f) {
|
|
|
74
75
|
exports.strokeColor[type2] || exports.strokeColor.color_unknown,
|
|
75
76
|
];
|
|
76
77
|
}
|
|
77
|
-
exports.getPairedOrientationColor = getPairedOrientationColor;
|
|
78
78
|
exports.ColorByModel = mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.model({
|
|
79
79
|
type: mobx_state_tree_1.types.string,
|
|
80
80
|
tag: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchChains =
|
|
3
|
+
exports.fetchChains = fetchChains;
|
|
4
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
5
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
6
|
async function fetchChains(self) {
|
|
@@ -21,4 +21,3 @@ async function fetchChains(self) {
|
|
|
21
21
|
self.setChainData(ret);
|
|
22
22
|
self.setLoading(false);
|
|
23
23
|
}
|
|
24
|
-
exports.fetchChains = fetchChains;
|
package/dist/shared/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterModel =
|
|
3
|
+
exports.FilterModel = void 0;
|
|
4
|
+
exports.getUniqueTagValues = getUniqueTagValues;
|
|
5
|
+
exports.getUniqueModificationValues = getUniqueModificationValues;
|
|
4
6
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
7
|
const util_1 = require("@jbrowse/core/util");
|
|
6
8
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
@@ -17,7 +19,6 @@ async function getUniqueTagValues(self, colorScheme, blocks, opts) {
|
|
|
17
19
|
});
|
|
18
20
|
return values;
|
|
19
21
|
}
|
|
20
|
-
exports.getUniqueTagValues = getUniqueTagValues;
|
|
21
22
|
async function getUniqueModificationValues(self, adapterConfig, colorScheme, blocks, opts) {
|
|
22
23
|
const { rpcManager } = (0, util_1.getSession)(self);
|
|
23
24
|
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
@@ -30,7 +31,6 @@ async function getUniqueModificationValues(self, adapterConfig, colorScheme, blo
|
|
|
30
31
|
});
|
|
31
32
|
return values;
|
|
32
33
|
}
|
|
33
|
-
exports.getUniqueModificationValues = getUniqueModificationValues;
|
|
34
34
|
exports.FilterModel = mobx_state_tree_1.types.model({
|
|
35
35
|
flagInclude: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
|
|
36
36
|
flagExclude: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 1540),
|
package/dist/shared/renderSvg.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.renderSvg =
|
|
29
|
+
exports.renderSvg = renderSvg;
|
|
30
30
|
const react_1 = __importDefault(require("react"));
|
|
31
31
|
const util_1 = require("@jbrowse/core/util");
|
|
32
32
|
// stabilize clipid under test for snapshot
|
|
@@ -65,4 +65,3 @@ async function renderSvg(self, opts, cb) {
|
|
|
65
65
|
dangerouslySetInnerHTML: { __html: ctx.getSvg().innerHTML }, clipPath: `url(#${clipid})` })));
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
exports.renderSvg = renderSvg;
|
package/dist/shared/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hasPairedReads =
|
|
3
|
+
exports.hasPairedReads = hasPairedReads;
|
|
4
4
|
function hasPairedReads(features) {
|
|
5
5
|
for (const f of features.chains.values()) {
|
|
6
6
|
if (f[0].flags & 1) {
|
|
@@ -9,4 +9,3 @@ function hasPairedReads(features) {
|
|
|
9
9
|
}
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
|
-
exports.hasPairedReads = hasPairedReads;
|
package/dist/util.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const pairMap: {
|
|
|
17
17
|
};
|
|
18
18
|
export declare function getColorWGBS(strand: number, base: string): "#f00" | "#00f" | "#888";
|
|
19
19
|
export declare function fetchSequence(region: AugmentedRegion, adapter: BaseFeatureDataAdapter): Promise<any>;
|
|
20
|
-
export declare function shouldFetchReferenceSequence(type?: string):
|
|
20
|
+
export declare function shouldFetchReferenceSequence(type?: string): type is "methylation";
|
|
21
21
|
export declare const modificationColors: Record<string, string | undefined>;
|
|
22
22
|
type DisplayModel = IAnyStateTreeNode & {
|
|
23
23
|
setError: (arg: unknown) => void;
|
package/dist/util.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.modificationColors = exports.pairMap = exports.orientationTypes = void 0;
|
|
4
|
+
exports.getTag = getTag;
|
|
5
|
+
exports.getTagAlt = getTagAlt;
|
|
6
|
+
exports.getColorWGBS = getColorWGBS;
|
|
7
|
+
exports.fetchSequence = fetchSequence;
|
|
8
|
+
exports.shouldFetchReferenceSequence = shouldFetchReferenceSequence;
|
|
9
|
+
exports.createAutorun = createAutorun;
|
|
10
|
+
exports.randomColor = randomColor;
|
|
4
11
|
const operators_1 = require("rxjs/operators");
|
|
5
12
|
const rxjs_1 = require("rxjs");
|
|
6
13
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
@@ -11,14 +18,12 @@ function getTag(feature, tag) {
|
|
|
11
18
|
const tags = feature.get('tags');
|
|
12
19
|
return tags !== undefined ? tags[tag] : feature.get(tag);
|
|
13
20
|
}
|
|
14
|
-
exports.getTag = getTag;
|
|
15
21
|
// use fallback alt tag, used in situations where upper case/lower case tags
|
|
16
22
|
// exist e.g. Mm/MM for base modifications
|
|
17
23
|
function getTagAlt(feature, tag, alt) {
|
|
18
24
|
var _a;
|
|
19
25
|
return (_a = getTag(feature, tag)) !== null && _a !== void 0 ? _a : getTag(feature, alt);
|
|
20
26
|
}
|
|
21
|
-
exports.getTagAlt = getTagAlt;
|
|
22
27
|
// orientation definitions from igv.js, see also
|
|
23
28
|
// https://software.broadinstitute.org/software/igv/interpreting_pair_orientations
|
|
24
29
|
exports.orientationTypes = {
|
|
@@ -78,7 +83,6 @@ function getColorWGBS(strand, base) {
|
|
|
78
83
|
}
|
|
79
84
|
return '#888';
|
|
80
85
|
}
|
|
81
|
-
exports.getColorWGBS = getColorWGBS;
|
|
82
86
|
// fetches region sequence augmenting by +/- 1bp for CpG on either side of
|
|
83
87
|
// requested region
|
|
84
88
|
async function fetchSequence(region, adapter) {
|
|
@@ -94,12 +98,10 @@ async function fetchSequence(region, adapter) {
|
|
|
94
98
|
.pipe((0, operators_1.toArray)()));
|
|
95
99
|
return (_a = feats[0]) === null || _a === void 0 ? void 0 : _a.get('seq');
|
|
96
100
|
}
|
|
97
|
-
exports.fetchSequence = fetchSequence;
|
|
98
101
|
// has to check underlying C-G (aka CpG) on the reference sequence
|
|
99
102
|
function shouldFetchReferenceSequence(type) {
|
|
100
103
|
return type === 'methylation';
|
|
101
104
|
}
|
|
102
|
-
exports.shouldFetchReferenceSequence = shouldFetchReferenceSequence;
|
|
103
105
|
// adapted from IGV
|
|
104
106
|
// https://github.com/igvteam/igv/blob/e803e3af2d8c9ea049961dfd4628146bdde9a574/src/main/java/org/broad/igv/sam/mods/BaseModificationColors.java#L27
|
|
105
107
|
exports.modificationColors = {
|
|
@@ -124,8 +126,6 @@ function createAutorun(self, cb, opts) {
|
|
|
124
126
|
}
|
|
125
127
|
}, opts));
|
|
126
128
|
}
|
|
127
|
-
exports.createAutorun = createAutorun;
|
|
128
129
|
function randomColor() {
|
|
129
130
|
return `hsl(${Math.random() * 200}, 50%, 50%)`;
|
|
130
131
|
}
|
|
131
|
-
exports.randomColor = randomColor;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import React, { lazy, useEffect, useState } from 'react';
|
|
2
2
|
import { Typography, Link, Tooltip } from '@mui/material';
|
|
3
3
|
import { SimpleFeature, getSession, toLocale, } from '@jbrowse/core/util';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
4
|
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
6
5
|
import { getSAFeatures } from './getSAFeatures';
|
|
7
6
|
// lazies
|
|
8
7
|
const BreakendOptionDialog = lazy(() => import('./BreakendOptionDialog'));
|
|
9
|
-
const useStyles = makeStyles()({
|
|
10
|
-
cursor: {
|
|
11
|
-
cursor: 'pointer',
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
8
|
export default function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
|
|
15
|
-
const { classes } = useStyles();
|
|
16
9
|
const session = getSession(model);
|
|
17
10
|
const { view } = model;
|
|
18
11
|
const [res, setRes] = useState();
|
|
@@ -47,7 +40,7 @@ export default function LaunchBreakpointSplitViewPanel({ model, feature, viewTyp
|
|
|
47
40
|
const [f1, f2] = arg;
|
|
48
41
|
return (React.createElement("li", { key: `${JSON.stringify(arg)}-${index}` },
|
|
49
42
|
React.createElement(Tooltip, { title: "Top panel->Bottom panel" },
|
|
50
|
-
React.createElement(Link, { href: "#",
|
|
43
|
+
React.createElement(Link, { href: "#", onClick: event => {
|
|
51
44
|
event.preventDefault();
|
|
52
45
|
session.queueDialog(handleClose => [
|
|
53
46
|
BreakendOptionDialog,
|
|
@@ -22,7 +22,7 @@ export default function SuppAlignmentsLocStrings({ tag, model, }) {
|
|
|
22
22
|
const displayEnd = end.toLocaleString('en-US');
|
|
23
23
|
const displayString = `${saRef}:${displayStart}-${displayEnd} (${saStrand}) [${saLength}bp]`;
|
|
24
24
|
return (React.createElement("li", { key: `${locString}-${index}` },
|
|
25
|
-
React.createElement(Link, { onClick: async (event) => {
|
|
25
|
+
React.createElement(Link, { href: "#", onClick: async (event) => {
|
|
26
26
|
event.preventDefault();
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
28
28
|
navToLoc(locString, model);
|
|
@@ -12,13 +12,26 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
12
12
|
trackType: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
13
13
|
maxDepth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
14
14
|
sequenceFeatureDetails: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{}, {
|
|
15
|
+
showCoordinatesSetting: string;
|
|
15
16
|
intronBp: number;
|
|
16
17
|
upDownBp: number;
|
|
17
18
|
upperCaseCDS: boolean;
|
|
19
|
+
charactersPerRow: number;
|
|
20
|
+
feature: import("@jbrowse/core/util").SimpleFeatureSerialized | undefined;
|
|
21
|
+
mode: string;
|
|
18
22
|
} & {
|
|
23
|
+
setFeature(f: import("@jbrowse/core/util").SimpleFeatureSerialized): void;
|
|
19
24
|
setUpDownBp(f: number): void;
|
|
20
25
|
setIntronBp(f: number): void;
|
|
21
26
|
setUpperCaseCDS(f: boolean): void;
|
|
27
|
+
setShowCoordinates(f: "none" | "relative" | "genomic"): void;
|
|
28
|
+
setMode(mode: string): void;
|
|
29
|
+
} & {
|
|
30
|
+
readonly showCoordinates: boolean;
|
|
31
|
+
readonly showGenomicCoordsOption: boolean;
|
|
32
|
+
readonly hasCDS: boolean | undefined;
|
|
33
|
+
readonly hasExon: boolean | undefined;
|
|
34
|
+
readonly hasExonOrCDS: boolean | undefined;
|
|
22
35
|
} & {
|
|
23
36
|
afterAttach(): void;
|
|
24
37
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
@@ -30,7 +43,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
30
43
|
setFeatureData(featureData: Record<string, unknown>): void;
|
|
31
44
|
clearFeatureData(): void;
|
|
32
45
|
setFormattedData(feat: Record<string, unknown>): void;
|
|
33
|
-
setExtra(type?: string
|
|
46
|
+
setExtra(type?: string, trackId?: string, maxDepth?: number): void;
|
|
34
47
|
setError(e: unknown): void;
|
|
35
48
|
} & {
|
|
36
49
|
afterCreate(): void;
|
|
@@ -48,13 +61,26 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
48
61
|
trackType: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
49
62
|
maxDepth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
50
63
|
sequenceFeatureDetails: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{}, {
|
|
64
|
+
showCoordinatesSetting: string;
|
|
51
65
|
intronBp: number;
|
|
52
66
|
upDownBp: number;
|
|
53
67
|
upperCaseCDS: boolean;
|
|
68
|
+
charactersPerRow: number;
|
|
69
|
+
feature: import("@jbrowse/core/util").SimpleFeatureSerialized | undefined;
|
|
70
|
+
mode: string;
|
|
54
71
|
} & {
|
|
72
|
+
setFeature(f: import("@jbrowse/core/util").SimpleFeatureSerialized): void;
|
|
55
73
|
setUpDownBp(f: number): void;
|
|
56
74
|
setIntronBp(f: number): void;
|
|
57
75
|
setUpperCaseCDS(f: boolean): void;
|
|
76
|
+
setShowCoordinates(f: "none" | "relative" | "genomic"): void;
|
|
77
|
+
setMode(mode: string): void;
|
|
78
|
+
} & {
|
|
79
|
+
readonly showCoordinates: boolean;
|
|
80
|
+
readonly showGenomicCoordsOption: boolean;
|
|
81
|
+
readonly hasCDS: boolean | undefined;
|
|
82
|
+
readonly hasExon: boolean | undefined;
|
|
83
|
+
readonly hasExonOrCDS: boolean | undefined;
|
|
58
84
|
} & {
|
|
59
85
|
afterAttach(): void;
|
|
60
86
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
@@ -20,7 +20,7 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
20
20
|
}>;
|
|
21
21
|
protected configure(): Promise<{
|
|
22
22
|
bam: BamFile;
|
|
23
|
-
sequenceAdapter?: BaseFeatureDataAdapter
|
|
23
|
+
sequenceAdapter?: BaseFeatureDataAdapter;
|
|
24
24
|
}>;
|
|
25
25
|
getHeader(opts?: BaseOptions): Promise<string | undefined>;
|
|
26
26
|
private setupPre;
|
|
@@ -37,7 +37,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
37
37
|
rendererTypeName: string;
|
|
38
38
|
error: unknown;
|
|
39
39
|
message: string | undefined;
|
|
40
|
-
} & IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
40
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
41
41
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
42
42
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
43
43
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -46,8 +46,8 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
46
46
|
error: unknown;
|
|
47
47
|
message: string | undefined;
|
|
48
48
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
49
|
-
onHorizontalScroll?: Function
|
|
50
|
-
blockState?: Record<string, any
|
|
49
|
+
onHorizontalScroll?: Function;
|
|
50
|
+
blockState?: Record<string, any>;
|
|
51
51
|
}>;
|
|
52
52
|
readonly DisplayBlurb: React.FC<{
|
|
53
53
|
model: {
|
|
@@ -58,28 +58,38 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
58
58
|
rendererTypeName: string;
|
|
59
59
|
error: unknown;
|
|
60
60
|
message: string | undefined;
|
|
61
|
-
} & IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
62
|
-
id: import("mobx-state-tree").IOptionalIType<import(
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
62
|
+
id: import("mobx-state-tree").IOptionalIType<import(
|
|
63
|
+
/**
|
|
64
|
+
* #action
|
|
65
|
+
*/
|
|
66
|
+
"mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
67
|
+
type: import("mobx-state-tree" /**
|
|
68
|
+
* #getter
|
|
69
|
+
*/).ISimpleType<string>;
|
|
70
|
+
rpcDriverName: import("mobx-state-tree" /**
|
|
71
|
+
* #getter
|
|
72
|
+
*/).IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
65
73
|
}, {
|
|
66
74
|
rendererTypeName: string;
|
|
67
75
|
error: unknown;
|
|
68
76
|
message: string | undefined;
|
|
69
|
-
}, import("mobx-state-tree")._NotCustomized, import(
|
|
77
|
+
}, import("mobx-state-tree")._NotCustomized, import(
|
|
78
|
+
/**
|
|
79
|
+
* #getter
|
|
80
|
+
*/
|
|
81
|
+
"mobx-state-tree")._NotCustomized>>;
|
|
70
82
|
}> | null;
|
|
71
83
|
readonly adapterConfig: any;
|
|
72
84
|
readonly parentTrack: any;
|
|
73
85
|
renderProps(): any;
|
|
74
86
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
75
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
76
|
-
trackMenuItems(): MenuItem[];
|
|
77
|
-
* #getter
|
|
78
|
-
*/
|
|
87
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
88
|
+
trackMenuItems(): MenuItem[];
|
|
79
89
|
readonly viewMenuActions: MenuItem[];
|
|
80
90
|
regionCannotBeRendered(): null;
|
|
81
91
|
} & {
|
|
82
|
-
setMessage(arg?: string
|
|
92
|
+
setMessage(arg?: string): void;
|
|
83
93
|
setError(error?: unknown): void;
|
|
84
94
|
setRpcDriverName(rpcDriverName: string): void;
|
|
85
95
|
reload(): void;
|