@jbrowse/plugin-wiggle 2.1.7 → 2.2.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 (115) hide show
  1. package/dist/BigWigAdapter/configSchema.d.ts +2 -2
  2. package/dist/BigWigAdapter/configSchema.js +12 -1
  3. package/dist/BigWigAdapter/configSchema.js.map +1 -1
  4. package/dist/DensityRenderer/configSchema.js +11 -1
  5. package/dist/DensityRenderer/configSchema.js.map +1 -1
  6. package/dist/LinePlotRenderer/configSchema.js +14 -1
  7. package/dist/LinePlotRenderer/configSchema.js.map +1 -1
  8. package/dist/LinearWiggleDisplay/models/configSchema.js +38 -1
  9. package/dist/LinearWiggleDisplay/models/configSchema.js.map +1 -1
  10. package/dist/LinearWiggleDisplay/models/model.d.ts +202 -7
  11. package/dist/LinearWiggleDisplay/models/model.js +589 -409
  12. package/dist/LinearWiggleDisplay/models/model.js.map +1 -1
  13. package/dist/MultiDensityRenderer/configSchema.js +11 -1
  14. package/dist/MultiDensityRenderer/configSchema.js.map +1 -1
  15. package/dist/MultiLineRenderer/configSchema.js +17 -1
  16. package/dist/MultiLineRenderer/configSchema.js.map +1 -1
  17. package/dist/MultiLinearWiggleDisplay/models/configSchema.js +38 -1
  18. package/dist/MultiLinearWiggleDisplay/models/configSchema.js.map +1 -1
  19. package/dist/MultiQuantitativeTrack/configSchema.d.ts +3 -0
  20. package/dist/MultiQuantitativeTrack/configSchema.js +18 -0
  21. package/dist/MultiQuantitativeTrack/configSchema.js.map +1 -0
  22. package/dist/MultiQuantitativeTrack/index.js +2 -2
  23. package/dist/MultiQuantitativeTrack/index.js.map +1 -1
  24. package/dist/MultiRowLineRenderer/configSchema.js +17 -1
  25. package/dist/MultiRowLineRenderer/configSchema.js.map +1 -1
  26. package/dist/MultiRowXYPlotRenderer/configSchema.js +23 -1
  27. package/dist/MultiRowXYPlotRenderer/configSchema.js.map +1 -1
  28. package/dist/MultiWiggleAdapter/configSchema.d.ts +2 -2
  29. package/dist/MultiWiggleAdapter/configSchema.js +14 -1
  30. package/dist/MultiWiggleAdapter/configSchema.js.map +1 -1
  31. package/dist/MultiXYPlotRenderer/configSchema.js +23 -1
  32. package/dist/MultiXYPlotRenderer/configSchema.js.map +1 -1
  33. package/dist/QuantitativeTrack/configSchema.d.ts +3 -0
  34. package/dist/QuantitativeTrack/configSchema.js +18 -0
  35. package/dist/QuantitativeTrack/configSchema.js.map +1 -0
  36. package/dist/QuantitativeTrack/index.js +2 -2
  37. package/dist/QuantitativeTrack/index.js.map +1 -1
  38. package/dist/WiggleBaseRenderer.d.ts +4 -0
  39. package/dist/XYPlotRenderer/configSchema.js +23 -1
  40. package/dist/XYPlotRenderer/configSchema.js.map +1 -1
  41. package/dist/configSchema.d.ts +2 -2
  42. package/dist/configSchema.js +25 -1
  43. package/dist/configSchema.js.map +1 -1
  44. package/dist/drawxy.js +4 -4
  45. package/dist/drawxy.js.map +1 -1
  46. package/dist/index.d.ts +1 -305
  47. package/esm/BigWigAdapter/configSchema.d.ts +2 -2
  48. package/esm/BigWigAdapter/configSchema.js +12 -1
  49. package/esm/BigWigAdapter/configSchema.js.map +1 -1
  50. package/esm/DensityRenderer/configSchema.js +12 -2
  51. package/esm/DensityRenderer/configSchema.js.map +1 -1
  52. package/esm/LinePlotRenderer/configSchema.js +15 -2
  53. package/esm/LinePlotRenderer/configSchema.js.map +1 -1
  54. package/esm/LinearWiggleDisplay/models/configSchema.js +38 -1
  55. package/esm/LinearWiggleDisplay/models/configSchema.js.map +1 -1
  56. package/esm/LinearWiggleDisplay/models/model.d.ts +202 -7
  57. package/esm/LinearWiggleDisplay/models/model.js +589 -409
  58. package/esm/LinearWiggleDisplay/models/model.js.map +1 -1
  59. package/esm/MultiDensityRenderer/configSchema.js +12 -2
  60. package/esm/MultiDensityRenderer/configSchema.js.map +1 -1
  61. package/esm/MultiLineRenderer/configSchema.js +18 -2
  62. package/esm/MultiLineRenderer/configSchema.js.map +1 -1
  63. package/esm/MultiLinearWiggleDisplay/models/configSchema.js +38 -1
  64. package/esm/MultiLinearWiggleDisplay/models/configSchema.js.map +1 -1
  65. package/esm/MultiQuantitativeTrack/configSchema.d.ts +3 -0
  66. package/esm/MultiQuantitativeTrack/configSchema.js +16 -0
  67. package/esm/MultiQuantitativeTrack/configSchema.js.map +1 -0
  68. package/esm/MultiQuantitativeTrack/index.js +3 -3
  69. package/esm/MultiQuantitativeTrack/index.js.map +1 -1
  70. package/esm/MultiRowLineRenderer/configSchema.js +18 -2
  71. package/esm/MultiRowLineRenderer/configSchema.js.map +1 -1
  72. package/esm/MultiRowXYPlotRenderer/configSchema.js +24 -2
  73. package/esm/MultiRowXYPlotRenderer/configSchema.js.map +1 -1
  74. package/esm/MultiWiggleAdapter/configSchema.d.ts +2 -2
  75. package/esm/MultiWiggleAdapter/configSchema.js +14 -1
  76. package/esm/MultiWiggleAdapter/configSchema.js.map +1 -1
  77. package/esm/MultiXYPlotRenderer/configSchema.js +24 -2
  78. package/esm/MultiXYPlotRenderer/configSchema.js.map +1 -1
  79. package/esm/QuantitativeTrack/configSchema.d.ts +3 -0
  80. package/esm/QuantitativeTrack/configSchema.js +16 -0
  81. package/esm/QuantitativeTrack/configSchema.js.map +1 -0
  82. package/esm/QuantitativeTrack/index.js +3 -3
  83. package/esm/QuantitativeTrack/index.js.map +1 -1
  84. package/esm/WiggleBaseRenderer.d.ts +4 -0
  85. package/esm/XYPlotRenderer/configSchema.js +24 -2
  86. package/esm/XYPlotRenderer/configSchema.js.map +1 -1
  87. package/esm/configSchema.d.ts +2 -2
  88. package/esm/configSchema.js +25 -1
  89. package/esm/configSchema.js.map +1 -1
  90. package/esm/drawxy.js +4 -4
  91. package/esm/drawxy.js.map +1 -1
  92. package/esm/index.d.ts +1 -305
  93. package/package.json +2 -2
  94. package/src/BigWigAdapter/configSchema.ts +15 -1
  95. package/src/DensityRenderer/__snapshots__/DensityRenderer.test.js.snap +6 -0
  96. package/src/DensityRenderer/configSchema.ts +13 -2
  97. package/src/LinePlotRenderer/configSchema.ts +16 -2
  98. package/src/LinearWiggleDisplay/models/configSchema.ts +40 -2
  99. package/src/LinearWiggleDisplay/models/model.tsx +188 -8
  100. package/src/MultiDensityRenderer/configSchema.ts +13 -2
  101. package/src/MultiLineRenderer/configSchema.ts +18 -3
  102. package/src/MultiLinearWiggleDisplay/models/configSchema.ts +41 -1
  103. package/src/MultiQuantitativeTrack/configSchema.ts +23 -0
  104. package/src/MultiQuantitativeTrack/index.ts +3 -10
  105. package/src/MultiRowLineRenderer/configSchema.ts +19 -2
  106. package/src/MultiRowXYPlotRenderer/configSchema.ts +25 -2
  107. package/src/MultiWiggleAdapter/configSchema.ts +17 -1
  108. package/src/MultiXYPlotRenderer/configSchema.ts +25 -2
  109. package/src/QuantitativeTrack/configSchema.ts +23 -0
  110. package/src/QuantitativeTrack/index.ts +3 -10
  111. package/src/WiggleBaseRenderer.tsx +1 -1
  112. package/src/XYPlotRenderer/__snapshots__/XYPlotRenderer.test.js.snap +6 -0
  113. package/src/XYPlotRenderer/configSchema.ts +25 -2
  114. package/src/configSchema.ts +26 -1
  115. package/src/drawxy.ts +4 -4
@@ -3,6 +3,11 @@ import { baseLinearDisplayConfigSchema } from '@jbrowse/plugin-linear-genome-vie
3
3
  import { types } from 'mobx-state-tree'
4
4
  import PluginManager from '@jbrowse/core/PluginManager'
5
5
 
6
+ /**
7
+ * #config MultiLinearWiggleDisplay
8
+ */
9
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
10
+
6
11
  export default function WiggleConfigFactory(pluginManager: PluginManager) {
7
12
  const MultiXYPlotRendererConfigSchema = pluginManager.getRendererType(
8
13
  'MultiXYPlotRenderer',
@@ -22,6 +27,9 @@ export default function WiggleConfigFactory(pluginManager: PluginManager) {
22
27
  return ConfigurationSchema(
23
28
  'MultiLinearWiggleDisplay',
24
29
  {
30
+ /**
31
+ * #slot
32
+ */
25
33
  autoscale: {
26
34
  type: 'stringEnum',
27
35
  defaultValue: 'local',
@@ -35,40 +43,63 @@ export default function WiggleConfigFactory(pluginManager: PluginManager) {
35
43
  description:
36
44
  'global/local using their min/max values or w/ standard deviations (globalsd/localsd)',
37
45
  },
46
+
47
+ /**
48
+ * #slot
49
+ */
38
50
  minimalTicks: {
39
51
  type: 'boolean',
40
52
  defaultValue: false,
41
53
  description: 'use the minimal amount of ticks',
42
54
  },
43
55
 
56
+ /**
57
+ * #slot
58
+ */
44
59
  minScore: {
45
60
  type: 'number',
46
61
  defaultValue: Number.MIN_VALUE,
47
62
  description: 'minimum value for the y-scale',
48
63
  },
64
+ /**
65
+ * #slot
66
+ */
49
67
  maxScore: {
50
68
  type: 'number',
51
69
  description: 'maximum value for the y-scale',
52
70
  defaultValue: Number.MAX_VALUE,
53
71
  },
72
+ /**
73
+ * #slot
74
+ */
54
75
  numStdDev: {
55
76
  type: 'number',
56
77
  description:
57
78
  'number of standard deviations to use for autoscale types globalsd or localsd',
58
79
  defaultValue: 3,
59
80
  },
81
+ /**
82
+ * #slot
83
+ */
60
84
  scaleType: {
61
85
  type: 'stringEnum',
62
86
  model: types.enumeration('Scale type', ['linear', 'log']), // todo zscale
63
87
  description: 'The type of scale to use',
64
88
  defaultValue: 'linear',
65
89
  },
90
+
91
+ /**
92
+ * #slot
93
+ */
66
94
  inverted: {
67
95
  type: 'boolean',
68
96
  description: 'draw upside down',
69
97
  defaultValue: false,
70
98
  },
71
99
 
100
+ /**
101
+ * #slot
102
+ */
72
103
  defaultRendering: {
73
104
  type: 'stringEnum',
74
105
  model: types.enumeration('Rendering', [
@@ -81,6 +112,9 @@ export default function WiggleConfigFactory(pluginManager: PluginManager) {
81
112
  defaultValue: 'multirowxy',
82
113
  },
83
114
 
115
+ /**
116
+ * #slot
117
+ */
84
118
  renderers: ConfigurationSchema('RenderersConfiguration', {
85
119
  MultiXYPlotRenderer: MultiXYPlotRendererConfigSchema,
86
120
  MultiDensityRenderer: MultiDensityRendererConfigSchema,
@@ -89,6 +123,12 @@ export default function WiggleConfigFactory(pluginManager: PluginManager) {
89
123
  MultiRowLineRenderer: MultiRowLineRendererConfigSchema,
90
124
  }),
91
125
  },
92
- { baseConfiguration: baseLinearDisplayConfigSchema, explicitlyTyped: true },
126
+ {
127
+ /**
128
+ * #baseConfiguration
129
+ */
130
+ baseConfiguration: baseLinearDisplayConfigSchema,
131
+ explicitlyTyped: true,
132
+ },
93
133
  )
94
134
  }
@@ -0,0 +1,23 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
+ import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes/models'
3
+ import PluginManager from '@jbrowse/core/PluginManager'
4
+
5
+ /**
6
+ * #config MultiQuantitativeTrack
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
10
+ const configSchema = (pluginManager: PluginManager) => {
11
+ return ConfigurationSchema(
12
+ 'MultiQuantitativeTrack',
13
+ {},
14
+ {
15
+ /**
16
+ * #baseConfiguration
17
+ */
18
+ baseConfiguration: createBaseTrackConfig(pluginManager),
19
+ },
20
+ )
21
+ }
22
+
23
+ export default configSchema
@@ -1,18 +1,11 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
- import {
3
- createBaseTrackConfig,
4
- createBaseTrackModel,
5
- } from '@jbrowse/core/pluggableElementTypes/models'
1
+ import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
6
2
  import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType'
7
3
  import PluginManager from '@jbrowse/core/PluginManager'
4
+ import configSchemaF from './configSchema'
8
5
 
9
6
  export default (pluginManager: PluginManager) => {
10
7
  pluginManager.addTrackType(() => {
11
- const configSchema = ConfigurationSchema(
12
- 'MultiQuantitativeTrack',
13
- {},
14
- { baseConfiguration: createBaseTrackConfig(pluginManager) },
15
- )
8
+ const configSchema = configSchemaF(pluginManager)
16
9
  return new TrackType({
17
10
  name: 'MultiQuantitativeTrack',
18
11
  configSchema,
@@ -1,16 +1,27 @@
1
1
  import { types } from 'mobx-state-tree'
2
2
 
3
3
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
4
- import ConfigSchema from '../configSchema'
4
+ import baseWiggleRendererConfigSchema from '../configSchema'
5
+
6
+ /**
7
+ * #config MultiRowLineRenderer
8
+ */
9
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
5
10
 
6
11
  const configSchema = ConfigurationSchema(
7
12
  'MultiRowLineRenderer',
8
13
  {
14
+ /**
15
+ * #slot
16
+ */
9
17
  displayCrossHatches: {
10
18
  type: 'boolean',
11
19
  description: 'choose to draw cross hatches (sideways lines)',
12
20
  defaultValue: false,
13
21
  },
22
+ /**
23
+ * #slot
24
+ */
14
25
  summaryScoreMode: {
15
26
  type: 'stringEnum',
16
27
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -19,7 +30,13 @@ const configSchema = ConfigurationSchema(
19
30
  defaultValue: 'avg',
20
31
  },
21
32
  },
22
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
33
+ {
34
+ /**
35
+ * #baseConfiguration
36
+ */
37
+ baseConfiguration: baseWiggleRendererConfigSchema,
38
+ explicitlyTyped: true,
39
+ },
23
40
  )
24
41
 
25
42
  export default configSchema
@@ -1,20 +1,34 @@
1
1
  import { types } from 'mobx-state-tree'
2
2
 
3
3
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
4
- import ConfigSchema from '../configSchema'
4
+ import baseWiggleRendererConfigSchema from '../configSchema'
5
+
6
+ /**
7
+ * #config MultiRowXYPlotRenderer
8
+ */
9
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
5
10
 
6
11
  const configSchema = ConfigurationSchema(
7
12
  'MultiRowXYPlotRenderer',
8
13
  {
14
+ /**
15
+ * #slot
16
+ */
9
17
  filled: {
10
18
  type: 'boolean',
11
19
  defaultValue: true,
12
20
  },
21
+ /**
22
+ * #slot
23
+ */
13
24
  displayCrossHatches: {
14
25
  type: 'boolean',
15
26
  description: 'choose to draw cross hatches (sideways lines)',
16
27
  defaultValue: false,
17
28
  },
29
+ /**
30
+ * #slot
31
+ */
18
32
  summaryScoreMode: {
19
33
  type: 'stringEnum',
20
34
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -22,12 +36,21 @@ const configSchema = ConfigurationSchema(
22
36
  'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
23
37
  defaultValue: 'whiskers',
24
38
  },
39
+ /**
40
+ * #slot
41
+ */
25
42
  minSize: {
26
43
  type: 'number',
27
44
  defaultValue: 0,
28
45
  },
29
46
  },
30
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
47
+ {
48
+ /**
49
+ * #baseConfiguration
50
+ */
51
+ baseConfiguration: baseWiggleRendererConfigSchema,
52
+ explicitlyTyped: true,
53
+ },
31
54
  )
32
55
 
33
56
  export default configSchema
@@ -1,16 +1,32 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
 
3
- export default ConfigurationSchema(
3
+ /**
4
+ * #config MultiWiggleAdapter
5
+ */
6
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
7
+
8
+ const MultiWiggleAdapter = ConfigurationSchema(
4
9
  'MultiWiggleAdapter',
5
10
  {
11
+ /**
12
+ * #slot
13
+ */
6
14
  subadapters: {
7
15
  type: 'frozen',
8
16
  defaultValue: [],
17
+ description: 'array of subadapter JSON objects',
9
18
  },
19
+ /**
20
+ * #slot
21
+ */
10
22
  bigWigs: {
11
23
  type: 'frozen',
24
+ description:
25
+ 'array of bigwig filenames, alternative to the subadapters slot',
12
26
  defaultValue: [],
13
27
  },
14
28
  },
15
29
  { explicitlyTyped: true },
16
30
  )
31
+
32
+ export default MultiWiggleAdapter
@@ -1,19 +1,33 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
  import { types } from 'mobx-state-tree'
3
- import ConfigSchema from '../configSchema'
3
+ import baseWiggleRendererConfigSchema from '../configSchema'
4
+
5
+ /**
6
+ * #config MultiXYPlotRenderer
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
4
9
 
5
10
  const configSchema = ConfigurationSchema(
6
11
  'MultiXYPlotRenderer',
7
12
  {
13
+ /**
14
+ * #slot
15
+ */
8
16
  filled: {
9
17
  type: 'boolean',
10
18
  defaultValue: true,
11
19
  },
20
+ /**
21
+ * #slot
22
+ */
12
23
  displayCrossHatches: {
13
24
  type: 'boolean',
14
25
  description: 'choose to draw cross hatches (sideways lines)',
15
26
  defaultValue: false,
16
27
  },
28
+ /**
29
+ * #slot
30
+ */
17
31
  summaryScoreMode: {
18
32
  type: 'stringEnum',
19
33
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -21,11 +35,20 @@ const configSchema = ConfigurationSchema(
21
35
  'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
22
36
  defaultValue: 'avg',
23
37
  },
38
+ /**
39
+ * #slot
40
+ */
24
41
  minSize: {
25
42
  type: 'number',
26
43
  defaultValue: 0,
27
44
  },
28
45
  },
29
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
46
+ {
47
+ /**
48
+ * #baseConfiguration
49
+ */
50
+ baseConfiguration: baseWiggleRendererConfigSchema,
51
+ explicitlyTyped: true,
52
+ },
30
53
  )
31
54
  export default configSchema
@@ -0,0 +1,23 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
+ import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes/models'
3
+ import PluginManager from '@jbrowse/core/PluginManager'
4
+
5
+ /**
6
+ * #config QuantitativeTrack
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
10
+ function configSchemaFactory(pluginManager: PluginManager) {
11
+ return ConfigurationSchema(
12
+ 'QuantitativeTrack',
13
+ {},
14
+ {
15
+ /**
16
+ * #baseConfiguration
17
+ */
18
+ baseConfiguration: createBaseTrackConfig(pluginManager),
19
+ },
20
+ )
21
+ }
22
+
23
+ export default configSchemaFactory
@@ -1,18 +1,11 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
- import {
3
- createBaseTrackConfig,
4
- createBaseTrackModel,
5
- } from '@jbrowse/core/pluggableElementTypes/models'
1
+ import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
6
2
  import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType'
7
3
  import PluginManager from '@jbrowse/core/PluginManager'
4
+ import configSchemaF from './configSchema'
8
5
 
9
6
  export default (pluginManager: PluginManager) => {
10
7
  pluginManager.addTrackType(() => {
11
- const configSchema = ConfigurationSchema(
12
- 'QuantitativeTrack',
13
- {},
14
- { baseConfiguration: createBaseTrackConfig(pluginManager) },
15
- )
8
+ const configSchema = configSchemaF(pluginManager)
16
9
  return new TrackType({
17
10
  name: 'QuantitativeTrack',
18
11
  configSchema,
@@ -82,7 +82,7 @@ export default abstract class WiggleBaseRenderer extends FeatureRendererType {
82
82
  }
83
83
  }
84
84
 
85
- /*
85
+ /**
86
86
  * draw features to context given props, to be used by derived renderer
87
87
  * classes
88
88
  */
@@ -4,6 +4,12 @@ exports[`several features 1`] = `
4
4
  Object {
5
5
  "imageData": Any<Object>,
6
6
  "reducedFeatures": Array [
7
+ Object {
8
+ "end": 100,
9
+ "score": 1,
10
+ "start": 1,
11
+ "uniqueId": "t1",
12
+ },
7
13
  Object {
8
14
  "end": 200,
9
15
  "score": 2,
@@ -1,19 +1,33 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
- import ConfigSchema from '../configSchema'
2
+ import baseWiggleRendererConfigSchema from '../configSchema'
3
3
  import { types } from 'mobx-state-tree'
4
4
 
5
+ /**
6
+ * #config XYPlotRenderer
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
5
10
  const configSchema = ConfigurationSchema(
6
11
  'XYPlotRenderer',
7
12
  {
13
+ /**
14
+ * #slot
15
+ */
8
16
  filled: {
9
17
  type: 'boolean',
10
18
  defaultValue: true,
11
19
  },
20
+ /**
21
+ * #slot
22
+ */
12
23
  displayCrossHatches: {
13
24
  type: 'boolean',
14
25
  description: 'choose to draw cross hatches (sideways lines)',
15
26
  defaultValue: false,
16
27
  },
28
+ /**
29
+ * #slot
30
+ */
17
31
  summaryScoreMode: {
18
32
  type: 'stringEnum',
19
33
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -21,12 +35,21 @@ const configSchema = ConfigurationSchema(
21
35
  'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
22
36
  defaultValue: 'whiskers',
23
37
  },
38
+ /**
39
+ * #slot
40
+ */
24
41
  minSize: {
25
42
  type: 'number',
26
43
  defaultValue: 0,
27
44
  },
28
45
  },
29
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
46
+ {
47
+ /**
48
+ * #baseConfiguration
49
+ */
50
+ baseConfiguration: baseWiggleRendererConfigSchema,
51
+ explicitlyTyped: true,
52
+ },
30
53
  )
31
54
 
32
55
  export default configSchema
@@ -1,29 +1,50 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
  import { types } from 'mobx-state-tree'
3
3
 
4
- export default ConfigurationSchema(
4
+ /**
5
+ * #config WiggleRenderer
6
+ * this is the "base wiggle renderer config schema"
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
10
+ const WiggleRenderer = ConfigurationSchema(
5
11
  'WiggleRenderer',
6
12
  {
13
+ /**
14
+ * #slot
15
+ */
7
16
  color: {
8
17
  type: 'color',
9
18
  description: 'the color of track, overrides posColor and negColor',
10
19
  defaultValue: '#f0f',
11
20
  },
21
+ /**
22
+ * #slot
23
+ */
12
24
  posColor: {
13
25
  type: 'color',
14
26
  description: 'the color to use when the score is positive',
15
27
  defaultValue: 'blue',
16
28
  },
29
+ /**
30
+ * #slot
31
+ */
17
32
  negColor: {
18
33
  type: 'color',
19
34
  description: 'the color to use when the score is negative',
20
35
  defaultValue: 'red',
21
36
  },
37
+ /**
38
+ * #slot
39
+ */
22
40
  clipColor: {
23
41
  type: 'color',
24
42
  description: 'the color of the clipping marker',
25
43
  defaultValue: 'red',
26
44
  },
45
+ /**
46
+ * #slot
47
+ */
27
48
  bicolorPivot: {
28
49
  type: 'stringEnum',
29
50
  model: types.enumeration('Scale type', [
@@ -35,6 +56,9 @@ export default ConfigurationSchema(
35
56
  description: 'type of bicolor pivot',
36
57
  defaultValue: 'numeric',
37
58
  },
59
+ /**
60
+ * #slot
61
+ */
38
62
  bicolorPivotValue: {
39
63
  type: 'number',
40
64
  defaultValue: 0,
@@ -43,3 +67,4 @@ export default ConfigurationSchema(
43
67
  },
44
68
  { explicitlyTyped: true },
45
69
  )
70
+ export default WiggleRenderer
package/src/drawxy.ts CHANGED
@@ -83,7 +83,7 @@ export function drawXY(
83
83
  const getHeight = (n: number) => (filled ? toOrigin(n) : Math.max(minSize, 1))
84
84
  let hasClipping = false
85
85
 
86
- let prevLeftPx = 0
86
+ let prevLeftPx = -Infinity
87
87
  const reducedFeatures = []
88
88
  const crossingOrigin = niceMin < pivotValue && niceMax > pivotValue
89
89
 
@@ -96,7 +96,7 @@ export function drawXY(
96
96
  for (const feature of features.values()) {
97
97
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx)
98
98
  if (feature.get('summary')) {
99
- const w = rightPx - leftPx + fudgeFactor
99
+ const w = Math.max(rightPx - leftPx + fudgeFactor, minSize)
100
100
  const max = feature.get('maxScore')
101
101
  const c = colorCallback(feature, max)
102
102
  const effectiveC = crossingOrigin
@@ -255,7 +255,7 @@ export function drawLine(
255
255
 
256
256
  let lastVal
257
257
 
258
- let prevLeftPx = 0
258
+ let prevLeftPx = -Infinity
259
259
  const reducedFeatures = []
260
260
  for (const feature of features.values()) {
261
261
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx)
@@ -347,7 +347,7 @@ export function drawDensity(
347
347
  }
348
348
  const [niceMin, niceMax] = scale2.domain()
349
349
 
350
- let prevLeftPx = 0
350
+ let prevLeftPx = -Infinity
351
351
  let hasClipping = false
352
352
  const reducedFeatures = []
353
353
  for (const feature of features.values()) {