@jbrowse/plugin-dotplot-view 3.6.5 → 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 (210) hide show
  1. package/esm/ComparativeRenderer/index.d.ts +10 -10
  2. package/esm/ComparativeRenderer/index.js +4 -17
  3. package/esm/DiagonalizeDotplotRpc.d.ts +30 -0
  4. package/esm/DiagonalizeDotplotRpc.js +147 -0
  5. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -1
  6. package/esm/DotplotDisplay/index.d.ts +3 -3
  7. package/esm/DotplotDisplay/index.js +4 -4
  8. package/esm/DotplotDisplay/renderDotplotBlock.d.ts +2 -1
  9. package/esm/DotplotDisplay/renderDotplotBlock.js +9 -4
  10. package/esm/DotplotDisplay/stateModelFactory.d.ts +148 -29
  11. package/esm/DotplotDisplay/stateModelFactory.js +17 -11
  12. package/esm/DotplotReadVsRef/DotplotReadVsRef.js +5 -6
  13. package/esm/DotplotReadVsRef/index.js +1 -1
  14. package/esm/DotplotRenderer/DotplotRenderer.d.ts +30 -48
  15. package/esm/DotplotRenderer/DotplotRenderer.js +55 -22
  16. package/esm/DotplotRenderer/clamp.d.ts +7 -0
  17. package/esm/DotplotRenderer/clamp.js +58 -0
  18. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
  19. package/esm/DotplotRenderer/components/DotplotRendering.js +1 -1
  20. package/esm/DotplotRenderer/configSchema.d.ts +3 -3
  21. package/esm/DotplotRenderer/configSchema.js +1 -1
  22. package/esm/DotplotRenderer/drawDotplot.d.ts +7 -6
  23. package/esm/DotplotRenderer/drawDotplot.js +95 -100
  24. package/esm/DotplotRenderer/index.js +4 -4
  25. package/esm/DotplotView/1dview.d.ts +25 -25
  26. package/esm/DotplotView/1dview.js +16 -4
  27. package/esm/DotplotView/components/Axes.d.ts +1 -1
  28. package/esm/DotplotView/components/Axes.js +31 -41
  29. package/esm/DotplotView/components/ColorBySelector.d.ts +5 -0
  30. package/esm/DotplotView/components/ColorBySelector.js +73 -0
  31. package/esm/DotplotView/components/DiagonalizationProgressDialog.d.ts +6 -0
  32. package/esm/DotplotView/components/DiagonalizationProgressDialog.js +123 -0
  33. package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
  34. package/esm/DotplotView/components/DotplotControls.js +53 -15
  35. package/esm/DotplotView/components/DotplotGrid.d.ts +6 -0
  36. package/esm/DotplotView/components/{Grid.js → DotplotGrid.js} +19 -20
  37. package/esm/DotplotView/components/DotplotGridWrapper.d.ts +6 -0
  38. package/esm/DotplotView/components/DotplotGridWrapper.js +8 -0
  39. package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -2
  40. package/esm/DotplotView/components/DotplotTooltipClick.js +4 -4
  41. package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
  42. package/esm/DotplotView/components/DotplotTooltipMouseover.js +2 -2
  43. package/esm/DotplotView/components/DotplotTooltips.d.ts +15 -0
  44. package/esm/DotplotView/components/DotplotTooltips.js +7 -0
  45. package/esm/DotplotView/components/DotplotView.d.ts +2 -2
  46. package/esm/DotplotView/components/DotplotView.js +31 -171
  47. package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
  48. package/esm/DotplotView/components/DotplotWarnings.js +7 -7
  49. package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
  50. package/esm/DotplotView/components/Header.d.ts +1 -1
  51. package/esm/DotplotView/components/Header.js +5 -5
  52. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
  53. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +6 -5
  54. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
  55. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +2 -3
  56. package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +10 -1
  57. package/esm/DotplotView/components/ImportForm/TrackSelector.js +8 -4
  58. package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
  59. package/esm/DotplotView/components/ImportForm/index.js +4 -10
  60. package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +1 -1
  61. package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +2 -2
  62. package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
  63. package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.js +2 -2
  64. package/esm/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
  65. package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +1 -1
  66. package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +3 -3
  67. package/esm/DotplotView/components/ImportForm/selectors/index.d.ts +3 -3
  68. package/esm/DotplotView/components/ImportForm/selectors/index.js +3 -3
  69. package/esm/DotplotView/components/MinLengthSlider.d.ts +5 -0
  70. package/esm/DotplotView/components/MinLengthSlider.js +39 -0
  71. package/esm/DotplotView/components/MouseInteractionLayer.d.ts +17 -0
  72. package/esm/DotplotView/components/MouseInteractionLayer.js +14 -0
  73. package/esm/DotplotView/components/OpacitySlider.d.ts +5 -0
  74. package/esm/DotplotView/components/OpacitySlider.js +37 -0
  75. package/esm/DotplotView/components/PanButtons.d.ts +1 -1
  76. package/esm/DotplotView/components/PanButtons.js +1 -1
  77. package/esm/DotplotView/components/SelectionContextMenu.d.ts +13 -0
  78. package/esm/DotplotView/components/SelectionContextMenu.js +39 -0
  79. package/esm/DotplotView/components/SliderTooltip.d.ts +2 -0
  80. package/esm/DotplotView/components/SliderTooltip.js +6 -0
  81. package/esm/DotplotView/components/WarningDialog.js +1 -1
  82. package/esm/DotplotView/components/hooks/useCtrlKeyTracking.d.ts +1 -0
  83. package/esm/DotplotView/components/hooks/useCtrlKeyTracking.js +21 -0
  84. package/esm/DotplotView/components/hooks/useCursorMode.d.ts +7 -0
  85. package/esm/DotplotView/components/hooks/useCursorMode.js +16 -0
  86. package/esm/DotplotView/components/hooks/useMouseCoordinates.d.ts +29 -0
  87. package/esm/DotplotView/components/hooks/useMouseCoordinates.js +49 -0
  88. package/esm/DotplotView/components/hooks/useMouseMoveHandler.d.ts +6 -0
  89. package/esm/DotplotView/components/hooks/useMouseMoveHandler.js +24 -0
  90. package/esm/DotplotView/components/hooks/useMouseUpHandler.d.ts +3 -0
  91. package/esm/DotplotView/components/hooks/useMouseUpHandler.js +28 -0
  92. package/esm/DotplotView/components/hooks/useWheelHandler.d.ts +8 -0
  93. package/esm/DotplotView/components/hooks/useWheelHandler.js +44 -0
  94. package/esm/DotplotView/components/util.d.ts +1 -1
  95. package/esm/DotplotView/components/util.js +18 -8
  96. package/esm/DotplotView/index.js +2 -2
  97. package/esm/DotplotView/model.d.ts +213 -90
  98. package/esm/DotplotView/model.js +147 -93
  99. package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
  100. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -6
  101. package/esm/DotplotView/types.d.ts +7 -1
  102. package/esm/LaunchDotplotView.js +6 -36
  103. package/esm/ServerSideRenderedBlockContent.js +6 -27
  104. package/esm/ServerSideSyntenyRendering.d.ts +1 -1
  105. package/esm/ServerSideSyntenyRendering.js +1 -1
  106. package/esm/index.d.ts +1 -0
  107. package/esm/index.js +9 -10
  108. package/esm/util.d.ts +1 -1
  109. package/package.json +28 -35
  110. package/dist/ComparativeRenderer/index.d.ts +0 -22
  111. package/dist/ComparativeRenderer/index.js +0 -53
  112. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +0 -6
  113. package/dist/DotplotDisplay/components/DotplotDisplay.js +0 -18
  114. package/dist/DotplotDisplay/index.d.ts +0 -5
  115. package/dist/DotplotDisplay/index.js +0 -36
  116. package/dist/DotplotDisplay/renderDotplotBlock.d.ts +0 -11
  117. package/dist/DotplotDisplay/renderDotplotBlock.js +0 -49
  118. package/dist/DotplotDisplay/stateModelFactory.d.ts +0 -102
  119. package/dist/DotplotDisplay/stateModelFactory.js +0 -119
  120. package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +0 -3
  121. package/dist/DotplotReadVsRef/DotplotReadVsRef.js +0 -100
  122. package/dist/DotplotReadVsRef/index.d.ts +0 -2
  123. package/dist/DotplotReadVsRef/index.js +0 -41
  124. package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
  125. package/dist/DotplotRenderer/ComparativeRenderRpc.js +0 -53
  126. package/dist/DotplotRenderer/DotplotRenderer.d.ts +0 -74
  127. package/dist/DotplotRenderer/DotplotRenderer.js +0 -102
  128. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +0 -3
  129. package/dist/DotplotRenderer/components/DotplotRendering.js +0 -9
  130. package/dist/DotplotRenderer/configSchema.d.ts +0 -40
  131. package/dist/DotplotRenderer/configSchema.js +0 -57
  132. package/dist/DotplotRenderer/drawDotplot.d.ts +0 -21
  133. package/dist/DotplotRenderer/drawDotplot.js +0 -213
  134. package/dist/DotplotRenderer/index.d.ts +0 -2
  135. package/dist/DotplotRenderer/index.js +0 -17
  136. package/dist/DotplotView/1dview.d.ts +0 -199
  137. package/dist/DotplotView/1dview.js +0 -63
  138. package/dist/DotplotView/components/Axes.d.ts +0 -13
  139. package/dist/DotplotView/components/Axes.js +0 -107
  140. package/dist/DotplotView/components/CursorIcon.d.ts +0 -3
  141. package/dist/DotplotView/components/CursorIcon.js +0 -15
  142. package/dist/DotplotView/components/DotplotControls.d.ts +0 -5
  143. package/dist/DotplotView/components/DotplotControls.js +0 -115
  144. package/dist/DotplotView/components/DotplotTooltipClick.d.ts +0 -10
  145. package/dist/DotplotView/components/DotplotTooltipClick.js +0 -17
  146. package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +0 -9
  147. package/dist/DotplotView/components/DotplotTooltipMouseover.js +0 -16
  148. package/dist/DotplotView/components/DotplotView.d.ts +0 -5
  149. package/dist/DotplotView/components/DotplotView.js +0 -275
  150. package/dist/DotplotView/components/DotplotWarnings.d.ts +0 -5
  151. package/dist/DotplotView/components/DotplotWarnings.js +0 -53
  152. package/dist/DotplotView/components/ExportSvgDialog.d.ts +0 -7
  153. package/dist/DotplotView/components/ExportSvgDialog.js +0 -53
  154. package/dist/DotplotView/components/Grid.d.ts +0 -9
  155. package/dist/DotplotView/components/Grid.js +0 -47
  156. package/dist/DotplotView/components/Header.d.ts +0 -9
  157. package/dist/DotplotView/components/Header.js +0 -33
  158. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -7
  159. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -78
  160. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +0 -7
  161. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +0 -42
  162. package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +0 -7
  163. package/dist/DotplotView/components/ImportForm/TrackSelector.js +0 -23
  164. package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +0 -117
  165. package/dist/DotplotView/components/ImportForm/getAdapter.js +0 -68
  166. package/dist/DotplotView/components/ImportForm/index.d.ts +0 -5
  167. package/dist/DotplotView/components/ImportForm/index.js +0 -76
  168. package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +0 -3
  169. package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +0 -23
  170. package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
  171. package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.js +0 -13
  172. package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -23
  173. package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.js +0 -10
  174. package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
  175. package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
  176. package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +0 -3
  177. package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +0 -24
  178. package/dist/DotplotView/components/ImportForm/selectors/index.d.ts +0 -3
  179. package/dist/DotplotView/components/ImportForm/selectors/index.js +0 -12
  180. package/dist/DotplotView/components/ImportForm/util.d.ts +0 -10
  181. package/dist/DotplotView/components/ImportForm/util.js +0 -24
  182. package/dist/DotplotView/components/PanButtons.d.ts +0 -5
  183. package/dist/DotplotView/components/PanButtons.js +0 -47
  184. package/dist/DotplotView/components/WarningDialog.d.ts +0 -16
  185. package/dist/DotplotView/components/WarningDialog.js +0 -39
  186. package/dist/DotplotView/components/util.d.ts +0 -14
  187. package/dist/DotplotView/components/util.js +0 -82
  188. package/dist/DotplotView/index.d.ts +0 -2
  189. package/dist/DotplotView/index.js +0 -52
  190. package/dist/DotplotView/model.d.ts +0 -435
  191. package/dist/DotplotView/model.js +0 -487
  192. package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +0 -4
  193. package/dist/DotplotView/svgcomponents/SVGBackground.js +0 -10
  194. package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +0 -2
  195. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +0 -30
  196. package/dist/DotplotView/types.d.ts +0 -12
  197. package/dist/DotplotView/types.js +0 -2
  198. package/dist/LaunchDotplotView.d.ts +0 -2
  199. package/dist/LaunchDotplotView.js +0 -43
  200. package/dist/ServerSideRenderedBlockContent.d.ts +0 -12
  201. package/dist/ServerSideRenderedBlockContent.js +0 -65
  202. package/dist/ServerSideSyntenyRendering.d.ts +0 -13
  203. package/dist/ServerSideSyntenyRendering.js +0 -23
  204. package/dist/index.d.ts +0 -7
  205. package/dist/index.js +0 -40
  206. package/dist/util.d.ts +0 -9
  207. package/dist/util.js +0 -7
  208. package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
  209. package/esm/DotplotRenderer/ComparativeRenderRpc.js +0 -47
  210. package/esm/DotplotView/components/Grid.d.ts +0 -9
@@ -1,23 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const react_1 = require("react");
8
- const material_1 = require("@mui/material");
9
- const mobx_react_1 = require("mobx-react");
10
- const ImportSyntenyOpenCustomTrack_1 = __importDefault(require("./ImportSyntenyOpenCustomTrack"));
11
- const ImportSyntenyTrackSelector_1 = __importDefault(require("./ImportSyntenyTrackSelector"));
12
- const TrackSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, model, }) {
13
- const [choice, setChoice] = (0, react_1.useState)('tracklist');
14
- (0, react_1.useEffect)(() => {
15
- if (choice === 'none') {
16
- model.setImportFormSyntenyTrack(0, { type: 'none' });
17
- }
18
- }, [model, choice]);
19
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, { id: "group-label", children: "(Optional) Select or add a synteny track" }), (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, { row: true, value: choice, onChange: event => {
20
- setChoice(event.target.value);
21
- }, "aria-labelledby": "group-label", children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "none", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "None" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "tracklist", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "Existing track" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "custom", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "New track" })] })] }), choice === 'custom' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyOpenCustomTrack_1.default, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyTrackSelector_1.default, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
22
- });
23
- exports.default = TrackSelector;
@@ -1,117 +0,0 @@
1
- import type { FileLocation } from '@jbrowse/core/util';
2
- export declare function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }: {
3
- radioOption: string;
4
- assembly1: string;
5
- assembly2: string;
6
- fileLocation?: FileLocation;
7
- indexFileLocation?: FileLocation;
8
- bed1Location?: FileLocation;
9
- bed2Location?: FileLocation;
10
- }): {
11
- type: string;
12
- pafLocation: FileLocation | undefined;
13
- queryAssembly: string;
14
- targetAssembly: string;
15
- outLocation?: undefined;
16
- deltaLocation?: undefined;
17
- chainLocation?: undefined;
18
- mcscanAnchorsLocation?: undefined;
19
- bed1Location?: undefined;
20
- bed2Location?: undefined;
21
- assemblyNames?: undefined;
22
- mcscanSimpleAnchorsLocation?: undefined;
23
- pifGzLocation?: undefined;
24
- index?: undefined;
25
- } | {
26
- type: string;
27
- outLocation: FileLocation | undefined;
28
- queryAssembly: string;
29
- targetAssembly: string;
30
- pafLocation?: undefined;
31
- deltaLocation?: undefined;
32
- chainLocation?: undefined;
33
- mcscanAnchorsLocation?: undefined;
34
- bed1Location?: undefined;
35
- bed2Location?: undefined;
36
- assemblyNames?: undefined;
37
- mcscanSimpleAnchorsLocation?: undefined;
38
- pifGzLocation?: undefined;
39
- index?: undefined;
40
- } | {
41
- type: string;
42
- deltaLocation: FileLocation | undefined;
43
- queryAssembly: string;
44
- targetAssembly: string;
45
- pafLocation?: undefined;
46
- outLocation?: undefined;
47
- chainLocation?: undefined;
48
- mcscanAnchorsLocation?: undefined;
49
- bed1Location?: undefined;
50
- bed2Location?: undefined;
51
- assemblyNames?: undefined;
52
- mcscanSimpleAnchorsLocation?: undefined;
53
- pifGzLocation?: undefined;
54
- index?: undefined;
55
- } | {
56
- type: string;
57
- chainLocation: FileLocation | undefined;
58
- queryAssembly: string;
59
- targetAssembly: string;
60
- pafLocation?: undefined;
61
- outLocation?: undefined;
62
- deltaLocation?: undefined;
63
- mcscanAnchorsLocation?: undefined;
64
- bed1Location?: undefined;
65
- bed2Location?: undefined;
66
- assemblyNames?: undefined;
67
- mcscanSimpleAnchorsLocation?: undefined;
68
- pifGzLocation?: undefined;
69
- index?: undefined;
70
- } | {
71
- type: string;
72
- mcscanAnchorsLocation: FileLocation | undefined;
73
- bed1Location: FileLocation | undefined;
74
- bed2Location: FileLocation | undefined;
75
- assemblyNames: string[];
76
- pafLocation?: undefined;
77
- queryAssembly?: undefined;
78
- targetAssembly?: undefined;
79
- outLocation?: undefined;
80
- deltaLocation?: undefined;
81
- chainLocation?: undefined;
82
- mcscanSimpleAnchorsLocation?: undefined;
83
- pifGzLocation?: undefined;
84
- index?: undefined;
85
- } | {
86
- type: string;
87
- mcscanSimpleAnchorsLocation: FileLocation | undefined;
88
- bed1Location: FileLocation | undefined;
89
- bed2Location: FileLocation | undefined;
90
- assemblyNames: string[];
91
- pafLocation?: undefined;
92
- queryAssembly?: undefined;
93
- targetAssembly?: undefined;
94
- outLocation?: undefined;
95
- deltaLocation?: undefined;
96
- chainLocation?: undefined;
97
- mcscanAnchorsLocation?: undefined;
98
- pifGzLocation?: undefined;
99
- index?: undefined;
100
- } | {
101
- type: string;
102
- pifGzLocation: FileLocation | undefined;
103
- index: {
104
- location: FileLocation | undefined;
105
- };
106
- assemblyNames: string[];
107
- pafLocation?: undefined;
108
- queryAssembly?: undefined;
109
- targetAssembly?: undefined;
110
- outLocation?: undefined;
111
- deltaLocation?: undefined;
112
- chainLocation?: undefined;
113
- mcscanAnchorsLocation?: undefined;
114
- bed1Location?: undefined;
115
- bed2Location?: undefined;
116
- mcscanSimpleAnchorsLocation?: undefined;
117
- };
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAdapter = getAdapter;
4
- function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }) {
5
- if (radioOption === '.paf') {
6
- return {
7
- type: 'PAFAdapter',
8
- pafLocation: fileLocation,
9
- queryAssembly: assembly1,
10
- targetAssembly: assembly2,
11
- };
12
- }
13
- else if (radioOption === '.out') {
14
- return {
15
- type: 'MashMapAdapter',
16
- outLocation: fileLocation,
17
- queryAssembly: assembly1,
18
- targetAssembly: assembly2,
19
- };
20
- }
21
- else if (radioOption === '.delta') {
22
- return {
23
- type: 'DeltaAdapter',
24
- deltaLocation: fileLocation,
25
- queryAssembly: assembly1,
26
- targetAssembly: assembly2,
27
- };
28
- }
29
- else if (radioOption === '.chain') {
30
- return {
31
- type: 'ChainAdapter',
32
- chainLocation: fileLocation,
33
- queryAssembly: assembly1,
34
- targetAssembly: assembly2,
35
- };
36
- }
37
- else if (radioOption === '.anchors') {
38
- return {
39
- type: 'MCScanAnchorsAdapter',
40
- mcscanAnchorsLocation: fileLocation,
41
- bed1Location,
42
- bed2Location,
43
- assemblyNames: [assembly1, assembly2],
44
- };
45
- }
46
- else if (radioOption === '.anchors.simple') {
47
- return {
48
- type: 'MCScanSimpleAnchorsAdapter',
49
- mcscanSimpleAnchorsLocation: fileLocation,
50
- bed1Location,
51
- bed2Location,
52
- assemblyNames: [assembly1, assembly2],
53
- };
54
- }
55
- else if (radioOption === '.pif.gz') {
56
- return {
57
- type: 'PairwiseIndexedPAFAdapter',
58
- pifGzLocation: fileLocation,
59
- index: {
60
- location: indexFileLocation,
61
- },
62
- assemblyNames: [assembly1, assembly2],
63
- };
64
- }
65
- else {
66
- throw new Error(`Unknown to detect type ${radioOption} from filename (select radio button to clarify)`);
67
- }
68
- }
@@ -1,5 +0,0 @@
1
- import type { DotplotViewModel } from '../../model';
2
- declare const DotplotImportForm: ({ model, }: {
3
- model: DotplotViewModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default DotplotImportForm;
@@ -1,76 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const react_1 = require("react");
8
- const ui_1 = require("@jbrowse/core/ui");
9
- const util_1 = require("@jbrowse/core/util");
10
- const material_1 = require("@mui/material");
11
- const mobx_1 = require("mobx");
12
- const mobx_react_1 = require("mobx-react");
13
- const mui_1 = require("tss-react/mui");
14
- const TrackSelector_1 = __importDefault(require("./TrackSelector"));
15
- const useStyles = (0, mui_1.makeStyles)()(theme => ({
16
- importFormContainer: {
17
- padding: theme.spacing(4),
18
- margin: '0 auto',
19
- },
20
- assemblySelector: {
21
- width: '75%',
22
- margin: '0 auto',
23
- },
24
- }));
25
- function doSubmit({ model, assembly1, assembly2, }) {
26
- const session = (0, util_1.getSession)(model);
27
- const { importFormSyntenyTrackSelections } = model;
28
- model.setError(undefined);
29
- (0, mobx_1.transaction)(() => {
30
- if ((0, util_1.isSessionWithAddTracks)(session)) {
31
- (0, mobx_1.toJS)(importFormSyntenyTrackSelections).map((f, idx) => {
32
- var _a;
33
- if (f.type === 'userOpened') {
34
- session.addTrackConf(f.value);
35
- model.toggleTrack((_a = f.value) === null || _a === void 0 ? void 0 : _a.trackId);
36
- }
37
- else if (f.type === 'preConfigured') {
38
- model.showTrack(f.value, idx);
39
- }
40
- });
41
- }
42
- model.showAllRegions();
43
- model.setAssemblyNames(assembly2, assembly1);
44
- });
45
- }
46
- const DotplotImportForm = (0, mobx_react_1.observer)(function ({ model, }) {
47
- const { classes } = useStyles();
48
- const session = (0, util_1.getSession)(model);
49
- const { assemblyNames } = session;
50
- const [assembly2, setAssembly2] = (0, react_1.useState)(assemblyNames[0] || '');
51
- const [assembly1, setAssembly1] = (0, react_1.useState)(assemblyNames[0] || '');
52
- const [error, setError] = (0, react_1.useState)();
53
- const displayError = error || model.error;
54
- return ((0, jsx_runtime_1.jsxs)(material_1.Container, { className: classes.importFormContainer, children: [displayError ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: displayError }) : null, (0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { style: { textAlign: 'center' }, children: "Select assemblies for dotplot view" }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "x-axis assembly", selected: assembly2, session: session, onChange: val => {
55
- setAssembly2(val);
56
- } }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { helperText: "y-axis assembly", selected: assembly1, session: session, onChange: val => {
57
- setAssembly1(val);
58
- } }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
59
- ;
60
- (async () => {
61
- try {
62
- setError(undefined);
63
- doSubmit({
64
- assembly1,
65
- assembly2,
66
- model,
67
- });
68
- }
69
- catch (e) {
70
- console.error(e);
71
- setError(e);
72
- }
73
- })();
74
- }, variant: "contained", color: "primary", children: "Launch" }) })] }), (0, jsx_runtime_1.jsx)(TrackSelector_1.default, { assembly2: assembly2, assembly1: assembly1, model: model })] })] }));
75
- });
76
- exports.default = DotplotImportForm;
@@ -1,3 +0,0 @@
1
- import type { SelectorProps } from './SelectorTypes';
2
- declare const AnchorsFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
3
- export default AnchorsFileSelector;
@@ -1,23 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const ui_1 = require("@jbrowse/core/ui");
8
- const mobx_react_1 = require("mobx-react");
9
- const SwapAssemblies_1 = __importDefault(require("./SwapAssemblies"));
10
- const AnchorsFileSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }) {
11
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: radioOption, location: fileLocation, setLocation: loc => {
12
- setFileLocation(loc);
13
- } }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
14
- if (setBed1Location) {
15
- setBed1Location(loc);
16
- }
17
- } }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
18
- if (setBed2Location) {
19
- setBed2Location(loc);
20
- }
21
- } })] }), (0, jsx_runtime_1.jsx)(SwapAssemblies_1.default, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "bed 1 assembly", text2: "bed 2 assembly" })] }));
22
- });
23
- exports.default = AnchorsFileSelector;
@@ -1,3 +0,0 @@
1
- import type { SelectorProps } from './SelectorTypes';
2
- declare const PifGzSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
3
- export default PifGzSelector;
@@ -1,13 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const ui_1 = require("@jbrowse/core/ui");
8
- const mobx_react_1 = require("mobx-react");
9
- const SwapAssemblies_1 = __importDefault(require("./SwapAssemblies"));
10
- const PifGzSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation = undefined, setIndexFileLocation = () => { }, radioOption, }) {
11
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .pif.gz and index file (.pif.gz.tbi or .pif.gz.csi) files for created by `jbrowse make-pif`"] }), (0, jsx_runtime_1.jsxs)("div", { style: { maxWidth: 400, margin: '0 auto' }, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: setFileLocation }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} index location (.tbi or .csi)`, inline: true, description: "", location: indexFileLocation, setLocation: setIndexFileLocation }), (0, jsx_runtime_1.jsx)(SwapAssemblies_1.default, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "query assembly", text2: "target assembly" })] })] }));
12
- });
13
- exports.default = PifGzSelector;
@@ -1,23 +0,0 @@
1
- import type { FileLocation } from '@jbrowse/core/util/types';
2
- export declare const helpStrings: {
3
- readonly '.paf': "minimap2 target.fa query.fa";
4
- readonly '.pif.gz': "minimap2 target.fa query.fa";
5
- readonly '.out': "mashmap target.fa query.fa";
6
- readonly '.delta': "mummer target.fa query.fa";
7
- readonly '.chain': "e.g. queryToTarget.chain";
8
- };
9
- export interface SelectorProps {
10
- assembly1?: string;
11
- assembly2?: string;
12
- swap?: boolean;
13
- setSwap?: (arg: boolean) => void;
14
- fileLocation?: FileLocation;
15
- setFileLocation: (arg: FileLocation) => void;
16
- indexFileLocation?: FileLocation;
17
- setIndexFileLocation?: (arg: FileLocation) => void;
18
- bed1Location?: FileLocation;
19
- setBed1Location?: (arg: FileLocation) => void;
20
- bed2Location?: FileLocation;
21
- setBed2Location?: (arg: FileLocation) => void;
22
- radioOption: string;
23
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.helpStrings = void 0;
4
- exports.helpStrings = {
5
- '.paf': 'minimap2 target.fa query.fa',
6
- '.pif.gz': 'minimap2 target.fa query.fa',
7
- '.out': 'mashmap target.fa query.fa',
8
- '.delta': 'mummer target.fa query.fa',
9
- '.chain': 'e.g. queryToTarget.chain',
10
- };
@@ -1,13 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export interface SwapAssembliesProps {
3
- assembly1?: string;
4
- assembly2?: string;
5
- swap?: boolean;
6
- setSwap?: (arg: boolean) => void;
7
- radioOption: string;
8
- helpContent?: ReactNode;
9
- text1: string;
10
- text2: string;
11
- }
12
- declare const SwapAssemblies: ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }: SwapAssembliesProps) => import("react/jsx-runtime").JSX.Element;
13
- export default SwapAssemblies;
@@ -1,32 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const Help_1 = __importDefault(require("@mui/icons-material/Help"));
8
- const material_1 = require("@mui/material");
9
- const mobx_react_1 = require("mobx-react");
10
- const mui_1 = require("tss-react/mui");
11
- const SelectorTypes_1 = require("./SelectorTypes");
12
- const useStyles = (0, mui_1.makeStyles)()({
13
- row: {
14
- display: 'flex',
15
- gap: 20,
16
- },
17
- swap: {
18
- display: 'grid',
19
- gridTemplateColumns: '1fr 1fr',
20
- gap: 4,
21
- alignItems: 'center',
22
- },
23
- });
24
- const SwapAssemblies = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
25
- const { classes } = useStyles();
26
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Verify or click swap", (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: helpContent || ((0, jsx_runtime_1.jsx)("code", { children: SelectorTypes_1.helpStrings[radioOption] })), children: (0, jsx_runtime_1.jsx)(Help_1.default, {}) })] }), (0, jsx_runtime_1.jsxs)("div", { className: classes.row, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.swap, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly2 : assembly1 }) }), (0, jsx_runtime_1.jsx)("div", { children: text1 }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly1 : assembly2 }) }), (0, jsx_runtime_1.jsx)("div", { children: text2 })] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
27
- if (setSwap) {
28
- setSwap(!swap);
29
- }
30
- }, children: "Swap?" })] })] }));
31
- });
32
- exports.default = SwapAssemblies;
@@ -1,3 +0,0 @@
1
- import type { SelectorProps } from './SelectorTypes';
2
- declare const SyntenyFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
3
- export default SyntenyFileSelector;
@@ -1,24 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const ui_1 = require("@jbrowse/core/ui");
8
- const mobx_react_1 = require("mobx-react");
9
- const mui_1 = require("tss-react/mui");
10
- const SwapAssemblies_1 = __importDefault(require("./SwapAssemblies"));
11
- const useStyles = (0, mui_1.makeStyles)()({
12
- container: {
13
- display: 'flex',
14
- flexDirection: 'column',
15
- gap: 10,
16
- },
17
- });
18
- const SyntenyFileSelector = (0, mobx_react_1.observer)(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
19
- const { classes } = useStyles();
20
- return ((0, jsx_runtime_1.jsxs)("div", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
21
- setFileLocation(loc);
22
- } }), (0, jsx_runtime_1.jsx)(SwapAssemblies_1.default, { assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, radioOption: radioOption, text1: "query assembly", text2: "target assembly" })] }));
23
- });
24
- exports.default = SyntenyFileSelector;
@@ -1,3 +0,0 @@
1
- export { default as AnchorsFileSelector } from './AnchorsFileSelector';
2
- export { default as PifGzSelector } from './PifGzSelector';
3
- export { default as SyntenyFileSelector } from './SyntenyFileSelector';
@@ -1,12 +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.SyntenyFileSelector = exports.PifGzSelector = exports.AnchorsFileSelector = void 0;
7
- var AnchorsFileSelector_1 = require("./AnchorsFileSelector");
8
- Object.defineProperty(exports, "AnchorsFileSelector", { enumerable: true, get: function () { return __importDefault(AnchorsFileSelector_1).default; } });
9
- var PifGzSelector_1 = require("./PifGzSelector");
10
- Object.defineProperty(exports, "PifGzSelector", { enumerable: true, get: function () { return __importDefault(PifGzSelector_1).default; } });
11
- var SyntenyFileSelector_1 = require("./SyntenyFileSelector");
12
- Object.defineProperty(exports, "SyntenyFileSelector", { enumerable: true, get: function () { return __importDefault(SyntenyFileSelector_1).default; } });
@@ -1,10 +0,0 @@
1
- export declare function getName(sessionTrackData?: {
2
- uri: string;
3
- } | {
4
- localPath: string;
5
- } | {
6
- name: string;
7
- }): any;
8
- export declare function stripGz(fileName: string): string;
9
- export declare function basename(str: string): string | undefined;
10
- export declare function extName(str: string): string;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getName = getName;
4
- exports.stripGz = stripGz;
5
- exports.basename = basename;
6
- exports.extName = extName;
7
- function getName(sessionTrackData) {
8
- return sessionTrackData
9
- ?
10
- sessionTrackData.uri ||
11
- sessionTrackData.localPath ||
12
- sessionTrackData.name
13
- : undefined;
14
- }
15
- function stripGz(fileName) {
16
- return fileName.endsWith('.gz') ? fileName.slice(0, -3) : fileName;
17
- }
18
- function basename(str) {
19
- return str.split('#')[0].split('?')[0].split('/').pop();
20
- }
21
- function extName(str) {
22
- const r = str.split('.').pop();
23
- return r ? `.${r}` : '';
24
- }
@@ -1,5 +0,0 @@
1
- import type { DotplotViewModel } from '../model';
2
- declare const PanButtons: ({ model, }: {
3
- model: DotplotViewModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default PanButtons;
@@ -1,47 +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
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const ArrowDropDown_1 = __importDefault(require("@mui/icons-material/ArrowDropDown"));
8
- const ArrowDropUp_1 = __importDefault(require("@mui/icons-material/ArrowDropUp"));
9
- const ArrowLeft_1 = __importDefault(require("@mui/icons-material/ArrowLeft"));
10
- const ArrowRight_1 = __importDefault(require("@mui/icons-material/ArrowRight"));
11
- const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
12
- const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
13
- const material_1 = require("@mui/material");
14
- const mobx_react_1 = require("mobx-react");
15
- const mui_1 = require("tss-react/mui");
16
- const useStyles = (0, mui_1.makeStyles)()({
17
- dpad: {
18
- display: 'grid',
19
- gridTemplateColumns: 'repeat(3, 1fr)',
20
- margin: 0,
21
- position: 'absolute',
22
- right: 50,
23
- zIndex: 500,
24
- top: 50,
25
- },
26
- icon: {
27
- padding: 0,
28
- margin: 0,
29
- },
30
- });
31
- const PanButtons = (0, mobx_react_1.observer)(function PanButtons({ model, }) {
32
- const { classes } = useStyles();
33
- return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { className: classes.dpad, elevation: 6, children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
34
- model.vview.scroll(100);
35
- }, children: (0, jsx_runtime_1.jsx)(ArrowDropUp_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
36
- model.hview.scroll(-100);
37
- }, children: (0, jsx_runtime_1.jsx)(ArrowLeft_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
38
- model.hview.scroll(100);
39
- }, children: (0, jsx_runtime_1.jsx)(ArrowRight_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
40
- model.vview.scroll(-100);
41
- }, children: (0, jsx_runtime_1.jsx)(ArrowDropDown_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
42
- model.zoomIn();
43
- }, children: (0, jsx_runtime_1.jsx)(ZoomIn_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(material_1.IconButton, { className: classes.icon, onClick: () => {
44
- model.zoomOut();
45
- }, children: (0, jsx_runtime_1.jsx)(ZoomOut_1.default, {}) })] }));
46
- });
47
- exports.default = PanButtons;
@@ -1,16 +0,0 @@
1
- import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- interface Warning {
3
- message: string;
4
- effect: string;
5
- }
6
- interface TrackWarning {
7
- configuration: AnyConfigurationModel;
8
- displays: {
9
- warnings: Warning[];
10
- }[];
11
- }
12
- declare const WarningDialog: ({ trackWarnings, handleClose, }: {
13
- handleClose: () => void;
14
- trackWarnings: TrackWarning[];
15
- }) => import("react/jsx-runtime").JSX.Element;
16
- export default WarningDialog;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const configuration_1 = require("@jbrowse/core/configuration");
5
- const ui_1 = require("@jbrowse/core/ui");
6
- const util_1 = require("@jbrowse/core/util");
7
- const material_1 = require("@mui/material");
8
- const x_data_grid_1 = require("@mui/x-data-grid");
9
- const mobx_react_1 = require("mobx-react");
10
- const mui_1 = require("tss-react/mui");
11
- const useStyles = (0, mui_1.makeStyles)()({
12
- content: {
13
- minWidth: 600,
14
- },
15
- });
16
- function getTrackWarnings({ trackWarnings, }) {
17
- const rows = [];
18
- for (const [i, trackWarning] of trackWarnings.entries()) {
19
- const track = trackWarning;
20
- const name = (0, configuration_1.getConf)(track, 'name');
21
- const d = track.displays[0];
22
- for (let j = 0; j < d.warnings.length; j++) {
23
- const warning = d.warnings[j];
24
- rows.push({ name, ...warning, id: `${i}_${j}` });
25
- }
26
- }
27
- return rows;
28
- }
29
- const WarningDialog = (0, mobx_react_1.observer)(function WarningDialog({ trackWarnings, handleClose, }) {
30
- const { classes } = useStyles();
31
- const rows = getTrackWarnings({ trackWarnings });
32
- const columns = [
33
- { field: 'name' },
34
- { field: 'message', width: (0, util_1.measureGridWidth)(rows.map(r => r.message)) },
35
- { field: 'effect', width: (0, util_1.measureGridWidth)(rows.map(r => r.effect)) },
36
- ];
37
- return ((0, jsx_runtime_1.jsx)(ui_1.Dialog, { open: true, onClose: handleClose, maxWidth: "xl", title: "Dotplot rendered with warnings", children: (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { className: classes.content, children: [(0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: "Found warnings while rendering the dotplot. This is often due to out-of-bound features that may indicate the wrong assemblies are being used. Check that the query and target are configured correctly, and that the right assemblies are being compared." }), (0, jsx_runtime_1.jsx)("div", { style: { height: 600, width: '100%', overflow: 'auto' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rows: rows, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, disableColumnMenu: true }) })] }) }));
38
- });
39
- exports.default = WarningDialog;
@@ -1,14 +0,0 @@
1
- import type { Dotplot1DViewModel } from '../model';
2
- import type { BaseBlock } from '@jbrowse/core/util/blockTypes';
3
- export declare function locstr(px: number, view: Dotplot1DViewModel, includeAsm?: boolean): string;
4
- export declare function getBlockLabelKeysToHide(blocks: BaseBlock[], length: number, viewOffsetPx: number): Set<string>;
5
- export declare function chooseGridPitch(scale: number, minMajorPitchPx: number, minMinorPitchPx: number): {
6
- majorPitch: number;
7
- minorPitch: number;
8
- };
9
- export declare function makeTicks(regions: BaseBlock[], bpPerPx: number, emitMajor?: boolean, emitMinor?: boolean): {
10
- type: string;
11
- base: number;
12
- index: number;
13
- refName: string;
14
- }[];