higlass 1.13.5 → 2.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 (392) hide show
  1. package/README.md +48 -54
  2. package/app/globals.d.ts +1 -1
  3. package/app/missing-types.d.ts +4 -1
  4. package/app/scripts/AddTrackDialog.jsx +11 -4
  5. package/app/scripts/AddTrackPositionMenu.jsx +28 -7
  6. package/app/scripts/Annotations1dTrack.js +90 -251
  7. package/app/scripts/Annotations2dTrack.js +12 -7
  8. package/app/scripts/Autocomplete.jsx +13 -28
  9. package/app/scripts/AxisPixi.js +6 -10
  10. package/app/scripts/BarTrack.js +3 -3
  11. package/app/scripts/BedLikeTrack.js +556 -449
  12. package/app/scripts/Button.jsx +1 -1
  13. package/app/scripts/CNVIntervalTrack.js +1 -1
  14. package/app/scripts/CenterTrack.jsx +8 -7
  15. package/app/scripts/Chromosome2DAnnotations.js +1 -1
  16. package/app/scripts/Chromosome2DLabels.js +1 -1
  17. package/app/scripts/ChromosomeGrid.js +49 -38
  18. package/app/scripts/ChromosomeInfo.js +1 -1
  19. package/app/scripts/CombinedTrack.js +3 -1
  20. package/app/scripts/ConfigTrackMenu.jsx +1 -1
  21. package/app/scripts/ConfigViewMenu.jsx +2 -2
  22. package/app/scripts/ContextMenuContainer.jsx +4 -2
  23. package/app/scripts/ContextMenuItem.jsx +14 -2
  24. package/app/scripts/CrossRule.js +1 -1
  25. package/app/scripts/CustomTrackDialog.jsx +2 -2
  26. package/app/scripts/Dialog.jsx +2 -2
  27. package/app/scripts/DragListeningDiv.jsx +1 -1
  28. package/app/scripts/DraggableDiv.jsx +2 -3
  29. package/app/scripts/ExportLinkDialog.jsx +1 -1
  30. package/app/scripts/FilledLine.js +349 -0
  31. package/app/scripts/GalleryTracks.jsx +77 -78
  32. package/app/scripts/GenomePositionSearchBox.jsx +184 -482
  33. package/app/scripts/HeatmapOptions.jsx +4 -2
  34. package/app/scripts/HeatmapTiledPixiTrack.js +23 -32
  35. package/app/scripts/HiGlassComponent.jsx +515 -444
  36. package/app/scripts/HiGlassComponentContext.js +5 -0
  37. package/app/scripts/Horizontal1dHeatmapTrack.js +1 -1
  38. package/app/scripts/Horizontal2DDomainsTrack.js +1 -1
  39. package/app/scripts/HorizontalChromosomeLabels.js +28 -22
  40. package/app/scripts/HorizontalGeneAnnotationsTrack.js +1 -1
  41. package/app/scripts/HorizontalHeatmapTrack.js +2 -2
  42. package/app/scripts/HorizontalMultivecTrack.js +6 -7
  43. package/app/scripts/HorizontalRule.js +1 -2
  44. package/app/scripts/HorizontalTiled1DPixiTrack.js +4 -4
  45. package/app/scripts/HorizontalTiledPlot.jsx +9 -9
  46. package/app/scripts/LeftTrackModifier.js +4 -0
  47. package/app/scripts/ListWrapper.jsx +1 -2
  48. package/app/scripts/MapboxTilesTrack.js +1 -2
  49. package/app/scripts/Modal.jsx +2 -2
  50. package/app/scripts/MoveableTrack.jsx +10 -12
  51. package/app/scripts/NestedContextMenu.jsx +2 -1
  52. package/app/scripts/OSMTileIdsTrack.js +1 -1
  53. package/app/scripts/OverlayTrack.js +4 -4
  54. package/app/scripts/PixiTrack.js +27 -13
  55. package/app/scripts/PlotTypeChooser.jsx +3 -4
  56. package/app/scripts/SearchField.js +5 -5
  57. package/app/scripts/SeriesListItems.jsx +3 -4
  58. package/app/scripts/SeriesListMenu.jsx +95 -53
  59. package/app/scripts/SeriesListSubmenuMixin.jsx +2 -1
  60. package/app/scripts/SketchInlinePicker.jsx +2 -2
  61. package/app/scripts/SortableList.jsx +1 -1
  62. package/app/scripts/Tiled1DPixiTrack.js +4 -1
  63. package/app/scripts/TiledPixiTrack.js +244 -102
  64. package/app/scripts/TiledPlot.jsx +565 -118
  65. package/app/scripts/TilesetFinder.jsx +12 -4
  66. package/app/scripts/Track.js +1 -1
  67. package/app/scripts/TrackArea.jsx +4 -0
  68. package/app/scripts/TrackControl.jsx +2 -2
  69. package/app/scripts/TrackRenderer.jsx +32 -33
  70. package/app/scripts/ValueIntervalTrack.js +1 -1
  71. package/app/scripts/VerticalRule.js +2 -2
  72. package/app/scripts/VerticalTiledPlot.jsx +7 -7
  73. package/app/scripts/ViewConfigEditor.jsx +1 -1
  74. package/app/scripts/ViewContextMenu.jsx +53 -5
  75. package/app/scripts/ViewHeader.jsx +9 -9
  76. package/app/scripts/ViewportTracker2D.js +1 -1
  77. package/app/scripts/api.js +92 -12
  78. package/app/scripts/configs/available-track-types.js +1 -1
  79. package/app/scripts/configs/index.js +6 -1
  80. package/app/scripts/configs/positions-by-datatype.js +2 -2
  81. package/app/scripts/configs/primitives.js +2 -0
  82. package/app/scripts/configs/themes.js +0 -1
  83. package/app/scripts/configs/tracks-info-by-type.js +11 -8
  84. package/app/scripts/configs/tracks-info.js +3 -2
  85. package/app/scripts/d3-context-menu.js +3 -4
  86. package/app/scripts/data-fetchers/DataFetcher.js +35 -36
  87. package/app/scripts/data-fetchers/genbank-fetcher.js +13 -22
  88. package/app/scripts/data-fetchers/local-tile-fetcher.js +10 -8
  89. package/app/scripts/hglib.jsx +62 -71
  90. package/app/scripts/hocs/with-modal.jsx +32 -10
  91. package/app/scripts/hocs/with-pub-sub.js +12 -3
  92. package/app/scripts/hocs/with-theme.jsx +21 -14
  93. package/app/scripts/icons.jsx +3 -2
  94. package/app/scripts/mixwith.js +2 -2
  95. package/app/scripts/options-info.js +49 -11
  96. package/app/scripts/plugins/get-data-fetcher.js +2 -3
  97. package/app/scripts/services/chrom-info.js +32 -4
  98. package/app/scripts/services/element-resize-listener.js +2 -2
  99. package/app/scripts/services/index.js +0 -1
  100. package/app/scripts/services/tile-proxy.js +368 -285
  101. package/app/scripts/services/worker.js +31 -28
  102. package/app/scripts/test-helpers/index.js +2 -1
  103. package/app/scripts/test-helpers/test-helpers.jsx +157 -69
  104. package/app/scripts/types.ts +118 -47
  105. package/app/scripts/utils/LruCache.js +3 -2
  106. package/app/scripts/utils/assert.js +19 -0
  107. package/app/scripts/utils/background-task-scheduler.js +2 -0
  108. package/app/scripts/utils/color-domain-to-rgba-array.js +13 -3
  109. package/app/scripts/utils/copy-text-to-clipboard.js +36 -0
  110. package/app/scripts/utils/decompress.js +33 -0
  111. package/app/scripts/utils/default-tracks.js +46 -0
  112. package/app/scripts/utils/dict-items.js +1 -0
  113. package/app/scripts/utils/dict-keys.js +1 -0
  114. package/app/scripts/utils/dict-values.js +1 -0
  115. package/app/scripts/utils/expand-combined-tracks.js +11 -7
  116. package/app/scripts/utils/fill-in-min-widths.js +47 -21
  117. package/app/scripts/utils/flatten.js +0 -1
  118. package/app/scripts/utils/get-aggregation-function.js +1 -1
  119. package/app/scripts/utils/get-default-track-for-datatype.js +37 -10
  120. package/app/scripts/utils/get-default-tracks-for-datatype.ts +46 -0
  121. package/app/scripts/utils/get-higlass-components.js +27 -3
  122. package/app/scripts/utils/get-track-position-by-uid.js +8 -1
  123. package/app/scripts/utils/get-xylofon.js +12 -9
  124. package/app/scripts/utils/has-parent.js +5 -5
  125. package/app/scripts/utils/hex-string-to-int.js +1 -1
  126. package/app/scripts/utils/index.js +1 -0
  127. package/app/scripts/utils/interval-tree.js +222 -177
  128. package/app/scripts/utils/load-chrom-infos.js +4 -1
  129. package/app/scripts/utils/pixi-text-to-svg.js +5 -9
  130. package/app/scripts/utils/positioned-tracks-to-all-tracks.js +55 -0
  131. package/app/scripts/utils/range-query-2d.js +3 -3
  132. package/app/scripts/utils/reduce.js +12 -5
  133. package/app/scripts/utils/segments-to-rows.js +14 -11
  134. package/app/scripts/utils/svg-line.js +7 -8
  135. package/app/scripts/utils/type-guards.js +16 -7
  136. package/app/scripts/utils/visit-positioned-tracks.js +9 -4
  137. package/app/styles/AddTrackPositionMenu.module.scss +37 -0
  138. package/app/styles/HiGlass.module.scss +3 -1
  139. package/app/styles/d3-context-menu.css +0 -1
  140. package/app/styles/prism.css +1 -0
  141. package/dist/app/schema.json +525 -0
  142. package/dist/app/scripts/AddTrackDialog.d.ts +64 -0
  143. package/dist/app/scripts/AddTrackPositionMenu.d.ts +5 -0
  144. package/dist/app/scripts/Annotations1dTrack.d.ts +15 -0
  145. package/dist/app/scripts/Annotations2dTrack.d.ts +95 -0
  146. package/dist/app/scripts/ArrowheadDomainsTrack.d.ts +36 -0
  147. package/dist/app/scripts/Autocomplete.d.ts +102 -0
  148. package/dist/app/scripts/AxisPixi.d.ts +25 -0
  149. package/dist/app/scripts/BarTrack.d.ts +28 -0
  150. package/dist/app/scripts/BedLikeTrack.d.ts +84 -0
  151. package/dist/app/scripts/Button.d.ts +3 -0
  152. package/dist/app/scripts/CNVIntervalTrack.d.ts +12 -0
  153. package/dist/app/scripts/CenterTiledPlot.d.ts +3 -0
  154. package/dist/app/scripts/CenterTrack.d.ts +92 -0
  155. package/dist/app/scripts/Chromosome2DAnnotations.d.ts +10 -0
  156. package/dist/app/scripts/Chromosome2DLabels.d.ts +13 -0
  157. package/dist/app/scripts/ChromosomeGrid.d.ts +24 -0
  158. package/dist/app/scripts/ChromosomeInfo.d.ts +14 -0
  159. package/dist/app/scripts/CloseTrackMenu.d.ts +10 -0
  160. package/dist/app/scripts/CombinedTrack.d.ts +32 -0
  161. package/dist/app/scripts/ConfigTrackMenu.d.ts +10 -0
  162. package/dist/app/scripts/ConfigViewMenu.d.ts +34 -0
  163. package/dist/app/scripts/ConfigureSeriesMenu.d.ts +3 -0
  164. package/dist/app/scripts/ContextMenuContainer.d.ts +36 -0
  165. package/dist/app/scripts/ContextMenuItem.d.ts +34 -0
  166. package/dist/app/scripts/Cross.d.ts +3 -0
  167. package/dist/app/scripts/CrossRule.d.ts +24 -0
  168. package/dist/app/scripts/CustomTrackDialog.d.ts +17 -0
  169. package/dist/app/scripts/Dialog.d.ts +5 -0
  170. package/dist/app/scripts/DivergentBarTrack.d.ts +4 -0
  171. package/dist/app/scripts/DragListeningDiv.d.ts +32 -0
  172. package/dist/app/scripts/DraggableDiv.d.ts +63 -0
  173. package/dist/app/scripts/ExportLinkDialog.d.ts +21 -0
  174. package/dist/app/scripts/FilledLine.d.ts +5 -0
  175. package/dist/app/scripts/FixedTrack.d.ts +5 -0
  176. package/dist/app/scripts/GalleryTracks.d.ts +20 -0
  177. package/dist/app/scripts/GenomePositionSearchBox.d.ts +95 -0
  178. package/dist/app/scripts/HeatmapOptions.d.ts +30 -0
  179. package/dist/app/scripts/HeatmapTiledPixiTrack.d.ts +184 -0
  180. package/dist/app/scripts/HiGlassComponent.d.ts +762 -0
  181. package/dist/app/scripts/HiGlassComponentContext.d.ts +3 -0
  182. package/dist/app/scripts/HiGlassTrackComponent.d.ts +37 -0
  183. package/dist/app/scripts/Horizontal1dHeatmapTrack.d.ts +9 -0
  184. package/dist/app/scripts/Horizontal2DDomainsTrack.d.ts +21 -0
  185. package/dist/app/scripts/HorizontalChromosomeLabels.d.ts +47 -0
  186. package/dist/app/scripts/HorizontalGeneAnnotationsTrack.d.ts +25 -0
  187. package/dist/app/scripts/HorizontalHeatmapTrack.d.ts +12 -0
  188. package/dist/app/scripts/HorizontalItem.d.ts +3 -0
  189. package/dist/app/scripts/HorizontalLine1DPixiTrack.d.ts +23 -0
  190. package/dist/app/scripts/HorizontalMultivecTrack.d.ts +50 -0
  191. package/dist/app/scripts/HorizontalPoint1DPixiTrack.d.ts +5 -0
  192. package/dist/app/scripts/HorizontalRule.d.ts +22 -0
  193. package/dist/app/scripts/HorizontalTiled1DPixiTrack.d.ts +26 -0
  194. package/dist/app/scripts/HorizontalTiledPlot.d.ts +49 -0
  195. package/dist/app/scripts/HorizontalTrack.d.ts +6 -0
  196. package/dist/app/scripts/Id2DTiledPixiTrack.d.ts +10 -0
  197. package/dist/app/scripts/IdHorizontal1DTiledPixiTrack.d.ts +6 -0
  198. package/dist/app/scripts/IdVertical1DTiledPixiTrack.d.ts +7 -0
  199. package/dist/app/scripts/LeftAxisTrack.d.ts +9 -0
  200. package/dist/app/scripts/LeftTrackModifier.d.ts +29 -0
  201. package/dist/app/scripts/ListWrapper.d.ts +64 -0
  202. package/dist/app/scripts/MapboxTilesTrack.d.ts +9 -0
  203. package/dist/app/scripts/Modal.d.ts +5 -0
  204. package/dist/app/scripts/MoveableTrack.d.ts +18 -0
  205. package/dist/app/scripts/NestedContextMenu.d.ts +7 -0
  206. package/dist/app/scripts/OSMTileIdsTrack.d.ts +5 -0
  207. package/dist/app/scripts/OSMTilesTrack.d.ts +129 -0
  208. package/dist/app/scripts/OverlayTrack.d.ts +13 -0
  209. package/dist/app/scripts/PixiTrack.d.ts +174 -0
  210. package/dist/app/scripts/PlotTypeChooser.d.ts +25 -0
  211. package/dist/app/scripts/PopupMenu.d.ts +28 -0
  212. package/dist/app/scripts/RasterTilesTrack.d.ts +9 -0
  213. package/dist/app/scripts/RuleMixin.d.ts +2 -0
  214. package/dist/app/scripts/SVGTrack.d.ts +15 -0
  215. package/dist/app/scripts/SearchField.d.ts +13 -0
  216. package/dist/app/scripts/SeriesListItems.d.ts +2 -0
  217. package/dist/app/scripts/SeriesListMenu.d.ts +51 -0
  218. package/dist/app/scripts/SeriesListSubmenuMixin.d.ts +2 -0
  219. package/dist/app/scripts/SketchInlinePicker.d.ts +25 -0
  220. package/dist/app/scripts/SortableList.d.ts +22 -0
  221. package/dist/app/scripts/SquareMarkersTrack.d.ts +22 -0
  222. package/dist/app/scripts/Tiled1DPixiTrack.d.ts +60 -0
  223. package/dist/app/scripts/TiledPixiTrack.d.ts +369 -0
  224. package/dist/app/scripts/TiledPlot.d.ts +313 -0
  225. package/dist/app/scripts/TilesetFinder.d.ts +65 -0
  226. package/dist/app/scripts/TopAxisTrack.d.ts +9 -0
  227. package/dist/app/scripts/Track.d.ts +196 -0
  228. package/dist/app/scripts/TrackArea.d.ts +26 -0
  229. package/dist/app/scripts/TrackControl.d.ts +5 -0
  230. package/dist/app/scripts/TrackRenderer.d.ts +724 -0
  231. package/dist/app/scripts/UnknownPixiTrack.d.ts +7 -0
  232. package/dist/app/scripts/ValueIntervalTrack.d.ts +6 -0
  233. package/dist/app/scripts/VerticalItem.d.ts +3 -0
  234. package/dist/app/scripts/VerticalRule.d.ts +21 -0
  235. package/dist/app/scripts/VerticalTiled1DPixiTrack.d.ts +6 -0
  236. package/dist/app/scripts/VerticalTiledPlot.d.ts +50 -0
  237. package/dist/app/scripts/VerticalTrack.d.ts +6 -0
  238. package/dist/app/scripts/ViewConfigEditor.d.ts +53 -0
  239. package/dist/app/scripts/ViewContextMenu.d.ts +17 -0
  240. package/dist/app/scripts/ViewHeader.d.ts +75 -0
  241. package/dist/app/scripts/ViewportTracker2D.d.ts +17 -0
  242. package/dist/app/scripts/ViewportTracker2DPixi.d.ts +11 -0
  243. package/dist/app/scripts/ViewportTrackerHorizontal.d.ts +17 -0
  244. package/dist/app/scripts/ViewportTrackerVertical.d.ts +17 -0
  245. package/dist/app/scripts/api.d.ts +640 -0
  246. package/dist/app/scripts/configs/available-track-types.d.ts +2 -0
  247. package/dist/app/scripts/configs/colormaps.d.ts +2 -0
  248. package/dist/app/scripts/configs/datatype-to-track-type.d.ts +4 -0
  249. package/dist/app/scripts/configs/default-tracks-for-datatype.d.ts +38 -0
  250. package/dist/app/scripts/configs/dense-data-extrema-config.d.ts +2 -0
  251. package/dist/app/scripts/configs/globals.d.ts +5 -0
  252. package/dist/app/scripts/configs/index.d.ts +16 -0
  253. package/dist/app/scripts/configs/positions-by-datatype.d.ts +2 -0
  254. package/dist/app/scripts/configs/primitives.d.ts +20 -0
  255. package/dist/app/scripts/configs/themes.d.ts +3 -0
  256. package/dist/app/scripts/configs/tracks-info-by-type.d.ts +4 -0
  257. package/dist/app/scripts/configs/tracks-info.d.ts +24 -0
  258. package/dist/app/scripts/d3-context-menu.d.ts +2 -0
  259. package/dist/app/scripts/data-fetchers/DataFetcher.d.ts +151 -0
  260. package/dist/app/scripts/data-fetchers/genbank-fetcher.d.ts +86 -0
  261. package/dist/app/scripts/data-fetchers/index.d.ts +3 -0
  262. package/dist/app/scripts/data-fetchers/local-tile-fetcher.d.ts +47 -0
  263. package/dist/app/scripts/gosling-exports.d.ts +17 -0
  264. package/dist/app/scripts/hglib.d.ts +24 -0
  265. package/dist/app/scripts/hocs/with-modal.d.ts +19 -0
  266. package/dist/app/scripts/hocs/with-pub-sub.d.ts +22 -0
  267. package/dist/app/scripts/hocs/with-theme.d.ts +13 -0
  268. package/dist/app/scripts/icons.d.ts +161 -0
  269. package/dist/app/scripts/mixwith.d.ts +27 -0
  270. package/dist/app/scripts/options-info.d.ts +1355 -0
  271. package/dist/app/scripts/plugins/available-for-plugins.d.ts +2338 -0
  272. package/dist/app/scripts/plugins/get-data-fetcher.d.ts +2 -0
  273. package/dist/app/scripts/plugins/index.d.ts +2 -0
  274. package/dist/app/scripts/services/chrom-info.d.ts +10 -0
  275. package/dist/app/scripts/services/dom-event.d.ts +7 -0
  276. package/dist/app/scripts/services/element-resize-listener.d.ts +5 -0
  277. package/dist/app/scripts/services/index.d.ts +5 -0
  278. package/dist/app/scripts/services/tile-proxy.d.ts +180 -0
  279. package/dist/app/scripts/services/worker.d.ts +157 -0
  280. package/dist/app/scripts/symbol.d.ts +13 -0
  281. package/dist/app/scripts/test-helpers/index.d.ts +1 -0
  282. package/dist/app/scripts/test-helpers/test-helpers.d.ts +33 -0
  283. package/dist/app/scripts/track-utils.d.ts +73 -0
  284. package/dist/app/scripts/types.d.ts +199 -0
  285. package/dist/app/scripts/utils/DenseDataExtrema1D.d.ts +88 -0
  286. package/dist/app/scripts/utils/DenseDataExtrema2D.d.ts +97 -0
  287. package/dist/app/scripts/utils/LruCache.d.ts +44 -0
  288. package/dist/app/scripts/utils/abs-to-chr.d.ts +14 -0
  289. package/dist/app/scripts/utils/accessor-transposition.d.ts +14 -0
  290. package/dist/app/scripts/utils/add-arrays.d.ts +18 -0
  291. package/dist/app/scripts/utils/add-class.d.ts +8 -0
  292. package/dist/app/scripts/utils/add-event-listener-once.d.ts +11 -0
  293. package/dist/app/scripts/utils/assert.d.ts +17 -0
  294. package/dist/app/scripts/utils/background-task-scheduler.d.ts +47 -0
  295. package/dist/app/scripts/utils/base64-to-canvas.d.ts +9 -0
  296. package/dist/app/scripts/utils/chr-to-abs.d.ts +10 -0
  297. package/dist/app/scripts/utils/chrom-info-bisector.d.ts +4 -0
  298. package/dist/app/scripts/utils/clone-event.d.ts +12 -0
  299. package/dist/app/scripts/utils/color-domain-to-rgba-array.d.ts +13 -0
  300. package/dist/app/scripts/utils/color-to-hex.d.ts +9 -0
  301. package/dist/app/scripts/utils/color-to-rgba.d.ts +9 -0
  302. package/dist/app/scripts/utils/copy-text-to-clipboard.d.ts +2 -0
  303. package/dist/app/scripts/utils/data-to-genomic-loci.d.ts +11 -0
  304. package/dist/app/scripts/utils/debounce.d.ts +5 -0
  305. package/dist/app/scripts/utils/dec-to-hex-str.d.ts +8 -0
  306. package/dist/app/scripts/utils/decompress.d.ts +27 -0
  307. package/dist/app/scripts/utils/default-tracks.d.ts +3 -0
  308. package/dist/app/scripts/utils/dict-from-tuples.d.ts +11 -0
  309. package/dist/app/scripts/utils/dict-items.d.ts +18 -0
  310. package/dist/app/scripts/utils/dict-keys.d.ts +10 -0
  311. package/dist/app/scripts/utils/dict-values.d.ts +8 -0
  312. package/dist/app/scripts/utils/download.d.ts +7 -0
  313. package/dist/app/scripts/utils/expand-combined-tracks.d.ts +11 -0
  314. package/dist/app/scripts/utils/fake-pub-sub.d.ts +11 -0
  315. package/dist/app/scripts/utils/fill-in-min-widths.d.ts +44 -0
  316. package/dist/app/scripts/utils/flatten.d.ts +9 -0
  317. package/dist/app/scripts/utils/for-each.d.ts +9 -0
  318. package/dist/app/scripts/utils/forward-event.d.ts +7 -0
  319. package/dist/app/scripts/utils/genome-loci-to-pixels.d.ts +9 -0
  320. package/dist/app/scripts/utils/genomic-range-to-chromosome-chunks.d.ts +21 -0
  321. package/dist/app/scripts/utils/get-aggregation-function.d.ts +10 -0
  322. package/dist/app/scripts/utils/get-default-track-for-datatype.d.ts +21 -0
  323. package/dist/app/scripts/utils/get-default-tracks-for-datatype.d.ts +3 -0
  324. package/dist/app/scripts/utils/get-element-dim.d.ts +7 -0
  325. package/dist/app/scripts/utils/get-higlass-components.d.ts +7 -0
  326. package/dist/app/scripts/utils/get-track-by-uid.d.ts +7 -0
  327. package/dist/app/scripts/utils/get-track-conf-from-hgc.d.ts +10 -0
  328. package/dist/app/scripts/utils/get-track-obj-by-id.d.ts +2 -0
  329. package/dist/app/scripts/utils/get-track-position-by-uid.d.ts +13 -0
  330. package/dist/app/scripts/utils/get-xylofon.d.ts +2 -0
  331. package/dist/app/scripts/utils/gradient.d.ts +14 -0
  332. package/dist/app/scripts/utils/has-class.d.ts +8 -0
  333. package/dist/app/scripts/utils/has-parent.d.ts +9 -0
  334. package/dist/app/scripts/utils/hex-string-to-int.d.ts +14 -0
  335. package/dist/app/scripts/utils/index.d.ts +89 -0
  336. package/dist/app/scripts/utils/interval-tree.d.ts +109 -0
  337. package/dist/app/scripts/utils/into-the-void.d.ts +6 -0
  338. package/dist/app/scripts/utils/is-track-or-child-track.d.ts +7 -0
  339. package/dist/app/scripts/utils/is-track-range-selectable.d.ts +2 -0
  340. package/dist/app/scripts/utils/is-within.d.ts +12 -0
  341. package/dist/app/scripts/utils/lat-to-y.d.ts +9 -0
  342. package/dist/app/scripts/utils/lng-to-x.d.ts +8 -0
  343. package/dist/app/scripts/utils/load-chrom-infos.d.ts +8 -0
  344. package/dist/app/scripts/utils/map.d.ts +13 -0
  345. package/dist/app/scripts/utils/max-non-zero.d.ts +6 -0
  346. package/dist/app/scripts/utils/max.d.ts +10 -0
  347. package/dist/app/scripts/utils/min-non-zero.d.ts +6 -0
  348. package/dist/app/scripts/utils/min.d.ts +10 -0
  349. package/dist/app/scripts/utils/mod.d.ts +9 -0
  350. package/dist/app/scripts/utils/ndarray-assign.d.ts +2 -0
  351. package/dist/app/scripts/utils/ndarray-flatten.d.ts +2 -0
  352. package/dist/app/scripts/utils/ndarray-to-list.d.ts +2 -0
  353. package/dist/app/scripts/utils/numericify-version.d.ts +6 -0
  354. package/dist/app/scripts/utils/obj-vals.d.ts +8 -0
  355. package/dist/app/scripts/utils/or.d.ts +8 -0
  356. package/dist/app/scripts/utils/parse-chromsizes-rows.d.ts +34 -0
  357. package/dist/app/scripts/utils/pixi-text-to-svg.d.ts +2 -0
  358. package/dist/app/scripts/utils/positioned-tracks-to-all-tracks.d.ts +26 -0
  359. package/dist/app/scripts/utils/q.d.ts +18 -0
  360. package/dist/app/scripts/utils/rad-to-deg.d.ts +7 -0
  361. package/dist/app/scripts/utils/range-query-2d.d.ts +17 -0
  362. package/dist/app/scripts/utils/reduce.d.ts +14 -0
  363. package/dist/app/scripts/utils/rel-to-abs-chrom-pos.d.ts +10 -0
  364. package/dist/app/scripts/utils/remove-class.d.ts +7 -0
  365. package/dist/app/scripts/utils/reset-d3-brush-style.d.ts +10 -0
  366. package/dist/app/scripts/utils/rgb-to-hex.d.ts +8 -0
  367. package/dist/app/scripts/utils/scales-center-and-k.d.ts +12 -0
  368. package/dist/app/scripts/utils/scales-to-genome-loci.d.ts +3 -0
  369. package/dist/app/scripts/utils/segments-to-rows.d.ts +15 -0
  370. package/dist/app/scripts/utils/selected-items-to-cum-weights.d.ts +12 -0
  371. package/dist/app/scripts/utils/selected-items-to-size.d.ts +13 -0
  372. package/dist/app/scripts/utils/show-mouse-position.d.ts +54 -0
  373. package/dist/app/scripts/utils/some.d.ts +10 -0
  374. package/dist/app/scripts/utils/sum.d.ts +8 -0
  375. package/dist/app/scripts/utils/svg-line.d.ts +2 -0
  376. package/dist/app/scripts/utils/throttle-and-debounce.d.ts +33 -0
  377. package/dist/app/scripts/utils/tile-to-canvas.d.ts +9 -0
  378. package/dist/app/scripts/utils/timeout.d.ts +3 -0
  379. package/dist/app/scripts/utils/to-void.d.ts +3 -0
  380. package/dist/app/scripts/utils/total-track-pixel-height.d.ts +27 -0
  381. package/dist/app/scripts/utils/trim-trailing-slash.d.ts +7 -0
  382. package/dist/app/scripts/utils/type-guards.d.ts +36 -0
  383. package/dist/app/scripts/utils/value-to-color.d.ts +12 -0
  384. package/dist/app/scripts/utils/visit-positioned-tracks.d.ts +18 -0
  385. package/dist/app/scripts/utils/visit-tracks.d.ts +9 -0
  386. package/dist/esm.html +1 -3
  387. package/dist/hglib.js +86315 -100592
  388. package/dist/hglib.min.js +123 -131
  389. package/dist/higlass.mjs +88861 -103138
  390. package/dist/index.html +1 -3
  391. package/dist/package.json +134 -0
  392. package/package.json +25 -27
@@ -0,0 +1,369 @@
1
+ /** @import * as t from './types' */
2
+ /**
3
+ * Get a valueScale for a heatmap.
4
+ *
5
+ * If the scalingType isn't specified, then default to the defaultScaling.
6
+ *
7
+ * @param {string} scalingType: The type of the (e.g. 'linear', or 'log')
8
+ * @param {number} minValue: The minimum data value to which this scale will apply
9
+ * @param {number} pseudocountIn: A value to add to all numbers to prevent taking the log of 0
10
+ * @param {number} maxValue: The maximum data value to which this scale will apply
11
+ * @param {string} defaultScaling: The default scaling type to use in case
12
+ * 'scalingType' is null (e.g. 'linear' or 'log')
13
+ *
14
+ * @returns {[string, import('d3-scale').ScaleLogarithmic<number, number> | import('d3-scale').ScaleLinear<number, number>]}
15
+ * An array of [string, scale] containing the scale type and a scale with an appropriately set domain and range
16
+ */
17
+ export function getValueScale(scalingType: string, minValue: number, pseudocountIn: number, maxValue: number, defaultScaling: string): [string, import("d3-scale").ScaleLogarithmic<number, number> | import("d3-scale").ScaleLinear<number, number>];
18
+ export default TiledPixiTrack;
19
+ export type Scale = {
20
+ minValue?: number | null | undefined;
21
+ maxValue?: number | null | undefined;
22
+ maxRawValue?: number | null | undefined;
23
+ minRawValue?: number | null | undefined;
24
+ };
25
+ /**
26
+ * An alternative to Tile. Perhaps the worst data type. An array of numbers with some extra properties.
27
+ */
28
+ export type TilePositionArrayObject = Array<number> & Pick<Tile, "mirrored" | "tilePositionId">;
29
+ export type Tile = {
30
+ tileId: string;
31
+ tileData: TileData;
32
+ remoteId: string;
33
+ mirrored: unknown;
34
+ tilePositionId: string;
35
+ graphics: import("pixi.js").Graphics;
36
+ };
37
+ export type TileData = {
38
+ tilesetUid: string;
39
+ zoomLevel: number;
40
+ tilePos: Array<number>;
41
+ error: string;
42
+ dense: Float32Array;
43
+ minNonZero: number;
44
+ maxNonZero: number;
45
+ /**
46
+ * - Optional 1D or 2D array dimensions
47
+ */
48
+ shape?: number[] | undefined;
49
+ };
50
+ export type TiledPixiTrackContextBase = {
51
+ dataFetcher: DataFetcher;
52
+ dataConfig: t.DataConfig;
53
+ /**
54
+ * A function to redraw this track. Typically called when an
55
+ * asynchronous event occurs (i.e. tiles loaded)
56
+ */
57
+ animate: Function;
58
+ /**
59
+ * The range of values has changed so we need to inform
60
+ * the higher ups that the value scale has changed. Only occurs on tracks with ``dense`` data.
61
+ */
62
+ onValueScaleChanged: () => void;
63
+ /**
64
+ * A callback to do something once once the tileset
65
+ * info is received. Usually it registers some information about the tileset with its definition
66
+ */
67
+ handleTilesetInfoReceived?: ((t: t.TilesetInfo) => void) | undefined;
68
+ };
69
+ export type TiledPixiTrackContext = import("./PixiTrack").ExtendedPixiContext<TiledPixiTrackContextBase>;
70
+ export type TiledPixiTrackOptions = {
71
+ /**
72
+ * - If the label is to be drawn, where should it be drawn?
73
+ */
74
+ labelPosition: string;
75
+ /**
76
+ * - What should be drawn in the label.
77
+ */
78
+ labelText: string;
79
+ maxZoom: number;
80
+ name: string;
81
+ };
82
+ export type ExtendedTiledPixiTrackOptions<T> = T & TiledPixiTrackOptions;
83
+ /**
84
+ * @typedef Scale
85
+ * @property {number | null} [minValue]
86
+ * @property {number | null} [maxValue]
87
+ * @property {number | null} [maxRawValue]
88
+ * @property {number | null} [minRawValue]
89
+ */
90
+ /**
91
+ * An alternative to Tile. Perhaps the worst data type. An array of numbers with some extra properties.
92
+ * @typedef {Array<number> & Pick<Tile, 'mirrored' | 'tilePositionId'>} TilePositionArrayObject
93
+ */
94
+ /**
95
+ * @typedef Tile
96
+ * @property {string} tileId
97
+ * @property {TileData} tileData
98
+ * @property {string} remoteId
99
+ * @property {unknown} mirrored
100
+ * @property {string} tilePositionId
101
+ * @property {import("pixi.js").Graphics} graphics
102
+ */
103
+ /**
104
+ * @typedef TileData
105
+ * @property {string} tilesetUid
106
+ * @property {number} zoomLevel
107
+ * @property {Array<number>} tilePos
108
+ * @property {string} error
109
+ * @property {Float32Array} dense
110
+ * @property {number} minNonZero
111
+ * @property {number} maxNonZero
112
+ * @property {Array<number>} [shape] - Optional 1D or 2D array dimensions
113
+ */
114
+ /**
115
+ * @typedef TiledPixiTrackContextBase
116
+ * @property {DataFetcher} dataFetcher
117
+ * @property {t.DataConfig} dataConfig
118
+ * @property {function} animate A function to redraw this track. Typically called when an
119
+ * asynchronous event occurs (i.e. tiles loaded)
120
+ * @property {() => void} onValueScaleChanged The range of values has changed so we need to inform
121
+ * the higher ups that the value scale has changed. Only occurs on tracks with ``dense`` data.
122
+ * @property {(t: t.TilesetInfo) => void} [handleTilesetInfoReceived] A callback to do something once once the tileset
123
+ * info is received. Usually it registers some information about the tileset with its definition
124
+ */
125
+ /**
126
+ * @typedef {import('./PixiTrack').ExtendedPixiContext<TiledPixiTrackContextBase>} TiledPixiTrackContext
127
+ */
128
+ /**
129
+ * @typedef TiledPixiTrackOptions
130
+ * @property {string} labelPosition - If the label is to be drawn, where should it be drawn?
131
+ * @property {string} labelText - What should be drawn in the label.
132
+ * @property {number} maxZoom
133
+ * @property {string} name
134
+ */
135
+ /**
136
+ * @template T
137
+ * @typedef {T & TiledPixiTrackOptions} ExtendedTiledPixiTrackOptions
138
+ */
139
+ /**
140
+ * The TiledPixiTrack requires an options parameter, which should be an object containing properties specified in
141
+ * TiledPixiTrackOptions. It is capable of accepting any property defined in any of its superclasses.
142
+ * @template {ExtendedTiledPixiTrackOptions<{[key: string]: any}>} Options
143
+ * @extends {PixiTrack<Options>}
144
+ * */
145
+ declare class TiledPixiTrack<Options extends ExtendedTiledPixiTrackOptions<{
146
+ [key: string]: any;
147
+ }>> extends PixiTrack<Options> {
148
+ /**
149
+ *
150
+ * @param {TiledPixiTrackContext} context
151
+ * @param {Options} options
152
+ */
153
+ constructor(context: TiledPixiTrackContext, options: Options);
154
+ /** @type {number} */
155
+ renderVersion: number;
156
+ /** @type {Array<Pick<Tile, 'tileId' |'remoteId' | 'mirrored'>>} */
157
+ visibleTiles: Array<Pick<Tile, "tileId" | "remoteId" | "mirrored">>;
158
+ /** @type {Set<string>} */
159
+ visibleTileIds: Set<string>;
160
+ renderingTiles: Set<any>;
161
+ fetching: Set<any>;
162
+ /** @type {Scale} */
163
+ scale: Scale;
164
+ /** @type {{[id: string]: Tile}} */
165
+ fetchedTiles: {
166
+ [id: string]: Tile;
167
+ };
168
+ /** @type {Object.<string, import('pixi.js').DisplayObject>} */
169
+ tileGraphics: {
170
+ [x: string]: import("pixi.js").DisplayObject;
171
+ };
172
+ /** @type {number} */
173
+ maxZoom: number;
174
+ medianVisibleValue: number | null | undefined;
175
+ backgroundTaskScheduler: {
176
+ taskList: import("./utils/background-task-scheduler").Task[];
177
+ taskHandle: number | null;
178
+ requestIdleCallbackTimeout: number;
179
+ /**
180
+ * @template T
181
+ * @overload
182
+ * @param {(data: T) => void} taskHandler
183
+ * @param {T} taskData
184
+ * @param {string | null=} trackId
185
+ * @return {void}
186
+ */
187
+ enqueueTask<T>(taskHandler: (data: T) => void, taskData: T, trackId?: (string | null) | undefined): void;
188
+ /**
189
+ * If `taskData` is `null` the `taskHandler` will eventaully be called without any arguments.
190
+ *
191
+ * @overload
192
+ * @param {() => void} taskHandler
193
+ * @param {null} taskData
194
+ * @param {string | null=} trackId
195
+ * @return {void}
196
+ */
197
+ enqueueTask(taskHandler: () => void, taskData: null, trackId?: (string | null) | undefined): void;
198
+ runTaskQueue(deadline: {
199
+ timeRemaining(): number;
200
+ didTimeout: boolean;
201
+ }): void;
202
+ };
203
+ continuousScaling: boolean;
204
+ valueScaleMin: number | null;
205
+ fixedValueScaleMin: number | null;
206
+ valueScaleMax: number | null;
207
+ fixedValueScaleMax: number | null;
208
+ /** @type {Record<string, Array<Function>>} */
209
+ listeners: Record<string, Array<Function>>;
210
+ animate: Function;
211
+ onValueScaleChanged: () => void;
212
+ prevValueScale: any;
213
+ dataFetcher: DataFetcher;
214
+ /** @type {null | string} */
215
+ tilesetInfoError: null | string;
216
+ uuid: string;
217
+ trackNotFoundText: import("pixi.js").Text;
218
+ refreshTilesDebounced: (request: unknown) => void;
219
+ chromInfo: import("./utils/parse-chromsizes-rows.js").ParsedChromsizes;
220
+ tilesetUid: string | undefined;
221
+ server: string;
222
+ /** @param {number | string} value */
223
+ setFixedValueScaleMin(value: number | string): void;
224
+ /** @param {number | string} value */
225
+ setFixedValueScaleMax(value: number | string): void;
226
+ checkValueScaleLimits(): void;
227
+ /**
228
+ * Register an event listener for track events. Currently, the only supported
229
+ * event is ``dataChanged``.
230
+ *
231
+ * @param {string} event The event to listen for
232
+ * @param {function} callback The callback to call when the event occurs. The
233
+ * parameters for the event depend on the event called.
234
+ *
235
+ * @example
236
+ *
237
+ * trackObj.on('dataChanged', (newData) => {
238
+ * console.log('newData:', newData)
239
+ * });
240
+ */
241
+ on(event: string, callback: Function): void;
242
+ /**
243
+ * @param {string} event The event to listen for
244
+ * @param {function} callback The callback to call when the event occurs. The
245
+ * parameters for the event depend on the event called.
246
+ */
247
+ off(event: string, callback: Function): void;
248
+ /** Called when tileset info is received. The actual tileset info
249
+ * can be found in this.tilesetInfo.
250
+ *
251
+ * Child tracks can implement this method.
252
+ */
253
+ tilesetInfoReceived(): void;
254
+ /**
255
+ * Return the set of ids of all tiles which are both visible and fetched.
256
+ */
257
+ visibleAndFetchedIds(): string[];
258
+ visibleAndFetchedTiles(): Tile[];
259
+ /**
260
+ * Set which tiles are visible right now.
261
+ *
262
+ * @param {Array<TilePositionArrayObject>} tilePositions - A set of tiles which will be considered the currently visible tile positions.
263
+ */
264
+ setVisibleTiles(tilePositions: Array<TilePositionArrayObject>): void;
265
+ removeOldTiles(): void;
266
+ refreshTiles(): void;
267
+ /** @param {Tile} tile */
268
+ parentInFetched(tile: Tile): boolean;
269
+ /** @param {Tile} tile */
270
+ parentTileId(tile: Tile): string;
271
+ /**
272
+ * Remove obsolete tiles
273
+ *
274
+ * @param {Array<string>} toRemoveIds: An array of tile ids to remove from the list of fetched tiles.
275
+ */
276
+ removeTiles(toRemoveIds: Array<string>): void;
277
+ /**
278
+ * @param {t.Scale} newXScale
279
+ * @param {t.Scale} newYScale
280
+ */
281
+ zoomed(newXScale: t.Scale, newYScale: t.Scale, k?: number, tx?: number, ty?: number): void;
282
+ /**
283
+ * Check to see if all the visible tiles are loaded.
284
+ *
285
+ * If they are, remove all other tiles.
286
+ */
287
+ areAllVisibleTilesLoaded(): boolean;
288
+ /**
289
+ * Function is called when all tiles that should be visible have
290
+ * been received.
291
+ */
292
+ allTilesLoaded(): void;
293
+ /** @param {number} [_] - Optional value to set */
294
+ minValue(_?: number): number | this | null | undefined;
295
+ /** @param {number} [_] - Optional value to set */
296
+ maxValue(_?: number): number | this | null | undefined;
297
+ minRawValue(): number | null | undefined;
298
+ maxRawValue(): number | null | undefined;
299
+ /** @param {Tile} tile */
300
+ initTile(tile: Tile): void;
301
+ /** @param {Tile} tile */
302
+ updateTile(tile: Tile): void;
303
+ /** @param {Tile} tile */
304
+ destroyTile(tile: Tile): void;
305
+ addMissingGraphics(): void;
306
+ /**
307
+ * Change the graphics for existing tiles
308
+ */
309
+ updateExistingGraphics(): void;
310
+ synchronizeTilesAndGraphics(): void;
311
+ /**
312
+ * @typedef TiledAreaTile
313
+ * @property {string} tileId
314
+ * @property {string} type
315
+ * @property {unknown} data
316
+ */
317
+ /**
318
+ *
319
+ * @param {TiledAreaTile} tile A tile returned by a TiledArea.
320
+ * @param {function} dataLoader A function for extracting drawable data from a tile. This
321
+ * usually means differentiating the between dense and sparse tiles and putting the data into an array.
322
+ * @returns
323
+ */
324
+ loadTileData(tile: {
325
+ tileId: string;
326
+ type: string;
327
+ data: unknown;
328
+ }, dataLoader: Function): any;
329
+ /** @param {Pick<Tile,'remoteId'>[]} toFetch */
330
+ fetchNewTiles(toFetch: Pick<Tile, "remoteId">[]): void;
331
+ /**
332
+ * We've gotten a bunch of tiles from the server in
333
+ * response to a request from fetchTiles.
334
+ * @param {Object<string, import('./data-fetchers/DataFetcher').DividedTile | Tile | TilePositionArrayObject>} loadedTiles
335
+ */
336
+ receivedTiles(loadedTiles: {
337
+ [x: string]: import("./data-fetchers/DataFetcher").DividedTile | Tile | TilePositionArrayObject;
338
+ }): void;
339
+ _checkForErrors(): string[];
340
+ /**
341
+ * Draw a tile on some graphics
342
+ * @param {Tile} tile
343
+ */
344
+ drawTile(tile: Tile): void;
345
+ calculateMedianVisibleValue(): number | undefined;
346
+ allVisibleValues(): number[];
347
+ minVisibleValue(ignoreFixedScale?: boolean): number | null;
348
+ minVisibleValueInTiles(ignoreFixedScale?: boolean): number | null;
349
+ maxVisibleValue(ignoreFixedScale?: boolean): number | null;
350
+ maxVisibleValueInTiles(ignoreFixedScale?: boolean): number | null;
351
+ /** @typedef {import('d3-scale').ScaleQuantile<number, never> & { ticks?: (count: number) => number[] }} ScaleQuantile */
352
+ /**
353
+ * Create a value scale that will be used to position values
354
+ * along the y axis.
355
+ * @param {number} minValue The minimum value of the data
356
+ * @param {number} medianValue The median value of the data. Potentially used for adding a pseudocount
357
+ * @param {number} maxValue The maximum value of the data
358
+ * @param {number} [inMargin] A number of pixels to be left free on the top and bottom
359
+ * of the track. For example if the glyphs have a certain
360
+ * width and we want all of them to fit into the space
361
+ * @returns {[t.Scale | ScaleQuantile, number]}
362
+ */
363
+ makeValueScale(minValue: number, medianValue: number, maxValue: number, inMargin?: number): [t.Scale | (import("d3-scale").ScaleQuantile<number, never> & {
364
+ ticks?: (count: number) => number[];
365
+ }), number];
366
+ }
367
+ import { DataFetcher } from './data-fetchers';
368
+ import type * as t from './types';
369
+ import PixiTrack from './PixiTrack';
@@ -0,0 +1,313 @@
1
+ export class TiledPlot extends React.Component<any, any, any> {
2
+ constructor(props: any);
3
+ closing: boolean;
4
+ brushX: import("d3-brush").BrushBehavior<any>;
5
+ canvasElement: any;
6
+ tracksByUidInit: {};
7
+ annotationUid: any;
8
+ annotationCreatedNotified: boolean;
9
+ xScale: any;
10
+ yScale: any;
11
+ trackToReplace: any;
12
+ trackRenderer: import("./TrackRenderer").TrackRenderer | null;
13
+ brushSelection: any[] | any[][] | null;
14
+ configTrackMenu: any;
15
+ state: {
16
+ sizeMeasured: boolean;
17
+ height: number;
18
+ width: number;
19
+ tracks: any;
20
+ init: boolean;
21
+ addTrackExtent: null;
22
+ addTrackPosition: null;
23
+ customDialog: null;
24
+ mouseOverOverlayUid: null;
25
+ forceUpdate: number;
26
+ rangeSelection: null[];
27
+ rangeSelectionEnd: boolean;
28
+ chromInfo: null;
29
+ defaultChromSizes: null;
30
+ contextMenuCustomItems: null;
31
+ contextMenuPosition: null;
32
+ addDivisorDialog: null;
33
+ };
34
+ reset: boolean;
35
+ topHeight: number;
36
+ bottomHeight: number;
37
+ leftWidth: number;
38
+ rightWidth: number;
39
+ centerHeight: number;
40
+ centerWidth: number;
41
+ dragTimeout: any;
42
+ previousPropsStr: string;
43
+ brushesCreated: {};
44
+ appZoomedBound: () => void;
45
+ handleClickBound: (evt: any) => void;
46
+ contextMenuHandlerBound: (e: any) => void;
47
+ handleNoTrackAddedBound: () => void;
48
+ handleTracksAddedBound: (newTracks: any, position: any, extent: any, host: any) => any;
49
+ closeMenusBound: () => void;
50
+ handleAddDivisorBound: (series: any) => void;
51
+ handleAddSeriesBound: (trackUid: any) => void;
52
+ handleChangeTrackDataBound: (uid: any, newData: any) => void;
53
+ handleChangeTrackTypeBound: (uid: any, newType: any) => void;
54
+ handleCloseTrackBound: (uid: any) => void;
55
+ handleConfigureTrackBound: (track: any, configComponent: any) => void;
56
+ handleExportTrackDataBound: (hostTrackUid: any, trackUid: any) => void;
57
+ handleLockValueScaleBound: (uid: any) => void;
58
+ handleReplaceTrackBound: (uid: any, orientation: any) => void;
59
+ handleTrackOptionsChangedBound: (trackUid: any, newOptions: any) => any;
60
+ handleUnlockValueScaleBound: (uid: any) => void;
61
+ onAddTrack: (position: any, extent: any) => void;
62
+ waitForDOMAttachment(callback: any): void;
63
+ componentDidMount(): void;
64
+ mounted: boolean | undefined;
65
+ element: HTMLDivElement | null | undefined;
66
+ resizeSensor: ResizeSensor | undefined;
67
+ pubSubs: any[] | undefined;
68
+ /** Get the data in the selection */
69
+ getTracksData(positionedTracks: any, extent: any): {
70
+ name: any;
71
+ mean: number;
72
+ trackUid: any;
73
+ }[];
74
+ appZoomed(): void;
75
+ clearOtherBrushes(myBrush: any): void;
76
+ handleClick(evt: any): void;
77
+ cancelBrushes(): void;
78
+ brushEl: any;
79
+ removeBrushText(): void;
80
+ enableBrushes(): void;
81
+ disableBrushes(): void;
82
+ createBrushes(positionedTracks: any): {};
83
+ brushCurrent: any;
84
+ brushType: string | undefined;
85
+ brushTrack: any;
86
+ brushSelectionRaw: any;
87
+ removeBrushes(): void;
88
+ addBrushes(): void;
89
+ brushes: {} | undefined;
90
+ brushEls: {} | undefined;
91
+ UNSAFE_componentWillReceiveProps(newProps: any): void;
92
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
93
+ numTracks: number | undefined;
94
+ componentDidUpdate(prevProps: any, prevState: any): void;
95
+ componentWillUnmount(): void;
96
+ addUidsToTracks(positionedTracks: any): void;
97
+ contextMenuHandler(e: any): void;
98
+ measureSize(): void;
99
+ handleTrackOptionsChanged(trackUid: any, newOptions: any): any;
100
+ handleScalesChanged(x: any, y: any): void;
101
+ /**
102
+ * We've received information about a tileset from the server. Register it
103
+ * with the track definition.
104
+ * @param trackUid (string): The identifier for the track
105
+ * @param tilesetInfo (object): Information about the track (hopefully including
106
+ * its name.
107
+ */
108
+ handleTilesetInfoReceived(trackUid: any, tilesetInfo: any): void;
109
+ /**
110
+ * Check if all track which are expecting a tileset info have been loaded.
111
+ */
112
+ checkAllTilesetInfoReceived(): void;
113
+ handleOverlayMouseEnter(uid: any): void;
114
+ handleOverlayMouseLeave(uid: any): void;
115
+ handleTrackPositionChosen(pTrack: any, evt: any): void;
116
+ handleNoTrackAdded(): void;
117
+ handleAddDivisor(series: any): void;
118
+ /**
119
+ * The user has selected a track that they wish to use to normalize another
120
+ * track.
121
+ */
122
+ handleDivisorChosen(series: any, newTrack: any): void;
123
+ handleDivideSeries(seriesUid: any): void;
124
+ handleAddSeries(trackUid: any): void;
125
+ handleReplaceTrack(uid: any, orientation: any): void;
126
+ handleAddTrack(position: any, extent: any): void;
127
+ handleResizeTrack(uid: any, width: any, height: any): void;
128
+ closeMenus(): void;
129
+ handleLockValueScale(uid: any): void;
130
+ handleUnlockValueScale(uid: any): void;
131
+ handleCloseTrack(uid: any): void;
132
+ handleChangeTrackType(uid: any, newType: any): void;
133
+ /**
134
+ * Change this tracks data section so that it
135
+ * is either of type "divided" or the "divided"
136
+ * type is removed
137
+ */
138
+ handleChangeTrackData(uid: any, newData: any): void;
139
+ handleTracksAdded(newTracks: any, position: any, extent: any, host: any): any;
140
+ handleCloseTrackMenuOpened(uid: any, clickPosition: any): void;
141
+ handleCloseContextMenu(): void;
142
+ handleCloseTrackMenuClosed(): void;
143
+ handleConfigTrackMenuOpened(uid: any, clickPosition: any): void;
144
+ handleConfigureTrack(track: any, configComponent: any): void;
145
+ handleSortEnd(sortedTracks: any): void;
146
+ createTracksAndLocations(): any[];
147
+ /**
148
+ * Calculate where a track is absoluately positioned within the drawing area
149
+ *
150
+ * @param track: The track object (with members, e.g. track.uid, track.width,
151
+ * track.height)
152
+ * @param location: Where it's being plotted (e.g. 'top', 'bottom')
153
+ * @return: The position of the track and it's height and width
154
+ * (e.g. {left: 10, top: 20, width: 30, height: 40}
155
+ */
156
+ calculateTrackPosition(track: any, location: any): {
157
+ left: any;
158
+ top: any;
159
+ width: number;
160
+ height: any;
161
+ track: any;
162
+ };
163
+ /**
164
+ * Find a central heatmap track among all displayed tracks
165
+ *
166
+ * @param {Array} tracks Tracks to be searched.
167
+ * @return {Object} The first central heatmap track or `undefined`.
168
+ */
169
+ findCentralHeatmapTrack(tracks: any[]): Object;
170
+ trackUuidToOrientation(trackUuid: any): void;
171
+ overlayTracks(positionedTracks: any): any;
172
+ positionedTracks(): {
173
+ left: any;
174
+ top: any;
175
+ width: number;
176
+ height: any;
177
+ track: any;
178
+ }[];
179
+ createTrackPositionTexts(): React.JSX.Element[];
180
+ handleExportTrackData(hostTrackUid: any, trackUid: any): void;
181
+ /**
182
+ * List all the tracks that are under this mouse position
183
+ */
184
+ listTracksAtPosition(x: any, y: any, isReturnTrackObj?: boolean): (import("./types").UnknownTrackConfig | import("./types").CombinedTrackConfig | import("./types").TrackObject)[];
185
+ listAllTrackObjects(): import("./types").TrackObject[];
186
+ handleZoomToData(): void;
187
+ resetViewport(): void;
188
+ updatablePropsToString(props: any): string;
189
+ getXYScales(): void;
190
+ /**
191
+ * Translate view to data location.
192
+ *
193
+ * @description
194
+ * The view location is in pixels relative to the browser window. The data
195
+ * location is given by the scaling relative to the initial x and y domains.
196
+ * And the genomic location depends on the chrom sizes.
197
+ *
198
+ * @method rangeViewToDataLoci
199
+ * @author Fritz Lekschas
200
+ * @date 2018-01-14
201
+ * @param {Array} range Selected view range
202
+ * @param {Function} scale View to data scaling
203
+ * @return {Array} 2D array of data locations
204
+ */
205
+ rangeViewToDataLoci(range: any[], scale: Function): any[];
206
+ rangeSelectionResetHandler(): void;
207
+ rangeSelection1dEndHandler(axis: any): (range: any) => void;
208
+ rangeSelection1dHandler(axis: any): (range: any) => void;
209
+ rangeSelection1dStartHandler(): void;
210
+ rangeSelection2dHandler(range: any): void;
211
+ rangeSelection2dStartHandler(): void;
212
+ rangeSelection2dEndHandler(range: any): void;
213
+ getContextMenu(): React.JSX.Element | null;
214
+ /**
215
+ * Draw an overlay that shows the positions of all the different
216
+ * track areas
217
+ */
218
+ getIdealizedTrackPositionsOverlay(): React.JSX.Element | null;
219
+ render(): React.JSX.Element;
220
+ galleryDim: any;
221
+ topHeightNoGallery: any;
222
+ bottomHeightNoGallery: any;
223
+ leftWidthNoGallery: any;
224
+ rightWidthNoGallery: any;
225
+ divTiledPlot: HTMLDivElement | null | undefined;
226
+ addEventListeners(): void;
227
+ eventListeners: any[] | undefined;
228
+ removeEventListeners(): void;
229
+ }
230
+ export namespace TiledPlot {
231
+ namespace defaultProps {
232
+ let isShowGlobalMousePosition: boolean;
233
+ let pluginTracks: {};
234
+ let metaTracks: never[];
235
+ let zoomable: boolean;
236
+ }
237
+ namespace propTypes {
238
+ export let addTrackExtent: PropTypes.Requireable<string>;
239
+ export let addTrackPosition: PropTypes.Requireable<string>;
240
+ export let canvasElement: PropTypes.Requireable<object>;
241
+ export let chooseTrackHandler: PropTypes.Requireable<(...args: any[]) => any>;
242
+ export let chromInfoPath: PropTypes.Requireable<string>;
243
+ export let customDialog: PropTypes.Requireable<any[]>;
244
+ export let closeCustomDialog: PropTypes.Requireable<(...args: any[]) => any>;
245
+ export let disableTrackMenu: PropTypes.Requireable<boolean>;
246
+ export let dragging: PropTypes.Requireable<boolean>;
247
+ export let draggingHappening: PropTypes.Requireable<boolean>;
248
+ export let editable: PropTypes.Requireable<boolean>;
249
+ export let getLockGroupExtrema: PropTypes.Requireable<(...args: any[]) => any>;
250
+ export let initialXDomain: PropTypes.Requireable<any[]>;
251
+ export let initialYDomain: PropTypes.Requireable<any[]>;
252
+ let isShowGlobalMousePosition_1: PropTypes.Requireable<boolean>;
253
+ export { isShowGlobalMousePosition_1 as isShowGlobalMousePosition };
254
+ export let isValueScaleLocked: PropTypes.Requireable<(...args: any[]) => any>;
255
+ export let marginBottom: PropTypes.Validator<number>;
256
+ export let marginLeft: PropTypes.Validator<number>;
257
+ export let marginRight: PropTypes.Validator<number>;
258
+ export let marginTop: PropTypes.Validator<number>;
259
+ export let paddingBottom: PropTypes.Validator<number>;
260
+ export let paddingLeft: PropTypes.Validator<number>;
261
+ export let paddingRight: PropTypes.Validator<number>;
262
+ export let paddingTop: PropTypes.Validator<number>;
263
+ let metaTracks_1: PropTypes.Requireable<any[]>;
264
+ export { metaTracks_1 as metaTracks };
265
+ export let modal: PropTypes.Requireable<object>;
266
+ export let mouseTool: PropTypes.Requireable<string>;
267
+ export let onCloseTrack: PropTypes.Requireable<(...args: any[]) => any>;
268
+ export let onChangeTrackData: PropTypes.Requireable<(...args: any[]) => any>;
269
+ export let onChangeTrackType: PropTypes.Requireable<(...args: any[]) => any>;
270
+ export let onDataDomainChanged: PropTypes.Requireable<(...args: any[]) => any>;
271
+ export let onLockValueScale: PropTypes.Requireable<(...args: any[]) => any>;
272
+ export let onMouseMoveZoom: PropTypes.Requireable<(...args: any[]) => any>;
273
+ export let onNewTilesLoaded: PropTypes.Requireable<(...args: any[]) => any>;
274
+ export let onNoTrackAdded: PropTypes.Requireable<(...args: any[]) => any>;
275
+ export let onRangeSelection: PropTypes.Validator<(...args: any[]) => any>;
276
+ export let onScalesChanged: PropTypes.Requireable<(...args: any[]) => any>;
277
+ export let onTrackOptionsChanged: PropTypes.Requireable<(...args: any[]) => any>;
278
+ export let onTrackPositionChosen: PropTypes.Requireable<(...args: any[]) => any>;
279
+ export let onTracksAdded: PropTypes.Requireable<(...args: any[]) => any>;
280
+ export let onUnlockValueScale: PropTypes.Requireable<(...args: any[]) => any>;
281
+ export let onValueScaleChanged: PropTypes.Requireable<(...args: any[]) => any>;
282
+ export let onResizeTrack: PropTypes.Requireable<(...args: any[]) => any>;
283
+ export let overlays: PropTypes.Requireable<any[]>;
284
+ export let openModal: PropTypes.Requireable<(...args: any[]) => any>;
285
+ export let pixiRenderer: PropTypes.Requireable<object>;
286
+ export let pixiStage: PropTypes.Requireable<object>;
287
+ let pluginTracks_1: PropTypes.Requireable<object>;
288
+ export { pluginTracks_1 as pluginTracks };
289
+ export let pubSub: PropTypes.Validator<object>;
290
+ export let rangeSelection1dSize: PropTypes.Requireable<any[]>;
291
+ export let rangeSelectionToInt: PropTypes.Requireable<boolean>;
292
+ export let registerDraggingChangedListener: PropTypes.Requireable<(...args: any[]) => any>;
293
+ export let removeDraggingChangedListener: PropTypes.Requireable<(...args: any[]) => any>;
294
+ export let setCentersFunction: PropTypes.Requireable<(...args: any[]) => any>;
295
+ export let svgElement: PropTypes.Requireable<object>;
296
+ export let theme: PropTypes.Validator<symbol>;
297
+ export let tracks: PropTypes.Requireable<object>;
298
+ export let trackSourceServers: PropTypes.Requireable<any[]>;
299
+ export let uid: PropTypes.Requireable<string>;
300
+ export let viewOptions: PropTypes.Requireable<object>;
301
+ export let xDomainLimits: PropTypes.Requireable<any[]>;
302
+ export let yDomainLimits: PropTypes.Requireable<any[]>;
303
+ let zoomable_1: PropTypes.Requireable<boolean>;
304
+ export { zoomable_1 as zoomable };
305
+ export let zoomLimits: PropTypes.Requireable<any[]>;
306
+ export let zoomToDataExtentOnInit: PropTypes.Requireable<(...args: any[]) => any>;
307
+ }
308
+ }
309
+ declare const _default: typeof TiledPlot;
310
+ export default _default;
311
+ import React from 'react';
312
+ import { ResizeSensor } from 'css-element-queries';
313
+ import PropTypes from 'prop-types';