@jbrowse/plugin-linear-comparative-view 3.7.0 → 4.0.0

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 (266) hide show
  1. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +3 -3
  2. package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +9 -9
  3. package/esm/LGVSyntenyDisplay/configSchemaF.js +1 -1
  4. package/esm/LGVSyntenyDisplay/index.js +2 -2
  5. package/esm/LGVSyntenyDisplay/model.d.ts +1179 -133
  6. package/esm/LGVSyntenyDisplay/model.js +2 -2
  7. package/esm/LaunchLinearSyntenyView.js +13 -86
  8. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
  9. package/esm/LinearComparativeDisplay/index.js +2 -2
  10. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +95 -135
  11. package/esm/LinearComparativeDisplay/stateModelFactory.js +18 -17
  12. package/esm/LinearComparativeView/components/ColorBySelector.d.ts +1 -1
  13. package/esm/LinearComparativeView/components/ColorBySelector.js +3 -4
  14. package/esm/LinearComparativeView/components/Header.d.ts +1 -1
  15. package/esm/LinearComparativeView/components/Header.js +8 -9
  16. package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -2
  17. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
  18. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +9 -8
  19. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
  20. package/esm/LinearComparativeView/components/LinearComparativeView.js +5 -5
  21. package/esm/LinearComparativeView/components/MinLengthSlider.d.ts +1 -1
  22. package/esm/LinearComparativeView/components/MinLengthSlider.js +7 -7
  23. package/esm/LinearComparativeView/components/OpacitySlider.d.ts +1 -1
  24. package/esm/LinearComparativeView/components/OpacitySlider.js +5 -6
  25. package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
  26. package/esm/LinearComparativeView/components/Rubberband.js +5 -5
  27. package/esm/LinearComparativeView/components/RubberbandSpan.js +3 -5
  28. package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
  29. package/esm/LinearComparativeView/components/VerticalGuide.js +2 -2
  30. package/esm/LinearComparativeView/components/useRangeSelect.d.ts +1 -1
  31. package/esm/LinearComparativeView/components/useRangeSelect.js +1 -1
  32. package/esm/LinearComparativeView/components/util.js +1 -1
  33. package/esm/LinearComparativeView/index.js +2 -2
  34. package/esm/LinearComparativeView/model.d.ts +474 -222
  35. package/esm/LinearComparativeView/model.js +50 -29
  36. package/esm/LinearReadVsRef/LinearReadVsRef.js +8 -9
  37. package/esm/LinearReadVsRef/index.js +1 -1
  38. package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  39. package/esm/LinearSyntenyDisplay/afterAttach.js +10 -11
  40. package/esm/LinearSyntenyDisplay/components/BlockError.js +1 -1
  41. package/esm/LinearSyntenyDisplay/components/BlockMessage.js +6 -15
  42. package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
  43. package/esm/LinearSyntenyDisplay/components/Component.js +5 -5
  44. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
  45. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +10 -14
  46. package/esm/LinearSyntenyDisplay/components/LoadingMessage.js +1 -1
  47. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -1
  48. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +8 -33
  49. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -1
  50. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
  51. package/esm/LinearSyntenyDisplay/components/util.d.ts +2 -2
  52. package/esm/LinearSyntenyDisplay/components/util.js +3 -3
  53. package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +2 -2
  54. package/esm/LinearSyntenyDisplay/configSchemaF.js +1 -1
  55. package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.d.ts +2 -0
  56. package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.js +53 -0
  57. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  58. package/esm/LinearSyntenyDisplay/drawSynteny.js +3 -5
  59. package/esm/LinearSyntenyDisplay/index.js +3 -3
  60. package/esm/LinearSyntenyDisplay/model.d.ts +97 -137
  61. package/esm/LinearSyntenyDisplay/model.js +3 -3
  62. package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +1 -1
  63. package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.js +2 -2
  64. package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
  65. package/esm/LinearSyntenyView/components/ExportSvgDialog.js +6 -2
  66. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
  67. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +4 -4
  68. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +1 -1
  69. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +4 -5
  70. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +11 -1
  71. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +8 -4
  72. package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +1 -1
  73. package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.js +26 -9
  74. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
  75. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +5 -5
  76. package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +1 -1
  77. package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +1 -2
  78. package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +1 -1
  79. package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +2 -2
  80. package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
  81. package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +2 -2
  82. package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +1 -1
  83. package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +3 -3
  84. package/esm/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
  85. package/esm/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +4 -4
  86. package/esm/LinearSyntenyView/components/ImportForm/selectors/index.js +4 -4
  87. package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
  88. package/esm/LinearSyntenyView/components/LinearSyntenyView.js +14 -4
  89. package/esm/LinearSyntenyView/index.js +2 -2
  90. package/esm/LinearSyntenyView/model.d.ts +522 -254
  91. package/esm/LinearSyntenyView/model.js +99 -15
  92. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +3 -1
  93. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -3
  94. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +2 -2
  95. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +34 -31
  96. package/esm/LinearSyntenyView/types.d.ts +10 -1
  97. package/esm/LinearSyntenyViewHelper/index.js +1 -1
  98. package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +11 -11
  99. package/esm/LinearSyntenyViewHelper/stateModelFactory.js +5 -43
  100. package/esm/SyntenyFeatureDetail/Formatter.js +2 -2
  101. package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +1 -1
  102. package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +6 -7
  103. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
  104. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +3 -3
  105. package/esm/SyntenyFeatureDetail/index.js +2 -2
  106. package/esm/SyntenyTrack/configSchema.d.ts +16 -11
  107. package/esm/SyntenyTrack/index.js +1 -1
  108. package/esm/index.d.ts +2 -0
  109. package/esm/index.js +11 -14
  110. package/esm/util.d.ts +1 -1
  111. package/esm/util.js +4 -8
  112. package/package.json +29 -35
  113. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +0 -9
  114. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -53
  115. package/dist/LGVSyntenyDisplay/components/util.d.ts +0 -14
  116. package/dist/LGVSyntenyDisplay/components/util.js +0 -100
  117. package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +0 -66
  118. package/dist/LGVSyntenyDisplay/configSchemaF.js +0 -38
  119. package/dist/LGVSyntenyDisplay/index.d.ts +0 -2
  120. package/dist/LGVSyntenyDisplay/index.js +0 -24
  121. package/dist/LGVSyntenyDisplay/model.d.ts +0 -418
  122. package/dist/LGVSyntenyDisplay/model.js +0 -118
  123. package/dist/LaunchLinearSyntenyView.d.ts +0 -2
  124. package/dist/LaunchLinearSyntenyView.js +0 -93
  125. package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -2
  126. package/dist/LinearComparativeDisplay/configSchemaF.js +0 -10
  127. package/dist/LinearComparativeDisplay/index.d.ts +0 -2
  128. package/dist/LinearComparativeDisplay/index.js +0 -24
  129. package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +0 -243
  130. package/dist/LinearComparativeDisplay/stateModelFactory.js +0 -146
  131. package/dist/LinearComparativeView/components/ColorBySelector.d.ts +0 -5
  132. package/dist/LinearComparativeView/components/ColorBySelector.js +0 -54
  133. package/dist/LinearComparativeView/components/Header.d.ts +0 -5
  134. package/dist/LinearComparativeView/components/Header.js +0 -87
  135. package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +0 -5
  136. package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +0 -24
  137. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +0 -5
  138. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +0 -46
  139. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +0 -5
  140. package/dist/LinearComparativeView/components/LinearComparativeView.js +0 -30
  141. package/dist/LinearComparativeView/components/MinLengthSlider.d.ts +0 -5
  142. package/dist/LinearComparativeView/components/MinLengthSlider.js +0 -47
  143. package/dist/LinearComparativeView/components/OpacitySlider.d.ts +0 -5
  144. package/dist/LinearComparativeView/components/OpacitySlider.js +0 -46
  145. package/dist/LinearComparativeView/components/Rubberband.d.ts +0 -7
  146. package/dist/LinearComparativeView/components/Rubberband.js +0 -32
  147. package/dist/LinearComparativeView/components/RubberbandSpan.d.ts +0 -15
  148. package/dist/LinearComparativeView/components/RubberbandSpan.js +0 -38
  149. package/dist/LinearComparativeView/components/RubberbandTooltip.d.ts +0 -5
  150. package/dist/LinearComparativeView/components/RubberbandTooltip.js +0 -20
  151. package/dist/LinearComparativeView/components/SliderTooltip.d.ts +0 -2
  152. package/dist/LinearComparativeView/components/SliderTooltip.js +0 -9
  153. package/dist/LinearComparativeView/components/VerticalGuide.d.ts +0 -7
  154. package/dist/LinearComparativeView/components/VerticalGuide.js +0 -26
  155. package/dist/LinearComparativeView/components/useRangeSelect.d.ts +0 -59
  156. package/dist/LinearComparativeView/components/useRangeSelect.js +0 -124
  157. package/dist/LinearComparativeView/components/util.d.ts +0 -4
  158. package/dist/LinearComparativeView/components/util.js +0 -6
  159. package/dist/LinearComparativeView/index.d.ts +0 -2
  160. package/dist/LinearComparativeView/index.js +0 -55
  161. package/dist/LinearComparativeView/model.d.ts +0 -606
  162. package/dist/LinearComparativeView/model.js +0 -238
  163. package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +0 -6
  164. package/dist/LinearReadVsRef/LinearReadVsRef.js +0 -241
  165. package/dist/LinearReadVsRef/index.d.ts +0 -2
  166. package/dist/LinearReadVsRef/index.js +0 -86
  167. package/dist/LinearSyntenyDisplay/afterAttach.d.ts +0 -2
  168. package/dist/LinearSyntenyDisplay/afterAttach.js +0 -104
  169. package/dist/LinearSyntenyDisplay/components/BlockError.d.ts +0 -3
  170. package/dist/LinearSyntenyDisplay/components/BlockError.js +0 -16
  171. package/dist/LinearSyntenyDisplay/components/BlockMessage.d.ts +0 -3
  172. package/dist/LinearSyntenyDisplay/components/BlockMessage.js +0 -24
  173. package/dist/LinearSyntenyDisplay/components/Component.d.ts +0 -5
  174. package/dist/LinearSyntenyDisplay/components/Component.js +0 -26
  175. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +0 -5
  176. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +0 -223
  177. package/dist/LinearSyntenyDisplay/components/LoadingMessage.d.ts +0 -3
  178. package/dist/LinearSyntenyDisplay/components/LoadingMessage.js +0 -21
  179. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +0 -15
  180. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +0 -56
  181. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +0 -4
  182. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +0 -13
  183. package/dist/LinearSyntenyDisplay/components/util.d.ts +0 -45
  184. package/dist/LinearSyntenyDisplay/components/util.js +0 -199
  185. package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +0 -12
  186. package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -23
  187. package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +0 -6
  188. package/dist/LinearSyntenyDisplay/drawSynteny.js +0 -470
  189. package/dist/LinearSyntenyDisplay/index.d.ts +0 -2
  190. package/dist/LinearSyntenyDisplay/index.js +0 -56
  191. package/dist/LinearSyntenyDisplay/model.d.ts +0 -291
  192. package/dist/LinearSyntenyDisplay/model.js +0 -133
  193. package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +0 -6
  194. package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.js +0 -87
  195. package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +0 -7
  196. package/dist/LinearSyntenyView/components/ExportSvgDialog.js +0 -58
  197. package/dist/LinearSyntenyView/components/Icons.d.ts +0 -3
  198. package/dist/LinearSyntenyView/components/Icons.js +0 -12
  199. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -8
  200. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -81
  201. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +0 -8
  202. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +0 -39
  203. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +0 -7
  204. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +0 -22
  205. package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +0 -11
  206. package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.js +0 -58
  207. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +0 -5
  208. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +0 -60
  209. package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +0 -5
  210. package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +0 -43
  211. package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +0 -117
  212. package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +0 -68
  213. package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +0 -3
  214. package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +0 -13
  215. package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
  216. package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +0 -13
  217. package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -19
  218. package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.js +0 -10
  219. package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +0 -3
  220. package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +0 -20
  221. package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
  222. package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
  223. package/dist/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +0 -4
  224. package/dist/LinearSyntenyView/components/ImportForm/selectors/index.js +0 -27
  225. package/dist/LinearSyntenyView/components/ImportForm/util.d.ts +0 -10
  226. package/dist/LinearSyntenyView/components/ImportForm/util.js +0 -24
  227. package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +0 -5
  228. package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -47
  229. package/dist/LinearSyntenyView/components/TextField2.d.ts +0 -2
  230. package/dist/LinearSyntenyView/components/TextField2.js +0 -8
  231. package/dist/LinearSyntenyView/index.d.ts +0 -2
  232. package/dist/LinearSyntenyView/index.js +0 -52
  233. package/dist/LinearSyntenyView/model.d.ts +0 -702
  234. package/dist/LinearSyntenyView/model.js +0 -240
  235. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +0 -5
  236. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +0 -10
  237. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +0 -11
  238. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +0 -11
  239. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +0 -3
  240. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +0 -80
  241. package/dist/LinearSyntenyView/types.d.ts +0 -29
  242. package/dist/LinearSyntenyView/types.js +0 -2
  243. package/dist/LinearSyntenyView/util/diagonalize.d.ts +0 -27
  244. package/dist/LinearSyntenyView/util/diagonalize.js +0 -91
  245. package/dist/LinearSyntenyViewHelper/index.d.ts +0 -2
  246. package/dist/LinearSyntenyViewHelper/index.js +0 -25
  247. package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +0 -18
  248. package/dist/LinearSyntenyViewHelper/stateModelFactory.js +0 -78
  249. package/dist/SyntenyFeatureDetail/Formatter.d.ts +0 -3
  250. package/dist/SyntenyFeatureDetail/Formatter.js +0 -23
  251. package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +0 -7
  252. package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +0 -87
  253. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +0 -5
  254. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +0 -19
  255. package/dist/SyntenyFeatureDetail/index.d.ts +0 -2
  256. package/dist/SyntenyFeatureDetail/index.js +0 -60
  257. package/dist/SyntenyFeatureDetail/types.d.ts +0 -9
  258. package/dist/SyntenyFeatureDetail/types.js +0 -2
  259. package/dist/SyntenyTrack/configSchema.d.ts +0 -80
  260. package/dist/SyntenyTrack/configSchema.js +0 -9
  261. package/dist/SyntenyTrack/index.d.ts +0 -2
  262. package/dist/SyntenyTrack/index.js +0 -19
  263. package/dist/index.d.ts +0 -7
  264. package/dist/index.js +0 -48
  265. package/dist/util.d.ts +0 -25
  266. package/dist/util.js +0 -67
@@ -1,240 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.default = stateModelFactory;
40
- const react_1 = require("react");
41
- const util_1 = require("@jbrowse/core/util");
42
- const CropFree_1 = __importDefault(require("@mui/icons-material/CropFree"));
43
- const Link_1 = __importDefault(require("@mui/icons-material/Link"));
44
- const PhotoCamera_1 = __importDefault(require("@mui/icons-material/PhotoCamera"));
45
- const Shuffle_1 = __importDefault(require("@mui/icons-material/Shuffle"));
46
- const Visibility_1 = __importDefault(require("@mui/icons-material/Visibility"));
47
- const file_saver_1 = require("file-saver");
48
- const mobx_1 = require("mobx");
49
- const mobx_state_tree_1 = require("mobx-state-tree");
50
- const Icons_1 = require("./components/Icons");
51
- const model_1 = __importDefault(require("../LinearComparativeView/model"));
52
- const ExportSvgDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ExportSvgDialog'))));
53
- const DiagonalizationProgressDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/DiagonalizationProgressDialog'))));
54
- function stateModelFactory(pluginManager) {
55
- return mobx_state_tree_1.types
56
- .compose('LinearSyntenyView', (0, model_1.default)(pluginManager), mobx_state_tree_1.types.model({
57
- type: mobx_state_tree_1.types.literal('LinearSyntenyView'),
58
- drawCIGAR: true,
59
- drawCIGARMatchesOnly: false,
60
- drawCurves: false,
61
- drawLocationMarkers: false,
62
- }))
63
- .volatile(() => ({
64
- importFormSyntenyTrackSelections: mobx_1.observable.array(),
65
- }))
66
- .actions(self => ({
67
- importFormRemoveRow(idx) {
68
- self.importFormSyntenyTrackSelections.splice(idx, 1);
69
- },
70
- clearImportFormSyntenyTracks() {
71
- self.importFormSyntenyTrackSelections.clear();
72
- },
73
- setImportFormSyntenyTrack(arg, val) {
74
- self.importFormSyntenyTrackSelections[arg] = val;
75
- },
76
- setDrawCurves(arg) {
77
- self.drawCurves = arg;
78
- },
79
- setDrawCIGAR(arg) {
80
- self.drawCIGAR = arg;
81
- },
82
- setDrawCIGARMatchesOnly(arg) {
83
- self.drawCIGARMatchesOnly = arg;
84
- },
85
- setDrawLocationMarkers(arg) {
86
- self.drawLocationMarkers = arg;
87
- },
88
- showAllRegions() {
89
- (0, mobx_1.transaction)(() => {
90
- for (const view of self.views) {
91
- view.showAllRegionsInAssembly();
92
- }
93
- });
94
- },
95
- }))
96
- .actions(self => ({
97
- async exportSvg(opts) {
98
- const { renderToSvg } = await Promise.resolve().then(() => __importStar(require('./svgcomponents/SVGLinearSyntenyView')));
99
- const html = await renderToSvg(self, opts);
100
- const blob = new Blob([html], { type: 'image/svg+xml' });
101
- (0, file_saver_1.saveAs)(blob, opts.filename || 'image.svg');
102
- },
103
- }))
104
- .views(self => {
105
- const superHeaderMenuItems = self.headerMenuItems;
106
- const superMenuItems = self.menuItems;
107
- return {
108
- headerMenuItems() {
109
- return [
110
- ...superHeaderMenuItems(),
111
- {
112
- label: 'Square view',
113
- onClick: self.squareView,
114
- description: 'Makes both views use the same zoom level, adjusting to the average of each',
115
- icon: CropFree_1.default,
116
- helpText: 'Square view synchronizes the zoom levels of both genome views by calculating the average zoom level and applying it to both panels. This helps ensure features are displayed at comparable scales, making it easier to compare syntenic regions visually.',
117
- },
118
- {
119
- label: 'Show all regions',
120
- onClick: self.showAllRegions,
121
- description: 'Show entire genome assemblies',
122
- icon: Visibility_1.default,
123
- helpText: 'This command will zoom out all views to display the entire genome assemblies. This is useful when you want to get a high-level overview of syntenic relationships across whole genomes or when you need to reset the view after zooming into specific regions.',
124
- },
125
- {
126
- label: 'Re-order chromosomes',
127
- onClick: () => {
128
- (0, util_1.getSession)(self).queueDialog(handleClose => [
129
- DiagonalizationProgressDialog,
130
- {
131
- handleClose,
132
- model: self,
133
- },
134
- ]);
135
- },
136
- icon: Shuffle_1.default,
137
- description: "Reorder and reorient query regions to minimize crossing lines, also known as 'diagonalizing'",
138
- helpText: "This operation 'diagonalizes' the data which algorithmically reorders and reorients chromosomes to minimize crossing synteny lines, creating a more diagonal pattern. This makes it easier to identify large-scale genomic rearrangements, inversions, and translocations. The process may take a few moments for large genomes.",
139
- },
140
- {
141
- label: 'Show dynamic controls',
142
- type: 'checkbox',
143
- checked: self.showDynamicControls,
144
- onClick: () => {
145
- self.setShowDynamicControls(!self.showDynamicControls);
146
- },
147
- helpText: 'Toggle visibility of dynamic controls like opacity and minimum length sliders. These controls allow you to adjust synteny visualization parameters in real-time.',
148
- },
149
- {
150
- label: 'Draw',
151
- subMenu: [
152
- {
153
- label: 'Draw CIGAR',
154
- checked: self.drawCIGAR,
155
- type: 'checkbox',
156
- description: 'If disabled, only draws the broad scale CIGAR match',
157
- onClick: () => {
158
- self.setDrawCIGAR(!self.drawCIGAR);
159
- },
160
- helpText: 'CIGAR strings encode detailed alignment information including matches, insertions, and deletions. When enabled, this option visualizes the fine-scale variations in syntenic alignments. Disable this for a cleaner view that shows only broad syntenic blocks.',
161
- },
162
- {
163
- label: 'Draw only CIGAR matches',
164
- checked: self.drawCIGARMatchesOnly,
165
- type: 'checkbox',
166
- description: 'If enabled, it hides the insertions and deletions in the CIGAR strings, helps with divergent',
167
- onClick: () => {
168
- self.setDrawCIGARMatchesOnly(!self.drawCIGARMatchesOnly);
169
- },
170
- helpText: 'When comparing divergent genomes, showing all insertions and deletions can clutter the view. This option filters the CIGAR visualization to show only the matching regions, providing a cleaner view of conserved syntenic blocks while hiding small-scale indels.',
171
- },
172
- {
173
- label: 'Draw curved lines',
174
- type: 'checkbox',
175
- checked: self.drawCurves,
176
- icon: Icons_1.Curves,
177
- onClick: () => {
178
- self.setDrawCurves(!self.drawCurves);
179
- },
180
- helpText: 'Toggle between straight lines and smooth bezier curves for synteny connections. Curved lines can make the visualization more aesthetically pleasing and may help reduce visual clutter when many syntenic regions are displayed. Straight lines provide a more direct representation.',
181
- },
182
- {
183
- label: 'Draw location markers',
184
- type: 'checkbox',
185
- checked: self.drawLocationMarkers,
186
- description: 'Draw periodic markers to show location within large matches',
187
- onClick: () => {
188
- self.setDrawLocationMarkers(!self.drawLocationMarkers);
189
- },
190
- helpText: 'Location markers add periodic visual indicators along long syntenic blocks, helping you track position and scale within large conserved regions. This is particularly useful when examining very long syntenic matches where it can be difficult to gauge relative position.',
191
- },
192
- ],
193
- },
194
- {
195
- label: 'Link views',
196
- type: 'checkbox',
197
- checked: self.linkViews,
198
- icon: Link_1.default,
199
- onClick: () => {
200
- self.setLinkViews(!self.linkViews);
201
- },
202
- helpText: 'When linked, panning and zooming in one genome view will automatically adjust the other view to maintain the correspondence shown by synteny lines. This makes it easier to explore syntenic regions interactively. Unlink views to navigate each genome independently.',
203
- },
204
- {
205
- label: 'Export SVG',
206
- icon: PhotoCamera_1.default,
207
- onClick: () => {
208
- (0, util_1.getSession)(self).queueDialog(handleClose => [
209
- ExportSvgDialog,
210
- {
211
- model: self,
212
- handleClose,
213
- },
214
- ]);
215
- },
216
- helpText: 'Export the current synteny view as a scalable vector graphics (SVG) file. SVG format preserves quality at any zoom level and can be edited in vector graphics software like Inkscape or Adobe Illustrator. Perfect for creating publication-quality figures.',
217
- },
218
- ];
219
- },
220
- menuItems() {
221
- return [
222
- ...superMenuItems(),
223
- {
224
- label: 'Export SVG',
225
- icon: PhotoCamera_1.default,
226
- onClick: () => {
227
- (0, util_1.getSession)(self).queueDialog(handleClose => [
228
- ExportSvgDialog,
229
- {
230
- model: self,
231
- handleClose,
232
- },
233
- ]);
234
- },
235
- },
236
- ];
237
- },
238
- };
239
- });
240
- }
@@ -1,5 +0,0 @@
1
- export default function SVGBackground({ width, height, shift, }: {
2
- width: number;
3
- height: number;
4
- shift: number;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = SVGBackground;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const util_1 = require("@jbrowse/core/util");
6
- const material_1 = require("@mui/material");
7
- function SVGBackground({ width, height, shift, }) {
8
- const theme = (0, material_1.useTheme)();
9
- return ((0, jsx_runtime_1.jsx)("rect", { width: width + shift * 2, height: height, fill: (0, util_1.stripAlpha)(theme.palette.background.default) }));
10
- }
@@ -1,11 +0,0 @@
1
- import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
2
- export default function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHeight, trackLabels, view, displayResults, rulerHeight, shift, }: {
3
- textHeight: number;
4
- trackLabels: string;
5
- trackLabelOffset: number;
6
- fontSize: number;
7
- view: LinearGenomeViewModel;
8
- displayResults: any;
9
- rulerHeight: number;
10
- shift: number;
11
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = SVGLinearGenomeView;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const util_1 = require("@jbrowse/core/util");
6
- const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
7
- const material_1 = require("@mui/material");
8
- function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHeight, trackLabels, view, displayResults, rulerHeight, shift, }) {
9
- const theme = (0, material_1.useTheme)();
10
- return ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(${shift} ${fontSize})`, children: [(0, jsx_runtime_1.jsxs)("g", { transform: `translate(${trackLabelOffset})`, children: [(0, jsx_runtime_1.jsx)("text", { x: 0, fontSize: fontSize, ...(0, util_1.getFillProps)(theme.palette.text.primary), children: view.assemblyNames.join(', ') }), (0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.SVGRuler, { model: displayResults.view, fontSize: fontSize })] }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${rulerHeight + fontSize})`, children: (0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.SVGTracks, { textHeight: textHeight, trackLabels: trackLabels, fontSize: fontSize, model: displayResults.view, displayResults: displayResults.data, trackLabelOffset: trackLabelOffset }) })] }));
11
- }
@@ -1,3 +0,0 @@
1
- import type { LinearSyntenyViewModel } from '../model';
2
- import type { ExportSvgOptions } from '../types';
3
- export declare function renderToSvg(model: LinearSyntenyViewModel, opts: ExportSvgOptions): Promise<string>;
@@ -1,80 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.renderToSvg = renderToSvg;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const ui_1 = require("@jbrowse/core/ui");
9
- const util_1 = require("@jbrowse/core/util");
10
- const tracks_1 = require("@jbrowse/core/util/tracks");
11
- const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
12
- const material_1 = require("@mui/material");
13
- const mobx_1 = require("mobx");
14
- const SVGBackground_1 = __importDefault(require("./SVGBackground"));
15
- const SVGLinearGenomeView_1 = __importDefault(require("./SVGLinearGenomeView"));
16
- const drawSynteny_1 = require("../../LinearSyntenyDisplay/drawSynteny");
17
- async function renderToSvg(model, opts) {
18
- var _a;
19
- await (0, mobx_1.when)(() => model.initialized);
20
- const { textHeight = 18, rulerHeight = 30, fontSize = 13, trackLabels = 'offset', Wrapper = ({ children }) => children, themeName = 'default', } = opts;
21
- const session = (0, util_1.getSession)(model);
22
- const themeVar = (_a = session.allThemes) === null || _a === void 0 ? void 0 : _a.call(session)[themeName];
23
- const { width, views, levels } = model;
24
- const shift = 50;
25
- const offset = rulerHeight;
26
- const heights = views.map(v => (0, plugin_linear_genome_view_1.totalHeight)(v.tracks, textHeight, trackLabels) + offset);
27
- const totalHeightSvg = (0, util_1.sum)(heights) + (0, util_1.sum)(levels.map(l => l.height)) + 100;
28
- const displayResults = await Promise.all(views.map(async (view) => ({
29
- view,
30
- data: await Promise.all(view.tracks.map(async (track) => {
31
- const d = track.displays[0];
32
- await (0, mobx_1.when)(() => (d.ready !== undefined ? d.ready : true));
33
- return {
34
- track,
35
- result: await d.renderSvg({ ...opts, theme: themeVar }),
36
- };
37
- })),
38
- })));
39
- const renderings = await Promise.all(levels.map(async (level) => await Promise.all(level.tracks.map(async (track) => {
40
- const d = track.displays[0];
41
- await (0, mobx_1.when)(() => (d.ready !== undefined ? d.ready : true));
42
- const r = await (0, util_1.renderToAbstractCanvas)(width, level.height, { exportSVG: opts }, ctx => {
43
- (0, drawSynteny_1.drawRef)(d, ctx);
44
- return undefined;
45
- });
46
- if ('imageData' in r) {
47
- throw new Error('found a canvas in svg export, probably a bug');
48
- }
49
- else if ('canvasRecordedData' in r) {
50
- return {
51
- html: await (0, util_1.getSerializedSvg)({
52
- ...r,
53
- width,
54
- height: level.height,
55
- }),
56
- };
57
- }
58
- else {
59
- return r;
60
- }
61
- }))));
62
- const trackLabelMaxLen = (0, util_1.max)(views.flatMap(view => view.tracks.map(track => (0, util_1.measureText)((0, tracks_1.getTrackName)(track.configuration, session), fontSize))), 0) + 40;
63
- const trackLabelOffset = trackLabels === 'left' ? trackLabelMaxLen : 0;
64
- const w = width + trackLabelOffset;
65
- const theme = (0, ui_1.createJBrowseTheme)(themeVar);
66
- const RenderList = [
67
- (0, jsx_runtime_1.jsx)(SVGLinearGenomeView_1.default, { rulerHeight: rulerHeight, trackLabelOffset: trackLabelOffset, shift: shift, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[0], view: views[0], fontSize: fontSize }, views[0].id),
68
- ];
69
- let currOffset = heights[0] + fontSize + rulerHeight;
70
- for (let i = 1; i < views.length; i++) {
71
- const view = views[i];
72
- const level = levels[i - 1];
73
- const rendering = renderings[i - 1];
74
- const height = heights[i];
75
- const levelHeight = level.height || 0;
76
- RenderList.push((0, jsx_runtime_1.jsxs)("g", { transform: `translate(0 ${currOffset})`, children: [levelHeight ? ((0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `synclip-${i}`, children: (0, jsx_runtime_1.jsx)("rect", { x: 0, y: 0, width: width, height: levelHeight }) }) })) : null, (0, jsx_runtime_1.jsx)("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})`, children: rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => ((0, jsx_runtime_1.jsx)(util_1.ReactRendering, { rendering: r }, i))) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${levelHeight})`, children: (0, jsx_runtime_1.jsx)(SVGLinearGenomeView_1.default, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], view: view, fontSize: fontSize }, view.id) })] }, view.id));
77
- currOffset += height + fontSize + rulerHeight + levelHeight;
78
- }
79
- return (0, util_1.renderToStaticMarkup)((0, jsx_runtime_1.jsx)(material_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsxs)("svg", { width: width, height: totalHeightSvg, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, totalHeightSvg].toString(), children: [(0, jsx_runtime_1.jsx)(SVGBackground_1.default, { width: w, height: totalHeightSvg, shift: shift }), RenderList] }) }) }));
80
- }
@@ -1,29 +0,0 @@
1
- import type React from 'react';
2
- import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
- import type { SnapshotIn } from 'mobx-state-tree';
4
- export type Conf = SnapshotIn<AnyConfigurationModel>;
5
- export type ImportFormSyntenyTrack = {
6
- type: 'preConfigured';
7
- value: string;
8
- } | {
9
- type: 'userOpened';
10
- value: Conf;
11
- } | {
12
- type: 'none';
13
- };
14
- export interface ExportSvgOptions {
15
- rasterizeLayers?: boolean;
16
- scale?: number;
17
- filename?: string;
18
- Wrapper?: React.FC<{
19
- children: React.ReactNode;
20
- }>;
21
- fontSize?: number;
22
- rulerHeight?: number;
23
- textHeight?: number;
24
- paddingHeight?: number;
25
- headerHeight?: number;
26
- cytobandHeight?: number;
27
- themeName?: string;
28
- trackLabels?: string;
29
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,27 +0,0 @@
1
- export interface AlignmentData {
2
- queryRefName: string;
3
- refRefName: string;
4
- queryStart: number;
5
- queryEnd: number;
6
- refStart: number;
7
- refEnd: number;
8
- strand: number;
9
- }
10
- export interface Region {
11
- refName: string;
12
- start: number;
13
- end: number;
14
- reversed?: boolean;
15
- assemblyName: string;
16
- }
17
- export interface DiagonalizationResult {
18
- newRegions: Region[];
19
- stats: {
20
- totalAlignments: number;
21
- regionsProcessed: number;
22
- regionsReordered: number;
23
- regionsReversed: number;
24
- };
25
- }
26
- export type ProgressCallback = (progress: number, message: string) => void | Promise<void>;
27
- export declare function diagonalizeRegions(alignments: AlignmentData[], currentRegions: Region[], progressCallback?: ProgressCallback): Promise<DiagonalizationResult>;
@@ -1,91 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.diagonalizeRegions = diagonalizeRegions;
4
- async function diagonalizeRegions(alignments, currentRegions, progressCallback) {
5
- const updateProgress = async (progress, message) => {
6
- if (progressCallback) {
7
- await progressCallback(progress, message);
8
- }
9
- };
10
- await updateProgress(20, `Grouping ${alignments.length} alignments...`);
11
- const queryGroups = new Map();
12
- for (const aln of alignments) {
13
- const targetRefName = aln.refRefName;
14
- if (!queryGroups.has(targetRefName)) {
15
- queryGroups.set(targetRefName, {
16
- refAlignments: new Map(),
17
- strandWeightedSum: 0,
18
- });
19
- }
20
- const group = queryGroups.get(targetRefName);
21
- const alnLength = Math.abs(aln.queryEnd - aln.queryStart);
22
- if (!group.refAlignments.has(aln.queryRefName)) {
23
- group.refAlignments.set(aln.queryRefName, {
24
- bases: 0,
25
- positions: [],
26
- });
27
- }
28
- const refData = group.refAlignments.get(aln.queryRefName);
29
- refData.bases += alnLength;
30
- refData.positions.push((aln.queryStart + aln.queryEnd) / 2);
31
- const direction = aln.strand >= 0 ? 1 : -1;
32
- group.strandWeightedSum += direction * alnLength;
33
- }
34
- await updateProgress(50, 'Determining optimal ordering and orientation...');
35
- const queryOrdering = [];
36
- for (const [targetRefName, group] of queryGroups) {
37
- let bestRefName = '';
38
- let maxBases = 0;
39
- let bestPositions = [];
40
- for (const [firstViewRefName, data] of group.refAlignments) {
41
- if (data.bases > maxBases) {
42
- maxBases = data.bases;
43
- bestRefName = firstViewRefName;
44
- bestPositions = data.positions;
45
- }
46
- }
47
- const bestRefPos = bestPositions.reduce((a, b) => a + b, 0) / bestPositions.length;
48
- const shouldReverse = group.strandWeightedSum < 0;
49
- queryOrdering.push({
50
- refName: targetRefName,
51
- bestRefName,
52
- bestRefPos,
53
- shouldReverse,
54
- });
55
- }
56
- await updateProgress(70, `Sorting ${queryOrdering.length} query regions...`);
57
- queryOrdering.sort((a, b) => {
58
- if (a.bestRefName !== b.bestRefName) {
59
- return a.bestRefName.localeCompare(b.bestRefName);
60
- }
61
- return a.bestRefPos - b.bestRefPos;
62
- });
63
- await updateProgress(85, 'Building new region layout...');
64
- const newQueryRegions = [];
65
- let regionsReversed = 0;
66
- for (const { refName, shouldReverse } of queryOrdering) {
67
- const region = currentRegions.find(r => r.refName === refName);
68
- if (region) {
69
- newQueryRegions.push({
70
- ...region,
71
- reversed: shouldReverse,
72
- });
73
- if (shouldReverse !== region.reversed) {
74
- regionsReversed++;
75
- }
76
- }
77
- else {
78
- console.warn(`Could not find region for refName: ${refName}`);
79
- }
80
- }
81
- await updateProgress(100, 'Diagonalization complete!');
82
- return {
83
- newRegions: newQueryRegions,
84
- stats: {
85
- totalAlignments: alignments.length,
86
- regionsProcessed: queryOrdering.length,
87
- regionsReordered: newQueryRegions.length,
88
- regionsReversed,
89
- },
90
- };
91
- }
@@ -1,2 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- export default function LinearSyntenyViewF(pluginManager: PluginManager): void;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = LinearSyntenyViewF;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const ViewType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
9
- const stateModelFactory_1 = require("./stateModelFactory");
10
- function UnusedComponent() {
11
- return (0, jsx_runtime_1.jsx)("div", {});
12
- }
13
- function LinearSyntenyViewF(pluginManager) {
14
- pluginManager.addViewType(() => {
15
- return new ViewType_1.default({
16
- name: 'LinearSyntenyViewHelper',
17
- displayName: 'Linear synteny view (helper)',
18
- viewMetadata: {
19
- hiddenFromGUI: true,
20
- },
21
- stateModel: (0, stateModelFactory_1.linearSyntenyViewHelperModelFactory)(pluginManager),
22
- ReactComponent: UnusedComponent,
23
- });
24
- });
25
- }
@@ -1,18 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- import type { Instance } from 'mobx-state-tree';
3
- export declare function linearSyntenyViewHelperModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
4
- id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
5
- type: import("mobx-state-tree").IType<string | undefined, string, string>;
6
- tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
7
- height: import("mobx-state-tree").IType<number | undefined, number, number>;
8
- level: import("mobx-state-tree").ISimpleType<number>;
9
- }, {
10
- setHeight(n: number): number;
11
- showTrack(trackId: string, initialSnapshot?: {}): void;
12
- hideTrack(trackId: string): number;
13
- toggleTrack(trackId: string): boolean;
14
- } & {
15
- readonly assemblyNames: (string | undefined)[];
16
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
17
- export type LinearSyntenyViewHelperStateModel = ReturnType<typeof linearSyntenyViewHelperModelFactory>;
18
- export type LinearSyntenyViewHelperModel = Instance<LinearSyntenyViewHelperStateModel>;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.linearSyntenyViewHelperModelFactory = linearSyntenyViewHelperModelFactory;
4
- const mst_1 = require("@jbrowse/core/util/types/mst");
5
- const mobx_1 = require("mobx");
6
- const mobx_state_tree_1 = require("mobx-state-tree");
7
- function linearSyntenyViewHelperModelFactory(pluginManager) {
8
- return mobx_state_tree_1.types
9
- .model('LinearSyntenyViewHelper', {
10
- id: mst_1.ElementId,
11
- type: 'LinearSyntenyViewHelper',
12
- tracks: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('track', 'stateModel')),
13
- height: 100,
14
- level: mobx_state_tree_1.types.number,
15
- })
16
- .actions(self => ({
17
- setHeight(n) {
18
- self.height = n;
19
- return self.height;
20
- },
21
- showTrack(trackId, initialSnapshot = {}) {
22
- const schema = pluginManager.pluggableConfigSchemaType('track');
23
- const configuration = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
24
- if (!configuration) {
25
- throw new Error(`track not found ${trackId}`);
26
- }
27
- const trackType = pluginManager.getTrackType(configuration.type);
28
- if (!trackType) {
29
- throw new Error(`unknown track type ${configuration.type}`);
30
- }
31
- const viewType = pluginManager.getViewType(self.type);
32
- const supportedDisplays = new Set(viewType.displayTypes.map(d => d.name));
33
- const displayConf = configuration.displays.find((d) => supportedDisplays.has(d.type));
34
- if (!displayConf) {
35
- throw new Error(`could not find a compatible display for view type ${self.type}`);
36
- }
37
- self.tracks.push(trackType.stateModel.create({
38
- ...initialSnapshot,
39
- type: configuration.type,
40
- configuration,
41
- displays: [
42
- {
43
- type: displayConf.type,
44
- configuration: displayConf,
45
- },
46
- ],
47
- }));
48
- },
49
- hideTrack(trackId) {
50
- const schema = pluginManager.pluggableConfigSchemaType('track');
51
- const config = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
52
- const shownTracks = self.tracks.filter(t => t.configuration === config);
53
- (0, mobx_1.transaction)(() => {
54
- for (const t of shownTracks) {
55
- self.tracks.remove(t);
56
- }
57
- });
58
- return shownTracks.length;
59
- },
60
- toggleTrack(trackId) {
61
- const hiddenCount = this.hideTrack(trackId);
62
- if (!hiddenCount) {
63
- this.showTrack(trackId);
64
- return true;
65
- }
66
- return false;
67
- },
68
- }))
69
- .views(self => ({
70
- get assemblyNames() {
71
- const p = (0, mobx_state_tree_1.getParent)(self, 2);
72
- return [
73
- p.views[self.level].assemblyNames[0],
74
- p.views[self.level + 1].assemblyNames[0],
75
- ];
76
- },
77
- }));
78
- }
@@ -1,3 +0,0 @@
1
- export default function Formatter({ value }: {
2
- value: unknown;
3
- }): import("react/jsx-runtime").JSX.Element;