@jbrowse/plugin-wiggle 2.16.1 → 2.18.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 (284) hide show
  1. package/dist/BigWigAdapter/BigWigAdapter.d.ts +4 -3
  2. package/dist/BigWigAdapter/BigWigAdapter.js +3 -8
  3. package/dist/BigWigAdapter/configSchema.d.ts +0 -9
  4. package/dist/BigWigAdapter/configSchema.js +1 -13
  5. package/dist/BigWigAdapter/index.d.ts +1 -1
  6. package/dist/CreateMultiWiggleExtension/ConfirmDialog.d.ts +1 -1
  7. package/dist/CreateMultiWiggleExtension/ConfirmDialog.js +2 -2
  8. package/dist/CreateMultiWiggleExtension/index.d.ts +1 -1
  9. package/dist/CreateMultiWiggleExtension/index.js +26 -26
  10. package/dist/DensityRenderer/DensityRenderer.d.ts +2 -1
  11. package/dist/DensityRenderer/DensityRenderer.js +1 -1
  12. package/dist/DensityRenderer/configSchema.js +1 -7
  13. package/dist/DensityRenderer/index.d.ts +1 -1
  14. package/dist/DensityRenderer/index.js +1 -1
  15. package/dist/LinePlotRenderer/LinePlotRenderer.d.ts +3 -2
  16. package/dist/LinePlotRenderer/LinePlotRenderer.js +1 -1
  17. package/dist/LinePlotRenderer/configSchema.d.ts +0 -3
  18. package/dist/LinePlotRenderer/configSchema.js +1 -10
  19. package/dist/LinePlotRenderer/index.d.ts +1 -1
  20. package/dist/LinearWiggleDisplay/components/SetColorDialog.js +2 -2
  21. package/dist/LinearWiggleDisplay/components/Tooltip.d.ts +2 -2
  22. package/dist/LinearWiggleDisplay/components/Tooltip.js +1 -2
  23. package/dist/LinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
  24. package/dist/LinearWiggleDisplay/components/WiggleDisplayComponent.js +2 -2
  25. package/dist/LinearWiggleDisplay/{models/configSchema.d.ts → configSchema.d.ts} +1 -12
  26. package/dist/LinearWiggleDisplay/{models/configSchema.js → configSchema.js} +2 -17
  27. package/dist/LinearWiggleDisplay/index.d.ts +2 -2
  28. package/dist/LinearWiggleDisplay/index.js +4 -4
  29. package/{esm/LinearWiggleDisplay/models → dist/LinearWiggleDisplay}/model.d.ts +21 -63
  30. package/dist/LinearWiggleDisplay/{models/model.js → model.js} +66 -80
  31. package/dist/LinearWiggleDisplay/{models/renderSvg.d.ts → renderSvg.d.ts} +2 -2
  32. package/dist/LinearWiggleDisplay/{models/renderSvg.js → renderSvg.js} +2 -2
  33. package/dist/MultiDensityRenderer/MultiDensityRenderer.d.ts +4 -3
  34. package/dist/MultiDensityRenderer/MultiDensityRenderer.js +2 -3
  35. package/dist/MultiDensityRenderer/configSchema.js +1 -7
  36. package/dist/MultiDensityRenderer/index.d.ts +1 -1
  37. package/dist/MultiLineRenderer/MultiLineRenderer.d.ts +3 -2
  38. package/dist/MultiLineRenderer/MultiLineRenderer.js +1 -2
  39. package/dist/MultiLineRenderer/configSchema.d.ts +0 -6
  40. package/dist/MultiLineRenderer/configSchema.js +1 -13
  41. package/dist/MultiLineRenderer/index.d.ts +1 -1
  42. package/dist/MultiLinearWiggleDisplay/components/ColorLegend.d.ts +1 -1
  43. package/dist/MultiLinearWiggleDisplay/components/ColorLegend.js +0 -1
  44. package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.d.ts +1 -1
  45. package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.js +3 -7
  46. package/dist/MultiLinearWiggleDisplay/components/RectBg.js +1 -1
  47. package/dist/MultiLinearWiggleDisplay/components/ScoreLegend.d.ts +1 -1
  48. package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.d.ts +1 -1
  49. package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.js +3 -5
  50. package/dist/MultiLinearWiggleDisplay/components/SourcesGrid.d.ts +1 -1
  51. package/dist/MultiLinearWiggleDisplay/components/SourcesGrid.js +15 -26
  52. package/dist/MultiLinearWiggleDisplay/components/Tooltip.d.ts +3 -3
  53. package/dist/MultiLinearWiggleDisplay/components/Tooltip.js +1 -2
  54. package/dist/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
  55. package/dist/MultiLinearWiggleDisplay/components/YScaleBars.d.ts +1 -1
  56. package/dist/MultiLinearWiggleDisplay/components/YScaleBars.js +1 -1
  57. package/dist/MultiLinearWiggleDisplay/components/util.d.ts +1 -1
  58. package/dist/MultiLinearWiggleDisplay/components/util.js +1 -1
  59. package/dist/MultiLinearWiggleDisplay/{models/configSchema.d.ts → configSchema.d.ts} +1 -10
  60. package/dist/MultiLinearWiggleDisplay/{models/configSchema.js → configSchema.js} +3 -21
  61. package/dist/MultiLinearWiggleDisplay/index.d.ts +1 -1
  62. package/dist/MultiLinearWiggleDisplay/index.js +3 -3
  63. package/dist/MultiLinearWiggleDisplay/{models/model.d.ts → model.d.ts} +25 -129
  64. package/dist/MultiLinearWiggleDisplay/{models/model.js → model.js} +108 -183
  65. package/dist/MultiLinearWiggleDisplay/{models/renderSvg.d.ts → renderSvg.d.ts} +2 -2
  66. package/dist/MultiLinearWiggleDisplay/{models/renderSvg.js → renderSvg.js} +2 -2
  67. package/dist/MultiQuantitativeTrack/configSchema.d.ts +1 -1
  68. package/dist/MultiQuantitativeTrack/configSchema.js +1 -7
  69. package/dist/MultiQuantitativeTrack/index.d.ts +1 -1
  70. package/dist/MultiQuantitativeTrack/index.js +1 -1
  71. package/dist/MultiRowLineRenderer/MultiRowLineRenderer.d.ts +3 -2
  72. package/dist/MultiRowLineRenderer/MultiRowLineRenderer.js +1 -2
  73. package/dist/MultiRowLineRenderer/configSchema.d.ts +0 -6
  74. package/dist/MultiRowLineRenderer/configSchema.js +2 -14
  75. package/dist/MultiRowLineRenderer/index.d.ts +1 -1
  76. package/dist/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.d.ts +3 -2
  77. package/dist/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.js +1 -2
  78. package/dist/MultiRowXYPlotRenderer/configSchema.d.ts +0 -12
  79. package/dist/MultiRowXYPlotRenderer/configSchema.js +3 -21
  80. package/dist/MultiRowXYPlotRenderer/index.d.ts +1 -1
  81. package/dist/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +5 -4
  82. package/dist/MultiWiggleAdapter/MultiWiggleAdapter.js +12 -15
  83. package/dist/MultiWiggleAdapter/configSchema.d.ts +0 -6
  84. package/dist/MultiWiggleAdapter/configSchema.js +1 -10
  85. package/dist/MultiWiggleAdapter/index.d.ts +1 -1
  86. package/dist/MultiWiggleAdapter/index.js +1 -1
  87. package/dist/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.d.ts +1 -1
  88. package/dist/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +2 -4
  89. package/dist/MultiWiggleAddTrackWorkflow/index.d.ts +1 -1
  90. package/dist/MultiWiggleAddTrackWorkflow/index.js +1 -2
  91. package/dist/MultiWiggleRendering.d.ts +3 -3
  92. package/dist/MultiWiggleRendering.js +2 -2
  93. package/dist/MultiXYPlotRenderer/MultiXYPlotRenderer.d.ts +3 -2
  94. package/dist/MultiXYPlotRenderer/MultiXYPlotRenderer.js +1 -2
  95. package/dist/MultiXYPlotRenderer/configSchema.d.ts +0 -12
  96. package/dist/MultiXYPlotRenderer/configSchema.js +2 -20
  97. package/dist/MultiXYPlotRenderer/index.d.ts +1 -1
  98. package/dist/QuantitativeTrack/configSchema.d.ts +1 -1
  99. package/dist/QuantitativeTrack/configSchema.js +1 -7
  100. package/dist/QuantitativeTrack/index.d.ts +1 -1
  101. package/dist/QuantitativeTrack/index.js +1 -1
  102. package/dist/Tooltip.d.ts +1 -1
  103. package/dist/Tooltip.js +1 -2
  104. package/dist/WiggleBaseRenderer.d.ts +6 -9
  105. package/dist/WiggleBaseRenderer.js +0 -1
  106. package/dist/WiggleRPC/MultiWiggleGetSources.d.ts +5 -12
  107. package/dist/WiggleRPC/MultiWiggleGetSources.js +2 -29
  108. package/dist/WiggleRPC/WiggleGetGlobalQuantitativeStats.d.ts +5 -7
  109. package/dist/WiggleRPC/WiggleGetGlobalQuantitativeStats.js +2 -15
  110. package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +4 -11
  111. package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +2 -29
  112. package/dist/WiggleRendering.d.ts +2 -2
  113. package/dist/WiggleRendering.js +1 -3
  114. package/dist/XYPlotRenderer/XYPlotRenderer.d.ts +3 -2
  115. package/dist/XYPlotRenderer/XYPlotRenderer.js +3 -5
  116. package/dist/XYPlotRenderer/configSchema.d.ts +0 -12
  117. package/dist/XYPlotRenderer/configSchema.js +3 -21
  118. package/dist/XYPlotRenderer/index.d.ts +1 -1
  119. package/dist/configSchema.d.ts +0 -18
  120. package/dist/configSchema.js +1 -23
  121. package/dist/drawDensity.d.ts +3 -3
  122. package/dist/drawDensity.js +0 -4
  123. package/dist/drawLine.d.ts +3 -3
  124. package/dist/drawLine.js +0 -5
  125. package/dist/drawXY.d.ts +4 -3
  126. package/dist/drawXY.js +28 -12
  127. package/dist/getMultiWiggleSourcesAutorun.d.ts +17 -0
  128. package/dist/getMultiWiggleSourcesAutorun.js +38 -0
  129. package/dist/getQuantitativeStats.d.ts +13 -0
  130. package/dist/getQuantitativeStats.js +70 -0
  131. package/dist/getQuantitativeStatsAutorun.d.ts +13 -0
  132. package/dist/getQuantitativeStatsAutorun.js +35 -0
  133. package/dist/index.d.ts +6 -6
  134. package/dist/index.js +21 -24
  135. package/dist/shared/SetMinMaxDialog.js +1 -1
  136. package/{esm/shared/configShared.d.ts → dist/shared/SharedWiggleConfigSchema.d.ts} +0 -26
  137. package/dist/shared/{configShared.js → SharedWiggleConfigSchema.js} +1 -30
  138. package/{esm/shared/modelShared.d.ts → dist/shared/SharedWiggleMixin.d.ts} +22 -213
  139. package/dist/shared/{modelShared.js → SharedWiggleMixin.js} +15 -174
  140. package/dist/util.d.ts +1 -53
  141. package/dist/util.js +1 -141
  142. package/esm/BigWigAdapter/BigWigAdapter.d.ts +4 -3
  143. package/esm/BigWigAdapter/BigWigAdapter.js +5 -10
  144. package/esm/BigWigAdapter/configSchema.d.ts +0 -9
  145. package/esm/BigWigAdapter/configSchema.js +1 -13
  146. package/esm/BigWigAdapter/index.d.ts +1 -1
  147. package/esm/CreateMultiWiggleExtension/ConfirmDialog.d.ts +1 -1
  148. package/esm/CreateMultiWiggleExtension/ConfirmDialog.js +2 -2
  149. package/esm/CreateMultiWiggleExtension/index.d.ts +1 -1
  150. package/esm/CreateMultiWiggleExtension/index.js +26 -26
  151. package/esm/DensityRenderer/DensityRenderer.d.ts +2 -1
  152. package/esm/DensityRenderer/DensityRenderer.js +1 -1
  153. package/esm/DensityRenderer/configSchema.js +1 -7
  154. package/esm/DensityRenderer/index.d.ts +1 -1
  155. package/esm/DensityRenderer/index.js +1 -1
  156. package/esm/LinePlotRenderer/LinePlotRenderer.d.ts +3 -2
  157. package/esm/LinePlotRenderer/LinePlotRenderer.js +1 -1
  158. package/esm/LinePlotRenderer/configSchema.d.ts +0 -3
  159. package/esm/LinePlotRenderer/configSchema.js +1 -10
  160. package/esm/LinePlotRenderer/index.d.ts +1 -1
  161. package/esm/LinearWiggleDisplay/components/SetColorDialog.js +2 -2
  162. package/esm/LinearWiggleDisplay/components/Tooltip.d.ts +2 -2
  163. package/esm/LinearWiggleDisplay/components/Tooltip.js +1 -2
  164. package/esm/LinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
  165. package/esm/LinearWiggleDisplay/components/WiggleDisplayComponent.js +3 -3
  166. package/esm/LinearWiggleDisplay/{models/configSchema.d.ts → configSchema.d.ts} +1 -12
  167. package/esm/LinearWiggleDisplay/{models/configSchema.js → configSchema.js} +1 -16
  168. package/esm/LinearWiggleDisplay/index.d.ts +2 -2
  169. package/esm/LinearWiggleDisplay/index.js +4 -4
  170. package/{dist/LinearWiggleDisplay/models → esm/LinearWiggleDisplay}/model.d.ts +21 -63
  171. package/esm/LinearWiggleDisplay/{models/model.js → model.js} +67 -81
  172. package/esm/LinearWiggleDisplay/{models/renderSvg.d.ts → renderSvg.d.ts} +2 -2
  173. package/esm/LinearWiggleDisplay/{models/renderSvg.js → renderSvg.js} +2 -2
  174. package/esm/MultiDensityRenderer/MultiDensityRenderer.d.ts +4 -3
  175. package/esm/MultiDensityRenderer/MultiDensityRenderer.js +1 -2
  176. package/esm/MultiDensityRenderer/configSchema.js +1 -7
  177. package/esm/MultiDensityRenderer/index.d.ts +1 -1
  178. package/esm/MultiLineRenderer/MultiLineRenderer.d.ts +3 -2
  179. package/esm/MultiLineRenderer/MultiLineRenderer.js +1 -2
  180. package/esm/MultiLineRenderer/configSchema.d.ts +0 -6
  181. package/esm/MultiLineRenderer/configSchema.js +1 -13
  182. package/esm/MultiLineRenderer/index.d.ts +1 -1
  183. package/esm/MultiLinearWiggleDisplay/components/ColorLegend.d.ts +1 -1
  184. package/esm/MultiLinearWiggleDisplay/components/ColorLegend.js +0 -1
  185. package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.d.ts +1 -1
  186. package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.js +4 -8
  187. package/esm/MultiLinearWiggleDisplay/components/RectBg.js +1 -1
  188. package/esm/MultiLinearWiggleDisplay/components/ScoreLegend.d.ts +1 -1
  189. package/esm/MultiLinearWiggleDisplay/components/ScoreLegend.js +1 -1
  190. package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.d.ts +1 -1
  191. package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.js +4 -6
  192. package/esm/MultiLinearWiggleDisplay/components/SourcesGrid.d.ts +1 -1
  193. package/esm/MultiLinearWiggleDisplay/components/SourcesGrid.js +16 -27
  194. package/esm/MultiLinearWiggleDisplay/components/Tooltip.d.ts +3 -3
  195. package/esm/MultiLinearWiggleDisplay/components/Tooltip.js +1 -2
  196. package/esm/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
  197. package/esm/MultiLinearWiggleDisplay/components/YScaleBars.d.ts +1 -1
  198. package/esm/MultiLinearWiggleDisplay/components/YScaleBars.js +2 -2
  199. package/esm/MultiLinearWiggleDisplay/components/util.d.ts +1 -1
  200. package/esm/MultiLinearWiggleDisplay/components/util.js +1 -1
  201. package/esm/MultiLinearWiggleDisplay/{models/configSchema.d.ts → configSchema.d.ts} +1 -10
  202. package/esm/MultiLinearWiggleDisplay/{models/configSchema.js → configSchema.js} +2 -20
  203. package/esm/MultiLinearWiggleDisplay/index.d.ts +1 -1
  204. package/esm/MultiLinearWiggleDisplay/index.js +3 -3
  205. package/esm/MultiLinearWiggleDisplay/{models/model.d.ts → model.d.ts} +25 -129
  206. package/esm/MultiLinearWiggleDisplay/{models/model.js → model.js} +108 -183
  207. package/esm/MultiLinearWiggleDisplay/{models/renderSvg.d.ts → renderSvg.d.ts} +2 -2
  208. package/esm/MultiLinearWiggleDisplay/{models/renderSvg.js → renderSvg.js} +2 -2
  209. package/esm/MultiQuantitativeTrack/configSchema.d.ts +1 -1
  210. package/esm/MultiQuantitativeTrack/configSchema.js +1 -7
  211. package/esm/MultiQuantitativeTrack/index.d.ts +1 -1
  212. package/esm/MultiQuantitativeTrack/index.js +1 -1
  213. package/esm/MultiRowLineRenderer/MultiRowLineRenderer.d.ts +3 -2
  214. package/esm/MultiRowLineRenderer/MultiRowLineRenderer.js +1 -2
  215. package/esm/MultiRowLineRenderer/configSchema.d.ts +0 -6
  216. package/esm/MultiRowLineRenderer/configSchema.js +2 -14
  217. package/esm/MultiRowLineRenderer/index.d.ts +1 -1
  218. package/esm/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.d.ts +3 -2
  219. package/esm/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.js +1 -2
  220. package/esm/MultiRowXYPlotRenderer/configSchema.d.ts +0 -12
  221. package/esm/MultiRowXYPlotRenderer/configSchema.js +3 -21
  222. package/esm/MultiRowXYPlotRenderer/index.d.ts +1 -1
  223. package/esm/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +5 -4
  224. package/esm/MultiWiggleAdapter/MultiWiggleAdapter.js +13 -16
  225. package/esm/MultiWiggleAdapter/configSchema.d.ts +0 -6
  226. package/esm/MultiWiggleAdapter/configSchema.js +1 -10
  227. package/esm/MultiWiggleAdapter/index.d.ts +1 -1
  228. package/esm/MultiWiggleAdapter/index.js +1 -1
  229. package/esm/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.d.ts +1 -1
  230. package/esm/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +2 -4
  231. package/esm/MultiWiggleAddTrackWorkflow/index.d.ts +1 -1
  232. package/esm/MultiWiggleAddTrackWorkflow/index.js +1 -2
  233. package/esm/MultiWiggleRendering.d.ts +3 -3
  234. package/esm/MultiWiggleRendering.js +2 -2
  235. package/esm/MultiXYPlotRenderer/MultiXYPlotRenderer.d.ts +3 -2
  236. package/esm/MultiXYPlotRenderer/MultiXYPlotRenderer.js +1 -2
  237. package/esm/MultiXYPlotRenderer/configSchema.d.ts +0 -12
  238. package/esm/MultiXYPlotRenderer/configSchema.js +2 -20
  239. package/esm/MultiXYPlotRenderer/index.d.ts +1 -1
  240. package/esm/QuantitativeTrack/configSchema.d.ts +1 -1
  241. package/esm/QuantitativeTrack/configSchema.js +1 -7
  242. package/esm/QuantitativeTrack/index.d.ts +1 -1
  243. package/esm/QuantitativeTrack/index.js +1 -1
  244. package/esm/Tooltip.d.ts +1 -1
  245. package/esm/Tooltip.js +1 -2
  246. package/esm/WiggleBaseRenderer.d.ts +6 -9
  247. package/esm/WiggleBaseRenderer.js +0 -1
  248. package/esm/WiggleRPC/MultiWiggleGetSources.d.ts +5 -12
  249. package/esm/WiggleRPC/MultiWiggleGetSources.js +2 -29
  250. package/esm/WiggleRPC/WiggleGetGlobalQuantitativeStats.d.ts +5 -7
  251. package/esm/WiggleRPC/WiggleGetGlobalQuantitativeStats.js +2 -15
  252. package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +4 -11
  253. package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +2 -29
  254. package/esm/WiggleRendering.d.ts +2 -2
  255. package/esm/WiggleRendering.js +1 -3
  256. package/esm/XYPlotRenderer/XYPlotRenderer.d.ts +3 -2
  257. package/esm/XYPlotRenderer/XYPlotRenderer.js +3 -5
  258. package/esm/XYPlotRenderer/configSchema.d.ts +0 -12
  259. package/esm/XYPlotRenderer/configSchema.js +3 -21
  260. package/esm/XYPlotRenderer/index.d.ts +1 -1
  261. package/esm/configSchema.d.ts +0 -18
  262. package/esm/configSchema.js +1 -23
  263. package/esm/drawDensity.d.ts +3 -3
  264. package/esm/drawDensity.js +1 -5
  265. package/esm/drawLine.d.ts +3 -3
  266. package/esm/drawLine.js +1 -6
  267. package/esm/drawXY.d.ts +4 -3
  268. package/esm/drawXY.js +29 -13
  269. package/esm/getMultiWiggleSourcesAutorun.d.ts +17 -0
  270. package/esm/getMultiWiggleSourcesAutorun.js +35 -0
  271. package/esm/getQuantitativeStats.d.ts +13 -0
  272. package/esm/getQuantitativeStats.js +67 -0
  273. package/esm/getQuantitativeStatsAutorun.d.ts +13 -0
  274. package/esm/getQuantitativeStatsAutorun.js +32 -0
  275. package/esm/index.d.ts +6 -6
  276. package/esm/index.js +13 -16
  277. package/esm/shared/SetMinMaxDialog.js +1 -1
  278. package/{dist/shared/configShared.d.ts → esm/shared/SharedWiggleConfigSchema.d.ts} +0 -26
  279. package/esm/shared/{configShared.js → SharedWiggleConfigSchema.js} +1 -30
  280. package/{dist/shared/modelShared.d.ts → esm/shared/SharedWiggleMixin.d.ts} +22 -213
  281. package/esm/shared/{modelShared.js → SharedWiggleMixin.js} +16 -175
  282. package/esm/util.d.ts +1 -53
  283. package/esm/util.js +1 -139
  284. package/package.json +2 -4
@@ -1,5 +1,6 @@
1
- import { Feature } from '@jbrowse/core/util';
2
- import WiggleBaseRenderer, { RenderArgsDeserializedWithFeatures } from '../WiggleBaseRenderer';
1
+ import WiggleBaseRenderer from '../WiggleBaseRenderer';
2
+ import type { RenderArgsDeserializedWithFeatures } from '../WiggleBaseRenderer';
3
+ import type { Feature } from '@jbrowse/core/util';
3
4
  export default class XYPlotRenderer extends WiggleBaseRenderer {
4
5
  draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<{
5
6
  reducedFeatures: Feature[];
@@ -1,13 +1,10 @@
1
1
  import { readConfObject } from '@jbrowse/core/configuration';
2
- import { drawXY } from '../drawXY';
3
2
  import WiggleBaseRenderer from '../WiggleBaseRenderer';
3
+ import { drawXY } from '../drawXY';
4
4
  import { YSCALEBAR_LABEL_OFFSET } from '../util';
5
5
  export default class XYPlotRenderer extends WiggleBaseRenderer {
6
6
  async draw(ctx, props) {
7
- const { features, config } = props;
8
- // the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
9
- // wiggle display, and makes the height of the actual drawn area add
10
- // "padding" to the top and bottom of the display
7
+ const { stopToken, features, config } = props;
11
8
  const pivotValue = readConfObject(config, 'bicolorPivotValue');
12
9
  const negColor = readConfObject(config, 'negColor');
13
10
  const posColor = readConfObject(config, 'posColor');
@@ -18,6 +15,7 @@ export default class XYPlotRenderer extends WiggleBaseRenderer {
18
15
  : (feature, _score) => readConfObject(config, 'color', { feature }),
19
16
  offset: YSCALEBAR_LABEL_OFFSET,
20
17
  features: [...features.values()],
18
+ stopToken,
21
19
  });
22
20
  }
23
21
  }
@@ -1,31 +1,19 @@
1
1
  declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  filled: {
6
3
  type: string;
7
4
  defaultValue: boolean;
8
5
  };
9
- /**
10
- * #slot
11
- */
12
6
  displayCrossHatches: {
13
7
  type: string;
14
8
  description: string;
15
9
  defaultValue: boolean;
16
10
  };
17
- /**
18
- * #slot
19
- */
20
11
  summaryScoreMode: {
21
12
  type: string;
22
13
  model: import("mobx-state-tree").ISimpleType<string>;
23
14
  description: string;
24
15
  defaultValue: string;
25
16
  };
26
- /**
27
- * #slot
28
- */
29
17
  minSize: {
30
18
  type: string;
31
19
  defaultValue: number;
@@ -1,46 +1,28 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- import baseWiggleRendererConfigSchema from '../configSchema';
3
2
  import { types } from 'mobx-state-tree';
4
- /**
5
- * #config XYPlotRenderer
6
- */
7
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ import baseWiggleRendererConfigSchema from '../configSchema';
4
+ function x() { }
8
5
  const configSchema = ConfigurationSchema('XYPlotRenderer', {
9
- /**
10
- * #slot
11
- */
12
6
  filled: {
13
7
  type: 'boolean',
14
8
  defaultValue: true,
15
9
  },
16
- /**
17
- * #slot
18
- */
19
10
  displayCrossHatches: {
20
11
  type: 'boolean',
21
12
  description: 'choose to draw cross hatches (sideways lines)',
22
13
  defaultValue: false,
23
14
  },
24
- /**
25
- * #slot
26
- */
27
15
  summaryScoreMode: {
28
16
  type: 'stringEnum',
29
17
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
30
18
  description: 'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
31
19
  defaultValue: 'whiskers',
32
20
  },
33
- /**
34
- * #slot
35
- */
36
21
  minSize: {
37
22
  type: 'number',
38
- defaultValue: 0,
23
+ defaultValue: 0.7,
39
24
  },
40
25
  }, {
41
- /**
42
- * #baseConfiguration
43
- */
44
26
  baseConfiguration: baseWiggleRendererConfigSchema,
45
27
  explicitlyTyped: true,
46
28
  });
@@ -1,4 +1,4 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function XYPlotRendererF(pluginManager: PluginManager): void;
3
3
  export { default as XYPlotRenderer } from './XYPlotRenderer';
4
4
  export { default as ReactComponent } from '../WiggleRendering';
@@ -1,48 +1,30 @@
1
1
  declare const WiggleRenderer: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  color: {
6
3
  type: string;
7
4
  description: string;
8
5
  defaultValue: string;
9
6
  };
10
- /**
11
- * #slot
12
- */
13
7
  posColor: {
14
8
  type: string;
15
9
  description: string;
16
10
  defaultValue: string;
17
11
  };
18
- /**
19
- * #slot
20
- */
21
12
  negColor: {
22
13
  type: string;
23
14
  description: string;
24
15
  defaultValue: string;
25
16
  };
26
- /**
27
- * #slot
28
- */
29
17
  clipColor: {
30
18
  type: string;
31
19
  description: string;
32
20
  defaultValue: string;
33
21
  };
34
- /**
35
- * #slot
36
- */
37
22
  bicolorPivot: {
38
23
  type: string;
39
24
  model: import("mobx-state-tree").ISimpleType<string>;
40
25
  description: string;
41
26
  defaultValue: string;
42
27
  };
43
- /**
44
- * #slot
45
- */
46
28
  bicolorPivotValue: {
47
29
  type: string;
48
30
  defaultValue: number;
@@ -1,46 +1,27 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
2
  import { types } from 'mobx-state-tree';
3
- /**
4
- * #config WiggleRenderer
5
- * this is the "base wiggle renderer config schema"
6
- */
7
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ function x() { }
8
4
  const WiggleRenderer = ConfigurationSchema('WiggleRenderer', {
9
- /**
10
- * #slot
11
- */
12
5
  color: {
13
6
  type: 'color',
14
7
  description: 'the color of track, overrides posColor and negColor',
15
8
  defaultValue: '#f0f',
16
9
  },
17
- /**
18
- * #slot
19
- */
20
10
  posColor: {
21
11
  type: 'color',
22
12
  description: 'the color to use when the score is positive',
23
13
  defaultValue: 'blue',
24
14
  },
25
- /**
26
- * #slot
27
- */
28
15
  negColor: {
29
16
  type: 'color',
30
17
  description: 'the color to use when the score is negative',
31
18
  defaultValue: 'red',
32
19
  },
33
- /**
34
- * #slot
35
- */
36
20
  clipColor: {
37
21
  type: 'color',
38
22
  description: 'the color of the clipping marker',
39
23
  defaultValue: 'red',
40
24
  },
41
- /**
42
- * #slot
43
- */
44
25
  bicolorPivot: {
45
26
  type: 'stringEnum',
46
27
  model: types.enumeration('Scale type', [
@@ -52,9 +33,6 @@ const WiggleRenderer = ConfigurationSchema('WiggleRenderer', {
52
33
  description: 'type of bicolor pivot',
53
34
  defaultValue: 'numeric',
54
35
  },
55
- /**
56
- * #slot
57
- */
58
36
  bicolorPivotValue: {
59
37
  type: 'number',
60
38
  defaultValue: 0,
@@ -1,6 +1,6 @@
1
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import { Feature, Region } from '@jbrowse/core/util';
3
- import { ScaleOpts } from './util';
1
+ import type { ScaleOpts } from './util';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { Feature, Region } from '@jbrowse/core/util';
4
4
  export declare function drawDensity(ctx: CanvasRenderingContext2D, props: {
5
5
  features: Map<string, Feature> | Feature[];
6
6
  regions: Region[];
@@ -1,6 +1,5 @@
1
- import { readConfObject, } from '@jbrowse/core/configuration';
1
+ import { readConfObject } from '@jbrowse/core/configuration';
2
2
  import { featureSpanPx } from '@jbrowse/core/util';
3
- // locals
4
3
  import { fillRectCtx, getScale } from './util';
5
4
  const fudgeFactor = 0.3;
6
5
  const clipHeight = 2;
@@ -31,7 +30,6 @@ export function drawDensity(ctx, props) {
31
30
  const reducedFeatures = [];
32
31
  for (const feature of features.values()) {
33
32
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
34
- // create reduced features, avoiding multiple features per px
35
33
  if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
36
34
  reducedFeatures.push(feature);
37
35
  prevLeftPx = leftPx;
@@ -42,8 +40,6 @@ export function drawDensity(ctx, props) {
42
40
  ctx.fillStyle = cb(feature, score);
43
41
  ctx.fillRect(leftPx, 0, w, height);
44
42
  }
45
- // second pass: draw clipping
46
- // avoid persisting the red fillstyle with save/restore
47
43
  ctx.save();
48
44
  if (hasClipping) {
49
45
  ctx.fillStyle = clipColor;
package/esm/drawLine.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import { Feature, Region } from '@jbrowse/core/util';
3
- import { ScaleOpts } from './util';
1
+ import type { ScaleOpts } from './util';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { Feature, Region } from '@jbrowse/core/util';
4
4
  export declare function drawLine(ctx: CanvasRenderingContext2D, props: {
5
5
  features: Map<string, Feature> | Feature[];
6
6
  regions: Region[];
package/esm/drawLine.js CHANGED
@@ -1,6 +1,5 @@
1
- import { readConfObject, } from '@jbrowse/core/configuration';
1
+ import { readConfObject } from '@jbrowse/core/configuration';
2
2
  import { clamp, featureSpanPx } from '@jbrowse/core/util';
3
- // locals
4
3
  import { getScale } from './util';
5
4
  const fudgeFactor = 0.3;
6
5
  const clipHeight = 2;
@@ -8,9 +7,6 @@ export function drawLine(ctx, props) {
8
7
  const { features, regions, bpPerPx, scaleOpts, height: unadjustedHeight, ticks: { values }, displayCrossHatches, colorCallback, config, offset = 0, } = props;
9
8
  const region = regions[0];
10
9
  const width = (region.end - region.start) / bpPerPx;
11
- // the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
12
- // wiggle display, and makes the height of the actual drawn area add
13
- // "padding" to the top and bottom of the display
14
10
  const height = unadjustedHeight - offset * 2;
15
11
  const clipColor = readConfObject(config, 'clipColor');
16
12
  const scale = getScale({ ...scaleOpts, range: [0, height] });
@@ -23,7 +19,6 @@ export function drawLine(ctx, props) {
23
19
  const reducedFeatures = [];
24
20
  for (const feature of features.values()) {
25
21
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
26
- // create reduced features, avoiding multiple features per px
27
22
  if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
28
23
  reducedFeatures.push(feature);
29
24
  prevLeftPx = leftPx;
package/esm/drawXY.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import { Feature, Region } from '@jbrowse/core/util';
3
- import { ScaleOpts } from './util';
1
+ import type { ScaleOpts } from './util';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { Feature, Region } from '@jbrowse/core/util';
4
4
  export declare function drawXY(ctx: CanvasRenderingContext2D, props: {
5
+ stopToken?: string;
5
6
  features: Map<string, Feature> | Feature[];
6
7
  bpPerPx: number;
7
8
  regions: Region[];
package/esm/drawXY.js CHANGED
@@ -1,7 +1,7 @@
1
- import { readConfObject, } from '@jbrowse/core/configuration';
2
- import { colord } from '@jbrowse/core/util/colord';
1
+ import { readConfObject } from '@jbrowse/core/configuration';
3
2
  import { clamp, featureSpanPx } from '@jbrowse/core/util';
4
- // locals
3
+ import { colord } from '@jbrowse/core/util/colord';
4
+ import { checkStopToken } from '@jbrowse/core/util/stopToken';
5
5
  import { fillRectCtx, getOrigin, getScale } from './util';
6
6
  function lighten(color, amount) {
7
7
  const hslColor = color.toHsl();
@@ -19,9 +19,6 @@ export function drawXY(ctx, props) {
19
19
  const { features, bpPerPx, regions, scaleOpts, height: unadjustedHeight, config, ticks, displayCrossHatches, offset = 0, colorCallback, } = props;
20
20
  const region = regions[0];
21
21
  const width = (region.end - region.start) / bpPerPx;
22
- // the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
23
- // wiggle display, and makes the height of the actual drawn area add
24
- // "padding" to the top and bottom of the display
25
22
  const height = unadjustedHeight - offset * 2;
26
23
  const filled = readConfObject(config, 'filled');
27
24
  const clipColor = readConfObject(config, 'clipColor');
@@ -40,13 +37,16 @@ export function drawXY(ctx, props) {
40
37
  let prevLeftPx = Number.NEGATIVE_INFINITY;
41
38
  const reducedFeatures = [];
42
39
  const crossingOrigin = niceMin < pivotValue && niceMax > pivotValue;
43
- // we handle whiskers separately to render max row, min row, and avg in three
44
- // passes. this reduces subpixel rendering issues. note: for stylistic
45
- // reasons, clipping indicator is only drawn for score, not min/max score
40
+ let start = performance.now();
46
41
  if (summaryScoreMode === 'whiskers') {
47
42
  let lastCol;
48
43
  let lastMix;
44
+ start = performance.now();
49
45
  for (const feature of features.values()) {
46
+ if (performance.now() - start > 400) {
47
+ checkStopToken();
48
+ start = performance.now();
49
+ }
50
50
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
51
51
  if (feature.get('summary')) {
52
52
  const w = Math.max(rightPx - leftPx + fudgeFactor, minSize);
@@ -63,7 +63,12 @@ export function drawXY(ctx, props) {
63
63
  }
64
64
  lastMix = undefined;
65
65
  lastCol = undefined;
66
+ start = performance.now();
66
67
  for (const feature of features.values()) {
68
+ if (performance.now() - start > 400) {
69
+ checkStopToken();
70
+ start = performance.now();
71
+ }
67
72
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
68
73
  const score = feature.get('score');
69
74
  const max = feature.get('maxScore');
@@ -78,7 +83,6 @@ export function drawXY(ctx, props) {
78
83
  .toString())
79
84
  : c;
80
85
  const w = Math.max(rightPx - leftPx + fudgeFactor, minSize);
81
- // create reduced features, avoiding multiple features per px
82
86
  if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
83
87
  reducedFeatures.push(feature);
84
88
  prevLeftPx = leftPx;
@@ -89,7 +93,12 @@ export function drawXY(ctx, props) {
89
93
  }
90
94
  lastMix = undefined;
91
95
  lastCol = undefined;
96
+ start = performance.now();
92
97
  for (const feature of features.values()) {
98
+ if (performance.now() - start > 400) {
99
+ checkStopToken();
100
+ start = performance.now();
101
+ }
93
102
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
94
103
  if (feature.get('summary')) {
95
104
  const min = feature.get('minScore');
@@ -106,9 +115,13 @@ export function drawXY(ctx, props) {
106
115
  }
107
116
  }
108
117
  else {
118
+ start = performance.now();
109
119
  for (const feature of features.values()) {
120
+ if (performance.now() - start > 400) {
121
+ checkStopToken();
122
+ start = performance.now();
123
+ }
110
124
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
111
- // create reduced features, avoiding multiple features per px
112
125
  if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
113
126
  reducedFeatures.push(feature);
114
127
  prevLeftPx = leftPx;
@@ -130,12 +143,15 @@ export function drawXY(ctx, props) {
130
143
  }
131
144
  }
132
145
  }
133
- // second pass: draw clipping
134
- // avoid persisting the red fillstyle with save/restore
135
146
  ctx.save();
136
147
  if (hasClipping) {
137
148
  ctx.fillStyle = clipColor;
149
+ start = performance.now();
138
150
  for (const feature of features.values()) {
151
+ if (performance.now() - start > 400) {
152
+ checkStopToken();
153
+ start = performance.now();
154
+ }
139
155
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
140
156
  const w = rightPx - leftPx + fudgeFactor;
141
157
  const score = feature.get('score');
@@ -0,0 +1,17 @@
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ export interface Source {
3
+ name: string;
4
+ color?: string;
5
+ group?: string;
6
+ }
7
+ export declare function getMultiWiggleSourcesAutorun(self: {
8
+ quantitativeStatsReady: boolean;
9
+ configuration: AnyConfigurationModel;
10
+ adapterConfig: AnyConfigurationModel;
11
+ autoscaleType: string;
12
+ adapterProps: () => Record<string, unknown>;
13
+ setSourcesLoading: (aborter: string) => void;
14
+ setError: (error: unknown) => void;
15
+ setMessage: (str: string) => void;
16
+ setSources: (sources: Source[]) => void;
17
+ }): void;
@@ -0,0 +1,35 @@
1
+ import { getContainingView, getSession } from '@jbrowse/core/util';
2
+ import { isAbortException } from '@jbrowse/core/util/aborting';
3
+ import { createStopToken } from '@jbrowse/core/util/stopToken';
4
+ import { getRpcSessionId } from '@jbrowse/core/util/tracks';
5
+ import { autorun } from 'mobx';
6
+ import { addDisposer, isAlive } from 'mobx-state-tree';
7
+ export function getMultiWiggleSourcesAutorun(self) {
8
+ addDisposer(self, autorun(async () => {
9
+ try {
10
+ const view = getContainingView(self);
11
+ if (!view.initialized) {
12
+ return;
13
+ }
14
+ const { rpcManager } = getSession(self);
15
+ const { adapterConfig } = self;
16
+ const token = createStopToken();
17
+ self.setSourcesLoading(token);
18
+ const sessionId = getRpcSessionId(self);
19
+ const sources = (await rpcManager.call(sessionId, 'MultiWiggleGetSources', {
20
+ regions: view.staticBlocks.contentBlocks,
21
+ sessionId,
22
+ adapterConfig,
23
+ }));
24
+ if (isAlive(self)) {
25
+ self.setSources(sources);
26
+ }
27
+ }
28
+ catch (e) {
29
+ if (!isAbortException(e) && isAlive(self)) {
30
+ console.error(e);
31
+ getSession(self).notifyError(`${e}`, e);
32
+ }
33
+ }
34
+ }));
35
+ }
@@ -0,0 +1,13 @@
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { QuantitativeStats } from '@jbrowse/core/util/stats';
3
+ export declare function getQuantitativeStats(self: {
4
+ adapterConfig: AnyConfigurationModel;
5
+ configuration: AnyConfigurationModel;
6
+ autoscaleType: string;
7
+ setMessage: (str: string) => void;
8
+ }, opts: {
9
+ headers?: Record<string, string>;
10
+ stopToken?: string;
11
+ filters: string[];
12
+ currStatsBpPerPx: number;
13
+ }): Promise<QuantitativeStats>;
@@ -0,0 +1,67 @@
1
+ import { getConf } from '@jbrowse/core/configuration';
2
+ import { getContainingView, getSession } from '@jbrowse/core/util';
3
+ import { getRpcSessionId } from '@jbrowse/core/util/tracks';
4
+ import { isAlive } from 'mobx-state-tree';
5
+ export async function getQuantitativeStats(self, opts) {
6
+ const { rpcManager } = getSession(self);
7
+ const numStdDev = getConf(self, 'numStdDev') || 3;
8
+ const { adapterConfig, autoscaleType } = self;
9
+ const sessionId = getRpcSessionId(self);
10
+ const { currStatsBpPerPx } = opts;
11
+ const params = {
12
+ sessionId,
13
+ adapterConfig,
14
+ statusCallback: (message) => {
15
+ if (isAlive(self)) {
16
+ self.setMessage(message);
17
+ }
18
+ },
19
+ ...opts,
20
+ };
21
+ if (autoscaleType === 'global' || autoscaleType === 'globalsd') {
22
+ const results = (await rpcManager.call(sessionId, 'WiggleGetGlobalQuantitativeStats', params));
23
+ const { scoreMin, scoreMean, scoreStdDev } = results;
24
+ return autoscaleType === 'globalsd'
25
+ ? {
26
+ ...results,
27
+ scoreMin: scoreMin >= 0 ? 0 : scoreMean - numStdDev * scoreStdDev,
28
+ scoreMax: scoreMean + numStdDev * scoreStdDev,
29
+ currStatsBpPerPx,
30
+ }
31
+ : {
32
+ ...results,
33
+ currStatsBpPerPx,
34
+ };
35
+ }
36
+ if (autoscaleType === 'local' || autoscaleType === 'localsd') {
37
+ const { dynamicBlocks, bpPerPx } = getContainingView(self);
38
+ const results = (await rpcManager.call(sessionId, 'WiggleGetMultiRegionQuantitativeStats', {
39
+ ...params,
40
+ regions: dynamicBlocks.contentBlocks.map(region => {
41
+ const { start, end } = region;
42
+ return {
43
+ ...JSON.parse(JSON.stringify(region)),
44
+ start: Math.floor(start),
45
+ end: Math.ceil(end),
46
+ };
47
+ }),
48
+ bpPerPx,
49
+ }));
50
+ const { scoreMin, scoreMean, scoreStdDev } = results;
51
+ return autoscaleType === 'localsd'
52
+ ? {
53
+ ...results,
54
+ scoreMin: scoreMin >= 0 ? 0 : scoreMean - numStdDev * scoreStdDev,
55
+ scoreMax: scoreMean + numStdDev * scoreStdDev,
56
+ currStatsBpPerPx,
57
+ }
58
+ : {
59
+ ...results,
60
+ currStatsBpPerPx,
61
+ };
62
+ }
63
+ if (autoscaleType === 'zscale') {
64
+ return rpcManager.call(sessionId, 'WiggleGetGlobalQuantitativeStats', params);
65
+ }
66
+ throw new Error(`invalid autoscaleType '${autoscaleType}'`);
67
+ }
@@ -0,0 +1,13 @@
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { QuantitativeStats } from '@jbrowse/core/util/stats';
3
+ export declare function getQuantitativeStatsAutorun(self: {
4
+ quantitativeStatsReady: boolean;
5
+ configuration: AnyConfigurationModel;
6
+ adapterConfig: AnyConfigurationModel;
7
+ autoscaleType: string;
8
+ adapterProps: () => Record<string, unknown>;
9
+ setStatsLoading: (token: string) => void;
10
+ setError: (error: unknown) => void;
11
+ setMessage: (str: string) => void;
12
+ updateQuantitativeStats: (stats: QuantitativeStats, region: string) => void;
13
+ }): void;
@@ -0,0 +1,32 @@
1
+ import { getContainingView, isAbortException } from '@jbrowse/core/util';
2
+ import { createStopToken } from '@jbrowse/core/util/stopToken';
3
+ import { autorun } from 'mobx';
4
+ import { addDisposer, isAlive } from 'mobx-state-tree';
5
+ import { getQuantitativeStats } from './getQuantitativeStats';
6
+ export function getQuantitativeStatsAutorun(self) {
7
+ addDisposer(self, autorun(async () => {
8
+ try {
9
+ if (self.quantitativeStatsReady) {
10
+ const view = getContainingView(self);
11
+ const stopToken = createStopToken();
12
+ self.setStatsLoading(stopToken);
13
+ const statsRegion = JSON.stringify(view.dynamicBlocks);
14
+ const wiggleStats = await getQuantitativeStats(self, {
15
+ stopToken,
16
+ filters: [],
17
+ currStatsBpPerPx: view.bpPerPx,
18
+ ...self.adapterProps(),
19
+ });
20
+ if (isAlive(self)) {
21
+ self.updateQuantitativeStats(wiggleStats, statsRegion);
22
+ }
23
+ }
24
+ }
25
+ catch (e) {
26
+ if (isAlive(self) && !isAbortException(e)) {
27
+ console.error(e);
28
+ self.setError(e);
29
+ }
30
+ }
31
+ }, { delay: 1000 }));
32
+ }
package/esm/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
- import PluginManager from '@jbrowse/core/PluginManager';
3
- import WiggleBaseRenderer from './WiggleBaseRenderer';
4
- import * as utils from './util';
5
2
  import { modelFactory as linearWiggleDisplayModelFactory } from './LinearWiggleDisplay';
3
+ import WiggleBaseRenderer from './WiggleBaseRenderer';
6
4
  import { XYPlotRenderer } from './XYPlotRenderer';
5
+ import * as utils from './util';
6
+ import type PluginManager from '@jbrowse/core/PluginManager';
7
7
  export default class WigglePlugin extends Plugin {
8
8
  name: string;
9
9
  install(pm: PluginManager): void;
10
10
  exports: {
11
11
  LinearWiggleDisplayReactComponent: (props: {
12
- model: import("./LinearWiggleDisplay/models/model").WiggleDisplayModel;
12
+ model: import("./LinearWiggleDisplay/model").WiggleDisplayModel;
13
13
  }) => import("react").JSX.Element;
14
14
  XYPlotRendererReactComponent: (props: {
15
15
  regions: import("@jbrowse/core/util/types").Region[];
@@ -83,6 +83,6 @@ export default class WigglePlugin extends Plugin {
83
83
  }
84
84
  export * from './util';
85
85
  export { default as WiggleRendering } from './WiggleRendering';
86
- export { Tooltip, ReactComponent as LinearWiggleDisplayReactComponent, modelFactory as linearWiggleDisplayModelFactory, } from './LinearWiggleDisplay';
87
- export { type TooltipContentsComponent } from './Tooltip';
86
+ export { ReactComponent as LinearWiggleDisplayReactComponent, Tooltip, modelFactory as linearWiggleDisplayModelFactory, } from './LinearWiggleDisplay';
87
+ export type { TooltipContentsComponent } from './Tooltip';
88
88
  export { default as WiggleBaseRenderer } from './WiggleBaseRenderer';