@jbrowse/plugin-variants 2.11.0 → 2.11.2
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/ChordVariantDisplay/index.d.ts +1 -2
- package/dist/ChordVariantDisplay/index.js +3 -2
- package/dist/LinearVariantDisplay/configSchema.d.ts +5 -0
- package/dist/LinearVariantDisplay/index.d.ts +1 -2
- package/dist/LinearVariantDisplay/index.js +3 -2
- package/dist/LinearVariantDisplay/model.d.ts +13 -9
- package/dist/StructuralVariantChordRenderer/Chord.js +1 -1
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -2
- package/dist/StructuralVariantChordRenderer/index.js +3 -2
- package/dist/VariantFeatureWidget/AnnotGrid.js +3 -11
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +4 -12
- package/dist/VariantFeatureWidget/index.d.ts +1 -2
- package/dist/VariantFeatureWidget/index.js +3 -2
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +23 -0
- package/dist/VariantTrack/index.d.ts +1 -2
- package/dist/VariantTrack/index.js +3 -2
- package/dist/VcfAdapter/index.d.ts +1 -2
- package/dist/VcfAdapter/index.js +3 -2
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +1 -1
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +2 -2
- package/dist/VcfTabixAdapter/index.d.ts +1 -2
- package/dist/VcfTabixAdapter/index.js +3 -2
- package/dist/extensionPoints.d.ts +1 -2
- package/dist/extensionPoints.js +3 -2
- package/esm/ChordVariantDisplay/index.d.ts +1 -2
- package/esm/ChordVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/configSchema.d.ts +5 -0
- package/esm/LinearVariantDisplay/index.d.ts +1 -2
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +13 -9
- package/esm/StructuralVariantChordRenderer/Chord.js +2 -2
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -2
- package/esm/StructuralVariantChordRenderer/index.js +2 -2
- package/esm/VariantFeatureWidget/AnnotGrid.js +3 -8
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +4 -9
- package/esm/VariantFeatureWidget/index.d.ts +1 -2
- package/esm/VariantFeatureWidget/index.js +2 -2
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +23 -0
- package/esm/VariantTrack/index.d.ts +1 -2
- package/esm/VariantTrack/index.js +2 -2
- package/esm/VcfAdapter/index.d.ts +1 -2
- package/esm/VcfAdapter/index.js +2 -2
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +1 -1
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +1 -1
- package/esm/VcfTabixAdapter/index.d.ts +1 -2
- package/esm/VcfTabixAdapter/index.js +2 -2
- package/esm/extensionPoints.d.ts +1 -2
- package/esm/extensionPoints.js +2 -2
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTyp
|
|
|
8
8
|
// locals
|
|
9
9
|
const configSchema_1 = __importDefault(require("./models/configSchema"));
|
|
10
10
|
const stateModelFactory_1 = __importDefault(require("./models/stateModelFactory"));
|
|
11
|
-
|
|
11
|
+
function ChordVariantDisplayF(pluginManager) {
|
|
12
12
|
pluginManager.addDisplayType(() => {
|
|
13
13
|
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
14
14
|
const stateModel = (0, stateModelFactory_1.default)(configSchema);
|
|
@@ -22,4 +22,5 @@ exports.default = (pluginManager) => {
|
|
|
22
22
|
ReactComponent: plugin_circular_view_1.BaseChordDisplayComponent,
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = ChordVariantDisplayF;
|
|
@@ -24,6 +24,11 @@ export default function configSchemaF(pluginManager: PluginManager): import("@jb
|
|
|
24
24
|
defaultValue: string;
|
|
25
25
|
contextVariable: string[];
|
|
26
26
|
};
|
|
27
|
+
jexlFilters: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
defaultValue: never[];
|
|
31
|
+
};
|
|
27
32
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>;
|
|
28
33
|
export type LinearVariantDisplayConfigModel = ReturnType<typeof configSchemaF>;
|
|
29
34
|
export type LinearVariantDisplayConfig = Instance<LinearVariantDisplayConfigModel>;
|
|
@@ -7,7 +7,7 @@ const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view"
|
|
|
7
7
|
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
8
8
|
const model_1 = __importDefault(require("./model"));
|
|
9
9
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
|
-
|
|
10
|
+
function LinearVariantDisplayF(pluginManager) {
|
|
11
11
|
pluginManager.addDisplayType(() => {
|
|
12
12
|
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
13
13
|
return new DisplayType_1.default({
|
|
@@ -20,4 +20,5 @@ exports.default = (pluginManager) => {
|
|
|
20
20
|
ReactComponent: plugin_linear_genome_view_1.BaseLinearDisplayComponent,
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = LinearVariantDisplayF;
|
|
@@ -82,32 +82,32 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
82
82
|
type: string;
|
|
83
83
|
defaultValue: number;
|
|
84
84
|
description: string;
|
|
85
|
-
};
|
|
86
|
-
* #property
|
|
87
|
-
*/
|
|
85
|
+
};
|
|
88
86
|
height: {
|
|
89
87
|
type: string;
|
|
90
88
|
defaultValue: number;
|
|
91
89
|
description: string;
|
|
92
|
-
};
|
|
93
|
-
* #action
|
|
94
|
-
*/
|
|
90
|
+
};
|
|
95
91
|
mouseover: {
|
|
96
92
|
type: string;
|
|
97
93
|
description: string;
|
|
98
94
|
defaultValue: string;
|
|
99
95
|
contextVariable: string[];
|
|
100
96
|
};
|
|
97
|
+
jexlFilters: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
defaultValue: never[];
|
|
101
|
+
};
|
|
101
102
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
102
103
|
} & {
|
|
103
|
-
type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">;
|
|
104
|
-
* #property
|
|
105
|
-
*/
|
|
104
|
+
type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">;
|
|
106
105
|
trackShowLabels: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
107
106
|
trackShowDescriptions: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
108
107
|
trackDisplayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
109
108
|
trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
110
109
|
configuration: AnyConfigurationSchemaType;
|
|
110
|
+
jexlFilters: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
111
111
|
} & {
|
|
112
112
|
/**
|
|
113
113
|
* #property
|
|
@@ -229,6 +229,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
229
229
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
230
230
|
deleteBlock(key: string): void;
|
|
231
231
|
selectFeature(feature: Feature): void;
|
|
232
|
+
navToFeature(feature: Feature): void;
|
|
232
233
|
clearFeatureSelection(): void;
|
|
233
234
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
234
235
|
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
@@ -242,6 +243,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
242
243
|
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
243
244
|
afterAttach(): void;
|
|
244
245
|
} & {
|
|
246
|
+
readonly activeFilters: any;
|
|
245
247
|
readonly rendererTypeName: any;
|
|
246
248
|
readonly showLabels: any;
|
|
247
249
|
readonly showDescriptions: any;
|
|
@@ -254,6 +256,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
254
256
|
setSubschema(slotName: string, data: unknown): any;
|
|
255
257
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
256
258
|
} & {
|
|
259
|
+
setJexlFilters(f?: string[] | undefined): void;
|
|
257
260
|
toggleShowLabels(): void;
|
|
258
261
|
toggleShowDescriptions(): void;
|
|
259
262
|
setDisplayMode(val: string): void;
|
|
@@ -265,6 +268,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
265
268
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
266
269
|
setSubschema(slotName: string, data: unknown): any;
|
|
267
270
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
271
|
+
filters: import("@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain").default;
|
|
268
272
|
};
|
|
269
273
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
270
274
|
} & {
|
|
@@ -87,7 +87,7 @@ const Chord = (0, mobx_react_1.observer)(function Chord({ feature, blocksForRefs
|
|
|
87
87
|
const hoverStrokeColor = (0, configuration_1.readConfObject)(config, 'strokeColorHover', {
|
|
88
88
|
feature,
|
|
89
89
|
});
|
|
90
|
-
return (react_1.default.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '),
|
|
90
|
+
return (react_1.default.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), ...(0, util_1.getStrokeProps)(hovered ? hoverStrokeColor : strokeColor), strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
91
91
|
if (endBlock && startBlock) {
|
|
92
92
|
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
93
93
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const CircularChordRendererType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType"));
|
|
7
7
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
8
8
|
const ReactComponent_1 = __importDefault(require("./ReactComponent"));
|
|
9
|
-
|
|
9
|
+
function StructuralVariantChordRendererF(pluginManager) {
|
|
10
10
|
pluginManager.addRendererType(() => new CircularChordRendererType_1.default({
|
|
11
11
|
name: 'StructuralVariantChordRenderer',
|
|
12
12
|
displayName: 'SV chord renderer',
|
|
@@ -14,4 +14,5 @@ exports.default = (pluginManager) => {
|
|
|
14
14
|
configSchema: configSchema_1.default,
|
|
15
15
|
pluginManager,
|
|
16
16
|
}));
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = StructuralVariantChordRendererF;
|
|
@@ -22,24 +22,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const react_1 = __importStar(require("react"));
|
|
30
27
|
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
31
28
|
const material_1 = require("@mui/material");
|
|
32
|
-
const ResizeBar_1 = __importDefault(require("@jbrowse/core/ui/ResizeBar"));
|
|
33
29
|
const util_1 = require("@jbrowse/core/util");
|
|
34
|
-
const useResizeBar_1 = require("@jbrowse/core/ui/useResizeBar");
|
|
35
30
|
function VariantAnnotPanel({ rows, columns, }) {
|
|
36
|
-
const { ref, scrollLeft } = (0, useResizeBar_1.useResizeBar)();
|
|
37
31
|
const [checked, setChecked] = (0, react_1.useState)(false);
|
|
38
|
-
const
|
|
39
|
-
return rows.length ? (react_1.default.createElement("div",
|
|
32
|
+
const widths = columns.map(e => (0, util_1.measureGridWidth)(rows.map(r => r[e.field])));
|
|
33
|
+
return rows.length ? (react_1.default.createElement("div", null,
|
|
40
34
|
react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: checked, onChange: event => setChecked(event.target.checked) }), label: react_1.default.createElement(material_1.Typography, { variant: "body2" }, "Show options") }),
|
|
41
|
-
react_1.default.createElement(
|
|
42
|
-
react_1.default.createElement(ResizeBar_1.default, { widths: widths, setWidths: setWidths, scrollLeft: scrollLeft }),
|
|
43
|
-
react_1.default.createElement(x_data_grid_1.DataGrid, { rowHeight: 25, rows: rows, columns: columns.map((c, i) => ({ ...c, width: widths[i] })), slots: { toolbar: checked ? x_data_grid_1.GridToolbar : null } })))) : null;
|
|
35
|
+
react_1.default.createElement(x_data_grid_1.DataGrid, { rowHeight: 25, rows: rows, columns: columns.map((c, i) => ({ ...c, width: widths[i] })), slots: { toolbar: checked ? x_data_grid_1.GridToolbar : null } }))) : null;
|
|
44
36
|
}
|
|
45
37
|
exports.default = VariantAnnotPanel;
|
|
@@ -22,17 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const react_1 = __importStar(require("react"));
|
|
30
27
|
const material_1 = require("@mui/material");
|
|
31
28
|
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
32
29
|
const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
|
|
33
30
|
const util_1 = require("@jbrowse/core/util");
|
|
34
|
-
const ResizeBar_1 = __importDefault(require("@jbrowse/core/ui/ResizeBar"));
|
|
35
|
-
const useResizeBar_1 = require("@jbrowse/core/ui/useResizeBar");
|
|
36
31
|
function SampleFilters({ columns, filter, setFilter, }) {
|
|
37
32
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
33
|
react_1.default.createElement(material_1.Typography, null, "These filters can use a plain text search or regex style query, e.g. in the genotype field, entering 1 will query for all genotypes that include the first alternate allele e.g. 0|1 or 1|1, entering [1-9]\\d* will find any non-zero allele e.g. 0|2 or 2/33"),
|
|
@@ -41,7 +36,6 @@ function SampleFilters({ columns, filter, setFilter, }) {
|
|
|
41
36
|
function VariantSamples(props) {
|
|
42
37
|
var _a;
|
|
43
38
|
const { feature, descriptions = {} } = props;
|
|
44
|
-
const { ref, scrollLeft } = (0, useResizeBar_1.useResizeBar)();
|
|
45
39
|
const [filter, setFilter] = (0, react_1.useState)({});
|
|
46
40
|
const samples = (feature.samples || {});
|
|
47
41
|
const preFilteredRows = Object.entries(samples);
|
|
@@ -74,7 +68,7 @@ function VariantSamples(props) {
|
|
|
74
68
|
}
|
|
75
69
|
const keys = ['sample', ...Object.keys(((_a = preFilteredRows[0]) === null || _a === void 0 ? void 0 : _a[1]) || {})];
|
|
76
70
|
const [checked, setChecked] = (0, react_1.useState)(false);
|
|
77
|
-
const
|
|
71
|
+
const widths = keys.map(e => (0, util_1.measureGridWidth)(rows.map(r => r[e])));
|
|
78
72
|
const columns = keys.map((field, index) => {
|
|
79
73
|
var _a, _b;
|
|
80
74
|
return ({
|
|
@@ -89,10 +83,8 @@ function VariantSamples(props) {
|
|
|
89
83
|
error ? react_1.default.createElement(material_1.Typography, { color: "error" }, `${error}`) : null,
|
|
90
84
|
react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: checked, onChange: event => setChecked(event.target.checked) }), label: react_1.default.createElement(material_1.Typography, { variant: "body2" }, "Show options") }),
|
|
91
85
|
checked ? (react_1.default.createElement(SampleFilters, { setFilter: setFilter, columns: columns, filter: filter })) : null,
|
|
92
|
-
react_1.default.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
toolbar: { printOptions: { disableToolbarButton: true } },
|
|
96
|
-
} }))));
|
|
86
|
+
react_1.default.createElement(x_data_grid_1.DataGrid, { rows: rows, hideFooter: rows.length < 100, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, columnHeaderHeight: 35, disableColumnMenu: true, slots: { toolbar: checked ? x_data_grid_1.GridToolbar : null }, slotProps: {
|
|
87
|
+
toolbar: { printOptions: { disableToolbarButton: true } },
|
|
88
|
+
} })));
|
|
97
89
|
}
|
|
98
90
|
exports.default = VariantSamples;
|
|
@@ -30,7 +30,7 @@ const react_1 = require("react");
|
|
|
30
30
|
const WidgetType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/WidgetType"));
|
|
31
31
|
const stateModelFactory_1 = require("./stateModelFactory");
|
|
32
32
|
const configSchema_1 = require("./configSchema");
|
|
33
|
-
|
|
33
|
+
function VariantFeatureWidgetF(pluginManager) {
|
|
34
34
|
pluginManager.addWidgetType(() => new WidgetType_1.default({
|
|
35
35
|
name: 'VariantFeatureWidget',
|
|
36
36
|
heading: 'Feature details',
|
|
@@ -38,4 +38,5 @@ exports.default = (pluginManager) => {
|
|
|
38
38
|
stateModel: (0, stateModelFactory_1.stateModelFactory)(pluginManager),
|
|
39
39
|
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./VariantFeatureWidget')))),
|
|
40
40
|
}));
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = VariantFeatureWidgetF;
|
|
@@ -11,6 +11,17 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
11
11
|
trackId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
12
12
|
trackType: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
13
13
|
maxDepth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
14
|
+
sequenceFeatureDetails: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{}, {
|
|
15
|
+
intronBp: number;
|
|
16
|
+
upDownBp: number;
|
|
17
|
+
upperCaseCDS: boolean;
|
|
18
|
+
} & {
|
|
19
|
+
setUpDownBp(f: number): void;
|
|
20
|
+
setIntronBp(f: number): void;
|
|
21
|
+
setUpperCaseCDS(f: boolean): void;
|
|
22
|
+
} & {
|
|
23
|
+
afterAttach(): void;
|
|
24
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
14
25
|
} & {
|
|
15
26
|
type: import("mobx-state-tree").ISimpleType<"VariantFeatureWidget">;
|
|
16
27
|
descriptions: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -37,6 +48,17 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
37
48
|
trackId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
38
49
|
trackType: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
39
50
|
maxDepth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
51
|
+
sequenceFeatureDetails: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{}, {
|
|
52
|
+
intronBp: number;
|
|
53
|
+
upDownBp: number;
|
|
54
|
+
upperCaseCDS: boolean;
|
|
55
|
+
} & {
|
|
56
|
+
setUpDownBp(f: number): void;
|
|
57
|
+
setIntronBp(f: number): void;
|
|
58
|
+
setUpperCaseCDS(f: boolean): void;
|
|
59
|
+
} & {
|
|
60
|
+
afterAttach(): void;
|
|
61
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
40
62
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
41
63
|
id: string;
|
|
42
64
|
type: "BaseFeatureWidget";
|
|
@@ -46,6 +68,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
46
68
|
trackType: string | undefined;
|
|
47
69
|
maxDepth: number | undefined;
|
|
48
70
|
formattedFields: any;
|
|
71
|
+
sequenceFeatureDetails: import("mobx-state-tree").ModelSnapshotType<{}>;
|
|
49
72
|
finalizedFeatureData: any;
|
|
50
73
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
51
74
|
export type VariantFeatureWidgetStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const TrackType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
|
|
7
7
|
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
8
8
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
9
|
-
|
|
9
|
+
function VariantTrackF(pm) {
|
|
10
10
|
pm.addTrackType(() => {
|
|
11
11
|
const configSchema = (0, configSchema_1.default)(pm);
|
|
12
12
|
return new TrackType_1.default({
|
|
@@ -16,4 +16,5 @@ exports.default = (pm) => {
|
|
|
16
16
|
stateModel: (0, models_1.createBaseTrackModel)(pm, 'VariantTrack', configSchema),
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = VariantTrackF;
|
package/dist/VcfAdapter/index.js
CHANGED
|
@@ -28,11 +28,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
30
30
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
31
|
-
|
|
31
|
+
function VcfAdapterF(pluginManager) {
|
|
32
32
|
pluginManager.addAdapterType(() => new AdapterType_1.default({
|
|
33
33
|
name: 'VcfAdapter',
|
|
34
34
|
displayName: 'VCF adapter',
|
|
35
35
|
configSchema: configSchema_1.default,
|
|
36
36
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./VcfAdapter'))).then(r => r.default),
|
|
37
37
|
}));
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
|
+
exports.default = VcfAdapterF;
|
|
@@ -3,7 +3,7 @@ import { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
|
3
3
|
import { Feature } from '@jbrowse/core/util';
|
|
4
4
|
import { TabixIndexedFile } from '@gmod/tabix';
|
|
5
5
|
import VcfParser from '@gmod/vcf';
|
|
6
|
-
export default class extends BaseFeatureDataAdapter {
|
|
6
|
+
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
7
7
|
private configured?;
|
|
8
8
|
private configurePre;
|
|
9
9
|
protected configure(): Promise<{
|
|
@@ -10,7 +10,7 @@ const tabix_1 = require("@gmod/tabix");
|
|
|
10
10
|
const vcf_1 = __importDefault(require("@gmod/vcf"));
|
|
11
11
|
// local
|
|
12
12
|
const VcfFeature_1 = __importDefault(require("../VcfFeature"));
|
|
13
|
-
class
|
|
13
|
+
class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
14
14
|
async configurePre() {
|
|
15
15
|
const pm = this.pluginManager;
|
|
16
16
|
const vcfGzLocation = this.getConf('vcfGzLocation');
|
|
@@ -71,4 +71,4 @@ class default_1 extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
71
71
|
}
|
|
72
72
|
freeResources( /* { region } */) { }
|
|
73
73
|
}
|
|
74
|
-
exports.default =
|
|
74
|
+
exports.default = VcfTabixAdapter;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export { default as configSchema } from './configSchema';
|
|
3
|
-
|
|
4
|
-
export default _default;
|
|
3
|
+
export default function VcfTabixAdapterF(pluginManager: PluginManager): void;
|
|
@@ -31,11 +31,12 @@ const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTyp
|
|
|
31
31
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
32
32
|
var configSchema_2 = require("./configSchema");
|
|
33
33
|
Object.defineProperty(exports, "configSchema", { enumerable: true, get: function () { return __importDefault(configSchema_2).default; } });
|
|
34
|
-
|
|
34
|
+
function VcfTabixAdapterF(pluginManager) {
|
|
35
35
|
pluginManager.addAdapterType(() => new AdapterType_1.default({
|
|
36
36
|
name: 'VcfTabixAdapter',
|
|
37
37
|
displayName: 'VCF tabix adapter',
|
|
38
38
|
configSchema: configSchema_1.default,
|
|
39
39
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./VcfTabixAdapter'))).then(r => r.default),
|
|
40
40
|
}));
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = VcfTabixAdapterF;
|
package/dist/extensionPoints.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
4
|
-
|
|
4
|
+
function ExtensionPointsF(pluginManager) {
|
|
5
5
|
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
6
6
|
return (file, index, adapterHint) => {
|
|
7
7
|
const regexGuess = /\.vcf\.b?gz$/i;
|
|
@@ -47,4 +47,5 @@ exports.default = (pluginManager) => {
|
|
|
47
47
|
return adapterGuesser(file, index, adapterHint);
|
|
48
48
|
};
|
|
49
49
|
});
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
|
+
exports.default = ExtensionPointsF;
|
|
@@ -3,7 +3,7 @@ import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
|
3
3
|
// locals
|
|
4
4
|
import configSchemaF from './models/configSchema';
|
|
5
5
|
import stateModelF from './models/stateModelFactory';
|
|
6
|
-
export default (pluginManager)
|
|
6
|
+
export default function ChordVariantDisplayF(pluginManager) {
|
|
7
7
|
pluginManager.addDisplayType(() => {
|
|
8
8
|
const configSchema = configSchemaF(pluginManager);
|
|
9
9
|
const stateModel = stateModelF(configSchema);
|
|
@@ -17,4 +17,4 @@ export default (pluginManager) => {
|
|
|
17
17
|
ReactComponent: BaseChordDisplayComponent,
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
|
-
}
|
|
20
|
+
}
|
|
@@ -24,6 +24,11 @@ export default function configSchemaF(pluginManager: PluginManager): import("@jb
|
|
|
24
24
|
defaultValue: string;
|
|
25
25
|
contextVariable: string[];
|
|
26
26
|
};
|
|
27
|
+
jexlFilters: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
defaultValue: never[];
|
|
31
|
+
};
|
|
27
32
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>;
|
|
28
33
|
export type LinearVariantDisplayConfigModel = ReturnType<typeof configSchemaF>;
|
|
29
34
|
export type LinearVariantDisplayConfig = Instance<LinearVariantDisplayConfigModel>;
|
|
@@ -2,7 +2,7 @@ import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
|
2
2
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
3
3
|
import stateModelFactory from './model';
|
|
4
4
|
import configSchemaF from './configSchema';
|
|
5
|
-
export default (pluginManager)
|
|
5
|
+
export default function LinearVariantDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaF(pluginManager);
|
|
8
8
|
return new DisplayType({
|
|
@@ -15,4 +15,4 @@ export default (pluginManager) => {
|
|
|
15
15
|
ReactComponent: BaseLinearDisplayComponent,
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -82,32 +82,32 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
82
82
|
type: string;
|
|
83
83
|
defaultValue: number;
|
|
84
84
|
description: string;
|
|
85
|
-
};
|
|
86
|
-
* #property
|
|
87
|
-
*/
|
|
85
|
+
};
|
|
88
86
|
height: {
|
|
89
87
|
type: string;
|
|
90
88
|
defaultValue: number;
|
|
91
89
|
description: string;
|
|
92
|
-
};
|
|
93
|
-
* #action
|
|
94
|
-
*/
|
|
90
|
+
};
|
|
95
91
|
mouseover: {
|
|
96
92
|
type: string;
|
|
97
93
|
description: string;
|
|
98
94
|
defaultValue: string;
|
|
99
95
|
contextVariable: string[];
|
|
100
96
|
};
|
|
97
|
+
jexlFilters: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
defaultValue: never[];
|
|
101
|
+
};
|
|
101
102
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
102
103
|
} & {
|
|
103
|
-
type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">;
|
|
104
|
-
* #property
|
|
105
|
-
*/
|
|
104
|
+
type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">;
|
|
106
105
|
trackShowLabels: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
107
106
|
trackShowDescriptions: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
108
107
|
trackDisplayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
109
108
|
trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
110
109
|
configuration: AnyConfigurationSchemaType;
|
|
110
|
+
jexlFilters: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
111
111
|
} & {
|
|
112
112
|
/**
|
|
113
113
|
* #property
|
|
@@ -229,6 +229,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
229
229
|
addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
|
|
230
230
|
deleteBlock(key: string): void;
|
|
231
231
|
selectFeature(feature: Feature): void;
|
|
232
|
+
navToFeature(feature: Feature): void;
|
|
232
233
|
clearFeatureSelection(): void;
|
|
233
234
|
setFeatureIdUnderMouse(feature?: string | undefined): void;
|
|
234
235
|
setContextMenuFeature(feature?: Feature | undefined): void;
|
|
@@ -242,6 +243,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
242
243
|
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
243
244
|
afterAttach(): void;
|
|
244
245
|
} & {
|
|
246
|
+
readonly activeFilters: any;
|
|
245
247
|
readonly rendererTypeName: any;
|
|
246
248
|
readonly showLabels: any;
|
|
247
249
|
readonly showDescriptions: any;
|
|
@@ -254,6 +256,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
254
256
|
setSubschema(slotName: string, data: unknown): any;
|
|
255
257
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
256
258
|
} & {
|
|
259
|
+
setJexlFilters(f?: string[] | undefined): void;
|
|
257
260
|
toggleShowLabels(): void;
|
|
258
261
|
toggleShowDescriptions(): void;
|
|
259
262
|
setDisplayMode(val: string): void;
|
|
@@ -265,6 +268,7 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
265
268
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
266
269
|
setSubschema(slotName: string, data: unknown): any;
|
|
267
270
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
271
|
+
filters: import("@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain").default;
|
|
268
272
|
};
|
|
269
273
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
270
274
|
} & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
import { polarToCartesian } from '@jbrowse/core/util';
|
|
3
|
+
import { polarToCartesian, getStrokeProps } from '@jbrowse/core/util';
|
|
4
4
|
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
5
5
|
import { parseBreakend } from '@gmod/vcf';
|
|
6
6
|
function bpToRadians(block, pos) {
|
|
@@ -62,7 +62,7 @@ const Chord = observer(function Chord({ feature, blocksForRefs, radius, config,
|
|
|
62
62
|
const hoverStrokeColor = readConfObject(config, 'strokeColorHover', {
|
|
63
63
|
feature,
|
|
64
64
|
});
|
|
65
|
-
return (React.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '),
|
|
65
|
+
return (React.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), ...getStrokeProps(hovered ? hoverStrokeColor : strokeColor), strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
66
66
|
if (endBlock && startBlock) {
|
|
67
67
|
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
68
68
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
|
|
2
2
|
import configSchema from './configSchema';
|
|
3
3
|
import ReactComponent from './ReactComponent';
|
|
4
|
-
export default (pluginManager)
|
|
4
|
+
export default function StructuralVariantChordRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new ChordRendererType({
|
|
6
6
|
name: 'StructuralVariantChordRenderer',
|
|
7
7
|
displayName: 'SV chord renderer',
|
|
@@ -9,4 +9,4 @@ export default (pluginManager) => {
|
|
|
9
9
|
configSchema,
|
|
10
10
|
pluginManager,
|
|
11
11
|
}));
|
|
12
|
-
}
|
|
12
|
+
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { DataGrid, GridToolbar, } from '@mui/x-data-grid';
|
|
3
3
|
import { Checkbox, FormControlLabel, Typography } from '@mui/material';
|
|
4
|
-
import ResizeBar from '@jbrowse/core/ui/ResizeBar';
|
|
5
4
|
import { measureGridWidth } from '@jbrowse/core/util';
|
|
6
|
-
import { useResizeBar } from '@jbrowse/core/ui/useResizeBar';
|
|
7
5
|
export default function VariantAnnotPanel({ rows, columns, }) {
|
|
8
|
-
const { ref, scrollLeft } = useResizeBar();
|
|
9
6
|
const [checked, setChecked] = useState(false);
|
|
10
|
-
const
|
|
11
|
-
return rows.length ? (React.createElement("div",
|
|
7
|
+
const widths = columns.map(e => measureGridWidth(rows.map(r => r[e.field])));
|
|
8
|
+
return rows.length ? (React.createElement("div", null,
|
|
12
9
|
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: checked, onChange: event => setChecked(event.target.checked) }), label: React.createElement(Typography, { variant: "body2" }, "Show options") }),
|
|
13
|
-
React.createElement(
|
|
14
|
-
React.createElement(ResizeBar, { widths: widths, setWidths: setWidths, scrollLeft: scrollLeft }),
|
|
15
|
-
React.createElement(DataGrid, { rowHeight: 25, rows: rows, columns: columns.map((c, i) => ({ ...c, width: widths[i] })), slots: { toolbar: checked ? GridToolbar : null } })))) : null;
|
|
10
|
+
React.createElement(DataGrid, { rowHeight: 25, rows: rows, columns: columns.map((c, i) => ({ ...c, width: widths[i] })), slots: { toolbar: checked ? GridToolbar : null } }))) : null;
|
|
16
11
|
}
|
|
@@ -3,8 +3,6 @@ import { FormControlLabel, Checkbox, TextField, Typography, } from '@mui/materia
|
|
|
3
3
|
import { DataGrid, GridToolbar } from '@mui/x-data-grid';
|
|
4
4
|
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
5
5
|
import { measureGridWidth } from '@jbrowse/core/util';
|
|
6
|
-
import ResizeBar from '@jbrowse/core/ui/ResizeBar';
|
|
7
|
-
import { useResizeBar } from '@jbrowse/core/ui/useResizeBar';
|
|
8
6
|
function SampleFilters({ columns, filter, setFilter, }) {
|
|
9
7
|
return (React.createElement(React.Fragment, null,
|
|
10
8
|
React.createElement(Typography, null, "These filters can use a plain text search or regex style query, e.g. in the genotype field, entering 1 will query for all genotypes that include the first alternate allele e.g. 0|1 or 1|1, entering [1-9]\\d* will find any non-zero allele e.g. 0|2 or 2/33"),
|
|
@@ -13,7 +11,6 @@ function SampleFilters({ columns, filter, setFilter, }) {
|
|
|
13
11
|
export default function VariantSamples(props) {
|
|
14
12
|
var _a;
|
|
15
13
|
const { feature, descriptions = {} } = props;
|
|
16
|
-
const { ref, scrollLeft } = useResizeBar();
|
|
17
14
|
const [filter, setFilter] = useState({});
|
|
18
15
|
const samples = (feature.samples || {});
|
|
19
16
|
const preFilteredRows = Object.entries(samples);
|
|
@@ -46,7 +43,7 @@ export default function VariantSamples(props) {
|
|
|
46
43
|
}
|
|
47
44
|
const keys = ['sample', ...Object.keys(((_a = preFilteredRows[0]) === null || _a === void 0 ? void 0 : _a[1]) || {})];
|
|
48
45
|
const [checked, setChecked] = useState(false);
|
|
49
|
-
const
|
|
46
|
+
const widths = keys.map(e => measureGridWidth(rows.map(r => r[e])));
|
|
50
47
|
const columns = keys.map((field, index) => {
|
|
51
48
|
var _a, _b;
|
|
52
49
|
return ({
|
|
@@ -61,9 +58,7 @@ export default function VariantSamples(props) {
|
|
|
61
58
|
error ? React.createElement(Typography, { color: "error" }, `${error}`) : null,
|
|
62
59
|
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: checked, onChange: event => setChecked(event.target.checked) }), label: React.createElement(Typography, { variant: "body2" }, "Show options") }),
|
|
63
60
|
checked ? (React.createElement(SampleFilters, { setFilter: setFilter, columns: columns, filter: filter })) : null,
|
|
64
|
-
React.createElement(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
toolbar: { printOptions: { disableToolbarButton: true } },
|
|
68
|
-
} }))));
|
|
61
|
+
React.createElement(DataGrid, { rows: rows, hideFooter: rows.length < 100, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, columnHeaderHeight: 35, disableColumnMenu: true, slots: { toolbar: checked ? GridToolbar : null }, slotProps: {
|
|
62
|
+
toolbar: { printOptions: { disableToolbarButton: true } },
|
|
63
|
+
} })));
|
|
69
64
|
}
|
|
@@ -2,7 +2,7 @@ import { lazy } from 'react';
|
|
|
2
2
|
import WidgetType from '@jbrowse/core/pluggableElementTypes/WidgetType';
|
|
3
3
|
import { stateModelFactory } from './stateModelFactory';
|
|
4
4
|
import { configSchema } from './configSchema';
|
|
5
|
-
export default (pluginManager)
|
|
5
|
+
export default function VariantFeatureWidgetF(pluginManager) {
|
|
6
6
|
pluginManager.addWidgetType(() => new WidgetType({
|
|
7
7
|
name: 'VariantFeatureWidget',
|
|
8
8
|
heading: 'Feature details',
|
|
@@ -10,4 +10,4 @@ export default (pluginManager) => {
|
|
|
10
10
|
stateModel: stateModelFactory(pluginManager),
|
|
11
11
|
ReactComponent: lazy(() => import('./VariantFeatureWidget')),
|
|
12
12
|
}));
|
|
13
|
-
}
|
|
13
|
+
}
|
|
@@ -11,6 +11,17 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
11
11
|
trackId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
12
12
|
trackType: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
13
13
|
maxDepth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
14
|
+
sequenceFeatureDetails: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{}, {
|
|
15
|
+
intronBp: number;
|
|
16
|
+
upDownBp: number;
|
|
17
|
+
upperCaseCDS: boolean;
|
|
18
|
+
} & {
|
|
19
|
+
setUpDownBp(f: number): void;
|
|
20
|
+
setIntronBp(f: number): void;
|
|
21
|
+
setUpperCaseCDS(f: boolean): void;
|
|
22
|
+
} & {
|
|
23
|
+
afterAttach(): void;
|
|
24
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
14
25
|
} & {
|
|
15
26
|
type: import("mobx-state-tree").ISimpleType<"VariantFeatureWidget">;
|
|
16
27
|
descriptions: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -37,6 +48,17 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
37
48
|
trackId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
38
49
|
trackType: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
39
50
|
maxDepth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
51
|
+
sequenceFeatureDetails: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{}, {
|
|
52
|
+
intronBp: number;
|
|
53
|
+
upDownBp: number;
|
|
54
|
+
upperCaseCDS: boolean;
|
|
55
|
+
} & {
|
|
56
|
+
setUpDownBp(f: number): void;
|
|
57
|
+
setIntronBp(f: number): void;
|
|
58
|
+
setUpperCaseCDS(f: boolean): void;
|
|
59
|
+
} & {
|
|
60
|
+
afterAttach(): void;
|
|
61
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
40
62
|
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree")._NotCustomized, {
|
|
41
63
|
id: string;
|
|
42
64
|
type: "BaseFeatureWidget";
|
|
@@ -46,6 +68,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
46
68
|
trackType: string | undefined;
|
|
47
69
|
maxDepth: number | undefined;
|
|
48
70
|
formattedFields: any;
|
|
71
|
+
sequenceFeatureDetails: import("mobx-state-tree").ModelSnapshotType<{}>;
|
|
49
72
|
finalizedFeatureData: any;
|
|
50
73
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
51
74
|
export type VariantFeatureWidgetStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
|
|
2
2
|
import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
3
|
import configSchemaF from './configSchema';
|
|
4
|
-
export default (pm)
|
|
4
|
+
export default function VariantTrackF(pm) {
|
|
5
5
|
pm.addTrackType(() => {
|
|
6
6
|
const configSchema = configSchemaF(pm);
|
|
7
7
|
return new TrackType({
|
|
@@ -11,4 +11,4 @@ export default (pm) => {
|
|
|
11
11
|
stateModel: createBaseTrackModel(pm, 'VariantTrack', configSchema),
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
|
-
}
|
|
14
|
+
}
|
package/esm/VcfAdapter/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
2
2
|
import configSchema from './configSchema';
|
|
3
|
-
export default (pluginManager)
|
|
3
|
+
export default function VcfAdapterF(pluginManager) {
|
|
4
4
|
pluginManager.addAdapterType(() => new AdapterType({
|
|
5
5
|
name: 'VcfAdapter',
|
|
6
6
|
displayName: 'VCF adapter',
|
|
7
7
|
configSchema,
|
|
8
8
|
getAdapterClass: () => import('./VcfAdapter').then(r => r.default),
|
|
9
9
|
}));
|
|
10
|
-
}
|
|
10
|
+
}
|
|
@@ -3,7 +3,7 @@ import { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
|
3
3
|
import { Feature } from '@jbrowse/core/util';
|
|
4
4
|
import { TabixIndexedFile } from '@gmod/tabix';
|
|
5
5
|
import VcfParser from '@gmod/vcf';
|
|
6
|
-
export default class extends BaseFeatureDataAdapter {
|
|
6
|
+
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
7
7
|
private configured?;
|
|
8
8
|
private configurePre;
|
|
9
9
|
protected configure(): Promise<{
|
|
@@ -5,7 +5,7 @@ import { TabixIndexedFile } from '@gmod/tabix';
|
|
|
5
5
|
import VcfParser from '@gmod/vcf';
|
|
6
6
|
// local
|
|
7
7
|
import VcfFeature from '../VcfFeature';
|
|
8
|
-
export default class extends BaseFeatureDataAdapter {
|
|
8
|
+
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
9
9
|
async configurePre() {
|
|
10
10
|
const pm = this.pluginManager;
|
|
11
11
|
const vcfGzLocation = this.getConf('vcfGzLocation');
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export { default as configSchema } from './configSchema';
|
|
3
|
-
|
|
4
|
-
export default _default;
|
|
3
|
+
export default function VcfTabixAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
2
2
|
import configSchema from './configSchema';
|
|
3
3
|
export { default as configSchema } from './configSchema';
|
|
4
|
-
export default (pluginManager)
|
|
4
|
+
export default function VcfTabixAdapterF(pluginManager) {
|
|
5
5
|
pluginManager.addAdapterType(() => new AdapterType({
|
|
6
6
|
name: 'VcfTabixAdapter',
|
|
7
7
|
displayName: 'VCF tabix adapter',
|
|
8
8
|
configSchema,
|
|
9
9
|
getAdapterClass: () => import('./VcfTabixAdapter').then(r => r.default),
|
|
10
10
|
}));
|
|
11
|
-
}
|
|
11
|
+
}
|
package/esm/extensionPoints.d.ts
CHANGED
package/esm/extensionPoints.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeIndex, makeIndexType, getFileName, } from '@jbrowse/core/util/tracks';
|
|
2
|
-
export default (pluginManager)
|
|
2
|
+
export default function ExtensionPointsF(pluginManager) {
|
|
3
3
|
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
4
4
|
return (file, index, adapterHint) => {
|
|
5
5
|
const regexGuess = /\.vcf\.b?gz$/i;
|
|
@@ -45,4 +45,4 @@ export default (pluginManager) => {
|
|
|
45
45
|
return adapterGuesser(file, index, adapterHint);
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
|
-
}
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-variants",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "JBrowse 2 variant adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"distModule": "esm/index.js",
|
|
64
64
|
"srcModule": "src/index.ts",
|
|
65
65
|
"module": "esm/index.js",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "511048cb6965f0bf624c96de244e7fd47fce17d6"
|
|
67
67
|
}
|