@jbrowse/plugin-variants 3.1.0 → 3.3.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 (237) hide show
  1. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +3 -3
  2. package/dist/MultiLinearVariantDisplay/index.js +1 -1
  3. package/dist/MultiLinearVariantDisplay/model.d.ts +58 -3
  4. package/dist/MultiLinearVariantDisplay/model.js +0 -1
  5. package/dist/MultiLinearVariantDisplay/renderSvg.js +2 -2
  6. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +15 -5
  7. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +3 -3
  8. package/dist/MultiLinearVariantMatrixDisplay/index.js +1 -1
  9. package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +59 -2
  10. package/dist/MultiLinearVariantMatrixDisplay/model.js +5 -1
  11. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +2 -2
  12. package/dist/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.d.ts → MultiLinearVariantMatrixRenderer.d.ts} +7 -3
  13. package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
  14. package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +41 -0
  15. package/dist/MultiLinearVariantMatrixRenderer/index.js +4 -4
  16. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +2 -2
  17. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +15 -8
  18. package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +2 -4
  19. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +30 -1
  20. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +11 -5
  21. package/dist/MultiLinearVariantRenderer/components/{MultiVariantRendering.d.ts → MultiLinearVariantRendering.d.ts} +10 -4
  22. package/dist/MultiLinearVariantRenderer/{MultiVariantRendering.js → components/MultiLinearVariantRendering.js} +25 -7
  23. package/dist/MultiLinearVariantRenderer/components/util.d.ts +1 -0
  24. package/dist/MultiLinearVariantRenderer/components/util.js +15 -0
  25. package/dist/MultiLinearVariantRenderer/index.js +2 -2
  26. package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +9 -0
  27. package/dist/MultiLinearVariantRenderer/makeImageData.js +63 -23
  28. package/dist/MultiLinearVariantRenderer/types.d.ts +1 -0
  29. package/dist/SplitVcfTabixAdapter/configSchema.js +4 -2
  30. package/dist/VariantFeatureWidget/AltFormatter.d.ts +4 -0
  31. package/dist/VariantFeatureWidget/AltFormatter.js +13 -0
  32. package/dist/VariantFeatureWidget/Checkbox2.js +1 -8
  33. package/dist/VariantFeatureWidget/Formatter.d.ts +3 -0
  34. package/dist/VariantFeatureWidget/Formatter.js +23 -0
  35. package/dist/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.js → VariantConsequence/VariantConsequenceDataGridWrapper.js} +3 -5
  36. package/dist/VariantFeatureWidget/VariantFeatureWidget.js +7 -2
  37. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +4 -0
  38. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +80 -0
  39. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +3 -9
  40. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +41 -20
  41. package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +21 -0
  42. package/dist/VariantFeatureWidget/VariantSampleGrid/types.js +2 -0
  43. package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +1 -0
  44. package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +14 -0
  45. package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +14 -0
  46. package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +30 -0
  47. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +2 -13
  48. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +5 -57
  49. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +3 -10
  50. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +15 -10
  51. package/dist/VariantRPC/getGenotypeMatrix.d.ts +6 -0
  52. package/dist/VariantRPC/getGenotypeMatrix.js +60 -0
  53. package/dist/VariantRPC/types.d.ts +36 -0
  54. package/dist/VariantRPC/types.js +2 -0
  55. package/dist/VcfAdapter/VcfAdapter.js +6 -3
  56. package/dist/VcfFeature/index.js +0 -1
  57. package/dist/VcfFeature/util.d.ts +2 -0
  58. package/dist/VcfFeature/util.js +125 -27
  59. package/dist/VcfTabixAdapter/VcfTabixAdapter.js +17 -7
  60. package/dist/getMultiVariantFeaturesAutorun.d.ts +2 -0
  61. package/dist/getMultiVariantFeaturesAutorun.js +9 -2
  62. package/dist/getMultiVariantSourcesAutorun.js +3 -2
  63. package/dist/index.js +2 -0
  64. package/dist/shared/MultiVariantBaseModel.d.ts +59 -3
  65. package/dist/shared/MultiVariantBaseModel.js +95 -37
  66. package/dist/shared/components/AddFiltersDialog.d.ts +9 -0
  67. package/dist/shared/components/AddFiltersDialog.js +61 -0
  68. package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +5 -0
  69. package/dist/shared/components/MultiVariantBaseDisplayComponent.js +29 -0
  70. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +6 -0
  71. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.js +29 -0
  72. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +7 -0
  73. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +74 -0
  74. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +7 -0
  75. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +145 -0
  76. package/dist/shared/components/MultiVariantClusterDialog/types.d.ts +10 -0
  77. package/dist/shared/components/MultiVariantClusterDialog/types.js +2 -0
  78. package/{esm/shared/components/ColorLegend.d.ts → dist/shared/components/MultiVariantColorLegend.d.ts} +2 -2
  79. package/dist/shared/components/{ColorLegend.js → MultiVariantColorLegend.js} +5 -3
  80. package/dist/shared/components/MultiVariantCrosshairs.d.ts +7 -0
  81. package/dist/shared/components/MultiVariantCrosshairs.js +40 -0
  82. package/dist/shared/components/MultiVariantLegendBar.d.ts +7 -0
  83. package/dist/shared/components/{LegendBar.js → MultiVariantLegendBar.js} +2 -2
  84. package/dist/shared/components/MultiVariantTooltip.d.ts +4 -0
  85. package/dist/shared/components/MultiVariantTooltip.js +3 -2
  86. package/dist/shared/components/RectBg.js +4 -2
  87. package/dist/shared/components/SetColorDialog.js +1 -1
  88. package/dist/shared/components/SourcesDataGrid.d.ts +2 -1
  89. package/dist/shared/components/SourcesDataGrid.js +2 -2
  90. package/dist/shared/components/SourcesGrid.js +1 -1
  91. package/dist/shared/components/SourcesGridHeader.d.ts +2 -1
  92. package/dist/shared/components/SourcesGridHeader.js +2 -2
  93. package/dist/shared/drawAlleleCount.d.ts +1 -1
  94. package/dist/shared/drawAlleleCount.js +29 -5
  95. package/dist/shared/drawPhased.d.ts +1 -1
  96. package/dist/shared/drawPhased.js +14 -10
  97. package/dist/shared/getSources.d.ts +15 -0
  98. package/dist/shared/getSources.js +34 -0
  99. package/dist/shared/minorAlleleFrequencyUtils.d.ts +6 -1
  100. package/dist/shared/minorAlleleFrequencyUtils.js +4 -5
  101. package/dist/shared/sourcesGridUtils.d.ts +3 -2
  102. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +2 -2
  103. package/esm/MultiLinearVariantDisplay/index.js +1 -1
  104. package/esm/MultiLinearVariantDisplay/model.d.ts +58 -3
  105. package/esm/MultiLinearVariantDisplay/model.js +0 -1
  106. package/esm/MultiLinearVariantDisplay/renderSvg.js +1 -1
  107. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +15 -8
  108. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +2 -2
  109. package/esm/MultiLinearVariantMatrixDisplay/index.js +1 -1
  110. package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +59 -2
  111. package/esm/MultiLinearVariantMatrixDisplay/model.js +5 -1
  112. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +1 -1
  113. package/esm/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.d.ts → MultiLinearVariantMatrixRenderer.d.ts} +7 -3
  114. package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +8 -0
  115. package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +39 -0
  116. package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
  117. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +2 -2
  118. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +16 -9
  119. package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -4
  120. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +30 -1
  121. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +11 -5
  122. package/esm/MultiLinearVariantRenderer/components/{MultiVariantRendering.d.ts → MultiLinearVariantRendering.d.ts} +10 -4
  123. package/esm/MultiLinearVariantRenderer/components/{MultiVariantRendering.js → MultiLinearVariantRendering.js} +25 -7
  124. package/esm/MultiLinearVariantRenderer/components/util.d.ts +1 -0
  125. package/esm/MultiLinearVariantRenderer/components/util.js +12 -0
  126. package/esm/MultiLinearVariantRenderer/index.js +1 -1
  127. package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +9 -0
  128. package/esm/MultiLinearVariantRenderer/makeImageData.js +64 -24
  129. package/esm/MultiLinearVariantRenderer/types.d.ts +1 -0
  130. package/esm/SplitVcfTabixAdapter/configSchema.js +4 -2
  131. package/esm/VariantFeatureWidget/AltFormatter.d.ts +4 -0
  132. package/esm/VariantFeatureWidget/AltFormatter.js +10 -0
  133. package/esm/VariantFeatureWidget/Checkbox2.js +2 -9
  134. package/esm/VariantFeatureWidget/Formatter.d.ts +3 -0
  135. package/esm/VariantFeatureWidget/Formatter.js +17 -0
  136. package/esm/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.js → VariantConsequence/VariantConsequenceDataGridWrapper.js} +4 -6
  137. package/esm/VariantFeatureWidget/VariantFeatureWidget.js +7 -2
  138. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +4 -0
  139. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +74 -0
  140. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +3 -9
  141. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +43 -22
  142. package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +21 -0
  143. package/esm/VariantFeatureWidget/VariantSampleGrid/types.js +1 -0
  144. package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +1 -0
  145. package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +11 -0
  146. package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +14 -0
  147. package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +23 -0
  148. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +2 -13
  149. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +5 -57
  150. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +3 -10
  151. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +15 -10
  152. package/esm/VariantRPC/getGenotypeMatrix.d.ts +6 -0
  153. package/esm/VariantRPC/getGenotypeMatrix.js +57 -0
  154. package/esm/VariantRPC/types.d.ts +36 -0
  155. package/esm/VariantRPC/types.js +1 -0
  156. package/esm/VcfAdapter/VcfAdapter.js +7 -4
  157. package/esm/VcfFeature/index.js +0 -1
  158. package/esm/VcfFeature/util.d.ts +2 -0
  159. package/esm/VcfFeature/util.js +123 -27
  160. package/esm/VcfTabixAdapter/VcfTabixAdapter.js +18 -8
  161. package/esm/getMultiVariantFeaturesAutorun.d.ts +2 -0
  162. package/esm/getMultiVariantFeaturesAutorun.js +9 -2
  163. package/esm/getMultiVariantSourcesAutorun.js +3 -2
  164. package/esm/index.js +2 -0
  165. package/esm/shared/MultiVariantBaseModel.d.ts +59 -3
  166. package/esm/shared/MultiVariantBaseModel.js +97 -39
  167. package/esm/shared/components/AddFiltersDialog.d.ts +9 -0
  168. package/esm/shared/components/AddFiltersDialog.js +59 -0
  169. package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +5 -0
  170. package/esm/shared/components/MultiVariantBaseDisplayComponent.js +24 -0
  171. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +6 -0
  172. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.js +24 -0
  173. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +7 -0
  174. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +72 -0
  175. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +7 -0
  176. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +140 -0
  177. package/esm/shared/components/MultiVariantClusterDialog/types.d.ts +10 -0
  178. package/esm/shared/components/MultiVariantClusterDialog/types.js +1 -0
  179. package/{dist/shared/components/ColorLegend.d.ts → esm/shared/components/MultiVariantColorLegend.d.ts} +2 -2
  180. package/esm/shared/components/{ColorLegend.js → MultiVariantColorLegend.js} +6 -4
  181. package/esm/shared/components/MultiVariantCrosshairs.d.ts +7 -0
  182. package/esm/shared/components/MultiVariantCrosshairs.js +35 -0
  183. package/esm/shared/components/MultiVariantLegendBar.d.ts +7 -0
  184. package/esm/shared/components/{LegendBar.js → MultiVariantLegendBar.js} +1 -1
  185. package/esm/shared/components/MultiVariantTooltip.d.ts +4 -0
  186. package/esm/shared/components/MultiVariantTooltip.js +3 -2
  187. package/esm/shared/components/RectBg.js +4 -2
  188. package/esm/shared/components/SetColorDialog.js +1 -1
  189. package/esm/shared/components/SourcesDataGrid.d.ts +2 -1
  190. package/esm/shared/components/SourcesDataGrid.js +2 -2
  191. package/esm/shared/components/SourcesGrid.js +1 -1
  192. package/esm/shared/components/SourcesGridHeader.d.ts +2 -1
  193. package/esm/shared/components/SourcesGridHeader.js +2 -2
  194. package/esm/shared/drawAlleleCount.d.ts +1 -1
  195. package/esm/shared/drawAlleleCount.js +29 -5
  196. package/esm/shared/drawPhased.d.ts +1 -1
  197. package/esm/shared/drawPhased.js +14 -10
  198. package/esm/shared/getSources.d.ts +15 -0
  199. package/esm/shared/getSources.js +31 -0
  200. package/esm/shared/minorAlleleFrequencyUtils.d.ts +6 -1
  201. package/esm/shared/minorAlleleFrequencyUtils.js +5 -6
  202. package/esm/shared/sourcesGridUtils.d.ts +3 -2
  203. package/package.json +10 -9
  204. package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +0 -7
  205. package/dist/MultiLinearVariantDisplay/components/Crosshair.js +0 -35
  206. package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +0 -7
  207. package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +0 -28
  208. package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +0 -7
  209. package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +0 -38
  210. package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +0 -22
  211. package/dist/MultiLinearVariantRenderer/components/MultiVariantRendering.js +0 -52
  212. package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +0 -5
  213. package/dist/VariantFeatureWidget/VariantConsequencePanel.js +0 -15
  214. package/dist/shared/components/ClusterDialog.d.ts +0 -11
  215. package/dist/shared/components/ClusterDialog.js +0 -113
  216. package/dist/shared/components/LegendBar.d.ts +0 -18
  217. package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +0 -7
  218. package/esm/MultiLinearVariantDisplay/components/Crosshair.js +0 -30
  219. package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +0 -7
  220. package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +0 -23
  221. package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +0 -7
  222. package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +0 -36
  223. package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +0 -22
  224. package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +0 -47
  225. package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +0 -5
  226. package/esm/VariantFeatureWidget/VariantConsequencePanel.js +0 -9
  227. package/esm/shared/components/ClusterDialog.d.ts +0 -11
  228. package/esm/shared/components/ClusterDialog.js +0 -107
  229. package/esm/shared/components/LegendBar.d.ts +0 -18
  230. /package/dist/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.js → MultiLinearVariantMatrixRenderer.js} +0 -0
  231. /package/dist/VariantFeatureWidget/{VariantConsequenceDataGrid.d.ts → VariantConsequence/VariantConsequenceDataGrid.d.ts} +0 -0
  232. /package/dist/VariantFeatureWidget/{VariantConsequenceDataGrid.js → VariantConsequence/VariantConsequenceDataGrid.js} +0 -0
  233. /package/dist/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.d.ts → VariantConsequence/VariantConsequenceDataGridWrapper.d.ts} +0 -0
  234. /package/esm/MultiLinearVariantMatrixRenderer/{LinearVariantMatrixRenderer.js → MultiLinearVariantMatrixRenderer.js} +0 -0
  235. /package/esm/VariantFeatureWidget/{VariantConsequenceDataGrid.d.ts → VariantConsequence/VariantConsequenceDataGrid.d.ts} +0 -0
  236. /package/esm/VariantFeatureWidget/{VariantConsequenceDataGrid.js → VariantConsequence/VariantConsequenceDataGrid.js} +0 -0
  237. /package/esm/VariantFeatureWidget/{VariantConsequenceDataGridWrapper.d.ts → VariantConsequence/VariantConsequenceDataGridWrapper.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import type { SampleInfo, Source } from '../shared/types';
1
+ import type { SampleInfo, Source } from './types';
2
2
  import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
3
3
  import type { Feature } from '@jbrowse/core/util';
4
4
  import type { Instance } from 'mobx-state-tree';
@@ -90,6 +90,9 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
90
90
  renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
91
91
  rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
92
92
  autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
93
+ lengthCutoffFilter: import("mobx-state-tree").IType<number | undefined, number, number>;
94
+ jexlFilters: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
95
+ referenceDrawingMode: import("mobx-state-tree").IType<string | undefined, string, string>;
93
96
  }, {
94
97
  rendererTypeName: string;
95
98
  error: unknown;
@@ -233,19 +236,28 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
233
236
  renderProps(): any;
234
237
  } & {
235
238
  sourcesLoadingStopToken: string | undefined;
239
+ simplifiedFeaturesStopToken: string | undefined;
236
240
  featureUnderMouseVolatile: Feature | undefined;
237
241
  sourcesVolatile: Source[] | undefined;
238
242
  featuresVolatile: Feature[] | undefined;
239
243
  hasPhased: boolean;
240
244
  sampleInfo: undefined | Record<string, SampleInfo>;
241
- hoveredGenotype: string | undefined;
245
+ hoveredGenotype: {
246
+ genotype: string;
247
+ name: string;
248
+ } | undefined;
242
249
  } & {
250
+ setJexlFilters(f?: string[]): void;
243
251
  setRowHeight(arg: number): void;
244
- setHoveredGenotype(arg: string): void;
252
+ setHoveredGenotype(arg?: {
253
+ genotype: string;
254
+ name: string;
255
+ }): void;
245
256
  setFeatures(f: Feature[]): void;
246
257
  setLayout(layout: Source[]): void;
247
258
  clearLayout(): void;
248
259
  setSourcesLoading(str: string): void;
260
+ setSimplifiedFeaturesLoading(str: string): void;
249
261
  setSources(sources: Source[]): void;
250
262
  setMafFilter(arg: number): void;
251
263
  setShowSidebarLabels(arg: boolean): void;
@@ -253,8 +265,19 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
253
265
  setAutoHeight(arg: boolean): void;
254
266
  setHasPhased(arg: boolean): void;
255
267
  setSampleInfo(arg: Record<string, SampleInfo>): void;
268
+ setReferenceDrawingMode(arg: string): void;
256
269
  } & {
270
+ readonly activeFilters: any;
257
271
  readonly preSources: Source[] | undefined;
272
+ readonly sourcesWithoutLayout: {
273
+ label: string;
274
+ id: string;
275
+ baseUri?: string;
276
+ name: string;
277
+ color?: string;
278
+ group?: string;
279
+ HP?: number;
280
+ }[] | undefined;
258
281
  readonly sources: {
259
282
  label: string;
260
283
  id: string;
@@ -265,6 +288,17 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
265
288
  HP?: number;
266
289
  }[] | undefined;
267
290
  } & {
291
+ readonly sourceMap: {
292
+ [k: string]: {
293
+ label: string;
294
+ id: string;
295
+ baseUri?: string;
296
+ name: string;
297
+ color?: string;
298
+ group?: string;
299
+ HP?: number;
300
+ };
301
+ } | undefined;
268
302
  readonly rowHeight: number;
269
303
  adapterProps(): any;
270
304
  trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
@@ -318,6 +352,18 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
318
352
  type?: undefined;
319
353
  checked?: undefined;
320
354
  onClick?: undefined;
355
+ } | {
356
+ label: string;
357
+ type: string;
358
+ subMenu: {
359
+ label: string;
360
+ type: string;
361
+ checked: boolean;
362
+ onClick: () => void;
363
+ }[];
364
+ icon?: undefined;
365
+ checked?: undefined;
366
+ onClick?: undefined;
321
367
  } | {
322
368
  label: string;
323
369
  icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
@@ -330,10 +376,20 @@ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSch
330
376
  type?: undefined;
331
377
  checked?: undefined;
332
378
  onClick?: undefined;
379
+ } | {
380
+ label: string;
381
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
382
+ muiName: string;
383
+ };
384
+ onClick: () => void;
385
+ type?: undefined;
386
+ checked?: undefined;
387
+ subMenu?: undefined;
333
388
  })[];
334
389
  } & {
335
390
  readonly canDisplayLabels: boolean;
336
391
  readonly totalHeight: number;
392
+ readonly featuresReady: boolean;
337
393
  } & {
338
394
  renderProps(): any;
339
395
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -1,17 +1,21 @@
1
1
  import { lazy } from 'react';
2
- import { ConfigurationReference } from '@jbrowse/core/configuration';
2
+ import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
3
+ import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
3
4
  import { getSession } from '@jbrowse/core/util';
4
5
  import { stopStopToken } from '@jbrowse/core/util/stopToken';
5
6
  import { linearBareDisplayStateModelFactory } from '@jbrowse/plugin-linear-genome-view';
7
+ import CategoryIcon from '@mui/icons-material/Category';
6
8
  import FilterListIcon from '@mui/icons-material/FilterList';
7
9
  import HeightIcon from '@mui/icons-material/Height';
8
10
  import SplitscreenIcon from '@mui/icons-material/Splitscreen';
9
11
  import VisibilityIcon from '@mui/icons-material/Visibility';
10
12
  import deepEqual from 'fast-deep-equal';
11
- import { types } from 'mobx-state-tree';
13
+ import { cast, types } from 'mobx-state-tree';
14
+ import { getSources } from './getSources';
12
15
  const SetColorDialog = lazy(() => import('./components/SetColorDialog'));
13
16
  const MAFFilterDialog = lazy(() => import('./components/MAFFilterDialog'));
14
- const ClusterDialog = lazy(() => import('./components/ClusterDialog'));
17
+ const AddFiltersDialog = lazy(() => import('./components/AddFiltersDialog'));
18
+ const ClusterDialog = lazy(() => import('./components/MultiVariantClusterDialog/ClusterDialog'));
15
19
  const SetRowHeightDialog = lazy(() => import('./components/SetRowHeightDialog'));
16
20
  export default function MultiVariantBaseModelF(configSchema) {
17
21
  return types
@@ -19,14 +23,18 @@ export default function MultiVariantBaseModelF(configSchema) {
19
23
  type: types.literal('LinearVariantMatrixDisplay'),
20
24
  layout: types.optional(types.frozen(), []),
21
25
  configuration: ConfigurationReference(configSchema),
22
- minorAlleleFrequencyFilter: types.optional(types.number, 0.1),
26
+ minorAlleleFrequencyFilter: types.optional(types.number, 0),
23
27
  showSidebarLabelsSetting: true,
24
28
  renderingMode: types.optional(types.string, 'alleleCount'),
25
29
  rowHeightSetting: types.optional(types.number, 8),
26
30
  autoHeight: true,
31
+ lengthCutoffFilter: Number.MAX_SAFE_INTEGER,
32
+ jexlFilters: types.maybe(types.array(types.string)),
33
+ referenceDrawingMode: 'skip',
27
34
  }))
28
35
  .volatile(() => ({
29
36
  sourcesLoadingStopToken: undefined,
37
+ simplifiedFeaturesStopToken: undefined,
30
38
  featureUnderMouseVolatile: undefined,
31
39
  sourcesVolatile: undefined,
32
40
  featuresVolatile: undefined,
@@ -35,6 +43,9 @@ export default function MultiVariantBaseModelF(configSchema) {
35
43
  hoveredGenotype: undefined,
36
44
  }))
37
45
  .actions(self => ({
46
+ setJexlFilters(f) {
47
+ self.jexlFilters = cast(f);
48
+ },
38
49
  setRowHeight(arg) {
39
50
  self.rowHeightSetting = arg;
40
51
  },
@@ -56,6 +67,12 @@ export default function MultiVariantBaseModelF(configSchema) {
56
67
  }
57
68
  self.sourcesLoadingStopToken = str;
58
69
  },
70
+ setSimplifiedFeaturesLoading(str) {
71
+ if (self.simplifiedFeaturesStopToken) {
72
+ stopStopToken(self.simplifiedFeaturesStopToken);
73
+ }
74
+ self.simplifiedFeaturesStopToken = str;
75
+ },
59
76
  setSources(sources) {
60
77
  if (!deepEqual(sources, self.sourcesVolatile)) {
61
78
  self.sourcesVolatile = sources;
@@ -81,50 +98,48 @@ export default function MultiVariantBaseModelF(configSchema) {
81
98
  self.sampleInfo = arg;
82
99
  }
83
100
  },
101
+ setReferenceDrawingMode(arg) {
102
+ self.referenceDrawingMode = arg;
103
+ },
84
104
  }))
85
105
  .views(self => ({
106
+ get activeFilters() {
107
+ var _a;
108
+ return ((_a = self.jexlFilters) !== null && _a !== void 0 ? _a : getConf(self, 'jexlFilters').map((r) => `jexl:${r}`));
109
+ },
86
110
  get preSources() {
87
111
  return self.layout.length ? self.layout : self.sourcesVolatile;
88
112
  },
113
+ get sourcesWithoutLayout() {
114
+ return self.sourcesVolatile
115
+ ? getSources({
116
+ sources: self.sourcesVolatile,
117
+ renderingMode: self.renderingMode,
118
+ sampleInfo: self.sampleInfo,
119
+ })
120
+ : undefined;
121
+ },
89
122
  get sources() {
90
- var _a, _b;
91
- if (this.preSources) {
92
- const rows = [];
93
- const sources = Object.fromEntries(((_a = self.sourcesVolatile) === null || _a === void 0 ? void 0 : _a.map(s => [s.name, s])) || []);
94
- for (const row of this.preSources) {
95
- if (self.renderingMode === 'phased') {
96
- const info = (_b = self.sampleInfo) === null || _b === void 0 ? void 0 : _b[row.name];
97
- if (info === null || info === void 0 ? void 0 : info.isPhased) {
98
- const ploidy = info.maxPloidy;
99
- for (let i = 0; i < ploidy; i++) {
100
- const id = `${row.name} HP${i}`;
101
- rows.push({
102
- ...sources[row.name],
103
- ...row,
104
- label: id,
105
- HP: i,
106
- id: id,
107
- });
108
- }
109
- }
110
- }
111
- else {
112
- rows.push({
113
- ...sources[row.name],
114
- ...row,
115
- label: row.name,
116
- id: row.name,
117
- });
118
- }
119
- }
120
- return rows;
121
- }
122
- return undefined;
123
+ const sourcesWithLayout = self.layout.length
124
+ ? self.layout
125
+ : self.sourcesVolatile;
126
+ return sourcesWithLayout
127
+ ? getSources({
128
+ sources: sourcesWithLayout,
129
+ renderingMode: self.renderingMode,
130
+ sampleInfo: self.sampleInfo,
131
+ })
132
+ : undefined;
123
133
  },
124
134
  }))
125
135
  .views(self => {
126
136
  const { trackMenuItems: superTrackMenuItems, renderProps: superRenderProps, } = self;
127
137
  return {
138
+ get sourceMap() {
139
+ return self.sources
140
+ ? Object.fromEntries(self.sources.map(source => [source.name, source]))
141
+ : undefined;
142
+ },
128
143
  get rowHeight() {
129
144
  const { sources, autoHeight, rowHeightSetting, height } = self;
130
145
  return autoHeight ? height / ((sources === null || sources === void 0 ? void 0 : sources.length) || 1) : rowHeightSetting;
@@ -202,6 +217,28 @@ export default function MultiVariantBaseModelF(configSchema) {
202
217
  },
203
218
  ],
204
219
  },
220
+ {
221
+ label: 'Reference mode',
222
+ type: 'subMenu',
223
+ subMenu: [
224
+ {
225
+ label: 'Fill background grey, skip reference allele mouseovers (helps with large overlapping SVs)',
226
+ type: 'radio',
227
+ checked: self.referenceDrawingMode === 'skip',
228
+ onClick: () => {
229
+ self.setReferenceDrawingMode('skip');
230
+ },
231
+ },
232
+ {
233
+ label: "Don't fill background grey, only draw actual reference alleles as grey",
234
+ type: 'radio',
235
+ checked: self.referenceDrawingMode === 'draw',
236
+ onClick: () => {
237
+ self.setReferenceDrawingMode('draw');
238
+ },
239
+ },
240
+ ],
241
+ },
205
242
  {
206
243
  label: 'Filter by',
207
244
  icon: FilterListIcon,
@@ -218,10 +255,23 @@ export default function MultiVariantBaseModelF(configSchema) {
218
255
  ]);
219
256
  },
220
257
  },
258
+ {
259
+ label: 'Edit filters',
260
+ onClick: () => {
261
+ getSession(self).queueDialog(handleClose => [
262
+ AddFiltersDialog,
263
+ {
264
+ model: self,
265
+ handleClose,
266
+ },
267
+ ]);
268
+ },
269
+ },
221
270
  ],
222
271
  },
223
272
  {
224
273
  label: 'Cluster by genotype',
274
+ icon: CategoryIcon,
225
275
  onClick: () => {
226
276
  getSession(self).queueDialog(handleClose => [
227
277
  ClusterDialog,
@@ -250,26 +300,34 @@ export default function MultiVariantBaseModelF(configSchema) {
250
300
  })
251
301
  .views(self => ({
252
302
  get canDisplayLabels() {
253
- return self.rowHeight > 8 && self.showSidebarLabelsSetting;
303
+ return self.rowHeight >= 8 && self.showSidebarLabelsSetting;
254
304
  },
255
305
  get totalHeight() {
256
306
  var _a;
257
307
  return self.rowHeight * (((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1);
258
308
  },
309
+ get featuresReady() {
310
+ return !!self.featuresVolatile;
311
+ },
259
312
  }))
260
313
  .views(self => ({
261
314
  renderProps() {
262
315
  const superProps = self.adapterProps();
263
316
  return {
264
317
  ...superProps,
265
- notReady: superProps.notReady || !self.sources || !self.featuresVolatile,
318
+ notReady: superProps.notReady || !self.sources || !self.featuresReady,
266
319
  height: self.height,
267
320
  totalHeight: self.totalHeight,
268
321
  renderingMode: self.renderingMode,
269
322
  minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
323
+ lengthCutoffFilter: self.lengthCutoffFilter,
270
324
  rowHeight: self.rowHeight,
271
325
  sources: self.sources,
272
326
  scrollTop: self.scrollTop,
327
+ referenceDrawingMode: self.referenceDrawingMode,
328
+ filters: new SerializableFilterChain({
329
+ filters: self.activeFilters,
330
+ }),
273
331
  };
274
332
  },
275
333
  }));
@@ -0,0 +1,9 @@
1
+ declare const AddFiltersDialog: ({ model, handleClose, }: {
2
+ model: {
3
+ jexlFilters?: string[];
4
+ activeFilters: string[];
5
+ setJexlFilters: (arg?: string[]) => void;
6
+ };
7
+ handleClose: () => void;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default AddFiltersDialog;
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { Dialog } from '@jbrowse/core/ui';
4
+ import { stringToJexlExpression } from '@jbrowse/core/util/jexlStrings';
5
+ import { Button, DialogActions, DialogContent, TextField } from '@mui/material';
6
+ import { observer } from 'mobx-react';
7
+ import { makeStyles } from 'tss-react/mui';
8
+ const useStyles = makeStyles()({
9
+ dialogContent: {
10
+ width: '80em',
11
+ },
12
+ textAreaFont: {
13
+ fontFamily: 'Courier New',
14
+ },
15
+ error: {
16
+ color: 'red',
17
+ fontSize: '0.8em',
18
+ },
19
+ });
20
+ function checkJexl(code) {
21
+ stringToJexlExpression(code);
22
+ }
23
+ const AddFiltersDialog = observer(function ({ model, handleClose, }) {
24
+ const { classes } = useStyles();
25
+ const { activeFilters } = model;
26
+ const [data, setData] = useState(activeFilters.join('\n'));
27
+ const [error, setError] = useState();
28
+ useEffect(() => {
29
+ try {
30
+ data
31
+ .split('\n')
32
+ .map(line => line.trim())
33
+ .filter(line => !!line)
34
+ .map(line => {
35
+ checkJexl(line.trim());
36
+ });
37
+ setError(undefined);
38
+ }
39
+ catch (e) {
40
+ console.error(e);
41
+ setError(e);
42
+ }
43
+ }, [data]);
44
+ return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: handleClose, title: "Add track filters", children: [_jsxs(DialogContent, { children: [_jsxs("div", { children: ["Add filters, in jexl format, one per line, starting with the string jexl:. Examples:", ' ', _jsxs("ul", { children: [_jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'name')=='BRCA1'" }), " - show only feature where the name attribute is BRCA1"] }), _jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'type')=='gene'" }), " - show only gene type features in a GFF that has many other feature types"] }), _jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'score') > 400" }), " - show only features that have a score greater than 400"] }), _jsxs("li", { children: [_jsx("code", { children: "jexl:get(feature,'end') - get(feature,'start') < 1000000" }), ' ', "- show only features with length less than 1Mbp"] })] })] }), error ? _jsx("p", { className: classes.error, children: `${error}` }) : null, _jsx(TextField, { variant: "outlined", multiline: true, minRows: 5, maxRows: 10, className: classes.dialogContent, fullWidth: true, value: data, onChange: event => {
45
+ setData(event.target.value);
46
+ }, slotProps: {
47
+ input: {
48
+ classes: {
49
+ input: classes.textAreaFont,
50
+ },
51
+ },
52
+ } })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, disabled: !!error, onClick: () => {
53
+ model.setJexlFilters(data.split('\n'));
54
+ handleClose();
55
+ }, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
56
+ handleClose();
57
+ }, children: "Cancel" })] })] }));
58
+ });
59
+ export default AddFiltersDialog;
@@ -0,0 +1,5 @@
1
+ import type { MultiVariantBaseModel } from '../MultiVariantBaseModel';
2
+ declare const MultiVariantBaseDisplayComponent: (props: {
3
+ model: MultiVariantBaseModel;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default MultiVariantBaseDisplayComponent;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState } from 'react';
3
+ import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
4
+ import { observer } from 'mobx-react';
5
+ import Crosshair from './MultiVariantCrosshairs';
6
+ import LegendBar from './MultiVariantLegendBar';
7
+ const MultiVariantBaseDisplayComponent = observer(function (props) {
8
+ const { model } = props;
9
+ const ref = useRef(null);
10
+ const [mouseY, setMouseY] = useState();
11
+ const [mouseX, setMouseX] = useState();
12
+ return (_jsxs("div", { ref: ref, onMouseMove: event => {
13
+ var _a;
14
+ const rect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
15
+ const top = (rect === null || rect === void 0 ? void 0 : rect.top) || 0;
16
+ const left = (rect === null || rect === void 0 ? void 0 : rect.left) || 0;
17
+ setMouseY(event.clientY - top);
18
+ setMouseX(event.clientX - left);
19
+ }, onMouseLeave: () => {
20
+ setMouseY(undefined);
21
+ setMouseX(undefined);
22
+ }, children: [_jsx(BaseLinearDisplayComponent, { ...props }), _jsx(LegendBar, { model: model }), mouseX && mouseY ? (_jsx(Crosshair, { mouseX: mouseX, mouseY: mouseY, model: model })) : null] }));
23
+ });
24
+ export default MultiVariantBaseDisplayComponent;
@@ -0,0 +1,6 @@
1
+ import type { ReducedModel } from './types';
2
+ declare const ClusterDialog: ({ model, handleClose, }: {
3
+ model: ReducedModel;
4
+ handleClose: () => void;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default ClusterDialog;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Dialog } from '@jbrowse/core/ui';
4
+ import { FormControlLabel, Radio, RadioGroup, Typography } from '@mui/material';
5
+ import { observer } from 'mobx-react';
6
+ import ClusterDialogAuto from './ClusterDialogAuto';
7
+ import ClusterDialogManual from './ClusterDialogManual';
8
+ function Header({ activeMode, setActiveMode, }) {
9
+ return (_jsxs("div", { children: [_jsx(Typography, { style: { marginBottom: 30 }, children: "This procedure will cluster the visible genotype data using hierarchical clustering" }), _jsx(RadioGroup, { children: Object.entries({
10
+ auto: (_jsx("div", { children: "Run in-app clustering (slower, particularly for large numbers of samples, uses JS implementation of hclust)" })),
11
+ manual: (_jsx("div", { children: "Download R script to run clustering (faster, uses R implementation of hclust)" })),
12
+ }).map(([key, val]) => (_jsx(FormControlLabel, { control: _jsx(Radio, { checked: activeMode === key, onChange: () => {
13
+ setActiveMode(key);
14
+ } }), label: val }, key))) })] }));
15
+ }
16
+ const ClusterDialog = observer(function ({ model, handleClose, }) {
17
+ const [activeMode, setActiveMode] = useState('auto');
18
+ return (_jsx(Dialog, { open: true, title: "Cluster by genotype", onClose: (_, reason) => {
19
+ if (reason !== 'backdropClick') {
20
+ handleClose();
21
+ }
22
+ }, children: activeMode === 'auto' ? (_jsx(ClusterDialogAuto, { model: model, handleClose: handleClose, children: _jsx(Header, { activeMode: activeMode, setActiveMode: setActiveMode }) })) : (_jsx(ClusterDialogManual, { model: model, handleClose: handleClose, children: _jsx(Header, { activeMode: activeMode, setActiveMode: setActiveMode }) })) }));
23
+ });
24
+ export default ClusterDialog;
@@ -0,0 +1,7 @@
1
+ import type { ReducedModel } from './types';
2
+ declare const ClusterDialogAuto: ({ model, children, handleClose, }: {
3
+ model: ReducedModel;
4
+ children: React.ReactNode;
5
+ handleClose: () => void;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default ClusterDialogAuto;
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { ErrorMessage } from '@jbrowse/core/ui';
4
+ import { getContainingView, getSession, isAbortException, } from '@jbrowse/core/util';
5
+ import { createStopToken, stopStopToken } from '@jbrowse/core/util/stopToken';
6
+ import { getRpcSessionId } from '@jbrowse/core/util/tracks';
7
+ import { Button, DialogActions, DialogContent } from '@mui/material';
8
+ import { observer } from 'mobx-react';
9
+ import { isAlive } from 'mobx-state-tree';
10
+ const ClusterDialogAuto = observer(function ({ model, children, handleClose, }) {
11
+ const [progress, setProgress] = useState('');
12
+ const [loading, setLoading] = useState(false);
13
+ const [error, setError] = useState();
14
+ const [stopToken, setStopToken] = useState('');
15
+ return (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { children: [children, _jsxs("div", { children: [loading ? (_jsxs("div", { style: { padding: 50 }, children: [_jsx("span", { children: progress || 'Loading...' }), _jsx(Button, { onClick: () => {
16
+ stopStopToken(stopToken);
17
+ }, children: "Stop" })] })) : null, error ? _jsx(ErrorMessage, { error: error }) : null] })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", disabled: loading, onClick: async () => {
18
+ try {
19
+ setError(undefined);
20
+ setProgress('Initializing');
21
+ setLoading(true);
22
+ const view = getContainingView(model);
23
+ if (!view.initialized) {
24
+ return;
25
+ }
26
+ const { rpcManager } = getSession(model);
27
+ const { sourcesWithoutLayout, minorAlleleFrequencyFilter, lengthCutoffFilter, adapterConfig, } = model;
28
+ if (sourcesWithoutLayout) {
29
+ const sessionId = getRpcSessionId(model);
30
+ const stopToken = createStopToken();
31
+ setStopToken(stopToken);
32
+ const ret = (await rpcManager.call(sessionId, 'MultiVariantClusterGenotypeMatrix', {
33
+ regions: view.dynamicBlocks.contentBlocks,
34
+ sources: sourcesWithoutLayout,
35
+ minorAlleleFrequencyFilter,
36
+ lengthCutoffFilter,
37
+ sessionId,
38
+ adapterConfig,
39
+ stopToken,
40
+ statusCallback: (arg) => {
41
+ setProgress(arg);
42
+ },
43
+ }));
44
+ model.setLayout(ret.order.map(idx => {
45
+ const ret = sourcesWithoutLayout[idx];
46
+ if (!ret) {
47
+ throw new Error(`out of bounds at ${idx}`);
48
+ }
49
+ return ret;
50
+ }));
51
+ }
52
+ handleClose();
53
+ }
54
+ catch (e) {
55
+ if (!isAbortException(e) && isAlive(model)) {
56
+ console.error(e);
57
+ setError(e);
58
+ }
59
+ }
60
+ finally {
61
+ setLoading(false);
62
+ setProgress('');
63
+ setStopToken('');
64
+ }
65
+ }, children: "Run clustering" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
66
+ handleClose();
67
+ if (stopToken) {
68
+ stopStopToken(stopToken);
69
+ }
70
+ }, children: "Cancel" })] })] }));
71
+ });
72
+ export default ClusterDialogAuto;
@@ -0,0 +1,7 @@
1
+ import type { ReducedModel } from './types';
2
+ declare const ClusterDialogManuals: ({ model, handleClose, children, }: {
3
+ model: ReducedModel;
4
+ handleClose: () => void;
5
+ children: React.ReactNode;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default ClusterDialogManuals;