@jbrowse/plugin-linear-comparative-view 2.6.2 → 2.7.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/LGVSyntenyDisplay/model.d.ts +29 -78
- package/dist/LGVSyntenyDisplay/model.js +22 -3
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
- package/dist/LinearComparativeDisplay/configSchemaF.js +1 -1
- package/dist/LinearComparativeDisplay/stateModelFactory.js +4 -4
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +2 -2
- package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -1
- package/dist/LinearComparativeView/components/Rubberband.d.ts +4 -5
- package/dist/LinearComparativeView/components/Rubberband.js +3 -3
- package/dist/LinearComparativeView/model.d.ts +6 -6
- package/dist/LinearComparativeView/model.js +5 -2
- package/dist/LinearReadVsRef/LinearReadVsRef.js +2 -1
- package/dist/LinearSyntenyDisplay/afterAttach.js +1 -2
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -2
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +2 -1
- package/dist/LinearSyntenyDisplay/drawSynteny.js +2 -4
- package/dist/LinearSyntenyView/components/ImportCustomTrack.d.ts +1 -1
- package/dist/LinearSyntenyView/components/ImportCustomTrack.js +1 -1
- package/dist/LinearSyntenyView/components/ImportForm.d.ts +2 -2
- package/dist/LinearSyntenyView/components/ImportForm.js +2 -1
- package/dist/LinearSyntenyView/model.d.ts +18 -18
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -1
- package/dist/SyntenyTrack/index.d.ts +1 -2
- package/dist/SyntenyTrack/index.js +6 -5
- package/dist/util.js +2 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +29 -78
- package/esm/LGVSyntenyDisplay/model.js +23 -4
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
- package/esm/LinearComparativeDisplay/configSchemaF.js +1 -1
- package/esm/LinearComparativeDisplay/stateModelFactory.js +4 -4
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +2 -2
- package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -1
- package/esm/LinearComparativeView/components/Rubberband.d.ts +4 -5
- package/esm/LinearComparativeView/components/Rubberband.js +3 -3
- package/esm/LinearComparativeView/model.d.ts +6 -6
- package/esm/LinearComparativeView/model.js +5 -2
- package/esm/LinearReadVsRef/LinearReadVsRef.js +2 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +1 -2
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +2 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +2 -4
- package/esm/LinearSyntenyView/components/ImportCustomTrack.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportCustomTrack.js +1 -1
- package/esm/LinearSyntenyView/components/ImportForm.d.ts +2 -2
- package/esm/LinearSyntenyView/components/ImportForm.js +2 -1
- package/esm/LinearSyntenyView/model.d.ts +18 -18
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -1
- package/esm/SyntenyTrack/index.d.ts +1 -2
- package/esm/SyntenyTrack/index.js +5 -5
- package/esm/util.js +2 -1
- package/package.json +3 -3
|
@@ -86,21 +86,11 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
86
86
|
};
|
|
87
87
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
88
88
|
} & {
|
|
89
|
-
type: import("mobx-state-tree").ISimpleType<"LinearPileupDisplay">;
|
|
90
89
|
configuration: AnyConfigurationSchemaType;
|
|
91
|
-
showSoftClipping: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
92
90
|
featureHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
93
91
|
noSpacing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
94
92
|
fadeLikelihood: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
95
93
|
trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
96
|
-
mismatchAlpha: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
97
|
-
sortedBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
98
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
99
|
-
pos: import("mobx-state-tree").ISimpleType<number>;
|
|
100
|
-
tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
101
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
102
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
103
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
104
94
|
colorBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
105
95
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
106
96
|
tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -115,6 +105,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
115
105
|
value: import("mobx-state-tree").ISimpleType<string>;
|
|
116
106
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
117
107
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
108
|
+
jexlFilters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
118
109
|
} & {
|
|
119
110
|
/**
|
|
120
111
|
* #property
|
|
@@ -250,45 +241,31 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
250
241
|
afterAttach(): void;
|
|
251
242
|
} & {
|
|
252
243
|
colorTagMap: import("mobx").ObservableMap<string, string>;
|
|
253
|
-
modificationTagMap: import("mobx").ObservableMap<string, string>; /**
|
|
254
|
-
* #property
|
|
255
|
-
*/
|
|
256
244
|
featureUnderMouseVolatile: Feature | undefined;
|
|
257
|
-
currSortBpPerPx: number;
|
|
258
|
-
modificationsReady: boolean;
|
|
259
|
-
sortReady: boolean;
|
|
260
245
|
tagsReady: boolean;
|
|
261
246
|
} & {
|
|
262
247
|
readonly autorunReady: boolean;
|
|
263
248
|
} & {
|
|
264
|
-
setModificationsReady(flag: boolean): void;
|
|
265
249
|
setTagsReady(flag: boolean): void;
|
|
266
|
-
setSortReady(flag: boolean): void;
|
|
267
|
-
setCurrSortBpPerPx(n: number): void;
|
|
268
250
|
setMaxHeight(n: number): void;
|
|
269
251
|
setFeatureHeight(n?: number | undefined): void;
|
|
270
252
|
setNoSpacing(flag?: boolean | undefined): void;
|
|
271
253
|
setColorScheme(colorScheme: {
|
|
272
254
|
type: string;
|
|
273
255
|
tag?: string | undefined;
|
|
256
|
+
extra?: import("@jbrowse/plugin-alignments/src/shared/color").ExtraColorBy | undefined;
|
|
274
257
|
}): void;
|
|
275
|
-
updateModificationColorMap(uniqueModifications: string[]): void;
|
|
276
258
|
updateColorTagMap(uniqueTag: string[]): void;
|
|
277
259
|
setFeatureUnderMouse(feat?: Feature | undefined): void;
|
|
278
260
|
selectFeature(feature: Feature): void;
|
|
279
|
-
clearSelected(): void;
|
|
280
261
|
copyFeatureToClipboard(feature: Feature): void;
|
|
281
|
-
toggleSoftClipping(): void;
|
|
282
|
-
toggleMismatchAlpha(): void;
|
|
283
262
|
setConfig(conf: {
|
|
284
263
|
[x: string]: any;
|
|
285
264
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
286
265
|
setSubschema(slotName: string, data: unknown): any;
|
|
287
266
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>): void;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
} & {
|
|
291
|
-
reload(): void;
|
|
267
|
+
setFilterBy(filter: import("@jbrowse/plugin-alignments/src/shared").IFilter): void;
|
|
268
|
+
setJexlFilters(filters: string[]): void;
|
|
292
269
|
} & {
|
|
293
270
|
readonly rendererConfig: {
|
|
294
271
|
[x: string]: any;
|
|
@@ -298,9 +275,9 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
298
275
|
} & {
|
|
299
276
|
readonly maxHeight: any;
|
|
300
277
|
readonly featureHeightSetting: any;
|
|
301
|
-
readonly mismatchAlphaSetting: any;
|
|
302
278
|
readonly featureUnderMouse: Feature | undefined;
|
|
303
|
-
|
|
279
|
+
renderReady(): boolean;
|
|
280
|
+
readonly filters: import("@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain").default;
|
|
304
281
|
} & {
|
|
305
282
|
readonly rendererTypeName: string;
|
|
306
283
|
contextMenuItems(): ({
|
|
@@ -314,68 +291,42 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
314
291
|
icon: typeof import("@jbrowse/core/ui/Icons").ContentCopy;
|
|
315
292
|
onClick: () => void;
|
|
316
293
|
})[];
|
|
317
|
-
readonly DisplayBlurb: (
|
|
294
|
+
readonly DisplayBlurb: ({ model, }: {
|
|
295
|
+
model: {
|
|
296
|
+
sortedBy?: {
|
|
297
|
+
pos: number;
|
|
298
|
+
refName: number;
|
|
299
|
+
type: string;
|
|
300
|
+
tag?: string | undefined;
|
|
301
|
+
} | undefined;
|
|
302
|
+
};
|
|
303
|
+
}) => import("react").JSX.Element | null;
|
|
318
304
|
renderPropsPre(): any;
|
|
319
|
-
|
|
320
|
-
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 | {
|
|
305
|
+
colorSchemeSubMenuItems(): {
|
|
321
306
|
label: string;
|
|
322
|
-
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
323
|
-
muiName: string;
|
|
324
|
-
};
|
|
325
|
-
type: string;
|
|
326
|
-
checked: boolean;
|
|
327
307
|
onClick: () => void;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
} | {
|
|
331
|
-
label: string;
|
|
332
|
-
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
333
|
-
muiName: string;
|
|
334
|
-
};
|
|
335
|
-
disabled: boolean;
|
|
336
|
-
subMenu: {
|
|
337
|
-
label: string;
|
|
338
|
-
onClick: () => void;
|
|
339
|
-
}[];
|
|
340
|
-
type?: undefined;
|
|
341
|
-
checked?: undefined;
|
|
342
|
-
onClick?: undefined;
|
|
343
|
-
} | {
|
|
344
|
-
label: string;
|
|
345
|
-
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
346
|
-
muiName: string;
|
|
347
|
-
};
|
|
348
|
-
subMenu: {
|
|
349
|
-
label: string;
|
|
350
|
-
onClick: () => void;
|
|
351
|
-
}[];
|
|
352
|
-
type?: undefined;
|
|
353
|
-
checked?: undefined;
|
|
354
|
-
onClick?: undefined;
|
|
355
|
-
disabled?: undefined;
|
|
356
|
-
} | {
|
|
308
|
+
}[];
|
|
309
|
+
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 | {
|
|
357
310
|
label: string;
|
|
358
311
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
359
312
|
muiName: string;
|
|
360
313
|
};
|
|
361
314
|
onClick: () => void;
|
|
362
|
-
type?: undefined;
|
|
363
|
-
checked?: undefined;
|
|
364
|
-
disabled?: undefined;
|
|
365
|
-
subMenu?: undefined;
|
|
366
|
-
} | {
|
|
367
|
-
label: string;
|
|
368
|
-
type: string;
|
|
369
|
-
checked: any;
|
|
370
|
-
onClick: () => void;
|
|
371
|
-
icon?: undefined;
|
|
372
|
-
disabled?: undefined;
|
|
373
|
-
subMenu?: undefined;
|
|
374
315
|
})[];
|
|
316
|
+
} & {
|
|
317
|
+
renderProps(): any;
|
|
375
318
|
} & {
|
|
376
319
|
afterAttach(): void;
|
|
377
320
|
} & {
|
|
378
321
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
322
|
+
} & {
|
|
323
|
+
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 | {
|
|
324
|
+
label: string;
|
|
325
|
+
subMenu: {
|
|
326
|
+
label: string;
|
|
327
|
+
onClick: () => void;
|
|
328
|
+
}[];
|
|
329
|
+
})[];
|
|
379
330
|
} & {
|
|
380
331
|
afterCreate(): void;
|
|
381
332
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -114,7 +114,7 @@ async function navToSynteny(feature, self) {
|
|
|
114
114
|
*/
|
|
115
115
|
function stateModelFactory(schema) {
|
|
116
116
|
return mobx_state_tree_1.types
|
|
117
|
-
.compose('LGVSyntenyDisplay', (0, plugin_alignments_1.
|
|
117
|
+
.compose('LGVSyntenyDisplay', (0, plugin_alignments_1.SharedLinearPileupDisplayMixin)(schema), mobx_state_tree_1.types.model({
|
|
118
118
|
/**
|
|
119
119
|
* #property
|
|
120
120
|
*/
|
|
@@ -142,11 +142,30 @@ function stateModelFactory(schema) {
|
|
|
142
142
|
];
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
|
+
})
|
|
146
|
+
.views(self => {
|
|
147
|
+
const { trackMenuItems: superTrackMenuItems, colorSchemeSubMenuItems: superColorSchemeSubMenuItems, } = self;
|
|
148
|
+
return {
|
|
149
|
+
trackMenuItems() {
|
|
150
|
+
return [
|
|
151
|
+
...superTrackMenuItems(),
|
|
152
|
+
{
|
|
153
|
+
label: 'Color scheme',
|
|
154
|
+
subMenu: [...superColorSchemeSubMenuItems()],
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
},
|
|
158
|
+
};
|
|
145
159
|
})
|
|
146
160
|
.actions(self => ({
|
|
147
161
|
afterCreate() {
|
|
148
|
-
// use color by
|
|
149
|
-
self.
|
|
162
|
+
// use color by stand to help indicate inversions better on first load, otherwise use selected orientation
|
|
163
|
+
if (self.colorBy) {
|
|
164
|
+
self.setColorScheme({ ...self.colorBy });
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
self.setColorScheme({ type: 'strand' });
|
|
168
|
+
}
|
|
150
169
|
},
|
|
151
170
|
}));
|
|
152
171
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* #config LinearComparativeDisplay
|
|
3
3
|
*/
|
|
4
|
-
declare function configSchemaFactory(
|
|
4
|
+
declare function configSchemaFactory(_pluginManager: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
5
5
|
export default configSchemaFactory;
|
|
@@ -5,7 +5,7 @@ const configuration_1 = require("@jbrowse/core/configuration");
|
|
|
5
5
|
/**
|
|
6
6
|
* #config LinearComparativeDisplay
|
|
7
7
|
*/
|
|
8
|
-
function configSchemaFactory(
|
|
8
|
+
function configSchemaFactory(_pluginManager) {
|
|
9
9
|
return (0, configuration_1.ConfigurationSchema)('LinearComparativeDisplay', {}, {
|
|
10
10
|
explicitlyTyped: true,
|
|
11
11
|
/**
|
|
@@ -79,14 +79,14 @@ function stateModelFactory(configSchema) {
|
|
|
79
79
|
const newFeatIds = new Set((features === null || features === void 0 ? void 0 : features.map(f => f.id())) || []);
|
|
80
80
|
let foundNewFeatureNotInExistingMap = false;
|
|
81
81
|
let foundExistingFeatureNotInNewMap = false;
|
|
82
|
-
for (
|
|
83
|
-
if (!featIds.has(
|
|
82
|
+
for (const feat of features) {
|
|
83
|
+
if (!featIds.has(feat.id())) {
|
|
84
84
|
foundNewFeatureNotInExistingMap = true;
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
for (
|
|
89
|
-
if (!newFeatIds.has(
|
|
88
|
+
for (const existingFeat of existingFeatures) {
|
|
89
|
+
if (!newFeatIds.has(existingFeat.id())) {
|
|
90
90
|
foundExistingFeatureNotInNewMap = true;
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinearComparativeViewModel } from '../model';
|
|
3
3
|
type LCV = LinearComparativeViewModel;
|
|
4
|
-
declare const
|
|
4
|
+
declare const LinearComparativeView: (props: {
|
|
5
5
|
ExtraButtons?: React.ReactNode;
|
|
6
6
|
model: LCV;
|
|
7
7
|
}) => React.JSX.Element;
|
|
8
|
-
export default
|
|
8
|
+
export default LinearComparativeView;
|
|
@@ -91,8 +91,9 @@ const OverlayComparativeView = (0, mobx_react_1.observer)(({ model }) => {
|
|
|
91
91
|
})),
|
|
92
92
|
react_1.default.createElement(Overlays, { model: model })))));
|
|
93
93
|
});
|
|
94
|
-
|
|
94
|
+
const LinearComparativeView = (0, mobx_react_1.observer)(function (props) {
|
|
95
95
|
const { model } = props;
|
|
96
96
|
const middle = model.tracks.some(({ displays }) => displays.some((d) => (0, configuration_1.getConf)(d, 'middle')));
|
|
97
97
|
return middle ? (react_1.default.createElement(MiddleComparativeView, { ...props })) : (react_1.default.createElement(OverlayComparativeView, { ...props }));
|
|
98
98
|
});
|
|
99
|
+
exports.default = LinearComparativeView;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinearComparativeViewModel } from '../model';
|
|
3
3
|
type LCV = LinearComparativeViewModel;
|
|
4
|
-
declare
|
|
4
|
+
declare const LinearComparativeRubberband: ({ model, ControlComponent, }: {
|
|
5
5
|
model: LCV;
|
|
6
|
-
ControlComponent?: React.ReactElement;
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
export default _default;
|
|
6
|
+
ControlComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export default LinearComparativeRubberband;
|
|
@@ -65,7 +65,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
67
|
});
|
|
68
|
-
function Rubberband({ model, ControlComponent = react_1.default.createElement("div", null), }) {
|
|
68
|
+
const LinearComparativeRubberband = (0, mobx_react_1.observer)(function Rubberband({ model, ControlComponent = react_1.default.createElement("div", null), }) {
|
|
69
69
|
const [startX, setStartX] = (0, react_1.useState)();
|
|
70
70
|
const [currentX, setCurrentX] = (0, react_1.useState)();
|
|
71
71
|
// clientX and clientY used for anchorPosition for menu
|
|
@@ -199,5 +199,5 @@ function Rubberband({ model, ControlComponent = react_1.default.createElement("d
|
|
|
199
199
|
left: anchorPosition.clientX,
|
|
200
200
|
top: anchorPosition.clientY,
|
|
201
201
|
}, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: model.rubberBandMenuItems() })) : null));
|
|
202
|
-
}
|
|
203
|
-
exports.default =
|
|
202
|
+
});
|
|
203
|
+
exports.default = LinearComparativeRubberband;
|
|
@@ -62,12 +62,10 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
62
62
|
volatileWidth: number | undefined;
|
|
63
63
|
minimumBlockWidth: number;
|
|
64
64
|
draggingTrackId: string | undefined;
|
|
65
|
-
volatileError:
|
|
65
|
+
volatileError: unknown;
|
|
66
66
|
afterDisplayedRegionsSetCallbacks: Function[];
|
|
67
67
|
scaleFactor: number;
|
|
68
|
-
trackRefs:
|
|
69
|
-
[key: string]: HTMLDivElement;
|
|
70
|
-
};
|
|
68
|
+
trackRefs: Record<string, HTMLDivElement>;
|
|
71
69
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
72
70
|
coarseTotalBp: number;
|
|
73
71
|
leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
|
|
@@ -91,7 +89,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
91
89
|
readonly totalBp: number;
|
|
92
90
|
readonly maxBpPerPx: number;
|
|
93
91
|
readonly minBpPerPx: number;
|
|
94
|
-
readonly error:
|
|
92
|
+
readonly error: {};
|
|
95
93
|
readonly maxOffset: number;
|
|
96
94
|
readonly minOffset: number;
|
|
97
95
|
readonly displayedRegionsTotalPx: number;
|
|
@@ -108,7 +106,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
108
106
|
} & {
|
|
109
107
|
setShowCytobands(flag: boolean): void;
|
|
110
108
|
setWidth(newWidth: number): void;
|
|
111
|
-
setError(error:
|
|
109
|
+
setError(error: unknown): void;
|
|
112
110
|
toggleHeader(): void;
|
|
113
111
|
toggleHeaderOverview(): void;
|
|
114
112
|
toggleNoTracksActive(): void;
|
|
@@ -210,6 +208,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
210
208
|
end: number;
|
|
211
209
|
reversed: boolean;
|
|
212
210
|
} | undefined;
|
|
211
|
+
} & {
|
|
212
|
+
afterCreate(): void;
|
|
213
213
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
214
214
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
215
215
|
}, {
|
|
@@ -140,13 +140,16 @@ function stateModelFactory(pluginManager) {
|
|
|
140
140
|
// automatically removes session assemblies associated with this view
|
|
141
141
|
// e.g. read vs ref
|
|
142
142
|
beforeDestroy() {
|
|
143
|
+
var _a;
|
|
143
144
|
const session = (0, util_1.getSession)(self);
|
|
144
|
-
|
|
145
|
+
for (const name of self.assemblyNames) {
|
|
146
|
+
(_a = session.removeTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, name);
|
|
147
|
+
}
|
|
145
148
|
},
|
|
146
149
|
onSubviewAction(actionName, path, args) {
|
|
147
150
|
self.views.forEach(view => {
|
|
148
151
|
const ret = (0, mobx_state_tree_1.getPath)(view);
|
|
149
|
-
if (ret.
|
|
152
|
+
if (!ret.endsWith(path)) {
|
|
150
153
|
// @ts-expect-error
|
|
151
154
|
view[actionName](args === null || args === void 0 ? void 0 : args[0]);
|
|
152
155
|
}
|
|
@@ -93,6 +93,7 @@ function ReadVsRefDialog({ track, feature: preFeature, handleClose, }) {
|
|
|
93
93
|
})();
|
|
94
94
|
}, [preFeature, track]);
|
|
95
95
|
function onSubmit() {
|
|
96
|
+
var _a;
|
|
96
97
|
try {
|
|
97
98
|
if (!primaryFeature) {
|
|
98
99
|
return;
|
|
@@ -154,7 +155,7 @@ function ReadVsRefDialog({ track, feature: preFeature, handleClose, }) {
|
|
|
154
155
|
end: f.end + windowSize,
|
|
155
156
|
assemblyName: trackAssembly,
|
|
156
157
|
})));
|
|
157
|
-
session.addTemporaryAssembly({
|
|
158
|
+
(_a = session.addTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, {
|
|
158
159
|
name: `${readAssembly}`,
|
|
159
160
|
sequence: {
|
|
160
161
|
type: 'ReferenceSequenceTrack',
|
|
@@ -62,8 +62,7 @@ function doAfterAttach(self) {
|
|
|
62
62
|
}));
|
|
63
63
|
const map = [];
|
|
64
64
|
const feats = self.features || [];
|
|
65
|
-
for (
|
|
66
|
-
const f = feats[i];
|
|
65
|
+
for (const f of feats) {
|
|
67
66
|
const mate = f.get('mate');
|
|
68
67
|
let f1s = f.get('start');
|
|
69
68
|
let f1e = f.get('end');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinearSyntenyDisplayModel } from '../model';
|
|
3
|
-
declare const
|
|
3
|
+
declare const LinearSyntenyRendering: ({ model, }: {
|
|
4
4
|
model: LinearSyntenyDisplayModel;
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
|
-
export default
|
|
6
|
+
export default LinearSyntenyRendering;
|
|
@@ -32,7 +32,7 @@ const util_1 = require("@jbrowse/core/util");
|
|
|
32
32
|
// locals
|
|
33
33
|
const SyntenyTooltip_1 = __importDefault(require("./SyntenyTooltip"));
|
|
34
34
|
const drawSynteny_1 = require("../drawSynteny");
|
|
35
|
-
|
|
35
|
+
const LinearSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
36
36
|
const highResolutionScaling = 1;
|
|
37
37
|
const view = (0, util_1.getContainingView)(model);
|
|
38
38
|
const height = view.middleComparativeHeight;
|
|
@@ -157,3 +157,4 @@ exports.default = (0, mobx_react_1.observer)(function LinearSyntenyRendering({ m
|
|
|
157
157
|
}, width: width, height: height }),
|
|
158
158
|
model.mouseoverId && tooltip && currX && currY ? (react_1.default.createElement(SyntenyTooltip_1.default, { x: currX, y: currY, title: tooltip })) : null));
|
|
159
159
|
});
|
|
160
|
+
exports.default = LinearSyntenyRendering;
|
|
@@ -43,8 +43,7 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
43
43
|
// call, a separate loop below draws larger boxes
|
|
44
44
|
ctx1.fillStyle = colorMap.M;
|
|
45
45
|
ctx1.strokeStyle = colorMap.M;
|
|
46
|
-
for (
|
|
47
|
-
const { p11, p12, p21, p22 } = featPos[i];
|
|
46
|
+
for (const { p11, p12, p21, p22 } of featPos) {
|
|
48
47
|
const x11 = p11.offsetPx - offsets[0];
|
|
49
48
|
const x12 = p12.offsetPx - offsets[0];
|
|
50
49
|
const x21 = p21.offsetPx - offsets[1];
|
|
@@ -74,8 +73,7 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
74
73
|
// ctx.stroke once is much more efficient than calling stroke() many times
|
|
75
74
|
ctx1.fillStyle = colorMap.M;
|
|
76
75
|
ctx1.strokeStyle = colorMap.M;
|
|
77
|
-
for (
|
|
78
|
-
const { p11, p12, p21, p22, f, cigar } = featPos[i];
|
|
76
|
+
for (const { p11, p12, p21, p22, f, cigar } of featPos) {
|
|
79
77
|
const x11 = p11.offsetPx - offsets[0];
|
|
80
78
|
const x12 = p12.offsetPx - offsets[0];
|
|
81
79
|
const x21 = p21.offsetPx - offsets[1];
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { SnapshotIn } from 'mobx-state-tree';
|
|
3
3
|
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
4
|
type Conf = SnapshotIn<AnyConfigurationModel>;
|
|
5
|
-
declare const OpenTrack: ({
|
|
5
|
+
declare const OpenTrack: ({ assembly1, assembly2, setSessionTrackData, }: {
|
|
6
6
|
sessionTrackData: Conf;
|
|
7
7
|
assembly1: string;
|
|
8
8
|
assembly2: string;
|
|
@@ -99,7 +99,7 @@ function getAdapter({ radioOption, assembly1, assembly2, fileLocation, bed1Locat
|
|
|
99
99
|
throw new Error('Unknown type');
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
const OpenTrack = (0, mobx_react_1.observer)(({
|
|
102
|
+
const OpenTrack = (0, mobx_react_1.observer)(({ assembly1, assembly2, setSessionTrackData, }) => {
|
|
103
103
|
const [bed2Location, setBed2Location] = (0, react_1.useState)();
|
|
104
104
|
const [bed1Location, setBed1Location] = (0, react_1.useState)();
|
|
105
105
|
const [fileLocation, setFileLocation] = (0, react_1.useState)();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinearSyntenyViewModel } from '../model';
|
|
3
|
-
declare const
|
|
3
|
+
declare const LinearSyntenyViewImportForm: ({ model, }: {
|
|
4
4
|
model: LinearSyntenyViewModel;
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
|
-
export default
|
|
6
|
+
export default LinearSyntenyViewImportForm;
|
|
@@ -62,7 +62,7 @@ function TrackSelector({ setSessionTrackData, setShowTrackId, sessionTrackData,
|
|
|
62
62
|
choice === 'custom' ? (react_1.default.createElement(ImportCustomTrack_1.default, { setSessionTrackData: setSessionTrackData, sessionTrackData: sessionTrackData, assembly2: assembly2, assembly1: assembly1 })) : null,
|
|
63
63
|
choice === 'tracklist' ? (react_1.default.createElement(ImportSyntenyTrackSelector_1.default, { model: model, assembly1: assembly1, assembly2: assembly2, setShowTrackId: setShowTrackId })) : null));
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
66
66
|
const { classes } = useStyles();
|
|
67
67
|
const session = (0, util_1.getSession)(model);
|
|
68
68
|
const { assemblyNames } = session;
|
|
@@ -124,3 +124,4 @@ exports.default = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
124
124
|
react_1.default.createElement(material_1.Button, { onClick: onOpenClick, variant: "contained", color: "primary" }, "Launch"))))),
|
|
125
125
|
react_1.default.createElement(TrackSelector, { setShowTrackId: setShowTrackId, assembly2: assembly2, assembly1: assembly1, setSessionTrackData: setSessionTrackData, sessionTrackData: sessionTrackData, model: model })))));
|
|
126
126
|
});
|
|
127
|
+
exports.default = LinearSyntenyViewImportForm;
|
|
@@ -73,12 +73,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
73
73
|
volatileWidth: number | undefined;
|
|
74
74
|
minimumBlockWidth: number;
|
|
75
75
|
draggingTrackId: string | undefined;
|
|
76
|
-
volatileError:
|
|
76
|
+
volatileError: unknown;
|
|
77
77
|
afterDisplayedRegionsSetCallbacks: Function[];
|
|
78
78
|
scaleFactor: number;
|
|
79
|
-
trackRefs:
|
|
80
|
-
[key: string]: HTMLDivElement;
|
|
81
|
-
};
|
|
79
|
+
trackRefs: Record<string, HTMLDivElement>;
|
|
82
80
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
83
81
|
coarseTotalBp: number;
|
|
84
82
|
leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
|
|
@@ -102,7 +100,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
102
100
|
readonly totalBp: number;
|
|
103
101
|
readonly maxBpPerPx: number;
|
|
104
102
|
readonly minBpPerPx: number;
|
|
105
|
-
readonly error:
|
|
103
|
+
readonly error: {};
|
|
106
104
|
readonly maxOffset: number;
|
|
107
105
|
readonly minOffset: number;
|
|
108
106
|
readonly displayedRegionsTotalPx: number;
|
|
@@ -119,7 +117,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
119
117
|
} & {
|
|
120
118
|
setShowCytobands(flag: boolean): void;
|
|
121
119
|
setWidth(newWidth: number): void;
|
|
122
|
-
setError(error:
|
|
120
|
+
setError(error: unknown): void;
|
|
123
121
|
toggleHeader(): void;
|
|
124
122
|
toggleHeaderOverview(): void;
|
|
125
123
|
toggleNoTracksActive(): void;
|
|
@@ -221,6 +219,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
221
219
|
end: number;
|
|
222
220
|
reversed: boolean;
|
|
223
221
|
} | undefined;
|
|
222
|
+
} & {
|
|
223
|
+
afterCreate(): void;
|
|
224
224
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
225
225
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
226
226
|
} & {
|
|
@@ -323,12 +323,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
323
323
|
volatileWidth: number | undefined;
|
|
324
324
|
minimumBlockWidth: number;
|
|
325
325
|
draggingTrackId: string | undefined;
|
|
326
|
-
volatileError:
|
|
326
|
+
volatileError: unknown;
|
|
327
327
|
afterDisplayedRegionsSetCallbacks: Function[];
|
|
328
328
|
scaleFactor: number;
|
|
329
|
-
trackRefs:
|
|
330
|
-
[key: string]: HTMLDivElement;
|
|
331
|
-
};
|
|
329
|
+
trackRefs: Record<string, HTMLDivElement>;
|
|
332
330
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
333
331
|
coarseTotalBp: number;
|
|
334
332
|
leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
|
|
@@ -352,7 +350,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
352
350
|
readonly totalBp: number;
|
|
353
351
|
readonly maxBpPerPx: number;
|
|
354
352
|
readonly minBpPerPx: number;
|
|
355
|
-
readonly error:
|
|
353
|
+
readonly error: {};
|
|
356
354
|
readonly maxOffset: number;
|
|
357
355
|
readonly minOffset: number;
|
|
358
356
|
readonly displayedRegionsTotalPx: number;
|
|
@@ -369,7 +367,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
369
367
|
} & {
|
|
370
368
|
setShowCytobands(flag: boolean): void;
|
|
371
369
|
setWidth(newWidth: number): void;
|
|
372
|
-
setError(error:
|
|
370
|
+
setError(error: unknown): void;
|
|
373
371
|
toggleHeader(): void;
|
|
374
372
|
toggleHeaderOverview(): void;
|
|
375
373
|
toggleNoTracksActive(): void;
|
|
@@ -471,6 +469,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
471
469
|
end: number;
|
|
472
470
|
reversed: boolean;
|
|
473
471
|
} | undefined;
|
|
472
|
+
} & {
|
|
473
|
+
afterCreate(): void;
|
|
474
474
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
475
475
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
476
476
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -511,12 +511,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
511
511
|
volatileWidth: number | undefined;
|
|
512
512
|
minimumBlockWidth: number;
|
|
513
513
|
draggingTrackId: string | undefined;
|
|
514
|
-
volatileError:
|
|
514
|
+
volatileError: unknown;
|
|
515
515
|
afterDisplayedRegionsSetCallbacks: Function[];
|
|
516
516
|
scaleFactor: number;
|
|
517
|
-
trackRefs:
|
|
518
|
-
[key: string]: HTMLDivElement;
|
|
519
|
-
};
|
|
517
|
+
trackRefs: Record<string, HTMLDivElement>;
|
|
520
518
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
521
519
|
coarseTotalBp: number;
|
|
522
520
|
leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
|
|
@@ -540,7 +538,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
540
538
|
readonly totalBp: number;
|
|
541
539
|
readonly maxBpPerPx: number;
|
|
542
540
|
readonly minBpPerPx: number;
|
|
543
|
-
readonly error:
|
|
541
|
+
readonly error: {};
|
|
544
542
|
readonly maxOffset: number;
|
|
545
543
|
readonly minOffset: number;
|
|
546
544
|
readonly displayedRegionsTotalPx: number;
|
|
@@ -557,7 +555,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
557
555
|
} & {
|
|
558
556
|
setShowCytobands(flag: boolean): void;
|
|
559
557
|
setWidth(newWidth: number): void;
|
|
560
|
-
setError(error:
|
|
558
|
+
setError(error: unknown): void;
|
|
561
559
|
toggleHeader(): void;
|
|
562
560
|
toggleHeaderOverview(): void;
|
|
563
561
|
toggleNoTracksActive(): void;
|
|
@@ -659,6 +657,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
659
657
|
end: number;
|
|
660
658
|
reversed: boolean;
|
|
661
659
|
} | undefined;
|
|
660
|
+
} & {
|
|
661
|
+
afterCreate(): void;
|
|
662
662
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
663
663
|
closeView(): void;
|
|
664
664
|
setMiddleComparativeHeight(n: number): number;
|
|
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const material_1 = require("@mui/material");
|
|
8
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
9
|
function SVGBackground({ width, height, shift, }) {
|
|
9
10
|
const theme = (0, material_1.useTheme)();
|
|
10
|
-
return (react_1.default.createElement("rect", { width: width + shift * 2, height: height, fill: theme.palette.background.default }));
|
|
11
|
+
return (react_1.default.createElement("rect", { width: width + shift * 2, height: height, fill: (0, util_1.stripAlpha)(theme.palette.background.default) }));
|
|
11
12
|
}
|
|
12
13
|
exports.default = SVGBackground;
|