@jbrowse/plugin-wiggle 2.13.0 → 2.14.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 (93) hide show
  1. package/dist/BigWigAdapter/BigWigAdapter.d.ts +1 -1
  2. package/dist/BigWigAdapter/BigWigAdapter.js +1 -1
  3. package/dist/CreateMultiWiggleExtension/ConfirmDialog.js +12 -4
  4. package/dist/LinearWiggleDisplay/components/SetColorDialog.js +12 -4
  5. package/dist/LinearWiggleDisplay/components/Tooltip.d.ts +1 -1
  6. package/dist/LinearWiggleDisplay/components/Tooltip.js +7 -2
  7. package/dist/LinearWiggleDisplay/models/model.d.ts +1 -1
  8. package/dist/LinearWiggleDisplay/models/model.js +10 -4
  9. package/dist/MultiDensityRenderer/MultiDensityRenderer.js +1 -8
  10. package/dist/MultiLinearWiggleDisplay/components/ScoreLegend.js +1 -2
  11. package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.js +3 -1
  12. package/dist/MultiLinearWiggleDisplay/components/SourcesGrid.js +22 -8
  13. package/dist/MultiLinearWiggleDisplay/components/Tooltip.js +4 -7
  14. package/dist/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.js +1 -1
  15. package/dist/MultiLinearWiggleDisplay/components/YScaleBars.js +2 -2
  16. package/dist/MultiLinearWiggleDisplay/models/model.d.ts +1 -1
  17. package/dist/MultiLinearWiggleDisplay/models/model.js +16 -6
  18. package/dist/MultiRowLineRenderer/MultiRowLineRenderer.js +1 -1
  19. package/dist/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.js +1 -1
  20. package/dist/MultiWiggleAdapter/MultiWiggleAdapter.js +1 -3
  21. package/dist/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +8 -4
  22. package/dist/MultiWiggleRendering.d.ts +4 -4
  23. package/dist/MultiWiggleRendering.js +6 -3
  24. package/dist/Tooltip.d.ts +1 -1
  25. package/dist/Tooltip.js +1 -1
  26. package/dist/WiggleBaseRenderer.d.ts +1 -1
  27. package/dist/WiggleBaseRenderer.js +1 -1
  28. package/dist/WiggleRPC/MultiWiggleGetSources.d.ts +1 -1
  29. package/dist/WiggleRPC/MultiWiggleGetSources.js +0 -1
  30. package/dist/WiggleRPC/WiggleGetGlobalQuantitativeStats.js +0 -1
  31. package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +2 -2
  32. package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +0 -1
  33. package/dist/WiggleRendering.d.ts +3 -3
  34. package/dist/WiggleRendering.js +3 -3
  35. package/dist/drawDensity.js +5 -3
  36. package/dist/drawLine.js +5 -3
  37. package/dist/drawXY.js +5 -3
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.js +1 -1
  40. package/dist/shared/SetMinMaxDialog.d.ts +2 -2
  41. package/dist/shared/SetMinMaxDialog.js +6 -2
  42. package/dist/shared/YScaleBar.d.ts +1 -1
  43. package/dist/shared/modelShared.d.ts +5 -5
  44. package/dist/shared/modelShared.js +15 -5
  45. package/dist/util.d.ts +2 -2
  46. package/dist/util.js +12 -16
  47. package/esm/BigWigAdapter/BigWigAdapter.d.ts +1 -1
  48. package/esm/BigWigAdapter/BigWigAdapter.js +1 -1
  49. package/esm/CreateMultiWiggleExtension/ConfirmDialog.js +12 -4
  50. package/esm/LinearWiggleDisplay/components/SetColorDialog.js +12 -4
  51. package/esm/LinearWiggleDisplay/components/Tooltip.d.ts +1 -1
  52. package/esm/LinearWiggleDisplay/components/Tooltip.js +7 -2
  53. package/esm/LinearWiggleDisplay/models/model.d.ts +1 -1
  54. package/esm/LinearWiggleDisplay/models/model.js +10 -4
  55. package/esm/MultiDensityRenderer/MultiDensityRenderer.js +1 -8
  56. package/esm/MultiLinearWiggleDisplay/components/ScoreLegend.js +1 -2
  57. package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.js +3 -1
  58. package/esm/MultiLinearWiggleDisplay/components/SourcesGrid.js +22 -8
  59. package/esm/MultiLinearWiggleDisplay/components/Tooltip.js +4 -7
  60. package/esm/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.js +1 -1
  61. package/esm/MultiLinearWiggleDisplay/components/YScaleBars.js +2 -2
  62. package/esm/MultiLinearWiggleDisplay/models/model.d.ts +1 -1
  63. package/esm/MultiLinearWiggleDisplay/models/model.js +16 -6
  64. package/esm/MultiRowLineRenderer/MultiRowLineRenderer.js +1 -1
  65. package/esm/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.js +1 -1
  66. package/esm/MultiWiggleAdapter/MultiWiggleAdapter.js +1 -3
  67. package/esm/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +8 -4
  68. package/esm/MultiWiggleRendering.d.ts +4 -4
  69. package/esm/MultiWiggleRendering.js +6 -3
  70. package/esm/Tooltip.d.ts +1 -1
  71. package/esm/Tooltip.js +1 -1
  72. package/esm/WiggleBaseRenderer.d.ts +1 -1
  73. package/esm/WiggleBaseRenderer.js +1 -1
  74. package/esm/WiggleRPC/MultiWiggleGetSources.d.ts +1 -1
  75. package/esm/WiggleRPC/MultiWiggleGetSources.js +0 -1
  76. package/esm/WiggleRPC/WiggleGetGlobalQuantitativeStats.js +0 -1
  77. package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +2 -2
  78. package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +0 -1
  79. package/esm/WiggleRendering.d.ts +3 -3
  80. package/esm/WiggleRendering.js +3 -3
  81. package/esm/drawDensity.js +5 -3
  82. package/esm/drawLine.js +5 -3
  83. package/esm/drawXY.js +5 -3
  84. package/esm/index.d.ts +3 -3
  85. package/esm/index.js +1 -1
  86. package/esm/shared/SetMinMaxDialog.d.ts +2 -2
  87. package/esm/shared/SetMinMaxDialog.js +6 -2
  88. package/esm/shared/YScaleBar.d.ts +1 -1
  89. package/esm/shared/modelShared.d.ts +5 -5
  90. package/esm/shared/modelShared.js +15 -5
  91. package/esm/util.d.ts +2 -2
  92. package/esm/util.js +12 -16
  93. package/package.json +5 -6
package/esm/util.js CHANGED
@@ -1,4 +1,4 @@
1
- import { scaleLinear, scaleLog, scaleQuantize } from 'd3-scale';
1
+ import { scaleLinear, scaleLog, scaleQuantize, } from '@mui/x-charts-vendor/d3-scale';
2
2
  import { autorun } from 'mobx';
3
3
  import { isAbortException, getSession, getContainingView, } from '@jbrowse/core/util';
4
4
  import { getRpcSessionId } from '@jbrowse/core/util/tracks';
@@ -26,8 +26,7 @@ export function getScale({ domain = [], range = [], scaleType, pivotValue, inver
26
26
  scale = scaleLinear();
27
27
  }
28
28
  else if (scaleType === 'log') {
29
- scale = scaleLog();
30
- scale.base(2);
29
+ scale = scaleLog().base(2);
31
30
  }
32
31
  else if (scaleType === 'quantize') {
33
32
  scale = scaleQuantize();
@@ -90,17 +89,13 @@ export function getNiceDomain({ scaleType, domain, bounds, }) {
90
89
  }
91
90
  }
92
91
  if (scaleType === 'log') {
93
- // if the min is 0, assume that it's just something
94
- // with no read coverage and that we should ignore it in calculations
95
- // if it's greater than 1 pin to 1 for the full range also
96
- // otherwise, we may see bigwigs with fractional values
97
- if (min === 0 || min > 1) {
92
+ // for min>0 and max>1, set log min to 1, which works for most coverage
93
+ // types tracks. if max is not >1, might be like raw p-values so then it'll
94
+ // display negative values
95
+ if (min >= 0 && max > 1) {
98
96
  min = 1;
99
97
  }
100
98
  }
101
- if (min === undefined || max === undefined) {
102
- throw new Error('invalid domain supplied to stats function');
103
- }
104
99
  if (minScore !== undefined && minScore !== Number.MIN_VALUE) {
105
100
  min = minScore;
106
101
  }
@@ -128,7 +123,7 @@ export function getNiceDomain({ scaleType, domain, bounds, }) {
128
123
  }
129
124
  export async function getQuantitativeStats(self, opts) {
130
125
  const { rpcManager } = getSession(self);
131
- const nd = getConf(self, 'numStdDev') || 3;
126
+ const numStdDev = getConf(self, 'numStdDev') || 3;
132
127
  const { adapterConfig, autoscaleType } = self;
133
128
  const sessionId = getRpcSessionId(self);
134
129
  const params = {
@@ -150,8 +145,8 @@ export async function getQuantitativeStats(self, opts) {
150
145
  return autoscaleType === 'globalsd'
151
146
  ? {
152
147
  ...results,
153
- scoreMin: scoreMin >= 0 ? 0 : scoreMean - nd * scoreStdDev,
154
- scoreMax: scoreMean + nd * scoreStdDev,
148
+ scoreMin: scoreMin >= 0 ? 0 : scoreMean - numStdDev * scoreStdDev,
149
+ scoreMax: scoreMean + numStdDev * scoreStdDev,
155
150
  }
156
151
  : results;
157
152
  }
@@ -176,8 +171,8 @@ export async function getQuantitativeStats(self, opts) {
176
171
  return autoscaleType === 'localsd'
177
172
  ? {
178
173
  ...results,
179
- scoreMin: scoreMin >= 0 ? 0 : scoreMean - nd * scoreStdDev,
180
- scoreMax: scoreMean + nd * scoreStdDev,
174
+ scoreMin: scoreMin >= 0 ? 0 : scoreMean - numStdDev * scoreStdDev,
175
+ scoreMax: scoreMean + numStdDev * scoreStdDev,
181
176
  }
182
177
  : results;
183
178
  }
@@ -201,6 +196,7 @@ export function quantitativeStatsAutorun(self) {
201
196
  const statsRegion = JSON.stringify(view.dynamicBlocks);
202
197
  const wiggleStats = await getQuantitativeStats(self, {
203
198
  signal: aborter.signal,
199
+ filters: [],
204
200
  ...self.renderProps(),
205
201
  });
206
202
  if (isAlive(self)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-wiggle",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "JBrowse 2 wiggle adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "scripts": {
26
26
  "build": "npm-run-all build:*",
27
- "test": "cd ../..; jest plugins/wiggle",
27
+ "test": "cd ../..; jest --passWithNoTests plugins/wiggle",
28
28
  "prepublishOnly": "yarn test",
29
29
  "prepack": "yarn build && yarn useDist",
30
30
  "postpack": "yarn useSrc",
@@ -37,12 +37,11 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@floating-ui/react": "^0.26.3",
40
- "@gmod/bbi": "^4.0.0",
40
+ "@gmod/bbi": "^5.0.0",
41
41
  "@mui/icons-material": "^5.0.2",
42
+ "@mui/x-charts-vendor": "^7.12.0",
42
43
  "@mui/x-data-grid": "^7.0.0",
43
44
  "clone": "^2.1.2",
44
- "d3-color": "^3.0.2",
45
- "d3-scale": "^3.0.2",
46
45
  "fast-deep-equal": "^3.1.3",
47
46
  "is-object": "^1.0.1",
48
47
  "react-d3-axis-mod": "^0.1.9",
@@ -66,5 +65,5 @@
66
65
  "distModule": "esm/index.js",
67
66
  "srcModule": "src/index.ts",
68
67
  "module": "esm/index.js",
69
- "gitHead": "efe02fb9616e20e929cceeed46eb96420c1b6923"
68
+ "gitHead": "9fb8231d932db40adf0a283081765431756c66ff"
70
69
  }