@jbrowse/plugin-dotplot-view 3.7.0 → 4.0.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.
Files changed (224) hide show
  1. package/esm/ComparativeRenderer/index.d.ts +10 -10
  2. package/esm/ComparativeRenderer/index.js +4 -17
  3. package/esm/DiagonalizeDotplotRpc.js +9 -12
  4. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -1
  5. package/esm/DotplotDisplay/index.d.ts +3 -3
  6. package/esm/DotplotDisplay/index.js +4 -4
  7. package/esm/DotplotDisplay/renderDotplotBlock.d.ts +2 -1
  8. package/esm/DotplotDisplay/renderDotplotBlock.js +6 -4
  9. package/esm/DotplotDisplay/stateModelFactory.d.ts +143 -30
  10. package/esm/DotplotDisplay/stateModelFactory.js +5 -14
  11. package/esm/DotplotReadVsRef/DotplotReadVsRef.js +5 -6
  12. package/esm/DotplotReadVsRef/index.js +1 -1
  13. package/esm/DotplotRenderer/DotplotRenderer.d.ts +30 -39
  14. package/esm/DotplotRenderer/DotplotRenderer.js +55 -22
  15. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
  16. package/esm/DotplotRenderer/components/DotplotRendering.js +1 -1
  17. package/esm/DotplotRenderer/configSchema.d.ts +3 -3
  18. package/esm/DotplotRenderer/configSchema.js +1 -1
  19. package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
  20. package/esm/DotplotRenderer/drawDotplot.js +5 -6
  21. package/esm/DotplotRenderer/index.js +4 -4
  22. package/esm/DotplotView/1dview.d.ts +25 -25
  23. package/esm/DotplotView/1dview.js +13 -3
  24. package/esm/DotplotView/components/Axes.d.ts +1 -1
  25. package/esm/DotplotView/components/Axes.js +31 -41
  26. package/esm/DotplotView/components/ColorBySelector.d.ts +1 -1
  27. package/esm/DotplotView/components/ColorBySelector.js +3 -4
  28. package/esm/DotplotView/components/DiagonalizationProgressDialog.d.ts +1 -1
  29. package/esm/DotplotView/components/DiagonalizationProgressDialog.js +1 -1
  30. package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
  31. package/esm/DotplotView/components/DotplotControls.js +7 -8
  32. package/esm/DotplotView/components/DotplotGrid.d.ts +6 -0
  33. package/esm/DotplotView/components/{Grid.js → DotplotGrid.js} +19 -20
  34. package/esm/DotplotView/components/DotplotGridWrapper.d.ts +6 -0
  35. package/esm/DotplotView/components/DotplotGridWrapper.js +8 -0
  36. package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -2
  37. package/esm/DotplotView/components/DotplotTooltipClick.js +4 -4
  38. package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
  39. package/esm/DotplotView/components/DotplotTooltipMouseover.js +2 -2
  40. package/esm/DotplotView/components/DotplotTooltips.d.ts +1 -1
  41. package/esm/DotplotView/components/DotplotTooltips.js +2 -2
  42. package/esm/DotplotView/components/DotplotView.d.ts +2 -2
  43. package/esm/DotplotView/components/DotplotView.js +23 -21
  44. package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
  45. package/esm/DotplotView/components/DotplotWarnings.js +3 -3
  46. package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
  47. package/esm/DotplotView/components/Header.d.ts +1 -1
  48. package/esm/DotplotView/components/Header.js +5 -5
  49. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
  50. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +6 -5
  51. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
  52. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +2 -3
  53. package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +10 -1
  54. package/esm/DotplotView/components/ImportForm/TrackSelector.js +8 -4
  55. package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
  56. package/esm/DotplotView/components/ImportForm/index.js +4 -9
  57. package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +1 -1
  58. package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +2 -2
  59. package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
  60. package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.js +2 -2
  61. package/esm/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
  62. package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +1 -1
  63. package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +3 -3
  64. package/esm/DotplotView/components/ImportForm/selectors/index.d.ts +3 -3
  65. package/esm/DotplotView/components/ImportForm/selectors/index.js +3 -3
  66. package/esm/DotplotView/components/MinLengthSlider.d.ts +1 -1
  67. package/esm/DotplotView/components/MinLengthSlider.js +7 -7
  68. package/esm/DotplotView/components/MouseInteractionLayer.d.ts +3 -3
  69. package/esm/DotplotView/components/MouseInteractionLayer.js +6 -4
  70. package/esm/DotplotView/components/OpacitySlider.d.ts +1 -1
  71. package/esm/DotplotView/components/OpacitySlider.js +5 -6
  72. package/esm/DotplotView/components/PanButtons.d.ts +1 -1
  73. package/esm/DotplotView/components/PanButtons.js +1 -1
  74. package/esm/DotplotView/components/SelectionContextMenu.d.ts +1 -1
  75. package/esm/DotplotView/components/WarningDialog.js +1 -1
  76. package/esm/DotplotView/components/util.d.ts +1 -1
  77. package/esm/DotplotView/components/util.js +17 -5
  78. package/esm/DotplotView/index.js +2 -2
  79. package/esm/DotplotView/model.d.ts +208 -90
  80. package/esm/DotplotView/model.js +118 -79
  81. package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
  82. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -6
  83. package/esm/DotplotView/types.d.ts +7 -1
  84. package/esm/LaunchDotplotView.js +6 -36
  85. package/esm/ServerSideRenderedBlockContent.js +2 -6
  86. package/esm/ServerSideSyntenyRendering.d.ts +1 -1
  87. package/esm/ServerSideSyntenyRendering.js +1 -1
  88. package/esm/index.d.ts +1 -0
  89. package/esm/index.js +8 -11
  90. package/esm/util.d.ts +1 -1
  91. package/package.json +28 -35
  92. package/dist/ComparativeRenderer/index.d.ts +0 -22
  93. package/dist/ComparativeRenderer/index.js +0 -53
  94. package/dist/DiagonalizeDotplotRpc.d.ts +0 -30
  95. package/dist/DiagonalizeDotplotRpc.js +0 -156
  96. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +0 -6
  97. package/dist/DotplotDisplay/components/DotplotDisplay.js +0 -18
  98. package/dist/DotplotDisplay/index.d.ts +0 -5
  99. package/dist/DotplotDisplay/index.js +0 -36
  100. package/dist/DotplotDisplay/renderDotplotBlock.d.ts +0 -11
  101. package/dist/DotplotDisplay/renderDotplotBlock.js +0 -52
  102. package/dist/DotplotDisplay/stateModelFactory.d.ts +0 -108
  103. package/dist/DotplotDisplay/stateModelFactory.js +0 -134
  104. package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +0 -3
  105. package/dist/DotplotReadVsRef/DotplotReadVsRef.js +0 -100
  106. package/dist/DotplotReadVsRef/index.d.ts +0 -2
  107. package/dist/DotplotReadVsRef/index.js +0 -41
  108. package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
  109. package/dist/DotplotRenderer/ComparativeRenderRpc.js +0 -53
  110. package/dist/DotplotRenderer/DotplotRenderer.d.ts +0 -65
  111. package/dist/DotplotRenderer/DotplotRenderer.js +0 -102
  112. package/dist/DotplotRenderer/clamp.d.ts +0 -7
  113. package/dist/DotplotRenderer/clamp.js +0 -62
  114. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +0 -3
  115. package/dist/DotplotRenderer/components/DotplotRendering.js +0 -9
  116. package/dist/DotplotRenderer/configSchema.d.ts +0 -40
  117. package/dist/DotplotRenderer/configSchema.js +0 -57
  118. package/dist/DotplotRenderer/drawDotplot.d.ts +0 -22
  119. package/dist/DotplotRenderer/drawDotplot.js +0 -209
  120. package/dist/DotplotRenderer/index.d.ts +0 -2
  121. package/dist/DotplotRenderer/index.js +0 -17
  122. package/dist/DotplotView/1dview.d.ts +0 -199
  123. package/dist/DotplotView/1dview.js +0 -65
  124. package/dist/DotplotView/components/Axes.d.ts +0 -13
  125. package/dist/DotplotView/components/Axes.js +0 -107
  126. package/dist/DotplotView/components/ColorBySelector.d.ts +0 -5
  127. package/dist/DotplotView/components/ColorBySelector.js +0 -79
  128. package/dist/DotplotView/components/CursorIcon.d.ts +0 -3
  129. package/dist/DotplotView/components/CursorIcon.js +0 -15
  130. package/dist/DotplotView/components/DiagonalizationProgressDialog.d.ts +0 -6
  131. package/dist/DotplotView/components/DiagonalizationProgressDialog.js +0 -125
  132. package/dist/DotplotView/components/DotplotControls.d.ts +0 -5
  133. package/dist/DotplotView/components/DotplotControls.js +0 -187
  134. package/dist/DotplotView/components/DotplotTooltipClick.d.ts +0 -10
  135. package/dist/DotplotView/components/DotplotTooltipClick.js +0 -17
  136. package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +0 -9
  137. package/dist/DotplotView/components/DotplotTooltipMouseover.js +0 -16
  138. package/dist/DotplotView/components/DotplotTooltips.d.ts +0 -15
  139. package/dist/DotplotView/components/DotplotTooltips.js +0 -43
  140. package/dist/DotplotView/components/DotplotView.d.ts +0 -5
  141. package/dist/DotplotView/components/DotplotView.js +0 -100
  142. package/dist/DotplotView/components/DotplotWarnings.d.ts +0 -5
  143. package/dist/DotplotView/components/DotplotWarnings.js +0 -53
  144. package/dist/DotplotView/components/ExportSvgDialog.d.ts +0 -7
  145. package/dist/DotplotView/components/ExportSvgDialog.js +0 -53
  146. package/dist/DotplotView/components/Grid.d.ts +0 -9
  147. package/dist/DotplotView/components/Grid.js +0 -47
  148. package/dist/DotplotView/components/Header.d.ts +0 -9
  149. package/dist/DotplotView/components/Header.js +0 -33
  150. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -7
  151. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -78
  152. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +0 -7
  153. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +0 -42
  154. package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +0 -7
  155. package/dist/DotplotView/components/ImportForm/TrackSelector.js +0 -23
  156. package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +0 -117
  157. package/dist/DotplotView/components/ImportForm/getAdapter.js +0 -68
  158. package/dist/DotplotView/components/ImportForm/index.d.ts +0 -5
  159. package/dist/DotplotView/components/ImportForm/index.js +0 -75
  160. package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +0 -3
  161. package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +0 -23
  162. package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
  163. package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.js +0 -13
  164. package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -23
  165. package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.js +0 -10
  166. package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
  167. package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
  168. package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +0 -3
  169. package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +0 -24
  170. package/dist/DotplotView/components/ImportForm/selectors/index.d.ts +0 -3
  171. package/dist/DotplotView/components/ImportForm/selectors/index.js +0 -12
  172. package/dist/DotplotView/components/ImportForm/util.d.ts +0 -10
  173. package/dist/DotplotView/components/ImportForm/util.js +0 -24
  174. package/dist/DotplotView/components/MinLengthSlider.d.ts +0 -5
  175. package/dist/DotplotView/components/MinLengthSlider.js +0 -44
  176. package/dist/DotplotView/components/MouseInteractionLayer.d.ts +0 -17
  177. package/dist/DotplotView/components/MouseInteractionLayer.js +0 -18
  178. package/dist/DotplotView/components/OpacitySlider.d.ts +0 -5
  179. package/dist/DotplotView/components/OpacitySlider.js +0 -43
  180. package/dist/DotplotView/components/PanButtons.d.ts +0 -5
  181. package/dist/DotplotView/components/PanButtons.js +0 -47
  182. package/dist/DotplotView/components/SelectionContextMenu.d.ts +0 -13
  183. package/dist/DotplotView/components/SelectionContextMenu.js +0 -42
  184. package/dist/DotplotView/components/SliderTooltip.d.ts +0 -2
  185. package/dist/DotplotView/components/SliderTooltip.js +0 -9
  186. package/dist/DotplotView/components/WarningDialog.d.ts +0 -16
  187. package/dist/DotplotView/components/WarningDialog.js +0 -39
  188. package/dist/DotplotView/components/hooks/useCtrlKeyTracking.d.ts +0 -1
  189. package/dist/DotplotView/components/hooks/useCtrlKeyTracking.js +0 -24
  190. package/dist/DotplotView/components/hooks/useCursorMode.d.ts +0 -7
  191. package/dist/DotplotView/components/hooks/useCursorMode.js +0 -19
  192. package/dist/DotplotView/components/hooks/useMouseCoordinates.d.ts +0 -29
  193. package/dist/DotplotView/components/hooks/useMouseCoordinates.js +0 -52
  194. package/dist/DotplotView/components/hooks/useMouseMoveHandler.d.ts +0 -6
  195. package/dist/DotplotView/components/hooks/useMouseMoveHandler.js +0 -27
  196. package/dist/DotplotView/components/hooks/useMouseUpHandler.d.ts +0 -3
  197. package/dist/DotplotView/components/hooks/useMouseUpHandler.js +0 -31
  198. package/dist/DotplotView/components/hooks/useWheelHandler.d.ts +0 -8
  199. package/dist/DotplotView/components/hooks/useWheelHandler.js +0 -47
  200. package/dist/DotplotView/components/util.d.ts +0 -14
  201. package/dist/DotplotView/components/util.js +0 -80
  202. package/dist/DotplotView/index.d.ts +0 -2
  203. package/dist/DotplotView/index.js +0 -52
  204. package/dist/DotplotView/model.d.ts +0 -440
  205. package/dist/DotplotView/model.js +0 -502
  206. package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +0 -4
  207. package/dist/DotplotView/svgcomponents/SVGBackground.js +0 -10
  208. package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +0 -2
  209. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +0 -30
  210. package/dist/DotplotView/types.d.ts +0 -12
  211. package/dist/DotplotView/types.js +0 -2
  212. package/dist/LaunchDotplotView.d.ts +0 -2
  213. package/dist/LaunchDotplotView.js +0 -43
  214. package/dist/ServerSideRenderedBlockContent.d.ts +0 -12
  215. package/dist/ServerSideRenderedBlockContent.js +0 -48
  216. package/dist/ServerSideSyntenyRendering.d.ts +0 -13
  217. package/dist/ServerSideSyntenyRendering.js +0 -23
  218. package/dist/index.d.ts +0 -7
  219. package/dist/index.js +0 -42
  220. package/dist/util.d.ts +0 -9
  221. package/dist/util.js +0 -7
  222. package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
  223. package/esm/DotplotRenderer/ComparativeRenderRpc.js +0 -47
  224. package/esm/DotplotView/components/Grid.d.ts +0 -9
@@ -3,17 +3,21 @@ import { getConf } from '@jbrowse/core/configuration';
3
3
  import BaseViewModel from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
4
4
  import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
5
5
  import { getSession, getTickDisplayStr, isSessionModelWithWidgets, localStorageGetBoolean, localStorageGetItem, max, measureText, minmax, } from '@jbrowse/core/util';
6
- import { getParentRenderProps } from '@jbrowse/core/util/tracks';
6
+ import { getParentRenderProps, hideTrackGeneric, showTrackGeneric, toggleTrackGeneric, } from '@jbrowse/core/util/tracks';
7
7
  import { ElementId } from '@jbrowse/core/util/types/mst';
8
+ import { addDisposer, cast, getParent, getSnapshot, types, } from '@jbrowse/mobx-state-tree';
8
9
  import FolderOpenIcon from '@mui/icons-material/FolderOpen';
9
10
  import PhotoCameraIcon from '@mui/icons-material/PhotoCamera';
10
- import { saveAs } from 'file-saver';
11
- import { autorun, observable, transaction } from 'mobx';
12
- import { addDisposer, cast, getParent, getRoot, getSnapshot, resolveIdentifier, types, } from 'mobx-state-tree';
13
- import { Dotplot1DView, DotplotHView, DotplotVView } from './1dview';
14
- import { getBlockLabelKeysToHide, makeTicks } from './components/util';
15
- const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
11
+ import { autorun, observable } from 'mobx';
12
+ import { Dotplot1DView, DotplotHView, DotplotVView } from "./1dview.js";
13
+ import { getBlockLabelKeysToHide, makeTicks } from "./components/util.js";
14
+ const ExportSvgDialog = lazy(() => import("./components/ExportSvgDialog.js"));
16
15
  const ReturnToImportFormDialog = lazy(() => import('@jbrowse/core/ui/ReturnToImportFormDialog'));
16
+ const defaultHeight = 600;
17
+ const defaultBorderSize = 20;
18
+ const defaultTickSize = 5;
19
+ const defaultHtextRotation = -90;
20
+ const defaultFontSize = 15;
17
21
  function stringLenPx(a) {
18
22
  return measureText(a.slice(0, 30));
19
23
  }
@@ -30,12 +34,12 @@ export default function stateModelFactory(pm) {
30
34
  .compose('DotplotView', BaseViewModel, types.model({
31
35
  id: ElementId,
32
36
  type: types.literal('DotplotView'),
33
- height: 600,
34
- borderSize: 20,
35
- tickSize: 5,
37
+ height: defaultHeight,
38
+ borderSize: defaultBorderSize,
39
+ tickSize: defaultTickSize,
36
40
  vtextRotation: 0,
37
- htextRotation: -90,
38
- fontSize: 15,
41
+ htextRotation: defaultHtextRotation,
42
+ fontSize: defaultFontSize,
39
43
  trackSelectorType: 'hierarchical',
40
44
  assemblyNames: types.array(types.string),
41
45
  drawCigar: true,
@@ -43,6 +47,7 @@ export default function stateModelFactory(pm) {
43
47
  vview: types.optional(DotplotVView, {}),
44
48
  tracks: types.array(pm.pluggableMstType('track', 'stateModel')),
45
49
  viewTrackConfigs: types.array(pm.pluggableConfigSchemaType('track')),
50
+ init: types.frozen(),
46
51
  }))
47
52
  .volatile(() => ({
48
53
  volatileWidth: undefined,
@@ -77,13 +82,13 @@ export default function stateModelFactory(pm) {
77
82
  get assemblyErrors() {
78
83
  const { assemblyManager } = getSession(self);
79
84
  return self.assemblyNames
80
- .map(a => { var _a; return (_a = assemblyManager.get(a)) === null || _a === void 0 ? void 0 : _a.error; })
85
+ .map(a => assemblyManager.get(a)?.error)
81
86
  .filter(f => !!f)
82
87
  .join(', ');
83
88
  },
84
89
  get assembliesInitialized() {
85
90
  const { assemblyManager } = getSession(self);
86
- return self.assemblyNames.every(n => { var _a, _b; return (_b = (_a = assemblyManager.get(n)) === null || _a === void 0 ? void 0 : _a.initialized) !== null && _b !== void 0 ? _b : true; });
91
+ return self.assemblyNames.every(n => assemblyManager.get(n)?.initialized ?? true);
87
92
  },
88
93
  }))
89
94
  .views(self => ({
@@ -107,8 +112,20 @@ export default function stateModelFactory(pm) {
107
112
  ? []
108
113
  : makeTicks(staticBlocks.contentBlocks, bpPerPx);
109
114
  },
110
- get loading() {
111
- return self.assemblyNames.length > 0 && !this.initialized;
115
+ get hasSomethingToShow() {
116
+ return self.assemblyNames.length > 0 || !!self.init;
117
+ },
118
+ get showLoading() {
119
+ return (this.hasSomethingToShow &&
120
+ !this.initialized &&
121
+ !self.volatileError &&
122
+ !self.assemblyErrors);
123
+ },
124
+ get showImportForm() {
125
+ return !this.hasSomethingToShow || !!self.volatileError;
126
+ },
127
+ get loadingMessage() {
128
+ return this.showLoading ? 'Loading' : undefined;
112
129
  },
113
130
  get viewWidth() {
114
131
  return self.width - self.borderX;
@@ -164,9 +181,18 @@ export default function stateModelFactory(pm) {
164
181
  setError(e) {
165
182
  self.volatileError = e;
166
183
  },
184
+ setInit(init) {
185
+ self.init = init;
186
+ },
167
187
  zoomOut() {
168
188
  self.hview.zoomOut();
169
189
  self.vview.zoomOut();
190
+ if (self.hview.bpPerPx >= self.hview.maxBpPerPx * 0.99) {
191
+ self.hview.center();
192
+ }
193
+ if (self.vview.bpPerPx >= self.vview.maxBpPerPx * 0.99) {
194
+ self.vview.center();
195
+ }
170
196
  },
171
197
  zoomIn() {
172
198
  self.hview.zoomIn();
@@ -186,46 +212,18 @@ export default function stateModelFactory(pm) {
186
212
  throw new Error(`invalid track selector type ${self.trackSelectorType}`);
187
213
  },
188
214
  showTrack(trackId, initialSnapshot = {}) {
189
- const schema = pm.pluggableConfigSchemaType('track');
190
- const conf = resolveIdentifier(schema, getRoot(self), trackId);
191
- const trackType = pm.getTrackType(conf.type);
192
- if (!trackType) {
193
- throw new Error(`unknown track type ${conf.type}`);
194
- }
195
- const viewType = pm.getViewType(self.type);
196
- const displayConf = conf.displays.find((d) => viewType.displayTypes.find(type => type.name === d.type));
197
- if (!displayConf) {
198
- throw new Error(`could not find a compatible display for view type ${self.type}`);
199
- }
200
- const track = trackType.stateModel.create({
201
- ...initialSnapshot,
202
- type: conf.type,
203
- configuration: conf,
204
- displays: [{ type: displayConf.type, configuration: displayConf }],
205
- });
206
- self.tracks.push(track);
215
+ return showTrackGeneric(self, trackId, initialSnapshot);
207
216
  },
208
217
  hideTrack(trackId) {
209
- const schema = pm.pluggableConfigSchemaType('track');
210
- const conf = resolveIdentifier(schema, getRoot(self), trackId);
211
- const tracks = self.tracks.filter(t => t.configuration === conf);
212
- transaction(() => {
213
- for (const track of tracks) {
214
- self.tracks.remove(track);
215
- }
216
- });
217
- return tracks.length;
218
+ return hideTrackGeneric(self, trackId);
218
219
  },
219
220
  toggleTrack(trackId) {
220
- const hiddenCount = this.hideTrack(trackId);
221
- if (!hiddenCount) {
222
- this.showTrack(trackId);
223
- return true;
224
- }
225
- return false;
221
+ toggleTrackGeneric(self, trackId);
226
222
  },
227
223
  setAssemblyNames(target, query) {
228
224
  self.assemblyNames = cast([target, query]);
225
+ self.hview.setDisplayedRegions([]);
226
+ self.vview.setDisplayedRegions([]);
229
227
  },
230
228
  setViews(arr) {
231
229
  self.hview = cast(arr[0]);
@@ -281,6 +279,16 @@ export default function stateModelFactory(pm) {
281
279
  self.vview.center();
282
280
  self.hview.center();
283
281
  },
282
+ initializeDisplayedRegions() {
283
+ const { hview, vview, assemblyNames } = self;
284
+ if (hview.displayedRegions.length && vview.displayedRegions.length) {
285
+ return;
286
+ }
287
+ const { assemblyManager } = getSession(self);
288
+ hview.setDisplayedRegions(assemblyManager.get(assemblyNames[0])?.regions || []);
289
+ vview.setDisplayedRegions(assemblyManager.get(assemblyNames[1])?.regions || []);
290
+ this.showAllRegions();
291
+ },
284
292
  onDotplotView(mousedown, mouseup) {
285
293
  const result = this.getCoords(mousedown, mouseup);
286
294
  if (result) {
@@ -309,9 +317,12 @@ export default function stateModelFactory(pm) {
309
317
  const trackConf = getParent(displayConf, 2);
310
318
  return {
311
319
  type: trackConf.type,
312
- configuration: trackConf,
320
+ configuration: getSnapshot(trackConf),
313
321
  displays: [
314
- { type: displayConf.type, configuration: displayConf },
322
+ {
323
+ type: displayConf.type,
324
+ configuration: getSnapshot(displayConf),
325
+ },
315
326
  ],
316
327
  };
317
328
  });
@@ -341,20 +352,40 @@ export default function stateModelFactory(pm) {
341
352
  }))
342
353
  .actions(self => ({
343
354
  async exportSvg(opts = {}) {
344
- const { renderToSvg } = await import('./svgcomponents/SVGDotplotView');
355
+ const { renderToSvg } = await import("./svgcomponents/SVGDotplotView.js");
345
356
  const html = await renderToSvg(self, opts);
346
- const blob = new Blob([html], { type: 'image/svg+xml' });
347
- saveAs(blob, opts.filename || 'image.svg');
357
+ const { saveAs } = await import('file-saver-es');
358
+ saveAs(new Blob([html], { type: 'image/svg+xml' }), opts.filename || 'image.svg');
348
359
  },
349
360
  beforeDestroy() {
350
- var _a;
351
361
  const session = getSession(self);
352
362
  for (const name of self.assemblyNames) {
353
- (_a = session.removeTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, name);
363
+ session.removeTemporaryAssembly?.(name);
354
364
  }
355
365
  },
356
366
  afterAttach() {
357
- addDisposer(self, autorun(() => {
367
+ addDisposer(self, autorun(function dotplotInitAutorun() {
368
+ const { init, volatileWidth } = self;
369
+ if (!volatileWidth || !init) {
370
+ return;
371
+ }
372
+ const session = getSession(self);
373
+ const assemblyNames = init.views.map(v => v.assembly);
374
+ self.setAssemblyNames(assemblyNames[0], assemblyNames[1]);
375
+ if (init.tracks) {
376
+ for (const trackId of init.tracks) {
377
+ try {
378
+ self.showTrack(trackId);
379
+ }
380
+ catch (e) {
381
+ console.error(e);
382
+ session.notifyError(`${e}`, e);
383
+ }
384
+ }
385
+ }
386
+ self.setInit(undefined);
387
+ }, { name: 'DotplotInit' }));
388
+ addDisposer(self, autorun(function dotplotLocalStorageAutorun() {
358
389
  const s = (s) => JSON.stringify(s);
359
390
  const { showPanButtons, wheelMode, cursorMode } = self;
360
391
  if (typeof localStorage !== 'undefined') {
@@ -362,33 +393,22 @@ export default function stateModelFactory(pm) {
362
393
  localStorage.setItem('dotplot-cursorMode', cursorMode);
363
394
  localStorage.setItem('dotplot-wheelMode', wheelMode);
364
395
  }
365
- }));
366
- addDisposer(self, autorun(() => {
367
- const session = getSession(self);
368
- if (self.volatileWidth === undefined ||
369
- !self.assembliesInitialized) {
370
- return;
371
- }
372
- const { hview, assemblyNames, vview } = self;
373
- if (hview.displayedRegions.length &&
374
- vview.displayedRegions.length) {
375
- return;
396
+ }, { name: 'DotplotLocalStorage' }));
397
+ addDisposer(self, autorun(function dotplotRegionsAutorun() {
398
+ void self.assemblyNames.slice();
399
+ if (self.volatileWidth !== undefined &&
400
+ self.assembliesInitialized) {
401
+ self.initializeDisplayedRegions();
376
402
  }
377
- transaction(() => {
378
- var _a, _b;
379
- hview.setDisplayedRegions(((_a = session.assemblyManager.get(assemblyNames[0])) === null || _a === void 0 ? void 0 : _a.regions) || []);
380
- vview.setDisplayedRegions(((_b = session.assemblyManager.get(assemblyNames[1])) === null || _b === void 0 ? void 0 : _b.regions) || []);
381
- self.showAllRegions();
382
- });
383
- }, { delay: 1000 }));
384
- addDisposer(self, autorun(function borderSetter() {
403
+ }, { delay: 1000, name: 'DotplotRegions' }));
404
+ addDisposer(self, autorun(function dotplotBorderAutorun() {
385
405
  if (self.volatileWidth === undefined) {
386
406
  return;
387
407
  }
388
408
  const { borderX, borderY } = self.calculateBorders();
389
409
  self.setBorderX(borderX);
390
410
  self.setBorderY(borderY);
391
- }));
411
+ }, { name: 'DotplotBorder' }));
392
412
  },
393
413
  squareView() {
394
414
  const { hview, vview } = self;
@@ -456,6 +476,25 @@ export default function stateModelFactory(pm) {
456
476
  get error() {
457
477
  return self.volatileError || self.assemblyErrors;
458
478
  },
459
- }));
479
+ }))
480
+ .postProcessSnapshot(snap => {
481
+ if (!snap) {
482
+ return snap;
483
+ }
484
+ const { init, height, borderSize, tickSize, vtextRotation, htextRotation, fontSize, trackSelectorType, drawCigar, assemblyNames, viewTrackConfigs, ...rest } = snap;
485
+ return {
486
+ ...rest,
487
+ ...(height !== defaultHeight ? { height } : {}),
488
+ ...(borderSize !== defaultBorderSize ? { borderSize } : {}),
489
+ ...(tickSize !== defaultTickSize ? { tickSize } : {}),
490
+ ...(vtextRotation ? { vtextRotation } : {}),
491
+ ...(htextRotation !== defaultHtextRotation ? { htextRotation } : {}),
492
+ ...(fontSize !== defaultFontSize ? { fontSize } : {}),
493
+ ...(trackSelectorType !== 'hierarchical' ? { trackSelectorType } : {}),
494
+ ...(!drawCigar ? { drawCigar } : {}),
495
+ ...(assemblyNames.length ? { assemblyNames } : {}),
496
+ ...(viewTrackConfigs.length ? { viewTrackConfigs } : {}),
497
+ };
498
+ });
460
499
  }
461
- export { Dotplot1DView } from './1dview';
500
+ export { Dotplot1DView } from "./1dview.js";
@@ -1,2 +1,2 @@
1
- import type { DotplotViewModel, ExportSvgOptions } from '../model';
1
+ import type { DotplotViewModel, ExportSvgOptions } from '../model.ts';
2
2
  export declare function renderToSvg(model: DotplotViewModel, opts: ExportSvgOptions): Promise<string>;
@@ -3,15 +3,14 @@ import { createJBrowseTheme } from '@jbrowse/core/ui';
3
3
  import { getSession, renderToStaticMarkup } from '@jbrowse/core/util';
4
4
  import { ThemeProvider } from '@mui/material';
5
5
  import { when } from 'mobx';
6
- import SVGBackground from './SVGBackground';
7
- import { HorizontalAxisRaw, VerticalAxisRaw } from '../components/Axes';
8
- import { GridRaw } from '../components/Grid';
6
+ import SVGBackground from "./SVGBackground.js";
7
+ import { HorizontalAxisRaw, VerticalAxisRaw } from "../components/Axes.js";
8
+ import DotplotGrid from "../components/DotplotGrid.js";
9
9
  export async function renderToSvg(model, opts) {
10
- var _a;
11
10
  await when(() => model.initialized);
12
11
  const { themeName = 'default', Wrapper = ({ children }) => children } = opts;
13
12
  const session = getSession(model);
14
- const theme = (_a = session.allThemes) === null || _a === void 0 ? void 0 : _a.call(session)[themeName];
13
+ const theme = session.allThemes?.()[themeName];
15
14
  const { width, borderX, viewWidth, viewHeight, tracks, height } = model;
16
15
  const shift = 50;
17
16
  const displayResults = await Promise.all(tracks.map(async (track) => {
@@ -20,5 +19,5 @@ export async function renderToSvg(model, opts) {
20
19
  return { track, result: await display.renderSvg({ ...opts, theme }) };
21
20
  }));
22
21
  const w = width + shift * 2;
23
- return renderToStaticMarkup(_jsx(ThemeProvider, { theme: createJBrowseTheme(theme), children: _jsx(Wrapper, { children: _jsxs("svg", { width: width, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w, height].toString(), children: [_jsx(SVGBackground, { width: w, height: height }), _jsx(VerticalAxisRaw, { model: model }), _jsxs("g", { transform: `translate(${borderX} 0)`, children: [_jsx(GridRaw, { model: model }), _jsx("defs", { children: _jsx("clipPath", { id: "clip-ruler", children: _jsx("rect", { x: 0, y: 0, width: viewWidth, height: viewHeight }) }) }), _jsx("g", { clipPath: "url(#clip-ruler)", children: displayResults.map(({ result }, i) => (_jsx("g", { children: result }, i))) })] }), _jsx("g", { transform: `translate(${borderX} ${viewHeight})`, children: _jsx(HorizontalAxisRaw, { model: model }) })] }) }) }));
22
+ return renderToStaticMarkup(_jsx(ThemeProvider, { theme: createJBrowseTheme(theme), children: _jsx(Wrapper, { children: _jsxs("svg", { width: width, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w, height].toString(), children: [_jsx(SVGBackground, { width: w, height: height }), _jsx(VerticalAxisRaw, { model: model }), _jsxs("g", { transform: `translate(${borderX} 0)`, children: [_jsx(DotplotGrid, { model: model }), _jsx("defs", { children: _jsx("clipPath", { id: "clip-ruler", children: _jsx("rect", { x: 0, y: 0, width: viewWidth, height: viewHeight }) }) }), _jsx("g", { clipPath: "url(#clip-ruler)", children: displayResults.map(({ result }, i) => (_jsx("g", { children: result }, i))) })] }), _jsx("g", { transform: `translate(${borderX} ${viewHeight})`, children: _jsx(HorizontalAxisRaw, { model: model }) })] }) }) }));
24
23
  }
@@ -1,5 +1,5 @@
1
1
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import type { SnapshotIn } from 'mobx-state-tree';
2
+ import type { SnapshotIn } from '@jbrowse/mobx-state-tree';
3
3
  export type Conf = SnapshotIn<AnyConfigurationModel>;
4
4
  export type ImportFormSyntenyTrack = {
5
5
  type: 'preConfigured';
@@ -10,3 +10,9 @@ export type ImportFormSyntenyTrack = {
10
10
  } | {
11
11
  type: 'none';
12
12
  };
13
+ export interface DotplotViewInit {
14
+ views: {
15
+ assembly: string;
16
+ }[];
17
+ tracks?: string[];
18
+ }
@@ -1,40 +1,10 @@
1
- import { transaction } from 'mobx';
2
1
  export default function LaunchDotplotView(pluginManager) {
3
2
  pluginManager.addToExtensionPoint('LaunchView-DotplotView', async ({ session, views, tracks = [], }) => {
4
- try {
5
- const model = session.addView('DotplotView', {});
6
- const assemblyNames = views.map(view => view.assembly);
7
- transaction(() => {
8
- model.setViews([
9
- { bpPerPx: 0.1, offsetPx: 0 },
10
- { bpPerPx: 0.1, offsetPx: 0 },
11
- ]);
12
- model.setAssemblyNames(assemblyNames[0], assemblyNames[1]);
13
- });
14
- const idsNotFound = [];
15
- for (const track of tracks) {
16
- tryTrack(model, track, idsNotFound);
17
- }
18
- if (idsNotFound.length) {
19
- throw new Error(`Could not resolve identifiers: ${idsNotFound.join(',')}`);
20
- }
21
- }
22
- catch (e) {
23
- session.notifyError(`${e}`, e);
24
- throw e;
25
- }
3
+ session.addView('DotplotView', {
4
+ init: {
5
+ views: views.map(v => ({ assembly: v.assembly })),
6
+ tracks,
7
+ },
8
+ });
26
9
  });
27
10
  }
28
- function tryTrack(model, trackId, idsNotFound) {
29
- try {
30
- model.showTrack(trackId);
31
- }
32
- catch (e) {
33
- if (/Could not resolve identifier/.exec(`${e}`)) {
34
- idsNotFound.push(trackId);
35
- }
36
- else {
37
- throw e;
38
- }
39
- }
40
- }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
4
  import { observer } from 'mobx-react';
4
- import { makeStyles } from 'tss-react/mui';
5
5
  const useStyles = makeStyles()(theme => {
6
6
  const bg = theme.palette.action.disabledBackground;
7
7
  return {
@@ -11,10 +11,6 @@ const useStyles = makeStyles()(theme => {
11
11
  backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${bg} 5px, ${bg} 10px)`,
12
12
  textAlign: 'center',
13
13
  },
14
- blockMessage: {
15
- backgroundColor: bg,
16
- padding: '10px',
17
- },
18
14
  };
19
15
  });
20
16
  function LoadingMessage() {
@@ -28,7 +24,7 @@ function BlockMessage({ messageText }) {
28
24
  function BlockError({ error }) {
29
25
  return _jsx(ErrorMessage, { error: error });
30
26
  }
31
- const ServerSideRenderedDotplotContent = observer(function ({ model, style, }) {
27
+ const ServerSideRenderedDotplotContent = observer(function ServerSideRenderedDotplotContent({ model, style, }) {
32
28
  if (model.error) {
33
29
  return _jsx(BlockError, { error: model.error, "data-testid": "reload_button" });
34
30
  }
@@ -7,7 +7,7 @@ interface ModelType {
7
7
  highResolutionScaling?: number;
8
8
  };
9
9
  }
10
- declare const ServerSideSyntenyRendering: ({ model, }: {
10
+ declare const ServerSideSyntenyRendering: ({ model }: {
11
11
  model: ModelType;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
13
  export default ServerSideSyntenyRendering;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { drawImageOntoCanvasContext } from '@jbrowse/core/util/offscreenCanvasPonyfill';
4
4
  import { observer } from 'mobx-react';
5
- const ServerSideSyntenyRendering = observer(function ({ model, }) {
5
+ const ServerSideSyntenyRendering = observer(function ServerSideSyntenyRendering({ model }) {
6
6
  const { imageData, style, renderProps } = model;
7
7
  const { width, height, highResolutionScaling = 1 } = renderProps;
8
8
  const featureCanvas = useRef(null);
package/esm/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
2
  import type PluginManager from '@jbrowse/core/PluginManager';
3
+ export type { DotplotImportFormSyntenyOption } from './DotplotView/components/ImportForm/TrackSelector';
3
4
  export default class DotplotPlugin extends Plugin {
4
5
  name: string;
5
6
  install(pluginManager: PluginManager): void;
package/esm/index.js CHANGED
@@ -1,18 +1,15 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
2
  import { isAbstractMenuManager } from '@jbrowse/core/util';
3
3
  import TimelineIcon from '@mui/icons-material/Timeline';
4
- import ComparativeRenderer from './ComparativeRenderer';
5
- import DiagonalizeDotplotRpc from './DiagonalizeDotplotRpc';
6
- import DotplotDisplayF from './DotplotDisplay';
7
- import DotplotReadVsRefMenuItem from './DotplotReadVsRef';
8
- import DotplotRendererF from './DotplotRenderer';
9
- import DotplotViewF from './DotplotView';
10
- import LaunchDotplotViewF from './LaunchDotplotView';
4
+ import ComparativeRenderer from "./ComparativeRenderer/index.js";
5
+ import DiagonalizeDotplotRpc from "./DiagonalizeDotplotRpc.js";
6
+ import DotplotDisplayF from "./DotplotDisplay/index.js";
7
+ import DotplotReadVsRefMenuItem from "./DotplotReadVsRef/index.js";
8
+ import DotplotRendererF from "./DotplotRenderer/index.js";
9
+ import DotplotViewF from "./DotplotView/index.js";
10
+ import LaunchDotplotViewF from "./LaunchDotplotView.js";
11
11
  export default class DotplotPlugin extends Plugin {
12
- constructor() {
13
- super(...arguments);
14
- this.name = 'DotplotPlugin';
15
- }
12
+ name = 'DotplotPlugin';
16
13
  install(pluginManager) {
17
14
  DotplotViewF(pluginManager);
18
15
  DotplotDisplayF(pluginManager);
package/esm/util.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Feature } from '@jbrowse/core/util';
2
2
  export interface ReducedFeature {
3
3
  refName: string;
4
4
  start: number;
5
- clipPos: number;
5
+ clipLengthAtStartOfRead: number;
6
6
  end: number;
7
7
  seqLength: number;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-dotplot-view",
3
- "version": "3.7.0",
3
+ "version": "4.0.1",
4
4
  "description": "JBrowse 2 dotplot view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -15,49 +15,42 @@
15
15
  "directory": "plugins/dotplot-view"
16
16
  },
17
17
  "author": "JBrowse Team",
18
- "distMain": "dist/index.js",
19
- "srcMain": "src/index.ts",
20
- "main": "dist/index.js",
18
+ "main": "esm/index.js",
21
19
  "files": [
22
- "dist",
23
20
  "esm"
24
21
  ],
25
- "scripts": {
26
- "build": "npm-run-all build:*",
27
- "test": "cd ../..; jest --passWithNoTests plugins/dotplot-view",
28
- "prepublishOnly": "yarn test",
29
- "prepack": "yarn build && yarn useDist",
30
- "postpack": "yarn useSrc",
31
- "useDist": "node ../../scripts/useDist.js",
32
- "useSrc": "node ../../scripts/useSrc.js",
33
- "prebuild": "npm run clean",
34
- "build:esm": "tsc --build tsconfig.build.esm.json",
35
- "build:commonjs": "tsc --build tsconfig.build.commonjs.json",
36
- "clean": "rimraf dist esm *.tsbuildinfo"
37
- },
38
22
  "dependencies": {
39
- "@jbrowse/core": "^3.7.0",
40
- "@jbrowse/plugin-alignments": "^3.7.0",
41
- "@mui/icons-material": "^7.0.0",
42
- "@mui/material": "^7.0.0",
43
- "@mui/x-data-grid": "^8.0.0",
44
- "@types/file-saver": "^2.0.1",
45
- "file-saver": "^2.0.0",
46
- "mobx": "^6.0.0",
47
- "mobx-react": "^9.0.0",
48
- "mobx-state-tree": "^5.0.0",
49
- "rxjs": "^7.0.0",
50
- "tss-react": "^4.0.0"
23
+ "@jbrowse/mobx-state-tree": "^5.5.0",
24
+ "@mui/icons-material": "^7.3.6",
25
+ "@mui/material": "^7.3.6",
26
+ "@mui/x-data-grid": "^8.23.0",
27
+ "@types/file-saver-es": "^2.0.3",
28
+ "file-saver-es": "^2.0.5",
29
+ "mobx": "^6.15.0",
30
+ "mobx-react": "^9.2.1",
31
+ "@jbrowse/core": "^4.0.1",
32
+ "@jbrowse/plugin-alignments": "^4.0.1"
51
33
  },
52
34
  "peerDependencies": {
53
35
  "react": ">=18.0.0",
54
36
  "react-dom": ">=18.0.0"
55
37
  },
56
- "distModule": "esm/index.js",
57
- "srcModule": "src/index.ts",
58
- "module": "esm/index.js",
59
38
  "publishConfig": {
60
39
  "access": "public"
61
40
  },
62
- "gitHead": "85bdd0d58286b7adbfd408146b15847676317635"
63
- }
41
+ "sideEffects": false,
42
+ "scripts": {
43
+ "build": "pnpm run /^build:/",
44
+ "test": "cd ../..; jest --passWithNoTests plugins/dotplot-view",
45
+ "prebuild": "pnpm clean",
46
+ "build:esm": "tsc -p tsconfig.build.esm.json",
47
+ "clean": "rimraf esm *.tsbuildinfo"
48
+ },
49
+ "types": "esm/index.d.ts",
50
+ "exports": {
51
+ ".": {
52
+ "types": "./esm/index.d.ts",
53
+ "import": "./esm/index.js"
54
+ }
55
+ }
56
+ }
@@ -1,22 +0,0 @@
1
- import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
2
- import type { RenderArgs as ComparativeRenderArgs, RenderArgsSerialized as ComparativeRenderArgsSerialized, RenderResults, ResultsSerialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
3
- import type ComparativeRenderer from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
4
- interface RenderArgs extends ComparativeRenderArgs {
5
- adapterConfig: Record<string, unknown>;
6
- rendererType: string;
7
- }
8
- interface RenderArgsSerialized extends ComparativeRenderArgsSerialized {
9
- adapterConfig: Record<string, unknown>;
10
- rendererType: string;
11
- }
12
- export default class ComparativeRender extends RpcMethodType {
13
- name: string;
14
- renameRegionsIfNeeded(args: RenderArgs, rend: ComparativeRenderer): Promise<ComparativeRenderArgs>;
15
- getRenderer(rendererType: string): ComparativeRenderer;
16
- serializeArguments(args: RenderArgs, rpcDriver: string): Promise<ComparativeRenderArgs | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized>;
17
- execute(args: RenderArgsSerialized & {
18
- stopToken?: string;
19
- }, rpcDriver: string): Promise<RenderResults | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").ResultsSerialized>;
20
- deserializeReturn(val: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
21
- }
22
- export {};