@jbrowse/plugin-sv-inspector 2.13.0 → 2.14.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/LaunchSvInspectorView/index.js +2 -6
- package/dist/SvInspectorView/components/CircularViewOptions.js +3 -1
- package/dist/SvInspectorView/models/SvInspectorView.d.ts +36 -9
- package/dist/SvInspectorView/models/SvInspectorView.js +12 -19
- package/dist/SvInspectorView/models/adhocFeatureUtils.d.ts +4 -4
- package/dist/SvInspectorView/models/adhocFeatureUtils.js +6 -5
- package/dist/SvInspectorView/models/breakpointSplitViewFromTableRow.d.ts +4 -4
- package/dist/SvInspectorView/models/breakpointSplitViewFromTableRow.js +1 -0
- package/esm/LaunchSvInspectorView/index.js +2 -6
- package/esm/SvInspectorView/components/CircularViewOptions.js +3 -1
- package/esm/SvInspectorView/models/SvInspectorView.d.ts +36 -9
- package/esm/SvInspectorView/models/SvInspectorView.js +13 -20
- package/esm/SvInspectorView/models/adhocFeatureUtils.d.ts +4 -4
- package/esm/SvInspectorView/models/adhocFeatureUtils.js +6 -5
- package/esm/SvInspectorView/models/breakpointSplitViewFromTableRow.d.ts +4 -4
- package/esm/SvInspectorView/models/breakpointSplitViewFromTableRow.js +1 -0
- package/package.json +3 -3
|
@@ -6,15 +6,11 @@ function LaunchSvInspectorViewF(pluginManager) {
|
|
|
6
6
|
// @ts-expect-error
|
|
7
7
|
async ({ session, assembly, uri, fileType, }) => {
|
|
8
8
|
var _a, _b;
|
|
9
|
-
// add view, make typescript happy with return type
|
|
10
9
|
const view = session.addView('SvInspectorView');
|
|
11
|
-
if (!view) {
|
|
12
|
-
throw new Error('Failed to initialize view');
|
|
13
|
-
}
|
|
14
10
|
const exts = uri.split('.');
|
|
15
|
-
let ext = (_a = exts
|
|
11
|
+
let ext = (_a = exts.pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
16
12
|
if (ext === 'GZ') {
|
|
17
|
-
ext = (_b = exts
|
|
13
|
+
ext = (_b = exts.pop()) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
|
18
14
|
}
|
|
19
15
|
view.spreadsheetView.importWizard.setFileType(fileType || ext || '');
|
|
20
16
|
view.spreadsheetView.importWizard.setSelectedAssemblyName(assembly);
|
|
@@ -16,6 +16,8 @@ const CircularViewOptions = (0, mobx_react_1.observer)(function ({ svInspector,
|
|
|
16
16
|
const { classes } = useStyles();
|
|
17
17
|
return (react_1.default.createElement(material_1.Grid, { container: true, className: classes.circularViewOptions, style: { height: svInspector.circularViewOptionsBarHeight } },
|
|
18
18
|
react_1.default.createElement(material_1.Grid, { item: true },
|
|
19
|
-
react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: svInspector.onlyDisplayRelevantRegionsInCircularView, onChange: e =>
|
|
19
|
+
react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: svInspector.onlyDisplayRelevantRegionsInCircularView, onChange: e => {
|
|
20
|
+
svInspector.setOnlyDisplayRelevantRegionsInCircularView(e.target.checked);
|
|
21
|
+
} }), label: "show only regions with data" }))));
|
|
20
22
|
});
|
|
21
23
|
exports.default = CircularViewOptions;
|
|
@@ -736,7 +736,6 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
736
736
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
737
737
|
setImportMode(): void;
|
|
738
738
|
setDisplayMode(): void;
|
|
739
|
-
closeView(): void;
|
|
740
739
|
} & {
|
|
741
740
|
menuItems(): {
|
|
742
741
|
label: string;
|
|
@@ -831,7 +830,6 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
831
830
|
zoomOutButton(): void;
|
|
832
831
|
setBpPerPx(newVal: number): void;
|
|
833
832
|
setModelViewWhenAdjust(secondCondition: boolean): void;
|
|
834
|
-
closeView(): void;
|
|
835
833
|
setDisplayedRegions(regions: import("mobx-state-tree").SnapshotOrInstance<typeof import("@jbrowse/core/util/types/mst").Region>[]): void;
|
|
836
834
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
837
835
|
toggleTrack(trackId: string): boolean;
|
|
@@ -858,11 +856,44 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
858
856
|
/**
|
|
859
857
|
* #getter
|
|
860
858
|
*/
|
|
861
|
-
readonly selectedRows:
|
|
859
|
+
readonly selectedRows: ({
|
|
860
|
+
id: string;
|
|
861
|
+
cells: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IModelType<{
|
|
862
|
+
text: import("mobx-state-tree").ISimpleType<string>;
|
|
863
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
864
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
865
|
+
text: import("mobx-state-tree").ISimpleType<string>;
|
|
866
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
867
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
868
|
+
extendedData: any;
|
|
869
|
+
isSelected: boolean;
|
|
870
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
871
|
+
toggleSelect(): void;
|
|
872
|
+
unSelect(): void;
|
|
873
|
+
select(): void;
|
|
874
|
+
setExtendedData(data: unknown): void;
|
|
875
|
+
} & {
|
|
876
|
+
readonly cellsWithDerived: any;
|
|
877
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
878
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
879
|
+
cells: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
880
|
+
text: import("mobx-state-tree").ISimpleType<string>;
|
|
881
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
882
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
883
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
884
|
+
isSelected: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
885
|
+
}, {
|
|
886
|
+
toggleSelect(): void;
|
|
887
|
+
unSelect(): void;
|
|
888
|
+
select(): void;
|
|
889
|
+
setExtendedData(data: unknown): void;
|
|
890
|
+
} & {
|
|
891
|
+
readonly cellsWithDerived: any;
|
|
892
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[] | undefined;
|
|
862
893
|
/**
|
|
863
894
|
* #getter
|
|
864
895
|
*/
|
|
865
|
-
readonly assemblyName:
|
|
896
|
+
readonly assemblyName: string | undefined;
|
|
866
897
|
/**
|
|
867
898
|
* #getter
|
|
868
899
|
*/
|
|
@@ -893,7 +924,7 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
893
924
|
type: string;
|
|
894
925
|
features: any[];
|
|
895
926
|
};
|
|
896
|
-
assemblyNames:
|
|
927
|
+
assemblyNames: (string | undefined)[];
|
|
897
928
|
displays: {
|
|
898
929
|
type: string;
|
|
899
930
|
displayId: string;
|
|
@@ -948,10 +979,6 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
948
979
|
* #action
|
|
949
980
|
*/
|
|
950
981
|
setDisplayMode(): void;
|
|
951
|
-
/**
|
|
952
|
-
* #action
|
|
953
|
-
*/
|
|
954
|
-
closeView(): void;
|
|
955
982
|
/**
|
|
956
983
|
* #action
|
|
957
984
|
*/
|
|
@@ -83,15 +83,17 @@ function SvInspectorViewF(pluginManager) {
|
|
|
83
83
|
* #getter
|
|
84
84
|
*/
|
|
85
85
|
get selectedRows() {
|
|
86
|
-
|
|
87
|
-
return self.spreadsheetView.rowSet.selectedRows;
|
|
86
|
+
var _a;
|
|
87
|
+
return (_a = self.spreadsheetView.spreadsheet) === null || _a === void 0 ? void 0 : _a.rowSet.selectedRows;
|
|
88
88
|
},
|
|
89
89
|
/**
|
|
90
90
|
* #getter
|
|
91
91
|
*/
|
|
92
92
|
get assemblyName() {
|
|
93
93
|
const { assembly } = self.spreadsheetView;
|
|
94
|
-
return assembly
|
|
94
|
+
return assembly
|
|
95
|
+
? (0, configuration_1.readConfObject)(assembly, 'name')
|
|
96
|
+
: undefined;
|
|
95
97
|
},
|
|
96
98
|
/**
|
|
97
99
|
* #getter
|
|
@@ -141,7 +143,7 @@ function SvInspectorViewF(pluginManager) {
|
|
|
141
143
|
{
|
|
142
144
|
type: 'ChordVariantDisplay',
|
|
143
145
|
displayId: `sv-inspector-variant-track-chord-display-${self.id}`,
|
|
144
|
-
onChordClick:
|
|
146
|
+
onChordClick: 'jexl:defaultOnChordClick(feature, track, pluginManager)',
|
|
145
147
|
renderer: { type: 'StructuralVariantChordRenderer' },
|
|
146
148
|
},
|
|
147
149
|
],
|
|
@@ -179,13 +181,6 @@ function SvInspectorViewF(pluginManager) {
|
|
|
179
181
|
setDisplayMode() {
|
|
180
182
|
self.spreadsheetView.setDisplayMode();
|
|
181
183
|
},
|
|
182
|
-
/**
|
|
183
|
-
* #action
|
|
184
|
-
*/
|
|
185
|
-
closeView() {
|
|
186
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
187
|
-
(0, mobx_state_tree_1.getParent)(self, 2).removeView(self);
|
|
188
|
-
},
|
|
189
184
|
/**
|
|
190
185
|
* #action
|
|
191
186
|
*/
|
|
@@ -207,7 +202,9 @@ function SvInspectorViewF(pluginManager) {
|
|
|
207
202
|
return [
|
|
208
203
|
{
|
|
209
204
|
label: 'Return to import form',
|
|
210
|
-
onClick: () =>
|
|
205
|
+
onClick: () => {
|
|
206
|
+
self.setImportMode();
|
|
207
|
+
},
|
|
211
208
|
icon: FolderOpen_1.default,
|
|
212
209
|
},
|
|
213
210
|
];
|
|
@@ -273,18 +270,15 @@ function SvInspectorViewF(pluginManager) {
|
|
|
273
270
|
}, { name: 'SvInspectorView displayed regions bind' }));
|
|
274
271
|
// bind circularview tracks to our track snapshot view
|
|
275
272
|
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.reaction)(() => ({
|
|
276
|
-
generatedTrackConf: self
|
|
277
|
-
assemblyName: self
|
|
273
|
+
generatedTrackConf: self.featuresCircularTrackConfiguration,
|
|
274
|
+
assemblyName: self.assemblyName,
|
|
278
275
|
}), data => {
|
|
279
|
-
if (!data) {
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
276
|
const { assemblyName, generatedTrackConf } = data;
|
|
283
277
|
const { circularView } = self;
|
|
284
278
|
// hide any visible tracks
|
|
285
279
|
circularView.tracks.forEach(t => circularView.hideTrack(t.configuration.trackId));
|
|
286
280
|
// put our track in as the only track
|
|
287
|
-
if (assemblyName
|
|
281
|
+
if (assemblyName) {
|
|
288
282
|
// @ts-expect-error
|
|
289
283
|
circularView.addTrackConf(generatedTrackConf, {
|
|
290
284
|
assemblyName,
|
|
@@ -308,7 +302,6 @@ function SvInspectorViewF(pluginManager) {
|
|
|
308
302
|
disabled(spreadsheetView, spreadsheet, rowNumber, row) {
|
|
309
303
|
return !(0, breakpointSplitViewFromTableRow_1.canOpenBreakpointSplitViewFromTableRow)(self, spreadsheetView, spreadsheet, row, rowNumber);
|
|
310
304
|
},
|
|
311
|
-
// @ts-expect-error
|
|
312
305
|
onClick(spreadsheetView, spreadsheet, rowNumber, row) {
|
|
313
306
|
(0, breakpointSplitViewFromTableRow_1.openBreakpointSplitViewFromTableRow)(self, spreadsheetView, spreadsheet, row, rowNumber);
|
|
314
307
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeAdHocFeature(columns: any, columnsAlreadyUsedInLocations: any, row: any, loc1: any, loc2: any, rowNumber: any): {
|
|
1
|
+
export declare function makeAdHocFeature(columns: any, columnsAlreadyUsedInLocations: any, row: any, loc1: any, loc2: any, rowNumber: any): {
|
|
2
2
|
uniqueId: string;
|
|
3
3
|
refName: any;
|
|
4
4
|
start: any;
|
|
@@ -9,7 +9,7 @@ export function makeAdHocFeature(columns: any, columnsAlreadyUsedInLocations: an
|
|
|
9
9
|
end: any;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export function makeAdHocSvFeatureFromTwoLocations(columns: any, locationColumnNumbers: any, row: any, rowNumber: any, isValidRefName: any): {
|
|
12
|
+
export declare function makeAdHocSvFeatureFromTwoLocations(columns: any, locationColumnNumbers: any, row: any, rowNumber: any, isValidRefName: any): {
|
|
13
13
|
uniqueId: string;
|
|
14
14
|
refName: any;
|
|
15
15
|
start: any;
|
|
@@ -20,7 +20,7 @@ export function makeAdHocSvFeatureFromTwoLocations(columns: any, locationColumnN
|
|
|
20
20
|
end: any;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
export function makeAdHocSvFeatureFromTwoRefStartEndSets(columns: any, locRefColumnNumbers: any, locStartColumnNumbers: any, locEndColumnNumbers: any, row: any, rowNumber: any): {
|
|
23
|
+
export declare function makeAdHocSvFeatureFromTwoRefStartEndSets(columns: any, locRefColumnNumbers: any, locStartColumnNumbers: any, locEndColumnNumbers: any, row: any, rowNumber: any): {
|
|
24
24
|
uniqueId: string;
|
|
25
25
|
refName: any;
|
|
26
26
|
start: any;
|
|
@@ -31,7 +31,7 @@ export function makeAdHocSvFeatureFromTwoRefStartEndSets(columns: any, locRefCol
|
|
|
31
31
|
end: any;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
export function makeAdHocSvFeature(sheet: any, rowNumber: any, row: any, isValidRefName: any): {
|
|
34
|
+
export declare function makeAdHocSvFeature(sheet: any, rowNumber: any, row: any, isValidRefName: any): {
|
|
35
35
|
uniqueId: string;
|
|
36
36
|
refName: any;
|
|
37
37
|
start: any;
|
|
@@ -4,6 +4,7 @@ exports.makeAdHocFeature = makeAdHocFeature;
|
|
|
4
4
|
exports.makeAdHocSvFeatureFromTwoLocations = makeAdHocSvFeatureFromTwoLocations;
|
|
5
5
|
exports.makeAdHocSvFeatureFromTwoRefStartEndSets = makeAdHocSvFeatureFromTwoRefStartEndSets;
|
|
6
6
|
exports.makeAdHocSvFeature = makeAdHocSvFeature;
|
|
7
|
+
// @ts-nocheck
|
|
7
8
|
// this file contains the rather verbose functions for
|
|
8
9
|
// creating features from CSV/TSV lines
|
|
9
10
|
const util_1 = require("@jbrowse/core/util");
|
|
@@ -16,7 +17,7 @@ function makeAdHocFeature(columns, columnsAlreadyUsedInLocations, row, loc1, loc
|
|
|
16
17
|
}
|
|
17
18
|
let { text } = row.cells[columnNumber];
|
|
18
19
|
if (column.dataType.type === 'Number') {
|
|
19
|
-
text = parseFloat(text);
|
|
20
|
+
text = Number.parseFloat(text);
|
|
20
21
|
}
|
|
21
22
|
otherData[column.name] = text;
|
|
22
23
|
});
|
|
@@ -48,13 +49,13 @@ function makeAdHocSvFeatureFromTwoRefStartEndSets(columns, locRefColumnNumbers,
|
|
|
48
49
|
const textOf = colno => row.cells[colno].text;
|
|
49
50
|
const loc1 = {
|
|
50
51
|
refName: textOf(locRefColumnNumbers[0]),
|
|
51
|
-
start: parseInt(textOf(locStartColumnNumbers[0]), 10) - 1,
|
|
52
|
-
end: parseInt(textOf(locEndColumnNumbers[0]), 10),
|
|
52
|
+
start: Number.parseInt(textOf(locStartColumnNumbers[0]), 10) - 1,
|
|
53
|
+
end: Number.parseInt(textOf(locEndColumnNumbers[0]), 10),
|
|
53
54
|
};
|
|
54
55
|
const loc2 = {
|
|
55
56
|
refName: textOf(locRefColumnNumbers[1]),
|
|
56
|
-
start: parseInt(textOf(locStartColumnNumbers[1]), 10) - 1,
|
|
57
|
-
end: parseInt(textOf(locEndColumnNumbers[1]), 10),
|
|
57
|
+
start: Number.parseInt(textOf(locStartColumnNumbers[1]), 10) - 1,
|
|
58
|
+
end: Number.parseInt(textOf(locEndColumnNumbers[1]), 10),
|
|
58
59
|
};
|
|
59
60
|
const columnsAlreadyUsedInLocations = [
|
|
60
61
|
locRefColumnNumbers[0],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getFeatureForRow(session: any, spreadsheetView: any, row: any, rowNumber: any): any;
|
|
2
|
-
export function breakpointSplitViewSnapshotFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): any;
|
|
3
|
-
export function openBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): void;
|
|
4
|
-
export function canOpenBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): boolean;
|
|
1
|
+
export declare function getFeatureForRow(session: any, spreadsheetView: any, row: any, rowNumber: any): any;
|
|
2
|
+
export declare function breakpointSplitViewSnapshotFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): any;
|
|
3
|
+
export declare function openBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): void;
|
|
4
|
+
export declare function canOpenBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): boolean;
|
|
@@ -4,6 +4,7 @@ exports.getFeatureForRow = getFeatureForRow;
|
|
|
4
4
|
exports.breakpointSplitViewSnapshotFromTableRow = breakpointSplitViewSnapshotFromTableRow;
|
|
5
5
|
exports.openBreakpointSplitViewFromTableRow = openBreakpointSplitViewFromTableRow;
|
|
6
6
|
exports.canOpenBreakpointSplitViewFromTableRow = canOpenBreakpointSplitViewFromTableRow;
|
|
7
|
+
// @ts-nocheck
|
|
7
8
|
const util_1 = require("@jbrowse/core/util");
|
|
8
9
|
const adhocFeatureUtils_1 = require("./adhocFeatureUtils");
|
|
9
10
|
function getFeatureForRow(session, spreadsheetView, row, rowNumber) {
|
|
@@ -3,15 +3,11 @@ export default function LaunchSvInspectorViewF(pluginManager) {
|
|
|
3
3
|
// @ts-expect-error
|
|
4
4
|
async ({ session, assembly, uri, fileType, }) => {
|
|
5
5
|
var _a, _b;
|
|
6
|
-
// add view, make typescript happy with return type
|
|
7
6
|
const view = session.addView('SvInspectorView');
|
|
8
|
-
if (!view) {
|
|
9
|
-
throw new Error('Failed to initialize view');
|
|
10
|
-
}
|
|
11
7
|
const exts = uri.split('.');
|
|
12
|
-
let ext = (_a = exts
|
|
8
|
+
let ext = (_a = exts.pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
13
9
|
if (ext === 'GZ') {
|
|
14
|
-
ext = (_b = exts
|
|
10
|
+
ext = (_b = exts.pop()) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
|
15
11
|
}
|
|
16
12
|
view.spreadsheetView.importWizard.setFileType(fileType || ext || '');
|
|
17
13
|
view.spreadsheetView.importWizard.setSelectedAssemblyName(assembly);
|
|
@@ -11,6 +11,8 @@ const CircularViewOptions = observer(function ({ svInspector, }) {
|
|
|
11
11
|
const { classes } = useStyles();
|
|
12
12
|
return (React.createElement(Grid, { container: true, className: classes.circularViewOptions, style: { height: svInspector.circularViewOptionsBarHeight } },
|
|
13
13
|
React.createElement(Grid, { item: true },
|
|
14
|
-
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: svInspector.onlyDisplayRelevantRegionsInCircularView, onChange: e =>
|
|
14
|
+
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: svInspector.onlyDisplayRelevantRegionsInCircularView, onChange: e => {
|
|
15
|
+
svInspector.setOnlyDisplayRelevantRegionsInCircularView(e.target.checked);
|
|
16
|
+
} }), label: "show only regions with data" }))));
|
|
15
17
|
});
|
|
16
18
|
export default CircularViewOptions;
|
|
@@ -736,7 +736,6 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
736
736
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
737
737
|
setImportMode(): void;
|
|
738
738
|
setDisplayMode(): void;
|
|
739
|
-
closeView(): void;
|
|
740
739
|
} & {
|
|
741
740
|
menuItems(): {
|
|
742
741
|
label: string;
|
|
@@ -831,7 +830,6 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
831
830
|
zoomOutButton(): void;
|
|
832
831
|
setBpPerPx(newVal: number): void;
|
|
833
832
|
setModelViewWhenAdjust(secondCondition: boolean): void;
|
|
834
|
-
closeView(): void;
|
|
835
833
|
setDisplayedRegions(regions: import("mobx-state-tree").SnapshotOrInstance<typeof import("@jbrowse/core/util/types/mst").Region>[]): void;
|
|
836
834
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
837
835
|
toggleTrack(trackId: string): boolean;
|
|
@@ -858,11 +856,44 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
858
856
|
/**
|
|
859
857
|
* #getter
|
|
860
858
|
*/
|
|
861
|
-
readonly selectedRows:
|
|
859
|
+
readonly selectedRows: ({
|
|
860
|
+
id: string;
|
|
861
|
+
cells: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IModelType<{
|
|
862
|
+
text: import("mobx-state-tree").ISimpleType<string>;
|
|
863
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
864
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
865
|
+
text: import("mobx-state-tree").ISimpleType<string>;
|
|
866
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
867
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
868
|
+
extendedData: any;
|
|
869
|
+
isSelected: boolean;
|
|
870
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
871
|
+
toggleSelect(): void;
|
|
872
|
+
unSelect(): void;
|
|
873
|
+
select(): void;
|
|
874
|
+
setExtendedData(data: unknown): void;
|
|
875
|
+
} & {
|
|
876
|
+
readonly cellsWithDerived: any;
|
|
877
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
878
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
879
|
+
cells: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
880
|
+
text: import("mobx-state-tree").ISimpleType<string>;
|
|
881
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
882
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
883
|
+
extendedData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
884
|
+
isSelected: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
885
|
+
}, {
|
|
886
|
+
toggleSelect(): void;
|
|
887
|
+
unSelect(): void;
|
|
888
|
+
select(): void;
|
|
889
|
+
setExtendedData(data: unknown): void;
|
|
890
|
+
} & {
|
|
891
|
+
readonly cellsWithDerived: any;
|
|
892
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[] | undefined;
|
|
862
893
|
/**
|
|
863
894
|
* #getter
|
|
864
895
|
*/
|
|
865
|
-
readonly assemblyName:
|
|
896
|
+
readonly assemblyName: string | undefined;
|
|
866
897
|
/**
|
|
867
898
|
* #getter
|
|
868
899
|
*/
|
|
@@ -893,7 +924,7 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
893
924
|
type: string;
|
|
894
925
|
features: any[];
|
|
895
926
|
};
|
|
896
|
-
assemblyNames:
|
|
927
|
+
assemblyNames: (string | undefined)[];
|
|
897
928
|
displays: {
|
|
898
929
|
type: string;
|
|
899
930
|
displayId: string;
|
|
@@ -948,10 +979,6 @@ declare function SvInspectorViewF(pluginManager: PluginManager): import("mobx-st
|
|
|
948
979
|
* #action
|
|
949
980
|
*/
|
|
950
981
|
setDisplayMode(): void;
|
|
951
|
-
/**
|
|
952
|
-
* #action
|
|
953
|
-
*/
|
|
954
|
-
closeView(): void;
|
|
955
982
|
/**
|
|
956
983
|
* #action
|
|
957
984
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clone from 'clone';
|
|
2
2
|
import { autorun, reaction } from 'mobx';
|
|
3
|
-
import { types,
|
|
3
|
+
import { types, addDisposer } from 'mobx-state-tree';
|
|
4
4
|
import { getSession } from '@jbrowse/core/util';
|
|
5
5
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
6
6
|
import { ElementId } from '@jbrowse/core/util/types/mst';
|
|
@@ -78,15 +78,17 @@ function SvInspectorViewF(pluginManager) {
|
|
|
78
78
|
* #getter
|
|
79
79
|
*/
|
|
80
80
|
get selectedRows() {
|
|
81
|
-
|
|
82
|
-
return self.spreadsheetView.rowSet.selectedRows;
|
|
81
|
+
var _a;
|
|
82
|
+
return (_a = self.spreadsheetView.spreadsheet) === null || _a === void 0 ? void 0 : _a.rowSet.selectedRows;
|
|
83
83
|
},
|
|
84
84
|
/**
|
|
85
85
|
* #getter
|
|
86
86
|
*/
|
|
87
87
|
get assemblyName() {
|
|
88
88
|
const { assembly } = self.spreadsheetView;
|
|
89
|
-
return assembly
|
|
89
|
+
return assembly
|
|
90
|
+
? readConfObject(assembly, 'name')
|
|
91
|
+
: undefined;
|
|
90
92
|
},
|
|
91
93
|
/**
|
|
92
94
|
* #getter
|
|
@@ -136,7 +138,7 @@ function SvInspectorViewF(pluginManager) {
|
|
|
136
138
|
{
|
|
137
139
|
type: 'ChordVariantDisplay',
|
|
138
140
|
displayId: `sv-inspector-variant-track-chord-display-${self.id}`,
|
|
139
|
-
onChordClick:
|
|
141
|
+
onChordClick: 'jexl:defaultOnChordClick(feature, track, pluginManager)',
|
|
140
142
|
renderer: { type: 'StructuralVariantChordRenderer' },
|
|
141
143
|
},
|
|
142
144
|
],
|
|
@@ -174,13 +176,6 @@ function SvInspectorViewF(pluginManager) {
|
|
|
174
176
|
setDisplayMode() {
|
|
175
177
|
self.spreadsheetView.setDisplayMode();
|
|
176
178
|
},
|
|
177
|
-
/**
|
|
178
|
-
* #action
|
|
179
|
-
*/
|
|
180
|
-
closeView() {
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
182
|
-
getParent(self, 2).removeView(self);
|
|
183
|
-
},
|
|
184
179
|
/**
|
|
185
180
|
* #action
|
|
186
181
|
*/
|
|
@@ -202,7 +197,9 @@ function SvInspectorViewF(pluginManager) {
|
|
|
202
197
|
return [
|
|
203
198
|
{
|
|
204
199
|
label: 'Return to import form',
|
|
205
|
-
onClick: () =>
|
|
200
|
+
onClick: () => {
|
|
201
|
+
self.setImportMode();
|
|
202
|
+
},
|
|
206
203
|
icon: FolderOpenIcon,
|
|
207
204
|
},
|
|
208
205
|
];
|
|
@@ -268,18 +265,15 @@ function SvInspectorViewF(pluginManager) {
|
|
|
268
265
|
}, { name: 'SvInspectorView displayed regions bind' }));
|
|
269
266
|
// bind circularview tracks to our track snapshot view
|
|
270
267
|
addDisposer(self, reaction(() => ({
|
|
271
|
-
generatedTrackConf: self
|
|
272
|
-
assemblyName: self
|
|
268
|
+
generatedTrackConf: self.featuresCircularTrackConfiguration,
|
|
269
|
+
assemblyName: self.assemblyName,
|
|
273
270
|
}), data => {
|
|
274
|
-
if (!data) {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
271
|
const { assemblyName, generatedTrackConf } = data;
|
|
278
272
|
const { circularView } = self;
|
|
279
273
|
// hide any visible tracks
|
|
280
274
|
circularView.tracks.forEach(t => circularView.hideTrack(t.configuration.trackId));
|
|
281
275
|
// put our track in as the only track
|
|
282
|
-
if (assemblyName
|
|
276
|
+
if (assemblyName) {
|
|
283
277
|
// @ts-expect-error
|
|
284
278
|
circularView.addTrackConf(generatedTrackConf, {
|
|
285
279
|
assemblyName,
|
|
@@ -303,7 +297,6 @@ function SvInspectorViewF(pluginManager) {
|
|
|
303
297
|
disabled(spreadsheetView, spreadsheet, rowNumber, row) {
|
|
304
298
|
return !canOpenBreakpointSplitViewFromTableRow(self, spreadsheetView, spreadsheet, row, rowNumber);
|
|
305
299
|
},
|
|
306
|
-
// @ts-expect-error
|
|
307
300
|
onClick(spreadsheetView, spreadsheet, rowNumber, row) {
|
|
308
301
|
openBreakpointSplitViewFromTableRow(self, spreadsheetView, spreadsheet, row, rowNumber);
|
|
309
302
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeAdHocFeature(columns: any, columnsAlreadyUsedInLocations: any, row: any, loc1: any, loc2: any, rowNumber: any): {
|
|
1
|
+
export declare function makeAdHocFeature(columns: any, columnsAlreadyUsedInLocations: any, row: any, loc1: any, loc2: any, rowNumber: any): {
|
|
2
2
|
uniqueId: string;
|
|
3
3
|
refName: any;
|
|
4
4
|
start: any;
|
|
@@ -9,7 +9,7 @@ export function makeAdHocFeature(columns: any, columnsAlreadyUsedInLocations: an
|
|
|
9
9
|
end: any;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export function makeAdHocSvFeatureFromTwoLocations(columns: any, locationColumnNumbers: any, row: any, rowNumber: any, isValidRefName: any): {
|
|
12
|
+
export declare function makeAdHocSvFeatureFromTwoLocations(columns: any, locationColumnNumbers: any, row: any, rowNumber: any, isValidRefName: any): {
|
|
13
13
|
uniqueId: string;
|
|
14
14
|
refName: any;
|
|
15
15
|
start: any;
|
|
@@ -20,7 +20,7 @@ export function makeAdHocSvFeatureFromTwoLocations(columns: any, locationColumnN
|
|
|
20
20
|
end: any;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
export function makeAdHocSvFeatureFromTwoRefStartEndSets(columns: any, locRefColumnNumbers: any, locStartColumnNumbers: any, locEndColumnNumbers: any, row: any, rowNumber: any): {
|
|
23
|
+
export declare function makeAdHocSvFeatureFromTwoRefStartEndSets(columns: any, locRefColumnNumbers: any, locStartColumnNumbers: any, locEndColumnNumbers: any, row: any, rowNumber: any): {
|
|
24
24
|
uniqueId: string;
|
|
25
25
|
refName: any;
|
|
26
26
|
start: any;
|
|
@@ -31,7 +31,7 @@ export function makeAdHocSvFeatureFromTwoRefStartEndSets(columns: any, locRefCol
|
|
|
31
31
|
end: any;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
export function makeAdHocSvFeature(sheet: any, rowNumber: any, row: any, isValidRefName: any): {
|
|
34
|
+
export declare function makeAdHocSvFeature(sheet: any, rowNumber: any, row: any, isValidRefName: any): {
|
|
35
35
|
uniqueId: string;
|
|
36
36
|
refName: any;
|
|
37
37
|
start: any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
// this file contains the rather verbose functions for
|
|
2
3
|
// creating features from CSV/TSV lines
|
|
3
4
|
import { parseLocString } from '@jbrowse/core/util';
|
|
@@ -10,7 +11,7 @@ export function makeAdHocFeature(columns, columnsAlreadyUsedInLocations, row, lo
|
|
|
10
11
|
}
|
|
11
12
|
let { text } = row.cells[columnNumber];
|
|
12
13
|
if (column.dataType.type === 'Number') {
|
|
13
|
-
text = parseFloat(text);
|
|
14
|
+
text = Number.parseFloat(text);
|
|
14
15
|
}
|
|
15
16
|
otherData[column.name] = text;
|
|
16
17
|
});
|
|
@@ -42,13 +43,13 @@ export function makeAdHocSvFeatureFromTwoRefStartEndSets(columns, locRefColumnNu
|
|
|
42
43
|
const textOf = colno => row.cells[colno].text;
|
|
43
44
|
const loc1 = {
|
|
44
45
|
refName: textOf(locRefColumnNumbers[0]),
|
|
45
|
-
start: parseInt(textOf(locStartColumnNumbers[0]), 10) - 1,
|
|
46
|
-
end: parseInt(textOf(locEndColumnNumbers[0]), 10),
|
|
46
|
+
start: Number.parseInt(textOf(locStartColumnNumbers[0]), 10) - 1,
|
|
47
|
+
end: Number.parseInt(textOf(locEndColumnNumbers[0]), 10),
|
|
47
48
|
};
|
|
48
49
|
const loc2 = {
|
|
49
50
|
refName: textOf(locRefColumnNumbers[1]),
|
|
50
|
-
start: parseInt(textOf(locStartColumnNumbers[1]), 10) - 1,
|
|
51
|
-
end: parseInt(textOf(locEndColumnNumbers[1]), 10),
|
|
51
|
+
start: Number.parseInt(textOf(locStartColumnNumbers[1]), 10) - 1,
|
|
52
|
+
end: Number.parseInt(textOf(locEndColumnNumbers[1]), 10),
|
|
52
53
|
};
|
|
53
54
|
const columnsAlreadyUsedInLocations = [
|
|
54
55
|
locRefColumnNumbers[0],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getFeatureForRow(session: any, spreadsheetView: any, row: any, rowNumber: any): any;
|
|
2
|
-
export function breakpointSplitViewSnapshotFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): any;
|
|
3
|
-
export function openBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): void;
|
|
4
|
-
export function canOpenBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): boolean;
|
|
1
|
+
export declare function getFeatureForRow(session: any, spreadsheetView: any, row: any, rowNumber: any): any;
|
|
2
|
+
export declare function breakpointSplitViewSnapshotFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): any;
|
|
3
|
+
export declare function openBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): void;
|
|
4
|
+
export declare function canOpenBreakpointSplitViewFromTableRow(svInspectorView: any, spreadsheetView: any, spreadsheet: any, row: any, rowNumber: any): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-sv-inspector",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "JBrowse 2 SV inspector view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "npm-run-all build:*",
|
|
27
|
-
"test": "cd ../..; jest plugins/sv-inspector",
|
|
27
|
+
"test": "cd ../..; jest --passWithNoTests plugins/sv-inspector",
|
|
28
28
|
"prepublishOnly": "yarn test",
|
|
29
29
|
"prepack": "yarn build && yarn useDist",
|
|
30
30
|
"postpack": "yarn useSrc",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9fb8231d932db40adf0a283081765431756c66ff"
|
|
61
61
|
}
|