@jbrowse/plugin-alignments 2.17.0 → 3.0.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 (471) hide show
  1. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +2 -3
  2. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +25 -24
  3. package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
  4. package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
  5. package/dist/AlignmentsFeatureDetail/Flags.d.ts +1 -2
  6. package/dist/AlignmentsFeatureDetail/Flags.js +8 -10
  7. package/dist/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
  8. package/dist/AlignmentsFeatureDetail/Formatter.js +11 -39
  9. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +4 -7
  10. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +46 -54
  11. package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +4 -7
  12. package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +58 -61
  13. package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +3 -4
  14. package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +4 -5
  15. package/dist/AlignmentsFeatureDetail/PairLink.d.ts +2 -3
  16. package/dist/AlignmentsFeatureDetail/PairLink.js +3 -7
  17. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +3 -4
  18. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +6 -9
  19. package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +2 -3
  20. package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +21 -31
  21. package/dist/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
  22. package/dist/AlignmentsFeatureDetail/getSAFeatures.js +0 -4
  23. package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
  24. package/dist/AlignmentsFeatureDetail/index.js +17 -7
  25. package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
  26. package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
  27. package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
  28. package/dist/AlignmentsFeatureDetail/tagInfo.js +1 -1
  29. package/dist/AlignmentsFeatureDetail/util.d.ts +1 -1
  30. package/dist/AlignmentsTrack/configSchemaF.d.ts +1 -1
  31. package/dist/AlignmentsTrack/configSchemaF.js +1 -8
  32. package/dist/AlignmentsTrack/index.d.ts +1 -1
  33. package/dist/AlignmentsTrack/index.js +0 -3
  34. package/dist/BamAdapter/BamAdapter.d.ts +6 -5
  35. package/dist/BamAdapter/BamAdapter.js +21 -39
  36. package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
  37. package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -3
  38. package/dist/BamAdapter/configSchema.d.ts +0 -17
  39. package/dist/BamAdapter/configSchema.js +1 -22
  40. package/dist/BamAdapter/index.d.ts +1 -1
  41. package/dist/BamAdapter/index.js +17 -7
  42. package/dist/CramAdapter/CramAdapter.d.ts +6 -9
  43. package/dist/CramAdapter/CramAdapter.js +25 -43
  44. package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
  45. package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -17
  46. package/dist/CramAdapter/CramTestAdapters.d.ts +3 -3
  47. package/dist/CramAdapter/CramTestAdapters.js +6 -6
  48. package/dist/CramAdapter/configSchema.d.ts +0 -14
  49. package/dist/CramAdapter/configSchema.js +1 -19
  50. package/dist/CramAdapter/index.d.ts +1 -1
  51. package/dist/CramAdapter/index.js +17 -8
  52. package/dist/CramAdapter/util.d.ts +2 -2
  53. package/dist/CramAdapter/util.js +1 -24
  54. package/dist/GuessAlignmentsTypes/index.d.ts +1 -1
  55. package/dist/GuessAlignmentsTypes/index.js +19 -34
  56. package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
  57. package/dist/HtsgetBamAdapter/configSchema.d.ts +0 -9
  58. package/dist/HtsgetBamAdapter/configSchema.js +1 -14
  59. package/dist/HtsgetBamAdapter/index.d.ts +1 -1
  60. package/dist/HtsgetBamAdapter/index.js +18 -8
  61. package/dist/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
  62. package/dist/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
  63. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -3
  64. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -18
  65. package/dist/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
  66. package/dist/LinearAlignmentsDisplay/configSchema.js +3 -20
  67. package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
  68. package/dist/LinearAlignmentsDisplay/index.js +1 -2
  69. package/dist/LinearAlignmentsDisplay/model.d.ts +7 -77
  70. package/dist/LinearAlignmentsDisplay/model.js +10 -85
  71. package/dist/LinearAlignmentsDisplay/util.d.ts +1 -1
  72. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +52 -164
  73. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +71 -145
  74. package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
  75. package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +12 -41
  76. package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +3 -4
  77. package/dist/LinearPileupDisplay/components/GroupByDialog.js +106 -92
  78. package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +3 -8
  79. package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +3 -7
  80. package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
  81. package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +15 -44
  82. package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
  83. package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +12 -40
  84. package/dist/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
  85. package/dist/LinearPileupDisplay/components/SortByTagDialog.js +17 -46
  86. package/dist/LinearPileupDisplay/configSchema.d.ts +13 -16
  87. package/dist/LinearPileupDisplay/configSchema.js +12 -30
  88. package/dist/LinearPileupDisplay/index.d.ts +1 -1
  89. package/dist/LinearPileupDisplay/index.js +2 -2
  90. package/dist/LinearPileupDisplay/model.d.ts +123 -111
  91. package/dist/LinearPileupDisplay/model.js +29 -109
  92. package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +2 -3
  93. package/dist/LinearReadArcsDisplay/components/ReactComponent.js +6 -33
  94. package/dist/LinearReadArcsDisplay/configSchema.d.ts +12 -20
  95. package/dist/LinearReadArcsDisplay/configSchema.js +8 -31
  96. package/dist/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
  97. package/dist/LinearReadArcsDisplay/drawFeats.js +1 -9
  98. package/dist/LinearReadArcsDisplay/index.d.ts +1 -1
  99. package/dist/LinearReadArcsDisplay/index.js +18 -9
  100. package/dist/LinearReadArcsDisplay/model.d.ts +16 -94
  101. package/dist/LinearReadArcsDisplay/model.js +34 -111
  102. package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
  103. package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +2 -3
  104. package/dist/LinearReadCloudDisplay/components/ReactComponent.js +6 -33
  105. package/dist/LinearReadCloudDisplay/configSchema.d.ts +5 -17
  106. package/dist/LinearReadCloudDisplay/configSchema.js +3 -28
  107. package/dist/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
  108. package/dist/LinearReadCloudDisplay/drawFeats.js +2 -2
  109. package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
  110. package/dist/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
  111. package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
  112. package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -3
  113. package/dist/LinearReadCloudDisplay/index.d.ts +1 -1
  114. package/dist/LinearReadCloudDisplay/index.js +18 -9
  115. package/dist/LinearReadCloudDisplay/model.d.ts +14 -56
  116. package/dist/LinearReadCloudDisplay/model.js +34 -75
  117. package/dist/LinearReadCloudDisplay/util.js +0 -1
  118. package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +2 -3
  119. package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +16 -55
  120. package/dist/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
  121. package/dist/LinearSNPCoverageDisplay/configSchema.js +16 -32
  122. package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
  123. package/dist/LinearSNPCoverageDisplay/index.js +1 -2
  124. package/dist/LinearSNPCoverageDisplay/model.d.ts +13 -54
  125. package/dist/LinearSNPCoverageDisplay/model.js +69 -159
  126. package/dist/MismatchParser/cigarToMismatches.d.ts +2 -3
  127. package/dist/MismatchParser/cigarToMismatches.js +4 -7
  128. package/dist/MismatchParser/getNextRefPos.js +0 -2
  129. package/dist/MismatchParser/index.d.ts +3 -4
  130. package/dist/MismatchParser/index.js +1 -9
  131. package/dist/MismatchParser/mdToMismatches.d.ts +2 -3
  132. package/dist/MismatchParser/mdToMismatches.js +0 -6
  133. package/dist/ModificationParser/index.d.ts +1 -1
  134. package/dist/ModificationParser/index.js +1 -18
  135. package/dist/PileupRPC/base.d.ts +2 -2
  136. package/dist/PileupRPC/base.js +0 -1
  137. package/dist/PileupRPC/index.d.ts +1 -1
  138. package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
  139. package/dist/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
  140. package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
  141. package/dist/PileupRPC/methods/GetReducedFeatures.js +3 -5
  142. package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
  143. package/dist/PileupRPC/methods/GetVisibleModifications.js +1 -1
  144. package/dist/PileupRPC/util.d.ts +1 -1
  145. package/dist/PileupRenderer/PileupLayoutSession.d.ts +5 -5
  146. package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
  147. package/dist/PileupRenderer/PileupRenderer.d.ts +14 -24
  148. package/dist/PileupRenderer/PileupRenderer.js +28 -23
  149. package/dist/PileupRenderer/colorBy.d.ts +2 -2
  150. package/dist/PileupRenderer/colorBy.js +0 -6
  151. package/dist/PileupRenderer/components/PileupRendering.d.ts +2 -3
  152. package/dist/PileupRenderer/components/PileupRendering.js +15 -43
  153. package/dist/PileupRenderer/configSchema.d.ts +5 -31
  154. package/dist/PileupRenderer/configSchema.js +6 -35
  155. package/dist/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
  156. package/dist/PileupRenderer/getAlignmentShapeColor.js +1 -6
  157. package/dist/PileupRenderer/index.d.ts +1 -1
  158. package/dist/PileupRenderer/index.js +1 -1
  159. package/dist/PileupRenderer/layoutFeature.d.ts +2 -2
  160. package/dist/PileupRenderer/layoutFeature.js +0 -1
  161. package/dist/PileupRenderer/layoutFeatures.d.ts +5 -2
  162. package/dist/PileupRenderer/layoutFeatures.js +6 -4
  163. package/dist/PileupRenderer/makeImageData.d.ts +3 -4
  164. package/dist/PileupRenderer/makeImageData.js +10 -2
  165. package/dist/PileupRenderer/renderAlignment.d.ts +3 -3
  166. package/dist/PileupRenderer/renderAlignment.js +3 -5
  167. package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
  168. package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
  169. package/dist/PileupRenderer/renderMethylation.d.ts +4 -4
  170. package/dist/PileupRenderer/renderMethylation.js +0 -4
  171. package/dist/PileupRenderer/renderMismatches.d.ts +5 -4
  172. package/dist/PileupRenderer/renderMismatches.js +19 -25
  173. package/dist/PileupRenderer/renderModifications.d.ts +3 -3
  174. package/dist/PileupRenderer/renderModifications.js +1 -3
  175. package/dist/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
  176. package/dist/PileupRenderer/renderPerBaseLettering.js +0 -1
  177. package/dist/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
  178. package/dist/PileupRenderer/renderPerBaseQuality.js +2 -2
  179. package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
  180. package/dist/PileupRenderer/renderSoftClipping.js +0 -4
  181. package/dist/PileupRenderer/sortUtil.d.ts +2 -2
  182. package/dist/PileupRenderer/sortUtil.js +1 -4
  183. package/dist/PileupRenderer/types.d.ts +26 -0
  184. package/dist/PileupRenderer/types.js +2 -0
  185. package/dist/PileupRenderer/util.d.ts +2 -2
  186. package/dist/PileupRenderer/util.js +1 -3
  187. package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
  188. package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +4 -6
  189. package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
  190. package/dist/SNPCoverageAdapter/configSchema.js +1 -8
  191. package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
  192. package/dist/SNPCoverageAdapter/generateCoverageBins.js +25 -247
  193. package/dist/SNPCoverageAdapter/index.d.ts +1 -1
  194. package/dist/SNPCoverageAdapter/index.js +17 -7
  195. package/dist/SNPCoverageAdapter/processDepth.d.ts +8 -0
  196. package/dist/SNPCoverageAdapter/processDepth.js +38 -0
  197. package/dist/SNPCoverageAdapter/processMismatches.d.ts +9 -0
  198. package/dist/SNPCoverageAdapter/processMismatches.js +58 -0
  199. package/dist/SNPCoverageAdapter/processModifications.d.ts +10 -0
  200. package/dist/SNPCoverageAdapter/processModifications.js +49 -0
  201. package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
  202. package/dist/SNPCoverageAdapter/processReferenceCpGs.js +63 -0
  203. package/dist/SNPCoverageAdapter/util.d.ts +10 -0
  204. package/dist/SNPCoverageAdapter/util.js +41 -0
  205. package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -18
  206. package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +35 -288
  207. package/dist/SNPCoverageRenderer/configSchema.d.ts +3 -18
  208. package/dist/SNPCoverageRenderer/configSchema.js +4 -22
  209. package/dist/SNPCoverageRenderer/index.d.ts +1 -1
  210. package/dist/SNPCoverageRenderer/index.js +2 -2
  211. package/dist/SNPCoverageRenderer/makeImage.d.ts +2 -0
  212. package/dist/SNPCoverageRenderer/makeImage.js +270 -0
  213. package/dist/SNPCoverageRenderer/types.d.ts +19 -0
  214. package/dist/SNPCoverageRenderer/types.js +2 -0
  215. package/dist/index.d.ts +2 -2
  216. package/dist/index.js +29 -19
  217. package/dist/shared/afterAttach.d.ts +1 -1
  218. package/dist/shared/afterAttach.js +0 -2
  219. package/dist/shared/color.d.ts +1 -1
  220. package/dist/shared/color.js +0 -8
  221. package/dist/shared/components/BaseDisplayComponent.d.ts +3 -4
  222. package/dist/shared/components/BaseDisplayComponent.js +13 -19
  223. package/dist/shared/components/FilterByTagDialog.d.ts +2 -3
  224. package/dist/shared/components/FilterByTagDialog.js +44 -94
  225. package/dist/shared/fetchChains.d.ts +2 -2
  226. package/dist/shared/fetchChains.js +1 -2
  227. package/dist/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
  228. package/dist/shared/getMaximumModificationAtEachPosition.js +1 -2
  229. package/dist/shared/getUniqueModifications.d.ts +5 -5
  230. package/dist/shared/getUniqueTags.d.ts +4 -4
  231. package/dist/shared/renderSvgUtil.d.ts +1 -2
  232. package/dist/shared/renderSvgUtil.js +20 -19
  233. package/dist/shared/util.d.ts +11 -1
  234. package/dist/shared/util.js +27 -1
  235. package/dist/util.d.ts +4 -4
  236. package/dist/util.js +3 -9
  237. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +2 -3
  238. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +8 -17
  239. package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
  240. package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
  241. package/esm/AlignmentsFeatureDetail/Flags.d.ts +1 -2
  242. package/esm/AlignmentsFeatureDetail/Flags.js +8 -10
  243. package/esm/AlignmentsFeatureDetail/Formatter.d.ts +1 -2
  244. package/esm/AlignmentsFeatureDetail/Formatter.js +11 -16
  245. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +4 -7
  246. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +30 -48
  247. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +4 -7
  248. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +41 -54
  249. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +3 -4
  250. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +4 -5
  251. package/esm/AlignmentsFeatureDetail/PairLink.d.ts +2 -3
  252. package/esm/AlignmentsFeatureDetail/PairLink.js +3 -4
  253. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +3 -4
  254. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +6 -9
  255. package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +2 -3
  256. package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +22 -29
  257. package/esm/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
  258. package/esm/AlignmentsFeatureDetail/getSAFeatures.js +0 -4
  259. package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
  260. package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
  261. package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
  262. package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
  263. package/esm/AlignmentsFeatureDetail/tagInfo.js +1 -1
  264. package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
  265. package/esm/AlignmentsTrack/configSchemaF.d.ts +1 -1
  266. package/esm/AlignmentsTrack/configSchemaF.js +1 -8
  267. package/esm/AlignmentsTrack/index.d.ts +1 -1
  268. package/esm/AlignmentsTrack/index.js +0 -3
  269. package/esm/BamAdapter/BamAdapter.d.ts +6 -5
  270. package/esm/BamAdapter/BamAdapter.js +19 -37
  271. package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
  272. package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -3
  273. package/esm/BamAdapter/configSchema.d.ts +0 -17
  274. package/esm/BamAdapter/configSchema.js +1 -22
  275. package/esm/BamAdapter/index.d.ts +1 -1
  276. package/esm/CramAdapter/CramAdapter.d.ts +6 -9
  277. package/esm/CramAdapter/CramAdapter.js +24 -42
  278. package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
  279. package/esm/CramAdapter/CramSlightlyLazyFeature.js +0 -17
  280. package/esm/CramAdapter/CramTestAdapters.d.ts +3 -3
  281. package/esm/CramAdapter/CramTestAdapters.js +6 -6
  282. package/esm/CramAdapter/configSchema.d.ts +0 -14
  283. package/esm/CramAdapter/configSchema.js +1 -19
  284. package/esm/CramAdapter/index.d.ts +1 -1
  285. package/esm/CramAdapter/index.js +0 -1
  286. package/esm/CramAdapter/util.d.ts +2 -2
  287. package/esm/CramAdapter/util.js +1 -24
  288. package/esm/GuessAlignmentsTypes/index.d.ts +1 -1
  289. package/esm/GuessAlignmentsTypes/index.js +20 -35
  290. package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
  291. package/esm/HtsgetBamAdapter/configSchema.d.ts +0 -9
  292. package/esm/HtsgetBamAdapter/configSchema.js +1 -14
  293. package/esm/HtsgetBamAdapter/index.d.ts +1 -1
  294. package/esm/HtsgetBamAdapter/index.js +1 -1
  295. package/esm/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
  296. package/esm/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
  297. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +2 -3
  298. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +10 -15
  299. package/esm/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
  300. package/esm/LinearAlignmentsDisplay/configSchema.js +3 -20
  301. package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
  302. package/esm/LinearAlignmentsDisplay/index.js +1 -2
  303. package/esm/LinearAlignmentsDisplay/model.d.ts +7 -77
  304. package/esm/LinearAlignmentsDisplay/model.js +11 -86
  305. package/esm/LinearAlignmentsDisplay/util.d.ts +1 -1
  306. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +52 -164
  307. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +56 -140
  308. package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +1 -2
  309. package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +12 -18
  310. package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +3 -4
  311. package/esm/LinearPileupDisplay/components/GroupByDialog.js +106 -69
  312. package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +3 -8
  313. package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +3 -4
  314. package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.d.ts +1 -2
  315. package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +15 -21
  316. package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.d.ts +1 -2
  317. package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +12 -17
  318. package/esm/LinearPileupDisplay/components/SortByTagDialog.d.ts +1 -2
  319. package/esm/LinearPileupDisplay/components/SortByTagDialog.js +17 -23
  320. package/esm/LinearPileupDisplay/configSchema.d.ts +13 -16
  321. package/esm/LinearPileupDisplay/configSchema.js +12 -30
  322. package/esm/LinearPileupDisplay/index.d.ts +1 -1
  323. package/esm/LinearPileupDisplay/index.js +2 -2
  324. package/esm/LinearPileupDisplay/model.d.ts +123 -111
  325. package/esm/LinearPileupDisplay/model.js +13 -103
  326. package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +2 -3
  327. package/esm/LinearReadArcsDisplay/components/ReactComponent.js +6 -10
  328. package/esm/LinearReadArcsDisplay/configSchema.d.ts +12 -20
  329. package/esm/LinearReadArcsDisplay/configSchema.js +8 -31
  330. package/esm/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
  331. package/esm/LinearReadArcsDisplay/drawFeats.js +1 -9
  332. package/esm/LinearReadArcsDisplay/index.d.ts +1 -1
  333. package/esm/LinearReadArcsDisplay/index.js +1 -2
  334. package/esm/LinearReadArcsDisplay/model.d.ts +16 -94
  335. package/esm/LinearReadArcsDisplay/model.js +18 -105
  336. package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
  337. package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +2 -3
  338. package/esm/LinearReadCloudDisplay/components/ReactComponent.js +6 -10
  339. package/esm/LinearReadCloudDisplay/configSchema.d.ts +5 -17
  340. package/esm/LinearReadCloudDisplay/configSchema.js +3 -28
  341. package/esm/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
  342. package/esm/LinearReadCloudDisplay/drawFeats.js +2 -2
  343. package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
  344. package/esm/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
  345. package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
  346. package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -3
  347. package/esm/LinearReadCloudDisplay/index.d.ts +1 -1
  348. package/esm/LinearReadCloudDisplay/index.js +1 -2
  349. package/esm/LinearReadCloudDisplay/model.d.ts +14 -56
  350. package/esm/LinearReadCloudDisplay/model.js +17 -68
  351. package/esm/LinearReadCloudDisplay/util.js +0 -1
  352. package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +2 -3
  353. package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +16 -52
  354. package/esm/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
  355. package/esm/LinearSNPCoverageDisplay/configSchema.js +16 -32
  356. package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
  357. package/esm/LinearSNPCoverageDisplay/index.js +1 -2
  358. package/esm/LinearSNPCoverageDisplay/model.d.ts +13 -54
  359. package/esm/LinearSNPCoverageDisplay/model.js +53 -153
  360. package/esm/MismatchParser/cigarToMismatches.d.ts +2 -3
  361. package/esm/MismatchParser/cigarToMismatches.js +4 -7
  362. package/esm/MismatchParser/getNextRefPos.js +0 -2
  363. package/esm/MismatchParser/index.d.ts +3 -4
  364. package/esm/MismatchParser/index.js +1 -9
  365. package/esm/MismatchParser/mdToMismatches.d.ts +2 -3
  366. package/esm/MismatchParser/mdToMismatches.js +0 -6
  367. package/esm/ModificationParser/index.d.ts +1 -1
  368. package/esm/ModificationParser/index.js +1 -18
  369. package/esm/PileupRPC/base.d.ts +2 -2
  370. package/esm/PileupRPC/base.js +0 -1
  371. package/esm/PileupRPC/index.d.ts +1 -1
  372. package/esm/PileupRPC/index.js +1 -1
  373. package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
  374. package/esm/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
  375. package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
  376. package/esm/PileupRPC/methods/GetReducedFeatures.js +3 -5
  377. package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
  378. package/esm/PileupRPC/methods/GetVisibleModifications.js +1 -1
  379. package/esm/PileupRPC/util.d.ts +1 -1
  380. package/esm/PileupRenderer/PileupLayoutSession.d.ts +5 -5
  381. package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
  382. package/esm/PileupRenderer/PileupRenderer.d.ts +14 -24
  383. package/esm/PileupRenderer/PileupRenderer.js +12 -17
  384. package/esm/PileupRenderer/colorBy.d.ts +2 -2
  385. package/esm/PileupRenderer/colorBy.js +1 -7
  386. package/esm/PileupRenderer/components/PileupRendering.d.ts +2 -3
  387. package/esm/PileupRenderer/components/PileupRendering.js +15 -20
  388. package/esm/PileupRenderer/configSchema.d.ts +5 -31
  389. package/esm/PileupRenderer/configSchema.js +6 -35
  390. package/esm/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
  391. package/esm/PileupRenderer/getAlignmentShapeColor.js +2 -7
  392. package/esm/PileupRenderer/index.d.ts +1 -1
  393. package/esm/PileupRenderer/index.js +1 -1
  394. package/esm/PileupRenderer/layoutFeature.d.ts +2 -2
  395. package/esm/PileupRenderer/layoutFeature.js +0 -1
  396. package/esm/PileupRenderer/layoutFeatures.d.ts +5 -2
  397. package/esm/PileupRenderer/layoutFeatures.js +7 -5
  398. package/esm/PileupRenderer/makeImageData.d.ts +3 -4
  399. package/esm/PileupRenderer/makeImageData.js +10 -2
  400. package/esm/PileupRenderer/renderAlignment.d.ts +3 -3
  401. package/esm/PileupRenderer/renderAlignment.js +3 -5
  402. package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
  403. package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
  404. package/esm/PileupRenderer/renderMethylation.d.ts +4 -4
  405. package/esm/PileupRenderer/renderMethylation.js +0 -4
  406. package/esm/PileupRenderer/renderMismatches.d.ts +5 -4
  407. package/esm/PileupRenderer/renderMismatches.js +19 -25
  408. package/esm/PileupRenderer/renderModifications.d.ts +3 -3
  409. package/esm/PileupRenderer/renderModifications.js +1 -3
  410. package/esm/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
  411. package/esm/PileupRenderer/renderPerBaseLettering.js +0 -1
  412. package/esm/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
  413. package/esm/PileupRenderer/renderPerBaseQuality.js +2 -2
  414. package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
  415. package/esm/PileupRenderer/renderSoftClipping.js +1 -5
  416. package/esm/PileupRenderer/sortUtil.d.ts +2 -2
  417. package/esm/PileupRenderer/sortUtil.js +1 -4
  418. package/esm/PileupRenderer/types.d.ts +26 -0
  419. package/esm/PileupRenderer/types.js +1 -0
  420. package/esm/PileupRenderer/util.d.ts +2 -2
  421. package/esm/PileupRenderer/util.js +1 -3
  422. package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
  423. package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +5 -7
  424. package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
  425. package/esm/SNPCoverageAdapter/configSchema.js +1 -8
  426. package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
  427. package/esm/SNPCoverageAdapter/generateCoverageBins.js +24 -246
  428. package/esm/SNPCoverageAdapter/index.d.ts +1 -1
  429. package/esm/SNPCoverageAdapter/processDepth.d.ts +8 -0
  430. package/esm/SNPCoverageAdapter/processDepth.js +35 -0
  431. package/esm/SNPCoverageAdapter/processMismatches.d.ts +9 -0
  432. package/esm/SNPCoverageAdapter/processMismatches.js +55 -0
  433. package/esm/SNPCoverageAdapter/processModifications.d.ts +10 -0
  434. package/esm/SNPCoverageAdapter/processModifications.js +46 -0
  435. package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
  436. package/esm/SNPCoverageAdapter/processReferenceCpGs.js +60 -0
  437. package/esm/SNPCoverageAdapter/util.d.ts +10 -0
  438. package/esm/SNPCoverageAdapter/util.js +35 -0
  439. package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -18
  440. package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +3 -289
  441. package/esm/SNPCoverageRenderer/configSchema.d.ts +3 -18
  442. package/esm/SNPCoverageRenderer/configSchema.js +4 -22
  443. package/esm/SNPCoverageRenderer/index.d.ts +1 -1
  444. package/esm/SNPCoverageRenderer/index.js +2 -2
  445. package/esm/SNPCoverageRenderer/makeImage.d.ts +2 -0
  446. package/esm/SNPCoverageRenderer/makeImage.js +267 -0
  447. package/esm/SNPCoverageRenderer/types.d.ts +19 -0
  448. package/esm/SNPCoverageRenderer/types.js +1 -0
  449. package/esm/index.d.ts +2 -2
  450. package/esm/index.js +10 -10
  451. package/esm/shared/afterAttach.d.ts +1 -1
  452. package/esm/shared/afterAttach.js +0 -2
  453. package/esm/shared/color.d.ts +1 -1
  454. package/esm/shared/color.js +0 -8
  455. package/esm/shared/components/BaseDisplayComponent.d.ts +3 -4
  456. package/esm/shared/components/BaseDisplayComponent.js +13 -16
  457. package/esm/shared/components/FilterByTagDialog.d.ts +2 -3
  458. package/esm/shared/components/FilterByTagDialog.js +44 -71
  459. package/esm/shared/fetchChains.d.ts +2 -2
  460. package/esm/shared/fetchChains.js +1 -2
  461. package/esm/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
  462. package/esm/shared/getMaximumModificationAtEachPosition.js +1 -2
  463. package/esm/shared/getUniqueModifications.d.ts +5 -5
  464. package/esm/shared/getUniqueTags.d.ts +4 -4
  465. package/esm/shared/renderSvgUtil.d.ts +1 -2
  466. package/esm/shared/renderSvgUtil.js +3 -9
  467. package/esm/shared/util.d.ts +11 -1
  468. package/esm/shared/util.js +24 -0
  469. package/esm/util.d.ts +4 -4
  470. package/esm/util.js +3 -9
  471. package/package.json +6 -7
@@ -1,32 +1,19 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
2
  import { types } from 'mobx-state-tree';
3
- /**
4
- * #config PileupRenderer
5
- */
6
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ function x() { }
7
4
  const PileupRenderer = ConfigurationSchema('PileupRenderer', {
8
- /**
9
- * #slot
10
- * default magenta here is used to detect the user has not customized this
11
- */
12
5
  color: {
13
6
  type: 'color',
14
7
  description: 'the color of each feature in a pileup alignment',
15
8
  defaultValue: '#f0f',
16
9
  contextVariable: ['feature'],
17
10
  },
18
- /**
19
- * #slot
20
- */
21
11
  orientationType: {
22
12
  type: 'stringEnum',
23
13
  model: types.enumeration('orientationType', ['fr', 'rf', 'ff']),
24
14
  defaultValue: 'fr',
25
15
  description: 'read sequencer orientation. fr is normal "reads pointing at each other ---> <--- while some other sequencers can use other options',
26
16
  },
27
- /**
28
- * #slot
29
- */
30
17
  displayMode: {
31
18
  type: 'stringEnum',
32
19
  model: types.enumeration('displayMode', [
@@ -37,58 +24,42 @@ const PileupRenderer = ConfigurationSchema('PileupRenderer', {
37
24
  description: 'Alternative display modes',
38
25
  defaultValue: 'normal',
39
26
  },
40
- /**
41
- * #slot
42
- */
43
27
  minSubfeatureWidth: {
44
28
  type: 'number',
45
29
  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',
46
30
  defaultValue: 1,
47
31
  },
48
- /**
49
- * #slot
50
- */
32
+ hideSmallIndels: {
33
+ type: 'boolean',
34
+ description: 'Hides small indels, sometimes occurring in long read sequencing',
35
+ defaultValue: false,
36
+ },
51
37
  maxHeight: {
52
38
  type: 'integer',
53
39
  description: 'the maximum height to be used in a pileup rendering',
54
40
  defaultValue: 1200,
55
41
  },
56
- /**
57
- * #slot
58
- */
59
42
  maxClippingSize: {
60
43
  type: 'integer',
61
44
  description: 'the max clip size to be used in a pileup rendering',
62
45
  defaultValue: 10000,
63
46
  },
64
- /**
65
- * #slot
66
- */
67
47
  height: {
68
48
  type: 'number',
69
49
  description: 'the height of each feature in a pileup alignment',
70
50
  defaultValue: 7,
71
51
  contextVariable: ['feature'],
72
52
  },
73
- /**
74
- * #slot
75
- */
76
53
  noSpacing: {
77
54
  type: 'boolean',
78
55
  description: 'remove spacing between features',
79
56
  defaultValue: false,
80
57
  },
81
- /**
82
- * #slot
83
- */
84
58
  largeInsertionIndicatorScale: {
85
59
  type: 'number',
86
60
  description: 'scale at which to draw the large insertion indicators (bp/pixel)',
87
61
  defaultValue: 10,
88
62
  },
89
- /**
90
- * #slot
91
- */
92
63
  mismatchAlpha: {
93
64
  type: 'boolean',
94
65
  defaultValue: false,
@@ -1,5 +1,5 @@
1
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import { Feature } from '@jbrowse/core/util';
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { Feature } from '@jbrowse/core/util';
3
3
  export declare function getAlignmentShapeColor({ colorType, tag, feature, config, defaultColor, colorTagMap, }: {
4
4
  colorType: string;
5
5
  tag: string;
@@ -1,9 +1,7 @@
1
- import { readConfObject, } from '@jbrowse/core/configuration';
2
- import { fillColor } from '../shared/color';
1
+ import { readConfObject } from '@jbrowse/core/configuration';
3
2
  import { colorByInsertSize, colorByMappingQuality, colorByOrientation, colorByStrand, colorByStrandedRnaSeq, } from './colorBy';
3
+ import { fillColor } from '../shared/color';
4
4
  export function getAlignmentShapeColor({ colorType, tag, feature, config, defaultColor, colorTagMap, }) {
5
- // first pass for simple color changes that change the color of the
6
- // alignment
7
5
  switch (colorType) {
8
6
  case 'insertSize':
9
7
  return colorByInsertSize(feature);
@@ -51,9 +49,6 @@ export function getAlignmentShapeColor({ colorType, tag, feature, config, defaul
51
49
  break;
52
50
  case 'modifications':
53
51
  case 'methylation':
54
- // this coloring is similar to igv.js, and is helpful to color negative
55
- // strand reads differently because their c-g will be flipped (e.g. g-c
56
- // read right to left)
57
52
  return feature.get('flags') & 16 ? '#c8dcc8' : '#c8c8c8';
58
53
  default:
59
54
  return defaultColor
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function register(pluginManager: PluginManager): void;
@@ -1,6 +1,6 @@
1
1
  import PileupRenderer from './PileupRenderer';
2
- import configSchema from './configSchema';
3
2
  import ReactComponent from './components/PileupRendering';
3
+ import configSchema from './configSchema';
4
4
  export default function register(pluginManager) {
5
5
  pluginManager.addRendererType(() => {
6
6
  return new PileupRenderer({
@@ -1,5 +1,5 @@
1
- import { Feature, Region } from '@jbrowse/core/util';
2
- import { BaseLayout } from '@jbrowse/core/util/layouts';
1
+ import type { Feature, Region } from '@jbrowse/core/util';
2
+ import type { BaseLayout } from '@jbrowse/core/util/layouts';
3
3
  export interface LayoutRecord {
4
4
  feature: Feature;
5
5
  leftPx: number;
@@ -2,7 +2,6 @@ import { bpSpanPx } from '@jbrowse/core/util';
2
2
  export function layoutFeature({ feature, layout, bpPerPx, region, showSoftClip, heightPx, displayMode, }) {
3
3
  let expansionBefore = 0;
4
4
  let expansionAfter = 0;
5
- // Expand the start and end of feature when softclipping enabled
6
5
  if (showSoftClip) {
7
6
  const mismatches = feature.get('mismatches');
8
7
  const seq = feature.get('seq');
@@ -1,2 +1,5 @@
1
- import { RenderArgsDeserializedWithFeaturesAndLayout } from './PileupRenderer';
2
- export declare function layoutFeats(props: RenderArgsDeserializedWithFeaturesAndLayout): (import("./layoutFeature").LayoutRecord | null)[];
1
+ import type { PreProcessedRenderArgs } from './types';
2
+ export declare function layoutFeats(props: PreProcessedRenderArgs): {
3
+ layoutRecords: import("./layoutFeature").LayoutRecord[];
4
+ height: number;
5
+ };
@@ -1,9 +1,7 @@
1
1
  import { readConfObject } from '@jbrowse/core/configuration';
2
- import { iterMap } from '@jbrowse/core/util';
3
- // locals
2
+ import { iterMap, notEmpty } from '@jbrowse/core/util';
4
3
  import { layoutFeature } from './layoutFeature';
5
4
  import { sortFeature } from './sortUtil';
6
- // layout determines the height of the canvas that we use to render
7
5
  export function layoutFeats(props) {
8
6
  const { layout, features, sortedBy, config, bpPerPx, showSoftClip, regions } = props;
9
7
  const region = regions[0];
@@ -12,7 +10,7 @@ export function layoutFeats(props) {
12
10
  : features;
13
11
  const heightPx = readConfObject(config, 'height');
14
12
  const displayMode = readConfObject(config, 'displayMode');
15
- return iterMap(featureMap.values(), feature => layoutFeature({
13
+ const layoutRecords = iterMap(featureMap.values(), feature => layoutFeature({
16
14
  feature,
17
15
  layout,
18
16
  bpPerPx,
@@ -20,5 +18,9 @@ export function layoutFeats(props) {
20
18
  showSoftClip,
21
19
  heightPx,
22
20
  displayMode,
23
- }), featureMap.size);
21
+ }), featureMap.size).filter(notEmpty);
22
+ return {
23
+ layoutRecords,
24
+ height: Math.max(layout.getTotalHeight(), 1),
25
+ };
24
26
  }
@@ -1,6 +1,5 @@
1
- import { Feature } from '@jbrowse/core/util';
2
- import { RenderArgsDeserializedWithFeaturesAndLayout } from './PileupRenderer';
3
- export type RenderArgsWithColor = RenderArgsDeserializedWithFeaturesAndLayout;
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { Feature } from '@jbrowse/core/util';
4
3
  interface LayoutFeature {
5
4
  heightPx: number;
6
5
  topPx: number;
@@ -10,6 +9,6 @@ export declare function makeImageData({ ctx, layoutRecords, canvasWidth, renderA
10
9
  ctx: CanvasRenderingContext2D;
11
10
  canvasWidth: number;
12
11
  layoutRecords: LayoutFeature[];
13
- renderArgs: RenderArgsWithColor;
12
+ renderArgs: ProcessedRenderArgs;
14
13
  }): undefined;
15
14
  export {};
@@ -1,14 +1,16 @@
1
1
  import { readConfObject } from '@jbrowse/core/configuration';
2
2
  import { createJBrowseTheme } from '@jbrowse/core/ui';
3
- import { getCharWidthHeight, getColorBaseMap, getContrastBaseMap, shouldDrawIndels, shouldDrawSNPsMuted, } from './util';
3
+ import { checkStopToken } from '@jbrowse/core/util/stopToken';
4
4
  import { renderAlignment } from './renderAlignment';
5
5
  import { renderMismatches } from './renderMismatches';
6
6
  import { renderSoftClipping } from './renderSoftClipping';
7
+ import { getCharWidthHeight, getColorBaseMap, getContrastBaseMap, shouldDrawIndels, shouldDrawSNPsMuted, } from './util';
7
8
  export function makeImageData({ ctx, layoutRecords, canvasWidth, renderArgs, }) {
8
- const { config, showSoftClip, colorBy, theme: configTheme } = renderArgs;
9
+ const { stopToken, config, showSoftClip, colorBy, theme: configTheme, } = renderArgs;
9
10
  const mismatchAlpha = readConfObject(config, 'mismatchAlpha');
10
11
  const minSubfeatureWidth = readConfObject(config, 'minSubfeatureWidth');
11
12
  const largeInsertionIndicatorScale = readConfObject(config, 'largeInsertionIndicatorScale');
13
+ const hideSmallIndels = readConfObject(config, 'hideSmallIndels');
12
14
  const defaultColor = readConfObject(config, 'color') === '#f0f';
13
15
  const theme = createJBrowseTheme(configTheme);
14
16
  const colorForBase = getColorBaseMap(theme);
@@ -17,7 +19,12 @@ export function makeImageData({ ctx, layoutRecords, canvasWidth, renderArgs, })
17
19
  const { charWidth, charHeight } = getCharWidthHeight();
18
20
  const drawSNPsMuted = shouldDrawSNPsMuted(colorBy === null || colorBy === void 0 ? void 0 : colorBy.type);
19
21
  const drawIndels = shouldDrawIndels();
22
+ let start = performance.now();
20
23
  for (const feat of layoutRecords) {
24
+ if (performance.now() - start > 400) {
25
+ checkStopToken(stopToken);
26
+ start = performance.now();
27
+ }
21
28
  renderAlignment({
22
29
  ctx,
23
30
  feat,
@@ -33,6 +40,7 @@ export function makeImageData({ ctx, layoutRecords, canvasWidth, renderArgs, })
33
40
  ctx,
34
41
  feat,
35
42
  renderArgs,
43
+ hideSmallIndels,
36
44
  mismatchAlpha,
37
45
  drawSNPsMuted,
38
46
  drawIndels,
@@ -1,9 +1,9 @@
1
- import { LayoutFeature } from './util';
2
- import { RenderArgsWithColor } from './makeImageData';
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { LayoutFeature } from './util';
3
3
  export declare function renderAlignment({ ctx, feat, renderArgs, colorForBase, contrastForBase, charWidth, charHeight, defaultColor, canvasWidth, }: {
4
4
  ctx: CanvasRenderingContext2D;
5
5
  feat: LayoutFeature;
6
- renderArgs: RenderArgsWithColor;
6
+ renderArgs: ProcessedRenderArgs;
7
7
  colorForBase: Record<string, string>;
8
8
  contrastForBase: Record<string, string>;
9
9
  charWidth: number;
@@ -1,10 +1,10 @@
1
1
  import { getAlignmentShapeColor } from './getAlignmentShapeColor';
2
2
  import { renderAlignmentShape } from './renderAlignmentShape';
3
- import { renderPerBaseQuality } from './renderPerBaseQuality';
4
- import { renderPerBaseLettering } from './renderPerBaseLettering';
5
3
  import { renderModifications } from './renderModifications';
6
- import { renderMethylation } from './renderMethylation';
4
+ import { renderPerBaseLettering } from './renderPerBaseLettering';
5
+ import { renderPerBaseQuality } from './renderPerBaseQuality';
7
6
  import { parseCigar } from '../MismatchParser';
7
+ import { renderMethylation } from './renderMethylation';
8
8
  export function renderAlignment({ ctx, feat, renderArgs, colorForBase, contrastForBase, charWidth, charHeight, defaultColor, canvasWidth, }) {
9
9
  const { config, bpPerPx, regions, colorBy, colorTagMap = {} } = renderArgs;
10
10
  const { tag = '', type: colorType = '' } = colorBy || {};
@@ -19,8 +19,6 @@ export function renderAlignment({ ctx, feat, renderArgs, colorForBase, contrastF
19
19
  colorTagMap,
20
20
  });
21
21
  renderAlignmentShape({ ctx, feat, renderArgs });
22
- // second pass for color types that render per-base things that go over the
23
- // existing drawing
24
22
  switch (colorType) {
25
23
  case 'perBaseQuality': {
26
24
  const cigarOps = parseCigar(feature.get('CIGAR'));
@@ -1,7 +1,7 @@
1
- import { RenderArgsDeserialized } from './PileupRenderer';
2
- import { LayoutFeature } from './util';
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { LayoutFeature } from './util';
3
3
  export declare function renderAlignmentShape({ ctx, feat, renderArgs, }: {
4
4
  ctx: CanvasRenderingContext2D;
5
5
  feat: LayoutFeature;
6
- renderArgs: RenderArgsDeserialized;
6
+ renderArgs: ProcessedRenderArgs;
7
7
  }): void;
@@ -10,7 +10,7 @@ export function renderAlignmentShape({ ctx, feat, renderArgs, }) {
10
10
  const flip = region.reversed ? -1 : 1;
11
11
  const strand = feature.get('strand') * flip;
12
12
  const renderChevrons = bpPerPx < 10 && heightPx > 5;
13
- if (CIGAR.includes('N')) {
13
+ if (CIGAR === null || CIGAR === void 0 ? void 0 : CIGAR.includes('N')) {
14
14
  const cigarOps = parseCigar(CIGAR);
15
15
  if (strand === 1) {
16
16
  let drawLen = 0;
@@ -1,12 +1,12 @@
1
- import { Region } from '@jbrowse/core/util';
2
- import { LayoutFeature } from './util';
3
- import { RenderArgsWithColor } from './makeImageData';
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { LayoutFeature } from './util';
3
+ import type { Region } from '@jbrowse/core/util';
4
4
  export declare function renderMethylation({ ctx, feat, region, bpPerPx, renderArgs, canvasWidth, cigarOps, }: {
5
5
  ctx: CanvasRenderingContext2D;
6
6
  feat: LayoutFeature;
7
7
  region: Region;
8
8
  bpPerPx: number;
9
- renderArgs: RenderArgsWithColor;
9
+ renderArgs: ProcessedRenderArgs;
10
10
  canvasWidth: number;
11
11
  cigarOps: string[];
12
12
  }): void;
@@ -1,11 +1,7 @@
1
1
  import { bpSpanPx } from '@jbrowse/core/util';
2
2
  import { colord } from '@jbrowse/core/util/colord';
3
- // locals
4
3
  import { fillRect } from './util';
5
4
  import { getMethBins } from '../ModificationParser';
6
- // Color by methylation is slightly modified version of color by modifications
7
- // at reference CpG sites, with non-methylated CpG colored (looking only at the
8
- // MM tag can not tell you where reference CpG sites are)
9
5
  export function renderMethylation({ ctx, feat, region, bpPerPx, renderArgs, canvasWidth, cigarOps, }) {
10
6
  const { regionSequence } = renderArgs;
11
7
  const { feature, topPx, heightPx } = feat;
@@ -1,9 +1,9 @@
1
- import { LayoutFeature } from './util';
2
- import { RenderArgsWithColor } from './makeImageData';
3
- export declare function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, canvasWidth, drawSNPsMuted, drawIndels, }: {
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { LayoutFeature } from './util';
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
- renderArgs: RenderArgsWithColor;
6
+ renderArgs: ProcessedRenderArgs;
7
7
  colorForBase: Record<string, string>;
8
8
  contrastForBase: Record<string, string>;
9
9
  mismatchAlpha?: boolean;
@@ -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;
@@ -1,7 +1,7 @@
1
1
  import { bpSpanPx, measureText } from '@jbrowse/core/util';
2
- import { fillRect } from './util';
3
2
  import { colord } from '@jbrowse/core/util/colord';
4
- export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, canvasWidth, drawSNPsMuted, drawIndels = true, }) {
3
+ import { fillRect } from './util';
4
+ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, largeInsertionIndicatorScale, mismatchAlpha, charWidth, charHeight, colorForBase, contrastForBase, hideSmallIndels, canvasWidth, drawSNPsMuted, drawIndels = true, }) {
5
5
  const { bpPerPx, regions } = renderArgs;
6
6
  const { heightPx, topPx, feature } = feat;
7
7
  const region = regions[0];
@@ -9,14 +9,10 @@ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, la
9
9
  const pxPerBp = Math.min(1 / bpPerPx, 2);
10
10
  const mismatches = feature.get('mismatches');
11
11
  const heightLim = charHeight - 2;
12
- // extraHorizontallyFlippedOffset is used to draw interbase items, which are
13
- // located to the left when forward and right when reversed
14
12
  const extraHorizontallyFlippedOffset = region.reversed ? 1 / bpPerPx + 1 : -1;
15
13
  if (!mismatches) {
16
14
  return;
17
15
  }
18
- // two pass rendering: first pass, draw all the mismatches except wide
19
- // insertion markers
20
16
  for (const mismatch of mismatches) {
21
17
  const mstart = start + mismatch.start;
22
18
  const mlen = mismatch.length;
@@ -34,7 +30,6 @@ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, la
34
30
  fillRect(ctx, Math.round(leftPx), topPx, widthPx, heightPx, canvasWidth, c);
35
31
  }
36
32
  if (widthPx >= charWidth && heightPx >= heightLim) {
37
- // normal SNP coloring
38
33
  const contrastColor = drawSNPsMuted
39
34
  ? 'black'
40
35
  : contrastForBase[mismatch.base] || 'black';
@@ -48,12 +43,15 @@ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, la
48
43
  }
49
44
  }
50
45
  else if (mismatch.type === 'deletion' && drawIndels) {
51
- fillRect(ctx, leftPx, topPx, Math.abs(leftPx - rightPx), heightPx, canvasWidth, colorForBase.deletion);
52
- const txt = `${mismatch.length}`;
53
- const rwidth = 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);
46
+ const len = mismatch.length;
47
+ if (!hideSmallIndels || len >= 10) {
48
+ fillRect(ctx, leftPx, topPx, Math.abs(leftPx - rightPx), heightPx, canvasWidth, colorForBase.deletion);
49
+ const txt = `${mismatch.length}`;
50
+ const rwidth = measureText(txt, 10);
51
+ if (widthPx >= rwidth && heightPx >= heightLim) {
52
+ ctx.fillStyle = contrastForBase.deletion;
53
+ ctx.fillText(txt, (leftPx + rightPx) / 2 - rwidth / 2, topPx + heightPx);
54
+ }
57
55
  }
58
56
  }
59
57
  else if (mismatch.type === 'insertion' && drawIndels) {
@@ -61,12 +59,14 @@ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, la
61
59
  const len = +mismatch.base || mismatch.length;
62
60
  const insW = Math.max(0, Math.min(1.2, 1 / bpPerPx));
63
61
  if (len < 10) {
64
- fillRect(ctx, pos, topPx, insW, heightPx, canvasWidth, 'purple');
65
- if (1 / bpPerPx >= charWidth && heightPx >= heightLim) {
66
- const l = pos - insW;
67
- fillRect(ctx, l, topPx, insW * 3, 1, canvasWidth);
68
- fillRect(ctx, l, topPx + heightPx - 1, insW * 3, 1, canvasWidth);
69
- ctx.fillText(`(${mismatch.base})`, pos + 3, topPx + heightPx);
62
+ if (!hideSmallIndels) {
63
+ fillRect(ctx, pos, topPx, insW, heightPx, canvasWidth, 'purple');
64
+ if (1 / bpPerPx >= charWidth && heightPx >= heightLim) {
65
+ const l = Math.round(pos - insW);
66
+ fillRect(ctx, l, topPx, insW * 3, 1, canvasWidth);
67
+ fillRect(ctx, l, topPx + heightPx - 1, insW * 3, 1, canvasWidth);
68
+ ctx.fillText(`(${mismatch.base})`, pos + 3, topPx + heightPx);
69
+ }
70
70
  }
71
71
  }
72
72
  }
@@ -83,12 +83,7 @@ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, la
83
83
  }
84
84
  }
85
85
  else if (mismatch.type === 'skip') {
86
- // fix to avoid bad rendering note that this was also related to chrome
87
- // bug https://bugs.chromium.org/p/chromium/issues/detail?id=1131528
88
- //
89
- // also affected firefox ref #1236 #2750
90
86
  if (leftPx + widthPx > 0) {
91
- // make small exons more visible when zoomed far out
92
87
  const adjustPx = widthPx - (bpPerPx > 10 ? 1.5 : 0);
93
88
  const l = Math.max(0, leftPx);
94
89
  const t = topPx + heightPx / 2 - 1;
@@ -98,7 +93,6 @@ export function renderMismatches({ ctx, feat, renderArgs, minSubfeatureWidth, la
98
93
  }
99
94
  }
100
95
  }
101
- // second pass, draw wide insertion markers on top
102
96
  if (drawIndels) {
103
97
  for (const mismatch of mismatches) {
104
98
  const mstart = start + mismatch.start;
@@ -1,12 +1,12 @@
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { LayoutFeature } from './util';
1
3
  import type { Region } from '@jbrowse/core/util';
2
- import { LayoutFeature } from './util';
3
- import { RenderArgsWithColor } from './makeImageData';
4
4
  export declare function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, canvasWidth, cigarOps, }: {
5
5
  ctx: CanvasRenderingContext2D;
6
6
  feat: LayoutFeature;
7
7
  region: Region;
8
8
  bpPerPx: number;
9
- renderArgs: RenderArgsWithColor;
9
+ renderArgs: ProcessedRenderArgs;
10
10
  canvasWidth: number;
11
11
  cigarOps: string[];
12
12
  }): void;
@@ -1,9 +1,7 @@
1
1
  import { bpSpanPx, max, sum } from '@jbrowse/core/util';
2
- // locals
3
2
  import { fillRect } from './util';
4
- import { alphaColor } from '../shared/util';
5
3
  import { getMaxProbModAtEachPosition } from '../shared/getMaximumModificationAtEachPosition';
6
- // render modifications stored in MM tag in BAM
4
+ import { alphaColor } from '../shared/util';
7
5
  export function renderModifications({ ctx, feat, region, bpPerPx, renderArgs, canvasWidth, cigarOps, }) {
8
6
  var _a, _b, _c;
9
7
  const { feature, topPx, heightPx } = feat;
@@ -1,5 +1,5 @@
1
- import { Region } from '@jbrowse/core/util';
2
- import { LayoutFeature } from './util';
1
+ import type { LayoutFeature } from './util';
2
+ import type { Region } from '@jbrowse/core/util';
3
3
  export declare function renderPerBaseLettering({ ctx, feat, region, bpPerPx, colorForBase, contrastForBase, charWidth, charHeight, canvasWidth, cigarOps, }: {
4
4
  ctx: CanvasRenderingContext2D;
5
5
  feat: LayoutFeature;
@@ -28,7 +28,6 @@ export function renderPerBaseLettering({ ctx, feat, region, bpPerPx, colorForBas
28
28
  const c = colorForBase[letter];
29
29
  fillRect(ctx, leftPx, topPx, w + 0.5, heightPx, canvasWidth, c);
30
30
  if (w >= charWidth && heightPx >= heightLim) {
31
- // normal SNP coloring
32
31
  ctx.fillStyle = contrastForBase[letter];
33
32
  ctx.fillText(letter, leftPx + (w - charWidth) / 2 + 1, topPx + heightPx);
34
33
  }
@@ -1,5 +1,5 @@
1
- import { Region } from '@jbrowse/core/util';
2
- import { LayoutFeature } from './util';
1
+ import type { LayoutFeature } from './util';
2
+ import type { Region } from '@jbrowse/core/util';
3
3
  export declare function renderPerBaseQuality({ ctx, feat, region, bpPerPx, canvasWidth, cigarOps, }: {
4
4
  ctx: CanvasRenderingContext2D;
5
5
  feat: LayoutFeature;
@@ -6,8 +6,8 @@ export function renderPerBaseQuality({ ctx, feat, region, bpPerPx, canvasWidth,
6
6
  const scores = qual.split(' ').map(val => +val);
7
7
  const w = 1 / bpPerPx;
8
8
  const start = feature.get('start');
9
- let soffset = 0; // sequence offset
10
- let roffset = 0; // reference offset
9
+ let soffset = 0;
10
+ let roffset = 0;
11
11
  for (let i = 0; i < cigarOps.length; i += 2) {
12
12
  const len = +cigarOps[i];
13
13
  const op = cigarOps[i + 1];
@@ -1,11 +1,11 @@
1
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import { Theme } from '@mui/material';
3
- import { RenderArgsDeserializedWithFeaturesAndLayout } from './PileupRenderer';
4
- import { LayoutFeature } from './util';
1
+ import type { ProcessedRenderArgs } from './types';
2
+ import type { LayoutFeature } from './util';
3
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
+ import type { Theme } from '@mui/material';
5
5
  export declare function renderSoftClipping({ ctx, feat, renderArgs, config, theme, colorForBase, canvasWidth, }: {
6
6
  ctx: CanvasRenderingContext2D;
7
7
  feat: LayoutFeature;
8
- renderArgs: RenderArgsDeserializedWithFeaturesAndLayout;
8
+ renderArgs: ProcessedRenderArgs;
9
9
  config: AnyConfigurationModel;
10
10
  colorForBase: Record<string, string>;
11
11
  theme: Theme;
@@ -1,4 +1,4 @@
1
- import { readConfObject, } from '@jbrowse/core/configuration';
1
+ import { readConfObject } from '@jbrowse/core/configuration';
2
2
  import { bpSpanPx } from '@jbrowse/core/util';
3
3
  import { fillRect, getCharWidthHeight } from './util';
4
4
  import { parseCigar } from '../MismatchParser';
@@ -10,7 +10,6 @@ export function renderSoftClipping({ ctx, feat, renderArgs, config, theme, color
10
10
  const mismatches = feature.get('mismatches');
11
11
  const seq = feature.get('seq');
12
12
  const { charWidth, charHeight } = getCharWidthHeight();
13
- // Display all bases softclipped off in lightened colors
14
13
  if (!(seq && mismatches)) {
15
14
  return;
16
15
  }
@@ -28,8 +27,6 @@ export function renderSoftClipping({ ctx, feat, renderArgs, config, theme, color
28
27
  const s0 = feature.get('start') - (i === 0 ? len : 0) + refOffset + k;
29
28
  const [leftPx, rightPx] = bpSpanPx(s0, s0 + 1, region, bpPerPx);
30
29
  const widthPx = Math.max(minFeatWidth, rightPx - leftPx);
31
- // Black accounts for IUPAC ambiguity code bases such as N that
32
- // show in soft clipping
33
30
  const baseColor = colorForBase[base] || '#000000';
34
31
  ctx.fillStyle = baseColor;
35
32
  fillRect(ctx, leftPx, topPx, widthPx, heightPx, canvasWidth);
@@ -48,7 +45,6 @@ export function renderSoftClipping({ ctx, feat, renderArgs, config, theme, color
48
45
  seqOffset += len;
49
46
  }
50
47
  if (op === 'H') {
51
- // do nothing
52
48
  }
53
49
  if (op === 'D') {
54
50
  refOffset += len;
@@ -1,3 +1,3 @@
1
- import { Feature } from '@jbrowse/core/util';
2
- import { SortedBy } from '../shared/types';
1
+ import type { SortedBy } from '../shared/types';
2
+ import type { Feature } from '@jbrowse/core/util';
3
3
  export declare const sortFeature: (features: Map<string, Feature>, sortedBy: SortedBy) => Map<string, Feature>;
@@ -4,7 +4,6 @@ export const sortFeature = (features, sortedBy) => {
4
4
  const featuresInCenterLine = [];
5
5
  const featuresOutsideCenter = [];
6
6
  const { pos, type } = sortedBy;
7
- // only sort on features that intersect center line, append those outside post-sort
8
7
  featureArray.forEach(innerArray => {
9
8
  const feature = innerArray;
10
9
  const start = feature.get('start');
@@ -37,7 +36,6 @@ export const sortFeature = (features, sortedBy) => {
37
36
  }
38
37
  break;
39
38
  }
40
- // first sort all mismatches, then all reference bases at the end
41
39
  case 'Base pair': {
42
40
  const baseSortArray = [];
43
41
  for (const feature of featuresInCenterLine) {
@@ -59,14 +57,13 @@ export const sortFeature = (features, sortedBy) => {
59
57
  const acode = bMismatch === null || bMismatch === void 0 ? void 0 : bMismatch.base.toUpperCase();
60
58
  const bcode = aMismatch === null || aMismatch === void 0 ? void 0 : aMismatch.base.toUpperCase();
61
59
  return acode === bcode && acode === '*'
62
- ? // @ts-expect-error
60
+ ?
63
61
  aMismatch.length - bMismatch.length
64
62
  : (acode ? acode.charCodeAt(0) : 0) -
65
63
  (bcode ? bcode.charCodeAt(0) : 0);
66
64
  });
67
65
  break;
68
66
  }
69
- // sorts positive strands then negative strands
70
67
  case 'Read strand': {
71
68
  featuresInCenterLine.sort((a, b) => a.get('strand') <= b.get('strand') ? 1 : -1);
72
69
  break;