@jbrowse/plugin-gccontent 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.
@@ -61,13 +61,11 @@ class GCContentAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
61
61
  }
62
62
  }
63
63
  const pos = queryStart;
64
- let score;
65
- if (this.gcMode === 'content') {
66
- score = (ng + nc) / (len || 1);
67
- }
68
- else if (this.gcMode === 'skew') {
69
- score = (ng - nc) / (ng + nc || 1);
70
- }
64
+ const score = this.gcMode === 'content'
65
+ ? (ng + nc) / (len || 1)
66
+ : this.gcMode === 'skew'
67
+ ? (ng - nc) / (ng + nc || 1)
68
+ : 0;
71
69
  observer.next(new util_1.SimpleFeature({
72
70
  uniqueId: `${this.id}_${pos + i}`,
73
71
  refName: query.refName,
@@ -34,8 +34,12 @@ const EditGCContentParamsDialog = (0, mobx_react_1.observer)(function ({ model,
34
34
  react_1.default.createElement(material_1.DialogContent, null,
35
35
  react_1.default.createElement(material_1.Typography, null, "GC content is calculated in a particular sliding window of size N, and then the sliding window moves (steps) some number of bases M forward. Note that small step sizes can result in high CPU over large areas, and it is not recommended to make the step size larger than the window size as then the sliding window will miss contents."),
36
36
  windowDelta > windowSize ? (react_1.default.createElement(ui_1.ErrorMessage, { error: "It is not recommended to make the step size larger than the window size" })) : null,
37
- react_1.default.createElement(material_1.TextField, { label: "Size of sliding window (bp)", value: `${windowSize}`, onChange: event => setWindowSize(event.target.value) }),
38
- react_1.default.createElement(material_1.TextField, { label: "Step size of sliding window (bp)", value: `${windowDelta}`, onChange: event => setWindowDelta(event.target.value) }),
37
+ react_1.default.createElement(material_1.TextField, { label: "Size of sliding window (bp)", value: windowSize, onChange: event => {
38
+ setWindowSize(event.target.value);
39
+ } }),
40
+ react_1.default.createElement(material_1.TextField, { label: "Step size of sliding window (bp)", value: windowDelta, onChange: event => {
41
+ setWindowDelta(event.target.value);
42
+ } }),
39
43
  react_1.default.createElement(material_1.DialogActions, null,
40
44
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => {
41
45
  model.setGCContentParams({
@@ -44,6 +48,8 @@ const EditGCContentParamsDialog = (0, mobx_react_1.observer)(function ({ model,
44
48
  });
45
49
  handleClose();
46
50
  } }, "Submit"),
47
- react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => handleClose() }, "Cancel")))));
51
+ react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
52
+ handleClose();
53
+ } }, "Cancel")))));
48
54
  });
49
55
  exports.default = EditGCContentParamsDialog;
@@ -151,7 +151,7 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
151
151
  error: unknown;
152
152
  message: string | undefined;
153
153
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
154
- onHorizontalScroll?: Function;
154
+ onHorizontalScroll?: () => void;
155
155
  blockState?: Record<string, any>;
156
156
  }>;
157
157
  readonly DisplayBlurb: import("react").FC<{
@@ -144,7 +144,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
144
144
  error: unknown;
145
145
  message: string | undefined;
146
146
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
147
- onHorizontalScroll?: Function;
147
+ onHorizontalScroll?: () => void;
148
148
  blockState?: Record<string, any>;
149
149
  }>;
150
150
  readonly DisplayBlurb: import("react").FC<{
@@ -149,7 +149,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
149
149
  error: unknown;
150
150
  message: string | undefined;
151
151
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
152
- onHorizontalScroll?: Function;
152
+ onHorizontalScroll?: () => void;
153
153
  blockState?: Record<string, any>;
154
154
  }>;
155
155
  readonly DisplayBlurb: import("react").FC<{
@@ -59,13 +59,11 @@ class GCContentAdapter extends BaseFeatureDataAdapter {
59
59
  }
60
60
  }
61
61
  const pos = queryStart;
62
- let score;
63
- if (this.gcMode === 'content') {
64
- score = (ng + nc) / (len || 1);
65
- }
66
- else if (this.gcMode === 'skew') {
67
- score = (ng - nc) / (ng + nc || 1);
68
- }
62
+ const score = this.gcMode === 'content'
63
+ ? (ng + nc) / (len || 1)
64
+ : this.gcMode === 'skew'
65
+ ? (ng - nc) / (ng + nc || 1)
66
+ : 0;
69
67
  observer.next(new SimpleFeature({
70
68
  uniqueId: `${this.id}_${pos + i}`,
71
69
  refName: query.refName,
@@ -9,8 +9,12 @@ const EditGCContentParamsDialog = observer(function ({ model, handleClose, }) {
9
9
  React.createElement(DialogContent, null,
10
10
  React.createElement(Typography, null, "GC content is calculated in a particular sliding window of size N, and then the sliding window moves (steps) some number of bases M forward. Note that small step sizes can result in high CPU over large areas, and it is not recommended to make the step size larger than the window size as then the sliding window will miss contents."),
11
11
  windowDelta > windowSize ? (React.createElement(ErrorMessage, { error: "It is not recommended to make the step size larger than the window size" })) : null,
12
- React.createElement(TextField, { label: "Size of sliding window (bp)", value: `${windowSize}`, onChange: event => setWindowSize(event.target.value) }),
13
- React.createElement(TextField, { label: "Step size of sliding window (bp)", value: `${windowDelta}`, onChange: event => setWindowDelta(event.target.value) }),
12
+ React.createElement(TextField, { label: "Size of sliding window (bp)", value: windowSize, onChange: event => {
13
+ setWindowSize(event.target.value);
14
+ } }),
15
+ React.createElement(TextField, { label: "Step size of sliding window (bp)", value: windowDelta, onChange: event => {
16
+ setWindowDelta(event.target.value);
17
+ } }),
14
18
  React.createElement(DialogActions, null,
15
19
  React.createElement(Button, { variant: "contained", onClick: () => {
16
20
  model.setGCContentParams({
@@ -19,6 +23,8 @@ const EditGCContentParamsDialog = observer(function ({ model, handleClose, }) {
19
23
  });
20
24
  handleClose();
21
25
  } }, "Submit"),
22
- React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => handleClose() }, "Cancel")))));
26
+ React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
27
+ handleClose();
28
+ } }, "Cancel")))));
23
29
  });
24
30
  export default EditGCContentParamsDialog;
@@ -151,7 +151,7 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
151
151
  error: unknown;
152
152
  message: string | undefined;
153
153
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
154
- onHorizontalScroll?: Function;
154
+ onHorizontalScroll?: () => void;
155
155
  blockState?: Record<string, any>;
156
156
  }>;
157
157
  readonly DisplayBlurb: import("react").FC<{
@@ -144,7 +144,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
144
144
  error: unknown;
145
145
  message: string | undefined;
146
146
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
147
- onHorizontalScroll?: Function;
147
+ onHorizontalScroll?: () => void;
148
148
  blockState?: Record<string, any>;
149
149
  }>;
150
150
  readonly DisplayBlurb: import("react").FC<{
@@ -149,7 +149,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
149
149
  error: unknown;
150
150
  message: string | undefined;
151
151
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
152
- onHorizontalScroll?: Function;
152
+ onHorizontalScroll?: () => void;
153
153
  blockState?: Record<string, any>;
154
154
  }>;
155
155
  readonly DisplayBlurb: import("react").FC<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-gccontent",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "JBrowse 2 gccontent concepts",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -53,5 +53,5 @@
53
53
  "distModule": "esm/index.js",
54
54
  "srcModule": "src/index.ts",
55
55
  "module": "esm/index.js",
56
- "gitHead": "efe02fb9616e20e929cceeed46eb96420c1b6923"
56
+ "gitHead": "9fb8231d932db40adf0a283081765431756c66ff"
57
57
  }