@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,18 +1,36 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SanitizedHTML } from '@jbrowse/core/ui';
3
- import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
4
- import escapeHTML from 'escape-html';
5
- export default function MultiVariantTooltip({ source, }) {
6
- return (_jsxs(BaseTooltip, { children: [source.color ? (_jsx("div", { style: {
7
- width: 10,
8
- height: 10,
9
- backgroundColor: source.color,
10
- } })) : null, _jsx(SanitizedHTML, { html: Object.entries(source)
11
- .filter(([key, val]) => key !== 'color' &&
12
- key !== 'HP' &&
13
- key !== 'name' &&
14
- key !== 'id' &&
15
- val !== undefined)
16
- .map(([key, value]) => `${key}:${escapeHTML(`${value}`)}`)
17
- .join('<br/>') })] }));
18
- }
2
+ import { memo } from 'react';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
4
+ import { Portal, alpha } from '@mui/material';
5
+ const useStyles = makeStyles()(theme => ({
6
+ tooltip: {
7
+ position: 'fixed',
8
+ top: 0,
9
+ left: 0,
10
+ pointerEvents: 'none',
11
+ backgroundColor: alpha(theme.palette.grey[700], 0.9),
12
+ borderRadius: theme.shape.borderRadius,
13
+ color: theme.palette.common.white,
14
+ fontFamily: theme.typography.fontFamily,
15
+ padding: '4px 8px',
16
+ fontSize: theme.typography.fontSize,
17
+ maxWidth: 300,
18
+ wordWrap: 'break-word',
19
+ zIndex: 100000,
20
+ },
21
+ row: {
22
+ whiteSpace: 'nowrap',
23
+ },
24
+ colorBox: {
25
+ width: 10,
26
+ height: 10,
27
+ display: 'inline-block',
28
+ marginRight: 4,
29
+ },
30
+ }));
31
+ const EXCLUDE_KEYS = new Set(['color', 'HP', 'name', 'id']);
32
+ const MultiVariantTooltip = memo(function MultiVariantTooltip({ source, x, y, }) {
33
+ const { classes } = useStyles();
34
+ return (_jsx(Portal, { children: _jsxs("div", { className: classes.tooltip, style: { transform: `translate(${x + 10}px, ${y + 10}px)` }, children: [source.color ? (_jsx("div", { className: classes.colorBox, style: { backgroundColor: source.color } })) : null, Object.entries(source).map(([key, value]) => !EXCLUDE_KEYS.has(key) && value !== undefined ? (_jsxs("div", { className: classes.row, children: [key, ": ", String(value)] }, key)) : null)] }) }));
35
+ });
36
+ export default MultiVariantTooltip;
@@ -0,0 +1,8 @@
1
+ import type { MultiVariantBaseModel } from '../MultiVariantBaseModel.ts';
2
+ interface ScrollableVariantContainerProps {
3
+ model: MultiVariantBaseModel;
4
+ topOffset?: number;
5
+ testId?: string;
6
+ }
7
+ declare const ScrollableVariantContainer: ({ model, topOffset, testId, }: ScrollableVariantContainerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default ScrollableVariantContainer;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
3
+ import { observer } from 'mobx-react';
4
+ import LegendBar from "./MultiVariantLegendBar.js";
5
+ import TreeSidebar from "./TreeSidebar.js";
6
+ const ScrollableVariantContainer = observer(function ScrollableVariantContainer({ model, topOffset = 0, testId, }) {
7
+ const { setScrollTop, autoHeight, availableHeight } = model;
8
+ return (_jsxs("div", { "data-testid": testId, style: {
9
+ position: 'absolute',
10
+ top: topOffset,
11
+ height: availableHeight,
12
+ width: '100%',
13
+ overflowY: autoHeight ? 'hidden' : 'auto',
14
+ overflowX: 'hidden',
15
+ }, onScroll: evt => {
16
+ setScrollTop(evt.currentTarget.scrollTop);
17
+ }, children: [_jsx(TreeSidebar, { model: model }), _jsx(LegendBar, { model: model }), _jsx("div", { style: {
18
+ position: 'absolute',
19
+ left: 0,
20
+ width: '100%',
21
+ }, children: _jsx(BaseLinearDisplayComponent, { model: model }) })] }));
22
+ });
23
+ export default ScrollableVariantContainer;
@@ -1,7 +1,8 @@
1
- import type { Source } from '../types';
1
+ import type { Source } from '../types.ts';
2
2
  interface ReducedModel {
3
3
  sources?: Source[];
4
- setLayout: (s: Source[]) => void;
4
+ clusterTree?: string;
5
+ setLayout: (s: Source[], clearTree?: boolean) => void;
5
6
  clearLayout: () => void;
6
7
  }
7
8
  export default function SetColorDialog({ model, handleClose, }: {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import SourcesGrid from './SourcesGrid';
3
- import SharedSetColorDialog from './ui/SetColorDialog';
2
+ import SharedSetColorDialog from "./BaseSetColorDialog.js";
3
+ import SourcesGrid from "./SourcesGrid.js";
4
4
  export default function SetColorDialog({ model, handleClose, }) {
5
5
  return (_jsx(SharedSetColorDialog, { model: model, handleClose: handleClose, title: "Multi-sample variant display - Color/arrangement editor", enableBulkEdit: true, enableRowPalettizer: true, showTipsStorageKey: "multivariant-showTips", SourcesGridComponent: SourcesGrid }));
6
6
  }
@@ -1,10 +1,9 @@
1
+ interface Row {
2
+ name: string;
3
+ [key: string]: unknown;
4
+ }
1
5
  export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }: {
2
- currLayout: {
3
- name: string;
4
- [key: string]: unknown;
5
- }[];
6
- onClose: (arg?: {
7
- name: string;
8
- [key: string]: unknown;
9
- }[]) => void;
6
+ currLayout: Row[];
7
+ onClose: (arg?: Row[]) => void;
10
8
  }): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { ErrorMessage } from '@jbrowse/core/ui';
4
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
4
5
  import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
5
- import { makeStyles } from 'tss-react/mui';
6
6
  const useStyles = makeStyles()({
7
7
  textAreaFont: {
8
8
  fontFamily: 'Courier New',
@@ -12,6 +12,27 @@ export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }) {
12
12
  const { classes } = useStyles();
13
13
  const [val, setVal] = useState('');
14
14
  const [error, setError] = useState();
15
+ const processRows = (mergeExisting) => {
16
+ const lines = val
17
+ .split('\n')
18
+ .map(f => f.trim())
19
+ .filter(Boolean);
20
+ const fields = lines[0].split(/[,\t]/gm);
21
+ if (!fields.includes('name')) {
22
+ setError(new Error('No "name" column found on line 1'));
23
+ return;
24
+ }
25
+ setError('');
26
+ const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
27
+ const newData = Object.fromEntries(lines.slice(1).map(line => {
28
+ const cols = line.split(/[,\t]/gm);
29
+ const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
30
+ return [newRecord.name, { ...newRecord, ...oldLayout[newRecord.name] }];
31
+ }));
32
+ onClose(currLayout.map(record => mergeExisting
33
+ ? { ...record, ...newData[record.name] }
34
+ : { ...newData[record.name] }));
35
+ };
15
36
  return (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { children: [_jsx(Typography, { children: "Paste CSV or TSV. If a header column is present. First line is a header. If a column called \"name\" is present, it uses that to connect to IDs in the table, otherwise it uses the first column no." }), error ? _jsx(ErrorMessage, { error: error }) : null, _jsx(TextField, { variant: "outlined", multiline: true, minRows: 5, placeholder: 'name,population\nHG00098,GBR\nHG00101,GBR\nHG00459,CHS\n...', maxRows: 10, fullWidth: true, value: val, onChange: event => {
16
37
  setVal(event.target.value);
17
38
  }, slotProps: {
@@ -21,60 +42,9 @@ export default function SetColorDialogBulkEditPanel({ onClose, currLayout, }) {
21
42
  },
22
43
  },
23
44
  } })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
24
- const lines = val
25
- .split('\n')
26
- .map(f => f.trim())
27
- .filter(f => !!f);
28
- const fields = lines[0].split(/[,\t]/gm);
29
- if (fields.includes('name')) {
30
- setError('');
31
- const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
32
- const newData = Object.fromEntries(lines.slice(1).map(line => {
33
- const cols = line.split(/[,\t]/gm);
34
- const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
35
- return [
36
- newRecord.name,
37
- {
38
- ...newRecord,
39
- ...oldLayout[newRecord.name],
40
- },
41
- ];
42
- }));
43
- onClose(currLayout.map(record => ({
44
- ...record,
45
- ...newData[record.name],
46
- })));
47
- }
48
- else {
49
- setError(new Error('No "name" column found on line 1'));
50
- }
45
+ processRows(true);
51
46
  }, children: "Update rows" }), _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
52
- const lines = val
53
- .split('\n')
54
- .map(f => f.trim())
55
- .filter(f => !!f);
56
- const fields = lines[0].split(/[,\t]/gm);
57
- if (fields.includes('name')) {
58
- setError('');
59
- const oldLayout = Object.fromEntries(currLayout.map(record => [record.name, record]));
60
- const newData = Object.fromEntries(lines.slice(1).map(line => {
61
- const cols = line.split(/[,\t]/gm);
62
- const newRecord = Object.fromEntries(cols.map((col, idx) => [fields[idx], col]));
63
- return [
64
- newRecord.name,
65
- {
66
- ...newRecord,
67
- ...oldLayout[newRecord.name],
68
- },
69
- ];
70
- }));
71
- onClose(currLayout.map(record => ({
72
- ...newData[record.name],
73
- })));
74
- }
75
- else {
76
- setError(new Error('No "name" column found on line 1'));
77
- }
47
+ processRows(false);
78
48
  }, children: "Replace rows" }), _jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
79
49
  onClose();
80
50
  }, children: "Cancel" })] })] }));
@@ -2,37 +2,27 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { set1 } from '@jbrowse/core/ui/colors';
3
3
  import { randomColor } from '@jbrowse/core/util/color';
4
4
  import { Button } from '@mui/material';
5
+ const excludedFields = new Set(['name', 'color', 'label', 'id', 'HP']);
5
6
  export default function SetColorDialogRowPalettizer({ setCurrLayout, currLayout, }) {
6
- if (!currLayout.length || !currLayout[0]) {
7
+ const firstRow = currLayout[0];
8
+ if (!firstRow) {
7
9
  return null;
8
10
  }
9
- const fields = Object.keys(currLayout[0]).filter(f => f !== 'name' &&
10
- f !== 'color' &&
11
- f !== 'label' &&
12
- f !== 'id' &&
13
- f !== 'HP');
14
- return (_jsxs("div", { children: ["Create color palette based on...", fields.map(r => (_jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
15
- const map = new Map();
11
+ const fields = Object.keys(firstRow).filter(f => !excludedFields.has(f));
12
+ return (_jsxs("div", { children: ["Create color palette based on...", fields.map(field => (_jsx(Button, { variant: "contained", color: "inherit", onClick: () => {
13
+ const counts = new Map();
16
14
  for (const row of currLayout) {
17
- const val = map.get(row[r]);
18
- if (!val) {
19
- map.set(row[r], 1);
20
- }
21
- else {
22
- map.set(row[r], val + 1);
23
- }
15
+ const key = row[field];
16
+ counts.set(key, (counts.get(key) || 0) + 1);
24
17
  }
25
- const ret = Object.fromEntries([...map.entries()]
18
+ const colorMap = Object.fromEntries([...counts.entries()]
26
19
  .sort((a, b) => a[1] - b[1])
27
- .map((r, idx) => [r[0], set1[idx] || randomColor(r[0])]));
20
+ .map(([key], idx) => [key, set1[idx] || randomColor(key)]));
28
21
  setCurrLayout(currLayout.map(row => ({
29
22
  ...row,
30
- color: ret[row[r]],
31
- })));
32
- }, children: r }, r))), _jsx(Button, { onClick: () => {
33
- setCurrLayout(currLayout.map(row => ({
34
- ...row,
35
- color: undefined,
23
+ color: colorMap[row[field]],
36
24
  })));
25
+ }, children: field }, field))), _jsx(Button, { onClick: () => {
26
+ setCurrLayout(currLayout.map(row => ({ ...row, color: undefined })));
37
27
  }, children: "Clear colors" })] }));
38
28
  }
@@ -1,8 +1,7 @@
1
- import type { Source } from '../types';
2
1
  export default function SetRowHeight({ model, handleClose, }: {
3
2
  model: {
4
- rowHeight?: Source[];
5
- setRowHeight: (arg: number) => void;
3
+ rowHeight: number;
4
+ setRowHeight: (arg: number | 'auto') => void;
6
5
  };
7
6
  handleClose: () => void;
8
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Source } from '../types';
1
+ import type { Source } from '../types.ts';
2
2
  import type { GridRowId } from '@mui/x-data-grid';
3
3
  export default function SourcesDataGrid({ rows, onChange, setSelected, }: {
4
4
  rows: Source[];
@@ -3,8 +3,8 @@ import { useState } from 'react';
3
3
  import { SanitizedHTML } from '@jbrowse/core/ui';
4
4
  import ColorPicker from '@jbrowse/core/ui/ColorPicker';
5
5
  import { getStr, measureGridWidth } from '@jbrowse/core/util';
6
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
6
7
  import { DataGrid } from '@mui/x-data-grid';
7
- import { makeStyles } from 'tss-react/mui';
8
8
  const useStyles = makeStyles()({
9
9
  cell: {
10
10
  whiteSpace: 'nowrap',
@@ -1,4 +1,4 @@
1
- import type { Source } from '../types';
1
+ import type { Source } from '../types.ts';
2
2
  declare function SourcesGrid({ rows, onChange, showTips, }: {
3
3
  rows: Source[];
4
4
  onChange: (arg: Source[]) => void;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import SourcesDataGrid from './SourcesDataGrid';
4
- import SourcesGridHeader from './SourcesGridHeader';
3
+ import SourcesDataGrid from "./SourcesDataGrid.js";
4
+ import SourcesGridHeader from "./SourcesGridHeader.js";
5
5
  function SourcesGrid({ rows, onChange, showTips, }) {
6
6
  const [selected, setSelected] = useState([]);
7
7
  return (_jsxs("div", { children: [_jsx(SourcesGridHeader, { selected: selected, rows: rows, showTips: showTips, onChange: onChange }), rows.length ? (_jsx(SourcesDataGrid, { rows: rows, onChange: onChange, setSelected: setSelected })) : (_jsx("div", { children: "No rows" }))] }));
@@ -1,4 +1,4 @@
1
- import type { Source } from '../types';
1
+ import type { Source } from '../types.ts';
2
2
  import type { GridRowId } from '@mui/x-data-grid';
3
3
  export default function SourcesGridHeader({ selected, onChange, rows, showTips, }: {
4
4
  onChange: (arg: Source[]) => void;
@@ -6,7 +6,7 @@ import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
6
6
  import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
7
7
  import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
8
8
  import { Button } from '@mui/material';
9
- import { moveDown, moveUp } from '../sourcesGridUtils';
9
+ import { moveDown, moveUp } from "../sourcesGridUtils.js";
10
10
  export default function SourcesGridHeader({ selected, onChange, rows, showTips, }) {
11
11
  const [anchorEl, setAnchorEl] = useState(null);
12
12
  const [widgetColor, setWidgetColor] = useState('blue');
@@ -0,0 +1,5 @@
1
+ import type { LegendBarModel } from './types.ts';
2
+ declare const SvgTree: ({ model, }: {
3
+ model: LegendBarModel;
4
+ }) => import("react/jsx-runtime").JSX.Element[];
5
+ export default SvgTree;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { observer } from 'mobx-react';
3
+ const SvgTree = observer(function SvgTree({ model, }) {
4
+ const { treeAreaWidth: _treeAreaWidth, hierarchy } = model;
5
+ const svg = [];
6
+ let idx = 0;
7
+ if (hierarchy) {
8
+ for (const link of hierarchy.links()) {
9
+ const { source, target } = link;
10
+ const sy = source.x;
11
+ const ty = target.x;
12
+ const tx = target.y;
13
+ const sx = source.y;
14
+ svg.push(_jsx("line", { x1: sx, y1: sy, x2: sx, y2: ty, stroke: "black", opacity: "0.4" }, `${sx}-${sy}-${tx}-${ty}-${idx++}`), _jsx("line", { x1: sx, y1: ty, x2: tx, y2: ty, stroke: "black", opacity: "0.4" }, `${sx}-${sy}-${tx}-${ty}-${idx++}`));
15
+ }
16
+ }
17
+ return svg;
18
+ });
19
+ export default SvgTree;
@@ -0,0 +1,5 @@
1
+ import type { TreeSidebarModel } from './types.ts';
2
+ declare const TreeSidebar: ({ model, }: {
3
+ model: TreeSidebarModel;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default TreeSidebar;
@@ -0,0 +1,121 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ import { ResizeHandle } from '@jbrowse/core/ui';
4
+ import { getContainingView } from '@jbrowse/core/util';
5
+ import Flatbush from '@jbrowse/core/util/flatbush';
6
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
7
+ import { autorun } from 'mobx';
8
+ import { observer } from 'mobx-react';
9
+ const useStyles = makeStyles()(theme => ({
10
+ resizeHandle: {
11
+ position: 'absolute',
12
+ top: 0,
13
+ height: '100%',
14
+ width: 4,
15
+ zIndex: 101,
16
+ background: 'transparent',
17
+ '&:hover': {
18
+ background: theme.palette.divider,
19
+ },
20
+ },
21
+ }));
22
+ function getDescendantNames(node) {
23
+ if (!node.children?.length) {
24
+ return [node.data.name];
25
+ }
26
+ return node.children.flatMap(child => getDescendantNames(child));
27
+ }
28
+ const TreeSidebar = observer(function TreeSidebar({ model, }) {
29
+ const { classes } = useStyles();
30
+ const { width: viewWidth } = getContainingView(model);
31
+ const [nodeIndex, setNodeIndex] = useState(null);
32
+ const [nodeData, setNodeData] = useState([]);
33
+ const { hierarchy, treeAreaWidth, height, scrollTop, showTree, sources } = model;
34
+ const treeCanvasRef = useCallback((ref) => {
35
+ model.setTreeCanvasRef(ref);
36
+ }, [model, treeAreaWidth, height]);
37
+ const mouseoverCanvasRef = useCallback((ref) => {
38
+ model.setMouseoverCanvasRef(ref);
39
+ }, [model, viewWidth, height]);
40
+ useEffect(() => {
41
+ return autorun(function treeSpatialIndexAutorun() {
42
+ const { treeAreaWidth: _t, hierarchy: h, totalHeight: th } = model;
43
+ void th;
44
+ if (!h) {
45
+ setNodeIndex(null);
46
+ setNodeData([]);
47
+ return;
48
+ }
49
+ const nodes = h.descendants().filter(node => node.children?.length);
50
+ const index = new Flatbush(nodes.length);
51
+ const hitRadius = 8;
52
+ for (const node of nodes) {
53
+ const x = node.y;
54
+ const y = node.x;
55
+ index.add(x - hitRadius, y - hitRadius, x + hitRadius, y + hitRadius);
56
+ }
57
+ index.finish();
58
+ setNodeIndex(index);
59
+ setNodeData(nodes);
60
+ }, { name: 'TreeSpatialIndex' });
61
+ }, [model]);
62
+ const handleMouseMove = useCallback((event) => {
63
+ if (!hierarchy || !nodeIndex) {
64
+ return;
65
+ }
66
+ const rect = event.currentTarget.getBoundingClientRect();
67
+ const x = event.clientX - rect.left;
68
+ const y = event.clientY - rect.top + scrollTop;
69
+ const results = nodeIndex.search(x, y, x, y);
70
+ const node = results.length > 0 ? nodeData[results[0]] : undefined;
71
+ if (node) {
72
+ model.setHoveredTreeNode({
73
+ node,
74
+ descendantNames: getDescendantNames(node),
75
+ });
76
+ }
77
+ else {
78
+ model.setHoveredTreeNode(undefined);
79
+ }
80
+ }, [hierarchy, nodeIndex, nodeData, scrollTop, model]);
81
+ const handleMouseLeave = useCallback(() => {
82
+ model.setHoveredTreeNode(undefined);
83
+ }, [model]);
84
+ if (!hierarchy || !showTree || !sources?.length) {
85
+ return null;
86
+ }
87
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
88
+ position: 'sticky',
89
+ top: 0,
90
+ left: 0,
91
+ height: 0,
92
+ zIndex: 100,
93
+ }, children: [_jsx("canvas", { ref: treeCanvasRef, width: treeAreaWidth * 2, height: height * 2, style: {
94
+ width: treeAreaWidth,
95
+ height,
96
+ position: 'absolute',
97
+ top: 0,
98
+ left: 0,
99
+ pointerEvents: 'none',
100
+ } }), _jsx("canvas", { ref: mouseoverCanvasRef, width: viewWidth, height: height, style: {
101
+ position: 'absolute',
102
+ top: 0,
103
+ left: 0,
104
+ zIndex: 1,
105
+ pointerEvents: 'none',
106
+ } }), _jsx("div", { onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, style: {
107
+ position: 'absolute',
108
+ top: 0,
109
+ left: 0,
110
+ width: treeAreaWidth,
111
+ height,
112
+ zIndex: 2,
113
+ cursor: 'pointer',
114
+ } })] }), _jsx(ResizeHandle, { onDrag: distance => {
115
+ model.setTreeAreaWidth(Math.max(50, treeAreaWidth + distance));
116
+ return undefined;
117
+ }, className: classes.resizeHandle, style: {
118
+ left: treeAreaWidth,
119
+ }, vertical: true })] }));
120
+ });
121
+ export default TreeSidebar;
@@ -0,0 +1,43 @@
1
+ import type { Source } from '../types.ts';
2
+ import type { HierarchyNode } from 'd3-hierarchy';
3
+ export interface ClusterNodeData {
4
+ name: string;
5
+ height: number;
6
+ children?: ClusterNodeData[];
7
+ }
8
+ export type ClusterHierarchyNode = HierarchyNode<ClusterNodeData>;
9
+ export interface HoveredTreeNode {
10
+ node: ClusterHierarchyNode;
11
+ descendantNames: string[];
12
+ }
13
+ export interface TreeSidebarModel {
14
+ totalHeight: number;
15
+ hierarchy?: ClusterHierarchyNode;
16
+ treeAreaWidth: number;
17
+ height: number;
18
+ scrollTop: number;
19
+ showTree: boolean;
20
+ sources?: Source[];
21
+ setTreeCanvasRef: (ref: HTMLCanvasElement | null) => void;
22
+ setMouseoverCanvasRef: (ref: HTMLCanvasElement | null) => void;
23
+ setHoveredTreeNode: (node?: HoveredTreeNode) => void;
24
+ setTreeAreaWidth: (width: number) => void;
25
+ }
26
+ export interface LegendBarModel {
27
+ id: string;
28
+ scrollTop: number;
29
+ height: number;
30
+ hierarchy?: ClusterHierarchyNode;
31
+ treeAreaWidth: number;
32
+ totalHeight: number;
33
+ canDisplayLabels: boolean;
34
+ rowHeight: number;
35
+ sources?: Source[];
36
+ showTree: boolean;
37
+ }
38
+ export interface MouseState {
39
+ x: number;
40
+ y: number;
41
+ offsetX: number;
42
+ offsetY: number;
43
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,8 @@
1
- export declare const fudgeFactor = 0.6;
2
- export declare const f2: number;
1
+ export declare const f2 = 0.3;
2
+ export declare const REFERENCE_COLOR = "#ccc";
3
+ export declare const NO_CALL_COLOR = "hsl(50,50%,50%)";
4
+ export declare const UNPHASED_COLOR = "black";
5
+ export declare const ALT_COLOR_HUE = 200;
6
+ export declare const ALT_COLOR_SATURATION = 50;
7
+ export declare const OTHER_ALT_COLOR = "hsl(0,100%,20%)";
8
+ export declare function getAltColorForDosage(dosage: number): string;
@@ -1,2 +1,11 @@
1
- export const fudgeFactor = 0.6;
2
- export const f2 = fudgeFactor / 2;
1
+ export const f2 = 0.3;
2
+ export const REFERENCE_COLOR = '#ccc';
3
+ export const NO_CALL_COLOR = 'hsl(50,50%,50%)';
4
+ export const UNPHASED_COLOR = 'black';
5
+ export const ALT_COLOR_HUE = 200;
6
+ export const ALT_COLOR_SATURATION = 50;
7
+ export const OTHER_ALT_COLOR = 'hsl(0,100%,20%)';
8
+ export function getAltColorForDosage(dosage) {
9
+ const lightness = 80 - dosage * 50;
10
+ return `hsl(${ALT_COLOR_HUE},${ALT_COLOR_SATURATION}%,${lightness}%)`;
11
+ }
@@ -1,2 +1,3 @@
1
- export declare function getColorAlleleCount(ref: number, alt: number, alt2: number, uncalled: number, total: number, drawReference?: boolean): any;
1
+ export declare function getAlleleColor(genotype: string, mostFrequentAlt: string, colorCache: Record<string, string | undefined>, splitCache: Record<string, string[]>, drawRef: boolean): string;
2
+ export declare function getColorAlleleCount(ref: number, alt: number, alt2: number, uncalled: number, total: number, drawReference?: boolean): string;
2
3
  export declare function drawColorAlleleCount(c: string, ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, featureType?: string, featureStrand?: number, alpha?: number): void;