@jbrowse/plugin-alignments 2.13.1 → 2.14.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/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +5 -3
- package/dist/AlignmentsFeatureDetail/BreakendOptionDialog.js +12 -4
- package/dist/AlignmentsFeatureDetail/Formatter.js +6 -2
- package/dist/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.js +4 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +4 -4
- package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.js +2 -2
- package/dist/BamAdapter/BamAdapter.js +12 -18
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -1
- package/dist/CramAdapter/CramAdapter.d.ts +1 -1
- package/dist/CramAdapter/CramAdapter.js +7 -6
- package/dist/CramAdapter/CramTestAdapters.js +8 -2
- package/dist/GuessAlignmentsTypes/index.js +2 -2
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -2
- package/dist/LinearAlignmentsDisplay/models/model.d.ts +13 -20
- package/dist/LinearAlignmentsDisplay/models/model.js +13 -3
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +7 -4
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -21
- package/dist/LinearPileupDisplay/components/{ColorByModifications.js → ColorByModificationsDialog.js} +3 -1
- package/dist/LinearPileupDisplay/components/{ColorByTag.js → ColorByTagDialog.js} +4 -2
- package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +11 -0
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +129 -0
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -3
- package/dist/LinearPileupDisplay/components/{SetFeatureHeight.js → SetFeatureHeightDialog.js} +9 -3
- package/{esm/LinearPileupDisplay/components/SetMaxHeight.d.ts → dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts} +1 -1
- package/dist/LinearPileupDisplay/components/{SetMaxHeight.js → SetMaxHeightDialog.js} +6 -2
- package/dist/LinearPileupDisplay/components/{SortByTag.d.ts → SortByTagDialog.d.ts} +1 -1
- package/dist/LinearPileupDisplay/components/{SortByTag.js → SortByTagDialog.js} +7 -3
- package/dist/LinearPileupDisplay/configSchema.js +0 -1
- package/dist/LinearPileupDisplay/model.d.ts +58 -46
- package/dist/LinearPileupDisplay/model.js +69 -41
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +1 -0
- package/dist/LinearReadArcsDisplay/model.d.ts +2 -2
- package/dist/LinearReadArcsDisplay/model.js +37 -13
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +4 -1
- package/dist/LinearReadCloudDisplay/drawPairChains.js +3 -3
- package/dist/LinearReadCloudDisplay/model.d.ts +4 -8
- package/dist/LinearReadCloudDisplay/model.js +16 -6
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.js +15 -5
- package/dist/MismatchParser/index.js +11 -9
- package/dist/PileupRPC/base.d.ts +1 -1
- package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +1 -1
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +3 -3
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +1 -1
- package/dist/PileupRenderer/PileupLayoutSession.js +3 -2
- package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/dist/PileupRenderer/PileupRenderer.js +16 -13
- package/dist/PileupRenderer/colorBy.js +3 -5
- package/dist/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/dist/PileupRenderer/components/PileupRendering.js +65 -60
- package/dist/PileupRenderer/getAlignmentShapeColor.js +24 -16
- package/dist/PileupRenderer/layoutFeature.js +6 -1
- package/dist/PileupRenderer/layoutFeatures.js +1 -7
- package/dist/PileupRenderer/makeImageData.d.ts +1 -1
- package/dist/PileupRenderer/makeImageData.js +1 -0
- package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
- package/dist/PileupRenderer/renderMismatches.js +1 -1
- package/dist/PileupRenderer/renderSoftClipping.js +1 -1
- package/dist/PileupRenderer/util.js +3 -5
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +4 -10
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -2
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +2 -5
- package/dist/index.js +3 -1
- package/dist/shared/BaseDisplayComponent.js +3 -1
- package/dist/shared/{FilterByTag.js → FilterByTagDialog.js} +16 -6
- package/dist/shared/color.js +2 -2
- package/dist/shared/index.d.ts +24 -20
- package/dist/shared/index.js +4 -5
- package/dist/shared/renderSvg.js +1 -3
- package/dist/util.d.ts +1 -1
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +5 -3
- package/esm/AlignmentsFeatureDetail/BreakendOptionDialog.js +12 -4
- package/esm/AlignmentsFeatureDetail/Formatter.js +6 -2
- package/esm/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.js +4 -2
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +4 -4
- package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.js +2 -2
- package/esm/BamAdapter/BamAdapter.js +12 -18
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -1
- package/esm/CramAdapter/CramAdapter.d.ts +1 -1
- package/esm/CramAdapter/CramAdapter.js +7 -6
- package/esm/CramAdapter/CramTestAdapters.js +8 -2
- package/esm/GuessAlignmentsTypes/index.js +2 -2
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -2
- package/esm/LinearAlignmentsDisplay/models/model.d.ts +13 -20
- package/esm/LinearAlignmentsDisplay/models/model.js +13 -3
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +7 -4
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -21
- package/esm/LinearPileupDisplay/components/{ColorByModifications.js → ColorByModificationsDialog.js} +3 -1
- package/esm/LinearPileupDisplay/components/{ColorByTag.js → ColorByTagDialog.js} +4 -2
- package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +11 -0
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +104 -0
- package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -3
- package/esm/LinearPileupDisplay/components/{SetFeatureHeight.js → SetFeatureHeightDialog.js} +9 -3
- package/{dist/LinearPileupDisplay/components/SetMaxHeight.d.ts → esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts} +1 -1
- package/esm/LinearPileupDisplay/components/{SetMaxHeight.js → SetMaxHeightDialog.js} +6 -2
- package/esm/LinearPileupDisplay/components/{SortByTag.d.ts → SortByTagDialog.d.ts} +1 -1
- package/esm/LinearPileupDisplay/components/{SortByTag.js → SortByTagDialog.js} +7 -3
- package/esm/LinearPileupDisplay/configSchema.js +0 -1
- package/esm/LinearPileupDisplay/model.d.ts +58 -46
- package/esm/LinearPileupDisplay/model.js +69 -41
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +1 -0
- package/esm/LinearReadArcsDisplay/model.d.ts +2 -2
- package/esm/LinearReadArcsDisplay/model.js +37 -13
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +4 -1
- package/esm/LinearReadCloudDisplay/drawPairChains.js +3 -3
- package/esm/LinearReadCloudDisplay/model.d.ts +4 -8
- package/esm/LinearReadCloudDisplay/model.js +16 -6
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +1 -1
- package/esm/LinearSNPCoverageDisplay/models/model.js +15 -5
- package/esm/MismatchParser/index.js +11 -9
- package/esm/PileupRPC/base.d.ts +1 -1
- package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +1 -1
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +3 -3
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +1 -1
- package/esm/PileupRenderer/PileupLayoutSession.js +3 -2
- package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/PileupRenderer/PileupRenderer.js +16 -13
- package/esm/PileupRenderer/colorBy.js +3 -5
- package/esm/PileupRenderer/components/PileupRendering.d.ts +1 -1
- package/esm/PileupRenderer/components/PileupRendering.js +65 -60
- package/esm/PileupRenderer/getAlignmentShapeColor.js +24 -16
- package/esm/PileupRenderer/layoutFeature.js +6 -1
- package/esm/PileupRenderer/layoutFeatures.js +1 -7
- package/esm/PileupRenderer/makeImageData.d.ts +1 -1
- package/esm/PileupRenderer/makeImageData.js +1 -0
- package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
- package/esm/PileupRenderer/renderMismatches.js +1 -1
- package/esm/PileupRenderer/renderSoftClipping.js +1 -1
- package/esm/PileupRenderer/util.js +3 -5
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +4 -10
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -2
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +2 -5
- package/esm/index.js +3 -1
- package/esm/shared/BaseDisplayComponent.js +3 -1
- package/esm/shared/{FilterByTag.js → FilterByTagDialog.js} +16 -6
- package/esm/shared/color.js +2 -2
- package/esm/shared/index.d.ts +24 -20
- package/esm/shared/index.js +4 -5
- package/esm/shared/renderSvg.js +1 -3
- package/esm/util.d.ts +1 -1
- package/package.json +4 -4
- /package/dist/LinearPileupDisplay/components/{ColorByModifications.d.ts → ColorByModificationsDialog.d.ts} +0 -0
- /package/dist/LinearPileupDisplay/components/{ColorByTag.d.ts → ColorByTagDialog.d.ts} +0 -0
- /package/dist/LinearPileupDisplay/components/{SetFeatureHeight.d.ts → SetFeatureHeightDialog.d.ts} +0 -0
- /package/dist/shared/{FilterByTag.d.ts → FilterByTagDialog.d.ts} +0 -0
- /package/esm/LinearPileupDisplay/components/{ColorByModifications.d.ts → ColorByModificationsDialog.d.ts} +0 -0
- /package/esm/LinearPileupDisplay/components/{ColorByTag.d.ts → ColorByTagDialog.d.ts} +0 -0
- /package/esm/LinearPileupDisplay/components/{SetFeatureHeight.d.ts → SetFeatureHeightDialog.d.ts} +0 -0
- /package/esm/shared/{FilterByTag.d.ts → FilterByTagDialog.d.ts} +0 -0
|
@@ -38,7 +38,7 @@ const ClearAll_1 = __importDefault(require("@mui/icons-material/ClearAll"));
|
|
|
38
38
|
// locals
|
|
39
39
|
const shared_1 = require("../shared");
|
|
40
40
|
// async
|
|
41
|
-
const FilterByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/
|
|
41
|
+
const FilterByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/FilterByTagDialog'))));
|
|
42
42
|
/**
|
|
43
43
|
* #stateModel LinearReadArcsDisplay
|
|
44
44
|
* the arc display is a non-block-based track, so draws to a single canvas and
|
|
@@ -230,15 +230,21 @@ function stateModelFactory(configSchema) {
|
|
|
230
230
|
subMenu: [
|
|
231
231
|
{
|
|
232
232
|
label: 'Thin',
|
|
233
|
-
onClick: () =>
|
|
233
|
+
onClick: () => {
|
|
234
|
+
self.setLineWidth(1);
|
|
235
|
+
},
|
|
234
236
|
},
|
|
235
237
|
{
|
|
236
238
|
label: 'Bold',
|
|
237
|
-
onClick: () =>
|
|
239
|
+
onClick: () => {
|
|
240
|
+
self.setLineWidth(2);
|
|
241
|
+
},
|
|
238
242
|
},
|
|
239
243
|
{
|
|
240
244
|
label: 'Extra bold',
|
|
241
|
-
onClick: () =>
|
|
245
|
+
onClick: () => {
|
|
246
|
+
self.setLineWidth(5);
|
|
247
|
+
},
|
|
242
248
|
},
|
|
243
249
|
],
|
|
244
250
|
},
|
|
@@ -249,19 +255,25 @@ function stateModelFactory(configSchema) {
|
|
|
249
255
|
type: 'checkbox',
|
|
250
256
|
checked: self.jitterVal === 0,
|
|
251
257
|
label: 'None',
|
|
252
|
-
onClick: () =>
|
|
258
|
+
onClick: () => {
|
|
259
|
+
self.setJitter(0);
|
|
260
|
+
},
|
|
253
261
|
},
|
|
254
262
|
{
|
|
255
263
|
type: 'checkbox',
|
|
256
264
|
checked: self.jitterVal === 2,
|
|
257
265
|
label: 'Small',
|
|
258
|
-
onClick: () =>
|
|
266
|
+
onClick: () => {
|
|
267
|
+
self.setJitter(2);
|
|
268
|
+
},
|
|
259
269
|
},
|
|
260
270
|
{
|
|
261
271
|
type: 'checkbox',
|
|
262
272
|
checked: self.jitterVal === 10,
|
|
263
273
|
label: 'Large',
|
|
264
|
-
onClick: () =>
|
|
274
|
+
onClick: () => {
|
|
275
|
+
self.setJitter(10);
|
|
276
|
+
},
|
|
265
277
|
},
|
|
266
278
|
],
|
|
267
279
|
},
|
|
@@ -269,13 +281,17 @@ function stateModelFactory(configSchema) {
|
|
|
269
281
|
label: 'Draw inter-region vertical lines',
|
|
270
282
|
type: 'checkbox',
|
|
271
283
|
checked: self.drawInter,
|
|
272
|
-
onClick: () =>
|
|
284
|
+
onClick: () => {
|
|
285
|
+
self.setDrawInter(!self.drawInter);
|
|
286
|
+
},
|
|
273
287
|
},
|
|
274
288
|
{
|
|
275
289
|
label: 'Draw long range connections',
|
|
276
290
|
type: 'checkbox',
|
|
277
291
|
checked: self.drawLongRange,
|
|
278
|
-
onClick: () =>
|
|
292
|
+
onClick: () => {
|
|
293
|
+
self.setDrawLongRange(!self.drawLongRange);
|
|
294
|
+
},
|
|
279
295
|
},
|
|
280
296
|
{
|
|
281
297
|
label: 'Color scheme',
|
|
@@ -283,19 +299,27 @@ function stateModelFactory(configSchema) {
|
|
|
283
299
|
subMenu: [
|
|
284
300
|
{
|
|
285
301
|
label: 'Insert size ± 3σ and orientation',
|
|
286
|
-
onClick: () =>
|
|
302
|
+
onClick: () => {
|
|
303
|
+
self.setColorScheme({ type: 'insertSizeAndOrientation' });
|
|
304
|
+
},
|
|
287
305
|
},
|
|
288
306
|
{
|
|
289
307
|
label: 'Insert size ± 3σ',
|
|
290
|
-
onClick: () =>
|
|
308
|
+
onClick: () => {
|
|
309
|
+
self.setColorScheme({ type: 'insertSize' });
|
|
310
|
+
},
|
|
291
311
|
},
|
|
292
312
|
{
|
|
293
313
|
label: 'Orientation',
|
|
294
|
-
onClick: () =>
|
|
314
|
+
onClick: () => {
|
|
315
|
+
self.setColorScheme({ type: 'orientation' });
|
|
316
|
+
},
|
|
295
317
|
},
|
|
296
318
|
{
|
|
297
319
|
label: 'Insert size gradient',
|
|
298
|
-
onClick: () =>
|
|
320
|
+
onClick: () => {
|
|
321
|
+
self.setColorScheme({ type: 'gradient' });
|
|
322
|
+
},
|
|
299
323
|
},
|
|
300
324
|
],
|
|
301
325
|
},
|
|
@@ -34,7 +34,10 @@ const Cloud = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
34
34
|
const view = (0, util_1.getContainingView)(model);
|
|
35
35
|
const width = Math.round(view.dynamicBlocks.totalWidthPx);
|
|
36
36
|
const height = model.height;
|
|
37
|
-
|
|
37
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies:
|
|
38
|
+
const cb = (0, react_1.useCallback)((ref) => {
|
|
39
|
+
model.setRef(ref);
|
|
40
|
+
},
|
|
38
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
42
|
[model, width, height]);
|
|
40
43
|
// note: the position absolute below avoids scrollbar from appearing on track
|
|
@@ -79,13 +79,13 @@ function getPairedColor({ type, v0, v1, stats, }) {
|
|
|
79
79
|
if (type === 'insertSizeAndOrientation') {
|
|
80
80
|
return (0, color_1.getPairedInsertSizeAndOrientationColor)(v0, v1, stats);
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
if (type === 'orientation') {
|
|
83
83
|
return (0, color_1.getPairedOrientationColor)(v0);
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
if (type === 'insertSize') {
|
|
86
86
|
return (0, color_1.getPairedInsertSizeColor)(v0, v1, stats);
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
if (type === 'gradient') {
|
|
89
89
|
const s = Math.min(v0.start, v1.start);
|
|
90
90
|
const e = Math.max(v0.end, v1.end);
|
|
91
91
|
return [
|
|
@@ -29,7 +29,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
29
29
|
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
30
30
|
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
31
31
|
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
32
|
-
value: import("mobx-state-tree").ISimpleType<string
|
|
32
|
+
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
33
33
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
34
34
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
35
35
|
colorBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
@@ -53,9 +53,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
53
53
|
error: unknown;
|
|
54
54
|
message: string | undefined;
|
|
55
55
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
56
|
-
id: import("mobx-state-tree"
|
|
57
|
-
* #property
|
|
58
|
-
*/).IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
56
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
59
57
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
60
58
|
rpcDriverName: import("mobx-state-tree" /**
|
|
61
59
|
* #property
|
|
@@ -65,7 +63,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
65
63
|
error: unknown;
|
|
66
64
|
message: string | undefined;
|
|
67
65
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
68
|
-
onHorizontalScroll?:
|
|
66
|
+
onHorizontalScroll?: () => void;
|
|
69
67
|
blockState?: Record<string, any>;
|
|
70
68
|
}>;
|
|
71
69
|
readonly DisplayBlurb: React.FC<{
|
|
@@ -85,9 +83,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
85
83
|
rendererTypeName: string;
|
|
86
84
|
error: unknown;
|
|
87
85
|
message: string | undefined;
|
|
88
|
-
}, import("mobx-state-tree"
|
|
89
|
-
* #action
|
|
90
|
-
*/)._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
86
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
91
87
|
}> | null;
|
|
92
88
|
readonly adapterConfig: any;
|
|
93
89
|
readonly parentTrack: any;
|
|
@@ -38,7 +38,7 @@ const ClearAll_1 = __importDefault(require("@mui/icons-material/ClearAll"));
|
|
|
38
38
|
// locals
|
|
39
39
|
const shared_1 = require("../shared");
|
|
40
40
|
// async
|
|
41
|
-
const FilterByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/
|
|
41
|
+
const FilterByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/FilterByTagDialog'))));
|
|
42
42
|
/**
|
|
43
43
|
* #stateModel LinearReadCloudDisplay
|
|
44
44
|
* it is not a block based track, hence not BaseLinearDisplay
|
|
@@ -163,7 +163,9 @@ function stateModelFactory(configSchema) {
|
|
|
163
163
|
label: 'Draw singletons',
|
|
164
164
|
type: 'checkbox',
|
|
165
165
|
checked: self.drawSingletons,
|
|
166
|
-
onClick: () =>
|
|
166
|
+
onClick: () => {
|
|
167
|
+
self.setDrawSingletons(!self.drawSingletons);
|
|
168
|
+
},
|
|
167
169
|
},
|
|
168
170
|
{
|
|
169
171
|
label: 'Filter by',
|
|
@@ -181,19 +183,27 @@ function stateModelFactory(configSchema) {
|
|
|
181
183
|
subMenu: [
|
|
182
184
|
{
|
|
183
185
|
label: 'Insert size ± 3σ and orientation',
|
|
184
|
-
onClick: () =>
|
|
186
|
+
onClick: () => {
|
|
187
|
+
self.setColorScheme({ type: 'insertSizeAndOrientation' });
|
|
188
|
+
},
|
|
185
189
|
},
|
|
186
190
|
{
|
|
187
191
|
label: 'Insert size ± 3σ',
|
|
188
|
-
onClick: () =>
|
|
192
|
+
onClick: () => {
|
|
193
|
+
self.setColorScheme({ type: 'insertSize' });
|
|
194
|
+
},
|
|
189
195
|
},
|
|
190
196
|
{
|
|
191
197
|
label: 'Orientation',
|
|
192
|
-
onClick: () =>
|
|
198
|
+
onClick: () => {
|
|
199
|
+
self.setColorScheme({ type: 'orientation' });
|
|
200
|
+
},
|
|
193
201
|
},
|
|
194
202
|
{
|
|
195
203
|
label: 'Insert size gradient',
|
|
196
|
-
onClick: () =>
|
|
204
|
+
onClick: () => {
|
|
205
|
+
self.setColorScheme({ type: 'gradient' });
|
|
206
|
+
},
|
|
197
207
|
},
|
|
198
208
|
],
|
|
199
209
|
},
|
|
@@ -55,7 +55,7 @@ const TooltipContents = react_1.default.forwardRef(function TooltipContents2({ f
|
|
|
55
55
|
score['1'] ? `${score['1']}(+)` : ''),
|
|
56
56
|
react_1.default.createElement("td", null, key)))))))));
|
|
57
57
|
});
|
|
58
|
-
const SNPCoverageTooltip = (0, mobx_react_1.observer)((props)
|
|
58
|
+
const SNPCoverageTooltip = (0, mobx_react_1.observer)(function (props) {
|
|
59
59
|
const { model } = props;
|
|
60
60
|
const { featureUnderMouse: feat } = model;
|
|
61
61
|
return feat && feat.get('type') === 'skip' ? null : (react_1.default.createElement(plugin_wiggle_1.Tooltip, { TooltipContents: TooltipContents, ...props }));
|
|
@@ -142,7 +142,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
142
142
|
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
143
143
|
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
144
144
|
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
145
|
-
value: import("mobx-state-tree").ISimpleType<string
|
|
145
|
+
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
146
146
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
147
147
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
148
148
|
/**
|
|
@@ -164,7 +164,7 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
164
164
|
// must use getSnapshot because otherwise changes to e.g. just the
|
|
165
165
|
// colorBy.type are not read
|
|
166
166
|
colorBy: colorBy ? (0, mobx_state_tree_1.getSnapshot)(colorBy) : undefined,
|
|
167
|
-
filterBy:
|
|
167
|
+
filterBy: (0, mobx_state_tree_1.getSnapshot)(filterBy),
|
|
168
168
|
};
|
|
169
169
|
},
|
|
170
170
|
};
|
|
@@ -207,7 +207,11 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
207
207
|
const { colorBy } = self;
|
|
208
208
|
if ((colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications') {
|
|
209
209
|
const adapter = (0, configuration_1.getConf)(self.parentTrack, 'adapter');
|
|
210
|
-
const vals = await (0, shared_1.getUniqueModificationValues)(
|
|
210
|
+
const vals = await (0, shared_1.getUniqueModificationValues)({
|
|
211
|
+
self,
|
|
212
|
+
adapterConfig: adapter,
|
|
213
|
+
blocks: staticBlocks,
|
|
214
|
+
});
|
|
211
215
|
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
212
216
|
self.updateModificationColorMap(vals);
|
|
213
217
|
self.setModificationsReady(true);
|
|
@@ -266,19 +270,25 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
266
270
|
label: 'Draw insertion/clipping indicators',
|
|
267
271
|
type: 'checkbox',
|
|
268
272
|
checked: self.drawIndicatorsSetting,
|
|
269
|
-
onClick: () =>
|
|
273
|
+
onClick: () => {
|
|
274
|
+
self.toggleDrawIndicators();
|
|
275
|
+
},
|
|
270
276
|
},
|
|
271
277
|
{
|
|
272
278
|
label: 'Draw insertion/clipping counts',
|
|
273
279
|
type: 'checkbox',
|
|
274
280
|
checked: self.drawInterbaseCountsSetting,
|
|
275
|
-
onClick: () =>
|
|
281
|
+
onClick: () => {
|
|
282
|
+
self.toggleDrawInterbaseCounts();
|
|
283
|
+
},
|
|
276
284
|
},
|
|
277
285
|
{
|
|
278
286
|
label: 'Draw arcs',
|
|
279
287
|
type: 'checkbox',
|
|
280
288
|
checked: self.drawArcsSetting,
|
|
281
|
-
onClick: () =>
|
|
289
|
+
onClick: () => {
|
|
290
|
+
self.toggleDrawArcs();
|
|
291
|
+
},
|
|
282
292
|
},
|
|
283
293
|
];
|
|
284
294
|
},
|
|
@@ -286,7 +286,7 @@ function getModificationPositions(mm, fseq, fstrand) {
|
|
|
286
286
|
for (const mod of mods) {
|
|
287
287
|
const [basemod, ...skips] = mod.split(',');
|
|
288
288
|
// regexes based on parse_mm.pl from hts-specs
|
|
289
|
-
const matches =
|
|
289
|
+
const matches = modificationRegex.exec(basemod);
|
|
290
290
|
if (!matches) {
|
|
291
291
|
throw new Error('bad format for MM tag');
|
|
292
292
|
}
|
|
@@ -333,8 +333,8 @@ function getModificationTypes(mm) {
|
|
|
333
333
|
.split(';')
|
|
334
334
|
.filter(mod => !!mod)
|
|
335
335
|
.flatMap(mod => {
|
|
336
|
-
const
|
|
337
|
-
const matches =
|
|
336
|
+
const basemod = mod.split(',')[0];
|
|
337
|
+
const matches = modificationRegex.exec(basemod);
|
|
338
338
|
if (!matches) {
|
|
339
339
|
throw new Error(`bad format for MM tag: ${mm}`);
|
|
340
340
|
}
|
|
@@ -360,9 +360,7 @@ function getOrientedCigar(flip, cigar) {
|
|
|
360
360
|
}
|
|
361
361
|
return ret;
|
|
362
362
|
}
|
|
363
|
-
|
|
364
|
-
return cigar;
|
|
365
|
-
}
|
|
363
|
+
return cigar;
|
|
366
364
|
}
|
|
367
365
|
function getOrientedMismatches(flip, cigar) {
|
|
368
366
|
const p = parseCigar(cigar);
|
|
@@ -406,8 +404,8 @@ function getLengthSansClipping(cigar) {
|
|
|
406
404
|
}
|
|
407
405
|
function getClip(cigar, strand) {
|
|
408
406
|
return strand === -1
|
|
409
|
-
? +(
|
|
410
|
-
: +(
|
|
407
|
+
? +(startClip.exec(cigar) || [])[1] || 0
|
|
408
|
+
: +(endClip.exec(cigar) || [])[1] || 0;
|
|
411
409
|
}
|
|
412
410
|
function getTag(f, tag) {
|
|
413
411
|
const tags = f.get('tags');
|
|
@@ -421,7 +419,11 @@ function getTag(f, tag) {
|
|
|
421
419
|
// usage can keep this false
|
|
422
420
|
function featurizeSA(SA, id, strand, readName, normalize) {
|
|
423
421
|
return ((SA === null || SA === void 0 ? void 0 : SA.split(';').filter(aln => !!aln).map((aln, index) => {
|
|
424
|
-
const
|
|
422
|
+
const ret = aln.split(',');
|
|
423
|
+
const saRef = ret[0];
|
|
424
|
+
const saStart = ret[1];
|
|
425
|
+
const saStrand = ret[2];
|
|
426
|
+
const saCigar = ret[3];
|
|
425
427
|
const saLengthOnRef = getLengthOnRef(saCigar);
|
|
426
428
|
const saLength = getLength(saCigar);
|
|
427
429
|
const saLengthSansClipping = getLengthSansClipping(saCigar);
|
package/dist/PileupRPC/base.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export default abstract class PileupBaseRPC extends RpcMethodType {
|
|
|
4
4
|
serializeArguments(args: RenderArgs & {
|
|
5
5
|
signal?: AbortSignal;
|
|
6
6
|
statusCallback?: (arg: string) => void;
|
|
7
|
-
}, rpcDriver: string): Promise<
|
|
7
|
+
}, rpcDriver: string): Promise<Record<string, unknown>>;
|
|
8
8
|
}
|
|
@@ -4,7 +4,7 @@ import PileupBaseRPC from '../base';
|
|
|
4
4
|
export default class PileupGetGlobalValueForTag extends PileupBaseRPC {
|
|
5
5
|
name: string;
|
|
6
6
|
execute(args: {
|
|
7
|
-
adapterConfig:
|
|
7
|
+
adapterConfig: Record<string, unknown>;
|
|
8
8
|
signal?: RemoteAbortSignal;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
regions: Region[];
|
|
@@ -4,14 +4,14 @@ import PileupBaseRPC from '../base';
|
|
|
4
4
|
export default class PileupGetReducedFeatures extends PileupBaseRPC {
|
|
5
5
|
name: string;
|
|
6
6
|
execute(args: {
|
|
7
|
-
adapterConfig:
|
|
7
|
+
adapterConfig: Record<string, unknown>;
|
|
8
8
|
signal?: RemoteAbortSignal;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
regions: Region[];
|
|
11
11
|
sessionId: string;
|
|
12
12
|
tag: string;
|
|
13
13
|
}, rpcDriver: string): Promise<{
|
|
14
|
-
chains:
|
|
14
|
+
chains: {
|
|
15
15
|
id: string;
|
|
16
16
|
refName: string;
|
|
17
17
|
name: any;
|
|
@@ -25,7 +25,7 @@ export default class PileupGetReducedFeatures extends PileupBaseRPC {
|
|
|
25
25
|
next_pos: any;
|
|
26
26
|
clipPos: any;
|
|
27
27
|
SA: any;
|
|
28
|
-
}[]
|
|
28
|
+
}[][];
|
|
29
29
|
stats: {
|
|
30
30
|
upper: number;
|
|
31
31
|
lower: number;
|
|
@@ -4,7 +4,7 @@ import PileupBaseRPC from '../base';
|
|
|
4
4
|
export default class PileupGetVisibleModifications extends PileupBaseRPC {
|
|
5
5
|
name: string;
|
|
6
6
|
execute(args: {
|
|
7
|
-
adapterConfig:
|
|
7
|
+
adapterConfig: Record<string, unknown>;
|
|
8
8
|
signal?: RemoteAbortSignal;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
regions: Region[];
|
|
@@ -15,7 +15,7 @@ type MyMultiLayout = MultiLayout<GranularRectLayout<unknown>, unknown>;
|
|
|
15
15
|
interface CachedPileupLayout {
|
|
16
16
|
layout: MyMultiLayout;
|
|
17
17
|
config: AnyConfigurationModel;
|
|
18
|
-
filters
|
|
18
|
+
filters?: SerializableFilterChain;
|
|
19
19
|
filterBy: unknown;
|
|
20
20
|
sortedBy: unknown;
|
|
21
21
|
showSoftClip: boolean;
|
|
@@ -7,8 +7,9 @@ exports.PileupLayoutSession = void 0;
|
|
|
7
7
|
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
8
8
|
const BoxRendererType_1 = require("@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType");
|
|
9
9
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
10
|
-
//
|
|
11
|
-
//
|
|
10
|
+
// The pileup layout session adds
|
|
11
|
+
// - sorting and revealing soft clip changes the layout of pileup renderer
|
|
12
|
+
// - extra conditions to see if cached layout is valid
|
|
12
13
|
class PileupLayoutSession extends BoxRendererType_1.LayoutSession {
|
|
13
14
|
constructor(args) {
|
|
14
15
|
super(args);
|
|
@@ -8,7 +8,7 @@ export interface RenderArgsDeserialized extends BoxRenderArgsDeserialized {
|
|
|
8
8
|
tag?: string;
|
|
9
9
|
};
|
|
10
10
|
colorTagMap?: Record<string, string>;
|
|
11
|
-
modificationTagMap?: Record<string, string
|
|
11
|
+
modificationTagMap?: Record<string, string>;
|
|
12
12
|
sortedBy?: {
|
|
13
13
|
type: string;
|
|
14
14
|
pos: number;
|
|
@@ -47,7 +47,7 @@ class PileupRenderer extends BoxRendererType_1.default {
|
|
|
47
47
|
}
|
|
48
48
|
const pm = this.pluginManager;
|
|
49
49
|
const { dataAdapter } = await (0, dataAdapterCache_1.getAdapter)(pm, sessionId, sequenceAdapter);
|
|
50
|
-
const
|
|
50
|
+
const region = regions[0];
|
|
51
51
|
return (0, util_2.fetchSequence)(region, dataAdapter);
|
|
52
52
|
}
|
|
53
53
|
getExpandedRegion(region, renderArgs) {
|
|
@@ -67,7 +67,7 @@ class PileupRenderer extends BoxRendererType_1.default {
|
|
|
67
67
|
const features = await this.getFeatures(renderProps);
|
|
68
68
|
const layout = this.createLayoutInWorker(renderProps);
|
|
69
69
|
const { regions, bpPerPx } = renderProps;
|
|
70
|
-
const
|
|
70
|
+
const region = regions[0];
|
|
71
71
|
const layoutRecords = (0, layoutFeatures_1.layoutFeats)({
|
|
72
72
|
...renderProps,
|
|
73
73
|
features,
|
|
@@ -81,17 +81,20 @@ class PileupRenderer extends BoxRendererType_1.default {
|
|
|
81
81
|
const width = (region.end - region.start) / bpPerPx;
|
|
82
82
|
const height = Math.max(layout.getTotalHeight(), 1);
|
|
83
83
|
const { makeImageData } = await Promise.resolve().then(() => __importStar(require('./makeImageData')));
|
|
84
|
-
const res = await (0, util_1.renderToAbstractCanvas)(width, height, renderProps, ctx =>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
84
|
+
const res = await (0, util_1.renderToAbstractCanvas)(width, height, renderProps, ctx => {
|
|
85
|
+
makeImageData({
|
|
86
|
+
ctx,
|
|
87
|
+
layoutRecords: layoutRecords.filter(util_1.notEmpty),
|
|
88
|
+
canvasWidth: width,
|
|
89
|
+
renderArgs: {
|
|
90
|
+
...renderProps,
|
|
91
|
+
layout,
|
|
92
|
+
features,
|
|
93
|
+
regionSequence,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
return undefined;
|
|
97
|
+
});
|
|
95
98
|
const results = await super.render({
|
|
96
99
|
...renderProps,
|
|
97
100
|
...res,
|
|
@@ -46,21 +46,19 @@ function getStranded(feature) {
|
|
|
46
46
|
return strand * flipper === 1 ? 'color_rev_strand' : 'color_fwd_strand';
|
|
47
47
|
}
|
|
48
48
|
// mate missing, separate color
|
|
49
|
-
|
|
49
|
+
if (flags & 8) {
|
|
50
50
|
return strand * flipper === 1
|
|
51
51
|
? 'color_rev_missing_mate'
|
|
52
52
|
: 'color_fwd_missing_mate';
|
|
53
53
|
}
|
|
54
54
|
// same chrom without proper pairing gets separate color
|
|
55
|
-
|
|
55
|
+
if (feature.get('refName') === feature.get('next_ref')) {
|
|
56
56
|
return strand * flipper === 1
|
|
57
57
|
? 'color_rev_strand_not_proper'
|
|
58
58
|
: 'color_fwd_strand_not_proper';
|
|
59
59
|
}
|
|
60
60
|
// abberant chrom
|
|
61
|
-
|
|
62
|
-
return strand === 1 ? 'color_fwd_diff_chr' : 'color_rev_diff_chr';
|
|
63
|
-
}
|
|
61
|
+
return strand === 1 ? 'color_fwd_diff_chr' : 'color_rev_diff_chr';
|
|
64
62
|
}
|
|
65
63
|
return 'color_unknown';
|
|
66
64
|
}
|
|
@@ -3,7 +3,7 @@ import { Region } from '@jbrowse/core/util/types';
|
|
|
3
3
|
import type { BaseLinearDisplayModel } from '@jbrowse/plugin-linear-genome-view';
|
|
4
4
|
declare const PileupRendering: (props: {
|
|
5
5
|
blockKey: string;
|
|
6
|
-
displayModel
|
|
6
|
+
displayModel?: BaseLinearDisplayModel;
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
regions: Region[];
|