@jbrowse/plugin-dotplot-view 2.7.0 → 2.7.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/DotplotView/components/DotplotView.js +4 -0
- package/dist/DotplotView/components/{ImportCustomTrack.js → ImportForm/ImportCustomTrack.js} +5 -21
- package/dist/DotplotView/components/{ImportSyntenyTrackSelector.d.ts → ImportForm/ImportSyntenyTrackSelector.d.ts} +1 -1
- package/{esm/DotplotView/components/ImportForm.d.ts → dist/DotplotView/components/ImportForm/index.d.ts} +1 -1
- package/dist/DotplotView/components/ImportForm/util.d.ts +10 -0
- package/dist/DotplotView/components/ImportForm/util.js +27 -0
- package/dist/DotplotView/model.d.ts +70 -37
- package/dist/DotplotView/model.js +1 -1
- package/esm/DotplotView/components/DotplotView.js +4 -0
- package/esm/DotplotView/components/{ImportCustomTrack.js → ImportForm/ImportCustomTrack.js} +4 -17
- package/esm/DotplotView/components/{ImportSyntenyTrackSelector.d.ts → ImportForm/ImportSyntenyTrackSelector.d.ts} +1 -1
- package/{dist/DotplotView/components/ImportForm.d.ts → esm/DotplotView/components/ImportForm/index.d.ts} +1 -1
- package/esm/DotplotView/components/ImportForm/util.d.ts +10 -0
- package/esm/DotplotView/components/ImportForm/util.js +20 -0
- package/esm/DotplotView/model.d.ts +70 -37
- package/esm/DotplotView/model.js +1 -1
- package/package.json +2 -2
- /package/dist/DotplotView/components/{ImportCustomTrack.d.ts → ImportForm/ImportCustomTrack.d.ts} +0 -0
- /package/dist/DotplotView/components/{ImportSyntenyTrackSelector.js → ImportForm/ImportSyntenyTrackSelector.js} +0 -0
- /package/dist/DotplotView/components/{ImportForm.js → ImportForm/index.js} +0 -0
- /package/esm/DotplotView/components/{ImportCustomTrack.d.ts → ImportForm/ImportCustomTrack.d.ts} +0 -0
- /package/esm/DotplotView/components/{ImportSyntenyTrackSelector.js → ImportForm/ImportSyntenyTrackSelector.js} +0 -0
- /package/esm/DotplotView/components/{ImportForm.js → ImportForm/index.js} +0 -0
|
@@ -245,6 +245,8 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
245
245
|
if (mousedown && mouseup) {
|
|
246
246
|
model.zoomIn(mousedown, mouseup);
|
|
247
247
|
}
|
|
248
|
+
// below line is needed to prevent tooltip from sticking
|
|
249
|
+
setMouseOvered(false);
|
|
248
250
|
},
|
|
249
251
|
},
|
|
250
252
|
{
|
|
@@ -253,6 +255,8 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
253
255
|
if (mousedown && mouseup) {
|
|
254
256
|
model.onDotplotView(mousedown, mouseup);
|
|
255
257
|
}
|
|
258
|
+
// below line is needed to prevent tooltip from sticking
|
|
259
|
+
setMouseOvered(false);
|
|
256
260
|
},
|
|
257
261
|
},
|
|
258
262
|
] })),
|
package/dist/DotplotView/components/{ImportCustomTrack.js → ImportForm/ImportCustomTrack.js}
RENAMED
|
@@ -22,28 +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
|
-
const path_1 = __importDefault(require("path"));
|
|
31
27
|
const material_1 = require("@mui/material");
|
|
32
28
|
const ui_1 = require("@jbrowse/core/ui");
|
|
33
29
|
const mobx_react_1 = require("mobx-react");
|
|
34
|
-
|
|
35
|
-
return sessionTrackData
|
|
36
|
-
? // @ts-expect-error
|
|
37
|
-
sessionTrackData.uri ||
|
|
38
|
-
// @ts-expect-error
|
|
39
|
-
sessionTrackData.localPath ||
|
|
40
|
-
// @ts-expect-error
|
|
41
|
-
sessionTrackData.name
|
|
42
|
-
: undefined;
|
|
43
|
-
}
|
|
44
|
-
function stripGz(fileName) {
|
|
45
|
-
return fileName.endsWith('.gz') ? fileName.slice(0, -3) : fileName;
|
|
46
|
-
}
|
|
30
|
+
const util_1 = require("./util");
|
|
47
31
|
function getAdapter({ radioOption, assembly1, assembly2, fileLocation, bed1Location, bed2Location, }) {
|
|
48
32
|
if (radioOption === '.paf') {
|
|
49
33
|
return {
|
|
@@ -96,7 +80,7 @@ function getAdapter({ radioOption, assembly1, assembly2, fileLocation, bed1Locat
|
|
|
96
80
|
};
|
|
97
81
|
}
|
|
98
82
|
else {
|
|
99
|
-
throw new Error(
|
|
83
|
+
throw new Error(`Unknown to detect type ${radioOption} from filename (select radio button to clarify)`);
|
|
100
84
|
}
|
|
101
85
|
}
|
|
102
86
|
const OpenTrack = (0, mobx_react_1.observer)(({ assembly1, assembly2, setSessionTrackData, }) => {
|
|
@@ -105,12 +89,12 @@ const OpenTrack = (0, mobx_react_1.observer)(({ assembly1, assembly2, setSession
|
|
|
105
89
|
const [fileLocation, setFileLocation] = (0, react_1.useState)();
|
|
106
90
|
const [value, setValue] = (0, react_1.useState)('');
|
|
107
91
|
const [error, setError] = (0, react_1.useState)();
|
|
108
|
-
const fileName = getName(fileLocation);
|
|
109
|
-
const radioOption = value || (fileName ?
|
|
92
|
+
const fileName = (0, util_1.getName)(fileLocation);
|
|
93
|
+
const radioOption = value || (fileName ? (0, util_1.extName)((0, util_1.stripGz)(fileName)) : '');
|
|
110
94
|
(0, react_1.useEffect)(() => {
|
|
111
95
|
try {
|
|
112
96
|
if (fileLocation) {
|
|
113
|
-
const fn = fileName ?
|
|
97
|
+
const fn = fileName ? (0, util_1.basename)(fileName) : 'MyTrack';
|
|
114
98
|
const trackId = `${fn}-${Date.now()}`;
|
|
115
99
|
setError(undefined);
|
|
116
100
|
setSessionTrackData({
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getName(sessionTrackData?: {
|
|
2
|
+
uri: string;
|
|
3
|
+
} | {
|
|
4
|
+
localPath: string;
|
|
5
|
+
} | {
|
|
6
|
+
name: string;
|
|
7
|
+
}): any;
|
|
8
|
+
export declare function stripGz(fileName: string): string;
|
|
9
|
+
export declare function basename(str: string): string | undefined;
|
|
10
|
+
export declare function extName(str: string): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extName = exports.basename = exports.stripGz = exports.getName = void 0;
|
|
4
|
+
function getName(sessionTrackData) {
|
|
5
|
+
return sessionTrackData
|
|
6
|
+
? // @ts-expect-error
|
|
7
|
+
sessionTrackData.uri ||
|
|
8
|
+
// @ts-expect-error
|
|
9
|
+
sessionTrackData.localPath ||
|
|
10
|
+
// @ts-expect-error
|
|
11
|
+
sessionTrackData.name
|
|
12
|
+
: undefined;
|
|
13
|
+
}
|
|
14
|
+
exports.getName = getName;
|
|
15
|
+
function stripGz(fileName) {
|
|
16
|
+
return fileName.endsWith('.gz') ? fileName.slice(0, -3) : fileName;
|
|
17
|
+
}
|
|
18
|
+
exports.stripGz = stripGz;
|
|
19
|
+
function basename(str) {
|
|
20
|
+
return str.split('#')[0].split('?')[0].split('/').pop();
|
|
21
|
+
}
|
|
22
|
+
exports.basename = basename;
|
|
23
|
+
function extName(str) {
|
|
24
|
+
const r = str.split('.').pop();
|
|
25
|
+
return r ? `.${r}` : '';
|
|
26
|
+
}
|
|
27
|
+
exports.extName = extName;
|
|
@@ -68,17 +68,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
68
68
|
} & {
|
|
69
69
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
70
70
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
71
|
-
readonly currBp: number;
|
|
71
|
+
readonly currBp: number; /**
|
|
72
|
+
* #property
|
|
73
|
+
*/
|
|
72
74
|
} & {
|
|
73
75
|
pxToBp(px: number): {
|
|
74
|
-
coord: number;
|
|
76
|
+
coord: number; /**
|
|
77
|
+
* #property
|
|
78
|
+
*/
|
|
75
79
|
index: number;
|
|
76
80
|
refName: string;
|
|
77
81
|
oob: boolean;
|
|
78
|
-
assemblyName: string;
|
|
82
|
+
assemblyName: string; /**
|
|
83
|
+
* #property
|
|
84
|
+
*/
|
|
79
85
|
offset: number;
|
|
80
86
|
start: number;
|
|
81
|
-
end: number;
|
|
87
|
+
end: number; /**
|
|
88
|
+
* #property
|
|
89
|
+
*/
|
|
82
90
|
reversed: boolean;
|
|
83
91
|
};
|
|
84
92
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -86,9 +94,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
86
94
|
* #property
|
|
87
95
|
*/
|
|
88
96
|
coord: number;
|
|
89
|
-
regionNumber?: number | undefined;
|
|
90
|
-
* #property
|
|
91
|
-
*/
|
|
97
|
+
regionNumber?: number | undefined;
|
|
92
98
|
}): number | undefined;
|
|
93
99
|
} & {
|
|
94
100
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -153,17 +159,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
153
159
|
} & {
|
|
154
160
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
155
161
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
156
|
-
readonly currBp: number;
|
|
162
|
+
readonly currBp: number; /**
|
|
163
|
+
* #property
|
|
164
|
+
*/
|
|
157
165
|
} & {
|
|
158
166
|
pxToBp(px: number): {
|
|
159
|
-
coord: number;
|
|
167
|
+
coord: number; /**
|
|
168
|
+
* #property
|
|
169
|
+
*/
|
|
160
170
|
index: number;
|
|
161
171
|
refName: string;
|
|
162
172
|
oob: boolean;
|
|
163
|
-
assemblyName: string;
|
|
173
|
+
assemblyName: string; /**
|
|
174
|
+
* #property
|
|
175
|
+
*/
|
|
164
176
|
offset: number;
|
|
165
177
|
start: number;
|
|
166
|
-
end: number;
|
|
178
|
+
end: number; /**
|
|
179
|
+
* #property
|
|
180
|
+
*/
|
|
167
181
|
reversed: boolean;
|
|
168
182
|
};
|
|
169
183
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -171,9 +185,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
171
185
|
* #property
|
|
172
186
|
*/
|
|
173
187
|
coord: number;
|
|
174
|
-
regionNumber?: number | undefined;
|
|
175
|
-
* #property
|
|
176
|
-
*/
|
|
188
|
+
regionNumber?: number | undefined;
|
|
177
189
|
}): number | undefined;
|
|
178
190
|
} & {
|
|
179
191
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -220,20 +232,23 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
220
232
|
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
221
233
|
} & {
|
|
222
234
|
setMinimized(flag: boolean): void;
|
|
223
|
-
showDisplay(displayId: string, initialSnapshot?: {} | undefined): void;
|
|
235
|
+
showDisplay(displayId: string, initialSnapshot?: {} | undefined): void;
|
|
236
|
+
/**
|
|
237
|
+
* #property
|
|
238
|
+
*/
|
|
239
|
+
hideDisplay(displayId: string): number; /**
|
|
224
240
|
* #property
|
|
225
241
|
*/
|
|
226
|
-
hideDisplay(displayId: string): number;
|
|
227
242
|
replaceDisplay(oldId: string, newId: string, initialSnapshot?: {} | undefined): void;
|
|
228
243
|
} & {
|
|
229
244
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
230
245
|
type: string;
|
|
231
|
-
label: string;
|
|
232
|
-
* #property
|
|
233
|
-
*/
|
|
246
|
+
label: string;
|
|
234
247
|
subMenu: {
|
|
235
248
|
type: string;
|
|
236
|
-
label: string;
|
|
249
|
+
label: string; /**
|
|
250
|
+
* #property
|
|
251
|
+
*/
|
|
237
252
|
checked: boolean;
|
|
238
253
|
onClick: () => void;
|
|
239
254
|
}[];
|
|
@@ -356,17 +371,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
356
371
|
} & {
|
|
357
372
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
358
373
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
359
|
-
readonly currBp: number;
|
|
374
|
+
readonly currBp: number; /**
|
|
375
|
+
* #property
|
|
376
|
+
*/
|
|
360
377
|
} & {
|
|
361
378
|
pxToBp(px: number): {
|
|
362
|
-
coord: number;
|
|
379
|
+
coord: number; /**
|
|
380
|
+
* #property
|
|
381
|
+
*/
|
|
363
382
|
index: number;
|
|
364
383
|
refName: string;
|
|
365
384
|
oob: boolean;
|
|
366
|
-
assemblyName: string;
|
|
385
|
+
assemblyName: string; /**
|
|
386
|
+
* #property
|
|
387
|
+
*/
|
|
367
388
|
offset: number;
|
|
368
389
|
start: number;
|
|
369
|
-
end: number;
|
|
390
|
+
end: number; /**
|
|
391
|
+
* #property
|
|
392
|
+
*/
|
|
370
393
|
reversed: boolean;
|
|
371
394
|
};
|
|
372
395
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -374,9 +397,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
374
397
|
* #property
|
|
375
398
|
*/
|
|
376
399
|
coord: number;
|
|
377
|
-
regionNumber?: number | undefined;
|
|
378
|
-
* #property
|
|
379
|
-
*/
|
|
400
|
+
regionNumber?: number | undefined;
|
|
380
401
|
}): number | undefined;
|
|
381
402
|
} & {
|
|
382
403
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -440,17 +461,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
440
461
|
} & {
|
|
441
462
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
442
463
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
443
|
-
readonly currBp: number;
|
|
464
|
+
readonly currBp: number; /**
|
|
465
|
+
* #property
|
|
466
|
+
*/
|
|
444
467
|
} & {
|
|
445
468
|
pxToBp(px: number): {
|
|
446
|
-
coord: number;
|
|
469
|
+
coord: number; /**
|
|
470
|
+
* #property
|
|
471
|
+
*/
|
|
447
472
|
index: number;
|
|
448
473
|
refName: string;
|
|
449
474
|
oob: boolean;
|
|
450
|
-
assemblyName: string;
|
|
475
|
+
assemblyName: string; /**
|
|
476
|
+
* #property
|
|
477
|
+
*/
|
|
451
478
|
offset: number;
|
|
452
479
|
start: number;
|
|
453
|
-
end: number;
|
|
480
|
+
end: number; /**
|
|
481
|
+
* #property
|
|
482
|
+
*/
|
|
454
483
|
reversed: boolean;
|
|
455
484
|
};
|
|
456
485
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -458,9 +487,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
458
487
|
* #property
|
|
459
488
|
*/
|
|
460
489
|
coord: number;
|
|
461
|
-
regionNumber?: number | undefined;
|
|
462
|
-
* #property
|
|
463
|
-
*/
|
|
490
|
+
regionNumber?: number | undefined;
|
|
464
491
|
}): number | undefined;
|
|
465
492
|
} & {
|
|
466
493
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -576,14 +603,20 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
576
603
|
* #action
|
|
577
604
|
*/
|
|
578
605
|
getCoords(mousedown: Coord, mouseup: Coord): {
|
|
579
|
-
coord: number;
|
|
606
|
+
coord: number; /**
|
|
607
|
+
* #property
|
|
608
|
+
*/
|
|
580
609
|
index: number;
|
|
581
610
|
refName: string;
|
|
582
611
|
oob: boolean;
|
|
583
|
-
assemblyName: string;
|
|
612
|
+
assemblyName: string; /**
|
|
613
|
+
* #property
|
|
614
|
+
*/
|
|
584
615
|
offset: number;
|
|
585
616
|
start: number;
|
|
586
|
-
end: number;
|
|
617
|
+
end: number; /**
|
|
618
|
+
* #property
|
|
619
|
+
*/
|
|
587
620
|
reversed: boolean;
|
|
588
621
|
}[] | undefined;
|
|
589
622
|
/**
|
|
@@ -62,7 +62,7 @@ const pxWidthForBlocks = (blocks, hide) => {
|
|
|
62
62
|
*/
|
|
63
63
|
function stateModelFactory(pm) {
|
|
64
64
|
return mobx_state_tree_1.types
|
|
65
|
-
.compose(BaseViewModel_1.default, mobx_state_tree_1.types.model(
|
|
65
|
+
.compose('DotplotView', BaseViewModel_1.default, mobx_state_tree_1.types.model({
|
|
66
66
|
/**
|
|
67
67
|
* #property
|
|
68
68
|
*/
|
|
@@ -217,6 +217,8 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
217
217
|
if (mousedown && mouseup) {
|
|
218
218
|
model.zoomIn(mousedown, mouseup);
|
|
219
219
|
}
|
|
220
|
+
// below line is needed to prevent tooltip from sticking
|
|
221
|
+
setMouseOvered(false);
|
|
220
222
|
},
|
|
221
223
|
},
|
|
222
224
|
{
|
|
@@ -225,6 +227,8 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
225
227
|
if (mousedown && mouseup) {
|
|
226
228
|
model.onDotplotView(mousedown, mouseup);
|
|
227
229
|
}
|
|
230
|
+
// below line is needed to prevent tooltip from sticking
|
|
231
|
+
setMouseOvered(false);
|
|
228
232
|
},
|
|
229
233
|
},
|
|
230
234
|
] })),
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import path from 'path';
|
|
3
2
|
import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
|
|
4
3
|
import { ErrorMessage, FileSelector } from '@jbrowse/core/ui';
|
|
5
4
|
import { observer } from 'mobx-react';
|
|
6
|
-
|
|
7
|
-
return sessionTrackData
|
|
8
|
-
? // @ts-expect-error
|
|
9
|
-
sessionTrackData.uri ||
|
|
10
|
-
// @ts-expect-error
|
|
11
|
-
sessionTrackData.localPath ||
|
|
12
|
-
// @ts-expect-error
|
|
13
|
-
sessionTrackData.name
|
|
14
|
-
: undefined;
|
|
15
|
-
}
|
|
16
|
-
function stripGz(fileName) {
|
|
17
|
-
return fileName.endsWith('.gz') ? fileName.slice(0, -3) : fileName;
|
|
18
|
-
}
|
|
5
|
+
import { basename, extName, getName, stripGz } from './util';
|
|
19
6
|
function getAdapter({ radioOption, assembly1, assembly2, fileLocation, bed1Location, bed2Location, }) {
|
|
20
7
|
if (radioOption === '.paf') {
|
|
21
8
|
return {
|
|
@@ -68,7 +55,7 @@ function getAdapter({ radioOption, assembly1, assembly2, fileLocation, bed1Locat
|
|
|
68
55
|
};
|
|
69
56
|
}
|
|
70
57
|
else {
|
|
71
|
-
throw new Error(
|
|
58
|
+
throw new Error(`Unknown to detect type ${radioOption} from filename (select radio button to clarify)`);
|
|
72
59
|
}
|
|
73
60
|
}
|
|
74
61
|
const OpenTrack = observer(({ assembly1, assembly2, setSessionTrackData, }) => {
|
|
@@ -78,11 +65,11 @@ const OpenTrack = observer(({ assembly1, assembly2, setSessionTrackData, }) => {
|
|
|
78
65
|
const [value, setValue] = useState('');
|
|
79
66
|
const [error, setError] = useState();
|
|
80
67
|
const fileName = getName(fileLocation);
|
|
81
|
-
const radioOption = value || (fileName ?
|
|
68
|
+
const radioOption = value || (fileName ? extName(stripGz(fileName)) : '');
|
|
82
69
|
useEffect(() => {
|
|
83
70
|
try {
|
|
84
71
|
if (fileLocation) {
|
|
85
|
-
const fn = fileName ?
|
|
72
|
+
const fn = fileName ? basename(fileName) : 'MyTrack';
|
|
86
73
|
const trackId = `${fn}-${Date.now()}`;
|
|
87
74
|
setError(undefined);
|
|
88
75
|
setSessionTrackData({
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getName(sessionTrackData?: {
|
|
2
|
+
uri: string;
|
|
3
|
+
} | {
|
|
4
|
+
localPath: string;
|
|
5
|
+
} | {
|
|
6
|
+
name: string;
|
|
7
|
+
}): any;
|
|
8
|
+
export declare function stripGz(fileName: string): string;
|
|
9
|
+
export declare function basename(str: string): string | undefined;
|
|
10
|
+
export declare function extName(str: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function getName(sessionTrackData) {
|
|
2
|
+
return sessionTrackData
|
|
3
|
+
? // @ts-expect-error
|
|
4
|
+
sessionTrackData.uri ||
|
|
5
|
+
// @ts-expect-error
|
|
6
|
+
sessionTrackData.localPath ||
|
|
7
|
+
// @ts-expect-error
|
|
8
|
+
sessionTrackData.name
|
|
9
|
+
: undefined;
|
|
10
|
+
}
|
|
11
|
+
export function stripGz(fileName) {
|
|
12
|
+
return fileName.endsWith('.gz') ? fileName.slice(0, -3) : fileName;
|
|
13
|
+
}
|
|
14
|
+
export function basename(str) {
|
|
15
|
+
return str.split('#')[0].split('?')[0].split('/').pop();
|
|
16
|
+
}
|
|
17
|
+
export function extName(str) {
|
|
18
|
+
const r = str.split('.').pop();
|
|
19
|
+
return r ? `.${r}` : '';
|
|
20
|
+
}
|
|
@@ -68,17 +68,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
68
68
|
} & {
|
|
69
69
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
70
70
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
71
|
-
readonly currBp: number;
|
|
71
|
+
readonly currBp: number; /**
|
|
72
|
+
* #property
|
|
73
|
+
*/
|
|
72
74
|
} & {
|
|
73
75
|
pxToBp(px: number): {
|
|
74
|
-
coord: number;
|
|
76
|
+
coord: number; /**
|
|
77
|
+
* #property
|
|
78
|
+
*/
|
|
75
79
|
index: number;
|
|
76
80
|
refName: string;
|
|
77
81
|
oob: boolean;
|
|
78
|
-
assemblyName: string;
|
|
82
|
+
assemblyName: string; /**
|
|
83
|
+
* #property
|
|
84
|
+
*/
|
|
79
85
|
offset: number;
|
|
80
86
|
start: number;
|
|
81
|
-
end: number;
|
|
87
|
+
end: number; /**
|
|
88
|
+
* #property
|
|
89
|
+
*/
|
|
82
90
|
reversed: boolean;
|
|
83
91
|
};
|
|
84
92
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -86,9 +94,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
86
94
|
* #property
|
|
87
95
|
*/
|
|
88
96
|
coord: number;
|
|
89
|
-
regionNumber?: number | undefined;
|
|
90
|
-
* #property
|
|
91
|
-
*/
|
|
97
|
+
regionNumber?: number | undefined;
|
|
92
98
|
}): number | undefined;
|
|
93
99
|
} & {
|
|
94
100
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -153,17 +159,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
153
159
|
} & {
|
|
154
160
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
155
161
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
156
|
-
readonly currBp: number;
|
|
162
|
+
readonly currBp: number; /**
|
|
163
|
+
* #property
|
|
164
|
+
*/
|
|
157
165
|
} & {
|
|
158
166
|
pxToBp(px: number): {
|
|
159
|
-
coord: number;
|
|
167
|
+
coord: number; /**
|
|
168
|
+
* #property
|
|
169
|
+
*/
|
|
160
170
|
index: number;
|
|
161
171
|
refName: string;
|
|
162
172
|
oob: boolean;
|
|
163
|
-
assemblyName: string;
|
|
173
|
+
assemblyName: string; /**
|
|
174
|
+
* #property
|
|
175
|
+
*/
|
|
164
176
|
offset: number;
|
|
165
177
|
start: number;
|
|
166
|
-
end: number;
|
|
178
|
+
end: number; /**
|
|
179
|
+
* #property
|
|
180
|
+
*/
|
|
167
181
|
reversed: boolean;
|
|
168
182
|
};
|
|
169
183
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -171,9 +185,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
171
185
|
* #property
|
|
172
186
|
*/
|
|
173
187
|
coord: number;
|
|
174
|
-
regionNumber?: number | undefined;
|
|
175
|
-
* #property
|
|
176
|
-
*/
|
|
188
|
+
regionNumber?: number | undefined;
|
|
177
189
|
}): number | undefined;
|
|
178
190
|
} & {
|
|
179
191
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -220,20 +232,23 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
220
232
|
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
221
233
|
} & {
|
|
222
234
|
setMinimized(flag: boolean): void;
|
|
223
|
-
showDisplay(displayId: string, initialSnapshot?: {} | undefined): void;
|
|
235
|
+
showDisplay(displayId: string, initialSnapshot?: {} | undefined): void;
|
|
236
|
+
/**
|
|
237
|
+
* #property
|
|
238
|
+
*/
|
|
239
|
+
hideDisplay(displayId: string): number; /**
|
|
224
240
|
* #property
|
|
225
241
|
*/
|
|
226
|
-
hideDisplay(displayId: string): number;
|
|
227
242
|
replaceDisplay(oldId: string, newId: string, initialSnapshot?: {} | undefined): void;
|
|
228
243
|
} & {
|
|
229
244
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
230
245
|
type: string;
|
|
231
|
-
label: string;
|
|
232
|
-
* #property
|
|
233
|
-
*/
|
|
246
|
+
label: string;
|
|
234
247
|
subMenu: {
|
|
235
248
|
type: string;
|
|
236
|
-
label: string;
|
|
249
|
+
label: string; /**
|
|
250
|
+
* #property
|
|
251
|
+
*/
|
|
237
252
|
checked: boolean;
|
|
238
253
|
onClick: () => void;
|
|
239
254
|
}[];
|
|
@@ -356,17 +371,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
356
371
|
} & {
|
|
357
372
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
358
373
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
359
|
-
readonly currBp: number;
|
|
374
|
+
readonly currBp: number; /**
|
|
375
|
+
* #property
|
|
376
|
+
*/
|
|
360
377
|
} & {
|
|
361
378
|
pxToBp(px: number): {
|
|
362
|
-
coord: number;
|
|
379
|
+
coord: number; /**
|
|
380
|
+
* #property
|
|
381
|
+
*/
|
|
363
382
|
index: number;
|
|
364
383
|
refName: string;
|
|
365
384
|
oob: boolean;
|
|
366
|
-
assemblyName: string;
|
|
385
|
+
assemblyName: string; /**
|
|
386
|
+
* #property
|
|
387
|
+
*/
|
|
367
388
|
offset: number;
|
|
368
389
|
start: number;
|
|
369
|
-
end: number;
|
|
390
|
+
end: number; /**
|
|
391
|
+
* #property
|
|
392
|
+
*/
|
|
370
393
|
reversed: boolean;
|
|
371
394
|
};
|
|
372
395
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -374,9 +397,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
374
397
|
* #property
|
|
375
398
|
*/
|
|
376
399
|
coord: number;
|
|
377
|
-
regionNumber?: number | undefined;
|
|
378
|
-
* #property
|
|
379
|
-
*/
|
|
400
|
+
regionNumber?: number | undefined;
|
|
380
401
|
}): number | undefined;
|
|
381
402
|
} & {
|
|
382
403
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -440,17 +461,25 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
440
461
|
} & {
|
|
441
462
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
442
463
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
443
|
-
readonly currBp: number;
|
|
464
|
+
readonly currBp: number; /**
|
|
465
|
+
* #property
|
|
466
|
+
*/
|
|
444
467
|
} & {
|
|
445
468
|
pxToBp(px: number): {
|
|
446
|
-
coord: number;
|
|
469
|
+
coord: number; /**
|
|
470
|
+
* #property
|
|
471
|
+
*/
|
|
447
472
|
index: number;
|
|
448
473
|
refName: string;
|
|
449
474
|
oob: boolean;
|
|
450
|
-
assemblyName: string;
|
|
475
|
+
assemblyName: string; /**
|
|
476
|
+
* #property
|
|
477
|
+
*/
|
|
451
478
|
offset: number;
|
|
452
479
|
start: number;
|
|
453
|
-
end: number;
|
|
480
|
+
end: number; /**
|
|
481
|
+
* #property
|
|
482
|
+
*/
|
|
454
483
|
reversed: boolean;
|
|
455
484
|
};
|
|
456
485
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
@@ -458,9 +487,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
458
487
|
* #property
|
|
459
488
|
*/
|
|
460
489
|
coord: number;
|
|
461
|
-
regionNumber?: number | undefined;
|
|
462
|
-
* #property
|
|
463
|
-
*/
|
|
490
|
+
regionNumber?: number | undefined;
|
|
464
491
|
}): number | undefined;
|
|
465
492
|
} & {
|
|
466
493
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
@@ -576,14 +603,20 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
576
603
|
* #action
|
|
577
604
|
*/
|
|
578
605
|
getCoords(mousedown: Coord, mouseup: Coord): {
|
|
579
|
-
coord: number;
|
|
606
|
+
coord: number; /**
|
|
607
|
+
* #property
|
|
608
|
+
*/
|
|
580
609
|
index: number;
|
|
581
610
|
refName: string;
|
|
582
611
|
oob: boolean;
|
|
583
|
-
assemblyName: string;
|
|
612
|
+
assemblyName: string; /**
|
|
613
|
+
* #property
|
|
614
|
+
*/
|
|
584
615
|
offset: number;
|
|
585
616
|
start: number;
|
|
586
|
-
end: number;
|
|
617
|
+
end: number; /**
|
|
618
|
+
* #property
|
|
619
|
+
*/
|
|
587
620
|
reversed: boolean;
|
|
588
621
|
}[] | undefined;
|
|
589
622
|
/**
|
package/esm/DotplotView/model.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-dotplot-view",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "JBrowse 2 dotplot view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "9052b295f2d322e729254457ed9fe2231fb22cce"
|
|
68
68
|
}
|
/package/dist/DotplotView/components/{ImportCustomTrack.d.ts → ImportForm/ImportCustomTrack.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/esm/DotplotView/components/{ImportCustomTrack.d.ts → ImportForm/ImportCustomTrack.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|