@jbrowse/plugin-wiggle 2.9.0 → 2.10.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/BigWigAdapter/BigWigAdapter.d.ts +2 -2
- package/dist/LinearWiggleDisplay/models/configSchema.d.ts +2 -0
- package/dist/LinearWiggleDisplay/models/configSchema.js +2 -0
- package/dist/LinearWiggleDisplay/models/model.d.ts +13 -9
- package/dist/LinearWiggleDisplay/models/model.js +8 -2
- package/dist/MultiLinearWiggleDisplay/models/configSchema.js +2 -0
- package/dist/MultiLinearWiggleDisplay/models/model.d.ts +21 -26
- package/dist/MultiLinearWiggleDisplay/models/model.js +19 -13
- package/dist/MultiWiggleAddTrackWidget/index.js +24 -4
- package/dist/Tooltip.js +17 -49
- package/dist/shared/configShared.d.ts +2 -0
- package/dist/shared/configShared.js +3 -1
- package/dist/shared/modelShared.d.ts +4 -4
- package/esm/BigWigAdapter/BigWigAdapter.d.ts +2 -2
- package/esm/LinearWiggleDisplay/models/configSchema.d.ts +2 -0
- package/esm/LinearWiggleDisplay/models/configSchema.js +2 -0
- package/esm/LinearWiggleDisplay/models/model.d.ts +13 -9
- package/esm/LinearWiggleDisplay/models/model.js +9 -3
- package/esm/MultiLinearWiggleDisplay/models/configSchema.js +2 -0
- package/esm/MultiLinearWiggleDisplay/models/model.d.ts +21 -26
- package/esm/MultiLinearWiggleDisplay/models/model.js +20 -14
- package/esm/MultiWiggleAddTrackWidget/index.js +2 -2
- package/esm/Tooltip.js +15 -27
- package/esm/shared/configShared.d.ts +2 -0
- package/esm/shared/configShared.js +3 -1
- package/esm/shared/modelShared.d.ts +4 -4
- package/package.json +4 -5
|
@@ -11,10 +11,10 @@ export default class BigWigAdapter extends BaseFeatureDataAdapter {
|
|
|
11
11
|
private setupPre;
|
|
12
12
|
setup(opts?: BaseOptions): Promise<{
|
|
13
13
|
bigwig: BigWig;
|
|
14
|
-
header:
|
|
14
|
+
header: import("@gmod/bbi").Header;
|
|
15
15
|
}>;
|
|
16
16
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
17
|
-
refIdToName(refId: number): Promise<
|
|
17
|
+
refIdToName(refId: number): Promise<string>;
|
|
18
18
|
getGlobalStats(opts?: BaseOptions): Promise<import("@jbrowse/core/util/stats").QuantitativeStats>;
|
|
19
19
|
getFeatures(region: Region, opts?: WiggleOptions): import("rxjs").Observable<Feature>;
|
|
20
20
|
getMultiRegionFeatureDensityStats(_regions: Region[]): Promise<{
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
/**
|
|
3
3
|
* #config LinearWiggleDisplay
|
|
4
|
+
* extends
|
|
5
|
+
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
4
6
|
*/
|
|
5
7
|
export default function WiggleConfigFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
8
|
/**
|
|
@@ -9,6 +9,8 @@ const mobx_state_tree_1 = require("mobx-state-tree");
|
|
|
9
9
|
const configShared_1 = __importDefault(require("../../shared/configShared"));
|
|
10
10
|
/**
|
|
11
11
|
* #config LinearWiggleDisplay
|
|
12
|
+
* extends
|
|
13
|
+
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
12
14
|
*/
|
|
13
15
|
function WiggleConfigFactory(pluginManager) {
|
|
14
16
|
const XYPlotRendererConfigSchema = pluginManager.getRendererType('XYPlotRenderer').configSchema;
|
|
@@ -5,7 +5,8 @@ import PluginManager from '@jbrowse/core/PluginManager';
|
|
|
5
5
|
import { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
6
6
|
/**
|
|
7
7
|
* #stateModel LinearWiggleDisplay
|
|
8
|
-
* extends
|
|
8
|
+
* extends
|
|
9
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
9
10
|
*/
|
|
10
11
|
declare function stateModelFactory(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
11
12
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -33,9 +34,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
33
34
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
34
35
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
36
|
}, {
|
|
36
|
-
renderInProgress: AbortController | undefined;
|
|
37
|
-
* #property
|
|
38
|
-
*/
|
|
37
|
+
renderInProgress: AbortController | undefined;
|
|
39
38
|
filled: boolean;
|
|
40
39
|
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
41
40
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -45,7 +44,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
45
44
|
message: string | undefined;
|
|
46
45
|
maxHeightReached: boolean;
|
|
47
46
|
ReactComponent: ({ model, }: {
|
|
48
|
-
model: any;
|
|
47
|
+
model: any; /**
|
|
48
|
+
* #getter
|
|
49
|
+
*/
|
|
49
50
|
}) => any;
|
|
50
51
|
renderProps: any;
|
|
51
52
|
} & {
|
|
@@ -159,6 +160,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
159
160
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
160
161
|
}> | null;
|
|
161
162
|
readonly adapterConfig: any;
|
|
163
|
+
/**
|
|
164
|
+
* #getter
|
|
165
|
+
*/
|
|
162
166
|
readonly parentTrack: any;
|
|
163
167
|
renderProps(): any; /**
|
|
164
168
|
* #getter
|
|
@@ -186,9 +190,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
186
190
|
featureDensityStats: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined;
|
|
187
191
|
currStatsBpPerPx: number;
|
|
188
192
|
} & {
|
|
189
|
-
readonly currentBytesRequested: number;
|
|
190
|
-
* #getter
|
|
191
|
-
*/
|
|
193
|
+
readonly currentBytesRequested: number;
|
|
192
194
|
readonly currentFeatureScreenDensity: number;
|
|
193
195
|
readonly maxFeatureScreenDensity: any;
|
|
194
196
|
readonly featureDensityStatsReady: boolean;
|
|
@@ -200,7 +202,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
200
202
|
setFeatureDensityStatsLimit(stats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void;
|
|
201
203
|
getFeatureDensityStats(): Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
|
|
202
204
|
setFeatureDensityStatsP(arg: any): void;
|
|
203
|
-
setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void;
|
|
205
|
+
setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void; /**
|
|
206
|
+
* #method
|
|
207
|
+
*/
|
|
204
208
|
clearFeatureDensityStats(): void;
|
|
205
209
|
} & {
|
|
206
210
|
readonly regionTooLarge: boolean;
|
|
@@ -45,7 +45,8 @@ const rendererTypes = new Map([
|
|
|
45
45
|
]);
|
|
46
46
|
/**
|
|
47
47
|
* #stateModel LinearWiggleDisplay
|
|
48
|
-
* extends
|
|
48
|
+
* extends
|
|
49
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
49
50
|
*/
|
|
50
51
|
function stateModelFactory(pluginManager, configSchema) {
|
|
51
52
|
return mobx_state_tree_1.types
|
|
@@ -211,7 +212,12 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
211
212
|
const { renderSvg: superRenderSvg } = self;
|
|
212
213
|
return {
|
|
213
214
|
afterAttach() {
|
|
214
|
-
|
|
215
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
216
|
+
;
|
|
217
|
+
(async () => {
|
|
218
|
+
const { quantitativeStatsAutorun } = await Promise.resolve().then(() => __importStar(require('../../util')));
|
|
219
|
+
quantitativeStatsAutorun(self);
|
|
220
|
+
})();
|
|
215
221
|
},
|
|
216
222
|
/**
|
|
217
223
|
* #action
|
|
@@ -9,6 +9,8 @@ const mobx_state_tree_1 = require("mobx-state-tree");
|
|
|
9
9
|
const configShared_1 = __importDefault(require("../../shared/configShared"));
|
|
10
10
|
/**
|
|
11
11
|
* #config MultiLinearWiggleDisplay
|
|
12
|
+
* extends
|
|
13
|
+
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
12
14
|
*/
|
|
13
15
|
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
14
16
|
function WiggleConfigFactory(pluginManager) {
|
|
@@ -11,7 +11,8 @@ interface Source {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* #stateModel MultiLinearWiggleDisplay
|
|
14
|
-
* extends
|
|
14
|
+
* extends
|
|
15
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
15
16
|
*/
|
|
16
17
|
export declare function stateModelFactory(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
17
18
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -59,8 +60,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
59
60
|
setLoading(abortController: AbortController): void;
|
|
60
61
|
setMessage(messageText: string): void;
|
|
61
62
|
setRendered(props: {
|
|
62
|
-
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
63
|
-
/**
|
|
63
|
+
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>; /**
|
|
64
64
|
* #getter
|
|
65
65
|
*/
|
|
66
66
|
features: Map<string, Feature>;
|
|
@@ -106,9 +106,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
106
106
|
summaryScoreMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
107
107
|
rendererTypeNameState: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
108
108
|
scale: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
109
|
-
autoscale: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
110
|
-
* #property
|
|
111
|
-
*/
|
|
109
|
+
autoscale: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
112
110
|
displayCrossHatches: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>; /**
|
|
113
111
|
* #property
|
|
114
112
|
*/
|
|
@@ -149,9 +147,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
149
147
|
error: unknown;
|
|
150
148
|
message: string | undefined;
|
|
151
149
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
152
|
-
onHorizontalScroll?: Function | undefined;
|
|
153
|
-
* #property
|
|
154
|
-
*/
|
|
150
|
+
onHorizontalScroll?: Function | undefined;
|
|
155
151
|
blockState?: Record<string, any> | undefined;
|
|
156
152
|
}>;
|
|
157
153
|
readonly DisplayBlurb: React.FC<{
|
|
@@ -164,13 +160,19 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
164
160
|
error: unknown;
|
|
165
161
|
message: string | undefined;
|
|
166
162
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
167
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
163
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>; /**
|
|
164
|
+
* #action
|
|
165
|
+
*/
|
|
168
166
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
169
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
167
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>; /**
|
|
168
|
+
* #getter
|
|
169
|
+
*/
|
|
170
170
|
}, {
|
|
171
171
|
rendererTypeName: string;
|
|
172
172
|
error: unknown;
|
|
173
|
-
message: string | undefined;
|
|
173
|
+
message: string | undefined; /**
|
|
174
|
+
* #getter
|
|
175
|
+
*/
|
|
174
176
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
175
177
|
}> | null;
|
|
176
178
|
readonly adapterConfig: any;
|
|
@@ -201,7 +203,9 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
201
203
|
} & {
|
|
202
204
|
readonly currentBytesRequested: number;
|
|
203
205
|
readonly currentFeatureScreenDensity: number;
|
|
204
|
-
readonly maxFeatureScreenDensity: any;
|
|
206
|
+
readonly maxFeatureScreenDensity: any; /**
|
|
207
|
+
* #property
|
|
208
|
+
*/
|
|
205
209
|
readonly featureDensityStatsReady: boolean;
|
|
206
210
|
readonly maxAllowableBytes: number;
|
|
207
211
|
} & {
|
|
@@ -227,9 +231,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
227
231
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
228
232
|
} & {
|
|
229
233
|
readonly renderDelay: number;
|
|
230
|
-
readonly TooltipComponent: React.FC<any>;
|
|
231
|
-
* #getter
|
|
232
|
-
*/
|
|
234
|
+
readonly TooltipComponent: React.FC<any>;
|
|
233
235
|
readonly selectedFeatureId: string | undefined;
|
|
234
236
|
readonly DisplayMessageComponent: React.FC<any> | undefined;
|
|
235
237
|
} & {
|
|
@@ -237,11 +239,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
237
239
|
readonly featureUnderMouse: Feature | undefined;
|
|
238
240
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
239
241
|
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
240
|
-
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
241
|
-
* #getter
|
|
242
|
-
* positions multi-row below the tracklabel even if using overlap
|
|
243
|
-
* tracklabels for everything else
|
|
244
|
-
*/
|
|
242
|
+
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
245
243
|
} & {
|
|
246
244
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
247
245
|
deleteBlock(key: string): void;
|
|
@@ -263,16 +261,13 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
263
261
|
stats: {
|
|
264
262
|
scoreMin: number;
|
|
265
263
|
scoreMax: number;
|
|
266
|
-
} | undefined;
|
|
267
|
-
/**
|
|
264
|
+
} | undefined; /**
|
|
268
265
|
* #action
|
|
269
266
|
*/
|
|
270
267
|
statsFetchInProgress: AbortController | undefined;
|
|
271
268
|
} & {
|
|
272
269
|
updateQuantitativeStats(stats: {
|
|
273
|
-
scoreMin: number;
|
|
274
|
-
* #action
|
|
275
|
-
*/
|
|
270
|
+
scoreMin: number;
|
|
276
271
|
scoreMax: number;
|
|
277
272
|
}): void;
|
|
278
273
|
setColor(color?: string | undefined): void;
|
|
@@ -54,7 +54,8 @@ const rendererTypes = new Map([
|
|
|
54
54
|
]);
|
|
55
55
|
/**
|
|
56
56
|
* #stateModel MultiLinearWiggleDisplay
|
|
57
|
-
* extends
|
|
57
|
+
* extends
|
|
58
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
58
59
|
*/
|
|
59
60
|
function stateModelFactory(pluginManager, configSchema) {
|
|
60
61
|
return mobx_state_tree_1.types
|
|
@@ -381,19 +382,24 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
381
382
|
const { renderSvg: superRenderSvg } = self;
|
|
382
383
|
return {
|
|
383
384
|
afterAttach() {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
const {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
adapterConfig
|
|
385
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
386
|
+
;
|
|
387
|
+
(async () => {
|
|
388
|
+
const { quantitativeStatsAutorun } = await Promise.resolve().then(() => __importStar(require('../../util')));
|
|
389
|
+
quantitativeStatsAutorun(self);
|
|
390
|
+
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(async () => {
|
|
391
|
+
const { rpcManager } = (0, util_1.getSession)(self);
|
|
392
|
+
const { adapterConfig } = self;
|
|
393
|
+
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
394
|
+
const sources = (await rpcManager.call(sessionId, 'MultiWiggleGetSources', {
|
|
395
|
+
sessionId,
|
|
396
|
+
adapterConfig,
|
|
397
|
+
}));
|
|
398
|
+
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
399
|
+
self.setSources(sources);
|
|
400
|
+
}
|
|
392
401
|
}));
|
|
393
|
-
|
|
394
|
-
self.setSources(sources);
|
|
395
|
-
}
|
|
396
|
-
}));
|
|
402
|
+
})();
|
|
397
403
|
},
|
|
398
404
|
/**
|
|
399
405
|
* #action
|
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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;
|
|
4
24
|
};
|
|
5
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
26
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
7
27
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
28
|
// locals
|
|
9
|
-
const
|
|
29
|
+
const react_1 = require("react");
|
|
10
30
|
exports.default = (pm) => {
|
|
11
31
|
pm.addAddTrackWorkflowType(() => new pluggableElementTypes_1.AddTrackWorkflowType({
|
|
12
32
|
name: 'Multi-wiggle track',
|
|
13
|
-
ReactComponent:
|
|
33
|
+
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./AddTrackWorkflow')))),
|
|
14
34
|
stateModel: mobx_state_tree_1.types.model({}),
|
|
15
35
|
}));
|
|
16
36
|
};
|
package/dist/Tooltip.js
CHANGED
|
@@ -1,35 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 =
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
27
7
|
const mobx_react_1 = require("mobx-react");
|
|
28
8
|
const material_1 = require("@mui/material");
|
|
29
9
|
const mui_1 = require("tss-react/mui");
|
|
10
|
+
const react_2 = require("@floating-ui/react");
|
|
30
11
|
// locals
|
|
31
12
|
const util_1 = require("./util");
|
|
32
|
-
const react_popper_1 = require("react-popper");
|
|
33
13
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
34
14
|
// these styles come from
|
|
35
15
|
// https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
|
|
@@ -61,35 +41,23 @@ const Tooltip = (0, mobx_react_1.observer)(function Tooltip({ model, height, cli
|
|
|
61
41
|
var _a, _b;
|
|
62
42
|
const theme = (0, material_1.useTheme)();
|
|
63
43
|
const { featureUnderMouse } = model;
|
|
64
|
-
const [width, setWidth] = (0, react_1.useState)(0);
|
|
65
|
-
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
66
44
|
const { classes } = useStyles();
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
left: x,
|
|
75
|
-
bottom: y,
|
|
76
|
-
right: x,
|
|
77
|
-
width: 0,
|
|
78
|
-
height: 0,
|
|
79
|
-
x,
|
|
80
|
-
y,
|
|
81
|
-
toJSON() { },
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
}), [clientRect === null || clientRect === void 0 ? void 0 : clientRect.top, clientMouseCoord, width, useClientY]);
|
|
85
|
-
const { styles, attributes } = (0, react_popper_1.usePopper)(virtElement, anchorEl);
|
|
45
|
+
const { refs, floatingStyles, context } = (0, react_2.useFloating)({
|
|
46
|
+
placement: 'right',
|
|
47
|
+
});
|
|
48
|
+
const x = clientMouseCoord[0] + 5;
|
|
49
|
+
const y = useClientY ? clientMouseCoord[1] : (clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0;
|
|
50
|
+
const clientPoint = (0, react_2.useClientPoint)(context, { x, y });
|
|
51
|
+
const { getFloatingProps } = (0, react_2.useInteractions)([clientPoint]);
|
|
86
52
|
const popperTheme = (_a = theme === null || theme === void 0 ? void 0 : theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
|
|
87
53
|
return featureUnderMouse ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
88
54
|
react_1.default.createElement(material_1.Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
|
|
89
|
-
react_1.default.createElement("div", {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
55
|
+
react_1.default.createElement("div", { className: classes.tooltip, ref: refs.setFloating, style: {
|
|
56
|
+
...floatingStyles,
|
|
57
|
+
zIndex: 100000,
|
|
58
|
+
pointerEvents: 'none',
|
|
59
|
+
}, ...getFloatingProps() },
|
|
60
|
+
react_1.default.createElement(TooltipContents, { model: model, feature: featureUnderMouse }))),
|
|
93
61
|
react_1.default.createElement("div", { className: classes.hoverVertical, style: {
|
|
94
62
|
left: offsetMouseCoord[0],
|
|
95
63
|
height: height - util_1.YSCALEBAR_LABEL_OFFSET * 2,
|
|
@@ -5,9 +5,11 @@ const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view"
|
|
|
5
5
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
6
|
/**
|
|
7
7
|
* #config SharedWiggleDisplay
|
|
8
|
+
* extends
|
|
9
|
+
* - [BaseLinearDisplay](../baselineardisplay)
|
|
8
10
|
*/
|
|
9
11
|
function sharedWiggleConfigFactory() {
|
|
10
|
-
return (0, configuration_1.ConfigurationSchema)('
|
|
12
|
+
return (0, configuration_1.ConfigurationSchema)('SharedWiggleDisplay', {
|
|
11
13
|
/**
|
|
12
14
|
* #slot
|
|
13
15
|
*/
|
|
@@ -266,9 +266,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
266
266
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
267
267
|
readonly featureUnderMouse: Feature | undefined;
|
|
268
268
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
269
|
-
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
270
|
-
* #action
|
|
271
|
-
*/
|
|
269
|
+
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
272
270
|
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
273
271
|
} & {
|
|
274
272
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
@@ -276,7 +274,9 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
276
274
|
selectFeature(feature: Feature): void;
|
|
277
275
|
clearFeatureSelection(): void;
|
|
278
276
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
279
|
-
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
277
|
+
setContextMenuFeature(feature?: Feature | undefined): void; /**
|
|
278
|
+
* #getter
|
|
279
|
+
*/
|
|
280
280
|
} & {
|
|
281
281
|
reload(): Promise<void>;
|
|
282
282
|
} & {
|
|
@@ -11,10 +11,10 @@ export default class BigWigAdapter extends BaseFeatureDataAdapter {
|
|
|
11
11
|
private setupPre;
|
|
12
12
|
setup(opts?: BaseOptions): Promise<{
|
|
13
13
|
bigwig: BigWig;
|
|
14
|
-
header:
|
|
14
|
+
header: import("@gmod/bbi").Header;
|
|
15
15
|
}>;
|
|
16
16
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
17
|
-
refIdToName(refId: number): Promise<
|
|
17
|
+
refIdToName(refId: number): Promise<string>;
|
|
18
18
|
getGlobalStats(opts?: BaseOptions): Promise<import("@jbrowse/core/util/stats").QuantitativeStats>;
|
|
19
19
|
getFeatures(region: Region, opts?: WiggleOptions): import("rxjs").Observable<Feature>;
|
|
20
20
|
getMultiRegionFeatureDensityStats(_regions: Region[]): Promise<{
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
/**
|
|
3
3
|
* #config LinearWiggleDisplay
|
|
4
|
+
* extends
|
|
5
|
+
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
4
6
|
*/
|
|
5
7
|
export default function WiggleConfigFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
8
|
/**
|
|
@@ -4,6 +4,8 @@ import { types } from 'mobx-state-tree';
|
|
|
4
4
|
import sharedWiggleConfigFactory from '../../shared/configShared';
|
|
5
5
|
/**
|
|
6
6
|
* #config LinearWiggleDisplay
|
|
7
|
+
* extends
|
|
8
|
+
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
7
9
|
*/
|
|
8
10
|
export default function WiggleConfigFactory(pluginManager) {
|
|
9
11
|
const XYPlotRendererConfigSchema = pluginManager.getRendererType('XYPlotRenderer').configSchema;
|
|
@@ -5,7 +5,8 @@ import PluginManager from '@jbrowse/core/PluginManager';
|
|
|
5
5
|
import { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
6
6
|
/**
|
|
7
7
|
* #stateModel LinearWiggleDisplay
|
|
8
|
-
* extends
|
|
8
|
+
* extends
|
|
9
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
9
10
|
*/
|
|
10
11
|
declare function stateModelFactory(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
11
12
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -33,9 +34,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
33
34
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
34
35
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
36
|
}, {
|
|
36
|
-
renderInProgress: AbortController | undefined;
|
|
37
|
-
* #property
|
|
38
|
-
*/
|
|
37
|
+
renderInProgress: AbortController | undefined;
|
|
39
38
|
filled: boolean;
|
|
40
39
|
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
41
40
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -45,7 +44,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
45
44
|
message: string | undefined;
|
|
46
45
|
maxHeightReached: boolean;
|
|
47
46
|
ReactComponent: ({ model, }: {
|
|
48
|
-
model: any;
|
|
47
|
+
model: any; /**
|
|
48
|
+
* #getter
|
|
49
|
+
*/
|
|
49
50
|
}) => any;
|
|
50
51
|
renderProps: any;
|
|
51
52
|
} & {
|
|
@@ -159,6 +160,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
159
160
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
160
161
|
}> | null;
|
|
161
162
|
readonly adapterConfig: any;
|
|
163
|
+
/**
|
|
164
|
+
* #getter
|
|
165
|
+
*/
|
|
162
166
|
readonly parentTrack: any;
|
|
163
167
|
renderProps(): any; /**
|
|
164
168
|
* #getter
|
|
@@ -186,9 +190,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
186
190
|
featureDensityStats: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined;
|
|
187
191
|
currStatsBpPerPx: number;
|
|
188
192
|
} & {
|
|
189
|
-
readonly currentBytesRequested: number;
|
|
190
|
-
* #getter
|
|
191
|
-
*/
|
|
193
|
+
readonly currentBytesRequested: number;
|
|
192
194
|
readonly currentFeatureScreenDensity: number;
|
|
193
195
|
readonly maxFeatureScreenDensity: any;
|
|
194
196
|
readonly featureDensityStatsReady: boolean;
|
|
@@ -200,7 +202,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
200
202
|
setFeatureDensityStatsLimit(stats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void;
|
|
201
203
|
getFeatureDensityStats(): Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
|
|
202
204
|
setFeatureDensityStatsP(arg: any): void;
|
|
203
|
-
setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void;
|
|
205
|
+
setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void; /**
|
|
206
|
+
* #method
|
|
207
|
+
*/
|
|
204
208
|
clearFeatureDensityStats(): void;
|
|
205
209
|
} & {
|
|
206
210
|
readonly regionTooLarge: boolean;
|
|
@@ -4,7 +4,7 @@ import { getSession } from '@jbrowse/core/util';
|
|
|
4
4
|
import { types } from 'mobx-state-tree';
|
|
5
5
|
import { axisPropsFromTickScale } from 'react-d3-axis-mod';
|
|
6
6
|
// locals
|
|
7
|
-
import { getScale,
|
|
7
|
+
import { getScale, YSCALEBAR_LABEL_OFFSET } from '../../util';
|
|
8
8
|
import Tooltip from '../components/Tooltip';
|
|
9
9
|
import SharedWiggleMixin from '../../shared/modelShared';
|
|
10
10
|
// lazies
|
|
@@ -17,7 +17,8 @@ const rendererTypes = new Map([
|
|
|
17
17
|
]);
|
|
18
18
|
/**
|
|
19
19
|
* #stateModel LinearWiggleDisplay
|
|
20
|
-
* extends
|
|
20
|
+
* extends
|
|
21
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
21
22
|
*/
|
|
22
23
|
function stateModelFactory(pluginManager, configSchema) {
|
|
23
24
|
return types
|
|
@@ -183,7 +184,12 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
183
184
|
const { renderSvg: superRenderSvg } = self;
|
|
184
185
|
return {
|
|
185
186
|
afterAttach() {
|
|
186
|
-
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
188
|
+
;
|
|
189
|
+
(async () => {
|
|
190
|
+
const { quantitativeStatsAutorun } = await import('../../util');
|
|
191
|
+
quantitativeStatsAutorun(self);
|
|
192
|
+
})();
|
|
187
193
|
},
|
|
188
194
|
/**
|
|
189
195
|
* #action
|
|
@@ -4,6 +4,8 @@ import { types } from 'mobx-state-tree';
|
|
|
4
4
|
import sharedWiggleConfigFactory from '../../shared/configShared';
|
|
5
5
|
/**
|
|
6
6
|
* #config MultiLinearWiggleDisplay
|
|
7
|
+
* extends
|
|
8
|
+
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
7
9
|
*/
|
|
8
10
|
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
9
11
|
export default function WiggleConfigFactory(pluginManager) {
|
|
@@ -11,7 +11,8 @@ interface Source {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* #stateModel MultiLinearWiggleDisplay
|
|
14
|
-
* extends
|
|
14
|
+
* extends
|
|
15
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
15
16
|
*/
|
|
16
17
|
export declare function stateModelFactory(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
17
18
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -59,8 +60,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
59
60
|
setLoading(abortController: AbortController): void;
|
|
60
61
|
setMessage(messageText: string): void;
|
|
61
62
|
setRendered(props: {
|
|
62
|
-
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
63
|
-
/**
|
|
63
|
+
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>; /**
|
|
64
64
|
* #getter
|
|
65
65
|
*/
|
|
66
66
|
features: Map<string, Feature>;
|
|
@@ -106,9 +106,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
106
106
|
summaryScoreMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
107
107
|
rendererTypeNameState: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
108
108
|
scale: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
109
|
-
autoscale: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
110
|
-
* #property
|
|
111
|
-
*/
|
|
109
|
+
autoscale: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
112
110
|
displayCrossHatches: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>; /**
|
|
113
111
|
* #property
|
|
114
112
|
*/
|
|
@@ -149,9 +147,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
149
147
|
error: unknown;
|
|
150
148
|
message: string | undefined;
|
|
151
149
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
152
|
-
onHorizontalScroll?: Function | undefined;
|
|
153
|
-
* #property
|
|
154
|
-
*/
|
|
150
|
+
onHorizontalScroll?: Function | undefined;
|
|
155
151
|
blockState?: Record<string, any> | undefined;
|
|
156
152
|
}>;
|
|
157
153
|
readonly DisplayBlurb: React.FC<{
|
|
@@ -164,13 +160,19 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
164
160
|
error: unknown;
|
|
165
161
|
message: string | undefined;
|
|
166
162
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
167
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
163
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>; /**
|
|
164
|
+
* #action
|
|
165
|
+
*/
|
|
168
166
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
169
|
-
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
167
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>; /**
|
|
168
|
+
* #getter
|
|
169
|
+
*/
|
|
170
170
|
}, {
|
|
171
171
|
rendererTypeName: string;
|
|
172
172
|
error: unknown;
|
|
173
|
-
message: string | undefined;
|
|
173
|
+
message: string | undefined; /**
|
|
174
|
+
* #getter
|
|
175
|
+
*/
|
|
174
176
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
175
177
|
}> | null;
|
|
176
178
|
readonly adapterConfig: any;
|
|
@@ -201,7 +203,9 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
201
203
|
} & {
|
|
202
204
|
readonly currentBytesRequested: number;
|
|
203
205
|
readonly currentFeatureScreenDensity: number;
|
|
204
|
-
readonly maxFeatureScreenDensity: any;
|
|
206
|
+
readonly maxFeatureScreenDensity: any; /**
|
|
207
|
+
* #property
|
|
208
|
+
*/
|
|
205
209
|
readonly featureDensityStatsReady: boolean;
|
|
206
210
|
readonly maxAllowableBytes: number;
|
|
207
211
|
} & {
|
|
@@ -227,9 +231,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
227
231
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
228
232
|
} & {
|
|
229
233
|
readonly renderDelay: number;
|
|
230
|
-
readonly TooltipComponent: React.FC<any>;
|
|
231
|
-
* #getter
|
|
232
|
-
*/
|
|
234
|
+
readonly TooltipComponent: React.FC<any>;
|
|
233
235
|
readonly selectedFeatureId: string | undefined;
|
|
234
236
|
readonly DisplayMessageComponent: React.FC<any> | undefined;
|
|
235
237
|
} & {
|
|
@@ -237,11 +239,7 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
237
239
|
readonly featureUnderMouse: Feature | undefined;
|
|
238
240
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
239
241
|
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
240
|
-
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
241
|
-
* #getter
|
|
242
|
-
* positions multi-row below the tracklabel even if using overlap
|
|
243
|
-
* tracklabels for everything else
|
|
244
|
-
*/
|
|
242
|
+
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
245
243
|
} & {
|
|
246
244
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
247
245
|
deleteBlock(key: string): void;
|
|
@@ -263,16 +261,13 @@ export declare function stateModelFactory(pluginManager: PluginManager, configSc
|
|
|
263
261
|
stats: {
|
|
264
262
|
scoreMin: number;
|
|
265
263
|
scoreMax: number;
|
|
266
|
-
} | undefined;
|
|
267
|
-
/**
|
|
264
|
+
} | undefined; /**
|
|
268
265
|
* #action
|
|
269
266
|
*/
|
|
270
267
|
statsFetchInProgress: AbortController | undefined;
|
|
271
268
|
} & {
|
|
272
269
|
updateQuantitativeStats(stats: {
|
|
273
|
-
scoreMin: number;
|
|
274
|
-
* #action
|
|
275
|
-
*/
|
|
270
|
+
scoreMin: number;
|
|
276
271
|
scoreMax: number;
|
|
277
272
|
}): void;
|
|
278
273
|
setColor(color?: string | undefined): void;
|
|
@@ -9,7 +9,7 @@ import { getSession } from '@jbrowse/core/util';
|
|
|
9
9
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
10
10
|
import { set1 as colors } from '@jbrowse/core/ui/colors';
|
|
11
11
|
// locals
|
|
12
|
-
import { getScale,
|
|
12
|
+
import { getScale, YSCALEBAR_LABEL_OFFSET } from '../../util';
|
|
13
13
|
import Tooltip from '../components/Tooltip';
|
|
14
14
|
import SharedWiggleMixin from '../../shared/modelShared';
|
|
15
15
|
const randomColor = () => '#000000'.replaceAll('0', () => (~~(Math.random() * 16)).toString(16));
|
|
@@ -25,7 +25,8 @@ const rendererTypes = new Map([
|
|
|
25
25
|
]);
|
|
26
26
|
/**
|
|
27
27
|
* #stateModel MultiLinearWiggleDisplay
|
|
28
|
-
* extends
|
|
28
|
+
* extends
|
|
29
|
+
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
29
30
|
*/
|
|
30
31
|
export function stateModelFactory(pluginManager, configSchema) {
|
|
31
32
|
return types
|
|
@@ -352,19 +353,24 @@ export function stateModelFactory(pluginManager, configSchema) {
|
|
|
352
353
|
const { renderSvg: superRenderSvg } = self;
|
|
353
354
|
return {
|
|
354
355
|
afterAttach() {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
const {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
adapterConfig
|
|
356
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
357
|
+
;
|
|
358
|
+
(async () => {
|
|
359
|
+
const { quantitativeStatsAutorun } = await import('../../util');
|
|
360
|
+
quantitativeStatsAutorun(self);
|
|
361
|
+
addDisposer(self, autorun(async () => {
|
|
362
|
+
const { rpcManager } = getSession(self);
|
|
363
|
+
const { adapterConfig } = self;
|
|
364
|
+
const sessionId = getRpcSessionId(self);
|
|
365
|
+
const sources = (await rpcManager.call(sessionId, 'MultiWiggleGetSources', {
|
|
366
|
+
sessionId,
|
|
367
|
+
adapterConfig,
|
|
368
|
+
}));
|
|
369
|
+
if (isAlive(self)) {
|
|
370
|
+
self.setSources(sources);
|
|
371
|
+
}
|
|
363
372
|
}));
|
|
364
|
-
|
|
365
|
-
self.setSources(sources);
|
|
366
|
-
}
|
|
367
|
-
}));
|
|
373
|
+
})();
|
|
368
374
|
},
|
|
369
375
|
/**
|
|
370
376
|
* #action
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AddTrackWorkflowType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
2
|
import { types } from 'mobx-state-tree';
|
|
3
3
|
// locals
|
|
4
|
-
import
|
|
4
|
+
import { lazy } from 'react';
|
|
5
5
|
export default (pm) => {
|
|
6
6
|
pm.addAddTrackWorkflowType(() => new AddTrackWorkflowType({
|
|
7
7
|
name: 'Multi-wiggle track',
|
|
8
|
-
ReactComponent:
|
|
8
|
+
ReactComponent: lazy(() => import('./AddTrackWorkflow')),
|
|
9
9
|
stateModel: types.model({}),
|
|
10
10
|
}));
|
|
11
11
|
};
|
package/esm/Tooltip.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
3
|
import { alpha, Portal, useTheme } from '@mui/material';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
+
import { useClientPoint, useFloating, useInteractions, } from '@floating-ui/react';
|
|
5
6
|
// locals
|
|
6
7
|
import { YSCALEBAR_LABEL_OFFSET, round } from './util';
|
|
7
|
-
import { usePopper } from 'react-popper';
|
|
8
8
|
const useStyles = makeStyles()(theme => ({
|
|
9
9
|
// these styles come from
|
|
10
10
|
// https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
|
|
@@ -36,35 +36,23 @@ const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, off
|
|
|
36
36
|
var _a, _b;
|
|
37
37
|
const theme = useTheme();
|
|
38
38
|
const { featureUnderMouse } = model;
|
|
39
|
-
const [width, setWidth] = useState(0);
|
|
40
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
41
39
|
const { classes } = useStyles();
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
left: x,
|
|
50
|
-
bottom: y,
|
|
51
|
-
right: x,
|
|
52
|
-
width: 0,
|
|
53
|
-
height: 0,
|
|
54
|
-
x,
|
|
55
|
-
y,
|
|
56
|
-
toJSON() { },
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
}), [clientRect === null || clientRect === void 0 ? void 0 : clientRect.top, clientMouseCoord, width, useClientY]);
|
|
60
|
-
const { styles, attributes } = usePopper(virtElement, anchorEl);
|
|
40
|
+
const { refs, floatingStyles, context } = useFloating({
|
|
41
|
+
placement: 'right',
|
|
42
|
+
});
|
|
43
|
+
const x = clientMouseCoord[0] + 5;
|
|
44
|
+
const y = useClientY ? clientMouseCoord[1] : (clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0;
|
|
45
|
+
const clientPoint = useClientPoint(context, { x, y });
|
|
46
|
+
const { getFloatingProps } = useInteractions([clientPoint]);
|
|
61
47
|
const popperTheme = (_a = theme === null || theme === void 0 ? void 0 : theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
|
|
62
48
|
return featureUnderMouse ? (React.createElement(React.Fragment, null,
|
|
63
49
|
React.createElement(Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
|
|
64
|
-
React.createElement("div", {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
React.createElement("div", { className: classes.tooltip, ref: refs.setFloating, style: {
|
|
51
|
+
...floatingStyles,
|
|
52
|
+
zIndex: 100000,
|
|
53
|
+
pointerEvents: 'none',
|
|
54
|
+
}, ...getFloatingProps() },
|
|
55
|
+
React.createElement(TooltipContents, { model: model, feature: featureUnderMouse }))),
|
|
68
56
|
React.createElement("div", { className: classes.hoverVertical, style: {
|
|
69
57
|
left: offsetMouseCoord[0],
|
|
70
58
|
height: height - YSCALEBAR_LABEL_OFFSET * 2,
|
|
@@ -3,9 +3,11 @@ import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-vie
|
|
|
3
3
|
import { types } from 'mobx-state-tree';
|
|
4
4
|
/**
|
|
5
5
|
* #config SharedWiggleDisplay
|
|
6
|
+
* extends
|
|
7
|
+
* - [BaseLinearDisplay](../baselineardisplay)
|
|
6
8
|
*/
|
|
7
9
|
export default function sharedWiggleConfigFactory() {
|
|
8
|
-
return ConfigurationSchema('
|
|
10
|
+
return ConfigurationSchema('SharedWiggleDisplay', {
|
|
9
11
|
/**
|
|
10
12
|
* #slot
|
|
11
13
|
*/
|
|
@@ -266,9 +266,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
266
266
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
|
|
267
267
|
readonly featureUnderMouse: Feature | undefined;
|
|
268
268
|
getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
|
|
269
|
-
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
270
|
-
* #action
|
|
271
|
-
*/
|
|
269
|
+
getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
|
|
272
270
|
searchFeatureByID(id: string): [number, number, number, number] | undefined;
|
|
273
271
|
} & {
|
|
274
272
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
@@ -276,7 +274,9 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
|
|
|
276
274
|
selectFeature(feature: Feature): void;
|
|
277
275
|
clearFeatureSelection(): void;
|
|
278
276
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
279
|
-
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
277
|
+
setContextMenuFeature(feature?: Feature | undefined): void; /**
|
|
278
|
+
* #getter
|
|
279
|
+
*/
|
|
280
280
|
} & {
|
|
281
281
|
reload(): Promise<void>;
|
|
282
282
|
} & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-wiggle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.1",
|
|
4
4
|
"description": "JBrowse 2 wiggle adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,17 +36,16 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@floating-ui/react": "^0.26.3",
|
|
39
40
|
"@gmod/bbi": "^4.0.0",
|
|
40
41
|
"@mui/icons-material": "^5.0.2",
|
|
41
|
-
"@popperjs/core": "^2.11.0",
|
|
42
42
|
"clone": "^2.1.2",
|
|
43
43
|
"d3-color": "^3.0.2",
|
|
44
44
|
"d3-scale": "^3.0.2",
|
|
45
45
|
"fast-deep-equal": "^3.1.3",
|
|
46
46
|
"is-object": "^1.0.1",
|
|
47
47
|
"react-d3-axis-mod": "^0.1.9",
|
|
48
|
-
"react-draggable": "^4.4.5"
|
|
49
|
-
"react-popper": "^2.0.0"
|
|
48
|
+
"react-draggable": "^4.4.5"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
|
52
51
|
"@jbrowse/core": "^2.0.0",
|
|
@@ -67,5 +66,5 @@
|
|
|
67
66
|
"distModule": "esm/index.js",
|
|
68
67
|
"srcModule": "src/index.ts",
|
|
69
68
|
"module": "esm/index.js",
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "442b5f87efddfdf4ccf520b4d9dd01ddd370cb07"
|
|
71
70
|
}
|