@jbrowse/plugin-variants 3.0.0 → 3.0.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/MultiLinearVariantDisplay/components/Crosshair.js +1 -1
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +1 -1
- package/dist/MultiLinearVariantDisplay/model.d.ts +7 -7
- package/dist/MultiLinearVariantDisplay/renderSvg.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +1 -1
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +7 -7
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +5 -5
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +6 -3
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +58 -68
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +2 -1
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +1 -1
- package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.d.ts +22 -0
- package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.js +52 -0
- package/dist/MultiLinearVariantRenderer/index.js +1 -1
- package/dist/MultiLinearVariantRenderer/makeImageData.js +13 -21
- package/dist/MultiLinearVariantRenderer/types.d.ts +1 -1
- package/dist/MultiVariantBaseRenderer.d.ts +5 -5
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +4 -4
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +1 -1
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +9 -9
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +6 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +13 -13
- package/dist/getMultiVariantFeaturesAutorun.d.ts +1 -1
- package/dist/getMultiVariantSourcesAutorun.d.ts +1 -1
- package/dist/shared/MultiVariantBaseModel.d.ts +1 -1
- package/dist/shared/MultiVariantBaseModel.js +4 -4
- package/dist/shared/{SourcesGridHeader.js → components/SourcesGridHeader.js} +5 -5
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/constants.js +5 -0
- package/dist/shared/drawAlleleCount.d.ts +1 -0
- package/dist/shared/{multiVariantColor.js → drawAlleleCount.js} +7 -14
- package/dist/shared/drawPhased.d.ts +1 -0
- package/dist/shared/drawPhased.js +21 -0
- package/dist/shared/findSecondLargestNumber.d.ts +0 -0
- package/dist/shared/findSecondLargestNumber.js +1 -0
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +11 -0
- package/dist/shared/minorAlleleFrequencyUtils.js +62 -0
- package/dist/shared/sourcesGridUtils.d.ts +10 -0
- package/dist/shared/sourcesGridUtils.js +32 -0
- package/dist/shared/util.d.ts +3 -10
- package/dist/shared/util.js +23 -26
- package/dist/util.d.ts +0 -8
- package/dist/util.js +0 -85
- package/esm/MultiLinearVariantDisplay/components/Crosshair.js +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +1 -1
- package/esm/MultiLinearVariantDisplay/model.d.ts +7 -7
- package/esm/MultiLinearVariantDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +7 -7
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +5 -5
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +6 -3
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +56 -66
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -1
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +1 -1
- package/esm/MultiLinearVariantRenderer/components/MultiVariantRendering.d.ts +22 -0
- package/esm/MultiLinearVariantRenderer/components/MultiVariantRendering.js +47 -0
- package/esm/MultiLinearVariantRenderer/index.js +1 -1
- package/esm/MultiLinearVariantRenderer/makeImageData.js +6 -14
- package/esm/MultiLinearVariantRenderer/types.d.ts +1 -1
- package/esm/MultiVariantBaseRenderer.d.ts +5 -5
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +3 -3
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +1 -1
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +8 -8
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +6 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +13 -13
- package/esm/getMultiVariantFeaturesAutorun.d.ts +1 -1
- package/esm/getMultiVariantSourcesAutorun.d.ts +1 -1
- package/esm/shared/MultiVariantBaseModel.d.ts +1 -1
- package/esm/shared/MultiVariantBaseModel.js +4 -4
- package/esm/shared/{SourcesGridHeader.js → components/SourcesGridHeader.js} +1 -1
- package/esm/shared/constants.d.ts +2 -0
- package/esm/shared/constants.js +2 -0
- package/esm/shared/drawAlleleCount.d.ts +1 -0
- package/esm/shared/{multiVariantColor.js → drawAlleleCount.js} +6 -11
- package/esm/shared/drawPhased.d.ts +1 -0
- package/esm/shared/drawPhased.js +18 -0
- package/esm/shared/findSecondLargestNumber.d.ts +0 -0
- package/esm/shared/findSecondLargestNumber.js +1 -0
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +11 -0
- package/esm/shared/minorAlleleFrequencyUtils.js +56 -0
- package/esm/shared/sourcesGridUtils.d.ts +10 -0
- package/esm/shared/sourcesGridUtils.js +28 -0
- package/esm/shared/util.d.ts +3 -10
- package/esm/shared/util.js +20 -24
- package/esm/util.d.ts +0 -8
- package/esm/util.js +1 -77
- package/package.json +11 -11
- package/dist/shared/multiVariantColor.d.ts +0 -3
- package/esm/shared/multiVariantColor.d.ts +0 -3
- /package/dist/shared/{BulkEditPanel.d.ts → components/BulkEditPanel.d.ts} +0 -0
- /package/dist/shared/{BulkEditPanel.js → components/BulkEditPanel.js} +0 -0
- /package/dist/shared/{ClusterDialog.d.ts → components/ClusterDialog.d.ts} +0 -0
- /package/dist/shared/{ClusterDialog.js → components/ClusterDialog.js} +0 -0
- /package/dist/shared/{ColorLegend.d.ts → components/ColorLegend.d.ts} +0 -0
- /package/dist/shared/{ColorLegend.js → components/ColorLegend.js} +0 -0
- /package/dist/shared/{HelpfulTips.d.ts → components/HelpfulTips.d.ts} +0 -0
- /package/dist/shared/{HelpfulTips.js → components/HelpfulTips.js} +0 -0
- /package/dist/shared/{LegendBar.d.ts → components/LegendBar.d.ts} +0 -0
- /package/dist/shared/{LegendBar.js → components/LegendBar.js} +0 -0
- /package/dist/shared/{MAFFilterDialog.d.ts → components/MAFFilterDialog.d.ts} +0 -0
- /package/dist/shared/{MAFFilterDialog.js → components/MAFFilterDialog.js} +0 -0
- /package/dist/shared/{MultiVariantTooltip.d.ts → components/MultiVariantTooltip.d.ts} +0 -0
- /package/dist/shared/{MultiVariantTooltip.js → components/MultiVariantTooltip.js} +0 -0
- /package/dist/shared/{RectBg.d.ts → components/RectBg.d.ts} +0 -0
- /package/dist/shared/{RectBg.js → components/RectBg.js} +0 -0
- /package/dist/shared/{RowPalettizer.d.ts → components/RowPalettizer.d.ts} +0 -0
- /package/dist/shared/{RowPalettizer.js → components/RowPalettizer.js} +0 -0
- /package/dist/shared/{SetColorDialog.d.ts → components/SetColorDialog.d.ts} +0 -0
- /package/dist/shared/{SetColorDialog.js → components/SetColorDialog.js} +0 -0
- /package/dist/shared/{SetMinMaxDialog.d.ts → components/SetMinMaxDialog.d.ts} +0 -0
- /package/dist/shared/{SetMinMaxDialog.js → components/SetMinMaxDialog.js} +0 -0
- /package/dist/shared/{SetRowHeightDialog.d.ts → components/SetRowHeightDialog.d.ts} +0 -0
- /package/dist/shared/{SetRowHeightDialog.js → components/SetRowHeightDialog.js} +0 -0
- /package/dist/shared/{SourcesDataGrid.d.ts → components/SourcesDataGrid.d.ts} +0 -0
- /package/dist/shared/{SourcesDataGrid.js → components/SourcesDataGrid.js} +0 -0
- /package/dist/shared/{SourcesGrid.d.ts → components/SourcesGrid.d.ts} +0 -0
- /package/dist/shared/{SourcesGrid.js → components/SourcesGrid.js} +0 -0
- /package/dist/shared/{SourcesGridHeader.d.ts → components/SourcesGridHeader.d.ts} +0 -0
- /package/dist/{types.d.ts → shared/types.d.ts} +0 -0
- /package/dist/{types.js → shared/types.js} +0 -0
- /package/esm/shared/{BulkEditPanel.d.ts → components/BulkEditPanel.d.ts} +0 -0
- /package/esm/shared/{BulkEditPanel.js → components/BulkEditPanel.js} +0 -0
- /package/esm/shared/{ClusterDialog.d.ts → components/ClusterDialog.d.ts} +0 -0
- /package/esm/shared/{ClusterDialog.js → components/ClusterDialog.js} +0 -0
- /package/esm/shared/{ColorLegend.d.ts → components/ColorLegend.d.ts} +0 -0
- /package/esm/shared/{ColorLegend.js → components/ColorLegend.js} +0 -0
- /package/esm/shared/{HelpfulTips.d.ts → components/HelpfulTips.d.ts} +0 -0
- /package/esm/shared/{HelpfulTips.js → components/HelpfulTips.js} +0 -0
- /package/esm/shared/{LegendBar.d.ts → components/LegendBar.d.ts} +0 -0
- /package/esm/shared/{LegendBar.js → components/LegendBar.js} +0 -0
- /package/esm/shared/{MAFFilterDialog.d.ts → components/MAFFilterDialog.d.ts} +0 -0
- /package/esm/shared/{MAFFilterDialog.js → components/MAFFilterDialog.js} +0 -0
- /package/esm/shared/{MultiVariantTooltip.d.ts → components/MultiVariantTooltip.d.ts} +0 -0
- /package/esm/shared/{MultiVariantTooltip.js → components/MultiVariantTooltip.js} +0 -0
- /package/esm/shared/{RectBg.d.ts → components/RectBg.d.ts} +0 -0
- /package/esm/shared/{RectBg.js → components/RectBg.js} +0 -0
- /package/esm/shared/{RowPalettizer.d.ts → components/RowPalettizer.d.ts} +0 -0
- /package/esm/shared/{RowPalettizer.js → components/RowPalettizer.js} +0 -0
- /package/esm/shared/{SetColorDialog.d.ts → components/SetColorDialog.d.ts} +0 -0
- /package/esm/shared/{SetColorDialog.js → components/SetColorDialog.js} +0 -0
- /package/esm/shared/{SetMinMaxDialog.d.ts → components/SetMinMaxDialog.d.ts} +0 -0
- /package/esm/shared/{SetMinMaxDialog.js → components/SetMinMaxDialog.js} +0 -0
- /package/esm/shared/{SetRowHeightDialog.d.ts → components/SetRowHeightDialog.d.ts} +0 -0
- /package/esm/shared/{SetRowHeightDialog.js → components/SetRowHeightDialog.js} +0 -0
- /package/esm/shared/{SourcesDataGrid.d.ts → components/SourcesDataGrid.d.ts} +0 -0
- /package/esm/shared/{SourcesDataGrid.js → components/SourcesDataGrid.js} +0 -0
- /package/esm/shared/{SourcesGrid.d.ts → components/SourcesGrid.d.ts} +0 -0
- /package/esm/shared/{SourcesGrid.js → components/SourcesGrid.js} +0 -0
- /package/esm/shared/{SourcesGridHeader.d.ts → components/SourcesGridHeader.d.ts} +0 -0
- /package/esm/{types.d.ts → shared/types.d.ts} +0 -0
- /package/esm/{types.js → shared/types.js} +0 -0
|
@@ -7,13 +7,16 @@ import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
|
7
7
|
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
8
8
|
private configured?;
|
|
9
9
|
private configurePre;
|
|
10
|
-
protected
|
|
10
|
+
protected configurePre2(): Promise<{
|
|
11
|
+
vcf: TabixIndexedFile;
|
|
12
|
+
parser: VcfParser;
|
|
13
|
+
}>;
|
|
14
|
+
configure(opts?: BaseOptions): Promise<{
|
|
11
15
|
vcf: TabixIndexedFile;
|
|
12
16
|
parser: VcfParser;
|
|
13
17
|
}>;
|
|
14
18
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
15
|
-
getHeader(): Promise<string>;
|
|
16
|
-
getMetadata(): Promise<any>;
|
|
19
|
+
getHeader(opts?: BaseOptions): Promise<string>;
|
|
17
20
|
getFeatures(query: NoAssemblyRegion, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
18
21
|
getSources(): Promise<{
|
|
19
22
|
name: string;
|
|
@@ -11,8 +11,7 @@ const io_1 = require("@jbrowse/core/util/io");
|
|
|
11
11
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
12
12
|
const VcfFeature_1 = __importDefault(require("../VcfFeature"));
|
|
13
13
|
class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
14
|
-
async configurePre(
|
|
15
|
-
const { statusCallback = () => { } } = opts || {};
|
|
14
|
+
async configurePre(_opts) {
|
|
16
15
|
const vcfGzLocation = this.getConf('vcfGzLocation');
|
|
17
16
|
const location = this.getConf(['index', 'location']);
|
|
18
17
|
const indexType = this.getConf(['index', 'indexType']);
|
|
@@ -28,13 +27,14 @@ class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
28
27
|
: undefined,
|
|
29
28
|
chunkCacheSize: 50 * 2 ** 20,
|
|
30
29
|
});
|
|
31
|
-
const header = await (0, util_1.updateStatus)('Downloading index', statusCallback, () => vcf.getHeader());
|
|
32
30
|
return {
|
|
33
31
|
vcf,
|
|
34
|
-
parser: new vcf_1.default({
|
|
32
|
+
parser: new vcf_1.default({
|
|
33
|
+
header: await vcf.getHeader(),
|
|
34
|
+
}),
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
async
|
|
37
|
+
async configurePre2() {
|
|
38
38
|
if (!this.configured) {
|
|
39
39
|
this.configured = this.configurePre().catch((e) => {
|
|
40
40
|
this.configured = undefined;
|
|
@@ -43,23 +43,23 @@ class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
43
43
|
}
|
|
44
44
|
return this.configured;
|
|
45
45
|
}
|
|
46
|
+
async configure(opts) {
|
|
47
|
+
const { statusCallback = () => { } } = opts || {};
|
|
48
|
+
return (0, util_1.updateStatus)('Downloading index', statusCallback, () => this.configurePre2());
|
|
49
|
+
}
|
|
46
50
|
async getRefNames(opts = {}) {
|
|
47
|
-
const { vcf } = await this.configure();
|
|
51
|
+
const { vcf } = await this.configure(opts);
|
|
48
52
|
return vcf.getReferenceSequenceNames(opts);
|
|
49
53
|
}
|
|
50
|
-
async getHeader() {
|
|
51
|
-
const { vcf } = await this.configure();
|
|
54
|
+
async getHeader(opts) {
|
|
55
|
+
const { vcf } = await this.configure(opts);
|
|
52
56
|
return vcf.getHeader();
|
|
53
57
|
}
|
|
54
|
-
async getMetadata() {
|
|
55
|
-
const { parser } = await this.configure();
|
|
56
|
-
return parser.getMetadata();
|
|
57
|
-
}
|
|
58
58
|
getFeatures(query, opts = {}) {
|
|
59
59
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
60
60
|
const { refName, start, end } = query;
|
|
61
61
|
const { statusCallback = () => { } } = opts;
|
|
62
|
-
const { vcf, parser } = await this.configure();
|
|
62
|
+
const { vcf, parser } = await this.configure(opts);
|
|
63
63
|
await (0, util_1.updateStatus)('Downloading variants', statusCallback, () => vcf.getLines(refName, start, end, {
|
|
64
64
|
lineCallback: (line, fileOffset) => {
|
|
65
65
|
observer.next(new VcfFeature_1.default({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from './types';
|
|
1
|
+
import type { SampleInfo, Source } from './shared/types';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
export declare function getMultiVariantFeaturesAutorun(self: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SampleInfo, Source } from '../types';
|
|
1
|
+
import type { SampleInfo, Source } from '../shared/types';
|
|
2
2
|
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
3
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
import type { Instance } from 'mobx-state-tree';
|
|
@@ -48,10 +48,10 @@ const Splitscreen_1 = __importDefault(require("@mui/icons-material/Splitscreen")
|
|
|
48
48
|
const Visibility_1 = __importDefault(require("@mui/icons-material/Visibility"));
|
|
49
49
|
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
50
50
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
51
|
-
const SetColorDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('
|
|
52
|
-
const MAFFilterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('
|
|
53
|
-
const ClusterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('
|
|
54
|
-
const SetRowHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('
|
|
51
|
+
const SetColorDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SetColorDialog'))));
|
|
52
|
+
const MAFFilterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/MAFFilterDialog'))));
|
|
53
|
+
const ClusterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ClusterDialog'))));
|
|
54
|
+
const SetRowHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SetRowHeightDialog'))));
|
|
55
55
|
function MultiVariantBaseModelF(configSchema) {
|
|
56
56
|
return mobx_state_tree_1.types
|
|
57
57
|
.compose('LinearVariantMatrixDisplay', (0, plugin_linear_genome_view_1.linearBareDisplayStateModelFactory)(configSchema), mobx_state_tree_1.types.model({
|
|
@@ -12,20 +12,20 @@ const KeyboardArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardA
|
|
|
12
12
|
const KeyboardDoubleArrowDown_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowDown"));
|
|
13
13
|
const KeyboardDoubleArrowUp_1 = __importDefault(require("@mui/icons-material/KeyboardDoubleArrowUp"));
|
|
14
14
|
const material_1 = require("@mui/material");
|
|
15
|
-
const
|
|
15
|
+
const sourcesGridUtils_1 = require("../sourcesGridUtils");
|
|
16
16
|
function SourcesGridHeader({ selected, onChange, rows, showTips, }) {
|
|
17
17
|
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
18
18
|
const [widgetColor, setWidgetColor] = (0, react_1.useState)('blue');
|
|
19
19
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { disabled: !selected.length, onClick: event => {
|
|
20
20
|
setAnchorEl(event.currentTarget);
|
|
21
21
|
}, children: "Change color of selected items" }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
22
|
-
onChange((0,
|
|
22
|
+
onChange((0, sourcesGridUtils_1.moveUp)([...rows], selected));
|
|
23
23
|
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardArrowUp_1.default, {}), showTips ? 'Move selected items up' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
24
|
-
onChange((0,
|
|
24
|
+
onChange((0, sourcesGridUtils_1.moveDown)([...rows], selected));
|
|
25
25
|
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardArrowDown_1.default, {}), showTips ? 'Move selected items down' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
26
|
-
onChange((0,
|
|
26
|
+
onChange((0, sourcesGridUtils_1.moveUp)([...rows], selected, rows.length));
|
|
27
27
|
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardDoubleArrowUp_1.default, {}), showTips ? 'Move selected items to top' : null] }), (0, jsx_runtime_1.jsxs)(material_1.Button, { onClick: () => {
|
|
28
|
-
onChange((0,
|
|
28
|
+
onChange((0, sourcesGridUtils_1.moveDown)([...rows], selected, rows.length));
|
|
29
29
|
}, disabled: !selected.length, children: [(0, jsx_runtime_1.jsx)(KeyboardDoubleArrowDown_1.default, {}), showTips ? 'Move selected items to bottom' : null] }), (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPopover, { anchorEl: anchorEl, color: widgetColor, onChange: c => {
|
|
30
30
|
setWidgetColor(c);
|
|
31
31
|
selected.forEach(id => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function drawColorAlleleCount(alleles: string[], ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, mostFrequentAlt: string): void;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.getColorPhased = getColorPhased;
|
|
5
|
-
exports.getColorPhasedWithPhaseSet = getColorPhasedWithPhaseSet;
|
|
6
|
-
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
3
|
+
exports.drawColorAlleleCount = drawColorAlleleCount;
|
|
7
4
|
const colord_1 = require("@jbrowse/core/util/colord");
|
|
8
|
-
const
|
|
9
|
-
function getColorAlleleCount(alleles) {
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
function getColorAlleleCount(alleles, mostFrequentAlt) {
|
|
10
7
|
const total = alleles.length;
|
|
11
8
|
let alt = 0;
|
|
12
9
|
let uncalled = 0;
|
|
13
10
|
let alt2 = 0;
|
|
14
11
|
let ref = 0;
|
|
15
12
|
for (const allele of alleles) {
|
|
16
|
-
if (allele ===
|
|
13
|
+
if (allele === mostFrequentAlt) {
|
|
17
14
|
alt++;
|
|
18
15
|
}
|
|
19
16
|
else if (allele === '0') {
|
|
@@ -40,11 +37,7 @@ function getColorAlleleCount(alleles) {
|
|
|
40
37
|
return a1.toHex();
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
function getColorPhasedWithPhaseSet(alleles, HP, PS) {
|
|
48
|
-
const c = +alleles[HP];
|
|
49
|
-
return c ? (0, util_1.colorify)(+PS) || 'black' : '#ccc';
|
|
40
|
+
function drawColorAlleleCount(alleles, ctx, x, y, w, h, mostFrequentAlt) {
|
|
41
|
+
ctx.fillStyle = getColorAlleleCount(alleles, mostFrequentAlt);
|
|
42
|
+
ctx.fillRect(x - constants_1.f2, y - constants_1.f2, w + constants_1.f2, h + constants_1.f2);
|
|
50
43
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function drawPhased(alleles: string[], ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, HP: number, PS?: string): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.drawPhased = drawPhased;
|
|
4
|
+
const colors_1 = require("@jbrowse/core/ui/colors");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
const util_1 = require("./util");
|
|
7
|
+
function getColorPhased(alleles, HP) {
|
|
8
|
+
const c = +alleles[HP];
|
|
9
|
+
return c ? colors_1.set1[c - 1] || 'black' : '#ccc';
|
|
10
|
+
}
|
|
11
|
+
function getColorPhasedWithPhaseSet(alleles, HP, PS) {
|
|
12
|
+
const c = +alleles[HP];
|
|
13
|
+
return c ? (0, util_1.colorify)(+PS) || 'black' : '#ccc';
|
|
14
|
+
}
|
|
15
|
+
function drawPhased(alleles, ctx, x, y, w, h, HP, PS) {
|
|
16
|
+
ctx.fillStyle =
|
|
17
|
+
PS !== undefined
|
|
18
|
+
? getColorPhasedWithPhaseSet(alleles, HP, PS)
|
|
19
|
+
: getColorPhased(alleles, HP);
|
|
20
|
+
ctx.fillRect(x - constants_1.f2, y - constants_1.f2, w + constants_1.f2, h + constants_1.f2);
|
|
21
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
+
export declare function findSecondLargestNumber(arr: Iterable<number>): number;
|
|
3
|
+
export declare function calculateAlleleCounts(feat: Feature): {
|
|
4
|
+
alleleCounts: Map<any, any>;
|
|
5
|
+
mostFrequentAlt: any;
|
|
6
|
+
};
|
|
7
|
+
export declare function calculateMinorAlleleFrequency(alleleCounts: Map<string, number>): number;
|
|
8
|
+
export declare function getFeaturesThatPassMinorAlleleFrequencyFilter(feats: Iterable<Feature>, minorAlleleFrequencyFilter: number): {
|
|
9
|
+
feature: Feature;
|
|
10
|
+
mostFrequentAlt: string;
|
|
11
|
+
}[];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findSecondLargestNumber = findSecondLargestNumber;
|
|
4
|
+
exports.calculateAlleleCounts = calculateAlleleCounts;
|
|
5
|
+
exports.calculateMinorAlleleFrequency = calculateMinorAlleleFrequency;
|
|
6
|
+
exports.getFeaturesThatPassMinorAlleleFrequencyFilter = getFeaturesThatPassMinorAlleleFrequencyFilter;
|
|
7
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
function findSecondLargestNumber(arr) {
|
|
9
|
+
let firstMax = 0;
|
|
10
|
+
let secondMax = 0;
|
|
11
|
+
for (const num of arr) {
|
|
12
|
+
if (num > firstMax) {
|
|
13
|
+
secondMax = firstMax;
|
|
14
|
+
firstMax = num;
|
|
15
|
+
}
|
|
16
|
+
else if (num > secondMax && num !== firstMax) {
|
|
17
|
+
secondMax = num;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return secondMax;
|
|
21
|
+
}
|
|
22
|
+
function calculateAlleleCounts(feat) {
|
|
23
|
+
const samp = feat.get('genotypes');
|
|
24
|
+
const alleleCounts = new Map();
|
|
25
|
+
for (const val of Object.values(samp)) {
|
|
26
|
+
const alleles = val.split(/[/|]/);
|
|
27
|
+
for (const allele of alleles) {
|
|
28
|
+
alleleCounts.set(allele, (alleleCounts.get(allele) || 0) + 1);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
let mostFrequentAlt;
|
|
32
|
+
let max = 0;
|
|
33
|
+
for (const [alt, altCount] of alleleCounts.entries()) {
|
|
34
|
+
if (alt !== '.' && alt !== '0') {
|
|
35
|
+
if (altCount > max) {
|
|
36
|
+
mostFrequentAlt = alt;
|
|
37
|
+
max = altCount;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return { alleleCounts, mostFrequentAlt };
|
|
42
|
+
}
|
|
43
|
+
function calculateMinorAlleleFrequency(alleleCounts) {
|
|
44
|
+
return (findSecondLargestNumber(alleleCounts.values()) /
|
|
45
|
+
((0, util_1.sum)(alleleCounts.values()) || 1));
|
|
46
|
+
}
|
|
47
|
+
function getFeaturesThatPassMinorAlleleFrequencyFilter(feats, minorAlleleFrequencyFilter) {
|
|
48
|
+
const results = [];
|
|
49
|
+
for (const feature of feats) {
|
|
50
|
+
if (feature.get('end') - feature.get('start') <= 10) {
|
|
51
|
+
const { mostFrequentAlt, alleleCounts } = calculateAlleleCounts(feature);
|
|
52
|
+
if (calculateMinorAlleleFrequency(alleleCounts) >=
|
|
53
|
+
minorAlleleFrequencyFilter) {
|
|
54
|
+
results.push({
|
|
55
|
+
feature,
|
|
56
|
+
mostFrequentAlt,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return results;
|
|
62
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moveUp = moveUp;
|
|
4
|
+
exports.moveDown = moveDown;
|
|
5
|
+
function moveUp(arr, sel, by = 1) {
|
|
6
|
+
const idxs = sel
|
|
7
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
8
|
+
.sort((a, b) => a - b);
|
|
9
|
+
let lastIdx = 0;
|
|
10
|
+
for (const old of idxs) {
|
|
11
|
+
const idx = Math.max(lastIdx, old - by);
|
|
12
|
+
if (idx >= lastIdx) {
|
|
13
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
14
|
+
}
|
|
15
|
+
lastIdx = lastIdx + 1;
|
|
16
|
+
}
|
|
17
|
+
return arr;
|
|
18
|
+
}
|
|
19
|
+
function moveDown(arr, sel, by = 1) {
|
|
20
|
+
const idxs = sel
|
|
21
|
+
.map(l => arr.findIndex(v => v.name === l))
|
|
22
|
+
.sort((a, b) => b - a);
|
|
23
|
+
let lastIdx = arr.length - 1;
|
|
24
|
+
for (const old of idxs) {
|
|
25
|
+
const idx = Math.min(lastIdx, old + by);
|
|
26
|
+
if (idx <= lastIdx) {
|
|
27
|
+
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
28
|
+
}
|
|
29
|
+
lastIdx = lastIdx - 1;
|
|
30
|
+
}
|
|
31
|
+
return arr;
|
|
32
|
+
}
|
package/dist/shared/util.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export declare function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
name: string;
|
|
5
|
-
}[];
|
|
6
|
-
export declare function moveDown(arr: {
|
|
7
|
-
name: string;
|
|
8
|
-
}[], sel: string[], by?: number): {
|
|
9
|
-
name: string;
|
|
10
|
-
}[];
|
|
1
|
+
export declare function fillRectCtx(x: number, y: number, width: number, height: number, ctx: CanvasRenderingContext2D, color?: string): void;
|
|
2
|
+
export declare function randomColor(str: string): string;
|
|
3
|
+
export declare function colorify(n: number): string;
|
package/dist/shared/util.js
CHANGED
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
for (const old of idxs) {
|
|
11
|
-
const idx = Math.max(lastIdx, old - by);
|
|
12
|
-
if (idx >= lastIdx) {
|
|
13
|
-
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
14
|
-
}
|
|
15
|
-
lastIdx = lastIdx + 1;
|
|
3
|
+
exports.fillRectCtx = fillRectCtx;
|
|
4
|
+
exports.randomColor = randomColor;
|
|
5
|
+
exports.colorify = colorify;
|
|
6
|
+
function fillRectCtx(x, y, width, height, ctx, color) {
|
|
7
|
+
if (width < 0) {
|
|
8
|
+
x += width;
|
|
9
|
+
width = -width;
|
|
16
10
|
}
|
|
17
|
-
|
|
11
|
+
if (height < 0) {
|
|
12
|
+
y += height;
|
|
13
|
+
height = -height;
|
|
14
|
+
}
|
|
15
|
+
if (color) {
|
|
16
|
+
ctx.fillStyle = color;
|
|
17
|
+
}
|
|
18
|
+
ctx.fillRect(x, y, width, height);
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
let lastIdx = arr.length - 1;
|
|
24
|
-
for (const old of idxs) {
|
|
25
|
-
const idx = Math.min(lastIdx, old + by);
|
|
26
|
-
if (idx <= lastIdx) {
|
|
27
|
-
arr.splice(idx, 0, arr.splice(old, 1)[0]);
|
|
28
|
-
}
|
|
29
|
-
lastIdx = lastIdx - 1;
|
|
20
|
+
function randomColor(str) {
|
|
21
|
+
let sum = 0;
|
|
22
|
+
for (let i = 0; i < str.length; i++) {
|
|
23
|
+
sum += str.charCodeAt(i);
|
|
30
24
|
}
|
|
31
|
-
return
|
|
25
|
+
return colorify(sum * 10);
|
|
26
|
+
}
|
|
27
|
+
function colorify(n) {
|
|
28
|
+
return `hsl(${n % 255}, 50%, 50%)`;
|
|
32
29
|
}
|
package/dist/util.d.ts
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Feature } from '@jbrowse/core/util';
|
|
2
|
-
export declare function fillRectCtx(x: number, y: number, width: number, height: number, ctx: CanvasRenderingContext2D, color?: string): void;
|
|
3
|
-
export declare function getCol(gt: string): "blue" | "teal" | "#ccc" | "#CBC3E3";
|
|
4
|
-
export declare function randomColor(str: string): string;
|
|
5
|
-
export declare function colorify(n: number): string;
|
|
6
|
-
export declare function findSecondLargest(arr: Iterable<number>): number;
|
|
7
|
-
export declare function calculateMinorAlleleFrequency(feat: Feature): number;
|
|
8
|
-
export declare function getFeaturesThatPassMinorAlleleFrequencyFilter(feats: Iterable<Feature>, minorAlleleFrequencyFilter: number): Feature[];
|
package/dist/util.js
CHANGED
|
@@ -1,86 +1 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fillRectCtx = fillRectCtx;
|
|
4
|
-
exports.getCol = getCol;
|
|
5
|
-
exports.randomColor = randomColor;
|
|
6
|
-
exports.colorify = colorify;
|
|
7
|
-
exports.findSecondLargest = findSecondLargest;
|
|
8
|
-
exports.calculateMinorAlleleFrequency = calculateMinorAlleleFrequency;
|
|
9
|
-
exports.getFeaturesThatPassMinorAlleleFrequencyFilter = getFeaturesThatPassMinorAlleleFrequencyFilter;
|
|
10
|
-
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
function fillRectCtx(x, y, width, height, ctx, color) {
|
|
12
|
-
if (width < 0) {
|
|
13
|
-
x += width;
|
|
14
|
-
width = -width;
|
|
15
|
-
}
|
|
16
|
-
if (height < 0) {
|
|
17
|
-
y += height;
|
|
18
|
-
height = -height;
|
|
19
|
-
}
|
|
20
|
-
if (color) {
|
|
21
|
-
ctx.fillStyle = color;
|
|
22
|
-
}
|
|
23
|
-
ctx.fillRect(x, y, width, height);
|
|
24
|
-
}
|
|
25
|
-
function getCol(gt) {
|
|
26
|
-
if (gt === '0|0' || gt === '0/0') {
|
|
27
|
-
return '#ccc';
|
|
28
|
-
}
|
|
29
|
-
else if (gt === '1|0' || gt === '0|1' || gt === '0/1' || gt === '1/0') {
|
|
30
|
-
return 'teal';
|
|
31
|
-
}
|
|
32
|
-
else if (gt === '1|1' || gt === '1/1') {
|
|
33
|
-
return 'blue';
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return '#CBC3E3';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function randomColor(str) {
|
|
40
|
-
let sum = 0;
|
|
41
|
-
for (let i = 0; i < str.length; i++) {
|
|
42
|
-
sum += str.charCodeAt(i);
|
|
43
|
-
}
|
|
44
|
-
return `hsl(${colorify(sum * 10)}, 50%, 50%)`;
|
|
45
|
-
}
|
|
46
|
-
function colorify(n) {
|
|
47
|
-
return `hsl(${n % 255}, 50%, 50%)`;
|
|
48
|
-
}
|
|
49
|
-
function findSecondLargest(arr) {
|
|
50
|
-
let firstMax = 0;
|
|
51
|
-
let secondMax = 0;
|
|
52
|
-
for (const num of arr) {
|
|
53
|
-
if (num > firstMax) {
|
|
54
|
-
secondMax = firstMax;
|
|
55
|
-
firstMax = num;
|
|
56
|
-
}
|
|
57
|
-
else if (num > secondMax && num !== firstMax) {
|
|
58
|
-
secondMax = num;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return secondMax;
|
|
62
|
-
}
|
|
63
|
-
function calculateMinorAlleleFrequency(feat) {
|
|
64
|
-
if (feat.get('end') - feat.get('start') <= 10) {
|
|
65
|
-
const samp = feat.get('genotypes');
|
|
66
|
-
const alleleCounts = new Map();
|
|
67
|
-
for (const val of Object.values(samp)) {
|
|
68
|
-
const alleles = val.split(/[/|]/);
|
|
69
|
-
for (const allele of alleles) {
|
|
70
|
-
alleleCounts.set(allele, (alleleCounts.get(allele) || 0) + 1);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return (findSecondLargest(alleleCounts.values()) /
|
|
74
|
-
((0, util_1.sum)(alleleCounts.values()) || 1));
|
|
75
|
-
}
|
|
76
|
-
return -1;
|
|
77
|
-
}
|
|
78
|
-
function getFeaturesThatPassMinorAlleleFrequencyFilter(feats, minorAlleleFrequencyFilter) {
|
|
79
|
-
const mafs = [];
|
|
80
|
-
for (const feat of feats) {
|
|
81
|
-
if (calculateMinorAlleleFrequency(feat) >= minorAlleleFrequencyFilter) {
|
|
82
|
-
mafs.push(feat);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return mafs;
|
|
86
|
-
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
import MultiVariantTooltip from '../../shared/MultiVariantTooltip';
|
|
5
|
+
import MultiVariantTooltip from '../../shared/components/MultiVariantTooltip';
|
|
6
6
|
const useStyles = makeStyles()({
|
|
7
7
|
rel: {
|
|
8
8
|
position: 'relative',
|
|
@@ -3,7 +3,7 @@ import { useRef, useState } from 'react';
|
|
|
3
3
|
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import Crosshair from './Crosshair';
|
|
6
|
-
import LegendBar from '../../shared/LegendBar';
|
|
6
|
+
import LegendBar from '../../shared/components/LegendBar';
|
|
7
7
|
const MultiLinearVariantDisplayComponent = observer(function (props) {
|
|
8
8
|
const { model } = props;
|
|
9
9
|
const ref = useRef(null);
|
|
@@ -82,7 +82,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
82
82
|
configuration: AnyConfigurationSchemaType;
|
|
83
83
|
} & {
|
|
84
84
|
type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
|
|
85
|
-
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../types").Source[], import("../types").Source[], import("../types").Source[]>, [undefined]>;
|
|
85
|
+
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../shared/types").Source[], import("../shared/types").Source[], import("../shared/types").Source[]>, [undefined]>;
|
|
86
86
|
configuration: AnyConfigurationSchemaType;
|
|
87
87
|
minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
88
88
|
showSidebarLabelsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -238,27 +238,27 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
238
238
|
} & {
|
|
239
239
|
sourcesLoadingStopToken: string | undefined;
|
|
240
240
|
featureUnderMouseVolatile: import("@jbrowse/core/util").Feature | undefined;
|
|
241
|
-
sourcesVolatile: import("../types").Source[] | undefined;
|
|
241
|
+
sourcesVolatile: import("../shared/types").Source[] | undefined;
|
|
242
242
|
featuresVolatile: import("@jbrowse/core/util").Feature[] | undefined;
|
|
243
243
|
hasPhased: boolean;
|
|
244
|
-
sampleInfo: undefined | Record<string, import("../types").SampleInfo>;
|
|
244
|
+
sampleInfo: undefined | Record<string, import("../shared/types").SampleInfo>;
|
|
245
245
|
hoveredGenotype: string | undefined;
|
|
246
246
|
} & {
|
|
247
247
|
setRowHeight(arg: number): void;
|
|
248
248
|
setHoveredGenotype(arg: string): void;
|
|
249
249
|
setFeatures(f: import("@jbrowse/core/util").Feature[]): void;
|
|
250
|
-
setLayout(layout: import("../types").Source[]): void;
|
|
250
|
+
setLayout(layout: import("../shared/types").Source[]): void;
|
|
251
251
|
clearLayout(): void;
|
|
252
252
|
setSourcesLoading(str: string): void;
|
|
253
|
-
setSources(sources: import("../types").Source[]): void;
|
|
253
|
+
setSources(sources: import("../shared/types").Source[]): void;
|
|
254
254
|
setMafFilter(arg: number): void;
|
|
255
255
|
setShowSidebarLabels(arg: boolean): void;
|
|
256
256
|
setPhasedMode(arg: string): void;
|
|
257
257
|
setAutoHeight(arg: boolean): void;
|
|
258
258
|
setHasPhased(arg: boolean): void;
|
|
259
|
-
setSampleInfo(arg: Record<string, import("../types").SampleInfo>): void;
|
|
259
|
+
setSampleInfo(arg: Record<string, import("../shared/types").SampleInfo>): void;
|
|
260
260
|
} & {
|
|
261
|
-
readonly preSources: import("../types").Source[] | undefined;
|
|
261
|
+
readonly preSources: import("../shared/types").Source[] | undefined;
|
|
262
262
|
readonly sources: {
|
|
263
263
|
label: string;
|
|
264
264
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
3
|
import { when } from 'mobx';
|
|
4
|
-
import LegendBar from '../shared/LegendBar';
|
|
4
|
+
import LegendBar from '../shared/components/LegendBar';
|
|
5
5
|
export async function renderSvg(self, opts, superRenderSvg) {
|
|
6
6
|
await when(() => !!self.regionCannotBeRenderedText);
|
|
7
7
|
const { offsetPx } = getContainingView(self);
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
import MultiVariantTooltip from '../../shared/MultiVariantTooltip';
|
|
5
|
+
import MultiVariantTooltip from '../../shared/components/MultiVariantTooltip';
|
|
6
6
|
const useStyles = makeStyles()({
|
|
7
7
|
cursor: {
|
|
8
8
|
pointerEvents: 'none',
|
|
@@ -4,7 +4,7 @@ import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import Crosshair from './Crosshair';
|
|
6
6
|
import LinesConnectingMatrixToGenomicPosition from './LinesConnectingMatrixToGenomicPosition';
|
|
7
|
-
import LegendBar from '../../shared/LegendBar';
|
|
7
|
+
import LegendBar from '../../shared/components/LegendBar';
|
|
8
8
|
const MultiLinearVariantMatrixDisplayComponent = observer(function (props) {
|
|
9
9
|
const { model } = props;
|
|
10
10
|
const { lineZoneHeight } = model;
|