@jbrowse/plugin-wiggle 4.1.3 → 4.1.5

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 (122) hide show
  1. package/esm/BigWigAdapter/BigWigAdapter.d.ts +14 -0
  2. package/esm/BigWigAdapter/BigWigAdapter.js +6 -0
  3. package/esm/BigWigAdapter/configSchema.d.ts +2 -2
  4. package/esm/DensityRenderer/configSchema.d.ts +2 -2
  5. package/esm/LinePlotRenderer/configSchema.d.ts +3 -3
  6. package/esm/LinearWiggleDisplay/configSchema.d.ts +6 -6
  7. package/esm/LinearWiggleDisplay/model.d.ts +24 -8
  8. package/esm/MultiDensityRenderer/configSchema.d.ts +2 -2
  9. package/esm/MultiLineRenderer/configSchema.d.ts +3 -3
  10. package/esm/MultiLinearWiggleDisplay/components/IndividualScaleBars.js +3 -2
  11. package/esm/MultiLinearWiggleDisplay/components/MultiWiggleColorLegend.d.ts +10 -0
  12. package/esm/MultiLinearWiggleDisplay/components/MultiWiggleColorLegend.js +29 -0
  13. package/esm/MultiLinearWiggleDisplay/components/MultiWiggleLegendBar.d.ts +7 -0
  14. package/esm/MultiLinearWiggleDisplay/components/MultiWiggleLegendBar.js +28 -0
  15. package/esm/MultiLinearWiggleDisplay/components/MultiWiggleLegendBarWrapper.d.ts +7 -0
  16. package/esm/MultiLinearWiggleDisplay/components/MultiWiggleLegendBarWrapper.js +18 -0
  17. package/esm/MultiLinearWiggleDisplay/components/RectBg.js +3 -1
  18. package/esm/MultiLinearWiggleDisplay/components/SvgTree.d.ts +5 -0
  19. package/esm/MultiLinearWiggleDisplay/components/SvgTree.js +19 -0
  20. package/esm/MultiLinearWiggleDisplay/components/TreeSidebar.d.ts +5 -0
  21. package/esm/MultiLinearWiggleDisplay/components/TreeSidebar.js +165 -0
  22. package/esm/MultiLinearWiggleDisplay/components/WiggleClusterDialog/WiggleClusterDialogAuto.js +2 -1
  23. package/esm/MultiLinearWiggleDisplay/components/WiggleClusterDialog/types.d.ts +2 -1
  24. package/esm/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.js +5 -2
  25. package/esm/MultiLinearWiggleDisplay/components/constants.d.ts +1 -0
  26. package/esm/MultiLinearWiggleDisplay/components/constants.js +1 -0
  27. package/esm/MultiLinearWiggleDisplay/components/treeTypes.d.ts +39 -0
  28. package/esm/MultiLinearWiggleDisplay/components/treeTypes.js +1 -0
  29. package/esm/MultiLinearWiggleDisplay/configSchema.d.ts +6 -6
  30. package/esm/MultiLinearWiggleDisplay/makeSidebarSvg.d.ts +9 -0
  31. package/esm/MultiLinearWiggleDisplay/makeSidebarSvg.js +13 -0
  32. package/esm/MultiLinearWiggleDisplay/model.d.ts +146 -25
  33. package/esm/MultiLinearWiggleDisplay/model.js +137 -5
  34. package/esm/MultiLinearWiggleDisplay/renderSvg.js +3 -1
  35. package/esm/MultiLinearWiggleDisplay/treeDrawingAutorun.d.ts +17 -0
  36. package/esm/MultiLinearWiggleDisplay/treeDrawingAutorun.js +77 -0
  37. package/esm/MultiQuantitativeTrack/configSchema.d.ts +8 -8
  38. package/esm/MultiRowLineRenderer/configSchema.d.ts +3 -3
  39. package/esm/MultiRowXYPlotRenderer/configSchema.d.ts +3 -3
  40. package/esm/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +3 -0
  41. package/esm/MultiWiggleAdapter/MultiWiggleAdapter.js +5 -1
  42. package/esm/MultiWiggleAdapter/configSchema.d.ts +2 -2
  43. package/esm/MultiXYPlotRenderer/configSchema.d.ts +3 -3
  44. package/esm/QuantitativeTrack/configSchema.d.ts +8 -8
  45. package/esm/WiggleRPC/MultiWiggleClusterScoreMatrix.d.ts +4 -1
  46. package/esm/WiggleRPC/executeClusterScoreMatrix.d.ts +4 -1
  47. package/esm/WiggleRPC/executeClusterScoreMatrix.js +8 -2
  48. package/esm/XYPlotRenderer/configSchema.d.ts +3 -3
  49. package/esm/configSchema.d.ts +2 -2
  50. package/esm/d3-hierarchy2/accessors.d.ts +2 -0
  51. package/esm/d3-hierarchy2/accessors.js +8 -0
  52. package/esm/d3-hierarchy2/array.d.ts +2 -0
  53. package/esm/d3-hierarchy2/array.js +15 -0
  54. package/esm/d3-hierarchy2/cluster.d.ts +8 -0
  55. package/esm/d3-hierarchy2/cluster.js +63 -0
  56. package/esm/d3-hierarchy2/constant.d.ts +2 -0
  57. package/esm/d3-hierarchy2/constant.js +8 -0
  58. package/esm/d3-hierarchy2/hierarchy/ancestors.d.ts +1 -0
  59. package/esm/d3-hierarchy2/hierarchy/ancestors.js +7 -0
  60. package/esm/d3-hierarchy2/hierarchy/count.d.ts +1 -0
  61. package/esm/d3-hierarchy2/hierarchy/count.js +12 -0
  62. package/esm/d3-hierarchy2/hierarchy/descendants.d.ts +1 -0
  63. package/esm/d3-hierarchy2/hierarchy/descendants.js +3 -0
  64. package/esm/d3-hierarchy2/hierarchy/each.d.ts +1 -0
  65. package/esm/d3-hierarchy2/hierarchy/each.js +7 -0
  66. package/esm/d3-hierarchy2/hierarchy/eachAfter.d.ts +1 -0
  67. package/esm/d3-hierarchy2/hierarchy/eachAfter.js +15 -0
  68. package/esm/d3-hierarchy2/hierarchy/eachBefore.d.ts +1 -0
  69. package/esm/d3-hierarchy2/hierarchy/eachBefore.js +12 -0
  70. package/esm/d3-hierarchy2/hierarchy/find.d.ts +1 -0
  71. package/esm/d3-hierarchy2/hierarchy/find.js +8 -0
  72. package/esm/d3-hierarchy2/hierarchy/index.d.ts +3 -0
  73. package/esm/d3-hierarchy2/hierarchy/index.js +78 -0
  74. package/esm/d3-hierarchy2/hierarchy/iterator.d.ts +1 -0
  75. package/esm/d3-hierarchy2/hierarchy/iterator.js +14 -0
  76. package/esm/d3-hierarchy2/hierarchy/leaves.d.ts +1 -0
  77. package/esm/d3-hierarchy2/hierarchy/leaves.js +9 -0
  78. package/esm/d3-hierarchy2/hierarchy/links.d.ts +1 -0
  79. package/esm/d3-hierarchy2/hierarchy/links.js +9 -0
  80. package/esm/d3-hierarchy2/hierarchy/path.d.ts +1 -0
  81. package/esm/d3-hierarchy2/hierarchy/path.js +26 -0
  82. package/esm/d3-hierarchy2/hierarchy/sort.d.ts +1 -0
  83. package/esm/d3-hierarchy2/hierarchy/sort.js +7 -0
  84. package/esm/d3-hierarchy2/hierarchy/sum.d.ts +1 -0
  85. package/esm/d3-hierarchy2/hierarchy/sum.js +8 -0
  86. package/esm/d3-hierarchy2/index.d.ts +15 -0
  87. package/esm/d3-hierarchy2/index.js +15 -0
  88. package/esm/d3-hierarchy2/lcg.d.ts +1 -0
  89. package/esm/d3-hierarchy2/lcg.js +7 -0
  90. package/esm/d3-hierarchy2/pack/enclose.d.ts +10 -0
  91. package/esm/d3-hierarchy2/pack/enclose.js +84 -0
  92. package/esm/d3-hierarchy2/pack/index.d.ts +7 -0
  93. package/esm/d3-hierarchy2/pack/index.js +68 -0
  94. package/esm/d3-hierarchy2/pack/siblings.d.ts +2 -0
  95. package/esm/d3-hierarchy2/pack/siblings.js +94 -0
  96. package/esm/d3-hierarchy2/partition.d.ts +6 -0
  97. package/esm/d3-hierarchy2/partition.js +42 -0
  98. package/esm/d3-hierarchy2/stratify.d.ts +9 -0
  99. package/esm/d3-hierarchy2/stratify.js +115 -0
  100. package/esm/d3-hierarchy2/tree.d.ts +8 -0
  101. package/esm/d3-hierarchy2/tree.js +153 -0
  102. package/esm/d3-hierarchy2/treemap/binary.d.ts +1 -0
  103. package/esm/d3-hierarchy2/treemap/binary.js +36 -0
  104. package/esm/d3-hierarchy2/treemap/dice.d.ts +1 -0
  105. package/esm/d3-hierarchy2/treemap/dice.js +7 -0
  106. package/esm/d3-hierarchy2/treemap/index.d.ts +17 -0
  107. package/esm/d3-hierarchy2/treemap/index.js +72 -0
  108. package/esm/d3-hierarchy2/treemap/resquarify.d.ts +5 -0
  109. package/esm/d3-hierarchy2/treemap/resquarify.js +28 -0
  110. package/esm/d3-hierarchy2/treemap/round.d.ts +1 -0
  111. package/esm/d3-hierarchy2/treemap/round.js +6 -0
  112. package/esm/d3-hierarchy2/treemap/slice.d.ts +1 -0
  113. package/esm/d3-hierarchy2/treemap/slice.js +7 -0
  114. package/esm/d3-hierarchy2/treemap/sliceDice.d.ts +1 -0
  115. package/esm/d3-hierarchy2/treemap/sliceDice.js +5 -0
  116. package/esm/d3-hierarchy2/treemap/squarify.d.ts +11 -0
  117. package/esm/d3-hierarchy2/treemap/squarify.js +46 -0
  118. package/esm/index.d.ts +3 -3
  119. package/esm/shared/SharedWiggleConfigSchema.d.ts +3 -3
  120. package/esm/shared/SharedWiggleMixin.d.ts +28 -10
  121. package/esm/shared/SharedWiggleMixin.js +13 -3
  122. package/package.json +7 -7
@@ -0,0 +1,46 @@
1
+ import treemapDice from "./dice.js";
2
+ import treemapSlice from "./slice.js";
3
+ export var phi = (1 + Math.sqrt(5)) / 2;
4
+ export function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
5
+ var rows = [], nodes = parent.children, row, nodeValue, i0 = 0, i1 = 0, n = nodes.length, dx, dy, value = parent.value, sumValue, minValue, maxValue, newRatio, minRatio, alpha, beta;
6
+ while (i0 < n) {
7
+ dx = x1 - x0, dy = y1 - y0;
8
+ do
9
+ sumValue = nodes[i1++].value;
10
+ while (!sumValue && i1 < n);
11
+ minValue = maxValue = sumValue;
12
+ alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
13
+ beta = sumValue * sumValue * alpha;
14
+ minRatio = Math.max(maxValue / beta, beta / minValue);
15
+ for (; i1 < n; ++i1) {
16
+ sumValue += nodeValue = nodes[i1].value;
17
+ if (nodeValue < minValue)
18
+ minValue = nodeValue;
19
+ if (nodeValue > maxValue)
20
+ maxValue = nodeValue;
21
+ beta = sumValue * sumValue * alpha;
22
+ newRatio = Math.max(maxValue / beta, beta / minValue);
23
+ if (newRatio > minRatio) {
24
+ sumValue -= nodeValue;
25
+ break;
26
+ }
27
+ minRatio = newRatio;
28
+ }
29
+ rows.push(row = { value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1) });
30
+ if (row.dice)
31
+ treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
32
+ else
33
+ treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
34
+ value -= sumValue, i0 = i1;
35
+ }
36
+ return rows;
37
+ }
38
+ export default (function custom(ratio) {
39
+ function squarify(parent, x0, y0, x1, y1) {
40
+ squarifyRatio(ratio, parent, x0, y0, x1, y1);
41
+ }
42
+ squarify.ratio = function (x) {
43
+ return custom((x = +x) > 1 ? x : 1);
44
+ };
45
+ return squarify;
46
+ })(phi);
package/esm/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export default class WigglePlugin extends Plugin {
21
21
  }) => import("react/jsx-runtime").JSX.Element;
22
22
  XYPlotRenderer: typeof XYPlotRenderer;
23
23
  linearWiggleDisplayModelFactory: typeof linearWiggleDisplayModelFactory;
24
- xyPlotRendererConfigSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
24
+ xyPlotRendererConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
25
25
  filled: {
26
26
  type: string;
27
27
  defaultValue: boolean;
@@ -41,7 +41,7 @@ export default class WigglePlugin extends Plugin {
41
41
  type: string;
42
42
  defaultValue: number;
43
43
  };
44
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
44
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
45
45
  color: {
46
46
  type: string;
47
47
  description: string;
@@ -76,7 +76,7 @@ export default class WigglePlugin extends Plugin {
76
76
  defaultValue: number;
77
77
  description: string;
78
78
  };
79
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>, undefined>>;
79
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>, undefined>>;
80
80
  utils: typeof utils;
81
81
  };
82
82
  }
@@ -1,4 +1,4 @@
1
- export default function sharedWiggleConfigFactory(): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
1
+ export default function sharedWiggleConfigFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
2
  autoscale: {
3
3
  type: string;
4
4
  defaultValue: string;
@@ -36,7 +36,7 @@ export default function sharedWiggleConfigFactory(): import("node_modules/@jbrow
36
36
  description: string;
37
37
  defaultValue: boolean;
38
38
  };
39
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
39
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
40
40
  maxFeatureScreenDensity: {
41
41
  type: string;
42
42
  description: string;
@@ -63,4 +63,4 @@ export default function sharedWiggleConfigFactory(): import("node_modules/@jbrow
63
63
  description: string;
64
64
  defaultValue: never[];
65
65
  };
66
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
66
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
@@ -35,6 +35,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
35
35
  statusMessage?: string;
36
36
  reactElement?: React.ReactElement;
37
37
  isRenderingPending?: boolean;
38
+ displayHeight?: number;
38
39
  };
39
40
  }) => import("react/jsx-runtime").JSX.Element;
40
41
  renderProps: any;
@@ -53,10 +54,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
53
54
  beforeDestroy(): void;
54
55
  } & {
55
56
  readonly statusMessage: any;
57
+ readonly displayHeight: number | undefined;
56
58
  } & {
57
59
  afterAttach(): void;
58
60
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
59
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
61
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
60
62
  maxFeatureScreenDensity: {
61
63
  type: string;
62
64
  description: string;
@@ -83,7 +85,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
83
85
  description: string;
84
86
  defaultValue: never[];
85
87
  };
86
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
88
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
87
89
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
88
90
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
89
91
  } & {
@@ -392,6 +394,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
392
394
  statusMessage?: string;
393
395
  reactElement?: React.ReactElement;
394
396
  isRenderingPending?: boolean;
397
+ displayHeight?: number;
395
398
  };
396
399
  }) => import("react/jsx-runtime").JSX.Element;
397
400
  renderProps: any;
@@ -410,6 +413,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
410
413
  beforeDestroy(): void;
411
414
  } & {
412
415
  readonly statusMessage: any;
416
+ readonly displayHeight: number | undefined;
413
417
  } & {
414
418
  afterAttach(): void;
415
419
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -436,6 +440,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
436
440
  statusMessage?: string;
437
441
  reactElement?: React.ReactElement;
438
442
  isRenderingPending?: boolean;
443
+ displayHeight?: number;
439
444
  };
440
445
  }) => import("react/jsx-runtime").JSX.Element;
441
446
  renderProps: any;
@@ -454,6 +459,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
454
459
  beforeDestroy(): void;
455
460
  } & {
456
461
  readonly statusMessage: any;
462
+ readonly displayHeight: number | undefined;
457
463
  } & {
458
464
  afterAttach(): void;
459
465
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>>;
@@ -467,7 +473,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
467
473
  [x: string]: any;
468
474
  } & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
469
475
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
470
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
476
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
471
477
  maxFeatureScreenDensity: {
472
478
  type: string;
473
479
  description: string;
@@ -494,7 +500,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
494
500
  description: string;
495
501
  defaultValue: never[];
496
502
  };
497
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>>;
503
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>>;
498
504
  showLegend: boolean | undefined;
499
505
  showTooltips: boolean | undefined;
500
506
  } & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
@@ -784,6 +790,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
784
790
  statusMessage?: string;
785
791
  reactElement?: React.ReactElement;
786
792
  isRenderingPending?: boolean;
793
+ displayHeight?: number;
787
794
  };
788
795
  }) => import("react/jsx-runtime").JSX.Element;
789
796
  renderProps: any;
@@ -802,10 +809,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
802
809
  beforeDestroy(): void;
803
810
  } & {
804
811
  readonly statusMessage: any;
812
+ readonly displayHeight: number | undefined;
805
813
  } & {
806
814
  afterAttach(): void;
807
815
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
808
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
816
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
809
817
  maxFeatureScreenDensity: {
810
818
  type: string;
811
819
  description: string;
@@ -832,7 +840,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
832
840
  description: string;
833
841
  defaultValue: never[];
834
842
  };
835
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
843
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
836
844
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
837
845
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
838
846
  }, {
@@ -1103,6 +1111,8 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1103
1111
  currStatsBpPerPx: number;
1104
1112
  scoreMin: number;
1105
1113
  scoreMax: number;
1114
+ scoreMeanMin?: number;
1115
+ scoreMeanMax?: number;
1106
1116
  statsRegion?: string;
1107
1117
  } | undefined;
1108
1118
  statsFetchInProgress: undefined | StopToken;
@@ -1111,6 +1121,8 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1111
1121
  currStatsBpPerPx: number;
1112
1122
  scoreMin: number;
1113
1123
  scoreMax: number;
1124
+ scoreMeanMin?: number;
1125
+ scoreMeanMax?: number;
1114
1126
  }, statsRegion?: string): void;
1115
1127
  setColor(color?: string): void;
1116
1128
  setPosColor(color?: string): void;
@@ -1159,6 +1171,8 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1159
1171
  currStatsBpPerPx: number;
1160
1172
  scoreMin: number;
1161
1173
  scoreMax: number;
1174
+ scoreMeanMin?: number;
1175
+ scoreMeanMax?: number;
1162
1176
  statsRegion?: string;
1163
1177
  } | undefined;
1164
1178
  autoscaleType: string;
@@ -1229,6 +1243,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1229
1243
  statusMessage?: string;
1230
1244
  reactElement?: React.ReactElement;
1231
1245
  isRenderingPending?: boolean;
1246
+ displayHeight?: number;
1232
1247
  };
1233
1248
  }) => import("react/jsx-runtime").JSX.Element;
1234
1249
  renderProps: any;
@@ -1247,10 +1262,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1247
1262
  beforeDestroy(): void;
1248
1263
  } & {
1249
1264
  readonly statusMessage: any;
1265
+ readonly displayHeight: number | undefined;
1250
1266
  } & {
1251
1267
  afterAttach(): void;
1252
1268
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
1253
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
1269
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1254
1270
  maxFeatureScreenDensity: {
1255
1271
  type: string;
1256
1272
  description: string;
@@ -1277,7 +1293,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1277
1293
  description: string;
1278
1294
  defaultValue: never[];
1279
1295
  };
1280
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
1296
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
1281
1297
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
1282
1298
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
1283
1299
  }>> & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
@@ -1314,6 +1330,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1314
1330
  statusMessage?: string;
1315
1331
  reactElement?: React.ReactElement;
1316
1332
  isRenderingPending?: boolean;
1333
+ displayHeight?: number;
1317
1334
  };
1318
1335
  }) => import("react/jsx-runtime").JSX.Element;
1319
1336
  renderProps: any;
@@ -1332,10 +1349,11 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1332
1349
  beforeDestroy(): void;
1333
1350
  } & {
1334
1351
  readonly statusMessage: any;
1352
+ readonly displayHeight: number | undefined;
1335
1353
  } & {
1336
1354
  afterAttach(): void;
1337
1355
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
1338
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
1356
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1339
1357
  maxFeatureScreenDensity: {
1340
1358
  type: string;
1341
1359
  description: string;
@@ -1362,7 +1380,7 @@ export default function SharedWiggleMixin(configSchema: AnyConfigurationSchemaTy
1362
1380
  description: string;
1363
1381
  defaultValue: never[];
1364
1382
  };
1365
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
1383
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
1366
1384
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
1367
1385
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
1368
1386
  } & {
@@ -34,7 +34,7 @@ export default function SharedWiggleMixin(configSchema) {
34
34
  }))
35
35
  .actions(self => ({
36
36
  updateQuantitativeStats(stats, statsRegion) {
37
- const { currStatsBpPerPx, scoreMin, scoreMax } = stats;
37
+ const { currStatsBpPerPx, scoreMin, scoreMax, scoreMeanMin, scoreMeanMax, } = stats;
38
38
  const EPSILON = 0.000001;
39
39
  if (!self.stats ||
40
40
  Math.abs(self.stats.scoreMax - scoreMax) > EPSILON ||
@@ -44,6 +44,8 @@ export default function SharedWiggleMixin(configSchema) {
44
44
  currStatsBpPerPx,
45
45
  scoreMin,
46
46
  scoreMax,
47
+ scoreMeanMin,
48
+ scoreMeanMax,
47
49
  statsRegion,
48
50
  };
49
51
  }
@@ -163,12 +165,20 @@ export default function SharedWiggleMixin(configSchema) {
163
165
  let oldDomain = [0, 0];
164
166
  return {
165
167
  get domain() {
166
- const { stats, scaleType, minScore, maxScore } = self;
168
+ const { stats, scaleType, minScore, maxScore, rendererConfig } = self;
167
169
  if (!stats) {
168
170
  return undefined;
169
171
  }
172
+ const { summaryScoreMode } = rendererConfig;
173
+ const useMeanStats = summaryScoreMode === 'mean' || summaryScoreMode === 'avg';
174
+ const domainMin = useMeanStats
175
+ ? (stats.scoreMeanMin ?? stats.scoreMin)
176
+ : stats.scoreMin;
177
+ const domainMax = useMeanStats
178
+ ? (stats.scoreMeanMax ?? stats.scoreMax)
179
+ : stats.scoreMax;
170
180
  const ret = getNiceDomain({
171
- domain: [stats.scoreMin, stats.scoreMax],
181
+ domain: [domainMin, domainMax],
172
182
  bounds: [minScore, maxScore],
173
183
  scaleType,
174
184
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-wiggle",
3
- "version": "4.1.3",
3
+ "version": "4.1.5",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 wiggle adapters, tracks, etc.",
6
6
  "keywords": [
@@ -24,10 +24,10 @@
24
24
  "@gmod/bbi": "^8.1.1",
25
25
  "@gmod/hclust": "^1.0.7",
26
26
  "@jbrowse/mobx-state-tree": "^5.5.0",
27
- "@mui/icons-material": "^7.3.7",
28
- "@mui/material": "^7.3.7",
27
+ "@mui/icons-material": "^7.3.8",
28
+ "@mui/material": "^7.3.8",
29
29
  "@mui/x-charts-vendor": "^8.26.0",
30
- "@mui/x-data-grid": "^8.26.0",
30
+ "@mui/x-data-grid": "^8.27.1",
31
31
  "@types/file-saver-es": "^2.0.3",
32
32
  "colord": "^2.9.3",
33
33
  "copy-to-clipboard": "^3.3.3",
@@ -36,9 +36,9 @@
36
36
  "mobx": "^6.15.0",
37
37
  "mobx-react": "^9.2.1",
38
38
  "rxjs": "^7.8.2",
39
- "@jbrowse/core": "^4.1.3",
40
- "@jbrowse/plugin-data-management": "^4.1.3",
41
- "@jbrowse/plugin-linear-genome-view": "^4.1.3"
39
+ "@jbrowse/core": "^4.1.5",
40
+ "@jbrowse/plugin-linear-genome-view": "^4.1.5",
41
+ "@jbrowse/plugin-data-management": "^4.1.5"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=18.0.0"