@jbrowse/wiggle-core 5.0.0-beta.7 → 5.0.0-beta.9

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 (47) hide show
  1. package/README.md +49 -83
  2. package/esm/ScoreAxisMixin.d.ts +99 -0
  3. package/esm/ScoreAxisMixin.js +150 -0
  4. package/esm/ScoreFieldConfigMixin.d.ts +60 -0
  5. package/esm/ScoreFieldConfigMixin.js +25 -0
  6. package/esm/ScorePlotChrome.d.ts +45 -0
  7. package/esm/ScorePlotChrome.js +47 -0
  8. package/esm/ScorePlotSvgFrame.d.ts +27 -0
  9. package/esm/ScorePlotSvgFrame.js +23 -0
  10. package/esm/ScoreScaleMixin.d.ts +65 -99
  11. package/esm/ScoreScaleMixin.js +78 -141
  12. package/esm/SetScoreRulesDialog.d.ts +14 -0
  13. package/esm/SetScoreRulesDialog.js +45 -0
  14. package/esm/WiggleScoreConfigMixin.d.ts +89 -0
  15. package/esm/WiggleScoreConfigMixin.js +69 -0
  16. package/esm/autoscale.d.ts +45 -5
  17. package/esm/autoscale.js +99 -67
  18. package/esm/chrome.d.ts +4 -0
  19. package/esm/chrome.js +7 -0
  20. package/esm/computeYTicks.d.ts +1 -1
  21. package/esm/computeYTicks.js +4 -2
  22. package/esm/dataTypes.d.ts +2 -6
  23. package/esm/gapBreak.d.ts +2 -3
  24. package/esm/gapBreak.js +2 -3
  25. package/esm/index.d.ts +20 -16
  26. package/esm/index.js +17 -13
  27. package/esm/normalize.d.ts +1 -26
  28. package/esm/normalize.js +1 -86
  29. package/esm/pointSizeMenu.d.ts +13 -0
  30. package/esm/pointSizeMenu.js +21 -3
  31. package/esm/renderingBackendTypes.d.ts +12 -3
  32. package/esm/renderingBackendTypes.js +4 -1
  33. package/esm/scale.d.ts +1 -1
  34. package/esm/scoreFieldConfigSchemaFields.d.ts +10 -0
  35. package/esm/scoreFieldConfigSchemaFields.js +11 -0
  36. package/esm/scoreMenuItems.d.ts +19 -7
  37. package/esm/scoreMenuItems.js +64 -29
  38. package/esm/scoreRuleMarks.d.ts +13 -37
  39. package/esm/scoreRuleMarks.js +12 -45
  40. package/esm/transferables.js +3 -8
  41. package/esm/valueScaleConfigSchema.d.ts +211 -0
  42. package/esm/valueScaleConfigSchema.js +240 -0
  43. package/esm/wiggleRenderModes.generated.d.ts +1 -2
  44. package/esm/wiggleRenderModes.generated.js +1 -2
  45. package/package.json +12 -8
  46. package/esm/scoreAxisConfigSchemaFields.d.ts +0 -44
  47. package/esm/scoreAxisConfigSchemaFields.js +0 -54
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@jbrowse/wiggle-core",
3
- "version": "5.0.0-beta.7",
3
+ "version": "5.0.0-beta.9",
4
4
  "type": "module",
5
- "description": "Shared scale and autoscale utilities for wiggle and coverage displays",
5
+ "description": "Score-axis scale, autoscale, config mixins and plot chrome shared by wiggle, Manhattan, mark and coverage displays",
6
6
  "keywords": [
7
7
  "jbrowse",
8
8
  "jbrowse2",
@@ -21,21 +21,25 @@
21
21
  "main": "esm/index.js",
22
22
  "exports": {
23
23
  ".": "./esm/index.js",
24
+ "./ScorePlotChrome": "./esm/ScorePlotChrome.js",
25
+ "./ScorePlotSvgFrame": "./esm/ScorePlotSvgFrame.js",
26
+ "./chrome": "./esm/chrome.js",
24
27
  "./constants": "./esm/constants.js",
25
- "./normalize": "./esm/normalize.js"
28
+ "./normalize": "./esm/normalize.js",
29
+ "./renderingBackendTypes": "./esm/renderingBackendTypes.js"
26
30
  },
27
31
  "files": [
28
32
  "esm"
29
33
  ],
30
34
  "dependencies": {
31
- "@jbrowse/mobx-state-tree": "^6.5.1",
35
+ "@jbrowse/mobx-state-tree": "^6.5.2",
32
36
  "@mui/icons-material": "^9.4.0",
33
37
  "@mui/material": "^9.4.0",
34
38
  "mobx-react": "^10.0.2",
35
- "@jbrowse/core": "^5.0.0-beta.7",
36
- "@jbrowse/display-kit": "^5.0.0-beta.7",
37
- "@jbrowse/display-ui": "^5.0.0-beta.7",
38
- "@jbrowse/render-core": "^5.0.0-beta.7"
39
+ "@jbrowse/core": "^5.0.0-beta.9",
40
+ "@jbrowse/render-core": "^5.0.0-beta.9",
41
+ "@jbrowse/display-kit": "^5.0.0-beta.9",
42
+ "@jbrowse/display-ui": "^5.0.0-beta.9"
39
43
  },
40
44
  "peerDependencies": {
41
45
  "react": ">=19.0.0"
@@ -1,44 +0,0 @@
1
- import type { ConfigModelForFields } from '@jbrowse/core/configuration';
2
- export declare const scoreAxisConfigSchemaFields: {
3
- readonly minScore: {
4
- readonly type: 'number';
5
- readonly defaultValue: number;
6
- readonly description: 'Fixed minimum score bound. The default (Number.MIN_VALUE) is a sentinel meaning "unset, use autoscale"';
7
- readonly advanced: true;
8
- };
9
- readonly maxScore: {
10
- readonly type: 'number';
11
- readonly defaultValue: number;
12
- readonly description: 'Fixed maximum score bound. The default (Number.MAX_VALUE) is a sentinel meaning "unset, use autoscale"';
13
- readonly advanced: true;
14
- };
15
- readonly scaleType: {
16
- readonly type: 'stringEnum';
17
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"linear" | "log">;
18
- readonly defaultValue: 'linear';
19
- readonly description: 'Scale type (linear or log)';
20
- };
21
- readonly autoscale: {
22
- readonly type: 'stringEnum';
23
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"local" | "localpercentile" | "localsd">;
24
- readonly defaultValue: 'localpercentile';
25
- readonly description: 'Autoscale type: "local" uses the min/max in the visible region, "localsd" uses mean ± numStdDev standard deviations, "localpercentile" uses the numQuantile-th percentile score as the max (robust to skewed/peaky data)';
26
- };
27
- readonly numStdDev: {
28
- readonly type: 'number';
29
- readonly defaultValue: 3;
30
- readonly description: 'Number of standard deviations to use for the localsd autoscale type';
31
- readonly advanced: true;
32
- };
33
- readonly displayCrossHatches: {
34
- readonly type: 'boolean';
35
- readonly defaultValue: false;
36
- readonly description: 'Rule the score axis with horizontal cross hatches at the tick positions — the config form of the score menu\'s "Show cross hatches". Ignored by the density rendering types, which spend color rather than height on the score and so have no axis to rule';
37
- };
38
- };
39
- /**
40
- * What `ScoreScaleMixin` asks a composing display's `configuration` to be — the
41
- * slots above and nothing else, which is all the mixin touches. Narrow so
42
- * `getConf`/`setConf` still check the slot name; see `ConfigModelForFields`.
43
- */
44
- export type ScoreAxisConfigModel = ConfigModelForFields<typeof scoreAxisConfigSchemaFields>;
@@ -1,54 +0,0 @@
1
- import { types } from '@jbrowse/mobx-state-tree';
2
- // The score AXIS alone: exactly the slots `ScoreScaleMixin` reads, and nothing
3
- // else. Split out of `wiggleConfigSchemaFields` below so a display with a score
4
- // axis but none of wiggle's palette/rendering vocabulary can declare the axis
5
- // without inheriting the rest — LinearManhattanDisplay used to extend the whole
6
- // wiggle display schema and advertised twelve slots that did nothing on a GWAS
7
- // track.
8
- //
9
- // `numQuantile` is deliberately NOT here even though `autoscale` names
10
- // `localpercentile`: it is read by the autoscale *computation*
11
- // (`WiggleCommonMixin`), which only the wiggle displays run.
12
- export const scoreAxisConfigSchemaFields = {
13
- minScore: {
14
- type: 'number',
15
- defaultValue: Number.MIN_VALUE,
16
- description: 'Fixed minimum score bound. The default (Number.MIN_VALUE) is a sentinel meaning "unset, use autoscale"',
17
- advanced: true,
18
- },
19
- maxScore: {
20
- type: 'number',
21
- defaultValue: Number.MAX_VALUE,
22
- description: 'Fixed maximum score bound. The default (Number.MAX_VALUE) is a sentinel meaning "unset, use autoscale"',
23
- advanced: true,
24
- },
25
- // #region stringEnumSlot
26
- scaleType: {
27
- type: 'stringEnum',
28
- model: types.enumeration('Scale type', ['linear', 'log']),
29
- defaultValue: 'linear',
30
- description: 'Scale type (linear or log)',
31
- },
32
- // #endregion
33
- autoscale: {
34
- type: 'stringEnum',
35
- model: types.enumeration('Autoscale type', [
36
- 'local',
37
- 'localsd',
38
- 'localpercentile',
39
- ]),
40
- defaultValue: 'localpercentile',
41
- description: 'Autoscale type: "local" uses the min/max in the visible region, "localsd" uses mean ± numStdDev standard deviations, "localpercentile" uses the numQuantile-th percentile score as the max (robust to skewed/peaky data)',
42
- },
43
- numStdDev: {
44
- type: 'number',
45
- defaultValue: 3,
46
- description: 'Number of standard deviations to use for the localsd autoscale type',
47
- advanced: true,
48
- },
49
- displayCrossHatches: {
50
- type: 'boolean',
51
- defaultValue: false,
52
- description: 'Rule the score axis with horizontal cross hatches at the tick positions — the config form of the score menu\'s "Show cross hatches". Ignored by the density rendering types, which spend color rather than height on the score and so have no axis to rule',
53
- },
54
- };