@jbrowse/plugin-alignments 2.18.0 → 3.0.1

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 (168) hide show
  1. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -2
  2. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +20 -13
  3. package/dist/AlignmentsFeatureDetail/Flags.d.ts +1 -2
  4. package/dist/AlignmentsFeatureDetail/Flags.js +6 -8
  5. package/dist/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
  6. package/dist/AlignmentsFeatureDetail/Formatter.js +11 -36
  7. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +1 -2
  8. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +44 -47
  9. package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +1 -2
  10. package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +27 -31
  11. package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +1 -2
  12. package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +2 -2
  13. package/dist/AlignmentsFeatureDetail/PairLink.d.ts +1 -2
  14. package/dist/AlignmentsFeatureDetail/PairLink.js +3 -6
  15. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +1 -2
  16. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +2 -4
  17. package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -2
  18. package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +21 -27
  19. package/dist/AlignmentsFeatureDetail/index.js +17 -7
  20. package/dist/BamAdapter/index.js +17 -7
  21. package/dist/CramAdapter/CramAdapter.js +7 -2
  22. package/dist/CramAdapter/CramTestAdapters.d.ts +1 -1
  23. package/dist/CramAdapter/CramTestAdapters.js +2 -1
  24. package/dist/CramAdapter/index.js +17 -7
  25. package/dist/GuessAlignmentsTypes/index.js +19 -34
  26. package/dist/HtsgetBamAdapter/index.js +17 -7
  27. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -2
  28. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +8 -16
  29. package/dist/LinearAlignmentsDisplay/model.d.ts +1 -2
  30. package/dist/LinearAlignmentsDisplay/model.js +5 -7
  31. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +21 -7
  32. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +40 -15
  33. package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
  34. package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +10 -39
  35. package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +1 -2
  36. package/dist/LinearPileupDisplay/components/GroupByDialog.js +82 -121
  37. package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +1 -2
  38. package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +2 -6
  39. package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
  40. package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +13 -42
  41. package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
  42. package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +10 -38
  43. package/dist/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
  44. package/dist/LinearPileupDisplay/components/SortByTagDialog.js +15 -44
  45. package/dist/LinearPileupDisplay/model.d.ts +21 -7
  46. package/dist/LinearPileupDisplay/model.js +19 -8
  47. package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -2
  48. package/dist/LinearReadArcsDisplay/components/ReactComponent.js +4 -27
  49. package/dist/LinearReadArcsDisplay/index.js +17 -7
  50. package/dist/LinearReadArcsDisplay/model.d.ts +1 -1
  51. package/dist/LinearReadArcsDisplay/model.js +17 -7
  52. package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -2
  53. package/dist/LinearReadCloudDisplay/components/ReactComponent.js +4 -27
  54. package/dist/LinearReadCloudDisplay/index.js +17 -7
  55. package/dist/LinearReadCloudDisplay/model.d.ts +1 -1
  56. package/dist/LinearReadCloudDisplay/model.js +17 -7
  57. package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -2
  58. package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +15 -54
  59. package/dist/LinearSNPCoverageDisplay/model.d.ts +4 -4
  60. package/dist/LinearSNPCoverageDisplay/model.js +49 -35
  61. package/dist/MismatchParser/cigarToMismatches.d.ts +1 -2
  62. package/dist/MismatchParser/index.d.ts +1 -2
  63. package/dist/MismatchParser/mdToMismatches.d.ts +1 -2
  64. package/dist/PileupRenderer/PileupRenderer.d.ts +4 -4
  65. package/dist/PileupRenderer/PileupRenderer.js +17 -7
  66. package/dist/PileupRenderer/components/PileupRendering.d.ts +1 -2
  67. package/dist/PileupRenderer/components/PileupRendering.js +15 -40
  68. package/dist/PileupRenderer/configSchema.d.ts +5 -0
  69. package/dist/PileupRenderer/configSchema.js +5 -0
  70. package/dist/PileupRenderer/makeImageData.js +2 -0
  71. package/dist/PileupRenderer/renderMismatches.d.ts +2 -1
  72. package/dist/PileupRenderer/renderMismatches.js +18 -13
  73. package/dist/SNPCoverageAdapter/index.js +17 -7
  74. package/dist/SNPCoverageAdapter/processModifications.js +1 -1
  75. package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +1 -18
  76. package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +35 -264
  77. package/dist/SNPCoverageRenderer/configSchema.d.ts +3 -3
  78. package/dist/SNPCoverageRenderer/configSchema.js +3 -3
  79. package/dist/SNPCoverageRenderer/makeImage.d.ts +2 -0
  80. package/dist/SNPCoverageRenderer/makeImage.js +270 -0
  81. package/dist/SNPCoverageRenderer/types.d.ts +19 -0
  82. package/dist/SNPCoverageRenderer/types.js +2 -0
  83. package/dist/index.js +17 -7
  84. package/dist/shared/components/BaseDisplayComponent.d.ts +1 -2
  85. package/dist/shared/components/BaseDisplayComponent.js +6 -13
  86. package/dist/shared/components/FilterByTagDialog.d.ts +1 -2
  87. package/dist/shared/components/FilterByTagDialog.js +42 -92
  88. package/dist/shared/renderSvgUtil.d.ts +1 -2
  89. package/dist/shared/renderSvgUtil.js +20 -17
  90. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -2
  91. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +3 -6
  92. package/esm/AlignmentsFeatureDetail/Flags.d.ts +1 -2
  93. package/esm/AlignmentsFeatureDetail/Flags.js +6 -8
  94. package/esm/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
  95. package/esm/AlignmentsFeatureDetail/Formatter.js +11 -13
  96. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +1 -2
  97. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +27 -40
  98. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +1 -2
  99. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +10 -24
  100. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +1 -2
  101. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +2 -2
  102. package/esm/AlignmentsFeatureDetail/PairLink.d.ts +1 -2
  103. package/esm/AlignmentsFeatureDetail/PairLink.js +3 -3
  104. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +1 -2
  105. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +2 -4
  106. package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -2
  107. package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +21 -24
  108. package/esm/CramAdapter/CramAdapter.js +7 -2
  109. package/esm/CramAdapter/CramTestAdapters.d.ts +1 -1
  110. package/esm/CramAdapter/CramTestAdapters.js +2 -1
  111. package/esm/GuessAlignmentsTypes/index.js +19 -34
  112. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -2
  113. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +8 -13
  114. package/esm/LinearAlignmentsDisplay/model.d.ts +1 -2
  115. package/esm/LinearAlignmentsDisplay/model.js +5 -7
  116. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +21 -7
  117. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +23 -8
  118. package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
  119. package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +10 -16
  120. package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +1 -2
  121. package/esm/LinearPileupDisplay/components/GroupByDialog.js +82 -98
  122. package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +1 -2
  123. package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +2 -3
  124. package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
  125. package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +13 -19
  126. package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
  127. package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +10 -15
  128. package/esm/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
  129. package/esm/LinearPileupDisplay/components/SortByTagDialog.js +15 -21
  130. package/esm/LinearPileupDisplay/model.d.ts +21 -7
  131. package/esm/LinearPileupDisplay/model.js +2 -1
  132. package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -2
  133. package/esm/LinearReadArcsDisplay/components/ReactComponent.js +4 -4
  134. package/esm/LinearReadArcsDisplay/model.d.ts +1 -1
  135. package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -2
  136. package/esm/LinearReadCloudDisplay/components/ReactComponent.js +4 -4
  137. package/esm/LinearReadCloudDisplay/model.d.ts +1 -1
  138. package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -2
  139. package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +15 -51
  140. package/esm/LinearSNPCoverageDisplay/model.d.ts +4 -4
  141. package/esm/LinearSNPCoverageDisplay/model.js +32 -28
  142. package/esm/MismatchParser/cigarToMismatches.d.ts +1 -2
  143. package/esm/MismatchParser/index.d.ts +1 -2
  144. package/esm/MismatchParser/mdToMismatches.d.ts +1 -2
  145. package/esm/PileupRenderer/PileupRenderer.d.ts +4 -4
  146. package/esm/PileupRenderer/components/PileupRendering.d.ts +1 -2
  147. package/esm/PileupRenderer/components/PileupRendering.js +15 -17
  148. package/esm/PileupRenderer/configSchema.d.ts +5 -0
  149. package/esm/PileupRenderer/configSchema.js +5 -0
  150. package/esm/PileupRenderer/makeImageData.js +2 -0
  151. package/esm/PileupRenderer/renderMismatches.d.ts +2 -1
  152. package/esm/PileupRenderer/renderMismatches.js +18 -13
  153. package/esm/SNPCoverageAdapter/processModifications.js +1 -1
  154. package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +1 -18
  155. package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +3 -265
  156. package/esm/SNPCoverageRenderer/configSchema.d.ts +3 -3
  157. package/esm/SNPCoverageRenderer/configSchema.js +3 -3
  158. package/esm/SNPCoverageRenderer/makeImage.d.ts +2 -0
  159. package/esm/SNPCoverageRenderer/makeImage.js +267 -0
  160. package/esm/SNPCoverageRenderer/types.d.ts +19 -0
  161. package/esm/SNPCoverageRenderer/types.js +1 -0
  162. package/esm/shared/components/BaseDisplayComponent.d.ts +1 -2
  163. package/esm/shared/components/BaseDisplayComponent.js +6 -10
  164. package/esm/shared/components/FilterByTagDialog.d.ts +1 -2
  165. package/esm/shared/components/FilterByTagDialog.js +42 -69
  166. package/esm/shared/renderSvgUtil.d.ts +1 -2
  167. package/esm/shared/renderSvgUtil.js +3 -7
  168. package/package.json +13 -13
@@ -9,8 +9,8 @@ export default class PileupRenderer extends BoxRendererType {
9
9
  getExpandedRegion(region: Region, renderArgs: RenderArgsDeserialized): {
10
10
  start: number;
11
11
  end: number;
12
- reversed?: boolean | undefined;
13
12
  refName: string;
13
+ reversed?: boolean | undefined;
14
14
  assemblyName: string;
15
15
  };
16
16
  render(renderProps: RenderArgsDeserialized): Promise<{
@@ -21,7 +21,7 @@ export default class PileupRenderer extends BoxRendererType {
21
21
  maxHeightReached: boolean;
22
22
  containsNoTransferables: boolean;
23
23
  canvasRecordedData: any;
24
- reactElement?: import("react").ReactElement;
24
+ reactElement?: React.ReactElement;
25
25
  html?: string;
26
26
  } | {
27
27
  features: Map<any, any>;
@@ -30,7 +30,7 @@ export default class PileupRenderer extends BoxRendererType {
30
30
  width: number;
31
31
  maxHeightReached: boolean;
32
32
  containsNoTransferables: boolean;
33
- reactElement: React.JSX.Element;
33
+ reactElement: import("react/jsx-runtime").JSX.Element;
34
34
  html?: string;
35
35
  } | {
36
36
  features: Map<any, any>;
@@ -40,7 +40,7 @@ export default class PileupRenderer extends BoxRendererType {
40
40
  maxHeightReached: boolean;
41
41
  containsNoTransferables: boolean;
42
42
  imageData: any;
43
- reactElement?: import("react").ReactElement;
43
+ reactElement?: React.ReactElement;
44
44
  html?: string;
45
45
  }>;
46
46
  createSession(args: PileupLayoutSessionProps): PileupLayoutSession;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { Region } from '@jbrowse/core/util/types';
3
2
  import type { BaseLinearDisplayModel } from '@jbrowse/plugin-linear-genome-view';
4
3
  declare const PileupRendering: (props: {
@@ -23,5 +22,5 @@ declare const PileupRendering: (props: {
23
22
  };
24
23
  };
25
24
  onMouseMove?: (event: React.MouseEvent, featureId?: string) => void;
26
- }) => React.JSX.Element;
25
+ }) => import("react/jsx-runtime").JSX.Element;
27
26
  export default PileupRendering;
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
- const react_1 = __importStar(require("react"));
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
27
5
  const ui_1 = require("@jbrowse/core/ui");
28
6
  const util_1 = require("@jbrowse/core/util");
29
7
  const mobx_react_1 = require("mobx-react");
@@ -116,7 +94,7 @@ const PileupRendering = (0, mobx_react_1.observer)(function (props) {
116
94
  }
117
95
  }
118
96
  const canvasWidth = Math.ceil(width);
119
- return (react_1.default.createElement("div", { ref: ref, "data-testid": [
97
+ return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-testid": [
120
98
  'pileup-overlay',
121
99
  sortedBy === null || sortedBy === void 0 ? void 0 : sortedBy.type,
122
100
  colorBy === null || colorBy === void 0 ? void 0 : colorBy.type,
@@ -142,20 +120,17 @@ const PileupRendering = (0, mobx_react_1.observer)(function (props) {
142
120
  onClick(event);
143
121
  }, onContextMenu: event => {
144
122
  onContextMenu(event);
145
- }, onFocus: () => { }, onBlur: () => { } },
146
- react_1.default.createElement(ui_1.PrerenderedCanvas, { ...props, style: { position: 'absolute', left: 0, top: 0 } }),
147
- firstRender && highlight ? (react_1.default.createElement("div", { style: {
148
- position: 'absolute',
149
- backgroundColor: '#0003',
150
- pointerEvents: 'none',
151
- ...highlight,
152
- } })) : null,
153
- firstRender && selected ? (react_1.default.createElement("div", { style: {
154
- position: 'absolute',
155
- border: '2px solid #00b8ff',
156
- boxSizing: 'content-box',
157
- pointerEvents: 'none',
158
- ...selected,
159
- } })) : null));
123
+ }, onFocus: () => { }, onBlur: () => { }, children: [(0, jsx_runtime_1.jsx)(ui_1.PrerenderedCanvas, { ...props, style: { position: 'absolute', left: 0, top: 0 } }), firstRender && highlight ? ((0, jsx_runtime_1.jsx)("div", { style: {
124
+ position: 'absolute',
125
+ backgroundColor: '#0003',
126
+ pointerEvents: 'none',
127
+ ...highlight,
128
+ } })) : null, firstRender && selected ? ((0, jsx_runtime_1.jsx)("div", { style: {
129
+ position: 'absolute',
130
+ border: '2px solid #00b8ff',
131
+ boxSizing: 'content-box',
132
+ pointerEvents: 'none',
133
+ ...selected,
134
+ } })) : null] }));
160
135
  });
161
136
  exports.default = PileupRendering;
@@ -22,6 +22,11 @@ declare const PileupRenderer: import("@jbrowse/core/configuration/configurationS
22
22
  description: string;
23
23
  defaultValue: number;
24
24
  };
25
+ hideSmallIndels: {
26
+ type: string;
27
+ description: string;
28
+ defaultValue: boolean;
29
+ };
25
30
  maxHeight: {
26
31
  type: string;
27
32
  description: string;
@@ -31,6 +31,11 @@ const PileupRenderer = (0, configuration_1.ConfigurationSchema)('PileupRenderer'
31
31
  description: 'the minimum width in px for a pileup mismatch feature. use for increasing/decreasing mismatch marker widths when zoomed out, e.g. 0 or 1',
32
32
  defaultValue: 1,
33
33
  },
34
+ hideSmallIndels: {
35
+ type: 'boolean',
36
+ description: 'Hides small indels, sometimes occurring in long read sequencing',
37
+ defaultValue: false,
38
+ },
34
39
  maxHeight: {
35
40
  type: 'integer',
36
41
  description: 'the maximum height to be used in a pileup rendering',
@@ -13,6 +13,7 @@ function makeImageData({ ctx, layoutRecords, canvasWidth, renderArgs, }) {
13
13
  const mismatchAlpha = (0, configuration_1.readConfObject)(config, 'mismatchAlpha');
14
14
  const minSubfeatureWidth = (0, configuration_1.readConfObject)(config, 'minSubfeatureWidth');
15
15
  const largeInsertionIndicatorScale = (0, configuration_1.readConfObject)(config, 'largeInsertionIndicatorScale');
16
+ const hideSmallIndels = (0, configuration_1.readConfObject)(config, 'hideSmallIndels');
16
17
  const defaultColor = (0, configuration_1.readConfObject)(config, 'color') === '#f0f';
17
18
  const theme = (0, ui_1.createJBrowseTheme)(configTheme);
18
19
  const colorForBase = (0, util_1.getColorBaseMap)(theme);
@@ -42,6 +43,7 @@ function makeImageData({ ctx, layoutRecords, canvasWidth, renderArgs, }) {
42
43
  ctx,
43
44
  feat,
44
45
  renderArgs,
46
+ hideSmallIndels,
45
47
  mismatchAlpha,
46
48
  drawSNPsMuted,
47
49
  drawIndels,
@@ -1,6 +1,6 @@
1
1
  import type { ProcessedRenderArgs } from './types';
2
2
  import type { LayoutFeature } from './util';
3
- export declare function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, canvasWidth, drawSNPsMuted, drawIndels, }: {
3
+ export declare function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, hideSmallIndels, canvasWidth, drawSNPsMuted, drawIndels, }: {
4
4
  ctx: CanvasRenderingContext2D;
5
5
  feat: LayoutFeature;
6
6
  renderArgs: ProcessedRenderArgs;
@@ -11,6 +11,7 @@ export declare function renderMismatches({ ctx, feat, renderArgs, minSubfeatureW
11
11
  drawSNPsMuted?: boolean;
12
12
  minSubfeatureWidth: number;
13
13
  largeInsertionIndicatorScale: number;
14
+ hideSmallIndels: boolean;
14
15
  charWidth: number;
15
16
  charHeight: number;
16
17
  canvasWidth: number;
@@ -4,7 +4,7 @@ exports.renderMismatches = renderMismatches;
4
4
  const util_1 = require("@jbrowse/core/util");
5
5
  const colord_1 = require("@jbrowse/core/util/colord");
6
6
  const util_2 = require("./util");
7
- function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, canvasWidth, drawSNPsMuted, drawIndels = true, }) {
7
+ function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, hideSmallIndels, canvasWidth, drawSNPsMuted, drawIndels = true, }) {
8
8
  const { bpPerPx, regions } = renderArgs;
9
9
  const { heightPx, topPx, feature } = feat;
10
10
  const region = regions[0];
@@ -46,12 +46,15 @@ function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInse
46
46
  }
47
47
  }
48
48
  else if (mismatch.type === 'deletion' && drawIndels) {
49
- (0, util_2.fillRect)(ctx, leftPx, topPx, Math.abs(leftPx - rightPx), heightPx, canvasWidth, colorForBase.deletion);
50
- const txt = `${mismatch.length}`;
51
- const rwidth = (0, util_1.measureText)(txt, 10);
52
- if (widthPx >= rwidth && heightPx >= heightLim) {
53
- ctx.fillStyle = contrastForBase.deletion;
54
- ctx.fillText(txt, (leftPx + rightPx) / 2 - rwidth / 2, topPx + heightPx);
49
+ const len = mismatch.length;
50
+ if (!hideSmallIndels || len >= 10) {
51
+ (0, util_2.fillRect)(ctx, leftPx, topPx, Math.abs(leftPx - rightPx), heightPx, canvasWidth, colorForBase.deletion);
52
+ const txt = `${mismatch.length}`;
53
+ const rwidth = (0, util_1.measureText)(txt, 10);
54
+ if (widthPx >= rwidth && heightPx >= heightLim) {
55
+ ctx.fillStyle = contrastForBase.deletion;
56
+ ctx.fillText(txt, (leftPx + rightPx) / 2 - rwidth / 2, topPx + heightPx);
57
+ }
55
58
  }
56
59
  }
57
60
  else if (mismatch.type === 'insertion' && drawIndels) {
@@ -59,12 +62,14 @@ function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInse
59
62
  const len = +mismatch.base || mismatch.length;
60
63
  const insW = Math.max(0, Math.min(1.2, 1 / bpPerPx));
61
64
  if (len < 10) {
62
- (0, util_2.fillRect)(ctx, pos, topPx, insW, heightPx, canvasWidth, 'purple');
63
- if (1 / bpPerPx >= charWidth && heightPx >= heightLim) {
64
- const l = pos - insW;
65
- (0, util_2.fillRect)(ctx, l, topPx, insW * 3, 1, canvasWidth);
66
- (0, util_2.fillRect)(ctx, l, topPx + heightPx - 1, insW * 3, 1, canvasWidth);
67
- ctx.fillText(`(${mismatch.base})`, pos + 3, topPx + heightPx);
65
+ if (!hideSmallIndels) {
66
+ (0, util_2.fillRect)(ctx, pos, topPx, insW, heightPx, canvasWidth, 'purple');
67
+ if (1 / bpPerPx >= charWidth && heightPx >= heightLim) {
68
+ const l = Math.round(pos - insW);
69
+ (0, util_2.fillRect)(ctx, l, topPx, insW * 3, 1, canvasWidth);
70
+ (0, util_2.fillRect)(ctx, l, topPx + heightPx - 1, insW * 3, 1, canvasWidth);
71
+ ctx.fillText(`(${mismatch.base})`, pos + 3, topPx + heightPx);
72
+ }
68
73
  }
69
74
  }
70
75
  }
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -21,7 +21,6 @@ function processModifications({ feature, colorBy, region, bins, regionSequence,
21
21
  bins[epos] = {
22
22
  depth: 0,
23
23
  readsCounted: 0,
24
- refbase: regionSequence[epos],
25
24
  snps: {},
26
25
  ref: {
27
26
  probabilities: [],
@@ -38,6 +37,7 @@ function processModifications({ feature, colorBy, region, bins, regionSequence,
38
37
  }
39
38
  const s = 1 - (0, util_1.sum)(allProbs);
40
39
  const bin = bins[epos];
40
+ bin.refbase = regionSequence[epos];
41
41
  if (twoColor && s > (0, util_1.max)(allProbs)) {
42
42
  (0, util_2.incWithProbabilities)(bin, fstrand, 'nonmods', `nonmod_${type}`, s);
43
43
  }
@@ -1,22 +1,5 @@
1
1
  import { WiggleBaseRenderer } from '@jbrowse/plugin-wiggle';
2
- import type { ModificationTypeWithColor } from '../shared/types';
3
- import type { RenderArgsDeserialized as FeatureRenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType';
4
- import type { Feature } from '@jbrowse/core/util';
5
- import type { ScaleOpts } from '@jbrowse/plugin-wiggle';
6
- export interface RenderArgsDeserialized extends FeatureRenderArgsDeserialized {
7
- bpPerPx: number;
8
- height: number;
9
- highResolutionScaling: number;
10
- scaleOpts: ScaleOpts;
11
- }
12
- export interface RenderArgsDeserializedWithFeatures extends RenderArgsDeserialized {
13
- features: Map<string, Feature>;
14
- ticks: {
15
- values: number[];
16
- };
17
- displayCrossHatches: boolean;
18
- visibleModifications?: Record<string, ModificationTypeWithColor>;
19
- }
2
+ import type { RenderArgsDeserializedWithFeatures } from './types';
20
3
  export default class SNPCoverageRenderer extends WiggleBaseRenderer {
21
4
  draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<undefined>;
22
5
  }
@@ -1,272 +1,43 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const configuration_1 = require("@jbrowse/core/configuration");
4
- const ui_1 = require("@jbrowse/core/ui");
5
- const util_1 = require("@jbrowse/core/util");
6
- const stopToken_1 = require("@jbrowse/core/util/stopToken");
7
36
  const plugin_wiggle_1 = require("@jbrowse/plugin-wiggle");
8
- const util_2 = require("../shared/util");
9
- const INTERBASE_INDICATOR_WIDTH = 7;
10
- const INTERBASE_INDICATOR_HEIGHT = 4.5;
11
- const MINIMUM_INTERBASE_INDICATOR_READ_DEPTH = 7;
12
- const complementBase = {
13
- C: 'G',
14
- G: 'C',
15
- A: 'T',
16
- T: 'A',
17
- };
18
- const fudgeFactor = 0.6;
19
37
  class SNPCoverageRenderer extends plugin_wiggle_1.WiggleBaseRenderer {
20
38
  async draw(ctx, props) {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
22
- const { features, regions, bpPerPx, colorBy, displayCrossHatches, visibleModifications = {}, scaleOpts, height: unadjustedHeight, theme: configTheme, config: cfg, ticks, stopToken, } = props;
23
- const theme = (0, ui_1.createJBrowseTheme)(configTheme);
24
- const region = regions[0];
25
- const width = (region.end - region.start) / bpPerPx;
26
- const offset = plugin_wiggle_1.YSCALEBAR_LABEL_OFFSET;
27
- const height = unadjustedHeight - offset * 2;
28
- const opts = { ...scaleOpts, range: [0, height] };
29
- const viewScale = (0, plugin_wiggle_1.getScale)(opts);
30
- const indicatorViewScale = (0, plugin_wiggle_1.getScale)({
31
- ...opts,
32
- range: [0, height / 2],
33
- scaleType: 'linear',
34
- });
35
- const originY = (0, plugin_wiggle_1.getOrigin)(scaleOpts.scaleType);
36
- const originLinear = (0, plugin_wiggle_1.getOrigin)('linear');
37
- const indicatorThreshold = (0, configuration_1.readConfObject)(cfg, 'indicatorThreshold');
38
- const drawInterbaseCounts = (0, configuration_1.readConfObject)(cfg, 'drawInterbaseCounts');
39
- const drawArcs = (0, configuration_1.readConfObject)(cfg, 'drawArcs');
40
- const drawIndicators = (0, configuration_1.readConfObject)(cfg, 'drawIndicators');
41
- const toY = (n) => height - (viewScale(n) || 0) + offset;
42
- const toHeight = (n) => toY(originY) - toY(n);
43
- const toY2 = (n) => height - (indicatorViewScale(n) || 0) + offset;
44
- const toHeight2 = (n) => toY2(originLinear) - toY2(n);
45
- const { bases } = theme.palette;
46
- const colorForBase = {
47
- A: bases.A.main,
48
- C: bases.C.main,
49
- G: bases.G.main,
50
- T: bases.T.main,
51
- insertion: 'purple',
52
- softclip: 'blue',
53
- hardclip: 'red',
54
- total: (0, configuration_1.readConfObject)(cfg, 'color'),
55
- mod_NONE: 'blue',
56
- cpg_meth: 'red',
57
- cpg_unmeth: 'blue',
58
- };
59
- const feats = [...features.values()];
60
- ctx.fillStyle = colorForBase.total;
61
- let start = performance.now();
62
- for (const feature of feats) {
63
- if (feature.get('type') === 'skip') {
64
- continue;
65
- }
66
- const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
67
- const w = rightPx - leftPx + fudgeFactor;
68
- const score = feature.get('score');
69
- ctx.fillRect(leftPx, toY(score), w, toHeight(score));
70
- if (performance.now() - start > 400) {
71
- (0, stopToken_1.checkStopToken)(stopToken);
72
- start = performance.now();
73
- }
74
- }
75
- let prevTotal = 0;
76
- const extraHorizontallyFlippedOffset = region.reversed ? 1 / bpPerPx : 0;
77
- const drawingModifications = (colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications';
78
- const drawingMethylation = (colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'methylation';
79
- const isolatedModification = (_a = colorBy === null || colorBy === void 0 ? void 0 : colorBy.modifications) === null || _a === void 0 ? void 0 : _a.isolatedModification;
80
- start = performance.now();
81
- for (const feature of feats) {
82
- const now = performance.now();
83
- if (now - start > 400) {
84
- (0, stopToken_1.checkStopToken)(stopToken);
85
- }
86
- if (feature.get('type') === 'skip') {
87
- continue;
88
- }
89
- const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
90
- const snpinfo = feature.get('snpinfo');
91
- const w = Math.max(rightPx - leftPx, 1);
92
- const score0 = feature.get('score');
93
- if (drawingModifications) {
94
- let curr = 0;
95
- const refbase = (_b = snpinfo.refbase) === null || _b === void 0 ? void 0 : _b.toUpperCase();
96
- const { nonmods, mods, snps, ref } = snpinfo;
97
- for (const m of Object.keys(nonmods).sort().reverse()) {
98
- const mod = visibleModifications[m.replace('nonmod_', '')] ||
99
- visibleModifications[m.replace('mod_', '')];
100
- if (!mod) {
101
- console.warn(`${m} not known yet`);
102
- continue;
103
- }
104
- if (isolatedModification && mod.type !== isolatedModification) {
105
- continue;
106
- }
107
- const cmp = complementBase[mod.base];
108
- const detectable = mod.base === 'N'
109
- ? score0
110
- : (((_c = snps[mod.base]) === null || _c === void 0 ? void 0 : _c.entryDepth) || 0) +
111
- (((_d = snps[cmp]) === null || _d === void 0 ? void 0 : _d.entryDepth) || 0) +
112
- (refbase === mod.base ? ref['1'] : 0) +
113
- (refbase === cmp ? ref['-1'] : 0);
114
- const modifiable = mod.base === 'N'
115
- ? score0
116
- : (((_e = snps[mod.base]) === null || _e === void 0 ? void 0 : _e.entryDepth) || 0) +
117
- (((_f = snps[cmp]) === null || _f === void 0 ? void 0 : _f.entryDepth) || 0) +
118
- (refbase === mod.base ? ref.entryDepth : 0) +
119
- (refbase === cmp ? ref.entryDepth : 0);
120
- const { entryDepth, avgProbability = 0 } = snpinfo.nonmods[m];
121
- const modFraction = (modifiable / score0) * (entryDepth / detectable);
122
- const nonModColor = 'blue';
123
- const c = (0, util_2.alphaColor)(nonModColor, avgProbability);
124
- const height = toHeight(score0);
125
- const bottom = toY(score0) + height;
126
- ctx.fillStyle = c;
127
- ctx.fillRect(Math.round(leftPx), bottom - (curr + modFraction * height), w, modFraction * height);
128
- curr += modFraction * height;
129
- }
130
- for (const m of Object.keys(mods).sort().reverse()) {
131
- const mod = visibleModifications[m.replace('mod_', '')];
132
- if (!mod) {
133
- console.warn(`${m} not known yet`);
134
- continue;
135
- }
136
- if (isolatedModification && mod.type !== isolatedModification) {
137
- continue;
138
- }
139
- const cmp = complementBase[mod.base];
140
- const detectable = mod.base === 'N'
141
- ? score0
142
- : (((_g = snps[mod.base]) === null || _g === void 0 ? void 0 : _g.entryDepth) || 0) +
143
- (((_h = snps[cmp]) === null || _h === void 0 ? void 0 : _h.entryDepth) || 0) +
144
- (refbase === mod.base ? ref['1'] : 0) +
145
- (refbase === cmp ? ref['-1'] : 0);
146
- const modifiable = mod.base === 'N'
147
- ? score0
148
- : (((_j = snps[mod.base]) === null || _j === void 0 ? void 0 : _j.entryDepth) || 0) +
149
- (((_k = snps[cmp]) === null || _k === void 0 ? void 0 : _k.entryDepth) || 0) +
150
- (refbase === mod.base ? ref.entryDepth : 0) +
151
- (refbase === cmp ? ref.entryDepth : 0);
152
- const { entryDepth, avgProbability = 0 } = mods[m];
153
- const modFraction = (modifiable / score0) * (entryDepth / detectable);
154
- const baseColor = mod.color || 'black';
155
- const c = (0, util_2.alphaColor)(baseColor, avgProbability);
156
- const height = toHeight(score0);
157
- const bottom = toY(score0) + height;
158
- ctx.fillStyle = c;
159
- ctx.fillRect(Math.round(leftPx), bottom - (curr + modFraction * height), w, modFraction * height);
160
- curr += modFraction * height;
161
- }
162
- }
163
- else if (drawingMethylation) {
164
- const { depth, nonmods, mods } = snpinfo;
165
- let curr = 0;
166
- for (const base of Object.keys(mods).sort().reverse()) {
167
- const { entryDepth } = mods[base];
168
- const height = toHeight(score0);
169
- const bottom = toY(score0) + height;
170
- ctx.fillStyle = colorForBase[base] || 'black';
171
- ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
172
- curr += entryDepth;
173
- }
174
- for (const base of Object.keys(nonmods).sort().reverse()) {
175
- const { entryDepth } = nonmods[base];
176
- const height = toHeight(score0);
177
- const bottom = toY(score0) + height;
178
- ctx.fillStyle = colorForBase[base] || 'black';
179
- ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
180
- curr += entryDepth;
181
- }
182
- }
183
- else {
184
- const { depth, snps } = snpinfo;
185
- let curr = 0;
186
- for (const base of Object.keys(snps).sort().reverse()) {
187
- const { entryDepth } = snps[base];
188
- const height = toHeight(score0);
189
- const bottom = toY(score0) + height;
190
- ctx.fillStyle = colorForBase[base] || 'black';
191
- ctx.fillRect(Math.round(leftPx), bottom - ((entryDepth + curr) / depth) * height, w, (entryDepth / depth) * height);
192
- curr += entryDepth;
193
- }
194
- }
195
- const interbaseEvents = Object.keys(snpinfo.noncov);
196
- if (drawInterbaseCounts) {
197
- let curr = 0;
198
- for (const base of interbaseEvents) {
199
- const { entryDepth } = snpinfo.noncov[base];
200
- const r = 0.6;
201
- ctx.fillStyle = colorForBase[base];
202
- ctx.fillRect(leftPx - r + extraHorizontallyFlippedOffset, INTERBASE_INDICATOR_HEIGHT + toHeight2(curr), r * 2, toHeight2(entryDepth));
203
- curr += entryDepth;
204
- }
205
- }
206
- if (drawIndicators) {
207
- let accum = 0;
208
- let max = 0;
209
- let maxBase = '';
210
- for (const base of interbaseEvents) {
211
- const { entryDepth } = snpinfo.noncov[base];
212
- accum += entryDepth;
213
- if (entryDepth > max) {
214
- max = entryDepth;
215
- maxBase = base;
216
- }
217
- }
218
- const indicatorComparatorScore = Math.max(score0, prevTotal);
219
- if (accum > indicatorComparatorScore * indicatorThreshold &&
220
- indicatorComparatorScore > MINIMUM_INTERBASE_INDICATOR_READ_DEPTH) {
221
- ctx.fillStyle = colorForBase[maxBase];
222
- ctx.beginPath();
223
- const l = leftPx + extraHorizontallyFlippedOffset;
224
- ctx.moveTo(l - INTERBASE_INDICATOR_WIDTH / 2, 0);
225
- ctx.lineTo(l + INTERBASE_INDICATOR_WIDTH / 2, 0);
226
- ctx.lineTo(l, INTERBASE_INDICATOR_HEIGHT);
227
- ctx.fill();
228
- }
229
- }
230
- prevTotal = score0;
231
- }
232
- if (drawArcs) {
233
- for (const f of feats) {
234
- if (f.get('type') !== 'skip') {
235
- continue;
236
- }
237
- const s = f.get('start');
238
- const e = f.get('end');
239
- const [left, right] = (0, util_1.bpSpanPx)(s, e, region, bpPerPx);
240
- ctx.beginPath();
241
- const effectiveStrand = f.get('effectiveStrand');
242
- const pos = 'rgba(255,200,200,0.7)';
243
- const neg = 'rgba(200,200,255,0.7)';
244
- const neutral = 'rgba(200,200,200,0.7)';
245
- if (effectiveStrand === 1) {
246
- ctx.strokeStyle = pos;
247
- }
248
- else if (effectiveStrand === -1) {
249
- ctx.strokeStyle = neg;
250
- }
251
- else {
252
- ctx.strokeStyle = neutral;
253
- }
254
- ctx.lineWidth = Math.log(f.get('score') + 1);
255
- ctx.moveTo(left, height - offset * 2);
256
- ctx.bezierCurveTo(left, 0, right, 0, right, height - offset * 2);
257
- ctx.stroke();
258
- }
259
- }
260
- if (displayCrossHatches) {
261
- ctx.lineWidth = 1;
262
- ctx.strokeStyle = 'rgba(140,140,140,0.8)';
263
- for (const tick of ticks.values) {
264
- ctx.beginPath();
265
- ctx.moveTo(0, Math.round(toY(tick)));
266
- ctx.lineTo(width, Math.round(toY(tick)));
267
- ctx.stroke();
268
- }
269
- }
39
+ const { makeImage } = await Promise.resolve().then(() => __importStar(require('./makeImage')));
40
+ await makeImage(ctx, props);
270
41
  return undefined;
271
42
  }
272
43
  }