jbrowse-plugin-msaview 2.6.8 → 2.7.1
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/LaunchMsaView/index.js +19 -11
- package/dist/MsaViewPanel/model.d.ts +446 -144
- package/dist/MsaViewPanel/model.js +10 -1
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +67 -29
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +20 -22
- package/src/LaunchMsaView/index.ts +62 -37
- package/src/MsaViewPanel/model.ts +10 -4
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.7.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.7.1';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.7.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "jbrowse-plugin-msaview",
|
|
5
5
|
"repository": {
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@gmod/bgzf-filehandle": "^6.2.0",
|
|
21
21
|
"g2p_mapper": "^2.1.5",
|
|
22
22
|
"idb": "^8.0.3",
|
|
23
|
-
"react-msaview": "^5.5.0",
|
|
24
23
|
"swr": "^2.4.2"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
@@ -28,39 +27,38 @@
|
|
|
28
27
|
"@eslint/js": "^10.0.1",
|
|
29
28
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
30
29
|
"@jbrowse/core": "^4.3.0",
|
|
31
|
-
"@jbrowse/mobx-state-tree": "^5.
|
|
30
|
+
"@jbrowse/mobx-state-tree": "^5.13.0",
|
|
32
31
|
"@jbrowse/plugin-linear-genome-view": "^4.3.0",
|
|
33
|
-
"@mui/icons-material": "^
|
|
34
|
-
"@mui/material": "^
|
|
35
|
-
"@mui/system": "^
|
|
36
|
-
"@mui/x-data-grid": "^
|
|
37
|
-
"@types/node": "^
|
|
32
|
+
"@mui/icons-material": "^9.2.0",
|
|
33
|
+
"@mui/material": "^9.2.0",
|
|
34
|
+
"@mui/system": "^9.2.0",
|
|
35
|
+
"@mui/x-data-grid": "^9.10.0",
|
|
36
|
+
"@types/node": "^26.1.1",
|
|
38
37
|
"@types/react": "^19.2.17",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
|
40
|
-
"@typescript-eslint/parser": "^8.62.0",
|
|
41
38
|
"esbuild": "^0.28.1",
|
|
42
|
-
"eslint": "^10.
|
|
43
|
-
"eslint-plugin-import-x": "^4.17.
|
|
39
|
+
"eslint": "^10.7.0",
|
|
40
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
44
41
|
"eslint-plugin-react": "^7.37.5",
|
|
45
42
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
46
|
-
"eslint-plugin-unicorn": "^
|
|
43
|
+
"eslint-plugin-unicorn": "^72.0.0",
|
|
47
44
|
"mobx": "^6.16.1",
|
|
48
45
|
"mobx-react": "^9.2.2",
|
|
49
|
-
"msa-parsers": "^5.
|
|
46
|
+
"msa-parsers": "^5.6.1",
|
|
50
47
|
"pixelmatch": "^7.2.0",
|
|
51
48
|
"pngjs": "^7.0.0",
|
|
52
|
-
"prettier": "^3.
|
|
53
|
-
"pretty-bytes": "^7.1.
|
|
54
|
-
"puppeteer": "^25.
|
|
55
|
-
"react": "^19.2.
|
|
56
|
-
"react-dom": "^19.2.
|
|
49
|
+
"prettier": "^3.9.6",
|
|
50
|
+
"pretty-bytes": "^7.1.1",
|
|
51
|
+
"puppeteer": "^25.3.0",
|
|
52
|
+
"react": "^19.2.8",
|
|
53
|
+
"react-dom": "^19.2.8",
|
|
54
|
+
"react-msaview": "^5.6.3",
|
|
57
55
|
"rimraf": "^6.1.3",
|
|
58
56
|
"rxjs": "^7.8.2",
|
|
59
57
|
"serve": "^14.2.6",
|
|
60
58
|
"tss-react": "^4.9.21",
|
|
61
|
-
"typescript": "^6.0.
|
|
62
|
-
"typescript-eslint": "^8.
|
|
63
|
-
"vitest": "^4.1.
|
|
59
|
+
"typescript": "^6.0.2",
|
|
60
|
+
"typescript-eslint": "^8.65.0",
|
|
61
|
+
"vitest": "^4.1.10"
|
|
64
62
|
},
|
|
65
63
|
"scripts": {
|
|
66
64
|
"clean": "rimraf dist",
|
|
@@ -14,45 +14,70 @@ function isDisplay(elt: { name: string }): elt is DisplayType {
|
|
|
14
14
|
return elt.name === 'LinearBasicDisplay'
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
// The canvas LinearBasicDisplay (JBrowse >=4.3) exposes the right-clicked
|
|
18
|
+
// feature via contextMenuInfo + async fetchFullFeature rather than a synchronous
|
|
19
|
+
// feature object.
|
|
20
|
+
interface ContextMenuInfo {
|
|
21
|
+
item: { featureId: string; type?: string }
|
|
22
|
+
displayedRegionIndex: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface DisplayModel {
|
|
26
|
+
contextMenuItems: () => MenuItem[]
|
|
27
|
+
contextMenuInfo?: ContextMenuInfo
|
|
28
|
+
isGeneLike: boolean
|
|
29
|
+
fetchFullFeature: (
|
|
30
|
+
featureId: string,
|
|
31
|
+
displayedRegionIndex: number,
|
|
32
|
+
) => Promise<Feature | undefined>
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
function extendStateModel(stateModel: IAnyModelType) {
|
|
18
|
-
return stateModel.views(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
return stateModel.views((self: DisplayModel) => {
|
|
37
|
+
const superContextMenuItems = self.contextMenuItems
|
|
38
|
+
return {
|
|
39
|
+
contextMenuItems() {
|
|
40
|
+
const track = getContainingTrack(self)
|
|
41
|
+
const session = getSession(track)
|
|
42
|
+
const info = self.contextMenuInfo
|
|
43
|
+
const showMsaMenuItem = info && self.isGeneLike
|
|
44
|
+
return [
|
|
45
|
+
...superContextMenuItems(),
|
|
46
|
+
...(showMsaMenuItem
|
|
47
|
+
? [
|
|
48
|
+
{
|
|
49
|
+
label: 'Launch MSA view',
|
|
50
|
+
icon: AddIcon,
|
|
51
|
+
onClick: () => {
|
|
52
|
+
self
|
|
53
|
+
.fetchFullFeature(
|
|
54
|
+
info.item.featureId,
|
|
55
|
+
info.displayedRegionIndex,
|
|
56
|
+
)
|
|
57
|
+
.then(feature => {
|
|
58
|
+
if (feature) {
|
|
59
|
+
session.queueDialog(handleClose => [
|
|
60
|
+
LaunchMsaViewDialog,
|
|
61
|
+
{ model: track, handleClose, feature },
|
|
62
|
+
])
|
|
63
|
+
} else {
|
|
64
|
+
session.notify(
|
|
65
|
+
'Could not load feature for MSA view',
|
|
66
|
+
'warning',
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
.catch((e: unknown) => {
|
|
71
|
+
session.notifyError(`${e}`, e)
|
|
72
|
+
})
|
|
48
73
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
)
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
: []),
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
})
|
|
56
81
|
}
|
|
57
82
|
|
|
58
83
|
export default function LaunchMsaViewF(pluginManager: PluginManager) {
|
|
@@ -77,6 +77,11 @@ export default function stateModelFactory() {
|
|
|
77
77
|
/**
|
|
78
78
|
* #property
|
|
79
79
|
*/
|
|
80
|
+
// Plain defaults, not types.stripDefault: that postdates the
|
|
81
|
+
// mobx-state-tree every released core exposes (present only on main), and
|
|
82
|
+
// the missing function throws while this model is being built, which
|
|
83
|
+
// error-pages the whole app rather than just this view. Restore
|
|
84
|
+
// stripDefault once a release ships it.
|
|
80
85
|
querySeqName: 'QUERY',
|
|
81
86
|
|
|
82
87
|
/**
|
|
@@ -87,6 +92,7 @@ export default function stateModelFactory() {
|
|
|
87
92
|
/**
|
|
88
93
|
* #property
|
|
89
94
|
*/
|
|
95
|
+
// see querySeqName above re: types.stripDefault
|
|
90
96
|
zoomToBaseLevel: false,
|
|
91
97
|
|
|
92
98
|
/**
|
|
@@ -207,9 +213,10 @@ export default function stateModelFactory() {
|
|
|
207
213
|
* #getter
|
|
208
214
|
*/
|
|
209
215
|
get connectedHighlights(): IRegion[] {
|
|
210
|
-
return [
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
return [
|
|
217
|
+
this.connectedHoverHighlight,
|
|
218
|
+
this.connectedClickHighlight,
|
|
219
|
+
].filter((r): r is IRegion => r !== undefined)
|
|
213
220
|
},
|
|
214
221
|
}))
|
|
215
222
|
|
|
@@ -312,7 +319,6 @@ export default function stateModelFactory() {
|
|
|
312
319
|
connectedView.centerAt(r2.start, r2.refName)
|
|
313
320
|
}
|
|
314
321
|
},
|
|
315
|
-
|
|
316
322
|
}))
|
|
317
323
|
.actions(self => {
|
|
318
324
|
const superSetMouseClickPos = self.setMouseClickPos.bind(self)
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.7.1'
|