@jbrowse/plugin-alignments 3.6.5 → 3.7.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 (241) hide show
  1. package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +4 -4
  2. package/dist/CramAdapter/CramAdapter.js +1 -1
  3. package/dist/CramAdapter/CramSlightlyLazyFeature.js +8 -7
  4. package/dist/CramAdapter/{util.js → readFeaturesToCIGAR.js} +4 -5
  5. package/dist/CramAdapter/readFeaturesToMismatches.d.ts +5 -0
  6. package/dist/CramAdapter/readFeaturesToMismatches.js +106 -0
  7. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +6 -2
  8. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +17 -2
  9. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +2 -2
  10. package/dist/LinearPileupDisplay/components/GroupByDialog.js +4 -4
  11. package/dist/LinearPileupDisplay/components/SetModificationThresholdDialog.d.ts +10 -0
  12. package/dist/LinearPileupDisplay/components/SetModificationThresholdDialog.js +39 -0
  13. package/dist/LinearPileupDisplay/doAfterAttach.d.ts +1 -0
  14. package/dist/LinearPileupDisplay/doAfterAttach.js +3 -2
  15. package/dist/LinearPileupDisplay/model.d.ts +20 -2
  16. package/dist/LinearPileupDisplay/model.js +39 -4
  17. package/dist/LinearReadArcsDisplay/index.js +1 -1
  18. package/dist/LinearReadArcsDisplay/model.d.ts +23 -30
  19. package/dist/LinearReadArcsDisplay/model.js +5 -86
  20. package/dist/LinearReadCloudDisplay/components/ReactComponent.js +84 -2
  21. package/dist/LinearReadCloudDisplay/components/SetFeatureHeightDialog.d.ts +10 -0
  22. package/dist/LinearReadCloudDisplay/components/SetFeatureHeightDialog.js +26 -0
  23. package/dist/LinearReadCloudDisplay/configSchema.d.ts +7 -0
  24. package/dist/LinearReadCloudDisplay/configSchema.js +5 -0
  25. package/dist/LinearReadCloudDisplay/drawFeatsAbstract.js +13 -0
  26. package/dist/LinearReadCloudDisplay/drawFeatsCloud.js +24 -0
  27. package/dist/LinearReadCloudDisplay/drawFeatsCommon.d.ts +23 -0
  28. package/dist/LinearReadCloudDisplay/drawFeatsCommon.js +198 -0
  29. package/dist/LinearReadCloudDisplay/drawFeatsStack.d.ts +2 -0
  30. package/dist/LinearReadCloudDisplay/drawFeatsStack.js +36 -0
  31. package/dist/LinearReadCloudDisplay/index.js +1 -1
  32. package/dist/LinearReadCloudDisplay/model.d.ts +51 -31
  33. package/dist/LinearReadCloudDisplay/model.js +93 -78
  34. package/dist/LinearSNPCoverageDisplay/components/TooltipContents.d.ts +3 -0
  35. package/dist/LinearSNPCoverageDisplay/components/TooltipContents.js +148 -19
  36. package/dist/LinearSNPCoverageDisplay/model.js +14 -3
  37. package/dist/MismatchParser/cigarToMismatches.js +1 -0
  38. package/dist/ModificationParser/detectSimplexModifications.d.ts +4 -0
  39. package/dist/ModificationParser/detectSimplexModifications.js +20 -0
  40. package/dist/ModificationParser/getModPositions.d.ts +1 -1
  41. package/dist/ModificationParser/getModPositions.js +13 -16
  42. package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +4 -1
  43. package/dist/PileupRPC/methods/GetVisibleModifications.js +16 -3
  44. package/dist/PileupRenderer/PileupRenderer.d.ts +6 -1
  45. package/dist/PileupRenderer/PileupRenderer.js +11 -14
  46. package/dist/PileupRenderer/components/PileupRendering.d.ts +8 -15
  47. package/dist/PileupRenderer/components/PileupRendering.js +18 -2
  48. package/dist/PileupRenderer/makeImageData.d.ts +5 -2
  49. package/dist/PileupRenderer/makeImageData.js +37 -6
  50. package/dist/PileupRenderer/{getAlignmentShapeColor.js → renderers/getAlignmentShapeColor.js} +2 -2
  51. package/{esm/PileupRenderer → dist/PileupRenderer/renderers}/renderAlignment.d.ts +6 -3
  52. package/dist/PileupRenderer/{renderAlignment.js → renderers/renderAlignment.js} +12 -3
  53. package/{esm/PileupRenderer → dist/PileupRenderer/renderers}/renderAlignmentShape.d.ts +2 -2
  54. package/dist/PileupRenderer/{renderAlignmentShape.js → renderers/renderAlignmentShape.js} +1 -1
  55. package/dist/PileupRenderer/{renderMethylation.d.ts → renderers/renderMethylation.d.ts} +2 -2
  56. package/dist/PileupRenderer/{renderMethylation.js → renderers/renderMethylation.js} +2 -2
  57. package/dist/PileupRenderer/{renderMismatches.d.ts → renderers/renderMismatches.d.ts} +6 -3
  58. package/dist/PileupRenderer/{renderMismatches.js → renderers/renderMismatches.js} +29 -5
  59. package/dist/PileupRenderer/{renderModifications.d.ts → renderers/renderModifications.d.ts} +6 -3
  60. package/dist/PileupRenderer/renderers/renderModifications.js +84 -0
  61. package/dist/PileupRenderer/{renderPerBaseLettering.d.ts → renderers/renderPerBaseLettering.d.ts} +1 -1
  62. package/dist/PileupRenderer/{renderPerBaseLettering.js → renderers/renderPerBaseLettering.js} +1 -1
  63. package/{esm/PileupRenderer → dist/PileupRenderer/renderers}/renderPerBaseQuality.d.ts +1 -1
  64. package/dist/PileupRenderer/{renderPerBaseQuality.js → renderers/renderPerBaseQuality.js} +1 -1
  65. package/dist/PileupRenderer/{renderSoftClipping.d.ts → renderers/renderSoftClipping.d.ts} +2 -2
  66. package/dist/PileupRenderer/{renderSoftClipping.js → renderers/renderSoftClipping.js} +2 -2
  67. package/dist/PileupRenderer/types.d.ts +6 -0
  68. package/dist/SNPCoverageAdapter/generateCoverageBins.js +5 -4
  69. package/dist/SNPCoverageAdapter/processModifications.js +14 -4
  70. package/dist/SNPCoverageRenderer/makeImage.js +44 -33
  71. package/dist/SNPCoverageRenderer/types.d.ts +1 -0
  72. package/dist/shared/LinearReadDisplayBaseMixin.d.ts +24 -0
  73. package/dist/shared/LinearReadDisplayBaseMixin.js +50 -0
  74. package/dist/shared/LinearReadDisplayWithLayoutMixin.d.ts +11 -0
  75. package/dist/shared/LinearReadDisplayWithLayoutMixin.js +24 -0
  76. package/dist/shared/LinearReadDisplayWithPairFiltersMixin.d.ts +11 -0
  77. package/dist/shared/LinearReadDisplayWithPairFiltersMixin.js +27 -0
  78. package/dist/shared/afterAttach.js +3 -2
  79. package/dist/shared/chainToSimpleFeature.d.ts +3 -0
  80. package/dist/shared/chainToSimpleFeature.js +43 -0
  81. package/dist/shared/chevron.d.ts +1 -0
  82. package/dist/shared/chevron.js +27 -0
  83. package/dist/shared/color.d.ts +43 -6
  84. package/dist/shared/color.js +101 -22
  85. package/dist/shared/components/BaseDisplayComponent.d.ts +12 -3
  86. package/dist/shared/components/BaseDisplayComponent.js +2 -2
  87. package/dist/shared/components/SetFeatureHeightDialog.d.ts +10 -0
  88. package/dist/shared/components/SetFeatureHeightDialog.js +26 -0
  89. package/dist/shared/components/SetMaxHeightDialog.d.ts +8 -0
  90. package/dist/shared/components/SetMaxHeightDialog.js +28 -0
  91. package/dist/shared/drawLongReadChains.d.ts +24 -0
  92. package/dist/shared/drawLongReadChains.js +104 -0
  93. package/dist/shared/drawPairChains.d.ts +24 -0
  94. package/dist/shared/drawPairChains.js +94 -0
  95. package/dist/shared/flatbushType.d.ts +12 -0
  96. package/dist/shared/flatbushType.js +2 -0
  97. package/dist/shared/getUniqueModifications.d.ts +4 -1
  98. package/dist/shared/menuItems.d.ts +23 -0
  99. package/dist/shared/menuItems.js +89 -0
  100. package/dist/shared/modificationData.d.ts +6 -0
  101. package/dist/shared/modificationData.js +22 -0
  102. package/dist/shared/primaryStrand.d.ts +3 -0
  103. package/dist/shared/primaryStrand.js +24 -0
  104. package/dist/shared/types.d.ts +2 -0
  105. package/dist/shared/util.d.ts +2 -0
  106. package/dist/shared/util.js +6 -1
  107. package/dist/util.d.ts +1 -6
  108. package/dist/util.js +4 -15
  109. package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +4 -4
  110. package/esm/CramAdapter/CramAdapter.js +1 -1
  111. package/esm/CramAdapter/CramSlightlyLazyFeature.js +2 -1
  112. package/esm/CramAdapter/{util.js → readFeaturesToCIGAR.js} +4 -5
  113. package/esm/CramAdapter/readFeaturesToMismatches.d.ts +5 -0
  114. package/esm/CramAdapter/readFeaturesToMismatches.js +103 -0
  115. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +6 -2
  116. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +17 -2
  117. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +2 -2
  118. package/esm/LinearPileupDisplay/components/GroupByDialog.js +4 -4
  119. package/esm/LinearPileupDisplay/components/SetModificationThresholdDialog.d.ts +10 -0
  120. package/esm/LinearPileupDisplay/components/SetModificationThresholdDialog.js +37 -0
  121. package/esm/LinearPileupDisplay/doAfterAttach.d.ts +1 -0
  122. package/esm/LinearPileupDisplay/doAfterAttach.js +3 -2
  123. package/esm/LinearPileupDisplay/model.d.ts +20 -2
  124. package/esm/LinearPileupDisplay/model.js +39 -4
  125. package/esm/LinearReadArcsDisplay/index.js +1 -1
  126. package/esm/LinearReadArcsDisplay/model.d.ts +23 -30
  127. package/esm/LinearReadArcsDisplay/model.js +5 -83
  128. package/esm/LinearReadCloudDisplay/components/ReactComponent.js +86 -4
  129. package/esm/LinearReadCloudDisplay/components/SetFeatureHeightDialog.d.ts +10 -0
  130. package/esm/LinearReadCloudDisplay/components/SetFeatureHeightDialog.js +24 -0
  131. package/esm/LinearReadCloudDisplay/configSchema.d.ts +7 -0
  132. package/esm/LinearReadCloudDisplay/configSchema.js +5 -0
  133. package/esm/LinearReadCloudDisplay/drawFeatsAbstract.d.ts +2 -0
  134. package/esm/LinearReadCloudDisplay/drawFeatsAbstract.js +10 -0
  135. package/esm/LinearReadCloudDisplay/drawFeatsCloud.d.ts +2 -0
  136. package/esm/LinearReadCloudDisplay/drawFeatsCloud.js +21 -0
  137. package/esm/LinearReadCloudDisplay/drawFeatsCommon.d.ts +23 -0
  138. package/esm/LinearReadCloudDisplay/drawFeatsCommon.js +187 -0
  139. package/esm/LinearReadCloudDisplay/drawFeatsStack.d.ts +2 -0
  140. package/esm/LinearReadCloudDisplay/drawFeatsStack.js +30 -0
  141. package/esm/LinearReadCloudDisplay/index.js +1 -1
  142. package/esm/LinearReadCloudDisplay/model.d.ts +51 -31
  143. package/esm/LinearReadCloudDisplay/model.js +94 -76
  144. package/esm/LinearSNPCoverageDisplay/components/TooltipContents.d.ts +3 -0
  145. package/esm/LinearSNPCoverageDisplay/components/TooltipContents.js +149 -20
  146. package/esm/LinearSNPCoverageDisplay/model.js +14 -3
  147. package/esm/MismatchParser/cigarToMismatches.js +1 -0
  148. package/esm/ModificationParser/detectSimplexModifications.d.ts +4 -0
  149. package/esm/ModificationParser/detectSimplexModifications.js +17 -0
  150. package/esm/ModificationParser/getModPositions.d.ts +1 -1
  151. package/esm/ModificationParser/getModPositions.js +13 -16
  152. package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +4 -1
  153. package/esm/PileupRPC/methods/GetVisibleModifications.js +16 -3
  154. package/esm/PileupRenderer/PileupRenderer.d.ts +6 -1
  155. package/esm/PileupRenderer/PileupRenderer.js +11 -14
  156. package/esm/PileupRenderer/components/PileupRendering.d.ts +8 -15
  157. package/esm/PileupRenderer/components/PileupRendering.js +16 -3
  158. package/esm/PileupRenderer/makeImageData.d.ts +5 -2
  159. package/esm/PileupRenderer/makeImageData.js +34 -6
  160. package/esm/PileupRenderer/{getAlignmentShapeColor.js → renderers/getAlignmentShapeColor.js} +2 -2
  161. package/{dist/PileupRenderer → esm/PileupRenderer/renderers}/renderAlignment.d.ts +6 -3
  162. package/esm/PileupRenderer/{renderAlignment.js → renderers/renderAlignment.js} +12 -3
  163. package/{dist/PileupRenderer → esm/PileupRenderer/renderers}/renderAlignmentShape.d.ts +2 -2
  164. package/esm/PileupRenderer/{renderAlignmentShape.js → renderers/renderAlignmentShape.js} +1 -1
  165. package/esm/PileupRenderer/{renderMethylation.d.ts → renderers/renderMethylation.d.ts} +2 -2
  166. package/esm/PileupRenderer/{renderMethylation.js → renderers/renderMethylation.js} +2 -2
  167. package/esm/PileupRenderer/{renderMismatches.d.ts → renderers/renderMismatches.d.ts} +6 -3
  168. package/esm/PileupRenderer/{renderMismatches.js → renderers/renderMismatches.js} +29 -5
  169. package/esm/PileupRenderer/{renderModifications.d.ts → renderers/renderModifications.d.ts} +6 -3
  170. package/esm/PileupRenderer/renderers/renderModifications.js +81 -0
  171. package/esm/PileupRenderer/{renderPerBaseLettering.d.ts → renderers/renderPerBaseLettering.d.ts} +1 -1
  172. package/esm/PileupRenderer/{renderPerBaseLettering.js → renderers/renderPerBaseLettering.js} +1 -1
  173. package/{dist/PileupRenderer → esm/PileupRenderer/renderers}/renderPerBaseQuality.d.ts +1 -1
  174. package/esm/PileupRenderer/{renderPerBaseQuality.js → renderers/renderPerBaseQuality.js} +1 -1
  175. package/esm/PileupRenderer/{renderSoftClipping.d.ts → renderers/renderSoftClipping.d.ts} +2 -2
  176. package/esm/PileupRenderer/{renderSoftClipping.js → renderers/renderSoftClipping.js} +2 -2
  177. package/esm/PileupRenderer/types.d.ts +6 -0
  178. package/esm/SNPCoverageAdapter/generateCoverageBins.js +5 -4
  179. package/esm/SNPCoverageAdapter/processModifications.js +14 -4
  180. package/esm/SNPCoverageRenderer/makeImage.js +44 -33
  181. package/esm/SNPCoverageRenderer/types.d.ts +1 -0
  182. package/esm/shared/LinearReadDisplayBaseMixin.d.ts +24 -0
  183. package/esm/shared/LinearReadDisplayBaseMixin.js +47 -0
  184. package/esm/shared/LinearReadDisplayWithLayoutMixin.d.ts +11 -0
  185. package/esm/shared/LinearReadDisplayWithLayoutMixin.js +21 -0
  186. package/esm/shared/LinearReadDisplayWithPairFiltersMixin.d.ts +11 -0
  187. package/esm/shared/LinearReadDisplayWithPairFiltersMixin.js +24 -0
  188. package/esm/shared/afterAttach.js +3 -2
  189. package/esm/shared/chainToSimpleFeature.d.ts +3 -0
  190. package/esm/shared/chainToSimpleFeature.js +40 -0
  191. package/esm/shared/chevron.d.ts +1 -0
  192. package/esm/shared/chevron.js +24 -0
  193. package/esm/shared/color.d.ts +43 -6
  194. package/esm/shared/color.js +96 -20
  195. package/esm/shared/components/BaseDisplayComponent.d.ts +12 -3
  196. package/esm/shared/components/BaseDisplayComponent.js +2 -2
  197. package/esm/shared/components/SetFeatureHeightDialog.d.ts +10 -0
  198. package/esm/shared/components/SetFeatureHeightDialog.js +24 -0
  199. package/esm/shared/components/SetMaxHeightDialog.d.ts +8 -0
  200. package/esm/shared/components/SetMaxHeightDialog.js +26 -0
  201. package/esm/shared/drawLongReadChains.d.ts +24 -0
  202. package/esm/shared/drawLongReadChains.js +101 -0
  203. package/esm/shared/drawPairChains.d.ts +24 -0
  204. package/esm/shared/drawPairChains.js +91 -0
  205. package/esm/shared/flatbushType.d.ts +12 -0
  206. package/esm/shared/flatbushType.js +1 -0
  207. package/esm/shared/getUniqueModifications.d.ts +4 -1
  208. package/esm/shared/menuItems.d.ts +23 -0
  209. package/esm/shared/menuItems.js +49 -0
  210. package/esm/shared/modificationData.d.ts +6 -0
  211. package/esm/shared/modificationData.js +18 -0
  212. package/esm/shared/primaryStrand.d.ts +3 -0
  213. package/esm/shared/primaryStrand.js +20 -0
  214. package/esm/shared/types.d.ts +2 -0
  215. package/esm/shared/util.d.ts +2 -0
  216. package/esm/shared/util.js +4 -0
  217. package/esm/util.d.ts +1 -6
  218. package/esm/util.js +2 -14
  219. package/package.json +6 -6
  220. package/dist/LinearReadCloudDisplay/drawFeats.js +0 -27
  221. package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +0 -11
  222. package/dist/LinearReadCloudDisplay/drawLongReadChains.js +0 -64
  223. package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +0 -17
  224. package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -94
  225. package/dist/PileupRenderer/renderModifications.js +0 -44
  226. package/esm/LinearReadCloudDisplay/drawFeats.js +0 -24
  227. package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +0 -11
  228. package/esm/LinearReadCloudDisplay/drawLongReadChains.js +0 -61
  229. package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +0 -17
  230. package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -90
  231. package/esm/PileupRenderer/renderModifications.js +0 -41
  232. /package/dist/CramAdapter/{util.d.ts → readFeaturesToCIGAR.d.ts} +0 -0
  233. /package/dist/LinearReadCloudDisplay/{drawFeats.d.ts → drawFeatsAbstract.d.ts} +0 -0
  234. /package/{esm/LinearReadCloudDisplay/drawFeats.d.ts → dist/LinearReadCloudDisplay/drawFeatsCloud.d.ts} +0 -0
  235. /package/dist/PileupRenderer/{getAlignmentShapeColor.d.ts → renderers/getAlignmentShapeColor.d.ts} +0 -0
  236. /package/dist/{LinearReadCloudDisplay/util.d.ts → shared/canvasUtils.d.ts} +0 -0
  237. /package/dist/{LinearReadCloudDisplay/util.js → shared/canvasUtils.js} +0 -0
  238. /package/esm/CramAdapter/{util.d.ts → readFeaturesToCIGAR.d.ts} +0 -0
  239. /package/esm/PileupRenderer/{getAlignmentShapeColor.d.ts → renderers/getAlignmentShapeColor.d.ts} +0 -0
  240. /package/esm/{LinearReadCloudDisplay/util.d.ts → shared/canvasUtils.d.ts} +0 -0
  241. /package/esm/{LinearReadCloudDisplay/util.js → shared/canvasUtils.js} +0 -0
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinearReadDisplayBaseMixin = LinearReadDisplayBaseMixin;
4
+ const mobx_state_tree_1 = require("mobx-state-tree");
5
+ function LinearReadDisplayBaseMixin() {
6
+ return mobx_state_tree_1.types
7
+ .model('LinearReadDisplayBaseMixin', {
8
+ filterBySetting: mobx_state_tree_1.types.frozen(),
9
+ colorBySetting: mobx_state_tree_1.types.frozen(),
10
+ })
11
+ .volatile(() => ({
12
+ loading: false,
13
+ chainData: undefined,
14
+ lastDrawnOffsetPx: undefined,
15
+ lastDrawnBpPerPx: 0,
16
+ ref: null,
17
+ }))
18
+ .actions(self => ({
19
+ setLastDrawnOffsetPx(n) {
20
+ self.lastDrawnOffsetPx = n;
21
+ },
22
+ setLastDrawnBpPerPx(n) {
23
+ self.lastDrawnBpPerPx = n;
24
+ },
25
+ setLoading(f) {
26
+ self.loading = f;
27
+ },
28
+ setRef(ref) {
29
+ self.ref = ref;
30
+ },
31
+ setColorScheme(colorBy) {
32
+ self.colorBySetting = {
33
+ ...colorBy,
34
+ };
35
+ },
36
+ setChainData(args) {
37
+ self.chainData = args;
38
+ },
39
+ setFilterBy(filter) {
40
+ self.filterBySetting = {
41
+ ...filter,
42
+ };
43
+ },
44
+ }))
45
+ .views(self => ({
46
+ get drawn() {
47
+ return self.lastDrawnOffsetPx !== undefined;
48
+ },
49
+ }));
50
+ }
@@ -0,0 +1,11 @@
1
+ import type { FlatbushEntry } from './flatbushType';
2
+ import type Flatbush from '@jbrowse/core/util/flatbush';
3
+ export declare function LinearReadDisplayWithLayoutMixin(): import("mobx-state-tree").IModelType<{}, {
4
+ featureLayout: Flatbush | undefined;
5
+ mouseoverRef: HTMLCanvasElement | null;
6
+ featuresForFlatbush: FlatbushEntry[];
7
+ } & {
8
+ setFeatureLayout(layout: Flatbush): void;
9
+ setMouseoverRef(ref: HTMLCanvasElement | null): void;
10
+ setFeaturesForFlatbush(features: FlatbushEntry[]): void;
11
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinearReadDisplayWithLayoutMixin = LinearReadDisplayWithLayoutMixin;
4
+ const mobx_state_tree_1 = require("mobx-state-tree");
5
+ function LinearReadDisplayWithLayoutMixin() {
6
+ return mobx_state_tree_1.types
7
+ .model('LinearReadDisplayWithLayoutMixin', {})
8
+ .volatile(() => ({
9
+ featureLayout: undefined,
10
+ mouseoverRef: null,
11
+ featuresForFlatbush: [],
12
+ }))
13
+ .actions(self => ({
14
+ setFeatureLayout(layout) {
15
+ self.featureLayout = layout;
16
+ },
17
+ setMouseoverRef(ref) {
18
+ self.mouseoverRef = ref;
19
+ },
20
+ setFeaturesForFlatbush(features) {
21
+ self.featuresForFlatbush = features;
22
+ },
23
+ }));
24
+ }
@@ -0,0 +1,11 @@
1
+ export declare function LinearReadDisplayWithPairFiltersMixin(): import("mobx-state-tree").IModelType<{
2
+ drawSingletons: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
3
+ drawProperPairs: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
4
+ flipStrandLongReadChains: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
5
+ featureHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
6
+ }, {
7
+ setDrawSingletons(f: boolean): void;
8
+ setDrawProperPairs(f: boolean): void;
9
+ setFlipStrandLongReadChains(f: boolean): void;
10
+ setFeatureHeight(n?: number): void;
11
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinearReadDisplayWithPairFiltersMixin = LinearReadDisplayWithPairFiltersMixin;
4
+ const mobx_state_tree_1 = require("mobx-state-tree");
5
+ function LinearReadDisplayWithPairFiltersMixin() {
6
+ return mobx_state_tree_1.types
7
+ .model('LinearReadDisplayWithPairFiltersMixin', {
8
+ drawSingletons: true,
9
+ drawProperPairs: true,
10
+ flipStrandLongReadChains: true,
11
+ featureHeight: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
12
+ })
13
+ .actions(self => ({
14
+ setDrawSingletons(f) {
15
+ self.drawSingletons = f;
16
+ },
17
+ setDrawProperPairs(f) {
18
+ self.drawProperPairs = f;
19
+ },
20
+ setFlipStrandLongReadChains(f) {
21
+ self.flipStrandLongReadChains = f;
22
+ },
23
+ setFeatureHeight(n) {
24
+ self.featureHeight = n;
25
+ },
26
+ }));
27
+ }
@@ -20,10 +20,11 @@ function doAfterAttach(self, cb) {
20
20
  if (!self.chainData) {
21
21
  return;
22
22
  }
23
- ctx.clearRect(0, 0, canvas.width, self.height * 2);
23
+ const height = 'layoutHeight' in self ? self.layoutHeight || 1 : self.height;
24
24
  ctx.resetTransform();
25
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
25
26
  ctx.scale(2, 2);
26
- cb(self, ctx, canvas.width, self.height);
27
+ cb(self, ctx, canvas.width, height);
27
28
  self.setLastDrawnOffsetPx(view.offsetPx);
28
29
  self.setLastDrawnBpPerPx(view.bpPerPx);
29
30
  }
@@ -0,0 +1,3 @@
1
+ import { SimpleFeature } from '@jbrowse/core/util';
2
+ import type { ReducedFeature } from './fetchChains';
3
+ export declare function chainToSimpleFeature(chain: ReducedFeature[]): SimpleFeature;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chainToSimpleFeature = chainToSimpleFeature;
4
+ const util_1 = require("@jbrowse/core/util");
5
+ function chainToSimpleFeature(chain) {
6
+ if (chain.length === 0) {
7
+ throw new Error('Chain cannot be empty');
8
+ }
9
+ const firstFeat = chain[0];
10
+ return new util_1.SimpleFeature({
11
+ uniqueId: firstFeat.id,
12
+ id: firstFeat.id,
13
+ name: firstFeat.name,
14
+ refName: firstFeat.refName,
15
+ start: Math.min(...chain.map(f => f.start)),
16
+ end: Math.max(...chain.map(f => f.end)),
17
+ strand: firstFeat.strand,
18
+ flags: firstFeat.flags,
19
+ tlen: firstFeat.tlen,
20
+ pair_orientation: firstFeat.pair_orientation,
21
+ clipPos: firstFeat.clipPos,
22
+ ...(firstFeat.next_ref && { next_ref: firstFeat.next_ref }),
23
+ ...(firstFeat.next_pos !== undefined && { next_pos: firstFeat.next_pos }),
24
+ ...(firstFeat.SA && { SA: firstFeat.SA }),
25
+ subfeatures: chain.map((feat, idx) => ({
26
+ uniqueId: `${feat.id}_${idx}`,
27
+ id: `${feat.id}_${idx}`,
28
+ name: feat.name,
29
+ refName: feat.refName,
30
+ start: feat.start,
31
+ end: feat.end,
32
+ strand: feat.strand,
33
+ type: 'alignment_part',
34
+ flags: feat.flags,
35
+ tlen: feat.tlen,
36
+ pair_orientation: feat.pair_orientation,
37
+ clipPos: feat.clipPos,
38
+ ...(feat.next_ref && { next_ref: feat.next_ref }),
39
+ ...(feat.next_pos !== undefined && { next_pos: feat.next_pos }),
40
+ ...(feat.SA && { SA: feat.SA }),
41
+ })),
42
+ });
43
+ }
@@ -0,0 +1 @@
1
+ export declare function drawChevron(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, strand: number, color: string, chevronWidth: number, stroke?: string): void;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.drawChevron = drawChevron;
4
+ function drawChevron(ctx, x, y, width, height, strand, color, chevronWidth, stroke) {
5
+ ctx.fillStyle = color;
6
+ ctx.beginPath();
7
+ if (strand === -1) {
8
+ ctx.moveTo(x - chevronWidth, y + height / 2);
9
+ ctx.lineTo(x, y + height);
10
+ ctx.lineTo(x + width, y + height);
11
+ ctx.lineTo(x + width, y);
12
+ ctx.lineTo(x, y);
13
+ }
14
+ else {
15
+ ctx.moveTo(x, y);
16
+ ctx.lineTo(x, y + height);
17
+ ctx.lineTo(x + width, y + height);
18
+ ctx.lineTo(x + width + chevronWidth, y + height / 2);
19
+ ctx.lineTo(x + width, y);
20
+ }
21
+ ctx.closePath();
22
+ ctx.fill();
23
+ if (stroke) {
24
+ ctx.strokeStyle = stroke;
25
+ ctx.stroke();
26
+ }
27
+ }
@@ -1,4 +1,13 @@
1
- import type { ChainStats } from './fetchChains';
1
+ import type { ChainStats, ReducedFeature } from './fetchChains';
2
+ export declare const PairType: {
3
+ readonly PROPER_PAIR: 0;
4
+ readonly LONG_INSERT: 1;
5
+ readonly SHORT_INSERT: 2;
6
+ readonly INTER_CHROM: 3;
7
+ readonly ABNORMAL_ORIENTATION: 4;
8
+ readonly UNMAPPED_MATE: 5;
9
+ };
10
+ export type PairTypeValue = (typeof PairType)[keyof typeof PairType];
2
11
  export declare const fillColor: {
3
12
  color_fwd_strand_not_proper: string;
4
13
  color_rev_strand_not_proper: string;
@@ -16,6 +25,7 @@ export declare const fillColor: {
16
25
  color_interchrom: string;
17
26
  color_longinsert: string;
18
27
  color_shortinsert: string;
28
+ color_unmapped_mate: string;
19
29
  color_unknown: string;
20
30
  };
21
31
  export declare const strokeColor: {
@@ -35,24 +45,51 @@ export declare const strokeColor: {
35
45
  color_interchrom: string;
36
46
  color_longinsert: string;
37
47
  color_shortinsert: string;
48
+ color_unmapped_mate: string;
38
49
  color_unknown: string;
39
50
  };
51
+ export declare function getPairedType({ type, f1, f2, stats, }: {
52
+ type: string;
53
+ f1: {
54
+ refName: string;
55
+ pair_orientation?: string;
56
+ tlen?: number;
57
+ flags?: number;
58
+ };
59
+ f2: {
60
+ refName: string;
61
+ };
62
+ stats?: ChainStats;
63
+ }): PairTypeValue;
40
64
  export declare function getPairedInsertSizeColor(f1: {
41
65
  refName: string;
42
66
  tlen?: number;
67
+ flags?: number;
43
68
  }, f2: {
44
69
  refName: string;
45
70
  }, stats?: ChainStats): readonly [string, string] | undefined;
71
+ export declare function getPairedOrientationColorOrDefault(f: {
72
+ pair_orientation?: string;
73
+ flags?: number;
74
+ }): readonly [string, string] | undefined;
75
+ export declare function getPairedOrientationColor(f: {
76
+ pair_orientation?: string;
77
+ flags?: number;
78
+ }): readonly [string, string];
46
79
  export declare function getPairedInsertSizeAndOrientationColor(f1: {
47
80
  refName: string;
48
81
  pair_orientation?: string;
49
82
  tlen?: number;
83
+ flags?: number;
50
84
  }, f2: {
51
85
  refName: string;
52
86
  }, stats?: ChainStats): readonly [string, string];
53
- export declare function getPairedOrientationColorOrDefault(f: {
54
- pair_orientation?: string;
87
+ export declare function getSingletonColor(f: {
88
+ tlen?: number;
89
+ }, stats?: ChainStats): readonly [string, string];
90
+ export declare function getPairedColor({ type, v0, v1, stats, }: {
91
+ type: string;
92
+ v0: ReducedFeature;
93
+ v1: ReducedFeature;
94
+ stats?: ChainStats;
55
95
  }): readonly [string, string] | undefined;
56
- export declare function getPairedOrientationColor(f: {
57
- pair_orientation?: string;
58
- }): readonly [string, string];
@@ -1,11 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.strokeColor = exports.fillColor = void 0;
3
+ exports.strokeColor = exports.fillColor = exports.PairType = void 0;
4
+ exports.getPairedType = getPairedType;
4
5
  exports.getPairedInsertSizeColor = getPairedInsertSizeColor;
5
- exports.getPairedInsertSizeAndOrientationColor = getPairedInsertSizeAndOrientationColor;
6
6
  exports.getPairedOrientationColorOrDefault = getPairedOrientationColorOrDefault;
7
7
  exports.getPairedOrientationColor = getPairedOrientationColor;
8
+ exports.getPairedInsertSizeAndOrientationColor = getPairedInsertSizeAndOrientationColor;
9
+ exports.getSingletonColor = getSingletonColor;
10
+ exports.getPairedColor = getPairedColor;
8
11
  const util_1 = require("../util");
12
+ exports.PairType = {
13
+ PROPER_PAIR: 0,
14
+ LONG_INSERT: 1,
15
+ SHORT_INSERT: 2,
16
+ INTER_CHROM: 3,
17
+ ABNORMAL_ORIENTATION: 4,
18
+ UNMAPPED_MATE: 5,
19
+ };
9
20
  exports.fillColor = {
10
21
  color_fwd_strand_not_proper: '#ECC8C8',
11
22
  color_rev_strand_not_proper: '#BEBED8',
@@ -16,13 +27,14 @@ exports.fillColor = {
16
27
  color_fwd_diff_chr: '#000',
17
28
  color_rev_diff_chr: '#969696',
18
29
  color_pair_lr: '#c8c8c8',
19
- color_pair_rr: 'navy',
30
+ color_pair_rr: '#3a3a9d',
20
31
  color_pair_rl: 'teal',
21
32
  color_pair_ll: 'green',
22
33
  color_nostrand: '#c8c8c8',
23
34
  color_interchrom: 'purple',
24
35
  color_longinsert: 'red',
25
36
  color_shortinsert: 'pink',
37
+ color_unmapped_mate: '#8B008B',
26
38
  color_unknown: 'grey',
27
39
  };
28
40
  exports.strokeColor = {
@@ -35,38 +47,78 @@ exports.strokeColor = {
35
47
  color_fwd_diff_chr: '#000000',
36
48
  color_rev_diff_chr: '#696969',
37
49
  color_pair_lr: '#8C8C8C',
38
- color_pair_rr: '#00005A',
50
+ color_pair_rr: '#00002A',
39
51
  color_pair_rl: '#005A5A',
40
52
  color_pair_ll: '#005A00',
41
53
  color_nostrand: '#8C8C8C',
42
54
  color_interchrom: '#5A005A',
43
55
  color_longinsert: '#B30000',
44
56
  color_shortinsert: '#FF3A5C',
45
- color_unknown: 'grey',
57
+ color_unmapped_mate: '#5A005A',
58
+ color_unknown: '#444',
46
59
  };
47
- function getPairedInsertSizeColor(f1, f2, stats) {
48
- const sameRef = f1.refName === f2.refName;
49
- const tlen = Math.abs(f1.tlen || 0);
50
- if (sameRef && tlen > ((stats === null || stats === void 0 ? void 0 : stats.upper) || 0)) {
51
- return [exports.fillColor.color_longinsert, exports.strokeColor.color_longinsert];
52
- }
53
- else if (sameRef && tlen < ((stats === null || stats === void 0 ? void 0 : stats.lower) || 0)) {
54
- return [exports.fillColor.color_shortinsert, exports.strokeColor.color_shortinsert];
60
+ const defaultColor = [
61
+ exports.fillColor.color_pair_lr,
62
+ exports.strokeColor.color_pair_lr,
63
+ ];
64
+ function getPairedType({ type, f1, f2, stats, }) {
65
+ if (f1.flags !== undefined && f1.flags & 8) {
66
+ return exports.PairType.UNMAPPED_MATE;
55
67
  }
56
- else if (!sameRef) {
57
- return [exports.fillColor.color_interchrom, exports.strokeColor.color_interchrom];
68
+ if (type === 'insertSizeAndOrientation' || type === 'orientation') {
69
+ const orientationType = util_1.orientationTypes.fr;
70
+ const r = orientationType[f1.pair_orientation || ''];
71
+ if (r && r !== 'LR') {
72
+ return exports.PairType.ABNORMAL_ORIENTATION;
73
+ }
58
74
  }
59
- else {
60
- return undefined;
75
+ if (type === 'insertSizeAndOrientation' || type === 'insertSize') {
76
+ const sameRef = f1.refName === f2.refName;
77
+ const tlen = Math.abs(f1.tlen || 0);
78
+ if (!sameRef) {
79
+ return exports.PairType.INTER_CHROM;
80
+ }
81
+ if (stats) {
82
+ if (tlen > stats.upper) {
83
+ return exports.PairType.LONG_INSERT;
84
+ }
85
+ if (tlen < stats.lower) {
86
+ return exports.PairType.SHORT_INSERT;
87
+ }
88
+ }
61
89
  }
90
+ return exports.PairType.PROPER_PAIR;
62
91
  }
63
- const defaultColor = [exports.fillColor.color_unknown, exports.fillColor.color_unknown];
64
- function getPairedInsertSizeAndOrientationColor(f1, f2, stats) {
65
- return (getPairedOrientationColorOrDefault(f1) ||
66
- getPairedInsertSizeColor(f1, f2, stats) ||
67
- defaultColor);
92
+ function getPairedInsertSizeColor(f1, f2, stats) {
93
+ const pairType = getPairedType({ type: 'insertSize', f1, f2, stats });
94
+ switch (pairType) {
95
+ case exports.PairType.UNMAPPED_MATE:
96
+ return [
97
+ exports.fillColor.color_unmapped_mate,
98
+ exports.strokeColor.color_unmapped_mate,
99
+ ];
100
+ case exports.PairType.LONG_INSERT:
101
+ return [exports.fillColor.color_longinsert, exports.strokeColor.color_longinsert];
102
+ case exports.PairType.SHORT_INSERT:
103
+ return [
104
+ exports.fillColor.color_shortinsert,
105
+ exports.strokeColor.color_shortinsert,
106
+ ];
107
+ case exports.PairType.INTER_CHROM:
108
+ return [exports.fillColor.color_interchrom, exports.strokeColor.color_interchrom];
109
+ case exports.PairType.PROPER_PAIR:
110
+ return undefined;
111
+ default:
112
+ return undefined;
113
+ }
68
114
  }
69
115
  function getPairedOrientationColorOrDefault(f) {
116
+ if (f.flags !== undefined && f.flags & 8) {
117
+ return [
118
+ exports.fillColor.color_unmapped_mate,
119
+ exports.strokeColor.color_unmapped_mate,
120
+ ];
121
+ }
70
122
  const type = util_1.orientationTypes.fr;
71
123
  const r = type[f.pair_orientation || ''];
72
124
  const type2 = util_1.pairMap[r];
@@ -77,3 +129,30 @@ function getPairedOrientationColorOrDefault(f) {
77
129
  function getPairedOrientationColor(f) {
78
130
  return getPairedOrientationColorOrDefault(f) || defaultColor;
79
131
  }
132
+ function getPairedInsertSizeAndOrientationColor(f1, f2, stats) {
133
+ return (getPairedOrientationColorOrDefault(f1) ||
134
+ getPairedInsertSizeColor(f1, f2, stats) ||
135
+ defaultColor);
136
+ }
137
+ function getSingletonColor(f, stats) {
138
+ const tlen = Math.abs(f.tlen || 0);
139
+ if (stats && tlen > stats.upper) {
140
+ return [
141
+ exports.fillColor.color_fwd_missing_mate,
142
+ exports.strokeColor.color_fwd_missing_mate,
143
+ ];
144
+ }
145
+ return defaultColor;
146
+ }
147
+ function getPairedColor({ type, v0, v1, stats, }) {
148
+ if (type === 'insertSizeAndOrientation') {
149
+ return getPairedInsertSizeAndOrientationColor(v0, v1, stats);
150
+ }
151
+ if (type === 'orientation') {
152
+ return getPairedOrientationColor(v0);
153
+ }
154
+ if (type === 'insertSize') {
155
+ return getPairedInsertSizeColor(v0, v1, stats);
156
+ }
157
+ return undefined;
158
+ }
@@ -1,7 +1,16 @@
1
- import type { LinearReadArcsDisplayModel } from '../../LinearReadArcsDisplay/model';
2
- import type { LinearReadCloudDisplayModel } from '../../LinearReadCloudDisplay/model';
1
+ import type React from 'react';
2
+ interface BaseDisplayModel {
3
+ error?: unknown;
4
+ regionTooLarge?: boolean;
5
+ reload: () => void;
6
+ regionCannotBeRendered: () => React.ReactElement | null;
7
+ drawn: boolean;
8
+ loading: boolean;
9
+ lastDrawnOffsetPx?: number;
10
+ message?: string;
11
+ }
3
12
  declare const BaseDisplayComponent: ({ model, children, }: {
4
- model: LinearReadArcsDisplayModel | LinearReadCloudDisplayModel;
13
+ model: BaseDisplayModel;
5
14
  children?: React.ReactNode;
6
15
  }) => import("react/jsx-runtime").JSX.Element | null;
7
16
  export default BaseDisplayComponent;
@@ -20,7 +20,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
20
20
  textAlign: 'center',
21
21
  },
22
22
  }));
23
- const BlockError = (0, mobx_react_1.observer)(function ({ model, }) {
23
+ const BlockError = (0, mobx_react_1.observer)(function ({ model }) {
24
24
  const { error } = model;
25
25
  return ((0, jsx_runtime_1.jsx)(plugin_linear_genome_view_1.BlockMsg, { message: `${error}`, severity: "error", action: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Reload", children: (0, jsx_runtime_1.jsx)(material_1.Button, { "data-testid": "reload_button", onClick: () => {
26
26
  model.reload();
@@ -36,7 +36,7 @@ const DataDisplay = (0, mobx_react_1.observer)(function ({ model, children, }) {
36
36
  const left = (model.lastDrawnOffsetPx || 0) - view.offsetPx;
37
37
  return ((0, jsx_runtime_1.jsxs)("div", { "data-testid": `drawn-${drawn}`, children: [(0, jsx_runtime_1.jsx)("div", { style: { position: 'absolute', left }, children: children }), left !== 0 || loading ? (0, jsx_runtime_1.jsx)(LoadingBar, { model: model }) : null] }));
38
38
  });
39
- const LoadingBar = (0, mobx_react_1.observer)(function ({ model, }) {
39
+ const LoadingBar = (0, mobx_react_1.observer)(function ({ model }) {
40
40
  const { classes } = useStyles();
41
41
  const { message } = model;
42
42
  return ((0, jsx_runtime_1.jsx)("div", { className: classes.loading, children: (0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { message: message }) }));
@@ -0,0 +1,10 @@
1
+ declare const SetFeatureHeightDialog: (props: {
2
+ model: {
3
+ setFeatureHeight: (arg?: number) => void;
4
+ setNoSpacing: (arg?: boolean) => void;
5
+ featureHeightSetting: number;
6
+ noSpacing?: boolean;
7
+ };
8
+ handleClose: () => void;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export default SetFeatureHeightDialog;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const ui_1 = require("@jbrowse/core/ui");
6
+ const material_1 = require("@mui/material");
7
+ const mobx_react_1 = require("mobx-react");
8
+ const SetFeatureHeightDialog = (0, mobx_react_1.observer)(function (props) {
9
+ const { model, handleClose } = props;
10
+ const { featureHeightSetting, noSpacing: noSpacingSetting } = model;
11
+ const [height, setHeight] = (0, react_1.useState)(`${featureHeightSetting}`);
12
+ const [noSpacing, setNoSpacing] = (0, react_1.useState)(noSpacingSetting);
13
+ const ok = height !== '' && !Number.isNaN(+height);
14
+ return ((0, jsx_runtime_1.jsx)(ui_1.Dialog, { open: true, onClose: handleClose, title: "Set feature height", children: (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Adjust the feature height and whether there is any spacing between features. Setting feature height to 1 and removing spacing makes the display very compact." }), (0, jsx_runtime_1.jsx)(material_1.TextField, { value: height, helperText: "Feature height", onChange: event => {
15
+ setHeight(event.target.value);
16
+ } }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: !!noSpacing, onChange: () => {
17
+ setNoSpacing(val => !val);
18
+ } }), label: "Remove spacing between features in y-direction?" }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, disabled: !ok, onClick: () => {
19
+ model.setFeatureHeight(height !== '' && !Number.isNaN(+height) ? +height : undefined);
20
+ model.setNoSpacing(noSpacing);
21
+ handleClose();
22
+ }, children: "Submit" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
23
+ handleClose();
24
+ }, children: "Cancel" })] })] }) }));
25
+ });
26
+ exports.default = SetFeatureHeightDialog;
@@ -0,0 +1,8 @@
1
+ declare const SetMaxHeightDialog: (props: {
2
+ model: {
3
+ maxHeight?: number;
4
+ setMaxHeight: (arg?: number) => void;
5
+ };
6
+ handleClose: () => void;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default SetMaxHeightDialog;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const ui_1 = require("@jbrowse/core/ui");
6
+ const material_1 = require("@mui/material");
7
+ const mobx_react_1 = require("mobx-react");
8
+ const mui_1 = require("tss-react/mui");
9
+ const useStyles = (0, mui_1.makeStyles)()({
10
+ root: {
11
+ width: 500,
12
+ },
13
+ });
14
+ const SetMaxHeightDialog = (0, mobx_react_1.observer)(function (props) {
15
+ const { model, handleClose } = props;
16
+ const { classes } = useStyles();
17
+ const { maxHeight = '' } = model;
18
+ const [max, setMax] = (0, react_1.useState)(`${maxHeight}`);
19
+ return ((0, jsx_runtime_1.jsx)(ui_1.Dialog, { open: true, onClose: handleClose, title: "Set max height", children: (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { className: classes.root, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Set max height for the track. For example, you can increase this if the layout says \"Max height reached\"" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { value: max, autoFocus: true, onChange: event => {
20
+ setMax(event.target.value);
21
+ }, placeholder: "Enter max height for layout" }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, onClick: () => {
22
+ model.setMaxHeight(max !== '' && !Number.isNaN(+max) ? +max : undefined);
23
+ handleClose();
24
+ }, children: "Submit" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
25
+ handleClose();
26
+ }, children: "Cancel" })] })] }) }));
27
+ });
28
+ exports.default = SetMaxHeightDialog;
@@ -0,0 +1,24 @@
1
+ import type { ChainData, ReducedFeature } from './fetchChains';
2
+ import type { FlatbushEntry } from './flatbushType';
3
+ import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
4
+ import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
5
+ type LGV = LinearGenomeViewModel;
6
+ export declare function drawLongReadChains({ ctx, chainData, view, asm, chainYOffsets, renderChevrons, featureHeight, featuresForFlatbush, computedChains, flipStrandLongReadChains, }: {
7
+ ctx: CanvasRenderingContext2D;
8
+ chainData: ChainData;
9
+ view: LGV;
10
+ asm: Assembly;
11
+ chainYOffsets: Map<string, number>;
12
+ renderChevrons: boolean;
13
+ featureHeight: number;
14
+ featuresForFlatbush: FlatbushEntry[];
15
+ computedChains: {
16
+ distance: number;
17
+ minX: number;
18
+ maxX: number;
19
+ chain: ReducedFeature[];
20
+ id: string;
21
+ }[];
22
+ flipStrandLongReadChains: boolean;
23
+ }): void;
24
+ export {};