@jbrowse/plugin-variants 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 (539) hide show
  1. package/esm/ChordVariantDisplay/components/ChordVariantDisplay.d.ts +11 -0
  2. package/esm/ChordVariantDisplay/components/ChordVariantDisplay.js +16 -0
  3. package/esm/ChordVariantDisplay/components/DisplayError.d.ts +9 -0
  4. package/esm/ChordVariantDisplay/components/DisplayError.js +7 -0
  5. package/esm/ChordVariantDisplay/components/Loading.d.ts +8 -0
  6. package/esm/ChordVariantDisplay/components/Loading.js +28 -0
  7. package/esm/ChordVariantDisplay/index.js +4 -4
  8. package/esm/ChordVariantDisplay/models/configSchema.d.ts +4 -5
  9. package/esm/ChordVariantDisplay/models/configSchema.js +10 -5
  10. package/esm/ChordVariantDisplay/models/renderReaction.d.ts +30 -0
  11. package/esm/ChordVariantDisplay/models/renderReaction.js +48 -0
  12. package/esm/ChordVariantDisplay/models/renderSvg.d.ts +6 -0
  13. package/esm/ChordVariantDisplay/models/renderSvg.js +12 -0
  14. package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +535 -46
  15. package/esm/ChordVariantDisplay/models/stateModelFactory.js +146 -8
  16. package/esm/LinearVariantDisplay/configSchema.d.ts +5 -5
  17. package/esm/LinearVariantDisplay/configSchema.js +2 -2
  18. package/esm/LinearVariantDisplay/index.js +6 -4
  19. package/esm/LinearVariantDisplay/model.d.ts +1086 -103
  20. package/esm/LinearVariantDisplay/model.js +10 -26
  21. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -1
  22. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +8 -18
  23. package/esm/MultiLinearVariantDisplay/configSchema.d.ts +6 -44
  24. package/esm/MultiLinearVariantDisplay/configSchema.js +2 -2
  25. package/esm/MultiLinearVariantDisplay/index.js +4 -3
  26. package/esm/MultiLinearVariantDisplay/model.d.ts +1031 -125
  27. package/esm/MultiLinearVariantDisplay/model.js +3 -23
  28. package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -1
  29. package/esm/MultiLinearVariantDisplay/renderSvg.js +4 -4
  30. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +8 -2
  31. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +26 -23
  32. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -1
  33. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +9 -20
  34. package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +6 -6
  35. package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +1 -1
  36. package/esm/MultiLinearVariantMatrixDisplay/index.js +5 -4
  37. package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +1110 -131
  38. package/esm/MultiLinearVariantMatrixDisplay/model.js +22 -48
  39. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -1
  40. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -3
  41. package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +4 -35
  42. package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +19 -33
  43. package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +12 -1
  44. package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +48 -22
  45. package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +1 -1
  46. package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
  47. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -2
  48. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +155 -135
  49. package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -14
  50. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +3 -60
  51. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +9 -18
  52. package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +7 -6
  53. package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +30 -26
  54. package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -1
  55. package/esm/MultiLinearVariantRenderer/index.js +4 -4
  56. package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +14 -11
  57. package/esm/MultiLinearVariantRenderer/makeImageData.js +127 -110
  58. package/esm/MultiLinearVariantRenderer/types.d.ts +3 -20
  59. package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +1 -1
  60. package/esm/SplitVcfTabixAdapter/configSchema.d.ts +2 -2
  61. package/esm/SplitVcfTabixAdapter/index.d.ts +1 -1
  62. package/esm/SplitVcfTabixAdapter/index.js +3 -3
  63. package/esm/StructuralVariantChordRenderer/Chord.d.ts +1 -1
  64. package/esm/StructuralVariantChordRenderer/Chord.js +41 -58
  65. package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
  66. package/esm/StructuralVariantChordRenderer/ReactComponent.js +3 -3
  67. package/esm/StructuralVariantChordRenderer/configSchema.d.ts +2 -2
  68. package/esm/StructuralVariantChordRenderer/index.js +3 -3
  69. package/esm/Tooltip.js +2 -2
  70. package/esm/VariantFeatureWidget/AltFormatter.js +1 -1
  71. package/esm/VariantFeatureWidget/Formatter.js +2 -2
  72. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.d.ts +1 -0
  73. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.js +1 -0
  74. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +1 -1
  75. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +8 -23
  76. package/esm/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +1 -1
  77. package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
  78. package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -29
  79. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +5 -2
  80. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +68 -59
  81. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +13 -2
  82. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +1 -1
  83. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +72 -30
  84. package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +2 -2
  85. package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +49 -26
  86. package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +3 -5
  87. package/esm/VariantFeatureWidget/configSchema.d.ts +1 -1
  88. package/esm/VariantFeatureWidget/index.js +3 -3
  89. package/esm/VariantFeatureWidget/stateModelFactory.d.ts +39 -39
  90. package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
  91. package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -7
  92. package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +3 -14
  93. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +4 -2
  94. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +2 -5
  95. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +2 -2
  96. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +34 -19
  97. package/esm/VariantRPC/MultiVariantGetSources.js +2 -6
  98. package/esm/VariantRPC/executeClusterGenotypeMatrix.d.ts +22 -0
  99. package/esm/VariantRPC/executeClusterGenotypeMatrix.js +19 -0
  100. package/esm/VariantRPC/getGenotypeMatrix.d.ts +18 -3
  101. package/esm/VariantRPC/getGenotypeMatrix.js +23 -40
  102. package/esm/VariantRPC/types.d.ts +10 -24
  103. package/esm/VariantTrack/configSchema.d.ts +16 -11
  104. package/esm/VariantTrack/index.js +13 -2
  105. package/esm/VariantTrack/saveTrackFormats/vcf.d.ts +4 -0
  106. package/esm/VariantTrack/saveTrackFormats/vcf.js +15 -0
  107. package/esm/VcfAdapter/VcfAdapter.d.ts +6 -3
  108. package/esm/VcfAdapter/VcfAdapter.js +36 -24
  109. package/esm/VcfAdapter/configSchema.d.ts +2 -2
  110. package/esm/VcfAdapter/index.js +3 -2
  111. package/esm/VcfExtensionPoints/index.d.ts +2 -0
  112. package/esm/{extensionPoints.js → VcfExtensionPoints/index.js} +1 -1
  113. package/esm/VcfFeature/index.js +20 -8
  114. package/esm/VcfFeature/util.d.ts +0 -1
  115. package/esm/VcfFeature/util.js +70 -188
  116. package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +2 -0
  117. package/esm/VcfTabixAdapter/VcfTabixAdapter.js +28 -3
  118. package/esm/VcfTabixAdapter/configSchema.d.ts +5 -5
  119. package/esm/VcfTabixAdapter/configSchema.js +1 -1
  120. package/esm/VcfTabixAdapter/index.d.ts +1 -1
  121. package/esm/VcfTabixAdapter/index.js +4 -3
  122. package/esm/d3-hierarchy2/accessors.d.ts +2 -0
  123. package/esm/d3-hierarchy2/accessors.js +8 -0
  124. package/esm/d3-hierarchy2/array.d.ts +2 -0
  125. package/esm/d3-hierarchy2/array.js +15 -0
  126. package/esm/d3-hierarchy2/cluster.d.ts +8 -0
  127. package/esm/d3-hierarchy2/cluster.js +63 -0
  128. package/esm/d3-hierarchy2/constant.d.ts +2 -0
  129. package/esm/d3-hierarchy2/constant.js +8 -0
  130. package/esm/d3-hierarchy2/hierarchy/ancestors.d.ts +1 -0
  131. package/esm/d3-hierarchy2/hierarchy/ancestors.js +7 -0
  132. package/esm/d3-hierarchy2/hierarchy/count.d.ts +1 -0
  133. package/esm/d3-hierarchy2/hierarchy/count.js +12 -0
  134. package/esm/d3-hierarchy2/hierarchy/descendants.d.ts +1 -0
  135. package/esm/d3-hierarchy2/hierarchy/descendants.js +3 -0
  136. package/esm/d3-hierarchy2/hierarchy/each.d.ts +1 -0
  137. package/esm/d3-hierarchy2/hierarchy/each.js +7 -0
  138. package/esm/d3-hierarchy2/hierarchy/eachAfter.d.ts +1 -0
  139. package/esm/d3-hierarchy2/hierarchy/eachAfter.js +15 -0
  140. package/esm/d3-hierarchy2/hierarchy/eachBefore.d.ts +1 -0
  141. package/esm/d3-hierarchy2/hierarchy/eachBefore.js +12 -0
  142. package/esm/d3-hierarchy2/hierarchy/find.d.ts +1 -0
  143. package/esm/d3-hierarchy2/hierarchy/find.js +8 -0
  144. package/esm/d3-hierarchy2/hierarchy/index.d.ts +3 -0
  145. package/esm/d3-hierarchy2/hierarchy/index.js +78 -0
  146. package/esm/d3-hierarchy2/hierarchy/iterator.d.ts +1 -0
  147. package/esm/d3-hierarchy2/hierarchy/iterator.js +14 -0
  148. package/esm/d3-hierarchy2/hierarchy/leaves.d.ts +1 -0
  149. package/esm/d3-hierarchy2/hierarchy/leaves.js +9 -0
  150. package/esm/d3-hierarchy2/hierarchy/links.d.ts +1 -0
  151. package/esm/d3-hierarchy2/hierarchy/links.js +9 -0
  152. package/esm/d3-hierarchy2/hierarchy/path.d.ts +1 -0
  153. package/esm/d3-hierarchy2/hierarchy/path.js +26 -0
  154. package/esm/d3-hierarchy2/hierarchy/sort.d.ts +1 -0
  155. package/esm/d3-hierarchy2/hierarchy/sort.js +7 -0
  156. package/esm/d3-hierarchy2/hierarchy/sum.d.ts +1 -0
  157. package/esm/d3-hierarchy2/hierarchy/sum.js +8 -0
  158. package/esm/d3-hierarchy2/index.d.ts +15 -0
  159. package/esm/d3-hierarchy2/index.js +15 -0
  160. package/esm/d3-hierarchy2/lcg.d.ts +1 -0
  161. package/esm/d3-hierarchy2/lcg.js +7 -0
  162. package/esm/d3-hierarchy2/pack/enclose.d.ts +10 -0
  163. package/esm/d3-hierarchy2/pack/enclose.js +84 -0
  164. package/esm/d3-hierarchy2/pack/index.d.ts +7 -0
  165. package/esm/d3-hierarchy2/pack/index.js +68 -0
  166. package/esm/d3-hierarchy2/pack/siblings.d.ts +2 -0
  167. package/esm/d3-hierarchy2/pack/siblings.js +94 -0
  168. package/esm/d3-hierarchy2/partition.d.ts +6 -0
  169. package/esm/d3-hierarchy2/partition.js +42 -0
  170. package/esm/d3-hierarchy2/stratify.d.ts +9 -0
  171. package/esm/d3-hierarchy2/stratify.js +115 -0
  172. package/esm/d3-hierarchy2/tree.d.ts +8 -0
  173. package/esm/d3-hierarchy2/tree.js +153 -0
  174. package/esm/d3-hierarchy2/treemap/binary.d.ts +1 -0
  175. package/esm/d3-hierarchy2/treemap/binary.js +36 -0
  176. package/esm/d3-hierarchy2/treemap/dice.d.ts +1 -0
  177. package/esm/d3-hierarchy2/treemap/dice.js +7 -0
  178. package/esm/d3-hierarchy2/treemap/index.d.ts +17 -0
  179. package/esm/d3-hierarchy2/treemap/index.js +72 -0
  180. package/esm/d3-hierarchy2/treemap/resquarify.d.ts +5 -0
  181. package/esm/d3-hierarchy2/treemap/resquarify.js +28 -0
  182. package/esm/d3-hierarchy2/treemap/round.d.ts +1 -0
  183. package/esm/d3-hierarchy2/treemap/round.js +6 -0
  184. package/esm/d3-hierarchy2/treemap/slice.d.ts +1 -0
  185. package/esm/d3-hierarchy2/treemap/slice.js +7 -0
  186. package/esm/d3-hierarchy2/treemap/sliceDice.d.ts +1 -0
  187. package/esm/d3-hierarchy2/treemap/sliceDice.js +5 -0
  188. package/esm/d3-hierarchy2/treemap/squarify.d.ts +11 -0
  189. package/esm/d3-hierarchy2/treemap/squarify.js +46 -0
  190. package/esm/index.d.ts +1 -1
  191. package/esm/index.js +19 -22
  192. package/esm/shared/MultiVariantBaseModel.d.ts +1103 -117
  193. package/esm/shared/MultiVariantBaseModel.js +231 -65
  194. package/esm/shared/SharedVariantConfigSchema.d.ts +2 -40
  195. package/esm/shared/SharedVariantConfigSchema.js +1 -46
  196. package/esm/shared/components/AddFiltersDialog.d.ts +2 -3
  197. package/esm/shared/components/AddFiltersDialog.js +20 -28
  198. package/esm/shared/components/{ui/SetColorDialog.d.ts → BaseSetColorDialog.d.ts} +2 -1
  199. package/esm/shared/components/BaseSetColorDialog.js +61 -0
  200. package/esm/shared/components/ClearTreeWarningDialog.d.ts +4 -0
  201. package/esm/shared/components/ClearTreeWarningDialog.js +9 -0
  202. package/esm/shared/components/MAFFilterDialog.d.ts +2 -3
  203. package/esm/shared/components/MAFFilterDialog.js +4 -8
  204. package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +1 -1
  205. package/esm/shared/components/MultiVariantBaseDisplayComponent.js +8 -17
  206. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +1 -1
  207. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.js +3 -3
  208. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +1 -1
  209. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +9 -14
  210. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +1 -1
  211. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +11 -15
  212. package/esm/shared/components/MultiVariantClusterDialog/types.d.ts +3 -2
  213. package/esm/shared/components/MultiVariantColorLegend.d.ts +1 -1
  214. package/esm/shared/components/MultiVariantColorLegend.js +22 -12
  215. package/esm/shared/components/MultiVariantCrosshairs.d.ts +4 -2
  216. package/esm/shared/components/MultiVariantCrosshairs.js +31 -23
  217. package/esm/shared/components/MultiVariantLegendBar.d.ts +4 -4
  218. package/esm/shared/components/MultiVariantLegendBar.js +24 -22
  219. package/esm/shared/components/MultiVariantLegendBarWrapper.d.ts +7 -0
  220. package/esm/shared/components/MultiVariantLegendBarWrapper.js +18 -0
  221. package/esm/shared/components/MultiVariantTooltip.d.ts +5 -6
  222. package/esm/shared/components/MultiVariantTooltip.js +35 -17
  223. package/esm/shared/components/ScrollableVariantContainer.d.ts +8 -0
  224. package/esm/shared/components/ScrollableVariantContainer.js +23 -0
  225. package/esm/shared/components/SetColorDialog.d.ts +3 -2
  226. package/esm/shared/components/SetColorDialog.js +2 -2
  227. package/esm/shared/components/SetColorDialogBulkEditPanel.d.ts +7 -8
  228. package/esm/shared/components/SetColorDialogBulkEditPanel.js +24 -54
  229. package/esm/shared/components/SetColorDialogRowPalettizer.js +13 -23
  230. package/esm/shared/components/SetRowHeightDialog.d.ts +2 -3
  231. package/esm/shared/components/SourcesDataGrid.d.ts +1 -1
  232. package/esm/shared/components/SourcesDataGrid.js +1 -1
  233. package/esm/shared/components/SourcesGrid.d.ts +1 -1
  234. package/esm/shared/components/SourcesGrid.js +2 -2
  235. package/esm/shared/components/SourcesGridHeader.d.ts +1 -1
  236. package/esm/shared/components/SourcesGridHeader.js +1 -1
  237. package/esm/shared/components/SvgTree.d.ts +5 -0
  238. package/esm/shared/components/SvgTree.js +19 -0
  239. package/esm/shared/components/TreeSidebar.d.ts +5 -0
  240. package/esm/shared/components/TreeSidebar.js +121 -0
  241. package/esm/shared/components/types.d.ts +43 -0
  242. package/esm/shared/components/types.js +1 -0
  243. package/esm/shared/constants.d.ts +8 -2
  244. package/esm/shared/constants.js +11 -2
  245. package/esm/shared/drawAlleleCount.d.ts +2 -1
  246. package/esm/shared/drawAlleleCount.js +50 -16
  247. package/esm/shared/drawPhased.js +11 -12
  248. package/{dist → esm/shared}/getMultiVariantFeaturesAutorun.d.ts +5 -4
  249. package/esm/{getMultiVariantFeaturesAutorun.js → shared/getMultiVariantFeaturesAutorun.js} +9 -2
  250. package/esm/{getMultiVariantSourcesAutorun.d.ts → shared/getMultiVariantSourcesAutorun.d.ts} +4 -3
  251. package/esm/{getMultiVariantSourcesAutorun.js → shared/getMultiVariantSourcesAutorun.js} +10 -2
  252. package/esm/shared/getSources.d.ts +1 -1
  253. package/esm/shared/getSources.js +2 -2
  254. package/esm/shared/hooks/useMouseTracking.d.ts +6 -0
  255. package/esm/shared/hooks/useMouseTracking.js +34 -0
  256. package/esm/shared/makeSidebarSvg.d.ts +9 -0
  257. package/esm/shared/makeSidebarSvg.js +9 -0
  258. package/esm/shared/minorAlleleFrequencyUtils.d.ts +6 -5
  259. package/esm/shared/minorAlleleFrequencyUtils.js +37 -38
  260. package/esm/shared/setupMultiVariantAutoruns.d.ts +2 -0
  261. package/esm/shared/setupMultiVariantAutoruns.js +8 -0
  262. package/esm/shared/treeDrawingAutorun.d.ts +16 -0
  263. package/esm/shared/treeDrawingAutorun.js +71 -0
  264. package/esm/shared/types.d.ts +15 -0
  265. package/package.json +38 -39
  266. package/dist/ChordVariantDisplay/index.d.ts +0 -2
  267. package/dist/ChordVariantDisplay/index.js +0 -25
  268. package/dist/ChordVariantDisplay/models/configSchema.d.ts +0 -12
  269. package/dist/ChordVariantDisplay/models/configSchema.js +0 -15
  270. package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +0 -115
  271. package/dist/ChordVariantDisplay/models/stateModelFactory.js +0 -35
  272. package/dist/LinearVariantDisplay/configSchema.d.ts +0 -34
  273. package/dist/LinearVariantDisplay/configSchema.js +0 -12
  274. package/dist/LinearVariantDisplay/index.d.ts +0 -2
  275. package/dist/LinearVariantDisplay/index.js +0 -24
  276. package/dist/LinearVariantDisplay/model.d.ts +0 -278
  277. package/dist/LinearVariantDisplay/model.js +0 -37
  278. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +0 -5
  279. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +0 -29
  280. package/dist/MultiLinearVariantDisplay/configSchema.d.ts +0 -80
  281. package/dist/MultiLinearVariantDisplay/configSchema.js +0 -30
  282. package/dist/MultiLinearVariantDisplay/index.d.ts +0 -2
  283. package/dist/MultiLinearVariantDisplay/index.js +0 -57
  284. package/dist/MultiLinearVariantDisplay/model.d.ts +0 -422
  285. package/dist/MultiLinearVariantDisplay/model.js +0 -82
  286. package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +0 -3
  287. package/dist/MultiLinearVariantDisplay/renderSvg.js +0 -15
  288. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +0 -6
  289. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +0 -83
  290. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +0 -5
  291. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +0 -31
  292. package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +0 -37
  293. package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +0 -22
  294. package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +0 -2
  295. package/dist/MultiLinearVariantMatrixDisplay/index.js +0 -24
  296. package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +0 -431
  297. package/dist/MultiLinearVariantMatrixDisplay/model.js +0 -125
  298. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +0 -3
  299. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +0 -17
  300. package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +0 -37
  301. package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +0 -87
  302. package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +0 -8
  303. package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +0 -41
  304. package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +0 -2
  305. package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +0 -6
  306. package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +0 -2
  307. package/dist/MultiLinearVariantMatrixRenderer/index.js +0 -20
  308. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +0 -14
  309. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +0 -154
  310. package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +0 -14
  311. package/dist/MultiLinearVariantMatrixRenderer/types.js +0 -2
  312. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +0 -63
  313. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +0 -79
  314. package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +0 -33
  315. package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +0 -67
  316. package/dist/MultiLinearVariantRenderer/components/util.d.ts +0 -1
  317. package/dist/MultiLinearVariantRenderer/components/util.js +0 -15
  318. package/dist/MultiLinearVariantRenderer/configSchema.d.ts +0 -2
  319. package/dist/MultiLinearVariantRenderer/configSchema.js +0 -8
  320. package/dist/MultiLinearVariantRenderer/index.d.ts +0 -2
  321. package/dist/MultiLinearVariantRenderer/index.js +0 -19
  322. package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +0 -14
  323. package/dist/MultiLinearVariantRenderer/makeImageData.js +0 -140
  324. package/dist/MultiLinearVariantRenderer/types.d.ts +0 -21
  325. package/dist/MultiLinearVariantRenderer/types.js +0 -2
  326. package/dist/MultiVariantBaseRenderer.d.ts +0 -46
  327. package/dist/MultiVariantBaseRenderer.js +0 -39
  328. package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -18
  329. package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -92
  330. package/dist/SplitVcfTabixAdapter/configSchema.d.ts +0 -23
  331. package/dist/SplitVcfTabixAdapter/configSchema.js +0 -29
  332. package/dist/SplitVcfTabixAdapter/index.d.ts +0 -3
  333. package/dist/SplitVcfTabixAdapter/index.js +0 -52
  334. package/dist/StructuralVariantChordRenderer/Chord.d.ts +0 -13
  335. package/dist/StructuralVariantChordRenderer/Chord.js +0 -82
  336. package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +0 -16
  337. package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -30
  338. package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -21
  339. package/dist/StructuralVariantChordRenderer/configSchema.js +0 -25
  340. package/dist/StructuralVariantChordRenderer/index.d.ts +0 -2
  341. package/dist/StructuralVariantChordRenderer/index.js +0 -18
  342. package/dist/StructuralVariantChordRenderer/types.d.ts +0 -17
  343. package/dist/StructuralVariantChordRenderer/types.js +0 -2
  344. package/dist/Tooltip.d.ts +0 -19
  345. package/dist/Tooltip.js +0 -32
  346. package/dist/VariantFeatureWidget/AltFormatter.d.ts +0 -4
  347. package/dist/VariantFeatureWidget/AltFormatter.js +0 -13
  348. package/dist/VariantFeatureWidget/Checkbox2.d.ts +0 -6
  349. package/dist/VariantFeatureWidget/Checkbox2.js +0 -8
  350. package/dist/VariantFeatureWidget/Formatter.d.ts +0 -3
  351. package/dist/VariantFeatureWidget/Formatter.js +0 -23
  352. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
  353. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -5
  354. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
  355. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -5
  356. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +0 -7
  357. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +0 -111
  358. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
  359. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -60
  360. package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
  361. package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -8
  362. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.d.ts +0 -5
  363. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +0 -15
  364. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.d.ts +0 -5
  365. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.js +0 -18
  366. package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +0 -5
  367. package/dist/VariantFeatureWidget/VariantFeatureWidget.js +0 -103
  368. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +0 -4
  369. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +0 -80
  370. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.d.ts +0 -9
  371. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +0 -10
  372. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +0 -6
  373. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +0 -54
  374. package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +0 -5
  375. package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +0 -51
  376. package/dist/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
  377. package/dist/VariantFeatureWidget/VariantSampleGrid/index.js +0 -8
  378. package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +0 -21
  379. package/dist/VariantFeatureWidget/VariantSampleGrid/types.js +0 -2
  380. package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
  381. package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +0 -14
  382. package/dist/VariantFeatureWidget/configSchema.d.ts +0 -1
  383. package/dist/VariantFeatureWidget/configSchema.js +0 -5
  384. package/dist/VariantFeatureWidget/index.d.ts +0 -2
  385. package/dist/VariantFeatureWidget/index.js +0 -52
  386. package/dist/VariantFeatureWidget/stateModelFactory.d.ts +0 -104
  387. package/dist/VariantFeatureWidget/stateModelFactory.js +0 -12
  388. package/dist/VariantFeatureWidget/types.d.ts +0 -16
  389. package/dist/VariantFeatureWidget/types.js +0 -2
  390. package/dist/VariantFeatureWidget/variantFieldDescriptions.d.ts +0 -9
  391. package/dist/VariantFeatureWidget/variantFieldDescriptions.js +0 -12
  392. package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +0 -14
  393. package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +0 -30
  394. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +0 -6
  395. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +0 -21
  396. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +0 -19
  397. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +0 -58
  398. package/dist/VariantRPC/MultiVariantGetSources.d.ts +0 -14
  399. package/dist/VariantRPC/MultiVariantGetSources.js +0 -22
  400. package/dist/VariantRPC/getGenotypeMatrix.d.ts +0 -6
  401. package/dist/VariantRPC/getGenotypeMatrix.js +0 -68
  402. package/dist/VariantRPC/types.d.ts +0 -36
  403. package/dist/VariantRPC/types.js +0 -2
  404. package/dist/VariantTrack/configSchema.d.ts +0 -79
  405. package/dist/VariantTrack/configSchema.js +0 -10
  406. package/dist/VariantTrack/index.d.ts +0 -2
  407. package/dist/VariantTrack/index.js +0 -20
  408. package/dist/VcfAdapter/VcfAdapter.d.ts +0 -35
  409. package/dist/VcfAdapter/VcfAdapter.js +0 -119
  410. package/dist/VcfAdapter/configSchema.d.ts +0 -18
  411. package/dist/VcfAdapter/configSchema.js +0 -35
  412. package/dist/VcfAdapter/index.d.ts +0 -2
  413. package/dist/VcfAdapter/index.js +0 -49
  414. package/dist/VcfAdapter/vcfParser.d.ts +0 -7
  415. package/dist/VcfAdapter/vcfParser.js +0 -26
  416. package/dist/VcfFeature/index.d.ts +0 -19
  417. package/dist/VcfFeature/index.js +0 -80
  418. package/dist/VcfFeature/util.d.ts +0 -6
  419. package/dist/VcfFeature/util.js +0 -227
  420. package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -25
  421. package/dist/VcfTabixAdapter/VcfTabixAdapter.js +0 -117
  422. package/dist/VcfTabixAdapter/configSchema.d.ts +0 -32
  423. package/dist/VcfTabixAdapter/configSchema.js +0 -56
  424. package/dist/VcfTabixAdapter/index.d.ts +0 -3
  425. package/dist/VcfTabixAdapter/index.js +0 -52
  426. package/dist/extensionPoints.d.ts +0 -2
  427. package/dist/extensionPoints.js +0 -39
  428. package/dist/getMultiVariantFeaturesAutorun.js +0 -48
  429. package/dist/getMultiVariantSourcesAutorun.d.ts +0 -11
  430. package/dist/getMultiVariantSourcesAutorun.js +0 -38
  431. package/dist/index.d.ts +0 -7
  432. package/dist/index.js +0 -52
  433. package/dist/shared/MultiVariantBaseModel.d.ts +0 -413
  434. package/dist/shared/MultiVariantBaseModel.js +0 -373
  435. package/dist/shared/SharedVariantConfigSchema.d.ts +0 -66
  436. package/dist/shared/SharedVariantConfigSchema.js +0 -56
  437. package/dist/shared/SharedVariantMixin.d.ts +0 -325
  438. package/dist/shared/SharedVariantMixin.js +0 -58
  439. package/dist/shared/components/AddFiltersDialog.d.ts +0 -9
  440. package/dist/shared/components/AddFiltersDialog.js +0 -61
  441. package/dist/shared/components/MAFFilterDialog.d.ts +0 -8
  442. package/dist/shared/components/MAFFilterDialog.js +0 -28
  443. package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +0 -5
  444. package/dist/shared/components/MultiVariantBaseDisplayComponent.js +0 -29
  445. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +0 -6
  446. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.js +0 -29
  447. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +0 -7
  448. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +0 -74
  449. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +0 -7
  450. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +0 -145
  451. package/dist/shared/components/MultiVariantClusterDialog/types.d.ts +0 -10
  452. package/dist/shared/components/MultiVariantClusterDialog/types.js +0 -2
  453. package/dist/shared/components/MultiVariantColorLegend.d.ts +0 -10
  454. package/dist/shared/components/MultiVariantColorLegend.js +0 -24
  455. package/dist/shared/components/MultiVariantCrosshairs.d.ts +0 -7
  456. package/dist/shared/components/MultiVariantCrosshairs.js +0 -40
  457. package/dist/shared/components/MultiVariantLegendBar.d.ts +0 -7
  458. package/dist/shared/components/MultiVariantLegendBar.js +0 -32
  459. package/dist/shared/components/MultiVariantTooltip.d.ts +0 -10
  460. package/dist/shared/components/MultiVariantTooltip.js +0 -24
  461. package/dist/shared/components/RectBg.d.ts +0 -8
  462. package/dist/shared/components/RectBg.js +0 -10
  463. package/dist/shared/components/SetColorDialog.d.ts +0 -11
  464. package/dist/shared/components/SetColorDialog.js +0 -12
  465. package/dist/shared/components/SetColorDialogBulkEditPanel.d.ts +0 -10
  466. package/dist/shared/components/SetColorDialogBulkEditPanel.js +0 -84
  467. package/dist/shared/components/SetColorDialogHelpfulTips.d.ts +0 -1
  468. package/dist/shared/components/SetColorDialogHelpfulTips.js +0 -7
  469. package/dist/shared/components/SetColorDialogRowPalettizer.d.ts +0 -10
  470. package/dist/shared/components/SetColorDialogRowPalettizer.js +0 -41
  471. package/dist/shared/components/SetMinMaxDialog.d.ts +0 -10
  472. package/dist/shared/components/SetMinMaxDialog.js +0 -26
  473. package/dist/shared/components/SetRowHeightDialog.d.ts +0 -8
  474. package/dist/shared/components/SetRowHeightDialog.js +0 -18
  475. package/dist/shared/components/SourcesDataGrid.d.ts +0 -7
  476. package/dist/shared/components/SourcesDataGrid.js +0 -68
  477. package/dist/shared/components/SourcesGrid.d.ts +0 -7
  478. package/dist/shared/components/SourcesGrid.js +0 -14
  479. package/dist/shared/components/SourcesGridHeader.d.ts +0 -8
  480. package/dist/shared/components/SourcesGridHeader.js +0 -41
  481. package/dist/shared/components/ui/SetColorDialog.d.ts +0 -31
  482. package/dist/shared/components/ui/SetColorDialog.js +0 -51
  483. package/dist/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
  484. package/dist/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -84
  485. package/dist/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
  486. package/dist/shared/components/ui/SetColorDialogHelpfulTips.js +0 -7
  487. package/dist/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
  488. package/dist/shared/components/ui/SetColorDialogRowPalettizer.js +0 -41
  489. package/dist/shared/constants.d.ts +0 -2
  490. package/dist/shared/constants.js +0 -5
  491. package/dist/shared/drawAlleleCount.d.ts +0 -2
  492. package/dist/shared/drawAlleleCount.js +0 -50
  493. package/dist/shared/drawPhased.d.ts +0 -1
  494. package/dist/shared/drawPhased.js +0 -25
  495. package/dist/shared/findSecondLargestNumber.d.ts +0 -0
  496. package/dist/shared/findSecondLargestNumber.js +0 -1
  497. package/dist/shared/getSources.d.ts +0 -15
  498. package/dist/shared/getSources.js +0 -34
  499. package/dist/shared/minorAlleleFrequencyUtils.d.ts +0 -14
  500. package/dist/shared/minorAlleleFrequencyUtils.js +0 -72
  501. package/dist/shared/sourcesGridUtils.d.ts +0 -11
  502. package/dist/shared/sourcesGridUtils.js +0 -32
  503. package/dist/shared/types.d.ts +0 -14
  504. package/dist/shared/types.js +0 -2
  505. package/dist/shared/util.d.ts +0 -2
  506. package/dist/shared/util.js +0 -21
  507. package/dist/util.d.ts +0 -0
  508. package/dist/util.js +0 -1
  509. package/esm/MultiVariantBaseRenderer.d.ts +0 -46
  510. package/esm/MultiVariantBaseRenderer.js +0 -33
  511. package/esm/VariantFeatureWidget/Checkbox2.d.ts +0 -6
  512. package/esm/VariantFeatureWidget/Checkbox2.js +0 -5
  513. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
  514. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -1
  515. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
  516. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -1
  517. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
  518. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -24
  519. package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
  520. package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -1
  521. package/esm/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
  522. package/esm/VariantFeatureWidget/VariantSampleGrid/index.js +0 -1
  523. package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
  524. package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +0 -11
  525. package/esm/extensionPoints.d.ts +0 -2
  526. package/esm/getMultiVariantFeaturesAutorun.d.ts +0 -18
  527. package/esm/shared/SharedVariantMixin.d.ts +0 -325
  528. package/esm/shared/SharedVariantMixin.js +0 -55
  529. package/esm/shared/components/ui/SetColorDialog.js +0 -45
  530. package/esm/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
  531. package/esm/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -81
  532. package/esm/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
  533. package/esm/shared/components/ui/SetColorDialogHelpfulTips.js +0 -4
  534. package/esm/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
  535. package/esm/shared/components/ui/SetColorDialogRowPalettizer.js +0 -38
  536. package/esm/shared/findSecondLargestNumber.d.ts +0 -0
  537. package/esm/shared/findSecondLargestNumber.js +0 -1
  538. package/esm/shared/util.d.ts +0 -2
  539. package/esm/shared/util.js +0 -17
@@ -1,115 +1,130 @@
1
- import { featureSpanPx, forEachWithStopTokenCheck, updateStatus, } from '@jbrowse/core/util';
1
+ import { featureSpanPx, updateStatus } from '@jbrowse/core/util';
2
2
  import Flatbush from '@jbrowse/core/util/flatbush';
3
- import { checkStopToken } from '@jbrowse/core/util/stopToken';
4
- import { f2 } from '../shared/constants';
5
- import { drawColorAlleleCount, getColorAlleleCount, } from '../shared/drawAlleleCount';
6
- import { drawPhased } from '../shared/drawPhased';
7
- import { getFeaturesThatPassMinorAlleleFrequencyFilter } from '../shared/minorAlleleFrequencyUtils';
3
+ import { checkStopToken2, createStopTokenChecker, } from '@jbrowse/core/util/stopToken';
4
+ import { f2 } from "../shared/constants.js";
5
+ import { drawColorAlleleCount, getAlleleColor, } from "../shared/drawAlleleCount.js";
6
+ import { drawPhased } from "../shared/drawPhased.js";
7
+ import { getFeaturesThatPassMinorAlleleFrequencyFilter } from "../shared/minorAlleleFrequencyUtils.js";
8
+ function drawPhasedMode(drawCtx, itemData, mafs) {
9
+ const { ctx, sources, region, bpPerPx, startRow, endRow, h, drawH, scrollTop, splitCache, drawRef, genotypesCache, stopToken, } = drawCtx;
10
+ const { items, coords } = itemData;
11
+ const lastCheck = createStopTokenChecker(stopToken);
12
+ for (const { feature } of mafs) {
13
+ const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
14
+ const featureId = feature.id();
15
+ const bpLen = feature.get('end') - feature.get('start');
16
+ const w = Math.max(Math.round(rightPx - leftPx), 2);
17
+ const x = Math.floor(leftPx);
18
+ let samp = genotypesCache.get(featureId);
19
+ if (!samp) {
20
+ samp = feature.get('genotypes');
21
+ genotypesCache.set(featureId, samp);
22
+ }
23
+ for (let j = startRow; j < endRow; j++) {
24
+ const y = j * h - scrollTop;
25
+ const { name, HP } = sources[j];
26
+ const genotype = samp[name];
27
+ if (genotype) {
28
+ const isPhased = genotype.includes('|');
29
+ if (isPhased) {
30
+ const alleles = splitCache[genotype] ?? (splitCache[genotype] = genotype.split('|'));
31
+ if (drawPhased(alleles, ctx, x, y, w, drawH, HP, undefined, drawRef)) {
32
+ items.push({ name, genotype, featureId, bpLen });
33
+ coords.push(x, y, x + w, y + drawH);
34
+ }
35
+ }
36
+ else {
37
+ ctx.fillStyle = 'black';
38
+ ctx.fillRect(x - f2, y - f2, w + f2, drawH + f2);
39
+ }
40
+ }
41
+ }
42
+ checkStopToken2(lastCheck);
43
+ }
44
+ }
45
+ function drawAlleleCountMode(drawCtx, itemData, mafs, colorCache) {
46
+ const { ctx, sources, region, bpPerPx, startRow, endRow, h, drawH, scrollTop, splitCache, drawRef, genotypesCache, stopToken, } = drawCtx;
47
+ const { items, coords } = itemData;
48
+ const lastCheck = createStopTokenChecker(stopToken);
49
+ for (const { mostFrequentAlt, feature } of mafs) {
50
+ const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
51
+ const featureId = feature.id();
52
+ const bpLen = feature.get('end') - feature.get('start');
53
+ const w = Math.max(Math.round(rightPx - leftPx), 2);
54
+ const x = Math.floor(leftPx);
55
+ let samp = genotypesCache.get(featureId);
56
+ if (!samp) {
57
+ samp = feature.get('genotypes');
58
+ genotypesCache.set(featureId, samp);
59
+ }
60
+ const featureType = feature.get('type');
61
+ const featureStrand = feature.get('strand');
62
+ const alpha = bpLen > 5 ? 0.75 : 1;
63
+ for (let j = startRow; j < endRow; j++) {
64
+ const y = j * h - scrollTop;
65
+ const { name } = sources[j];
66
+ const genotype = samp[name];
67
+ if (genotype) {
68
+ const c = getAlleleColor(genotype, mostFrequentAlt, colorCache, splitCache, drawRef);
69
+ if (c) {
70
+ drawColorAlleleCount(c, ctx, x, y, w, drawH, featureType, featureStrand, alpha);
71
+ items.push({ name, genotype, featureId, bpLen });
72
+ coords.push(x, y, x + w, y + drawH);
73
+ }
74
+ }
75
+ }
76
+ checkStopToken2(lastCheck);
77
+ }
78
+ }
8
79
  export async function makeImageData(ctx, props) {
9
- const { scrollTop, minorAlleleFrequencyFilter, sources, rowHeight, features, regions, bpPerPx, renderingMode, stopToken, lengthCutoffFilter, referenceDrawingMode, } = props;
80
+ const { scrollTop, minorAlleleFrequencyFilter, sources, rowHeight, height: canvasHeight, features, regions, bpPerPx, renderingMode, stopToken, lengthCutoffFilter, referenceDrawingMode, statusCallback = () => { }, } = props;
10
81
  const region = regions[0];
11
- const { statusCallback = () => { } } = props;
12
- checkStopToken(stopToken);
82
+ const lastCheck = createStopTokenChecker(stopToken);
83
+ const coords = [];
84
+ const items = [];
85
+ const colorCache = {};
86
+ const splitCache = {};
87
+ const genotypesCache = new Map();
88
+ const drawRef = referenceDrawingMode === 'draw';
89
+ const h = rowHeight;
90
+ const drawH = Math.max(rowHeight, 1);
91
+ const startRow = Math.floor(scrollTop / h);
92
+ const endRow = Math.min(sources.length, Math.ceil((scrollTop + canvasHeight) / h));
13
93
  const mafs = await updateStatus('Calculating stats', statusCallback, () => getFeaturesThatPassMinorAlleleFrequencyFilter({
14
- stopToken,
94
+ lastCheck,
15
95
  features: features.values(),
16
96
  minorAlleleFrequencyFilter,
17
97
  lengthCutoffFilter,
98
+ genotypesCache,
99
+ splitCache,
18
100
  }));
19
- checkStopToken(stopToken);
20
- const coords = [];
21
- const items = [];
22
- const colorCache = {};
101
+ const drawCtx = {
102
+ ctx,
103
+ sources,
104
+ region,
105
+ bpPerPx,
106
+ startRow,
107
+ endRow,
108
+ h,
109
+ drawH,
110
+ scrollTop,
111
+ splitCache,
112
+ drawRef,
113
+ genotypesCache,
114
+ stopToken,
115
+ };
116
+ const itemData = { items, coords };
23
117
  await updateStatus('Drawing variants', statusCallback, () => {
24
- forEachWithStopTokenCheck(mafs, stopToken, ({ mostFrequentAlt, feature }) => {
25
- const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
26
- const featureId = feature.id();
27
- const bpLen = feature.get('end') - feature.get('start');
28
- const w = Math.max(Math.round(rightPx - leftPx), 2);
29
- const samp = feature.get('genotypes');
30
- let y = -scrollTop;
31
- const s = sources.length;
32
- if (renderingMode === 'phased') {
33
- for (let j = 0; j < s; j++) {
34
- const { name, HP } = sources[j];
35
- const genotype = samp[name];
36
- const x = Math.floor(leftPx);
37
- const h = Math.max(rowHeight, 1);
38
- if (genotype) {
39
- const isPhased = genotype.includes('|');
40
- if (isPhased) {
41
- const alleles = genotype.split('|');
42
- if (drawPhased(alleles, ctx, x, y, w, h, HP, undefined, referenceDrawingMode === 'draw')) {
43
- items.push({
44
- name,
45
- genotype,
46
- featureId,
47
- bpLen,
48
- });
49
- coords.push(x, y, x + w, y + h);
50
- }
51
- }
52
- else {
53
- ctx.fillStyle = 'black';
54
- ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
55
- }
56
- }
57
- y += rowHeight;
58
- }
59
- }
60
- else {
61
- for (let j = 0; j < s; j++) {
62
- const { name } = sources[j];
63
- const genotype = samp[name];
64
- const x = Math.floor(leftPx);
65
- const h = Math.max(rowHeight, 1);
66
- if (genotype) {
67
- const cacheKey = `${genotype}:${mostFrequentAlt}`;
68
- let c = colorCache[cacheKey];
69
- if (c === undefined) {
70
- let alt = 0;
71
- let uncalled = 0;
72
- let alt2 = 0;
73
- let ref = 0;
74
- const alleles = genotype.split(/[/|]/);
75
- const total = alleles.length;
76
- for (let i = 0; i < total; i++) {
77
- const allele = alleles[i];
78
- if (allele === mostFrequentAlt) {
79
- alt++;
80
- }
81
- else if (allele === '0') {
82
- ref++;
83
- }
84
- else if (allele === '.') {
85
- uncalled++;
86
- }
87
- else {
88
- alt2++;
89
- }
90
- }
91
- c = getColorAlleleCount(ref, alt, alt2, uncalled, total, referenceDrawingMode === 'draw');
92
- colorCache[cacheKey] = c;
93
- }
94
- if (c) {
95
- drawColorAlleleCount(c, ctx, x, y, w, h, feature.get('type'), feature.get('strand'), bpLen > 5 ? 0.75 : 1);
96
- items.push({
97
- name,
98
- genotype,
99
- featureId,
100
- bpLen,
101
- });
102
- coords.push(x, y, x + w, y + h);
103
- }
104
- }
105
- y += rowHeight;
106
- }
107
- }
108
- });
118
+ if (renderingMode === 'phased') {
119
+ drawPhasedMode(drawCtx, itemData, mafs);
120
+ }
121
+ else {
122
+ drawAlleleCountMode(drawCtx, itemData, mafs, colorCache);
123
+ }
109
124
  });
110
125
  const flatbush = new Flatbush(Math.max(items.length, 1));
111
126
  if (items.length) {
112
- for (let i = 0; i < coords.length; i += 4) {
127
+ for (let i = 0, l = coords.length; i < l; i += 4) {
113
128
  flatbush.add(coords[i], coords[i + 1], coords[i + 2], coords[i + 3]);
114
129
  }
115
130
  }
@@ -117,18 +132,20 @@ export async function makeImageData(ctx, props) {
117
132
  flatbush.add(0, 0);
118
133
  }
119
134
  flatbush.finish();
135
+ const featureGenotypeMap = {};
136
+ for (const { feature } of mafs) {
137
+ const id = feature.id();
138
+ featureGenotypeMap[id] = {
139
+ alt: feature.get('ALT'),
140
+ ref: feature.get('REF'),
141
+ name: feature.get('name'),
142
+ description: feature.get('description'),
143
+ length: feature.get('end') - feature.get('start'),
144
+ };
145
+ }
120
146
  return {
121
147
  flatbush: flatbush.data,
122
148
  items,
123
- featureGenotypeMap: Object.fromEntries(mafs.map(({ feature }) => [
124
- feature.id(),
125
- {
126
- alt: feature.get('ALT'),
127
- ref: feature.get('REF'),
128
- name: feature.get('name'),
129
- description: feature.get('description'),
130
- length: feature.get('end') - feature.get('start'),
131
- },
132
- ])),
149
+ featureGenotypeMap,
133
150
  };
134
151
  }
@@ -1,21 +1,4 @@
1
- import type { Source } from '../shared/types';
2
- import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
3
- import type { Feature } from '@jbrowse/core/util';
4
- import type { ThemeOptions } from '@mui/material';
5
- export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
6
- bpPerPx: number;
7
- height: number;
8
- highResolutionScaling: number;
9
- themeOptions: ThemeOptions;
10
- }
11
- export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserialized {
12
- features: Map<string, Feature>;
13
- }
14
- export interface MultiRenderArgsDeserialized extends RenderArgsDeserializedWithFeatures {
15
- sources: Source[];
16
- rowHeight: number;
17
- scrollTop: number;
18
- minorAlleleFrequencyFilter: number;
19
- lengthCutoffFilter: number;
20
- statusCallback?: (arg: string) => void;
1
+ import type { MultiVariantRenderArgsBase } from '../shared/types.ts';
2
+ export interface MultiRenderArgsDeserialized extends MultiVariantRenderArgsBase {
3
+ referenceDrawingMode?: string;
21
4
  }
@@ -4,7 +4,7 @@ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'
4
4
  import { fetchAndMaybeUnzipText, updateStatus } from '@jbrowse/core/util';
5
5
  import { openLocation } from '@jbrowse/core/util/io';
6
6
  import { ObservableCreate } from '@jbrowse/core/util/rxjs';
7
- import VcfFeature from '../VcfFeature';
7
+ import VcfFeature from "../VcfFeature/index.js";
8
8
  export default class SplitVcfTabixAdapter extends BaseFeatureDataAdapter {
9
9
  async configurePre(refName) {
10
10
  const indexType = this.getConf('indexType');
@@ -1,4 +1,4 @@
1
- declare const SplitVcfTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1
+ declare const SplitVcfTabixAdapter: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
2
2
  vcfGzLocationMap: {
3
3
  type: string;
4
4
  defaultValue: {};
@@ -19,5 +19,5 @@ declare const SplitVcfTabixAdapter: import("@jbrowse/core/configuration/configur
19
19
  locationType: string;
20
20
  };
21
21
  };
22
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
22
+ }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
23
23
  export default SplitVcfTabixAdapter;
@@ -1,3 +1,3 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
- export { default as configSchema } from './configSchema';
2
+ export { default as configSchema } from './configSchema.ts';
3
3
  export default function VcfTabixAdapterF(pluginManager: PluginManager): void;
@@ -1,11 +1,11 @@
1
1
  import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
2
- import configSchema from './configSchema';
3
- export { default as configSchema } from './configSchema';
2
+ import configSchema from "./configSchema.js";
3
+ export { default as configSchema } from "./configSchema.js";
4
4
  export default function VcfTabixAdapterF(pluginManager) {
5
5
  pluginManager.addAdapterType(() => new AdapterType({
6
6
  name: 'SplitVcfTabixAdapter',
7
7
  displayName: 'VCF tabix adapter (split across multiple files)',
8
8
  configSchema,
9
- getAdapterClass: () => import('./SplitVcfTabixAdapter').then(r => r.default),
9
+ getAdapterClass: () => import("./SplitVcfTabixAdapter.js").then(r => r.default),
10
10
  }));
11
11
  }
@@ -1,4 +1,4 @@
1
- import type { AnyRegion, Block } from './types';
1
+ import type { AnyRegion, Block } from './types.ts';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  import type { Feature } from '@jbrowse/core/util';
4
4
  declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }: {
@@ -10,71 +10,54 @@ function bpToRadians(block, pos) {
10
10
  const bpOffset = block.flipped ? blockEnd - pos : pos - blockStart;
11
11
  return bpOffset / block.bpPerRadian + block.startRadians;
12
12
  }
13
- const Chord = observer(function Chord({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }) {
14
- var _a, _b, _c, _d, _e;
15
- const [hovered, setHovered] = useState(false);
16
- const startBlock = blocksForRefs[feature.get('refName')];
17
- if (!startBlock) {
18
- return null;
19
- }
20
- let svType;
21
- if (feature.get('INFO')) {
22
- ;
23
- [svType] = feature.get('INFO').SVTYPE || [];
24
- }
25
- else if (feature.get('mate')) {
26
- svType = 'mate';
27
- }
28
- let endPosition;
29
- let endBlock;
30
- const alt = (_a = feature.get('ALT')) === null || _a === void 0 ? void 0 : _a[0];
13
+ function getEndpoint(feature, blocksForRefs, startBlock) {
14
+ const alt = feature.get('ALT')?.[0];
31
15
  const bnd = alt && parseBreakend(alt);
32
- const startPos = feature.get('start');
16
+ const mate = feature.get('mate');
33
17
  if (bnd) {
34
- const matePosition = bnd.MatePosition.split(':');
35
- endPosition = +matePosition[1];
36
- endBlock = blocksForRefs[matePosition[0]];
18
+ const [chr, pos] = bnd.MatePosition.split(':');
19
+ return { endBlock: blocksForRefs[chr], endPosition: +pos };
37
20
  }
38
21
  else if (alt === '<TRA>') {
39
- const chr2 = (_c = (_b = feature.get('INFO')) === null || _b === void 0 ? void 0 : _b.CHR2) === null || _c === void 0 ? void 0 : _c[0];
40
- const end = (_e = (_d = feature.get('INFO')) === null || _d === void 0 ? void 0 : _d.END) === null || _e === void 0 ? void 0 : _e[0];
41
- endPosition = Number.parseInt(end, 10);
42
- endBlock = blocksForRefs[chr2];
22
+ const chr2 = feature.get('INFO')?.CHR2?.[0];
23
+ const end = feature.get('INFO')?.END?.[0];
24
+ return {
25
+ endBlock: blocksForRefs[chr2],
26
+ endPosition: Number.parseInt(end, 10),
27
+ };
43
28
  }
44
- else if (svType === 'mate') {
45
- const mate = feature.get('mate');
46
- const chr2 = mate.refName;
47
- endPosition = mate.start;
48
- endBlock = blocksForRefs[chr2];
29
+ else if (mate) {
30
+ return { endBlock: blocksForRefs[mate.refName], endPosition: mate.start };
49
31
  }
50
- else {
51
- endBlock = startBlock;
52
- endPosition = feature.get('end');
32
+ return { endBlock: startBlock, endPosition: feature.get('end') };
33
+ }
34
+ const Chord = observer(function Chord({ feature, blocksForRefs, radius, config, bezierRadius, selected, onClick, }) {
35
+ const [hovered, setHovered] = useState(false);
36
+ const startBlock = blocksForRefs[feature.get('refName')];
37
+ if (!startBlock) {
38
+ return null;
53
39
  }
54
- if (endBlock) {
55
- const startRadians = bpToRadians(startBlock, startPos);
56
- const endRadians = bpToRadians(endBlock, endPosition);
57
- const startXY = polarToCartesian(radius, startRadians);
58
- const endXY = polarToCartesian(radius, endRadians);
59
- const controlXY = polarToCartesian(bezierRadius, (endRadians + startRadians) / 2);
60
- const strokeColor = selected
61
- ? readConfObject(config, 'strokeColorSelected', { feature })
62
- : readConfObject(config, 'strokeColor', { feature });
63
- const hoverStrokeColor = readConfObject(config, 'strokeColorHover', {
64
- feature,
65
- });
66
- return (_jsx("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), ...getStrokeProps(hovered ? hoverStrokeColor : strokeColor), strokeWidth: hovered ? 3 : 1, onClick: evt => {
67
- onClick(feature, startBlock.region, endBlock.region, evt);
68
- }, onMouseOver: () => {
69
- if (!selected) {
70
- setHovered(true);
71
- }
72
- }, onMouseOut: () => {
73
- if (!selected) {
74
- setHovered(false);
75
- }
76
- } }));
40
+ const startPos = feature.get('start');
41
+ const { endBlock, endPosition } = getEndpoint(feature, blocksForRefs, startBlock);
42
+ if (!endBlock) {
43
+ return null;
77
44
  }
78
- return null;
45
+ const startRadians = bpToRadians(startBlock, startPos);
46
+ const endRadians = bpToRadians(endBlock, endPosition);
47
+ const [x1, y1] = polarToCartesian(radius, startRadians);
48
+ const [x2, y2] = polarToCartesian(radius, endRadians);
49
+ const [cx, cy] = polarToCartesian(bezierRadius, (endRadians + startRadians) / 2);
50
+ const stroke = readConfObject(config, hovered
51
+ ? 'strokeColorHover'
52
+ : selected
53
+ ? 'strokeColorSelected'
54
+ : 'strokeColor', { feature });
55
+ return (_jsx("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: `M ${x1} ${y1} Q ${cx} ${cy} ${x2} ${y2}`, ...getStrokeProps(stroke), strokeWidth: hovered ? 3 : 1, onClick: evt => {
56
+ onClick(feature, startBlock.region, endBlock.region, evt);
57
+ }, onMouseOver: () => {
58
+ setHovered(true);
59
+ }, onMouseOut: () => {
60
+ setHovered(false);
61
+ } }));
79
62
  });
80
63
  export default Chord;
@@ -1,7 +1,7 @@
1
- import type { AnyRegion, Block } from './types';
1
+ import type { AnyRegion, Block } from './types.ts';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  import type { Feature } from '@jbrowse/core/util';
4
- declare const StructuralVariantChordsReactComponent: ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }: {
4
+ declare const SVChordsReactComponent: ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }: {
5
5
  features: Map<string, Feature>;
6
6
  radius: number;
7
7
  config: AnyConfigurationModel;
@@ -13,4 +13,4 @@ declare const StructuralVariantChordsReactComponent: ({ features, config, blockD
13
13
  bezierRadius: number;
14
14
  onChordClick: (feature: Feature, reg: AnyRegion, endBlock: AnyRegion, evt: unknown) => void;
15
15
  }) => import("react/jsx-runtime").JSX.Element;
16
- export default StructuralVariantChordsReactComponent;
16
+ export default SVChordsReactComponent;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { observer } from 'mobx-react';
4
- import Chord from './Chord';
5
- const StructuralVariantChordsReactComponent = observer(function ({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }) {
4
+ import Chord from "./Chord.js";
5
+ const SVChordsReactComponent = observer(function SVChordsReactComponent({ features, config, blockDefinitions, radius, bezierRadius, displayModel, onChordClick, }) {
6
6
  const { selectedFeatureId } = displayModel || {};
7
7
  const blocksForRefsMemo = useMemo(() => {
8
8
  const blocksForRefs = {};
@@ -22,4 +22,4 @@ const StructuralVariantChordsReactComponent = observer(function ({ features, con
22
22
  return (_jsx(Chord, { feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }, id));
23
23
  }) }));
24
24
  });
25
- export default StructuralVariantChordsReactComponent;
25
+ export default SVChordsReactComponent;
@@ -1,4 +1,4 @@
1
- declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1
+ declare const configSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
2
2
  strokeColor: {
3
3
  type: string;
4
4
  description: string;
@@ -17,5 +17,5 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
17
17
  defaultValue: string;
18
18
  contextVariable: string[];
19
19
  };
20
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
20
+ }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
21
21
  export default configSchema;
@@ -1,11 +1,11 @@
1
+ import { lazy } from 'react';
1
2
  import ChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
2
- import ReactComponent from './ReactComponent';
3
- import configSchema from './configSchema';
3
+ import configSchema from "./configSchema.js";
4
4
  export default function StructuralVariantChordRendererF(pluginManager) {
5
5
  pluginManager.addRendererType(() => new ChordRendererType({
6
6
  name: 'StructuralVariantChordRenderer',
7
7
  displayName: 'SV chord renderer',
8
- ReactComponent,
8
+ ReactComponent: lazy(() => import("./ReactComponent.js")),
9
9
  configSchema,
10
10
  pluginManager,
11
11
  }));
package/esm/Tooltip.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense } from 'react';
3
3
  import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
4
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
4
5
  import { observer } from 'mobx-react';
5
- import { makeStyles } from 'tss-react/mui';
6
6
  const useStyles = makeStyles()({
7
7
  hoverVertical: {
8
8
  background: '#333',
@@ -18,7 +18,7 @@ const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, off
18
18
  const { featureUnderMouse } = model;
19
19
  const { classes } = useStyles();
20
20
  const x = clientMouseCoord[0] + 5;
21
- const y = useClientY ? clientMouseCoord[1] : (clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0;
21
+ const y = useClientY ? clientMouseCoord[1] : clientRect?.top || 0;
22
22
  return featureUnderMouse ? (_jsxs(_Fragment, { children: [_jsx(Suspense, { fallback: null, children: _jsx(BaseTooltip, { clientPoint: { x, y }, children: _jsx(TooltipContents, { model: model, feature: featureUnderMouse }) }) }), _jsx("div", { className: classes.hoverVertical, style: {
23
23
  left: offsetMouseCoord[0],
24
24
  height: height,
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
- import { getMinimalDesc } from '../VcfFeature/util';
3
+ import { getMinimalDesc } from "../VcfFeature/util.js";
4
4
  export default function AltFormatter({ value, refString, }) {
5
5
  const [show, setShow] = useState(false);
6
6
  const alt = useMemo(() => getMinimalDesc(refString, value), [refString, value]);
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import copy from 'copy-to-clipboard';
4
3
  export default function Formatter({ value }) {
5
4
  const [show, setShow] = useState(false);
6
5
  const [copied, setCopied] = useState(false);
7
6
  const display = String(value);
8
- return display.length > 100 ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => {
7
+ return display.length > 100 ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: async () => {
8
+ const { default: copy } = await import('copy-to-clipboard');
9
9
  copy(display);
10
10
  setCopied(true);
11
11
  setTimeout(() => {
@@ -0,0 +1 @@
1
+ export { BreakpointSplitViewChoiceDialog as default } from '@jbrowse/sv-core';
@@ -0,0 +1 @@
1
+ export { BreakpointSplitViewChoiceDialog as default } from '@jbrowse/sv-core';
@@ -1,4 +1,4 @@
1
- import type { VariantFeatureWidgetModel } from '../stateModelFactory';
1
+ import type { VariantFeatureWidgetModel } from '../stateModelFactory.ts';
2
2
  import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
3
3
  export default function LaunchBreakendPanel(props: {
4
4
  locStrings: string[];
@@ -2,18 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { lazy } from 'react';
3
3
  import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
4
4
  import { SimpleFeature, getEnv, getSession } from '@jbrowse/core/util';
5
+ import { getAssemblyName } from '@jbrowse/sv-core';
5
6
  import { Link, Typography } from '@mui/material';
6
- const BreakendMultiLevelOptionDialog = lazy(() => import('./BreakendMultiLevelOptionDialog'));
7
- const BreakendSingleLevelOptionDialog = lazy(() => import('./BreakendSingleLevelOptionDialog'));
7
+ const BreakpointSplitViewChoiceDialog = lazy(() => import("./BreakpointSplitViewChoiceDialog.js"));
8
8
  function LocStringList({ locStrings, model, }) {
9
9
  const session = getSession(model);
10
10
  return (_jsxs("div", { children: [_jsx(Typography, { children: "Navigate to breakend endpoint in linear view:" }), _jsx("ul", { children: locStrings.map((locString, index) => (_jsxs("li", { children: [locString, ' ', _jsx(Link, { href: "#", onClick: event => {
11
- var _a;
12
11
  event.preventDefault();
13
12
  const { view } = model;
14
13
  try {
15
14
  if (view) {
16
- (_a = view.navToLocString) === null || _a === void 0 ? void 0 : _a.call(view, locString);
15
+ view.navToLocString?.(locString);
17
16
  }
18
17
  else {
19
18
  throw new Error('No view associated with this feature detail panel anymore');
@@ -26,37 +25,23 @@ function LocStringList({ locStrings, model, }) {
26
25
  }, children: "(LGV)" })] }, `${locString}-${index}`))) })] }));
27
26
  }
28
27
  function LaunchBreakpointSplitViewPanel({ locStrings, model, feature, }) {
29
- var _a, _b;
30
28
  const session = getSession(model);
31
29
  const simpleFeature = new SimpleFeature(feature);
32
- const assemblyName = (_b = (_a = model.view) === null || _a === void 0 ? void 0 : _a.displayedRegions[0]) === null || _b === void 0 ? void 0 : _b.assemblyName;
33
- return (_jsxs("div", { children: [_jsx(Typography, { children: "Launch split view" }), _jsx("ul", { children: locStrings.map(locString => (_jsxs("li", { children: [`${feature.refName}:${feature.start} // ${locString}`, ' ', _jsx(Link, { href: "#", onClick: event => {
30
+ const assemblyName = getAssemblyName(model.view);
31
+ return assemblyName ? (_jsxs("div", { children: [_jsx(Typography, { children: "Launch split view" }), _jsx("ul", { children: locStrings.map(locString => (_jsxs("li", { children: [`${feature.refName}:${feature.start} // ${locString}`, ' ', _jsx(Link, { href: "#", onClick: event => {
34
32
  event.preventDefault();
35
33
  session.queueDialog(handleClose => [
36
- BreakendMultiLevelOptionDialog,
34
+ BreakpointSplitViewChoiceDialog,
37
35
  {
38
36
  handleClose,
39
37
  session,
40
38
  feature: simpleFeature,
41
- stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_multilevel`,
39
+ stableViewId: `${model.id}_${assemblyName}_breakpointsplitview`,
42
40
  view: model.view,
43
41
  assemblyName,
44
42
  },
45
43
  ]);
46
- }, children: "(top/bottom)" }), ' ', _jsx(Link, { href: "#", onClick: event => {
47
- event.preventDefault();
48
- session.queueDialog(handleClose => [
49
- BreakendSingleLevelOptionDialog,
50
- {
51
- handleClose,
52
- session,
53
- feature: simpleFeature,
54
- stableViewId: `${model.id}_${assemblyName}_breakpointsplitview_singlelevel`,
55
- view: model.view,
56
- assemblyName,
57
- },
58
- ]);
59
- }, children: "(single row)" })] }, JSON.stringify(locString)))) })] }));
44
+ }, children: "(breakpoint split view)" })] }, locString))) })] })) : null;
60
45
  }
61
46
  export default function LaunchBreakendPanel(props) {
62
47
  const { model, locStrings, feature } = props;