@jbrowse/plugin-alignments 3.6.4 → 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 (243) 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/LinearAlignmentsDisplay/model.js +3 -2
  9. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +17 -2
  10. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +2 -2
  11. package/dist/LinearPileupDisplay/components/GroupByDialog.js +4 -4
  12. package/dist/LinearPileupDisplay/components/SetModificationThresholdDialog.d.ts +10 -0
  13. package/dist/LinearPileupDisplay/components/SetModificationThresholdDialog.js +39 -0
  14. package/dist/LinearPileupDisplay/doAfterAttach.d.ts +1 -0
  15. package/dist/LinearPileupDisplay/doAfterAttach.js +3 -2
  16. package/dist/LinearPileupDisplay/model.d.ts +20 -2
  17. package/dist/LinearPileupDisplay/model.js +39 -4
  18. package/dist/LinearReadArcsDisplay/index.js +1 -1
  19. package/dist/LinearReadArcsDisplay/model.d.ts +23 -30
  20. package/dist/LinearReadArcsDisplay/model.js +5 -86
  21. package/dist/LinearReadCloudDisplay/components/ReactComponent.js +84 -2
  22. package/dist/LinearReadCloudDisplay/components/SetFeatureHeightDialog.d.ts +10 -0
  23. package/dist/LinearReadCloudDisplay/components/SetFeatureHeightDialog.js +26 -0
  24. package/dist/LinearReadCloudDisplay/configSchema.d.ts +7 -0
  25. package/dist/LinearReadCloudDisplay/configSchema.js +5 -0
  26. package/dist/LinearReadCloudDisplay/drawFeatsAbstract.js +13 -0
  27. package/dist/LinearReadCloudDisplay/drawFeatsCloud.js +24 -0
  28. package/dist/LinearReadCloudDisplay/drawFeatsCommon.d.ts +23 -0
  29. package/dist/LinearReadCloudDisplay/drawFeatsCommon.js +198 -0
  30. package/dist/LinearReadCloudDisplay/drawFeatsStack.d.ts +2 -0
  31. package/dist/LinearReadCloudDisplay/drawFeatsStack.js +36 -0
  32. package/dist/LinearReadCloudDisplay/index.js +1 -1
  33. package/dist/LinearReadCloudDisplay/model.d.ts +51 -31
  34. package/dist/LinearReadCloudDisplay/model.js +93 -78
  35. package/dist/LinearSNPCoverageDisplay/components/TooltipContents.d.ts +3 -0
  36. package/dist/LinearSNPCoverageDisplay/components/TooltipContents.js +148 -19
  37. package/dist/LinearSNPCoverageDisplay/model.js +14 -3
  38. package/dist/MismatchParser/cigarToMismatches.js +1 -0
  39. package/dist/ModificationParser/detectSimplexModifications.d.ts +4 -0
  40. package/dist/ModificationParser/detectSimplexModifications.js +20 -0
  41. package/dist/ModificationParser/getModPositions.d.ts +1 -1
  42. package/dist/ModificationParser/getModPositions.js +13 -16
  43. package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +4 -1
  44. package/dist/PileupRPC/methods/GetVisibleModifications.js +16 -3
  45. package/dist/PileupRenderer/PileupRenderer.d.ts +6 -1
  46. package/dist/PileupRenderer/PileupRenderer.js +11 -14
  47. package/dist/PileupRenderer/components/PileupRendering.d.ts +8 -15
  48. package/dist/PileupRenderer/components/PileupRendering.js +18 -2
  49. package/dist/PileupRenderer/makeImageData.d.ts +5 -2
  50. package/dist/PileupRenderer/makeImageData.js +37 -6
  51. package/dist/PileupRenderer/{getAlignmentShapeColor.js → renderers/getAlignmentShapeColor.js} +2 -2
  52. package/{esm/PileupRenderer → dist/PileupRenderer/renderers}/renderAlignment.d.ts +6 -3
  53. package/dist/PileupRenderer/{renderAlignment.js → renderers/renderAlignment.js} +12 -3
  54. package/{esm/PileupRenderer → dist/PileupRenderer/renderers}/renderAlignmentShape.d.ts +2 -2
  55. package/dist/PileupRenderer/{renderAlignmentShape.js → renderers/renderAlignmentShape.js} +1 -1
  56. package/dist/PileupRenderer/{renderMethylation.d.ts → renderers/renderMethylation.d.ts} +2 -2
  57. package/dist/PileupRenderer/{renderMethylation.js → renderers/renderMethylation.js} +2 -2
  58. package/dist/PileupRenderer/{renderMismatches.d.ts → renderers/renderMismatches.d.ts} +6 -3
  59. package/dist/PileupRenderer/{renderMismatches.js → renderers/renderMismatches.js} +29 -5
  60. package/dist/PileupRenderer/{renderModifications.d.ts → renderers/renderModifications.d.ts} +6 -3
  61. package/dist/PileupRenderer/renderers/renderModifications.js +84 -0
  62. package/dist/PileupRenderer/{renderPerBaseLettering.d.ts → renderers/renderPerBaseLettering.d.ts} +1 -1
  63. package/dist/PileupRenderer/{renderPerBaseLettering.js → renderers/renderPerBaseLettering.js} +1 -1
  64. package/{esm/PileupRenderer → dist/PileupRenderer/renderers}/renderPerBaseQuality.d.ts +1 -1
  65. package/dist/PileupRenderer/{renderPerBaseQuality.js → renderers/renderPerBaseQuality.js} +1 -1
  66. package/dist/PileupRenderer/{renderSoftClipping.d.ts → renderers/renderSoftClipping.d.ts} +2 -2
  67. package/dist/PileupRenderer/{renderSoftClipping.js → renderers/renderSoftClipping.js} +2 -2
  68. package/dist/PileupRenderer/types.d.ts +6 -0
  69. package/dist/SNPCoverageAdapter/generateCoverageBins.js +5 -4
  70. package/dist/SNPCoverageAdapter/processModifications.js +14 -4
  71. package/dist/SNPCoverageRenderer/makeImage.js +44 -33
  72. package/dist/SNPCoverageRenderer/types.d.ts +1 -0
  73. package/dist/shared/LinearReadDisplayBaseMixin.d.ts +24 -0
  74. package/dist/shared/LinearReadDisplayBaseMixin.js +50 -0
  75. package/dist/shared/LinearReadDisplayWithLayoutMixin.d.ts +11 -0
  76. package/dist/shared/LinearReadDisplayWithLayoutMixin.js +24 -0
  77. package/dist/shared/LinearReadDisplayWithPairFiltersMixin.d.ts +11 -0
  78. package/dist/shared/LinearReadDisplayWithPairFiltersMixin.js +27 -0
  79. package/dist/shared/afterAttach.js +3 -2
  80. package/dist/shared/chainToSimpleFeature.d.ts +3 -0
  81. package/dist/shared/chainToSimpleFeature.js +43 -0
  82. package/dist/shared/chevron.d.ts +1 -0
  83. package/dist/shared/chevron.js +27 -0
  84. package/dist/shared/color.d.ts +43 -6
  85. package/dist/shared/color.js +101 -22
  86. package/dist/shared/components/BaseDisplayComponent.d.ts +12 -3
  87. package/dist/shared/components/BaseDisplayComponent.js +2 -2
  88. package/dist/shared/components/SetFeatureHeightDialog.d.ts +10 -0
  89. package/dist/shared/components/SetFeatureHeightDialog.js +26 -0
  90. package/dist/shared/components/SetMaxHeightDialog.d.ts +8 -0
  91. package/dist/shared/components/SetMaxHeightDialog.js +28 -0
  92. package/dist/shared/drawLongReadChains.d.ts +24 -0
  93. package/dist/shared/drawLongReadChains.js +104 -0
  94. package/dist/shared/drawPairChains.d.ts +24 -0
  95. package/dist/shared/drawPairChains.js +94 -0
  96. package/dist/shared/flatbushType.d.ts +12 -0
  97. package/dist/shared/flatbushType.js +2 -0
  98. package/dist/shared/getUniqueModifications.d.ts +4 -1
  99. package/dist/shared/menuItems.d.ts +23 -0
  100. package/dist/shared/menuItems.js +89 -0
  101. package/dist/shared/modificationData.d.ts +6 -0
  102. package/dist/shared/modificationData.js +22 -0
  103. package/dist/shared/primaryStrand.d.ts +3 -0
  104. package/dist/shared/primaryStrand.js +24 -0
  105. package/dist/shared/types.d.ts +2 -0
  106. package/dist/shared/util.d.ts +2 -0
  107. package/dist/shared/util.js +6 -1
  108. package/dist/util.d.ts +1 -6
  109. package/dist/util.js +4 -15
  110. package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +4 -4
  111. package/esm/CramAdapter/CramAdapter.js +1 -1
  112. package/esm/CramAdapter/CramSlightlyLazyFeature.js +2 -1
  113. package/esm/CramAdapter/{util.js → readFeaturesToCIGAR.js} +4 -5
  114. package/esm/CramAdapter/readFeaturesToMismatches.d.ts +5 -0
  115. package/esm/CramAdapter/readFeaturesToMismatches.js +103 -0
  116. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +6 -2
  117. package/esm/LinearAlignmentsDisplay/model.js +3 -2
  118. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +17 -2
  119. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +2 -2
  120. package/esm/LinearPileupDisplay/components/GroupByDialog.js +4 -4
  121. package/esm/LinearPileupDisplay/components/SetModificationThresholdDialog.d.ts +10 -0
  122. package/esm/LinearPileupDisplay/components/SetModificationThresholdDialog.js +37 -0
  123. package/esm/LinearPileupDisplay/doAfterAttach.d.ts +1 -0
  124. package/esm/LinearPileupDisplay/doAfterAttach.js +3 -2
  125. package/esm/LinearPileupDisplay/model.d.ts +20 -2
  126. package/esm/LinearPileupDisplay/model.js +39 -4
  127. package/esm/LinearReadArcsDisplay/index.js +1 -1
  128. package/esm/LinearReadArcsDisplay/model.d.ts +23 -30
  129. package/esm/LinearReadArcsDisplay/model.js +5 -83
  130. package/esm/LinearReadCloudDisplay/components/ReactComponent.js +86 -4
  131. package/esm/LinearReadCloudDisplay/components/SetFeatureHeightDialog.d.ts +10 -0
  132. package/esm/LinearReadCloudDisplay/components/SetFeatureHeightDialog.js +24 -0
  133. package/esm/LinearReadCloudDisplay/configSchema.d.ts +7 -0
  134. package/esm/LinearReadCloudDisplay/configSchema.js +5 -0
  135. package/esm/LinearReadCloudDisplay/drawFeatsAbstract.d.ts +2 -0
  136. package/esm/LinearReadCloudDisplay/drawFeatsAbstract.js +10 -0
  137. package/esm/LinearReadCloudDisplay/drawFeatsCloud.d.ts +2 -0
  138. package/esm/LinearReadCloudDisplay/drawFeatsCloud.js +21 -0
  139. package/esm/LinearReadCloudDisplay/drawFeatsCommon.d.ts +23 -0
  140. package/esm/LinearReadCloudDisplay/drawFeatsCommon.js +187 -0
  141. package/esm/LinearReadCloudDisplay/drawFeatsStack.d.ts +2 -0
  142. package/esm/LinearReadCloudDisplay/drawFeatsStack.js +30 -0
  143. package/esm/LinearReadCloudDisplay/index.js +1 -1
  144. package/esm/LinearReadCloudDisplay/model.d.ts +51 -31
  145. package/esm/LinearReadCloudDisplay/model.js +94 -76
  146. package/esm/LinearSNPCoverageDisplay/components/TooltipContents.d.ts +3 -0
  147. package/esm/LinearSNPCoverageDisplay/components/TooltipContents.js +149 -20
  148. package/esm/LinearSNPCoverageDisplay/model.js +14 -3
  149. package/esm/MismatchParser/cigarToMismatches.js +1 -0
  150. package/esm/ModificationParser/detectSimplexModifications.d.ts +4 -0
  151. package/esm/ModificationParser/detectSimplexModifications.js +17 -0
  152. package/esm/ModificationParser/getModPositions.d.ts +1 -1
  153. package/esm/ModificationParser/getModPositions.js +13 -16
  154. package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +4 -1
  155. package/esm/PileupRPC/methods/GetVisibleModifications.js +16 -3
  156. package/esm/PileupRenderer/PileupRenderer.d.ts +6 -1
  157. package/esm/PileupRenderer/PileupRenderer.js +11 -14
  158. package/esm/PileupRenderer/components/PileupRendering.d.ts +8 -15
  159. package/esm/PileupRenderer/components/PileupRendering.js +16 -3
  160. package/esm/PileupRenderer/makeImageData.d.ts +5 -2
  161. package/esm/PileupRenderer/makeImageData.js +34 -6
  162. package/esm/PileupRenderer/{getAlignmentShapeColor.js → renderers/getAlignmentShapeColor.js} +2 -2
  163. package/{dist/PileupRenderer → esm/PileupRenderer/renderers}/renderAlignment.d.ts +6 -3
  164. package/esm/PileupRenderer/{renderAlignment.js → renderers/renderAlignment.js} +12 -3
  165. package/{dist/PileupRenderer → esm/PileupRenderer/renderers}/renderAlignmentShape.d.ts +2 -2
  166. package/esm/PileupRenderer/{renderAlignmentShape.js → renderers/renderAlignmentShape.js} +1 -1
  167. package/esm/PileupRenderer/{renderMethylation.d.ts → renderers/renderMethylation.d.ts} +2 -2
  168. package/esm/PileupRenderer/{renderMethylation.js → renderers/renderMethylation.js} +2 -2
  169. package/esm/PileupRenderer/{renderMismatches.d.ts → renderers/renderMismatches.d.ts} +6 -3
  170. package/esm/PileupRenderer/{renderMismatches.js → renderers/renderMismatches.js} +29 -5
  171. package/esm/PileupRenderer/{renderModifications.d.ts → renderers/renderModifications.d.ts} +6 -3
  172. package/esm/PileupRenderer/renderers/renderModifications.js +81 -0
  173. package/esm/PileupRenderer/{renderPerBaseLettering.d.ts → renderers/renderPerBaseLettering.d.ts} +1 -1
  174. package/esm/PileupRenderer/{renderPerBaseLettering.js → renderers/renderPerBaseLettering.js} +1 -1
  175. package/{dist/PileupRenderer → esm/PileupRenderer/renderers}/renderPerBaseQuality.d.ts +1 -1
  176. package/esm/PileupRenderer/{renderPerBaseQuality.js → renderers/renderPerBaseQuality.js} +1 -1
  177. package/esm/PileupRenderer/{renderSoftClipping.d.ts → renderers/renderSoftClipping.d.ts} +2 -2
  178. package/esm/PileupRenderer/{renderSoftClipping.js → renderers/renderSoftClipping.js} +2 -2
  179. package/esm/PileupRenderer/types.d.ts +6 -0
  180. package/esm/SNPCoverageAdapter/generateCoverageBins.js +5 -4
  181. package/esm/SNPCoverageAdapter/processModifications.js +14 -4
  182. package/esm/SNPCoverageRenderer/makeImage.js +44 -33
  183. package/esm/SNPCoverageRenderer/types.d.ts +1 -0
  184. package/esm/shared/LinearReadDisplayBaseMixin.d.ts +24 -0
  185. package/esm/shared/LinearReadDisplayBaseMixin.js +47 -0
  186. package/esm/shared/LinearReadDisplayWithLayoutMixin.d.ts +11 -0
  187. package/esm/shared/LinearReadDisplayWithLayoutMixin.js +21 -0
  188. package/esm/shared/LinearReadDisplayWithPairFiltersMixin.d.ts +11 -0
  189. package/esm/shared/LinearReadDisplayWithPairFiltersMixin.js +24 -0
  190. package/esm/shared/afterAttach.js +3 -2
  191. package/esm/shared/chainToSimpleFeature.d.ts +3 -0
  192. package/esm/shared/chainToSimpleFeature.js +40 -0
  193. package/esm/shared/chevron.d.ts +1 -0
  194. package/esm/shared/chevron.js +24 -0
  195. package/esm/shared/color.d.ts +43 -6
  196. package/esm/shared/color.js +96 -20
  197. package/esm/shared/components/BaseDisplayComponent.d.ts +12 -3
  198. package/esm/shared/components/BaseDisplayComponent.js +2 -2
  199. package/esm/shared/components/SetFeatureHeightDialog.d.ts +10 -0
  200. package/esm/shared/components/SetFeatureHeightDialog.js +24 -0
  201. package/esm/shared/components/SetMaxHeightDialog.d.ts +8 -0
  202. package/esm/shared/components/SetMaxHeightDialog.js +26 -0
  203. package/esm/shared/drawLongReadChains.d.ts +24 -0
  204. package/esm/shared/drawLongReadChains.js +101 -0
  205. package/esm/shared/drawPairChains.d.ts +24 -0
  206. package/esm/shared/drawPairChains.js +91 -0
  207. package/esm/shared/flatbushType.d.ts +12 -0
  208. package/esm/shared/flatbushType.js +1 -0
  209. package/esm/shared/getUniqueModifications.d.ts +4 -1
  210. package/esm/shared/menuItems.d.ts +23 -0
  211. package/esm/shared/menuItems.js +49 -0
  212. package/esm/shared/modificationData.d.ts +6 -0
  213. package/esm/shared/modificationData.js +18 -0
  214. package/esm/shared/primaryStrand.d.ts +3 -0
  215. package/esm/shared/primaryStrand.js +20 -0
  216. package/esm/shared/types.d.ts +2 -0
  217. package/esm/shared/util.d.ts +2 -0
  218. package/esm/shared/util.js +4 -0
  219. package/esm/util.d.ts +1 -6
  220. package/esm/util.js +2 -14
  221. package/package.json +6 -6
  222. package/dist/LinearReadCloudDisplay/drawFeats.js +0 -27
  223. package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +0 -11
  224. package/dist/LinearReadCloudDisplay/drawLongReadChains.js +0 -64
  225. package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +0 -17
  226. package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -94
  227. package/dist/PileupRenderer/renderModifications.js +0 -44
  228. package/esm/LinearReadCloudDisplay/drawFeats.js +0 -24
  229. package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +0 -11
  230. package/esm/LinearReadCloudDisplay/drawLongReadChains.js +0 -61
  231. package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +0 -17
  232. package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -90
  233. package/esm/PileupRenderer/renderModifications.js +0 -41
  234. /package/dist/CramAdapter/{util.d.ts → readFeaturesToCIGAR.d.ts} +0 -0
  235. /package/dist/LinearReadCloudDisplay/{drawFeats.d.ts → drawFeatsAbstract.d.ts} +0 -0
  236. /package/{esm/LinearReadCloudDisplay/drawFeats.d.ts → dist/LinearReadCloudDisplay/drawFeatsCloud.d.ts} +0 -0
  237. /package/dist/PileupRenderer/{getAlignmentShapeColor.d.ts → renderers/getAlignmentShapeColor.d.ts} +0 -0
  238. /package/dist/{LinearReadCloudDisplay/util.d.ts → shared/canvasUtils.d.ts} +0 -0
  239. /package/dist/{LinearReadCloudDisplay/util.js → shared/canvasUtils.js} +0 -0
  240. /package/esm/CramAdapter/{util.d.ts → readFeaturesToCIGAR.d.ts} +0 -0
  241. /package/esm/PileupRenderer/{getAlignmentShapeColor.d.ts → renderers/getAlignmentShapeColor.d.ts} +0 -0
  242. /package/esm/{LinearReadCloudDisplay/util.d.ts → shared/canvasUtils.d.ts} +0 -0
  243. /package/esm/{LinearReadCloudDisplay/util.js → shared/canvasUtils.js} +0 -0
@@ -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,4 +1,12 @@
1
1
  import { orientationTypes, pairMap } from '../util';
2
+ export const PairType = {
3
+ PROPER_PAIR: 0,
4
+ LONG_INSERT: 1,
5
+ SHORT_INSERT: 2,
6
+ INTER_CHROM: 3,
7
+ ABNORMAL_ORIENTATION: 4,
8
+ UNMAPPED_MATE: 5,
9
+ };
2
10
  export const fillColor = {
3
11
  color_fwd_strand_not_proper: '#ECC8C8',
4
12
  color_rev_strand_not_proper: '#BEBED8',
@@ -9,13 +17,14 @@ export const fillColor = {
9
17
  color_fwd_diff_chr: '#000',
10
18
  color_rev_diff_chr: '#969696',
11
19
  color_pair_lr: '#c8c8c8',
12
- color_pair_rr: 'navy',
20
+ color_pair_rr: '#3a3a9d',
13
21
  color_pair_rl: 'teal',
14
22
  color_pair_ll: 'green',
15
23
  color_nostrand: '#c8c8c8',
16
24
  color_interchrom: 'purple',
17
25
  color_longinsert: 'red',
18
26
  color_shortinsert: 'pink',
27
+ color_unmapped_mate: '#8B008B',
19
28
  color_unknown: 'grey',
20
29
  };
21
30
  export const strokeColor = {
@@ -28,38 +37,78 @@ export const strokeColor = {
28
37
  color_fwd_diff_chr: '#000000',
29
38
  color_rev_diff_chr: '#696969',
30
39
  color_pair_lr: '#8C8C8C',
31
- color_pair_rr: '#00005A',
40
+ color_pair_rr: '#00002A',
32
41
  color_pair_rl: '#005A5A',
33
42
  color_pair_ll: '#005A00',
34
43
  color_nostrand: '#8C8C8C',
35
44
  color_interchrom: '#5A005A',
36
45
  color_longinsert: '#B30000',
37
46
  color_shortinsert: '#FF3A5C',
38
- color_unknown: 'grey',
47
+ color_unmapped_mate: '#5A005A',
48
+ color_unknown: '#444',
39
49
  };
40
- export function getPairedInsertSizeColor(f1, f2, stats) {
41
- const sameRef = f1.refName === f2.refName;
42
- const tlen = Math.abs(f1.tlen || 0);
43
- if (sameRef && tlen > ((stats === null || stats === void 0 ? void 0 : stats.upper) || 0)) {
44
- return [fillColor.color_longinsert, strokeColor.color_longinsert];
50
+ const defaultColor = [
51
+ fillColor.color_pair_lr,
52
+ strokeColor.color_pair_lr,
53
+ ];
54
+ export function getPairedType({ type, f1, f2, stats, }) {
55
+ if (f1.flags !== undefined && f1.flags & 8) {
56
+ return PairType.UNMAPPED_MATE;
45
57
  }
46
- else if (sameRef && tlen < ((stats === null || stats === void 0 ? void 0 : stats.lower) || 0)) {
47
- return [fillColor.color_shortinsert, strokeColor.color_shortinsert];
58
+ if (type === 'insertSizeAndOrientation' || type === 'orientation') {
59
+ const orientationType = orientationTypes.fr;
60
+ const r = orientationType[f1.pair_orientation || ''];
61
+ if (r && r !== 'LR') {
62
+ return PairType.ABNORMAL_ORIENTATION;
63
+ }
48
64
  }
49
- else if (!sameRef) {
50
- return [fillColor.color_interchrom, strokeColor.color_interchrom];
51
- }
52
- else {
53
- return undefined;
65
+ if (type === 'insertSizeAndOrientation' || type === 'insertSize') {
66
+ const sameRef = f1.refName === f2.refName;
67
+ const tlen = Math.abs(f1.tlen || 0);
68
+ if (!sameRef) {
69
+ return PairType.INTER_CHROM;
70
+ }
71
+ if (stats) {
72
+ if (tlen > stats.upper) {
73
+ return PairType.LONG_INSERT;
74
+ }
75
+ if (tlen < stats.lower) {
76
+ return PairType.SHORT_INSERT;
77
+ }
78
+ }
54
79
  }
80
+ return PairType.PROPER_PAIR;
55
81
  }
56
- const defaultColor = [fillColor.color_unknown, fillColor.color_unknown];
57
- export function getPairedInsertSizeAndOrientationColor(f1, f2, stats) {
58
- return (getPairedOrientationColorOrDefault(f1) ||
59
- getPairedInsertSizeColor(f1, f2, stats) ||
60
- defaultColor);
82
+ export function getPairedInsertSizeColor(f1, f2, stats) {
83
+ const pairType = getPairedType({ type: 'insertSize', f1, f2, stats });
84
+ switch (pairType) {
85
+ case PairType.UNMAPPED_MATE:
86
+ return [
87
+ fillColor.color_unmapped_mate,
88
+ strokeColor.color_unmapped_mate,
89
+ ];
90
+ case PairType.LONG_INSERT:
91
+ return [fillColor.color_longinsert, strokeColor.color_longinsert];
92
+ case PairType.SHORT_INSERT:
93
+ return [
94
+ fillColor.color_shortinsert,
95
+ strokeColor.color_shortinsert,
96
+ ];
97
+ case PairType.INTER_CHROM:
98
+ return [fillColor.color_interchrom, strokeColor.color_interchrom];
99
+ case PairType.PROPER_PAIR:
100
+ return undefined;
101
+ default:
102
+ return undefined;
103
+ }
61
104
  }
62
105
  export function getPairedOrientationColorOrDefault(f) {
106
+ if (f.flags !== undefined && f.flags & 8) {
107
+ return [
108
+ fillColor.color_unmapped_mate,
109
+ strokeColor.color_unmapped_mate,
110
+ ];
111
+ }
63
112
  const type = orientationTypes.fr;
64
113
  const r = type[f.pair_orientation || ''];
65
114
  const type2 = pairMap[r];
@@ -70,3 +119,30 @@ export function getPairedOrientationColorOrDefault(f) {
70
119
  export function getPairedOrientationColor(f) {
71
120
  return getPairedOrientationColorOrDefault(f) || defaultColor;
72
121
  }
122
+ export function getPairedInsertSizeAndOrientationColor(f1, f2, stats) {
123
+ return (getPairedOrientationColorOrDefault(f1) ||
124
+ getPairedInsertSizeColor(f1, f2, stats) ||
125
+ defaultColor);
126
+ }
127
+ export function getSingletonColor(f, stats) {
128
+ const tlen = Math.abs(f.tlen || 0);
129
+ if (stats && tlen > stats.upper) {
130
+ return [
131
+ fillColor.color_fwd_missing_mate,
132
+ strokeColor.color_fwd_missing_mate,
133
+ ];
134
+ }
135
+ return defaultColor;
136
+ }
137
+ export function getPairedColor({ type, v0, v1, stats, }) {
138
+ if (type === 'insertSizeAndOrientation') {
139
+ return getPairedInsertSizeAndOrientationColor(v0, v1, stats);
140
+ }
141
+ if (type === 'orientation') {
142
+ return getPairedOrientationColor(v0);
143
+ }
144
+ if (type === 'insertSize') {
145
+ return getPairedInsertSizeColor(v0, v1, stats);
146
+ }
147
+ return undefined;
148
+ }
@@ -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;
@@ -18,7 +18,7 @@ const useStyles = makeStyles()(theme => ({
18
18
  textAlign: 'center',
19
19
  },
20
20
  }));
21
- const BlockError = observer(function ({ model, }) {
21
+ const BlockError = observer(function ({ model }) {
22
22
  const { error } = model;
23
23
  return (_jsx(BlockMsg, { message: `${error}`, severity: "error", action: _jsx(Tooltip, { title: "Reload", children: _jsx(Button, { "data-testid": "reload_button", onClick: () => {
24
24
  model.reload();
@@ -34,7 +34,7 @@ const DataDisplay = observer(function ({ model, children, }) {
34
34
  const left = (model.lastDrawnOffsetPx || 0) - view.offsetPx;
35
35
  return (_jsxs("div", { "data-testid": `drawn-${drawn}`, children: [_jsx("div", { style: { position: 'absolute', left }, children: children }), left !== 0 || loading ? _jsx(LoadingBar, { model: model }) : null] }));
36
36
  });
37
- const LoadingBar = observer(function ({ model, }) {
37
+ const LoadingBar = observer(function ({ model }) {
38
38
  const { classes } = useStyles();
39
39
  const { message } = model;
40
40
  return (_jsx("div", { className: classes.loading, children: _jsx(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,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Dialog } from '@jbrowse/core/ui';
4
+ import { Button, Checkbox, DialogActions, DialogContent, FormControlLabel, TextField, Typography, } from '@mui/material';
5
+ import { observer } from 'mobx-react';
6
+ const SetFeatureHeightDialog = observer(function (props) {
7
+ const { model, handleClose } = props;
8
+ const { featureHeightSetting, noSpacing: noSpacingSetting } = model;
9
+ const [height, setHeight] = useState(`${featureHeightSetting}`);
10
+ const [noSpacing, setNoSpacing] = useState(noSpacingSetting);
11
+ const ok = height !== '' && !Number.isNaN(+height);
12
+ return (_jsx(Dialog, { open: true, onClose: handleClose, title: "Set feature height", children: _jsxs(DialogContent, { children: [_jsx(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." }), _jsx(TextField, { value: height, helperText: "Feature height", onChange: event => {
13
+ setHeight(event.target.value);
14
+ } }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: !!noSpacing, onChange: () => {
15
+ setNoSpacing(val => !val);
16
+ } }), label: "Remove spacing between features in y-direction?" }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, disabled: !ok, onClick: () => {
17
+ model.setFeatureHeight(height !== '' && !Number.isNaN(+height) ? +height : undefined);
18
+ model.setNoSpacing(noSpacing);
19
+ handleClose();
20
+ }, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
21
+ handleClose();
22
+ }, children: "Cancel" })] })] }) }));
23
+ });
24
+ export 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,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Dialog } from '@jbrowse/core/ui';
4
+ import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
5
+ import { observer } from 'mobx-react';
6
+ import { makeStyles } from 'tss-react/mui';
7
+ const useStyles = makeStyles()({
8
+ root: {
9
+ width: 500,
10
+ },
11
+ });
12
+ const SetMaxHeightDialog = observer(function (props) {
13
+ const { model, handleClose } = props;
14
+ const { classes } = useStyles();
15
+ const { maxHeight = '' } = model;
16
+ const [max, setMax] = useState(`${maxHeight}`);
17
+ return (_jsx(Dialog, { open: true, onClose: handleClose, title: "Set max height", children: _jsxs(DialogContent, { className: classes.root, children: [_jsx(Typography, { children: "Set max height for the track. For example, you can increase this if the layout says \"Max height reached\"" }), _jsx(TextField, { value: max, autoFocus: true, onChange: event => {
18
+ setMax(event.target.value);
19
+ }, placeholder: "Enter max height for layout" }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, onClick: () => {
20
+ model.setMaxHeight(max !== '' && !Number.isNaN(+max) ? +max : undefined);
21
+ handleClose();
22
+ }, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
23
+ handleClose();
24
+ }, children: "Cancel" })] })] }) }));
25
+ });
26
+ export 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 {};
@@ -0,0 +1,101 @@
1
+ import { fillRectCtx, strokeRectCtx } from './canvasUtils';
2
+ import { drawChevron } from './chevron';
3
+ import { fillColor, getSingletonColor, strokeColor } from './color';
4
+ import { getPrimaryStrandFromFlags } from './primaryStrand';
5
+ import { CHEVRON_WIDTH } from './util';
6
+ export function drawLongReadChains({ ctx, chainData, view, asm, chainYOffsets, renderChevrons, featureHeight, featuresForFlatbush, computedChains, flipStrandLongReadChains, }) {
7
+ var _a, _b;
8
+ const getStrandColorKey = (strand) => strand === -1 ? 'color_rev_strand' : 'color_fwd_strand';
9
+ for (const computedChain of computedChains) {
10
+ const { id, chain, minX, maxX } = computedChain;
11
+ let isPairedEnd = false;
12
+ for (const element of chain) {
13
+ if (element.flags & 1) {
14
+ isPairedEnd = true;
15
+ break;
16
+ }
17
+ }
18
+ if (isPairedEnd) {
19
+ continue;
20
+ }
21
+ const chainY = chainYOffsets.get(id);
22
+ if (chainY === undefined) {
23
+ continue;
24
+ }
25
+ const nonSupplementary = [];
26
+ for (const element of chain) {
27
+ if (!(element.flags & 2048)) {
28
+ nonSupplementary.push(element);
29
+ }
30
+ }
31
+ const isSingleton = chain.length === 1;
32
+ const c1 = nonSupplementary[0] || chain[0];
33
+ const primaryStrand = getPrimaryStrandFromFlags(c1);
34
+ if (!isSingleton) {
35
+ const firstFeat = chain[0];
36
+ const lastFeat = chain[chain.length - 1];
37
+ const firstPx = (_a = view.bpToPx({
38
+ refName: asm.getCanonicalRefName2(firstFeat.refName),
39
+ coord: firstFeat.start,
40
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx;
41
+ const lastPx = (_b = view.bpToPx({
42
+ refName: asm.getCanonicalRefName2(lastFeat.refName),
43
+ coord: lastFeat.end,
44
+ })) === null || _b === void 0 ? void 0 : _b.offsetPx;
45
+ if (firstPx !== undefined && lastPx !== undefined) {
46
+ const lineY = chainY + featureHeight / 2 - 0.5;
47
+ ctx.beginPath();
48
+ ctx.strokeStyle = '#666';
49
+ ctx.moveTo(firstPx - view.offsetPx, lineY);
50
+ ctx.lineTo(lastPx - view.offsetPx, lineY);
51
+ ctx.stroke();
52
+ }
53
+ }
54
+ const viewOffsetPx = view.offsetPx;
55
+ const chainMinXPx = minX - viewOffsetPx;
56
+ const chainMaxXPx = maxX - viewOffsetPx;
57
+ for (let i = 0, l = chain.length; i < l; i++) {
58
+ const feat = chain[i];
59
+ const s = view.bpToPx({
60
+ refName: asm.getCanonicalRefName2(feat.refName),
61
+ coord: feat.start,
62
+ });
63
+ const e = view.bpToPx({
64
+ refName: asm.getCanonicalRefName2(feat.refName),
65
+ coord: feat.end,
66
+ });
67
+ if (!s || !e) {
68
+ continue;
69
+ }
70
+ const effectiveStrand = isSingleton || !flipStrandLongReadChains
71
+ ? feat.strand
72
+ : feat.strand * primaryStrand;
73
+ const [featureFill, featureStroke] = isSingleton
74
+ ? getSingletonColor(feat, chainData.stats)
75
+ : [
76
+ fillColor[getStrandColorKey(effectiveStrand)],
77
+ strokeColor[getStrandColorKey(effectiveStrand)],
78
+ ];
79
+ const xPos = s.offsetPx - viewOffsetPx;
80
+ const width = Math.max(e.offsetPx - s.offsetPx, 3);
81
+ if (renderChevrons) {
82
+ drawChevron(ctx, xPos, chainY, width, featureHeight, effectiveStrand, featureFill, CHEVRON_WIDTH, featureStroke);
83
+ }
84
+ else {
85
+ fillRectCtx(xPos, chainY, width, featureHeight, ctx, featureFill);
86
+ strokeRectCtx(xPos, chainY, width, featureHeight, ctx, featureStroke);
87
+ }
88
+ featuresForFlatbush.push({
89
+ x1: xPos,
90
+ y1: chainY,
91
+ x2: xPos + width,
92
+ y2: chainY + featureHeight,
93
+ data: feat,
94
+ chainId: id,
95
+ chainMinX: chainMinXPx,
96
+ chainMaxX: chainMaxXPx,
97
+ chain,
98
+ });
99
+ }
100
+ }
101
+ }
@@ -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 drawPairChains({ ctx, type, chainData, view, asm, chainYOffsets, renderChevrons, featureHeight, featuresForFlatbush, computedChains, }: {
7
+ ctx: CanvasRenderingContext2D;
8
+ type: string;
9
+ chainData: ChainData;
10
+ view: LGV;
11
+ asm: Assembly;
12
+ chainYOffsets: Map<string, number>;
13
+ renderChevrons: boolean;
14
+ featureHeight: number;
15
+ featuresForFlatbush: FlatbushEntry[];
16
+ computedChains: {
17
+ distance: number;
18
+ minX: number;
19
+ maxX: number;
20
+ chain: ReducedFeature[];
21
+ id: string;
22
+ }[];
23
+ }): void;
24
+ export {};
@@ -0,0 +1,91 @@
1
+ import { fillRectCtx, strokeRectCtx } from './canvasUtils';
2
+ import { drawChevron } from './chevron';
3
+ import { getPairedColor, getSingletonColor } from './color';
4
+ import { CHEVRON_WIDTH } from './util';
5
+ export function drawPairChains({ ctx, type, chainData, view, asm, chainYOffsets, renderChevrons, featureHeight, featuresForFlatbush, computedChains, }) {
6
+ var _a, _b;
7
+ for (const computedChain of computedChains) {
8
+ const { id, chain, minX, maxX } = computedChain;
9
+ let isPairedEnd = false;
10
+ for (const element of chain) {
11
+ if (element.flags & 1) {
12
+ isPairedEnd = true;
13
+ break;
14
+ }
15
+ }
16
+ if (!isPairedEnd) {
17
+ continue;
18
+ }
19
+ const chainY = chainYOffsets.get(id);
20
+ if (chainY === undefined) {
21
+ continue;
22
+ }
23
+ const nonSupplementary = [];
24
+ for (const element of chain) {
25
+ if (!(element.flags & 2048)) {
26
+ nonSupplementary.push(element);
27
+ }
28
+ }
29
+ const hasBothMates = nonSupplementary.length === 2;
30
+ const [pairedFill, pairedStroke] = hasBothMates
31
+ ? getPairedColor({
32
+ type,
33
+ v0: nonSupplementary[0],
34
+ v1: nonSupplementary[1],
35
+ stats: chainData.stats,
36
+ }) || ['#888', '#888']
37
+ : getSingletonColor(nonSupplementary[0] || chain[0], chainData.stats);
38
+ if (hasBothMates) {
39
+ const v0 = nonSupplementary[0];
40
+ const v1 = nonSupplementary[1];
41
+ const r1s = (_a = view.bpToPx({
42
+ refName: asm.getCanonicalRefName2(v0.refName),
43
+ coord: v0.start,
44
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx;
45
+ const r2s = (_b = view.bpToPx({
46
+ refName: asm.getCanonicalRefName2(v1.refName),
47
+ coord: v1.start,
48
+ })) === null || _b === void 0 ? void 0 : _b.offsetPx;
49
+ if (r1s !== undefined && r2s !== undefined) {
50
+ fillRectCtx(r1s - view.offsetPx, chainY + featureHeight / 2 - 0.5, r2s - r1s, 1, ctx, '#666');
51
+ }
52
+ }
53
+ const viewOffsetPx = view.offsetPx;
54
+ const chainMinXPx = minX - viewOffsetPx;
55
+ const chainMaxXPx = maxX - viewOffsetPx;
56
+ for (let i = 0, l = chain.length; i < l; i++) {
57
+ const feat = chain[i];
58
+ const s = view.bpToPx({
59
+ refName: asm.getCanonicalRefName2(feat.refName),
60
+ coord: feat.start,
61
+ });
62
+ const e = view.bpToPx({
63
+ refName: asm.getCanonicalRefName2(feat.refName),
64
+ coord: feat.end,
65
+ });
66
+ if (!s || !e) {
67
+ continue;
68
+ }
69
+ const xPos = s.offsetPx - viewOffsetPx;
70
+ const width = Math.max(e.offsetPx - s.offsetPx, 3);
71
+ if (renderChevrons) {
72
+ drawChevron(ctx, xPos, chainY, width, featureHeight, feat.strand, pairedFill, CHEVRON_WIDTH, pairedStroke);
73
+ }
74
+ else {
75
+ fillRectCtx(xPos, chainY, width, featureHeight, ctx, pairedFill);
76
+ strokeRectCtx(xPos, chainY, width, featureHeight, ctx, pairedStroke);
77
+ }
78
+ featuresForFlatbush.push({
79
+ x1: xPos,
80
+ y1: chainY,
81
+ x2: xPos + width,
82
+ y2: chainY + featureHeight,
83
+ data: feat,
84
+ chainId: id,
85
+ chainMinX: chainMinXPx,
86
+ chainMaxX: chainMaxXPx,
87
+ chain,
88
+ });
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,12 @@
1
+ import type { ReducedFeature } from './fetchChains';
2
+ export interface FlatbushEntry {
3
+ x1: number;
4
+ y1: number;
5
+ x2: number;
6
+ y2: number;
7
+ data: ReducedFeature;
8
+ chainId: string;
9
+ chainMinX: number;
10
+ chainMaxX: number;
11
+ chain: ReducedFeature[];
12
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -12,4 +12,7 @@ export declare function getUniqueModifications({ model, adapterConfig, blocks, o
12
12
  adapterConfig: AnyConfigurationModel;
13
13
  blocks: BlockSet;
14
14
  opts?: ModificationOpts;
15
- }): Promise<ModificationType[]>;
15
+ }): Promise<{
16
+ modifications: ModificationType[];
17
+ simplexModifications: string[];
18
+ }>;
@@ -0,0 +1,23 @@
1
+ interface LinearReadDisplayModel {
2
+ setColorScheme: (colorBy: {
3
+ type: string;
4
+ }) => void;
5
+ }
6
+ export declare function getColorSchemeMenuItem(model: LinearReadDisplayModel): {
7
+ label: string;
8
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
9
+ muiName: string;
10
+ };
11
+ subMenu: {
12
+ label: string;
13
+ onClick: () => void;
14
+ }[];
15
+ };
16
+ export declare function getFilterByMenuItem(model: unknown): {
17
+ label: string;
18
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
19
+ muiName: string;
20
+ };
21
+ onClick: () => void;
22
+ };
23
+ export {};