@jbrowse/plugin-wiggle 2.11.1 → 2.12.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/LinePlotRenderer/LinePlotRenderer.d.ts +2 -1
- package/dist/LinePlotRenderer/LinePlotRenderer.js +6 -1
- package/dist/LinearWiggleDisplay/components/SetColorDialog.js +2 -2
- package/dist/LinearWiggleDisplay/models/configSchema.d.ts +8 -1
- package/dist/LinearWiggleDisplay/models/model.d.ts +6 -0
- package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.js +31 -7
- package/dist/MultiLinearWiggleDisplay/components/SourcesGrid.js +9 -14
- package/dist/MultiLinearWiggleDisplay/models/configSchema.d.ts +8 -1
- package/dist/MultiLinearWiggleDisplay/models/model.d.ts +9 -1
- package/dist/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +4 -1
- package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +1 -1
- package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +2 -5
- package/dist/index.d.ts +12 -0
- package/dist/shared/configShared.d.ts +8 -1
- package/dist/shared/modelShared.d.ts +25 -10
- package/dist/util.d.ts +1 -0
- package/esm/LinePlotRenderer/LinePlotRenderer.d.ts +2 -1
- package/esm/LinePlotRenderer/LinePlotRenderer.js +6 -1
- package/esm/LinearWiggleDisplay/components/SetColorDialog.js +2 -2
- package/esm/LinearWiggleDisplay/models/configSchema.d.ts +8 -1
- package/esm/LinearWiggleDisplay/models/model.d.ts +6 -0
- package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.js +8 -7
- package/esm/MultiLinearWiggleDisplay/components/SourcesGrid.js +9 -14
- package/esm/MultiLinearWiggleDisplay/models/configSchema.d.ts +8 -1
- package/esm/MultiLinearWiggleDisplay/models/model.d.ts +9 -1
- package/esm/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +4 -1
- package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +1 -1
- package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +2 -5
- package/esm/index.d.ts +12 -0
- package/esm/shared/configShared.d.ts +8 -1
- package/esm/shared/modelShared.d.ts +25 -10
- package/esm/util.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Feature } from '@jbrowse/core/util';
|
|
1
2
|
import WiggleBaseRenderer, { RenderArgsDeserializedWithFeatures } from '../WiggleBaseRenderer';
|
|
2
3
|
export default class LinePlotRenderer extends WiggleBaseRenderer {
|
|
3
4
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<{
|
|
4
|
-
reducedFeatures:
|
|
5
|
+
reducedFeatures: Feature[];
|
|
5
6
|
}>;
|
|
6
7
|
}
|
|
@@ -3,15 +3,20 @@ 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
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
7
|
const WiggleBaseRenderer_1 = __importDefault(require("../WiggleBaseRenderer"));
|
|
7
8
|
const util_1 = require("../util");
|
|
8
9
|
const drawLine_1 = require("../drawLine");
|
|
9
10
|
class LinePlotRenderer extends WiggleBaseRenderer_1.default {
|
|
10
11
|
async draw(ctx, props) {
|
|
12
|
+
const { config } = props;
|
|
13
|
+
const c = (0, configuration_1.readConfObject)(config, 'color');
|
|
11
14
|
return (0, drawLine_1.drawLine)(ctx, {
|
|
12
15
|
...props,
|
|
13
16
|
offset: util_1.YSCALEBAR_LABEL_OFFSET,
|
|
14
|
-
colorCallback:
|
|
17
|
+
colorCallback: c === '#f0f'
|
|
18
|
+
? () => 'grey'
|
|
19
|
+
: (feature) => (0, configuration_1.readConfObject)(config, 'color', { feature }),
|
|
15
20
|
});
|
|
16
21
|
}
|
|
17
22
|
}
|
|
@@ -33,8 +33,8 @@ const SetColorDialog = (0, mobx_react_1.observer)(function SetColorDialog({ mode
|
|
|
33
33
|
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, title: "Set color" },
|
|
34
34
|
react_1.default.createElement(material_1.DialogContent, null,
|
|
35
35
|
react_1.default.createElement(material_1.Typography, null, "Select either an overall color, or the positive/negative colors. Note that density renderers only work properly with positive/negative colors"),
|
|
36
|
-
react_1.default.createElement(material_1.FormControlLabel, { checked: !posneg, onClick: () => setPosNeg(false), control: react_1.default.createElement(material_1.Radio, null), label:
|
|
37
|
-
react_1.default.createElement(material_1.FormControlLabel, { checked: posneg, onClick: () => setPosNeg(true), control: react_1.default.createElement(material_1.Radio, null), label:
|
|
36
|
+
react_1.default.createElement(material_1.FormControlLabel, { checked: !posneg, onClick: () => setPosNeg(false), control: react_1.default.createElement(material_1.Radio, null), label: "Overall color" }),
|
|
37
|
+
react_1.default.createElement(material_1.FormControlLabel, { checked: posneg, onClick: () => setPosNeg(true), control: react_1.default.createElement(material_1.Radio, null), label: "Positive/negative color" }),
|
|
38
38
|
posneg ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
39
39
|
react_1.default.createElement(material_1.Typography, null, "Positive color"),
|
|
40
40
|
react_1.default.createElement(ColorPicker_1.ColorPicker, { color: model.posColor || 'black', onChange: event => {
|
|
@@ -69,7 +69,9 @@ export default function WiggleConfigFactory(pluginManager: PluginManager): impor
|
|
|
69
69
|
type: string;
|
|
70
70
|
defaultValue: number;
|
|
71
71
|
description: string;
|
|
72
|
-
};
|
|
72
|
+
}; /**
|
|
73
|
+
* #slot
|
|
74
|
+
*/
|
|
73
75
|
height: {
|
|
74
76
|
type: string;
|
|
75
77
|
defaultValue: number;
|
|
@@ -81,4 +83,9 @@ export default function WiggleConfigFactory(pluginManager: PluginManager): impor
|
|
|
81
83
|
defaultValue: string;
|
|
82
84
|
contextVariable: string[];
|
|
83
85
|
};
|
|
86
|
+
jexlFilters: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
defaultValue: never[];
|
|
90
|
+
};
|
|
84
91
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>;
|
|
@@ -95,6 +95,11 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
95
95
|
defaultValue: string;
|
|
96
96
|
contextVariable: string[];
|
|
97
97
|
};
|
|
98
|
+
jexlFilters: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
defaultValue: never[];
|
|
102
|
+
};
|
|
98
103
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
99
104
|
} & {
|
|
100
105
|
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -235,6 +240,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
235
240
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
236
241
|
deleteBlock(key: string): void;
|
|
237
242
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
243
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
238
244
|
clearFeatureSelection(): void;
|
|
239
245
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
240
246
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -1,9 +1,32 @@
|
|
|
1
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
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 =
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
7
30
|
const material_1 = require("@mui/material");
|
|
8
31
|
const mobx_react_1 = require("mobx-react");
|
|
9
32
|
const mui_1 = require("tss-react/mui");
|
|
@@ -18,18 +41,19 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
18
41
|
color: theme.palette.grey[500],
|
|
19
42
|
},
|
|
20
43
|
}));
|
|
21
|
-
// draggable dialog demo https://mui.com/material-ui/react-dialog/#draggable-dialog
|
|
22
44
|
function PaperComponent(props) {
|
|
23
|
-
|
|
24
|
-
|
|
45
|
+
const ref = (0, react_1.useRef)(null);
|
|
46
|
+
return (react_1.default.createElement(react_draggable_1.default, { nodeRef: ref, cancel: '[class*="MuiDialogContent-root"]',
|
|
47
|
+
// @ts-expect-error
|
|
48
|
+
onStart: arg => { var _a, _b; return (_b = (_a = arg.target) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.includes('MuiDialogTitle'); } },
|
|
49
|
+
react_1.default.createElement(material_1.Paper, { ref: ref, ...props })));
|
|
25
50
|
}
|
|
26
51
|
const DraggableDialog = (0, mobx_react_1.observer)(function DraggableDialog(props) {
|
|
27
52
|
const { classes } = useStyles();
|
|
28
53
|
const { title, children, onClose } = props;
|
|
29
|
-
return (react_1.default.createElement(material_1.Dialog, { ...props, PaperComponent: PaperComponent,
|
|
30
|
-
},
|
|
54
|
+
return (react_1.default.createElement(material_1.Dialog, { ...props, PaperComponent: PaperComponent },
|
|
31
55
|
react_1.default.createElement(material_1.ScopedCssBaseline, null,
|
|
32
|
-
react_1.default.createElement(material_1.DialogTitle, { style: { cursor: 'move' }
|
|
56
|
+
react_1.default.createElement(material_1.DialogTitle, { style: { cursor: 'move' } },
|
|
33
57
|
title,
|
|
34
58
|
onClose ? (react_1.default.createElement(material_1.IconButton, { className: classes.closeButton, onClick: () => {
|
|
35
59
|
// @ts-expect-error
|
|
@@ -31,15 +31,15 @@ const material_1 = require("@mui/material");
|
|
|
31
31
|
const util_1 = require("@jbrowse/core/util");
|
|
32
32
|
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
33
33
|
const mui_1 = require("tss-react/mui");
|
|
34
|
-
// locals
|
|
35
34
|
const ColorPicker_1 = __importStar(require("@jbrowse/core/ui/ColorPicker"));
|
|
35
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
36
|
+
// locals
|
|
36
37
|
const util_2 = require("./util");
|
|
37
38
|
// icons
|
|
38
39
|
const KeyboardDoubleArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowUp"));
|
|
39
40
|
const KeyboardDoubleArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowDown"));
|
|
40
41
|
const KeyboardArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
41
42
|
const KeyboardArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardArrowUp"));
|
|
42
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
43
43
|
const useStyles = (0, mui_1.makeStyles)()({
|
|
44
44
|
cell: {
|
|
45
45
|
whiteSpace: 'nowrap',
|
|
@@ -51,7 +51,6 @@ function SourcesGrid({ rows, onChange, showTips, }) {
|
|
|
51
51
|
const { classes } = useStyles();
|
|
52
52
|
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
53
53
|
const [selected, setSelected] = (0, react_1.useState)([]);
|
|
54
|
-
// @ts-expect-error
|
|
55
54
|
const { name: _name, color: _color, baseUri: _baseUri, ...rest } = rows[0];
|
|
56
55
|
const [widgetColor, setWidgetColor] = (0, react_1.useState)('blue');
|
|
57
56
|
const [currSort, setCurrSort] = (0, react_1.useState)({
|
|
@@ -100,33 +99,29 @@ function SourcesGrid({ rows, onChange, showTips, }) {
|
|
|
100
99
|
},
|
|
101
100
|
{
|
|
102
101
|
field: 'name',
|
|
103
|
-
sortingOrder: [null],
|
|
104
102
|
headerName: 'Name',
|
|
105
103
|
width: (0, util_1.measureGridWidth)(rows.map(r => r.name)),
|
|
106
104
|
},
|
|
107
105
|
...Object.keys(rest).map(val => ({
|
|
108
106
|
field: val,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return (react_1.default.createElement("div", { className: classes.cell },
|
|
113
|
-
react_1.default.createElement(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value) })));
|
|
114
|
-
},
|
|
115
|
-
// @ts-ignore
|
|
116
|
-
width: (0, util_1.measureGridWidth)(rows.map(r => r[val])),
|
|
107
|
+
renderCell: ({ value }) => (react_1.default.createElement("div", { className: classes.cell },
|
|
108
|
+
react_1.default.createElement(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value) }))),
|
|
109
|
+
width: (0, util_1.measureGridWidth)(rows.map(r => `${r[val]}`)),
|
|
117
110
|
})),
|
|
118
111
|
], sortModel: [
|
|
119
112
|
/* we control the sort as a controlled component using onSortModelChange */
|
|
120
113
|
], onSortModelChange: args => {
|
|
121
114
|
const sort = args[0];
|
|
115
|
+
// this idx%2 flip flops the sorting order, we could inspect args
|
|
116
|
+
// for sort direction asc or desc but this is just a simplified
|
|
117
|
+
// thing since we are controlling sort instead of the default data
|
|
118
|
+
// grid sort anyways
|
|
122
119
|
const idx = (currSort.idx + 1) % 2;
|
|
123
120
|
const field = (sort === null || sort === void 0 ? void 0 : sort.field) || currSort.field;
|
|
124
121
|
setCurrSort({ idx, field });
|
|
125
122
|
onChange(field
|
|
126
123
|
? [...rows].sort((a, b) => {
|
|
127
|
-
// @ts-expect-error
|
|
128
124
|
const aa = (0, util_1.getStr)(a[field]);
|
|
129
|
-
// @ts-expect-error
|
|
130
125
|
const bb = (0, util_1.getStr)(b[field]);
|
|
131
126
|
return idx === 1
|
|
132
127
|
? aa.localeCompare(bb)
|
|
@@ -78,11 +78,18 @@ export default function WiggleConfigFactory(pluginManager: PluginManager): impor
|
|
|
78
78
|
type: string;
|
|
79
79
|
defaultValue: number;
|
|
80
80
|
description: string;
|
|
81
|
-
};
|
|
81
|
+
}; /**
|
|
82
|
+
* #slot
|
|
83
|
+
*/
|
|
82
84
|
mouseover: {
|
|
83
85
|
type: string;
|
|
84
86
|
description: string;
|
|
85
87
|
defaultValue: string;
|
|
86
88
|
contextVariable: string[];
|
|
87
89
|
};
|
|
90
|
+
jexlFilters: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
defaultValue: never[];
|
|
94
|
+
};
|
|
88
95
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>;
|
|
@@ -101,7 +101,14 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
101
101
|
defaultValue: string;
|
|
102
102
|
contextVariable: string[];
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
jexlFilters: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
defaultValue: never[];
|
|
108
|
+
};
|
|
109
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>; /**
|
|
110
|
+
* #action
|
|
111
|
+
*/
|
|
105
112
|
} & {
|
|
106
113
|
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
107
114
|
resolution: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -249,6 +256,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
249
256
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
250
257
|
deleteBlock(key: string): void;
|
|
251
258
|
selectFeature(feature: Feature): void;
|
|
259
|
+
navToFeature(feature: Feature): void;
|
|
252
260
|
clearFeatureSelection(): void;
|
|
253
261
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
254
262
|
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
@@ -80,7 +80,10 @@ function MultiWiggleWidget({ model }) {
|
|
|
80
80
|
bigWigs = JSON.parse(val);
|
|
81
81
|
}
|
|
82
82
|
catch (e) {
|
|
83
|
-
bigWigs = val
|
|
83
|
+
bigWigs = val
|
|
84
|
+
.split(/\n|\r\n|\r/)
|
|
85
|
+
.map(f => f.trim())
|
|
86
|
+
.filter(f => !!f);
|
|
84
87
|
}
|
|
85
88
|
const obj = typeof bigWigs[0] === 'string'
|
|
86
89
|
? { bigWigs }
|
|
@@ -16,5 +16,5 @@ export declare class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType
|
|
|
16
16
|
headers?: Record<string, string>;
|
|
17
17
|
regions: Region[];
|
|
18
18
|
bpPerPx: number;
|
|
19
|
-
}, rpcDriverClassName: string): Promise<
|
|
19
|
+
}, rpcDriverClassName: string): Promise<any>;
|
|
20
20
|
}
|
|
@@ -8,7 +8,6 @@ const RpcMethodType_1 = __importDefault(require("@jbrowse/core/pluggableElementT
|
|
|
8
8
|
const serializableFilterChain_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain"));
|
|
9
9
|
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
10
10
|
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
12
11
|
class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType_1.default {
|
|
13
12
|
constructor() {
|
|
14
13
|
super(...arguments);
|
|
@@ -44,10 +43,8 @@ class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType_1.default {
|
|
|
44
43
|
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
45
44
|
const { regions, adapterConfig, sessionId } = deserializedArgs;
|
|
46
45
|
const { dataAdapter } = await (0, dataAdapterCache_1.getAdapter)(pm, sessionId, adapterConfig);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
throw new Error('Data adapter not found');
|
|
46
|
+
// @ts-expect-error
|
|
47
|
+
return dataAdapter.getMultiRegionQuantitativeStats(regions, deserializedArgs);
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
exports.WiggleGetMultiRegionQuantitativeStats = WiggleGetMultiRegionQuantitativeStats;
|
package/dist/index.d.ts
CHANGED
|
@@ -148,6 +148,11 @@ export default class WigglePlugin extends Plugin {
|
|
|
148
148
|
defaultValue: string;
|
|
149
149
|
contextVariable: string[];
|
|
150
150
|
};
|
|
151
|
+
jexlFilters: {
|
|
152
|
+
type: string;
|
|
153
|
+
description: string;
|
|
154
|
+
defaultValue: never[];
|
|
155
|
+
};
|
|
151
156
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">> & import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
|
|
152
157
|
selectedRendering: string;
|
|
153
158
|
resolution: number;
|
|
@@ -280,6 +285,7 @@ export default class WigglePlugin extends Plugin {
|
|
|
280
285
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
281
286
|
deleteBlock(key: string): void;
|
|
282
287
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
288
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
283
289
|
clearFeatureSelection(): void;
|
|
284
290
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
285
291
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -525,6 +531,11 @@ export default class WigglePlugin extends Plugin {
|
|
|
525
531
|
defaultValue: string;
|
|
526
532
|
contextVariable: string[];
|
|
527
533
|
};
|
|
534
|
+
jexlFilters: {
|
|
535
|
+
type: string;
|
|
536
|
+
description: string;
|
|
537
|
+
defaultValue: never[];
|
|
538
|
+
};
|
|
528
539
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
529
540
|
} & {
|
|
530
541
|
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -658,6 +669,7 @@ export default class WigglePlugin extends Plugin {
|
|
|
658
669
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
659
670
|
deleteBlock(key: string): void;
|
|
660
671
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
672
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
661
673
|
clearFeatureSelection(): void;
|
|
662
674
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
663
675
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -71,7 +71,9 @@ export default function sharedWiggleConfigFactory(): import("@jbrowse/core/confi
|
|
|
71
71
|
fetchSizeLimit: {
|
|
72
72
|
type: string;
|
|
73
73
|
defaultValue: number;
|
|
74
|
-
description: string;
|
|
74
|
+
description: string; /**
|
|
75
|
+
* #slot
|
|
76
|
+
*/
|
|
75
77
|
};
|
|
76
78
|
height: {
|
|
77
79
|
type: string;
|
|
@@ -84,4 +86,9 @@ export default function sharedWiggleConfigFactory(): import("@jbrowse/core/confi
|
|
|
84
86
|
defaultValue: string;
|
|
85
87
|
contextVariable: string[];
|
|
86
88
|
};
|
|
89
|
+
jexlFilters: {
|
|
90
|
+
type: string;
|
|
91
|
+
description: string;
|
|
92
|
+
defaultValue: never[];
|
|
93
|
+
};
|
|
87
94
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
@@ -76,7 +76,9 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
76
76
|
fetchSizeLimit: {
|
|
77
77
|
type: string;
|
|
78
78
|
defaultValue: number;
|
|
79
|
-
description: string;
|
|
79
|
+
description: string; /**
|
|
80
|
+
* #property
|
|
81
|
+
*/
|
|
80
82
|
};
|
|
81
83
|
height: {
|
|
82
84
|
type: string;
|
|
@@ -89,6 +91,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
89
91
|
defaultValue: string;
|
|
90
92
|
contextVariable: string[];
|
|
91
93
|
};
|
|
94
|
+
jexlFilters: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
defaultValue: never[];
|
|
98
|
+
};
|
|
92
99
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
93
100
|
} & {
|
|
94
101
|
/**
|
|
@@ -268,13 +275,15 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
268
275
|
readonly featureUnderMouse: Feature | undefined;
|
|
269
276
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
270
277
|
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* #action
|
|
280
|
+
*/
|
|
271
281
|
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
272
282
|
} & {
|
|
273
283
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
274
284
|
deleteBlock(key: string): void;
|
|
275
|
-
selectFeature(feature: Feature): void;
|
|
276
|
-
|
|
277
|
-
*/
|
|
285
|
+
selectFeature(feature: Feature): void;
|
|
286
|
+
navToFeature(feature: Feature): void;
|
|
278
287
|
clearFeatureSelection(): void;
|
|
279
288
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
280
289
|
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
@@ -283,12 +292,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
283
292
|
} & {
|
|
284
293
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
285
294
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
286
|
-
renderProps(): any;
|
|
287
|
-
* #getter
|
|
288
|
-
*/
|
|
295
|
+
renderProps(): any;
|
|
289
296
|
} & {
|
|
290
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
291
|
-
|
|
297
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
298
|
+
/**
|
|
299
|
+
* #method
|
|
292
300
|
*/
|
|
293
301
|
afterAttach(): void;
|
|
294
302
|
} & {
|
|
@@ -563,7 +571,9 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
563
571
|
fetchSizeLimit: {
|
|
564
572
|
type: string;
|
|
565
573
|
defaultValue: number;
|
|
566
|
-
description: string;
|
|
574
|
+
description: string; /**
|
|
575
|
+
* #property
|
|
576
|
+
*/
|
|
567
577
|
};
|
|
568
578
|
height: {
|
|
569
579
|
type: string;
|
|
@@ -576,6 +586,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
576
586
|
defaultValue: string;
|
|
577
587
|
contextVariable: string[];
|
|
578
588
|
};
|
|
589
|
+
jexlFilters: {
|
|
590
|
+
type: string;
|
|
591
|
+
description: string;
|
|
592
|
+
defaultValue: never[];
|
|
593
|
+
};
|
|
579
594
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
580
595
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
581
596
|
type: string;
|
package/dist/util.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Feature } from '@jbrowse/core/util';
|
|
1
2
|
import WiggleBaseRenderer, { RenderArgsDeserializedWithFeatures } from '../WiggleBaseRenderer';
|
|
2
3
|
export default class LinePlotRenderer extends WiggleBaseRenderer {
|
|
3
4
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<{
|
|
4
|
-
reducedFeatures:
|
|
5
|
+
reducedFeatures: Feature[];
|
|
5
6
|
}>;
|
|
6
7
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
1
2
|
import WiggleBaseRenderer from '../WiggleBaseRenderer';
|
|
2
3
|
import { YSCALEBAR_LABEL_OFFSET } from '../util';
|
|
3
4
|
import { drawLine } from '../drawLine';
|
|
4
5
|
export default class LinePlotRenderer extends WiggleBaseRenderer {
|
|
5
6
|
async draw(ctx, props) {
|
|
7
|
+
const { config } = props;
|
|
8
|
+
const c = readConfObject(config, 'color');
|
|
6
9
|
return drawLine(ctx, {
|
|
7
10
|
...props,
|
|
8
11
|
offset: YSCALEBAR_LABEL_OFFSET,
|
|
9
|
-
colorCallback:
|
|
12
|
+
colorCallback: c === '#f0f'
|
|
13
|
+
? () => 'grey'
|
|
14
|
+
: (feature) => readConfObject(config, 'color', { feature }),
|
|
10
15
|
});
|
|
11
16
|
}
|
|
12
17
|
}
|
|
@@ -8,8 +8,8 @@ const SetColorDialog = observer(function SetColorDialog({ model, handleClose, })
|
|
|
8
8
|
return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Set color" },
|
|
9
9
|
React.createElement(DialogContent, null,
|
|
10
10
|
React.createElement(Typography, null, "Select either an overall color, or the positive/negative colors. Note that density renderers only work properly with positive/negative colors"),
|
|
11
|
-
React.createElement(FormControlLabel, { checked: !posneg, onClick: () => setPosNeg(false), control: React.createElement(Radio, null), label:
|
|
12
|
-
React.createElement(FormControlLabel, { checked: posneg, onClick: () => setPosNeg(true), control: React.createElement(Radio, null), label:
|
|
11
|
+
React.createElement(FormControlLabel, { checked: !posneg, onClick: () => setPosNeg(false), control: React.createElement(Radio, null), label: "Overall color" }),
|
|
12
|
+
React.createElement(FormControlLabel, { checked: posneg, onClick: () => setPosNeg(true), control: React.createElement(Radio, null), label: "Positive/negative color" }),
|
|
13
13
|
posneg ? (React.createElement(React.Fragment, null,
|
|
14
14
|
React.createElement(Typography, null, "Positive color"),
|
|
15
15
|
React.createElement(ColorPicker, { color: model.posColor || 'black', onChange: event => {
|
|
@@ -69,7 +69,9 @@ export default function WiggleConfigFactory(pluginManager: PluginManager): impor
|
|
|
69
69
|
type: string;
|
|
70
70
|
defaultValue: number;
|
|
71
71
|
description: string;
|
|
72
|
-
};
|
|
72
|
+
}; /**
|
|
73
|
+
* #slot
|
|
74
|
+
*/
|
|
73
75
|
height: {
|
|
74
76
|
type: string;
|
|
75
77
|
defaultValue: number;
|
|
@@ -81,4 +83,9 @@ export default function WiggleConfigFactory(pluginManager: PluginManager): impor
|
|
|
81
83
|
defaultValue: string;
|
|
82
84
|
contextVariable: string[];
|
|
83
85
|
};
|
|
86
|
+
jexlFilters: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
defaultValue: never[];
|
|
90
|
+
};
|
|
84
91
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>;
|
|
@@ -95,6 +95,11 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
95
95
|
defaultValue: string;
|
|
96
96
|
contextVariable: string[];
|
|
97
97
|
};
|
|
98
|
+
jexlFilters: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
defaultValue: never[];
|
|
102
|
+
};
|
|
98
103
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
99
104
|
} & {
|
|
100
105
|
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -235,6 +240,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
235
240
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
236
241
|
deleteBlock(key: string): void;
|
|
237
242
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
243
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
238
244
|
clearFeatureSelection(): void;
|
|
239
245
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
240
246
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import { Dialog, DialogTitle, IconButton, Divider, Paper, ScopedCssBaseline, } from '@mui/material';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
@@ -13,18 +13,19 @@ const useStyles = makeStyles()(theme => ({
|
|
|
13
13
|
color: theme.palette.grey[500],
|
|
14
14
|
},
|
|
15
15
|
}));
|
|
16
|
-
// draggable dialog demo https://mui.com/material-ui/react-dialog/#draggable-dialog
|
|
17
16
|
function PaperComponent(props) {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const ref = useRef(null);
|
|
18
|
+
return (React.createElement(Draggable, { nodeRef: ref, cancel: '[class*="MuiDialogContent-root"]',
|
|
19
|
+
// @ts-expect-error
|
|
20
|
+
onStart: arg => { var _a, _b; return (_b = (_a = arg.target) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.includes('MuiDialogTitle'); } },
|
|
21
|
+
React.createElement(Paper, { ref: ref, ...props })));
|
|
20
22
|
}
|
|
21
23
|
const DraggableDialog = observer(function DraggableDialog(props) {
|
|
22
24
|
const { classes } = useStyles();
|
|
23
25
|
const { title, children, onClose } = props;
|
|
24
|
-
return (React.createElement(Dialog, { ...props, PaperComponent: PaperComponent,
|
|
25
|
-
},
|
|
26
|
+
return (React.createElement(Dialog, { ...props, PaperComponent: PaperComponent },
|
|
26
27
|
React.createElement(ScopedCssBaseline, null,
|
|
27
|
-
React.createElement(DialogTitle, { style: { cursor: 'move' }
|
|
28
|
+
React.createElement(DialogTitle, { style: { cursor: 'move' } },
|
|
28
29
|
title,
|
|
29
30
|
onClose ? (React.createElement(IconButton, { className: classes.closeButton, onClick: () => {
|
|
30
31
|
// @ts-expect-error
|
|
@@ -3,15 +3,15 @@ import { Button } from '@mui/material';
|
|
|
3
3
|
import { getStr, measureGridWidth } from '@jbrowse/core/util';
|
|
4
4
|
import { DataGrid } from '@mui/x-data-grid';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
|
-
// locals
|
|
7
6
|
import ColorPicker, { ColorPopover } from '@jbrowse/core/ui/ColorPicker';
|
|
7
|
+
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
8
|
+
// locals
|
|
8
9
|
import { moveUp, moveDown } from './util';
|
|
9
10
|
// icons
|
|
10
11
|
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
11
12
|
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
12
13
|
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
13
14
|
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
14
|
-
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
15
15
|
const useStyles = makeStyles()({
|
|
16
16
|
cell: {
|
|
17
17
|
whiteSpace: 'nowrap',
|
|
@@ -23,7 +23,6 @@ function SourcesGrid({ rows, onChange, showTips, }) {
|
|
|
23
23
|
const { classes } = useStyles();
|
|
24
24
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
25
25
|
const [selected, setSelected] = useState([]);
|
|
26
|
-
// @ts-expect-error
|
|
27
26
|
const { name: _name, color: _color, baseUri: _baseUri, ...rest } = rows[0];
|
|
28
27
|
const [widgetColor, setWidgetColor] = useState('blue');
|
|
29
28
|
const [currSort, setCurrSort] = useState({
|
|
@@ -72,33 +71,29 @@ function SourcesGrid({ rows, onChange, showTips, }) {
|
|
|
72
71
|
},
|
|
73
72
|
{
|
|
74
73
|
field: 'name',
|
|
75
|
-
sortingOrder: [null],
|
|
76
74
|
headerName: 'Name',
|
|
77
75
|
width: measureGridWidth(rows.map(r => r.name)),
|
|
78
76
|
},
|
|
79
77
|
...Object.keys(rest).map(val => ({
|
|
80
78
|
field: val,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return (React.createElement("div", { className: classes.cell },
|
|
85
|
-
React.createElement(SanitizedHTML, { html: getStr(value) })));
|
|
86
|
-
},
|
|
87
|
-
// @ts-ignore
|
|
88
|
-
width: measureGridWidth(rows.map(r => r[val])),
|
|
79
|
+
renderCell: ({ value }) => (React.createElement("div", { className: classes.cell },
|
|
80
|
+
React.createElement(SanitizedHTML, { html: getStr(value) }))),
|
|
81
|
+
width: measureGridWidth(rows.map(r => `${r[val]}`)),
|
|
89
82
|
})),
|
|
90
83
|
], sortModel: [
|
|
91
84
|
/* we control the sort as a controlled component using onSortModelChange */
|
|
92
85
|
], onSortModelChange: args => {
|
|
93
86
|
const sort = args[0];
|
|
87
|
+
// this idx%2 flip flops the sorting order, we could inspect args
|
|
88
|
+
// for sort direction asc or desc but this is just a simplified
|
|
89
|
+
// thing since we are controlling sort instead of the default data
|
|
90
|
+
// grid sort anyways
|
|
94
91
|
const idx = (currSort.idx + 1) % 2;
|
|
95
92
|
const field = (sort === null || sort === void 0 ? void 0 : sort.field) || currSort.field;
|
|
96
93
|
setCurrSort({ idx, field });
|
|
97
94
|
onChange(field
|
|
98
95
|
? [...rows].sort((a, b) => {
|
|
99
|
-
// @ts-expect-error
|
|
100
96
|
const aa = getStr(a[field]);
|
|
101
|
-
// @ts-expect-error
|
|
102
97
|
const bb = getStr(b[field]);
|
|
103
98
|
return idx === 1
|
|
104
99
|
? aa.localeCompare(bb)
|
|
@@ -78,11 +78,18 @@ export default function WiggleConfigFactory(pluginManager: PluginManager): impor
|
|
|
78
78
|
type: string;
|
|
79
79
|
defaultValue: number;
|
|
80
80
|
description: string;
|
|
81
|
-
};
|
|
81
|
+
}; /**
|
|
82
|
+
* #slot
|
|
83
|
+
*/
|
|
82
84
|
mouseover: {
|
|
83
85
|
type: string;
|
|
84
86
|
description: string;
|
|
85
87
|
defaultValue: string;
|
|
86
88
|
contextVariable: string[];
|
|
87
89
|
};
|
|
90
|
+
jexlFilters: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
defaultValue: never[];
|
|
94
|
+
};
|
|
88
95
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>;
|
|
@@ -101,7 +101,14 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
101
101
|
defaultValue: string;
|
|
102
102
|
contextVariable: string[];
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
jexlFilters: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
defaultValue: never[];
|
|
108
|
+
};
|
|
109
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>; /**
|
|
110
|
+
* #action
|
|
111
|
+
*/
|
|
105
112
|
} & {
|
|
106
113
|
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
107
114
|
resolution: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -249,6 +256,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
249
256
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
250
257
|
deleteBlock(key: string): void;
|
|
251
258
|
selectFeature(feature: Feature): void;
|
|
259
|
+
navToFeature(feature: Feature): void;
|
|
252
260
|
clearFeatureSelection(): void;
|
|
253
261
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
254
262
|
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
@@ -55,7 +55,10 @@ export default function MultiWiggleWidget({ model }) {
|
|
|
55
55
|
bigWigs = JSON.parse(val);
|
|
56
56
|
}
|
|
57
57
|
catch (e) {
|
|
58
|
-
bigWigs = val
|
|
58
|
+
bigWigs = val
|
|
59
|
+
.split(/\n|\r\n|\r/)
|
|
60
|
+
.map(f => f.trim())
|
|
61
|
+
.filter(f => !!f);
|
|
59
62
|
}
|
|
60
63
|
const obj = typeof bigWigs[0] === 'string'
|
|
61
64
|
? { bigWigs }
|
|
@@ -16,5 +16,5 @@ export declare class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType
|
|
|
16
16
|
headers?: Record<string, string>;
|
|
17
17
|
regions: Region[];
|
|
18
18
|
bpPerPx: number;
|
|
19
|
-
}, rpcDriverClassName: string): Promise<
|
|
19
|
+
}, rpcDriverClassName: string): Promise<any>;
|
|
20
20
|
}
|
|
@@ -2,7 +2,6 @@ import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
|
2
2
|
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
3
3
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
4
4
|
import { renameRegionsIfNeeded } from '@jbrowse/core/util';
|
|
5
|
-
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
6
5
|
export class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType {
|
|
7
6
|
constructor() {
|
|
8
7
|
super(...arguments);
|
|
@@ -38,9 +37,7 @@ export class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType {
|
|
|
38
37
|
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
39
38
|
const { regions, adapterConfig, sessionId } = deserializedArgs;
|
|
40
39
|
const { dataAdapter } = await getAdapter(pm, sessionId, adapterConfig);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
throw new Error('Data adapter not found');
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
return dataAdapter.getMultiRegionQuantitativeStats(regions, deserializedArgs);
|
|
45
42
|
}
|
|
46
43
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -148,6 +148,11 @@ export default class WigglePlugin extends Plugin {
|
|
|
148
148
|
defaultValue: string;
|
|
149
149
|
contextVariable: string[];
|
|
150
150
|
};
|
|
151
|
+
jexlFilters: {
|
|
152
|
+
type: string;
|
|
153
|
+
description: string;
|
|
154
|
+
defaultValue: never[];
|
|
155
|
+
};
|
|
151
156
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">> & import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
|
|
152
157
|
selectedRendering: string;
|
|
153
158
|
resolution: number;
|
|
@@ -280,6 +285,7 @@ export default class WigglePlugin extends Plugin {
|
|
|
280
285
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
281
286
|
deleteBlock(key: string): void;
|
|
282
287
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
288
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
283
289
|
clearFeatureSelection(): void;
|
|
284
290
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
285
291
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -525,6 +531,11 @@ export default class WigglePlugin extends Plugin {
|
|
|
525
531
|
defaultValue: string;
|
|
526
532
|
contextVariable: string[];
|
|
527
533
|
};
|
|
534
|
+
jexlFilters: {
|
|
535
|
+
type: string;
|
|
536
|
+
description: string;
|
|
537
|
+
defaultValue: never[];
|
|
538
|
+
};
|
|
528
539
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
529
540
|
} & {
|
|
530
541
|
selectedRendering: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -658,6 +669,7 @@ export default class WigglePlugin extends Plugin {
|
|
|
658
669
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
659
670
|
deleteBlock(key: string): void;
|
|
660
671
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
672
|
+
navToFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
661
673
|
clearFeatureSelection(): void;
|
|
662
674
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
663
675
|
setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
|
|
@@ -71,7 +71,9 @@ export default function sharedWiggleConfigFactory(): import("@jbrowse/core/confi
|
|
|
71
71
|
fetchSizeLimit: {
|
|
72
72
|
type: string;
|
|
73
73
|
defaultValue: number;
|
|
74
|
-
description: string;
|
|
74
|
+
description: string; /**
|
|
75
|
+
* #slot
|
|
76
|
+
*/
|
|
75
77
|
};
|
|
76
78
|
height: {
|
|
77
79
|
type: string;
|
|
@@ -84,4 +86,9 @@ export default function sharedWiggleConfigFactory(): import("@jbrowse/core/confi
|
|
|
84
86
|
defaultValue: string;
|
|
85
87
|
contextVariable: string[];
|
|
86
88
|
};
|
|
89
|
+
jexlFilters: {
|
|
90
|
+
type: string;
|
|
91
|
+
description: string;
|
|
92
|
+
defaultValue: never[];
|
|
93
|
+
};
|
|
87
94
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
|
|
@@ -76,7 +76,9 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
76
76
|
fetchSizeLimit: {
|
|
77
77
|
type: string;
|
|
78
78
|
defaultValue: number;
|
|
79
|
-
description: string;
|
|
79
|
+
description: string; /**
|
|
80
|
+
* #property
|
|
81
|
+
*/
|
|
80
82
|
};
|
|
81
83
|
height: {
|
|
82
84
|
type: string;
|
|
@@ -89,6 +91,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
89
91
|
defaultValue: string;
|
|
90
92
|
contextVariable: string[];
|
|
91
93
|
};
|
|
94
|
+
jexlFilters: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
defaultValue: never[];
|
|
98
|
+
};
|
|
92
99
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
93
100
|
} & {
|
|
94
101
|
/**
|
|
@@ -268,13 +275,15 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
268
275
|
readonly featureUnderMouse: Feature | undefined;
|
|
269
276
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
270
277
|
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* #action
|
|
280
|
+
*/
|
|
271
281
|
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
272
282
|
} & {
|
|
273
283
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
274
284
|
deleteBlock(key: string): void;
|
|
275
|
-
selectFeature(feature: Feature): void;
|
|
276
|
-
|
|
277
|
-
*/
|
|
285
|
+
selectFeature(feature: Feature): void;
|
|
286
|
+
navToFeature(feature: Feature): void;
|
|
278
287
|
clearFeatureSelection(): void;
|
|
279
288
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
280
289
|
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
@@ -283,12 +292,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
283
292
|
} & {
|
|
284
293
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
285
294
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
286
|
-
renderProps(): any;
|
|
287
|
-
* #getter
|
|
288
|
-
*/
|
|
295
|
+
renderProps(): any;
|
|
289
296
|
} & {
|
|
290
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
291
|
-
|
|
297
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
298
|
+
/**
|
|
299
|
+
* #method
|
|
292
300
|
*/
|
|
293
301
|
afterAttach(): void;
|
|
294
302
|
} & {
|
|
@@ -563,7 +571,9 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
563
571
|
fetchSizeLimit: {
|
|
564
572
|
type: string;
|
|
565
573
|
defaultValue: number;
|
|
566
|
-
description: string;
|
|
574
|
+
description: string; /**
|
|
575
|
+
* #property
|
|
576
|
+
*/
|
|
567
577
|
};
|
|
568
578
|
height: {
|
|
569
579
|
type: string;
|
|
@@ -576,6 +586,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
576
586
|
defaultValue: string;
|
|
577
587
|
contextVariable: string[];
|
|
578
588
|
};
|
|
589
|
+
jexlFilters: {
|
|
590
|
+
type: string;
|
|
591
|
+
description: string;
|
|
592
|
+
defaultValue: never[];
|
|
593
|
+
};
|
|
579
594
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
580
595
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
581
596
|
type: string;
|
package/esm/util.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-wiggle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "JBrowse 2 wiggle adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@floating-ui/react": "^0.26.3",
|
|
40
40
|
"@gmod/bbi": "^4.0.0",
|
|
41
41
|
"@mui/icons-material": "^5.0.2",
|
|
42
|
+
"@mui/x-data-grid": "^7.0.0",
|
|
42
43
|
"clone": "^2.1.2",
|
|
43
44
|
"d3-color": "^3.0.2",
|
|
44
45
|
"d3-scale": "^3.0.2",
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
"@jbrowse/plugin-data-management": "^2.0.0",
|
|
53
54
|
"@jbrowse/plugin-linear-genome-view": "^2.0.0",
|
|
54
55
|
"@mui/material": "^5.0.0",
|
|
55
|
-
"@mui/x-data-grid": "^7.0.0",
|
|
56
56
|
"mobx": "^6.0.0",
|
|
57
57
|
"mobx-react": "^9.0.0",
|
|
58
58
|
"mobx-state-tree": "^5.0.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"distModule": "esm/index.js",
|
|
67
67
|
"srcModule": "src/index.ts",
|
|
68
68
|
"module": "esm/index.js",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "935f2602d29abc737bb1f493a922b6218d023ae2"
|
|
70
70
|
}
|