@jbrowse/plugin-gccontent 2.17.0 → 3.0.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/GCContentAdapter/GCContentAdapter.d.ts +5 -9
- package/dist/GCContentAdapter/GCContentAdapter.js +55 -49
- package/dist/GCContentAdapter/configSchema.d.ts +1 -10
- package/dist/GCContentAdapter/configSchema.js +1 -14
- package/dist/GCContentAdapter/index.d.ts +1 -1
- package/dist/GCContentAdapter/index.js +17 -7
- package/dist/GCContentTrack/configSchema.d.ts +1 -1
- package/dist/GCContentTrack/configSchema.js +1 -8
- package/dist/GCContentTrack/index.d.ts +1 -1
- package/dist/LinearGCContentDisplay/components/EditGCContentParams.d.ts +1 -2
- package/dist/LinearGCContentDisplay/components/EditGCContentParams.js +17 -47
- package/dist/LinearGCContentDisplay/config1.d.ts +1 -6
- package/dist/LinearGCContentDisplay/config1.js +0 -8
- package/dist/LinearGCContentDisplay/config2.d.ts +1 -6
- package/dist/LinearGCContentDisplay/config2.js +0 -8
- package/dist/LinearGCContentDisplay/index.d.ts +1 -1
- package/dist/LinearGCContentDisplay/shared.d.ts +41 -51
- package/dist/LinearGCContentDisplay/shared.js +21 -28
- package/dist/LinearGCContentDisplay/stateModel1.d.ts +41 -37
- package/dist/LinearGCContentDisplay/stateModel1.js +0 -6
- package/dist/LinearGCContentDisplay/stateModel2.d.ts +41 -42
- package/dist/LinearGCContentDisplay/stateModel2.js +0 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -1
- package/esm/GCContentAdapter/GCContentAdapter.d.ts +5 -9
- package/esm/GCContentAdapter/GCContentAdapter.js +55 -49
- package/esm/GCContentAdapter/configSchema.d.ts +1 -10
- package/esm/GCContentAdapter/configSchema.js +1 -14
- package/esm/GCContentAdapter/index.d.ts +1 -1
- package/esm/GCContentTrack/configSchema.d.ts +1 -1
- package/esm/GCContentTrack/configSchema.js +1 -8
- package/esm/GCContentTrack/index.d.ts +1 -1
- package/esm/LinearGCContentDisplay/components/EditGCContentParams.d.ts +1 -2
- package/esm/LinearGCContentDisplay/components/EditGCContentParams.js +17 -24
- package/esm/LinearGCContentDisplay/config1.d.ts +1 -6
- package/esm/LinearGCContentDisplay/config1.js +0 -8
- package/esm/LinearGCContentDisplay/config2.d.ts +1 -6
- package/esm/LinearGCContentDisplay/config2.js +0 -8
- package/esm/LinearGCContentDisplay/index.d.ts +1 -1
- package/esm/LinearGCContentDisplay/shared.d.ts +41 -51
- package/esm/LinearGCContentDisplay/shared.js +5 -22
- package/esm/LinearGCContentDisplay/stateModel1.d.ts +41 -37
- package/esm/LinearGCContentDisplay/stateModel1.js +0 -6
- package/esm/LinearGCContentDisplay/stateModel2.d.ts +41 -42
- package/esm/LinearGCContentDisplay/stateModel2.js +0 -11
- package/esm/index.d.ts +1 -1
- package/esm/index.js +0 -1
- package/package.json +2 -2
|
@@ -15,37 +15,35 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.default = SharedModelF;
|
|
37
|
+
const react_1 = require("react");
|
|
27
38
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
28
39
|
const util_1 = require("@jbrowse/core/util");
|
|
29
40
|
const plugin_wiggle_1 = require("@jbrowse/plugin-wiggle");
|
|
30
41
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
31
|
-
const react_1 = require("react");
|
|
32
42
|
const EditGCContentParamsDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/EditGCContentParams'))));
|
|
33
|
-
/**
|
|
34
|
-
* #stateModel SharedGCContentModel
|
|
35
|
-
* #category display
|
|
36
|
-
* extends
|
|
37
|
-
* - [LinearWiggleDisplay](../linearwiggledisplay)
|
|
38
|
-
*/
|
|
39
43
|
function SharedModelF(pluginManager, configSchema) {
|
|
40
44
|
return mobx_state_tree_1.types
|
|
41
45
|
.compose('SharedGCContentModel', (0, plugin_wiggle_1.linearWiggleDisplayModelFactory)(pluginManager, configSchema), mobx_state_tree_1.types.model({
|
|
42
|
-
/**
|
|
43
|
-
* #property
|
|
44
|
-
*/
|
|
45
46
|
windowSize: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
|
|
46
|
-
/**
|
|
47
|
-
* #property
|
|
48
|
-
*/
|
|
49
47
|
windowDelta: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
|
|
50
48
|
}))
|
|
51
49
|
.actions(self => ({
|
|
@@ -65,7 +63,7 @@ function SharedModelF(pluginManager, configSchema) {
|
|
|
65
63
|
},
|
|
66
64
|
}))
|
|
67
65
|
.views(self => {
|
|
68
|
-
const { trackMenuItems: superTrackMenuItems,
|
|
66
|
+
const { trackMenuItems: superTrackMenuItems, adapterProps: superAdapterProps, } = self;
|
|
69
67
|
return {
|
|
70
68
|
trackMenuItems() {
|
|
71
69
|
return [
|
|
@@ -81,15 +79,10 @@ function SharedModelF(pluginManager, configSchema) {
|
|
|
81
79
|
},
|
|
82
80
|
];
|
|
83
81
|
},
|
|
84
|
-
|
|
85
|
-
* #method
|
|
86
|
-
* retrieves the sequence adapter from parent track, and puts it as a
|
|
87
|
-
* subadapter on a GCContentAdapter
|
|
88
|
-
*/
|
|
89
|
-
renderProps() {
|
|
82
|
+
adapterProps() {
|
|
90
83
|
const sequenceAdapter = (0, configuration_1.getConf)(self.parentTrack, 'adapter');
|
|
91
84
|
return {
|
|
92
|
-
...
|
|
85
|
+
...superAdapterProps(),
|
|
93
86
|
adapterConfig: {
|
|
94
87
|
type: 'GCContentAdapter',
|
|
95
88
|
sequenceAdapter,
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
/**
|
|
4
|
-
* #stateModel LinearGCContentDisplay
|
|
5
|
-
* #category display
|
|
6
|
-
* base model `SharedGCContentModel`
|
|
7
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
8
3
|
export default function stateModelF(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
9
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
10
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -17,21 +12,12 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
17
12
|
} & {
|
|
18
13
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
19
14
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
20
|
-
region: import("mobx-state-tree").
|
|
21
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
22
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
23
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
24
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
25
|
-
} & {
|
|
26
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
27
|
-
}, {
|
|
28
|
-
setRefName(newRefName: string): void;
|
|
29
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
15
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
30
16
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
31
17
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
32
18
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
33
19
|
}, {
|
|
34
|
-
|
|
20
|
+
stopToken: string | undefined;
|
|
35
21
|
filled: boolean;
|
|
36
22
|
reactElement: React.ReactElement | undefined;
|
|
37
23
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -49,21 +35,15 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
49
35
|
status?: string;
|
|
50
36
|
reactElement?: React.ReactElement;
|
|
51
37
|
};
|
|
52
|
-
}) => import("react").JSX.Element | undefined;
|
|
38
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
53
39
|
renderProps: any;
|
|
54
40
|
} & {
|
|
55
41
|
doReload(): void;
|
|
56
42
|
afterAttach(): void;
|
|
57
43
|
setStatus(message: string): void;
|
|
58
|
-
setLoading(
|
|
44
|
+
setLoading(newStopToken: string): void;
|
|
59
45
|
setMessage(messageText: string): void;
|
|
60
|
-
setRendered(props:
|
|
61
|
-
reactElement: React.ReactElement;
|
|
62
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
63
|
-
layout: any;
|
|
64
|
-
maxHeightReached: boolean;
|
|
65
|
-
renderProps: any;
|
|
66
|
-
} | undefined): void;
|
|
46
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
67
47
|
setError(error: unknown): void;
|
|
68
48
|
reload(): void;
|
|
69
49
|
beforeDestroy(): void;
|
|
@@ -210,14 +190,15 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
210
190
|
readonly regionTooLarge: boolean;
|
|
211
191
|
readonly regionTooLargeReason: string;
|
|
212
192
|
} & {
|
|
193
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
213
194
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
214
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
195
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
215
196
|
} & {
|
|
216
197
|
featureIdUnderMouse: undefined | string;
|
|
217
198
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
218
199
|
} & {
|
|
219
|
-
readonly DisplayMessageComponent:
|
|
220
|
-
readonly blockType: "
|
|
200
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
201
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
221
202
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
222
203
|
} & {
|
|
223
204
|
readonly renderDelay: number;
|
|
@@ -244,7 +225,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
244
225
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
245
226
|
renderProps(): any;
|
|
246
227
|
} & {
|
|
247
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
228
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
248
229
|
afterAttach(): void;
|
|
249
230
|
} & {
|
|
250
231
|
message: undefined | string;
|
|
@@ -253,7 +234,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
253
234
|
scoreMin: number;
|
|
254
235
|
scoreMax: number;
|
|
255
236
|
} | undefined;
|
|
256
|
-
statsFetchInProgress: undefined |
|
|
237
|
+
statsFetchInProgress: undefined | string;
|
|
257
238
|
} & {
|
|
258
239
|
updateQuantitativeStats(stats: {
|
|
259
240
|
currStatsBpPerPx: number;
|
|
@@ -263,7 +244,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
263
244
|
setColor(color?: string): void;
|
|
264
245
|
setPosColor(color?: string): void;
|
|
265
246
|
setNegColor(color?: string): void;
|
|
266
|
-
setStatsLoading(
|
|
247
|
+
setStatsLoading(arg?: string): void;
|
|
267
248
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
268
249
|
setResolution(res: number): void;
|
|
269
250
|
setFill(fill: number): void;
|
|
@@ -360,7 +341,17 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
360
341
|
readonly quantitativeStatsReady: boolean;
|
|
361
342
|
} & {
|
|
362
343
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
344
|
+
type: string;
|
|
345
|
+
label?: undefined;
|
|
346
|
+
icon?: undefined;
|
|
347
|
+
subMenu?: undefined;
|
|
348
|
+
onClick?: undefined;
|
|
349
|
+
checked?: undefined;
|
|
350
|
+
} | {
|
|
363
351
|
label: string;
|
|
352
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
353
|
+
muiName: string;
|
|
354
|
+
};
|
|
364
355
|
subMenu: ({
|
|
365
356
|
label: string;
|
|
366
357
|
subMenu: {
|
|
@@ -383,8 +374,8 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
383
374
|
subMenu?: undefined;
|
|
384
375
|
})[];
|
|
385
376
|
type?: undefined;
|
|
386
|
-
checked?: undefined;
|
|
387
377
|
onClick?: undefined;
|
|
378
|
+
checked?: undefined;
|
|
388
379
|
} | {
|
|
389
380
|
label: string;
|
|
390
381
|
subMenu: {
|
|
@@ -394,10 +385,23 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
394
385
|
onClick: () => void;
|
|
395
386
|
}[];
|
|
396
387
|
type?: undefined;
|
|
397
|
-
|
|
388
|
+
icon?: undefined;
|
|
398
389
|
onClick?: undefined;
|
|
390
|
+
checked?: undefined;
|
|
391
|
+
} | {
|
|
392
|
+
label: string;
|
|
393
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
394
|
+
muiName: string;
|
|
395
|
+
};
|
|
396
|
+
onClick: () => void;
|
|
397
|
+
type?: undefined;
|
|
398
|
+
subMenu?: undefined;
|
|
399
|
+
checked?: undefined;
|
|
399
400
|
} | {
|
|
400
401
|
type: string;
|
|
402
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
403
|
+
muiName: string;
|
|
404
|
+
};
|
|
401
405
|
label: string;
|
|
402
406
|
checked: boolean;
|
|
403
407
|
onClick: () => void;
|
|
@@ -405,7 +409,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
405
409
|
})[];
|
|
406
410
|
} & {
|
|
407
411
|
afterAttach(): void;
|
|
408
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
412
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
409
413
|
} & {
|
|
410
414
|
setGCContentParams({ windowSize, windowDelta, }: {
|
|
411
415
|
windowSize: number;
|
|
@@ -416,5 +420,5 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
416
420
|
readonly windowDeltaSetting: any;
|
|
417
421
|
} & {
|
|
418
422
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
419
|
-
|
|
423
|
+
adapterProps(): any;
|
|
420
424
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -5,13 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = stateModelF;
|
|
7
7
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
-
// locals
|
|
9
8
|
const shared_1 = __importDefault(require("./shared"));
|
|
10
|
-
/**
|
|
11
|
-
* #stateModel LinearGCContentDisplay
|
|
12
|
-
* #category display
|
|
13
|
-
* base model `SharedGCContentModel`
|
|
14
|
-
*/
|
|
15
9
|
function stateModelF(pluginManager, configSchema) {
|
|
16
10
|
return mobx_state_tree_1.types.compose('LinearGCContentDisplay', (0, shared_1.default)(pluginManager, configSchema), mobx_state_tree_1.types.model({
|
|
17
11
|
type: mobx_state_tree_1.types.literal('LinearGCContentDisplay'),
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
/**
|
|
4
|
-
* #stateModel LinearGCContentTrackDisplay
|
|
5
|
-
* #category display
|
|
6
|
-
*
|
|
7
|
-
* used on GCContentTrack, separately from the display type on the
|
|
8
|
-
* ReferenceSequenceTrack
|
|
9
|
-
*
|
|
10
|
-
* extends
|
|
11
|
-
* - [SharedGCContentModel](../sharedgccontentmodel)
|
|
12
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
13
3
|
export default function stateModelF(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
14
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
15
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -22,21 +12,12 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
22
12
|
} & {
|
|
23
13
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
24
14
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
25
|
-
region: import("mobx-state-tree").
|
|
26
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
27
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
28
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
29
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
30
|
-
} & {
|
|
31
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
32
|
-
}, {
|
|
33
|
-
setRefName(newRefName: string): void;
|
|
34
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
15
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
35
16
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
36
17
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
37
18
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
38
19
|
}, {
|
|
39
|
-
|
|
20
|
+
stopToken: string | undefined;
|
|
40
21
|
filled: boolean;
|
|
41
22
|
reactElement: React.ReactElement | undefined;
|
|
42
23
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -54,21 +35,15 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
54
35
|
status?: string;
|
|
55
36
|
reactElement?: React.ReactElement;
|
|
56
37
|
};
|
|
57
|
-
}) => import("react").JSX.Element | undefined;
|
|
38
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
58
39
|
renderProps: any;
|
|
59
40
|
} & {
|
|
60
41
|
doReload(): void;
|
|
61
42
|
afterAttach(): void;
|
|
62
43
|
setStatus(message: string): void;
|
|
63
|
-
setLoading(
|
|
44
|
+
setLoading(newStopToken: string): void;
|
|
64
45
|
setMessage(messageText: string): void;
|
|
65
|
-
setRendered(props:
|
|
66
|
-
reactElement: React.ReactElement;
|
|
67
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
68
|
-
layout: any;
|
|
69
|
-
maxHeightReached: boolean;
|
|
70
|
-
renderProps: any;
|
|
71
|
-
} | undefined): void;
|
|
46
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
72
47
|
setError(error: unknown): void;
|
|
73
48
|
reload(): void;
|
|
74
49
|
beforeDestroy(): void;
|
|
@@ -215,14 +190,15 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
215
190
|
readonly regionTooLarge: boolean;
|
|
216
191
|
readonly regionTooLargeReason: string;
|
|
217
192
|
} & {
|
|
193
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
218
194
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
219
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
195
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
220
196
|
} & {
|
|
221
197
|
featureIdUnderMouse: undefined | string;
|
|
222
198
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
223
199
|
} & {
|
|
224
|
-
readonly DisplayMessageComponent:
|
|
225
|
-
readonly blockType: "
|
|
200
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
201
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
226
202
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
227
203
|
} & {
|
|
228
204
|
readonly renderDelay: number;
|
|
@@ -249,7 +225,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
249
225
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
250
226
|
renderProps(): any;
|
|
251
227
|
} & {
|
|
252
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
228
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
253
229
|
afterAttach(): void;
|
|
254
230
|
} & {
|
|
255
231
|
message: undefined | string;
|
|
@@ -258,7 +234,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
258
234
|
scoreMin: number;
|
|
259
235
|
scoreMax: number;
|
|
260
236
|
} | undefined;
|
|
261
|
-
statsFetchInProgress: undefined |
|
|
237
|
+
statsFetchInProgress: undefined | string;
|
|
262
238
|
} & {
|
|
263
239
|
updateQuantitativeStats(stats: {
|
|
264
240
|
currStatsBpPerPx: number;
|
|
@@ -268,7 +244,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
268
244
|
setColor(color?: string): void;
|
|
269
245
|
setPosColor(color?: string): void;
|
|
270
246
|
setNegColor(color?: string): void;
|
|
271
|
-
setStatsLoading(
|
|
247
|
+
setStatsLoading(arg?: string): void;
|
|
272
248
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
273
249
|
setResolution(res: number): void;
|
|
274
250
|
setFill(fill: number): void;
|
|
@@ -365,7 +341,17 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
365
341
|
readonly quantitativeStatsReady: boolean;
|
|
366
342
|
} & {
|
|
367
343
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
344
|
+
type: string;
|
|
345
|
+
label?: undefined;
|
|
346
|
+
icon?: undefined;
|
|
347
|
+
subMenu?: undefined;
|
|
348
|
+
onClick?: undefined;
|
|
349
|
+
checked?: undefined;
|
|
350
|
+
} | {
|
|
368
351
|
label: string;
|
|
352
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
353
|
+
muiName: string;
|
|
354
|
+
};
|
|
369
355
|
subMenu: ({
|
|
370
356
|
label: string;
|
|
371
357
|
subMenu: {
|
|
@@ -388,8 +374,8 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
388
374
|
subMenu?: undefined;
|
|
389
375
|
})[];
|
|
390
376
|
type?: undefined;
|
|
391
|
-
checked?: undefined;
|
|
392
377
|
onClick?: undefined;
|
|
378
|
+
checked?: undefined;
|
|
393
379
|
} | {
|
|
394
380
|
label: string;
|
|
395
381
|
subMenu: {
|
|
@@ -399,10 +385,23 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
399
385
|
onClick: () => void;
|
|
400
386
|
}[];
|
|
401
387
|
type?: undefined;
|
|
402
|
-
|
|
388
|
+
icon?: undefined;
|
|
403
389
|
onClick?: undefined;
|
|
390
|
+
checked?: undefined;
|
|
391
|
+
} | {
|
|
392
|
+
label: string;
|
|
393
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
394
|
+
muiName: string;
|
|
395
|
+
};
|
|
396
|
+
onClick: () => void;
|
|
397
|
+
type?: undefined;
|
|
398
|
+
subMenu?: undefined;
|
|
399
|
+
checked?: undefined;
|
|
404
400
|
} | {
|
|
405
401
|
type: string;
|
|
402
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
403
|
+
muiName: string;
|
|
404
|
+
};
|
|
406
405
|
label: string;
|
|
407
406
|
checked: boolean;
|
|
408
407
|
onClick: () => void;
|
|
@@ -410,7 +409,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
410
409
|
})[];
|
|
411
410
|
} & {
|
|
412
411
|
afterAttach(): void;
|
|
413
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
412
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
414
413
|
} & {
|
|
415
414
|
setGCContentParams({ windowSize, windowDelta, }: {
|
|
416
415
|
windowSize: number;
|
|
@@ -421,5 +420,5 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
421
420
|
readonly windowDeltaSetting: any;
|
|
422
421
|
} & {
|
|
423
422
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
424
|
-
|
|
423
|
+
adapterProps(): any;
|
|
425
424
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -5,18 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = stateModelF;
|
|
7
7
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
-
// locals
|
|
9
8
|
const shared_1 = __importDefault(require("./shared"));
|
|
10
|
-
/**
|
|
11
|
-
* #stateModel LinearGCContentTrackDisplay
|
|
12
|
-
* #category display
|
|
13
|
-
*
|
|
14
|
-
* used on GCContentTrack, separately from the display type on the
|
|
15
|
-
* ReferenceSequenceTrack
|
|
16
|
-
*
|
|
17
|
-
* extends
|
|
18
|
-
* - [SharedGCContentModel](../sharedgccontentmodel)
|
|
19
|
-
*/
|
|
20
9
|
function stateModelF(pluginManager, configSchema) {
|
|
21
10
|
return mobx_state_tree_1.types.compose('LinearGCContentTrackDisplay', (0, shared_1.default)(pluginManager, configSchema), mobx_state_tree_1.types.model({
|
|
22
11
|
type: mobx_state_tree_1.types.literal('LinearGCContentTrackDisplay'),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class GCContentPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
7
|
-
// locals
|
|
8
7
|
const GCContentAdapter_1 = __importDefault(require("./GCContentAdapter"));
|
|
9
8
|
const GCContentTrack_1 = __importDefault(require("./GCContentTrack"));
|
|
10
9
|
const LinearGCContentDisplay_1 = __importDefault(require("./LinearGCContentDisplay"));
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter
|
|
2
|
-
import {
|
|
1
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
3
4
|
export default class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
4
5
|
private gcMode;
|
|
5
6
|
static capabilities: string[];
|
|
6
7
|
configure(): Promise<BaseFeatureDataAdapter>;
|
|
7
|
-
getRefNames(): Promise<string[]>;
|
|
8
|
-
getFeatures(query: Region, opts
|
|
9
|
-
/**
|
|
10
|
-
* called to provide a hint that data tied to a certain region
|
|
11
|
-
* will not be needed for the foreseeable future and can be purged
|
|
12
|
-
* from caches, etc
|
|
13
|
-
*/
|
|
8
|
+
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
9
|
+
getFeatures(query: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
14
10
|
freeResources(): void;
|
|
15
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter
|
|
2
|
-
import {
|
|
1
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import { SimpleFeature, updateStatus } from '@jbrowse/core/util';
|
|
3
3
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
|
+
import { firstValueFrom } from 'rxjs';
|
|
5
6
|
import { toArray } from 'rxjs/operators';
|
|
6
7
|
class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
7
8
|
constructor() {
|
|
@@ -16,71 +17,76 @@ class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
|
16
17
|
}
|
|
17
18
|
return adapter.dataAdapter;
|
|
18
19
|
}
|
|
19
|
-
async getRefNames() {
|
|
20
|
+
async getRefNames(opts) {
|
|
20
21
|
const adapter = await this.configure();
|
|
21
|
-
return adapter.getRefNames();
|
|
22
|
+
return adapter.getRefNames(opts);
|
|
22
23
|
}
|
|
23
24
|
getFeatures(query, opts) {
|
|
25
|
+
const { statusCallback = () => { }, stopToken } = opts || {};
|
|
24
26
|
return ObservableCreate(async (observer) => {
|
|
25
27
|
var _a;
|
|
26
28
|
const sequenceAdapter = await this.configure();
|
|
27
29
|
const windowSize = this.getConf('windowSize');
|
|
28
30
|
const windowDelta = this.getConf('windowDelta');
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (queryEnd < 0 || queryStart > queryEnd) {
|
|
31
|
+
const halfWindowSize = windowSize === 1 ? 1 : Math.ceil(windowSize / 2);
|
|
32
|
+
const isWindowSizeOneBp = windowSize === 1;
|
|
33
|
+
const qs = Math.max(0, Math.floor((query.start - halfWindowSize) / windowSize) * windowSize);
|
|
34
|
+
const qe = Math.ceil((query.end + halfWindowSize) / windowSize) * windowSize;
|
|
35
|
+
if (qe < 0 || qs > qe) {
|
|
35
36
|
observer.complete();
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
const
|
|
39
|
+
const feats = await firstValueFrom(sequenceAdapter
|
|
40
|
+
.getFeatures({
|
|
39
41
|
...query,
|
|
40
|
-
start:
|
|
41
|
-
end:
|
|
42
|
-
}, opts)
|
|
43
|
-
|
|
42
|
+
start: qs,
|
|
43
|
+
end: qe,
|
|
44
|
+
}, opts)
|
|
45
|
+
.pipe(toArray()));
|
|
44
46
|
const residues = ((_a = feats[0]) === null || _a === void 0 ? void 0 : _a.get('seq')) || '';
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (letter === 'c' || letter === 'C') {
|
|
52
|
-
nc++;
|
|
47
|
+
let start = performance.now();
|
|
48
|
+
await updateStatus('Calculating GC', statusCallback, () => {
|
|
49
|
+
for (let i = halfWindowSize; i < residues.length - halfWindowSize; i += windowDelta) {
|
|
50
|
+
if (performance.now() - start > 400) {
|
|
51
|
+
checkStopToken(stopToken);
|
|
52
|
+
start = performance.now();
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
const r = isWindowSizeOneBp
|
|
55
|
+
? residues[i]
|
|
56
|
+
: residues.slice(i - halfWindowSize, i + halfWindowSize);
|
|
57
|
+
let nc = 0;
|
|
58
|
+
let ng = 0;
|
|
59
|
+
let len = 0;
|
|
60
|
+
for (const letter of r) {
|
|
61
|
+
if (letter === 'c' || letter === 'C') {
|
|
62
|
+
nc++;
|
|
63
|
+
}
|
|
64
|
+
else if (letter === 'g' || letter === 'G') {
|
|
65
|
+
ng++;
|
|
66
|
+
}
|
|
67
|
+
if (letter !== 'N') {
|
|
68
|
+
len++;
|
|
69
|
+
}
|
|
59
70
|
}
|
|
71
|
+
const pos = qs;
|
|
72
|
+
const score = this.gcMode === 'content'
|
|
73
|
+
? (ng + nc) / (len || 1)
|
|
74
|
+
: this.gcMode === 'skew'
|
|
75
|
+
? (ng - nc) / (ng + nc || 1)
|
|
76
|
+
: 0;
|
|
77
|
+
observer.next(new SimpleFeature({
|
|
78
|
+
uniqueId: `${this.id}_${pos + i}`,
|
|
79
|
+
refName: query.refName,
|
|
80
|
+
start: pos + i,
|
|
81
|
+
end: pos + i + windowDelta,
|
|
82
|
+
score,
|
|
83
|
+
}));
|
|
60
84
|
}
|
|
61
|
-
|
|
62
|
-
const score = this.gcMode === 'content'
|
|
63
|
-
? (ng + nc) / (len || 1)
|
|
64
|
-
: this.gcMode === 'skew'
|
|
65
|
-
? (ng - nc) / (ng + nc || 1)
|
|
66
|
-
: 0;
|
|
67
|
-
observer.next(new SimpleFeature({
|
|
68
|
-
uniqueId: `${this.id}_${pos + i}`,
|
|
69
|
-
refName: query.refName,
|
|
70
|
-
start: pos + i,
|
|
71
|
-
end: pos + i + windowDelta,
|
|
72
|
-
score,
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
85
|
+
});
|
|
75
86
|
observer.complete();
|
|
76
87
|
});
|
|
77
88
|
}
|
|
78
|
-
|
|
79
|
-
* called to provide a hint that data tied to a certain region
|
|
80
|
-
* will not be needed for the foreseeable future and can be purged
|
|
81
|
-
* from caches, etc
|
|
82
|
-
*/
|
|
83
|
-
freeResources( /* { region } */) { }
|
|
89
|
+
freeResources() { }
|
|
84
90
|
}
|
|
85
91
|
GCContentAdapter.capabilities = ['hasLocalStats'];
|
|
86
92
|
export default GCContentAdapter;
|