@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,24 +1,58 @@
1
1
  import { colord } from '@jbrowse/core/util/colord';
2
- import { f2 } from './constants';
2
+ import { ALT_COLOR_HUE, ALT_COLOR_SATURATION, NO_CALL_COLOR, REFERENCE_COLOR, f2, } from "./constants.js";
3
+ export function getAlleleColor(genotype, mostFrequentAlt, colorCache, splitCache, drawRef) {
4
+ const cacheKey = `${genotype}:${mostFrequentAlt}`;
5
+ let c = colorCache[cacheKey];
6
+ if (c === undefined) {
7
+ let alt = 0;
8
+ let uncalled = 0;
9
+ let alt2 = 0;
10
+ let ref = 0;
11
+ const alleles = splitCache[genotype] ?? (splitCache[genotype] = genotype.split(/[/|]/));
12
+ const total = alleles.length;
13
+ for (let i = 0; i < total; i++) {
14
+ const allele = alleles[i];
15
+ if (allele === mostFrequentAlt) {
16
+ alt++;
17
+ }
18
+ else if (allele === '0') {
19
+ ref++;
20
+ }
21
+ else if (allele === '.') {
22
+ uncalled++;
23
+ }
24
+ else {
25
+ alt2++;
26
+ }
27
+ }
28
+ c = getColorAlleleCount(ref, alt, alt2, uncalled, total, drawRef);
29
+ colorCache[cacheKey] = c;
30
+ }
31
+ return c;
32
+ }
3
33
  export function getColorAlleleCount(ref, alt, alt2, uncalled, total, drawReference = true) {
4
34
  if (ref === total) {
5
- return drawReference ? '#ccc' : '';
35
+ return drawReference ? REFERENCE_COLOR : '';
6
36
  }
7
- else {
8
- let a1;
9
- if (alt) {
10
- a1 = colord(`hsl(200,50%,${80 - (alt / total) * 50}%)`);
11
- }
12
- if (alt2) {
13
- const l = `hsla(0,100%,20%,${alt2 / total})`;
14
- a1 = a1 ? a1.mix(l) : colord(l);
15
- }
16
- if (uncalled) {
17
- const l = `hsl(50,50%,50%,${uncalled / total})`;
18
- a1 = a1 ? a1.mix(l) : colord(l);
19
- }
20
- return (a1 === null || a1 === void 0 ? void 0 : a1.toHex()) || 'black';
37
+ if (!(alt || alt2 || uncalled)) {
38
+ return '';
39
+ }
40
+ let a1;
41
+ if (alt) {
42
+ const lightness = 80 - (alt / total) * 50;
43
+ a1 = colord(`hsl(${ALT_COLOR_HUE},${ALT_COLOR_SATURATION}%,${lightness}%)`);
44
+ }
45
+ if (alt2) {
46
+ const alpha = alt2 / total;
47
+ const l = `hsla(0,100%,20%,${alpha})`;
48
+ a1 = a1 ? a1.mix(l) : colord(l);
49
+ }
50
+ if (uncalled) {
51
+ const alpha = uncalled / total;
52
+ const l = NO_CALL_COLOR.replace(')', `,${alpha})`).replace('hsl', 'hsla');
53
+ a1 = a1 ? a1.mix(l) : colord(l);
21
54
  }
55
+ return a1?.toHex() || 'black';
22
56
  }
23
57
  export function drawColorAlleleCount(c, ctx, x, y, w, h, featureType = '', featureStrand, alpha = 1) {
24
58
  ctx.fillStyle = alpha !== 1 ? colord(c).alpha(alpha).toHex() : c;
@@ -1,19 +1,18 @@
1
1
  import { set1 } from '@jbrowse/core/ui/colors';
2
2
  import { colord } from '@jbrowse/core/util/colord';
3
- import { f2 } from './constants';
4
- import { colorify } from './util';
5
- function getColorPhased(alleles, HP, drawReference = true) {
6
- const c = +alleles[HP];
7
- return c ? set1[c - 1] || 'black' : drawReference ? '#ccc' : undefined;
8
- }
9
- function getColorPhasedWithPhaseSet(alleles, HP, PS, drawReference = true) {
10
- const c = +alleles[HP];
11
- return c ? colorify(+PS) || 'black' : drawReference ? '#ccc' : undefined;
3
+ import { REFERENCE_COLOR, UNPHASED_COLOR, f2 } from "./constants.js";
4
+ function colorify(n) {
5
+ return `hsl(${n % 255}, 50%, 50%)`;
12
6
  }
13
7
  export function drawPhased(alleles, ctx, x, y, w, h, HP, PS, drawReference = true, alpha = 1) {
14
- const c = PS !== undefined
15
- ? getColorPhasedWithPhaseSet(alleles, HP, PS, drawReference)
16
- : getColorPhased(alleles, HP, drawReference);
8
+ const allele = +alleles[HP];
9
+ const c = allele
10
+ ? PS !== undefined
11
+ ? colorify(+PS) || UNPHASED_COLOR
12
+ : set1[allele - 1] || UNPHASED_COLOR
13
+ : drawReference
14
+ ? REFERENCE_COLOR
15
+ : undefined;
17
16
  if (c) {
18
17
  ctx.fillStyle = alpha !== 1 ? colord(c).alpha(alpha).toHex() : c;
19
18
  ctx.fillRect(x - f2, y - f2, w + f2, h + f2);
@@ -1,18 +1,19 @@
1
- import type { SampleInfo, Source } from './shared/types';
1
+ import type { SampleInfo, Source } from './types.ts';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  import type { Feature } from '@jbrowse/core/util';
4
+ import type { StopToken } from '@jbrowse/core/util/stopToken';
4
5
  export declare function getMultiVariantFeaturesAutorun(self: {
5
6
  configuration: AnyConfigurationModel;
6
7
  adapterConfig: AnyConfigurationModel;
7
8
  sources?: Source[];
8
9
  minorAlleleFrequencyFilter: number;
9
10
  lengthCutoffFilter: number;
10
- statsReadyAndRegionNotTooLarge: boolean;
11
+ featureDensityStatsReadyAndRegionNotTooLarge: boolean;
11
12
  adapterProps: () => Record<string, unknown>;
12
13
  setError: (error: unknown) => void;
13
14
  setFeatures: (f: Feature[]) => void;
14
- setMessage: (str: string) => void;
15
+ setStatusMessage: (str: string) => void;
15
16
  setHasPhased: (arg: boolean) => void;
16
17
  setSampleInfo: (arg: Record<string, SampleInfo>) => void;
17
- setSimplifiedFeaturesLoading: (arg: string) => void;
18
+ setSimplifiedFeaturesLoading: (arg: StopToken) => void;
18
19
  }): void;
@@ -2,13 +2,14 @@ import { SimpleFeature, getContainingView, getSession, } from '@jbrowse/core/uti
2
2
  import { isAbortException } from '@jbrowse/core/util/aborting';
3
3
  import { createStopToken } from '@jbrowse/core/util/stopToken';
4
4
  import { getRpcSessionId } from '@jbrowse/core/util/tracks';
5
+ import { addDisposer, isAlive } from '@jbrowse/mobx-state-tree';
5
6
  import { autorun } from 'mobx';
6
- import { addDisposer, isAlive } from 'mobx-state-tree';
7
7
  export function getMultiVariantFeaturesAutorun(self) {
8
8
  addDisposer(self, autorun(async () => {
9
9
  try {
10
10
  const view = getContainingView(self);
11
- if (!view.initialized || !self.statsReadyAndRegionNotTooLarge) {
11
+ if (!view.initialized ||
12
+ !self.featureDensityStatsReadyAndRegionNotTooLarge) {
12
13
  return;
13
14
  }
14
15
  const stopToken = createStopToken();
@@ -25,6 +26,11 @@ export function getMultiVariantFeaturesAutorun(self) {
25
26
  sessionId,
26
27
  adapterConfig,
27
28
  stopToken,
29
+ statusCallback: (arg) => {
30
+ if (isAlive(self)) {
31
+ self.setStatusMessage(arg);
32
+ }
33
+ },
28
34
  }));
29
35
  if (isAlive(self)) {
30
36
  self.setHasPhased(hasPhased);
@@ -41,5 +47,6 @@ export function getMultiVariantFeaturesAutorun(self) {
41
47
  }
42
48
  }, {
43
49
  delay: 1000,
50
+ name: 'MultiVariantFeatures',
44
51
  }));
45
52
  }
@@ -1,11 +1,12 @@
1
- import type { Source } from './shared/types';
1
+ import type { Source } from './types.ts';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { StopToken } from '@jbrowse/core/util/stopToken';
3
4
  export declare function getMultiVariantSourcesAutorun(self: {
4
5
  configuration: AnyConfigurationModel;
5
6
  adapterConfig: AnyConfigurationModel;
6
7
  adapterProps: () => Record<string, unknown>;
7
- setSourcesLoading: (aborter: string) => void;
8
+ setSourcesLoading: (aborter: StopToken) => void;
8
9
  setError: (error: unknown) => void;
9
- setMessage: (str: string) => void;
10
+ setStatusMessage: (str: string) => void;
10
11
  setSources: (sources: Source[]) => void;
11
12
  }): void;
@@ -2,8 +2,8 @@ import { getContainingView, getSession } from '@jbrowse/core/util';
2
2
  import { isAbortException } from '@jbrowse/core/util/aborting';
3
3
  import { createStopToken } from '@jbrowse/core/util/stopToken';
4
4
  import { getRpcSessionId } from '@jbrowse/core/util/tracks';
5
+ import { addDisposer, isAlive } from '@jbrowse/mobx-state-tree';
5
6
  import { autorun } from 'mobx';
6
- import { addDisposer, isAlive } from 'mobx-state-tree';
7
7
  export function getMultiVariantSourcesAutorun(self) {
8
8
  addDisposer(self, autorun(async () => {
9
9
  try {
@@ -20,6 +20,11 @@ export function getMultiVariantSourcesAutorun(self) {
20
20
  sessionId,
21
21
  adapterConfig,
22
22
  stopToken,
23
+ statusCallback: (arg) => {
24
+ if (isAlive(self)) {
25
+ self.setStatusMessage(arg);
26
+ }
27
+ },
23
28
  }));
24
29
  if (isAlive(self)) {
25
30
  self.setSources(sources);
@@ -31,5 +36,8 @@ export function getMultiVariantSourcesAutorun(self) {
31
36
  getSession(self).notifyError(`${e}`, e);
32
37
  }
33
38
  }
34
- }, { delay: 1000 }));
39
+ }, {
40
+ delay: 1000,
41
+ name: 'GetMultiVariantSources',
42
+ }));
35
43
  }
@@ -1,4 +1,4 @@
1
- import type { SampleInfo, Source } from './types';
1
+ import type { SampleInfo, Source } from './types.ts';
2
2
  export declare function getSources({ sources, layout, renderingMode, sampleInfo, }: {
3
3
  sources: Source[];
4
4
  layout?: Source[];
@@ -3,8 +3,8 @@ export function getSources({ sources, layout = sources, renderingMode, sampleInf
3
3
  const sourceMap = Object.fromEntries(sources.map(s => [s.name, s]));
4
4
  for (const row of layout) {
5
5
  if (renderingMode === 'phased') {
6
- const info = sampleInfo === null || sampleInfo === void 0 ? void 0 : sampleInfo[row.name];
7
- if (info === null || info === void 0 ? void 0 : info.isPhased) {
6
+ const info = sampleInfo?.[row.name];
7
+ if (info?.isPhased) {
8
8
  const ploidy = info.maxPloidy;
9
9
  for (let i = 0; i < ploidy; i++) {
10
10
  const id = `${row.name} HP${i}`;
@@ -0,0 +1,6 @@
1
+ import type { MouseState } from '../components/types.ts';
2
+ export declare function useMouseTracking(ref: React.RefObject<HTMLDivElement | null>): {
3
+ mouseState: MouseState | undefined;
4
+ handleMouseMove: (event: React.MouseEvent) => void;
5
+ handleMouseLeave: () => void;
6
+ };
@@ -0,0 +1,34 @@
1
+ import { useCallback, useRef, useState } from 'react';
2
+ export function useMouseTracking(ref) {
3
+ const rafRef = useRef(undefined);
4
+ const [mouseState, setMouseState] = useState();
5
+ const handleMouseMove = useCallback((event) => {
6
+ if (rafRef.current) {
7
+ cancelAnimationFrame(rafRef.current);
8
+ }
9
+ const clientX = event.clientX;
10
+ const clientY = event.clientY;
11
+ rafRef.current = requestAnimationFrame(() => {
12
+ const rect = ref.current?.getBoundingClientRect();
13
+ if (rect) {
14
+ setMouseState({
15
+ x: clientX - rect.left,
16
+ y: clientY - rect.top,
17
+ offsetX: rect.left,
18
+ offsetY: rect.top,
19
+ });
20
+ }
21
+ });
22
+ }, [ref]);
23
+ const handleMouseLeave = useCallback(() => {
24
+ if (rafRef.current) {
25
+ cancelAnimationFrame(rafRef.current);
26
+ }
27
+ setMouseState(undefined);
28
+ }, []);
29
+ return {
30
+ mouseState,
31
+ handleMouseMove,
32
+ handleMouseLeave,
33
+ };
34
+ }
@@ -0,0 +1,9 @@
1
+ import type { LegendBarModel } from './components/types.ts';
2
+ interface Model extends LegendBarModel {
3
+ hierarchy: any;
4
+ availableHeight: number;
5
+ totalHeight: number;
6
+ treeAreaWidth: number;
7
+ }
8
+ export declare function makeSidebarSvg(self: Model): Promise<import("react/jsx-runtime").JSX.Element>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getContainingView } from '@jbrowse/core/util';
3
+ import SvgTree from "./components/SvgTree.js";
4
+ import LegendBar from "../shared/components/MultiVariantLegendBar.js";
5
+ export async function makeSidebarSvg(self) {
6
+ const { offsetPx } = getContainingView(self);
7
+ const { hierarchy, showTree, treeAreaWidth, availableHeight } = self;
8
+ return (_jsxs("g", { id: "tree-layer", "data-testid": "tree-layer", transform: `translate(${Math.max(-offsetPx, 0)})`, clipPath: "url(#sidebarClip)", children: [_jsx("clipPath", { id: "sidebarClip", children: _jsx("rect", { x: "0", y: "0", width: "100%", height: availableHeight }) }), _jsx("g", { id: "legend-layer", transform: `translate(${showTree && hierarchy ? treeAreaWidth : 0})`, children: _jsx(LegendBar, { model: self, orientation: "left", exportSVG: true }) }), showTree ? _jsx(SvgTree, { model: self }) : null] }));
9
+ }
@@ -1,12 +1,13 @@
1
- import type { Feature } from '@jbrowse/core/util';
2
- export declare function findSecondLargestNumber(arr: Iterable<number>): number;
3
- export declare function calculateAlleleCounts(feat: Feature): Record<string, number>;
1
+ import type { Feature, LastStopTokenCheck } from '@jbrowse/core/util';
2
+ export declare function calculateAlleleCounts(genotypes: Record<string, string>, cacheSplit: Record<string, string[]>): Record<string, number>;
4
3
  export declare function calculateMinorAlleleFrequency(alleleCounts: Record<string, number>): number;
5
- export declare function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, stopToken, }: {
4
+ export declare function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, lastCheck, genotypesCache, splitCache, }: {
6
5
  features: Iterable<Feature>;
7
6
  minorAlleleFrequencyFilter: number;
8
7
  lengthCutoffFilter: number;
9
- stopToken?: string;
8
+ lastCheck?: LastStopTokenCheck;
9
+ genotypesCache?: Map<string, Record<string, string>>;
10
+ splitCache?: Record<string, string[]>;
10
11
  }): {
11
12
  feature: Feature;
12
13
  mostFrequentAlt: string;
@@ -1,57 +1,55 @@
1
- import { forEachWithStopTokenCheck, sum } from '@jbrowse/core/util';
2
- export function findSecondLargestNumber(arr) {
3
- let firstMax = 0;
4
- let secondMax = 0;
5
- for (const num of arr) {
6
- if (num > firstMax) {
7
- secondMax = firstMax;
8
- firstMax = num;
9
- }
10
- else if (num > secondMax && num !== firstMax) {
11
- secondMax = num;
12
- }
13
- }
14
- return secondMax;
15
- }
16
- export function calculateAlleleCounts(feat) {
17
- var _a;
18
- const genotypes = feat.get('genotypes');
19
- const alleleCounts = { 0: 0, 1: 0, '.': 0 };
20
- const cacheSplit = {};
1
+ import { checkStopToken2 } from '@jbrowse/core/util/stopToken';
2
+ export function calculateAlleleCounts(genotypes, cacheSplit) {
3
+ const alleleCounts = {};
21
4
  const vals = Object.values(genotypes);
22
- const len = vals.length;
23
- for (let i = 0; i < len; i++) {
24
- const genotype = vals[i];
25
- const alleles = cacheSplit[genotype] || (cacheSplit[genotype] = genotype.split(/[/|]/));
26
- for (let i = 0, len = alleles.length; i < len; i++) {
27
- const a = alleles[i];
28
- alleleCounts[a] = ((_a = alleleCounts[a]) !== null && _a !== void 0 ? _a : 0) + 1;
5
+ for (const val of vals) {
6
+ const genotype = val;
7
+ const alleles = cacheSplit[genotype] ?? (cacheSplit[genotype] = genotype.split(/[/|]/));
8
+ for (const allele of alleles) {
9
+ const a = allele;
10
+ alleleCounts[a] = (alleleCounts[a] || 0) + 1;
29
11
  }
30
12
  }
31
13
  return alleleCounts;
32
14
  }
33
15
  export function calculateMinorAlleleFrequency(alleleCounts) {
34
- return (findSecondLargestNumber(Object.values(alleleCounts)) /
35
- (sum(Object.values(alleleCounts)) || 1));
16
+ let firstMax = 0;
17
+ let secondMax = 0;
18
+ let total = 0;
19
+ for (const count of Object.values(alleleCounts)) {
20
+ total += count;
21
+ if (count > firstMax) {
22
+ secondMax = firstMax;
23
+ firstMax = count;
24
+ }
25
+ else if (count > secondMax && count !== firstMax) {
26
+ secondMax = count;
27
+ }
28
+ }
29
+ return secondMax / (total || 1);
36
30
  }
37
31
  function getMostFrequentAlt(alleleCounts) {
38
32
  let mostFrequentAlt;
39
33
  let max = 0;
40
34
  for (const [alt, altCount] of Object.entries(alleleCounts)) {
41
- if (alt !== '.' && alt !== '0') {
42
- if (altCount > max) {
43
- mostFrequentAlt = alt;
44
- max = altCount;
45
- }
35
+ if (alt !== '.' && alt !== '0' && altCount > max) {
36
+ mostFrequentAlt = alt;
37
+ max = altCount;
46
38
  }
47
39
  }
48
40
  return mostFrequentAlt;
49
41
  }
50
- export function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, stopToken, }) {
42
+ export function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorAlleleFrequencyFilter, lengthCutoffFilter, lastCheck, genotypesCache, splitCache = {}, }) {
51
43
  const results = [];
52
- forEachWithStopTokenCheck(features, stopToken, feature => {
44
+ for (const feature of features) {
53
45
  if (feature.get('end') - feature.get('start') <= lengthCutoffFilter) {
54
- const alleleCounts = calculateAlleleCounts(feature);
46
+ const featureId = feature.id();
47
+ let genotypes = genotypesCache?.get(featureId);
48
+ if (!genotypes) {
49
+ genotypes = feature.get('genotypes');
50
+ genotypesCache?.set(featureId, genotypes);
51
+ }
52
+ const alleleCounts = calculateAlleleCounts(genotypes, splitCache);
55
53
  if (calculateMinorAlleleFrequency(alleleCounts) >=
56
54
  minorAlleleFrequencyFilter) {
57
55
  results.push({
@@ -61,6 +59,7 @@ export function getFeaturesThatPassMinorAlleleFrequencyFilter({ features, minorA
61
59
  });
62
60
  }
63
61
  }
64
- });
62
+ checkStopToken2(lastCheck);
63
+ }
65
64
  return results;
66
65
  }
@@ -0,0 +1,2 @@
1
+ import type { MultiVariantBaseModel } from './MultiVariantBaseModel.ts';
2
+ export declare function setupMultiVariantAutoruns(self: MultiVariantBaseModel): void;
@@ -0,0 +1,8 @@
1
+ import { getMultiVariantFeaturesAutorun } from "./getMultiVariantFeaturesAutorun.js";
2
+ import { getMultiVariantSourcesAutorun } from "./getMultiVariantSourcesAutorun.js";
3
+ import { setupTreeDrawingAutorun } from "./treeDrawingAutorun.js";
4
+ export function setupMultiVariantAutoruns(self) {
5
+ getMultiVariantSourcesAutorun(self);
6
+ getMultiVariantFeaturesAutorun(self);
7
+ setupTreeDrawingAutorun(self);
8
+ }
@@ -0,0 +1,16 @@
1
+ import type { ClusterHierarchyNode, HoveredTreeNode } from './components/types.ts';
2
+ import type { Source } from './types.ts';
3
+ interface TreeDrawingModel {
4
+ treeCanvas?: HTMLCanvasElement;
5
+ mouseoverCanvas?: HTMLCanvasElement;
6
+ hierarchy?: ClusterHierarchyNode;
7
+ treeAreaWidth: number;
8
+ height: number;
9
+ scrollTop: number;
10
+ rowHeight: number;
11
+ totalHeight: number;
12
+ hoveredTreeNode?: HoveredTreeNode;
13
+ sources?: Source[];
14
+ }
15
+ export declare function setupTreeDrawingAutorun(self: TreeDrawingModel): void;
16
+ export {};
@@ -0,0 +1,71 @@
1
+ import { getContainingView } from '@jbrowse/core/util';
2
+ import { addDisposer } from '@jbrowse/mobx-state-tree';
3
+ import { autorun } from 'mobx';
4
+ export function setupTreeDrawingAutorun(self) {
5
+ addDisposer(self, autorun(function treeDrawAutorun() {
6
+ const { treeCanvas, hierarchy, treeAreaWidth, height, scrollTop, totalHeight: _totalHeight, } = self;
7
+ if (!treeCanvas || !hierarchy) {
8
+ return;
9
+ }
10
+ const ctx = treeCanvas.getContext('2d');
11
+ if (!ctx) {
12
+ return;
13
+ }
14
+ ctx.resetTransform();
15
+ ctx.scale(2, 2);
16
+ ctx.clearRect(0, 0, treeAreaWidth, height);
17
+ ctx.translate(0, -scrollTop);
18
+ ctx.strokeStyle = '#0008';
19
+ ctx.lineWidth = 1;
20
+ ctx.beginPath();
21
+ for (const link of hierarchy.links()) {
22
+ const { source, target } = link;
23
+ const sy = source.x;
24
+ const ty = target.x;
25
+ const tx = target.y;
26
+ const sx = source.y;
27
+ ctx.moveTo(sx, sy);
28
+ ctx.lineTo(sx, ty);
29
+ ctx.moveTo(sx, ty);
30
+ ctx.lineTo(tx, ty);
31
+ }
32
+ ctx.stroke();
33
+ }, {
34
+ name: 'TreeDraw',
35
+ }));
36
+ addDisposer(self, autorun(function treeHoverAutorun() {
37
+ const { mouseoverCanvas, hierarchy, rowHeight, hoveredTreeNode, height, scrollTop, sources, totalHeight, } = self;
38
+ if (!mouseoverCanvas) {
39
+ return;
40
+ }
41
+ const ctx = mouseoverCanvas.getContext('2d');
42
+ if (!ctx) {
43
+ return;
44
+ }
45
+ const view = getContainingView(self);
46
+ const viewWidth = view.width;
47
+ ctx.clearRect(0, 0, viewWidth, height);
48
+ if (hierarchy && hoveredTreeNode && sources) {
49
+ ctx.save();
50
+ ctx.translate(0, -scrollTop);
51
+ ctx.fillStyle = 'rgba(255,165,0,0.2)';
52
+ const descendantSet = new Set(hoveredTreeNode.descendantNames);
53
+ for (let i = 0, l = sources.length; i < l; i++) {
54
+ const source = sources[i];
55
+ if (descendantSet.has(source.name)) {
56
+ const y = (i + 0.5) * rowHeight;
57
+ ctx.fillRect(0, y - rowHeight / 2, viewWidth, rowHeight);
58
+ }
59
+ }
60
+ const { node } = hoveredTreeNode;
61
+ ctx.fillStyle = 'rgba(255,165,0,0.8)';
62
+ ctx.beginPath();
63
+ ctx.arc(node.y, node.x, 4, 0, 2 * Math.PI);
64
+ ctx.fill();
65
+ ctx.strokeStyle = 'rgba(255,140,0,1)';
66
+ ctx.lineWidth = 1;
67
+ ctx.stroke();
68
+ ctx.restore();
69
+ }
70
+ }, { name: 'TreeHover' }));
71
+ }
@@ -1,3 +1,5 @@
1
+ import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
2
+ import type { Feature } from '@jbrowse/core/util';
1
3
  export interface Source {
2
4
  baseUri?: string;
3
5
  name: string;
@@ -12,3 +14,16 @@ export interface SampleInfo {
12
14
  isPhased: boolean;
13
15
  maxPloidy: number;
14
16
  }
17
+ export interface MultiVariantRenderArgsBase extends FeatureRenderArgsDeserialized {
18
+ sources: Source[];
19
+ bpPerPx: number;
20
+ minorAlleleFrequencyFilter: number;
21
+ lengthCutoffFilter: number;
22
+ height: number;
23
+ rowHeight: number;
24
+ scrollTop: number;
25
+ features: Map<string, Feature>;
26
+ renderingMode: string;
27
+ statusCallback?: (arg: string) => void;
28
+ highResolutionScaling: number;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-variants",
3
- "version": "3.7.0",
3
+ "version": "4.0.0",
4
4
  "description": "JBrowse 2 variant adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -15,44 +15,32 @@
15
15
  "directory": "plugins/variants"
16
16
  },
17
17
  "author": "JBrowse Team",
18
- "distMain": "dist/index.js",
19
- "srcMain": "src/index.ts",
20
- "main": "dist/index.js",
18
+ "main": "esm/index.js",
21
19
  "files": [
22
- "dist",
23
20
  "esm"
24
21
  ],
25
- "scripts": {
26
- "build": "npm-run-all build:*",
27
- "test": "cd ../..; jest --passWithNoTests plugins/variants",
28
- "prepublishOnly": "yarn test",
29
- "prepack": "yarn build && yarn useDist",
30
- "postpack": "yarn useSrc",
31
- "useDist": "node ../../scripts/useDist.js",
32
- "useSrc": "node ../../scripts/useSrc.js",
33
- "prebuild": "npm run clean",
34
- "build:esm": "tsc --build tsconfig.build.esm.json",
35
- "build:commonjs": "tsc --build tsconfig.build.commonjs.json",
36
- "clean": "rimraf dist esm *.tsbuildinfo"
37
- },
38
22
  "dependencies": {
39
- "@flatten-js/interval-tree": "^2.0.0",
40
- "@gmod/bgzf-filehandle": "^4.0.0",
41
- "@gmod/tabix": "^3.0.1",
42
- "@gmod/vcf": "^6.0.8",
43
- "@jbrowse/core": "^3.7.0",
44
- "@jbrowse/plugin-circular-view": "^3.7.0",
45
- "@jbrowse/plugin-linear-genome-view": "^3.7.0",
46
- "@jbrowse/sv-core": "^3.7.0",
47
- "@mui/icons-material": "^7.0.0",
48
- "@mui/material": "^7.0.0",
49
- "@mui/x-data-grid": "^8.0.0",
23
+ "@flatten-js/interval-tree": "^2.0.3",
24
+ "@gmod/hclust": "^1.0.7",
25
+ "@gmod/tabix": "^3.2.2",
26
+ "@gmod/vcf": "^6.1.0",
27
+ "@jbrowse/mobx-state-tree": "^5.5.0",
28
+ "@mui/icons-material": "^7.3.6",
29
+ "@mui/material": "^7.3.6",
30
+ "@mui/x-charts-vendor": "^8.23.0",
31
+ "@mui/x-data-grid": "^8.23.0",
32
+ "copy-to-clipboard": "^3.3.3",
50
33
  "escape-html": "^1.0.3",
51
- "mobx": "^6.0.0",
52
- "mobx-react": "^9.0.0",
53
- "mobx-state-tree": "^5.0.0",
54
- "rxjs": "^7.0.0",
55
- "tss-react": "^4.0.0"
34
+ "fast-deep-equal": "^3.1.3",
35
+ "@types/file-saver-es": "^2.0.3",
36
+ "file-saver-es": "^2.0.5",
37
+ "mobx": "^6.15.0",
38
+ "mobx-react": "^9.2.1",
39
+ "rxjs": "^7.8.2",
40
+ "@jbrowse/plugin-circular-view": "^4.0.0",
41
+ "@jbrowse/core": "^4.0.0",
42
+ "@jbrowse/plugin-linear-genome-view": "^4.0.0",
43
+ "@jbrowse/sv-core": "^4.0.0"
56
44
  },
57
45
  "peerDependencies": {
58
46
  "react": ">=18.0.0"
@@ -60,8 +48,19 @@
60
48
  "publishConfig": {
61
49
  "access": "public"
62
50
  },
63
- "distModule": "esm/index.js",
64
- "srcModule": "src/index.ts",
65
- "module": "esm/index.js",
66
- "gitHead": "85bdd0d58286b7adbfd408146b15847676317635"
67
- }
51
+ "sideEffects": false,
52
+ "scripts": {
53
+ "build": "pnpm run /^build:/",
54
+ "test": "cd ../..; jest --passWithNoTests plugins/variants",
55
+ "prebuild": "pnpm clean",
56
+ "build:esm": "tsc -p tsconfig.build.esm.json",
57
+ "clean": "rimraf esm *.tsbuildinfo"
58
+ },
59
+ "types": "esm/index.d.ts",
60
+ "exports": {
61
+ ".": {
62
+ "types": "./esm/index.d.ts",
63
+ "import": "./esm/index.js"
64
+ }
65
+ }
66
+ }
@@ -1,2 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- export default function ChordVariantDisplayF(pluginManager: PluginManager): void;