@jbrowse/plugin-linear-genome-view 2.8.0 → 2.10.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/BaseLinearDisplay/components/Tooltip.js +18 -50
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +4 -16
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +8 -1
- package/dist/BasicTrack/configSchema.d.ts +5 -0
- package/dist/FeatureTrack/configSchema.d.ts +5 -0
- package/dist/LaunchLinearGenomeView/index.js +16 -14
- package/dist/LinearBareDisplay/model.d.ts +8 -11
- package/dist/LinearBareDisplay/model.js +2 -1
- package/dist/LinearBasicDisplay/model.d.ts +30 -33
- package/dist/LinearBasicDisplay/model.js +3 -0
- package/dist/LinearGenomeView/components/CenterLine.js +1 -1
- package/dist/LinearGenomeView/components/Cytobands.d.ts +18 -6
- package/dist/LinearGenomeView/components/Cytobands.js +8 -2
- package/dist/LinearGenomeView/components/ImportForm.js +26 -74
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +12 -0
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +29 -0
- package/dist/LinearGenomeView/components/OverviewScalebar.js +1 -1
- package/dist/LinearGenomeView/components/SearchBox.js +19 -56
- package/dist/LinearGenomeView/components/TracksContainer.js +1 -1
- package/dist/LinearGenomeView/model.d.ts +18 -2
- package/dist/LinearGenomeView/model.js +19 -0
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +11 -13
- package/dist/LinearGenomeView/svgcomponents/util.d.ts +8 -0
- package/dist/LinearGenomeView/svgcomponents/util.js +9 -0
- package/dist/index.d.ts +776 -7
- package/dist/index.js +5 -4
- package/dist/searchUtils.d.ts +26 -0
- package/dist/searchUtils.js +90 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +16 -28
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +4 -16
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +8 -1
- package/esm/BasicTrack/configSchema.d.ts +5 -0
- package/esm/FeatureTrack/configSchema.d.ts +5 -0
- package/esm/LaunchLinearGenomeView/index.js +16 -14
- package/esm/LinearBareDisplay/model.d.ts +8 -11
- package/esm/LinearBareDisplay/model.js +2 -1
- package/esm/LinearBasicDisplay/model.d.ts +30 -33
- package/esm/LinearBasicDisplay/model.js +3 -0
- package/esm/LinearGenomeView/components/CenterLine.js +1 -1
- package/esm/LinearGenomeView/components/Cytobands.d.ts +18 -6
- package/esm/LinearGenomeView/components/Cytobands.js +8 -2
- package/esm/LinearGenomeView/components/ImportForm.js +26 -74
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +12 -0
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +24 -0
- package/esm/LinearGenomeView/components/OverviewScalebar.js +1 -1
- package/esm/LinearGenomeView/components/SearchBox.js +20 -57
- package/esm/LinearGenomeView/components/TracksContainer.js +1 -1
- package/esm/LinearGenomeView/model.d.ts +18 -2
- package/esm/LinearGenomeView/model.js +19 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +0 -7
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +9 -10
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/util.js +5 -0
- package/esm/index.d.ts +776 -7
- package/esm/index.js +4 -3
- package/esm/searchUtils.d.ts +26 -0
- package/esm/searchUtils.js +79 -0
- package/package.json +4 -6
package/dist/index.js
CHANGED
|
@@ -26,9 +26,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.linearBasicDisplayModelFactory = exports.linearBasicDisplayConfigSchemaFactory = exports.
|
|
29
|
+
exports.linearBasicDisplayModelFactory = exports.linearBasicDisplayConfigSchemaFactory = exports.totalHeight = exports.SVGRuler = exports.SVGTracks = exports.renderToSvg = exports.SearchBox = exports.RefNameAutocomplete = exports.TooLargeMessage = exports.FeatureDensityMixin = exports.TrackHeightMixin = exports.BaseLinearDisplayComponent = exports.BlockMsg = exports.BaseLinearDisplay = exports.baseLinearDisplayConfigSchema = exports.linearBareDisplayConfigSchemaFactory = void 0;
|
|
30
30
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
31
31
|
const util_1 = require("@jbrowse/core/util");
|
|
32
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
33
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
32
34
|
// icons
|
|
33
35
|
const LineStyle_1 = __importDefault(require("@mui/icons-material/LineStyle"));
|
|
34
36
|
// locals
|
|
@@ -39,8 +41,6 @@ const LinearBasicDisplay_1 = __importDefault(require("./LinearBasicDisplay"));
|
|
|
39
41
|
const FeatureTrack_1 = __importDefault(require("./FeatureTrack"));
|
|
40
42
|
const BasicTrack_1 = __importDefault(require("./BasicTrack"));
|
|
41
43
|
const LaunchLinearGenomeView_1 = __importDefault(require("./LaunchLinearGenomeView"));
|
|
42
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
43
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
44
44
|
class LinearGenomeViewPlugin extends Plugin_1.default {
|
|
45
45
|
constructor() {
|
|
46
46
|
super(...arguments);
|
|
@@ -108,8 +108,9 @@ Object.defineProperty(exports, "SearchBox", { enumerable: true, get: function ()
|
|
|
108
108
|
var SVGLinearGenomeView_1 = require("./LinearGenomeView/svgcomponents/SVGLinearGenomeView");
|
|
109
109
|
Object.defineProperty(exports, "renderToSvg", { enumerable: true, get: function () { return SVGLinearGenomeView_1.renderToSvg; } });
|
|
110
110
|
Object.defineProperty(exports, "SVGTracks", { enumerable: true, get: function () { return SVGLinearGenomeView_1.SVGTracks; } });
|
|
111
|
-
Object.defineProperty(exports, "totalHeight", { enumerable: true, get: function () { return SVGLinearGenomeView_1.totalHeight; } });
|
|
112
111
|
Object.defineProperty(exports, "SVGRuler", { enumerable: true, get: function () { return SVGLinearGenomeView_1.SVGRuler; } });
|
|
112
|
+
var util_2 = require("./LinearGenomeView/svgcomponents/util");
|
|
113
|
+
Object.defineProperty(exports, "totalHeight", { enumerable: true, get: function () { return util_2.totalHeight; } });
|
|
113
114
|
var LinearBasicDisplay_2 = require("./LinearBasicDisplay");
|
|
114
115
|
Object.defineProperty(exports, "linearBasicDisplayConfigSchemaFactory", { enumerable: true, get: function () { return LinearBasicDisplay_2.configSchema; } });
|
|
115
116
|
Object.defineProperty(exports, "linearBasicDisplayModelFactory", { enumerable: true, get: function () { return LinearBasicDisplay_2.modelFactory; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
+
import { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
+
import { SearchType } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
|
+
import { SearchScope } from '@jbrowse/core/TextSearch/TextSearchManager';
|
|
5
|
+
import { TextSearchManager } from '@jbrowse/core/util';
|
|
6
|
+
import { LinearGenomeViewModel } from './LinearGenomeView';
|
|
7
|
+
export declare function navToOption({ option, model, assemblyName, }: {
|
|
8
|
+
model: LinearGenomeViewModel;
|
|
9
|
+
option: BaseResult;
|
|
10
|
+
assemblyName: string;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
export declare function handleSelectedRegion({ input, model, assembly, }: {
|
|
13
|
+
input: string;
|
|
14
|
+
model: LinearGenomeViewModel;
|
|
15
|
+
assembly: Assembly;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
export declare function checkRef(str: string, allRefs: string[]): boolean;
|
|
18
|
+
export declare function fetchResults({ queryString, searchType, searchScope, rankSearchResults, textSearchManager, assembly, }: {
|
|
19
|
+
queryString: string;
|
|
20
|
+
searchScope: SearchScope;
|
|
21
|
+
rankSearchResults: (results: BaseResult[]) => BaseResult[];
|
|
22
|
+
searchType?: SearchType;
|
|
23
|
+
textSearchManager?: TextSearchManager;
|
|
24
|
+
assembly?: Assembly;
|
|
25
|
+
}): Promise<BaseResult[]>;
|
|
26
|
+
export declare function splitLast(str: string, split: string): [string, string];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.splitLast = exports.fetchResults = exports.checkRef = exports.handleSelectedRegion = exports.navToOption = void 0;
|
|
7
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const BaseResults_1 = __importDefault(require("@jbrowse/core/TextSearch/BaseResults"));
|
|
9
|
+
const util_2 = require("@jbrowse/core/util");
|
|
10
|
+
async function navToOption({ option, model, assemblyName, }) {
|
|
11
|
+
const location = option.getLocation();
|
|
12
|
+
const trackId = option.getTrackId();
|
|
13
|
+
if (location) {
|
|
14
|
+
await model.navToLocString(location, assemblyName);
|
|
15
|
+
if (trackId) {
|
|
16
|
+
model.showTrack(trackId);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.navToOption = navToOption;
|
|
21
|
+
// gets a string as input, or use stored option results from previous query,
|
|
22
|
+
// then re-query and
|
|
23
|
+
// 1) if it has multiple results: pop a dialog
|
|
24
|
+
// 2) if it's a single result navigate to it
|
|
25
|
+
// 3) else assume it's a locstring and navigate to it
|
|
26
|
+
async function handleSelectedRegion({ input, model, assembly, }) {
|
|
27
|
+
const allRefs = (assembly === null || assembly === void 0 ? void 0 : assembly.allRefNamesWithLowerCase) || [];
|
|
28
|
+
const assemblyName = assembly.name;
|
|
29
|
+
if (input.split(' ').every(entry => checkRef(entry, allRefs))) {
|
|
30
|
+
await model.navToLocString(input, assembly.name);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const searchScope = model.searchScope(assemblyName);
|
|
34
|
+
const { textSearchManager } = (0, util_1.getSession)(model);
|
|
35
|
+
const results = await fetchResults({
|
|
36
|
+
queryString: input,
|
|
37
|
+
searchType: 'exact',
|
|
38
|
+
searchScope,
|
|
39
|
+
rankSearchResults: model.rankSearchResults,
|
|
40
|
+
textSearchManager,
|
|
41
|
+
assembly,
|
|
42
|
+
});
|
|
43
|
+
if (results.length > 1) {
|
|
44
|
+
model.setSearchResults(results, input.toLowerCase(), assemblyName);
|
|
45
|
+
}
|
|
46
|
+
else if (results.length === 1) {
|
|
47
|
+
await navToOption({
|
|
48
|
+
option: results[0],
|
|
49
|
+
model,
|
|
50
|
+
assemblyName,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
await model.navToLocString(input, assemblyName);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.handleSelectedRegion = handleSelectedRegion;
|
|
59
|
+
function checkRef(str, allRefs) {
|
|
60
|
+
const [ref, rest] = splitLast(str, ':');
|
|
61
|
+
return (allRefs.includes(str) ||
|
|
62
|
+
(allRefs.includes(ref) && !Number.isNaN(Number.parseInt(rest, 10))));
|
|
63
|
+
}
|
|
64
|
+
exports.checkRef = checkRef;
|
|
65
|
+
async function fetchResults({ queryString, searchType, searchScope, rankSearchResults, textSearchManager, assembly, }) {
|
|
66
|
+
var _a;
|
|
67
|
+
if (!textSearchManager) {
|
|
68
|
+
console.warn('No text search manager');
|
|
69
|
+
}
|
|
70
|
+
const textSearchResults = await (textSearchManager === null || textSearchManager === void 0 ? void 0 : textSearchManager.search({
|
|
71
|
+
queryString,
|
|
72
|
+
searchType,
|
|
73
|
+
}, searchScope, rankSearchResults));
|
|
74
|
+
const refNameResults = (_a = assembly === null || assembly === void 0 ? void 0 : assembly.allRefNames) === null || _a === void 0 ? void 0 : _a.filter(ref => ref.toLowerCase().startsWith(queryString.toLowerCase())).slice(0, 10).map(r => new BaseResults_1.default({ label: r }));
|
|
75
|
+
return (0, util_2.dedupe)([...(refNameResults || []), ...(textSearchResults || [])], elt => elt.getId());
|
|
76
|
+
}
|
|
77
|
+
exports.fetchResults = fetchResults;
|
|
78
|
+
// splits on the last instance of a character
|
|
79
|
+
function splitLast(str, split) {
|
|
80
|
+
const lastIndex = str.lastIndexOf(split);
|
|
81
|
+
if (lastIndex === -1) {
|
|
82
|
+
return [str, ''];
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const before = str.slice(0, lastIndex);
|
|
86
|
+
const after = str.slice(lastIndex + 1);
|
|
87
|
+
return [before, after];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.splitLast = splitLast;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
3
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import { Portal, alpha } from '@mui/material';
|
|
6
6
|
import { makeStyles } from 'tss-react/mui';
|
|
7
|
-
import {
|
|
7
|
+
import { useClientPoint, useFloating, useInteractions, } from '@floating-ui/react';
|
|
8
8
|
function round(value) {
|
|
9
9
|
return Math.round(value * 1e5) / 1e5;
|
|
10
10
|
}
|
|
@@ -27,39 +27,27 @@ const useStyles = makeStyles()(theme => ({
|
|
|
27
27
|
const TooltipContents = React.forwardRef(function TooltipContents2({ message }, ref) {
|
|
28
28
|
return (React.createElement("div", { ref: ref }, React.isValidElement(message) ? (message) : message ? (React.createElement(SanitizedHTML, { html: String(message) })) : null));
|
|
29
29
|
});
|
|
30
|
-
const Tooltip = observer(({ model, clientMouseCoord, })
|
|
30
|
+
const Tooltip = observer(function ({ model, clientMouseCoord, }) {
|
|
31
31
|
var _a, _b;
|
|
32
32
|
const { theme, classes } = useStyles();
|
|
33
33
|
const { featureUnderMouse } = model;
|
|
34
|
-
const [
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
top: y,
|
|
43
|
-
left: x,
|
|
44
|
-
bottom: y,
|
|
45
|
-
right: x,
|
|
46
|
-
width: 0,
|
|
47
|
-
height: 0,
|
|
48
|
-
x,
|
|
49
|
-
y,
|
|
50
|
-
toJSON() { },
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
}), [clientMouseCoord, width]);
|
|
54
|
-
const { styles, attributes } = usePopper(virtElement, popperElt);
|
|
34
|
+
const x = clientMouseCoord[0] + 15;
|
|
35
|
+
const y = clientMouseCoord[1];
|
|
36
|
+
const { refs, floatingStyles, context } = useFloating({
|
|
37
|
+
placement: 'right',
|
|
38
|
+
});
|
|
39
|
+
const clientPoint = useClientPoint(context, { x, y });
|
|
40
|
+
const { getFloatingProps } = useInteractions([clientPoint]);
|
|
55
41
|
const contents = featureUnderMouse
|
|
56
42
|
? getConf(model, 'mouseover', { feature: featureUnderMouse })
|
|
57
43
|
: undefined;
|
|
58
44
|
const popperTheme = (_a = theme === null || theme === void 0 ? void 0 : theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
|
|
59
45
|
return featureUnderMouse && contents ? (React.createElement(Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
|
|
60
|
-
React.createElement("div", {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
React.createElement("div", { className: classes.tooltip, ref: refs.setFloating, style: {
|
|
47
|
+
...floatingStyles,
|
|
48
|
+
zIndex: 100000,
|
|
49
|
+
pointerEvents: 'none',
|
|
50
|
+
}, ...getFloatingProps() },
|
|
51
|
+
React.createElement(TooltipContents, { message: contents })))) : null;
|
|
64
52
|
});
|
|
65
53
|
export default Tooltip;
|
|
@@ -69,11 +69,7 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
69
69
|
setMessage(messageText: string): void;
|
|
70
70
|
setRendered(props: {
|
|
71
71
|
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
72
|
-
features: Map<string, Feature>;
|
|
73
|
-
* #getter
|
|
74
|
-
* a CompositeMap of `featureId -> feature obj` that
|
|
75
|
-
* just looks in all the block data for that feature
|
|
76
|
-
*/
|
|
72
|
+
features: Map<string, Feature>;
|
|
77
73
|
layout: any;
|
|
78
74
|
maxHeightReached: boolean;
|
|
79
75
|
renderProps: any;
|
|
@@ -132,9 +128,7 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
132
128
|
message: string | undefined;
|
|
133
129
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
134
130
|
onHorizontalScroll?: Function | undefined;
|
|
135
|
-
blockState?: Record<string, any> | undefined;
|
|
136
|
-
* #property
|
|
137
|
-
*/
|
|
131
|
+
blockState?: Record<string, any> | undefined;
|
|
138
132
|
}>;
|
|
139
133
|
readonly DisplayBlurb: React.FC<{
|
|
140
134
|
model: {
|
|
@@ -142,9 +136,7 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
142
136
|
type: string;
|
|
143
137
|
rpcDriverName: string | undefined;
|
|
144
138
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
145
|
-
rendererTypeName: string;
|
|
146
|
-
* #getter
|
|
147
|
-
*/
|
|
139
|
+
rendererTypeName: string;
|
|
148
140
|
error: unknown;
|
|
149
141
|
message: string | undefined;
|
|
150
142
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -361,11 +353,7 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
361
353
|
setMessage(messageText: string): void;
|
|
362
354
|
setRendered(props: {
|
|
363
355
|
reactElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
364
|
-
features: Map<string, Feature>;
|
|
365
|
-
* #getter
|
|
366
|
-
* a CompositeMap of `featureId -> feature obj` that
|
|
367
|
-
* just looks in all the block data for that feature
|
|
368
|
-
*/
|
|
356
|
+
features: Map<string, Feature>;
|
|
369
357
|
layout: any;
|
|
370
358
|
maxHeightReached: boolean;
|
|
371
359
|
renderProps: any;
|
|
@@ -15,7 +15,14 @@ import FeatureDensityMixin from './FeatureDensityMixin';
|
|
|
15
15
|
/**
|
|
16
16
|
* #stateModel BaseLinearDisplay
|
|
17
17
|
* #category display
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* BaseLinearDisplay is used as the basis for many linear genome view tracks.
|
|
20
|
+
* It is block based, and can use 'static blocks' or 'dynamic blocks'
|
|
21
|
+
*
|
|
22
|
+
* extends
|
|
23
|
+
* - [BaseDisplay](../basedisplay)
|
|
24
|
+
* - [TrackHeightMixin](../trackheightmixin)
|
|
25
|
+
* - [FeatureDensityMixin](../featuredensitymixin)
|
|
19
26
|
*/
|
|
20
27
|
function stateModelFactory() {
|
|
21
28
|
return types
|
|
@@ -58,6 +58,11 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
58
58
|
defaultValue: number;
|
|
59
59
|
description: string;
|
|
60
60
|
};
|
|
61
|
+
maxDepth: {
|
|
62
|
+
type: string;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
61
66
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
62
67
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
63
68
|
config: {
|
|
@@ -58,6 +58,11 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
58
58
|
defaultValue: number;
|
|
59
59
|
description: string;
|
|
60
60
|
};
|
|
61
|
+
maxDepth: {
|
|
62
|
+
type: string;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
61
66
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
62
67
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
63
68
|
config: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { when } from '@jbrowse/core/util';
|
|
2
|
+
import { handleSelectedRegion } from '..//searchUtils';
|
|
2
3
|
export default (pluginManager) => {
|
|
3
4
|
pluginManager.addToExtensionPoint('LaunchView-LinearGenomeView',
|
|
4
5
|
// @ts-expect-error
|
|
@@ -14,21 +15,9 @@ export default (pluginManager) => {
|
|
|
14
15
|
if (!asm) {
|
|
15
16
|
throw new Error(`Assembly "${assembly}" not found when launching linear genome view`);
|
|
16
17
|
}
|
|
17
|
-
await
|
|
18
|
+
await handleSelectedRegion({ input: loc, model: view, assembly: asm });
|
|
18
19
|
const idsNotFound = [];
|
|
19
|
-
tracks.forEach(track =>
|
|
20
|
-
try {
|
|
21
|
-
view.showTrack(track);
|
|
22
|
-
}
|
|
23
|
-
catch (e) {
|
|
24
|
-
if (`${e}`.match('Could not resolve identifier')) {
|
|
25
|
-
idsNotFound.push(track);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
throw e;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
20
|
+
tracks.forEach(track => tryTrack(view, track, idsNotFound));
|
|
32
21
|
if (idsNotFound.length) {
|
|
33
22
|
throw new Error(`Could not resolve identifiers: ${idsNotFound.join(',')}`);
|
|
34
23
|
}
|
|
@@ -39,3 +28,16 @@ export default (pluginManager) => {
|
|
|
39
28
|
}
|
|
40
29
|
});
|
|
41
30
|
};
|
|
31
|
+
function tryTrack(model, trackId, idsNotFound) {
|
|
32
|
+
try {
|
|
33
|
+
model.showTrack(trackId);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
if (`${e}`.match('Could not resolve identifier')) {
|
|
37
|
+
idsNotFound.push(trackId);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
throw e;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -3,7 +3,8 @@ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
|
3
3
|
/**
|
|
4
4
|
* #stateModel LinearBareDisplay
|
|
5
5
|
* #category display
|
|
6
|
-
* extends
|
|
6
|
+
* extends
|
|
7
|
+
* - [BaseLinearDisplay](../baselineardisplay)
|
|
7
8
|
*/
|
|
8
9
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
9
10
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -76,9 +77,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
76
77
|
type: string;
|
|
77
78
|
defaultValue: number;
|
|
78
79
|
description: string;
|
|
79
|
-
};
|
|
80
|
-
* #getter
|
|
81
|
-
*/
|
|
80
|
+
};
|
|
82
81
|
mouseover: {
|
|
83
82
|
type: string;
|
|
84
83
|
description: string;
|
|
@@ -98,9 +97,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
98
97
|
}, {
|
|
99
98
|
rendererTypeName: string;
|
|
100
99
|
error: unknown;
|
|
101
|
-
message: string | undefined;
|
|
102
|
-
* #property
|
|
103
|
-
*/
|
|
100
|
+
message: string | undefined;
|
|
104
101
|
} & {
|
|
105
102
|
readonly RenderingComponent: import("react").FC<{
|
|
106
103
|
model: {
|
|
@@ -160,7 +157,9 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
160
157
|
} & {
|
|
161
158
|
readonly height: number;
|
|
162
159
|
} & {
|
|
163
|
-
setScrollTop(scrollTop: number): void;
|
|
160
|
+
setScrollTop(scrollTop: number): void; /**
|
|
161
|
+
* #method
|
|
162
|
+
*/
|
|
164
163
|
setHeight(displayHeight: number): number;
|
|
165
164
|
resizeHeight(distance: number): number;
|
|
166
165
|
} & {
|
|
@@ -303,9 +302,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
303
302
|
type: string;
|
|
304
303
|
defaultValue: number;
|
|
305
304
|
description: string;
|
|
306
|
-
};
|
|
307
|
-
* #getter
|
|
308
|
-
*/
|
|
305
|
+
};
|
|
309
306
|
mouseover: {
|
|
310
307
|
type: string;
|
|
311
308
|
description: string;
|
|
@@ -5,7 +5,8 @@ import { BaseLinearDisplay } from '../BaseLinearDisplay';
|
|
|
5
5
|
/**
|
|
6
6
|
* #stateModel LinearBareDisplay
|
|
7
7
|
* #category display
|
|
8
|
-
* extends
|
|
8
|
+
* extends
|
|
9
|
+
* - [BaseLinearDisplay](../baselineardisplay)
|
|
9
10
|
*/
|
|
10
11
|
export function stateModelFactory(configSchema) {
|
|
11
12
|
return types
|
|
@@ -7,6 +7,9 @@ import { Instance } from 'mobx-state-tree';
|
|
|
7
7
|
* #category display
|
|
8
8
|
* used by `FeatureTrack`, has simple settings like "show/hide feature labels",
|
|
9
9
|
* etc.
|
|
10
|
+
*
|
|
11
|
+
* extends
|
|
12
|
+
* - [BaseLinearDisplay](../baselineardisplay)
|
|
10
13
|
*/
|
|
11
14
|
declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
12
15
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -34,7 +37,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
34
37
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
38
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
36
39
|
}, {
|
|
37
|
-
renderInProgress: AbortController | undefined;
|
|
40
|
+
renderInProgress: AbortController | undefined; /**
|
|
41
|
+
* #property
|
|
42
|
+
*/
|
|
38
43
|
filled: boolean;
|
|
39
44
|
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
40
45
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -52,9 +57,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
52
57
|
afterAttach(): void;
|
|
53
58
|
setStatus(message: string): void;
|
|
54
59
|
setLoading(abortController: AbortController): void;
|
|
55
|
-
setMessage(messageText: string): void;
|
|
56
|
-
* #method
|
|
57
|
-
*/
|
|
60
|
+
setMessage(messageText: string): void;
|
|
58
61
|
setRendered(props: {
|
|
59
62
|
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
60
63
|
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
@@ -81,15 +84,11 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
81
84
|
type: string;
|
|
82
85
|
defaultValue: number;
|
|
83
86
|
description: string;
|
|
84
|
-
};
|
|
85
|
-
* #property
|
|
86
|
-
*/
|
|
87
|
+
};
|
|
87
88
|
mouseover: {
|
|
88
89
|
type: string;
|
|
89
90
|
description: string;
|
|
90
|
-
defaultValue: string;
|
|
91
|
-
* #property
|
|
92
|
-
*/
|
|
91
|
+
defaultValue: string;
|
|
93
92
|
contextVariable: string[];
|
|
94
93
|
};
|
|
95
94
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
@@ -127,9 +126,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
127
126
|
model: {
|
|
128
127
|
id: string;
|
|
129
128
|
type: string;
|
|
130
|
-
rpcDriverName: string | undefined;
|
|
131
|
-
* #property
|
|
132
|
-
*/
|
|
129
|
+
rpcDriverName: string | undefined;
|
|
133
130
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
134
131
|
rendererTypeName: string;
|
|
135
132
|
error: unknown;
|
|
@@ -160,13 +157,14 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
160
157
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
161
158
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
162
159
|
}, {
|
|
163
|
-
rendererTypeName: string;
|
|
164
|
-
* #action
|
|
165
|
-
*/
|
|
160
|
+
rendererTypeName: string;
|
|
166
161
|
error: unknown;
|
|
167
162
|
message: string | undefined;
|
|
168
163
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
169
164
|
}> | null;
|
|
165
|
+
/**
|
|
166
|
+
* #action
|
|
167
|
+
*/
|
|
170
168
|
readonly adapterConfig: any;
|
|
171
169
|
readonly parentTrack: any;
|
|
172
170
|
renderProps(): any;
|
|
@@ -195,10 +193,11 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
195
193
|
} & {
|
|
196
194
|
readonly currentBytesRequested: number;
|
|
197
195
|
readonly currentFeatureScreenDensity: number;
|
|
198
|
-
|
|
199
|
-
readonly featureDensityStatsReady: boolean; /**
|
|
196
|
+
/**
|
|
200
197
|
* #getter
|
|
201
198
|
*/
|
|
199
|
+
readonly maxFeatureScreenDensity: any;
|
|
200
|
+
readonly featureDensityStatsReady: boolean;
|
|
202
201
|
readonly maxAllowableBytes: number;
|
|
203
202
|
} & {
|
|
204
203
|
afterAttach(): void;
|
|
@@ -219,9 +218,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
219
218
|
featureIdUnderMouse: string | undefined;
|
|
220
219
|
contextMenuFeature: import("@jbrowse/core/util").Feature | undefined;
|
|
221
220
|
} & {
|
|
222
|
-
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
223
|
-
* #getter
|
|
224
|
-
*/
|
|
221
|
+
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
225
222
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
226
223
|
} & {
|
|
227
224
|
readonly renderDelay: number;
|
|
@@ -278,7 +275,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
278
275
|
readonly rendererConfig: {
|
|
279
276
|
[x: string]: any;
|
|
280
277
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
281
|
-
setSubschema(slotName: string, data: unknown): any;
|
|
278
|
+
setSubschema(slotName: string, data: unknown): any; /**
|
|
279
|
+
* #property
|
|
280
|
+
*/
|
|
282
281
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
283
282
|
} & {
|
|
284
283
|
/**
|
|
@@ -305,7 +304,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
305
304
|
config: {
|
|
306
305
|
[x: string]: any;
|
|
307
306
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
308
|
-
setSubschema(slotName: string, data: unknown): any;
|
|
307
|
+
setSubschema(slotName: string, data: unknown): any; /**
|
|
308
|
+
* #property
|
|
309
|
+
*/
|
|
309
310
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
310
311
|
};
|
|
311
312
|
/**
|
|
@@ -340,7 +341,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
340
341
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
341
342
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
342
343
|
}, {
|
|
343
|
-
renderInProgress: AbortController | undefined;
|
|
344
|
+
renderInProgress: AbortController | undefined; /**
|
|
345
|
+
* #property
|
|
346
|
+
*/
|
|
344
347
|
filled: boolean;
|
|
345
348
|
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
346
349
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -358,9 +361,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
358
361
|
afterAttach(): void;
|
|
359
362
|
setStatus(message: string): void;
|
|
360
363
|
setLoading(abortController: AbortController): void;
|
|
361
|
-
setMessage(messageText: string): void;
|
|
362
|
-
* #method
|
|
363
|
-
*/
|
|
364
|
+
setMessage(messageText: string): void;
|
|
364
365
|
setRendered(props: {
|
|
365
366
|
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
366
367
|
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
@@ -387,15 +388,11 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
387
388
|
type: string;
|
|
388
389
|
defaultValue: number;
|
|
389
390
|
description: string;
|
|
390
|
-
};
|
|
391
|
-
* #property
|
|
392
|
-
*/
|
|
391
|
+
};
|
|
393
392
|
mouseover: {
|
|
394
393
|
type: string;
|
|
395
394
|
description: string;
|
|
396
|
-
defaultValue: string;
|
|
397
|
-
* #property
|
|
398
|
-
*/
|
|
395
|
+
defaultValue: string;
|
|
399
396
|
contextVariable: string[];
|
|
400
397
|
};
|
|
401
398
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
@@ -12,6 +12,9 @@ const SetMaxHeightDlg = lazy(() => import('./components/SetMaxHeight'));
|
|
|
12
12
|
* #category display
|
|
13
13
|
* used by `FeatureTrack`, has simple settings like "show/hide feature labels",
|
|
14
14
|
* etc.
|
|
15
|
+
*
|
|
16
|
+
* extends
|
|
17
|
+
* - [BaseLinearDisplay](../baselineardisplay)
|
|
15
18
|
*/
|
|
16
19
|
function stateModelFactory(configSchema) {
|
|
17
20
|
return types
|
|
@@ -5,7 +5,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
5
5
|
centerLineContainer: {
|
|
6
6
|
background: 'transparent',
|
|
7
7
|
height: '100%',
|
|
8
|
-
zIndex: 5,
|
|
8
|
+
zIndex: 5, // above the track but under menu
|
|
9
9
|
position: 'absolute',
|
|
10
10
|
border: `1px ${theme.palette.action.active} dashed`,
|
|
11
11
|
borderTop: 'none',
|
|
@@ -53,11 +53,17 @@ declare const Cytobands: ({ overview, block, assembly, }: {
|
|
|
53
53
|
load(): Promise<void>;
|
|
54
54
|
loadPre(): Promise<void>;
|
|
55
55
|
} & {
|
|
56
|
-
getAdapterMapEntry(adapterConf:
|
|
57
|
-
|
|
56
|
+
getAdapterMapEntry(adapterConf: {
|
|
57
|
+
[x: string]: unknown;
|
|
58
|
+
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameMap>;
|
|
59
|
+
getRefNameMapForAdapter(adapterConf: {
|
|
60
|
+
[x: string]: unknown;
|
|
61
|
+
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
58
62
|
[x: string]: string | undefined;
|
|
59
63
|
}>;
|
|
60
|
-
getReverseRefNameMapForAdapter(adapterConf:
|
|
64
|
+
getReverseRefNameMapForAdapter(adapterConf: {
|
|
65
|
+
[x: string]: unknown;
|
|
66
|
+
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
61
67
|
[x: string]: string | undefined;
|
|
62
68
|
}>;
|
|
63
69
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -109,11 +115,17 @@ declare const Cytobands: ({ overview, block, assembly, }: {
|
|
|
109
115
|
load(): Promise<void>;
|
|
110
116
|
loadPre(): Promise<void>;
|
|
111
117
|
} & {
|
|
112
|
-
getAdapterMapEntry(adapterConf:
|
|
113
|
-
|
|
118
|
+
getAdapterMapEntry(adapterConf: {
|
|
119
|
+
[x: string]: unknown;
|
|
120
|
+
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameMap>;
|
|
121
|
+
getRefNameMapForAdapter(adapterConf: {
|
|
122
|
+
[x: string]: unknown;
|
|
123
|
+
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
114
124
|
[x: string]: string | undefined;
|
|
115
125
|
}>;
|
|
116
|
-
getReverseRefNameMapForAdapter(adapterConf:
|
|
126
|
+
getReverseRefNameMapForAdapter(adapterConf: {
|
|
127
|
+
[x: string]: unknown;
|
|
128
|
+
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
117
129
|
[x: string]: string | undefined;
|
|
118
130
|
}>;
|
|
119
131
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|