@jbrowse/plugin-alignments 2.17.0 → 2.18.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 (445) hide show
  1. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
  2. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -12
  3. package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
  4. package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
  5. package/dist/AlignmentsFeatureDetail/Flags.js +2 -2
  6. package/dist/AlignmentsFeatureDetail/Formatter.js +0 -3
  7. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +3 -5
  8. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +4 -9
  9. package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +3 -5
  10. package/dist/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +37 -36
  11. package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +2 -2
  12. package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +3 -4
  13. package/dist/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
  14. package/dist/AlignmentsFeatureDetail/PairLink.js +0 -1
  15. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +2 -2
  16. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +5 -6
  17. package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
  18. package/dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +1 -5
  19. package/dist/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
  20. package/dist/AlignmentsFeatureDetail/getSAFeatures.js +0 -4
  21. package/dist/AlignmentsFeatureDetail/index.d.ts +1 -1
  22. package/dist/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
  23. package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
  24. package/dist/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
  25. package/dist/AlignmentsFeatureDetail/tagInfo.js +1 -1
  26. package/dist/AlignmentsFeatureDetail/util.d.ts +1 -1
  27. package/dist/AlignmentsTrack/configSchemaF.d.ts +1 -1
  28. package/dist/AlignmentsTrack/configSchemaF.js +1 -8
  29. package/dist/AlignmentsTrack/index.d.ts +1 -1
  30. package/dist/AlignmentsTrack/index.js +0 -3
  31. package/dist/BamAdapter/BamAdapter.d.ts +6 -5
  32. package/dist/BamAdapter/BamAdapter.js +21 -39
  33. package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
  34. package/dist/BamAdapter/BamSlightlyLazyFeature.js +0 -3
  35. package/dist/BamAdapter/configSchema.d.ts +0 -17
  36. package/dist/BamAdapter/configSchema.js +1 -22
  37. package/dist/BamAdapter/index.d.ts +1 -1
  38. package/dist/CramAdapter/CramAdapter.d.ts +6 -9
  39. package/dist/CramAdapter/CramAdapter.js +18 -41
  40. package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
  41. package/dist/CramAdapter/CramSlightlyLazyFeature.js +0 -17
  42. package/dist/CramAdapter/CramTestAdapters.d.ts +3 -3
  43. package/dist/CramAdapter/CramTestAdapters.js +4 -5
  44. package/dist/CramAdapter/configSchema.d.ts +0 -14
  45. package/dist/CramAdapter/configSchema.js +1 -19
  46. package/dist/CramAdapter/index.d.ts +1 -1
  47. package/dist/CramAdapter/index.js +0 -1
  48. package/dist/CramAdapter/util.d.ts +2 -2
  49. package/dist/CramAdapter/util.js +1 -24
  50. package/dist/GuessAlignmentsTypes/index.d.ts +1 -1
  51. package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
  52. package/dist/HtsgetBamAdapter/configSchema.d.ts +0 -9
  53. package/dist/HtsgetBamAdapter/configSchema.js +1 -14
  54. package/dist/HtsgetBamAdapter/index.d.ts +1 -1
  55. package/dist/HtsgetBamAdapter/index.js +1 -1
  56. package/dist/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
  57. package/dist/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
  58. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
  59. package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
  60. package/dist/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
  61. package/dist/LinearAlignmentsDisplay/configSchema.js +3 -20
  62. package/dist/LinearAlignmentsDisplay/index.d.ts +1 -1
  63. package/dist/LinearAlignmentsDisplay/index.js +1 -2
  64. package/dist/LinearAlignmentsDisplay/model.d.ts +6 -75
  65. package/dist/LinearAlignmentsDisplay/model.js +5 -78
  66. package/dist/LinearAlignmentsDisplay/util.d.ts +1 -1
  67. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +31 -157
  68. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +34 -133
  69. package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +2 -2
  70. package/dist/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
  71. package/dist/LinearPileupDisplay/components/GroupByDialog.js +109 -56
  72. package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +2 -6
  73. package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -1
  74. package/dist/LinearPileupDisplay/components/SetFeatureHeightDialog.js +2 -2
  75. package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
  76. package/dist/LinearPileupDisplay/components/SortByTagDialog.js +2 -2
  77. package/dist/LinearPileupDisplay/configSchema.d.ts +13 -16
  78. package/dist/LinearPileupDisplay/configSchema.js +12 -30
  79. package/dist/LinearPileupDisplay/index.d.ts +1 -1
  80. package/dist/LinearPileupDisplay/index.js +2 -2
  81. package/dist/LinearPileupDisplay/model.d.ts +103 -105
  82. package/dist/LinearPileupDisplay/model.js +10 -101
  83. package/dist/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
  84. package/dist/LinearReadArcsDisplay/components/ReactComponent.js +2 -6
  85. package/dist/LinearReadArcsDisplay/configSchema.d.ts +12 -20
  86. package/dist/LinearReadArcsDisplay/configSchema.js +8 -31
  87. package/dist/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
  88. package/dist/LinearReadArcsDisplay/drawFeats.js +1 -9
  89. package/dist/LinearReadArcsDisplay/index.d.ts +1 -1
  90. package/dist/LinearReadArcsDisplay/index.js +1 -2
  91. package/dist/LinearReadArcsDisplay/model.d.ts +15 -93
  92. package/dist/LinearReadArcsDisplay/model.js +17 -104
  93. package/dist/LinearReadArcsDisplay/util.d.ts +1 -1
  94. package/dist/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
  95. package/dist/LinearReadCloudDisplay/components/ReactComponent.js +2 -6
  96. package/dist/LinearReadCloudDisplay/configSchema.d.ts +5 -17
  97. package/dist/LinearReadCloudDisplay/configSchema.js +3 -28
  98. package/dist/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
  99. package/dist/LinearReadCloudDisplay/drawFeats.js +2 -2
  100. package/dist/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
  101. package/dist/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
  102. package/dist/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
  103. package/dist/LinearReadCloudDisplay/drawPairChains.js +0 -3
  104. package/dist/LinearReadCloudDisplay/index.d.ts +1 -1
  105. package/dist/LinearReadCloudDisplay/index.js +1 -2
  106. package/dist/LinearReadCloudDisplay/model.d.ts +13 -55
  107. package/dist/LinearReadCloudDisplay/model.js +17 -68
  108. package/dist/LinearReadCloudDisplay/util.js +0 -1
  109. package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
  110. package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
  111. package/dist/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
  112. package/dist/LinearSNPCoverageDisplay/configSchema.js +16 -32
  113. package/dist/LinearSNPCoverageDisplay/index.d.ts +1 -1
  114. package/dist/LinearSNPCoverageDisplay/index.js +1 -2
  115. package/dist/LinearSNPCoverageDisplay/model.d.ts +9 -50
  116. package/dist/LinearSNPCoverageDisplay/model.js +20 -124
  117. package/dist/MismatchParser/cigarToMismatches.d.ts +1 -1
  118. package/dist/MismatchParser/cigarToMismatches.js +4 -7
  119. package/dist/MismatchParser/getNextRefPos.js +0 -2
  120. package/dist/MismatchParser/index.d.ts +2 -2
  121. package/dist/MismatchParser/index.js +1 -9
  122. package/dist/MismatchParser/mdToMismatches.d.ts +2 -2
  123. package/dist/MismatchParser/mdToMismatches.js +0 -6
  124. package/dist/ModificationParser/index.d.ts +1 -1
  125. package/dist/ModificationParser/index.js +1 -18
  126. package/dist/PileupRPC/base.d.ts +2 -2
  127. package/dist/PileupRPC/base.js +0 -1
  128. package/dist/PileupRPC/index.d.ts +1 -1
  129. package/dist/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
  130. package/dist/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
  131. package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
  132. package/dist/PileupRPC/methods/GetReducedFeatures.js +3 -5
  133. package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
  134. package/dist/PileupRPC/methods/GetVisibleModifications.js +1 -1
  135. package/dist/PileupRPC/util.d.ts +1 -1
  136. package/dist/PileupRenderer/PileupLayoutSession.d.ts +5 -5
  137. package/dist/PileupRenderer/PileupLayoutSession.js +2 -5
  138. package/dist/PileupRenderer/PileupRenderer.d.ts +10 -20
  139. package/dist/PileupRenderer/PileupRenderer.js +11 -16
  140. package/dist/PileupRenderer/colorBy.d.ts +2 -2
  141. package/dist/PileupRenderer/colorBy.js +0 -6
  142. package/dist/PileupRenderer/components/PileupRendering.d.ts +1 -1
  143. package/dist/PileupRenderer/components/PileupRendering.js +0 -3
  144. package/dist/PileupRenderer/configSchema.d.ts +0 -31
  145. package/dist/PileupRenderer/configSchema.js +1 -35
  146. package/dist/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
  147. package/dist/PileupRenderer/getAlignmentShapeColor.js +1 -6
  148. package/dist/PileupRenderer/index.d.ts +1 -1
  149. package/dist/PileupRenderer/index.js +1 -1
  150. package/dist/PileupRenderer/layoutFeature.d.ts +2 -2
  151. package/dist/PileupRenderer/layoutFeature.js +0 -1
  152. package/dist/PileupRenderer/layoutFeatures.d.ts +5 -2
  153. package/dist/PileupRenderer/layoutFeatures.js +6 -4
  154. package/dist/PileupRenderer/makeImageData.d.ts +3 -4
  155. package/dist/PileupRenderer/makeImageData.js +8 -2
  156. package/dist/PileupRenderer/renderAlignment.d.ts +3 -3
  157. package/dist/PileupRenderer/renderAlignment.js +3 -5
  158. package/dist/PileupRenderer/renderAlignmentShape.d.ts +3 -3
  159. package/dist/PileupRenderer/renderAlignmentShape.js +1 -1
  160. package/dist/PileupRenderer/renderMethylation.d.ts +4 -4
  161. package/dist/PileupRenderer/renderMethylation.js +0 -4
  162. package/dist/PileupRenderer/renderMismatches.d.ts +3 -3
  163. package/dist/PileupRenderer/renderMismatches.js +1 -12
  164. package/dist/PileupRenderer/renderModifications.d.ts +3 -3
  165. package/dist/PileupRenderer/renderModifications.js +1 -3
  166. package/dist/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
  167. package/dist/PileupRenderer/renderPerBaseLettering.js +0 -1
  168. package/dist/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
  169. package/dist/PileupRenderer/renderPerBaseQuality.js +2 -2
  170. package/dist/PileupRenderer/renderSoftClipping.d.ts +5 -5
  171. package/dist/PileupRenderer/renderSoftClipping.js +0 -4
  172. package/dist/PileupRenderer/sortUtil.d.ts +2 -2
  173. package/dist/PileupRenderer/sortUtil.js +1 -4
  174. package/dist/PileupRenderer/types.d.ts +26 -0
  175. package/dist/PileupRenderer/types.js +2 -0
  176. package/dist/PileupRenderer/util.d.ts +2 -2
  177. package/dist/PileupRenderer/util.js +1 -3
  178. package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
  179. package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +4 -6
  180. package/dist/SNPCoverageAdapter/configSchema.d.ts +0 -4
  181. package/dist/SNPCoverageAdapter/configSchema.js +1 -8
  182. package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
  183. package/dist/SNPCoverageAdapter/generateCoverageBins.js +25 -247
  184. package/dist/SNPCoverageAdapter/index.d.ts +1 -1
  185. package/dist/SNPCoverageAdapter/processDepth.d.ts +8 -0
  186. package/dist/SNPCoverageAdapter/processDepth.js +38 -0
  187. package/dist/SNPCoverageAdapter/processMismatches.d.ts +9 -0
  188. package/dist/SNPCoverageAdapter/processMismatches.js +58 -0
  189. package/dist/SNPCoverageAdapter/processModifications.d.ts +10 -0
  190. package/dist/SNPCoverageAdapter/processModifications.js +49 -0
  191. package/dist/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
  192. package/dist/SNPCoverageAdapter/processReferenceCpGs.js +63 -0
  193. package/dist/SNPCoverageAdapter/util.d.ts +10 -0
  194. package/dist/SNPCoverageAdapter/util.js +41 -0
  195. package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +5 -4
  196. package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +14 -38
  197. package/dist/SNPCoverageRenderer/configSchema.d.ts +0 -15
  198. package/dist/SNPCoverageRenderer/configSchema.js +1 -19
  199. package/dist/SNPCoverageRenderer/index.d.ts +1 -1
  200. package/dist/SNPCoverageRenderer/index.js +2 -2
  201. package/dist/index.d.ts +2 -2
  202. package/dist/index.js +12 -12
  203. package/dist/shared/afterAttach.d.ts +1 -1
  204. package/dist/shared/afterAttach.js +0 -2
  205. package/dist/shared/color.d.ts +1 -1
  206. package/dist/shared/color.js +0 -8
  207. package/dist/shared/components/BaseDisplayComponent.d.ts +2 -2
  208. package/dist/shared/components/BaseDisplayComponent.js +12 -11
  209. package/dist/shared/components/FilterByTagDialog.d.ts +1 -1
  210. package/dist/shared/components/FilterByTagDialog.js +2 -2
  211. package/dist/shared/fetchChains.d.ts +2 -2
  212. package/dist/shared/fetchChains.js +1 -2
  213. package/dist/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
  214. package/dist/shared/getMaximumModificationAtEachPosition.js +1 -2
  215. package/dist/shared/getUniqueModifications.d.ts +5 -5
  216. package/dist/shared/getUniqueTags.d.ts +4 -4
  217. package/dist/shared/renderSvgUtil.js +0 -2
  218. package/dist/shared/util.d.ts +11 -1
  219. package/dist/shared/util.js +27 -1
  220. package/dist/util.d.ts +4 -4
  221. package/dist/util.js +3 -9
  222. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.d.ts +1 -1
  223. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -12
  224. package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +0 -1
  225. package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +0 -1
  226. package/esm/AlignmentsFeatureDetail/Flags.js +2 -2
  227. package/esm/AlignmentsFeatureDetail/Formatter.js +0 -3
  228. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +3 -5
  229. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +5 -10
  230. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts +3 -5
  231. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +37 -36
  232. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.d.ts +2 -2
  233. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +3 -4
  234. package/esm/AlignmentsFeatureDetail/PairLink.d.ts +1 -1
  235. package/esm/AlignmentsFeatureDetail/PairLink.js +0 -1
  236. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +2 -2
  237. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +5 -6
  238. package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts +1 -1
  239. package/esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.js +2 -6
  240. package/esm/AlignmentsFeatureDetail/getSAFeatures.d.ts +2 -2
  241. package/esm/AlignmentsFeatureDetail/getSAFeatures.js +0 -4
  242. package/esm/AlignmentsFeatureDetail/index.d.ts +1 -1
  243. package/esm/AlignmentsFeatureDetail/launchBreakpointSplitView.d.ts +2 -2
  244. package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +2 -2
  245. package/esm/AlignmentsFeatureDetail/stateModelFactory.js +1 -1
  246. package/esm/AlignmentsFeatureDetail/tagInfo.js +1 -1
  247. package/esm/AlignmentsFeatureDetail/util.d.ts +1 -1
  248. package/esm/AlignmentsTrack/configSchemaF.d.ts +1 -1
  249. package/esm/AlignmentsTrack/configSchemaF.js +1 -8
  250. package/esm/AlignmentsTrack/index.d.ts +1 -1
  251. package/esm/AlignmentsTrack/index.js +0 -3
  252. package/esm/BamAdapter/BamAdapter.d.ts +6 -5
  253. package/esm/BamAdapter/BamAdapter.js +19 -37
  254. package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -3
  255. package/esm/BamAdapter/BamSlightlyLazyFeature.js +0 -3
  256. package/esm/BamAdapter/configSchema.d.ts +0 -17
  257. package/esm/BamAdapter/configSchema.js +1 -22
  258. package/esm/BamAdapter/index.d.ts +1 -1
  259. package/esm/CramAdapter/CramAdapter.d.ts +6 -9
  260. package/esm/CramAdapter/CramAdapter.js +17 -40
  261. package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +3 -3
  262. package/esm/CramAdapter/CramSlightlyLazyFeature.js +0 -17
  263. package/esm/CramAdapter/CramTestAdapters.d.ts +3 -3
  264. package/esm/CramAdapter/CramTestAdapters.js +4 -5
  265. package/esm/CramAdapter/configSchema.d.ts +0 -14
  266. package/esm/CramAdapter/configSchema.js +1 -19
  267. package/esm/CramAdapter/index.d.ts +1 -1
  268. package/esm/CramAdapter/index.js +0 -1
  269. package/esm/CramAdapter/util.d.ts +2 -2
  270. package/esm/CramAdapter/util.js +1 -24
  271. package/esm/GuessAlignmentsTypes/index.d.ts +1 -1
  272. package/esm/GuessAlignmentsTypes/index.js +1 -1
  273. package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +2 -2
  274. package/esm/HtsgetBamAdapter/configSchema.d.ts +0 -9
  275. package/esm/HtsgetBamAdapter/configSchema.js +1 -14
  276. package/esm/HtsgetBamAdapter/index.d.ts +1 -1
  277. package/esm/HtsgetBamAdapter/index.js +1 -1
  278. package/esm/LinearAlignmentsDisplay/alignmentsModel.d.ts +2 -5
  279. package/esm/LinearAlignmentsDisplay/alignmentsModel.js +1 -31
  280. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
  281. package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +2 -2
  282. package/esm/LinearAlignmentsDisplay/configSchema.d.ts +2 -16
  283. package/esm/LinearAlignmentsDisplay/configSchema.js +3 -20
  284. package/esm/LinearAlignmentsDisplay/index.d.ts +1 -1
  285. package/esm/LinearAlignmentsDisplay/index.js +1 -2
  286. package/esm/LinearAlignmentsDisplay/model.d.ts +6 -75
  287. package/esm/LinearAlignmentsDisplay/model.js +6 -79
  288. package/esm/LinearAlignmentsDisplay/util.d.ts +1 -1
  289. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +31 -157
  290. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -135
  291. package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +2 -2
  292. package/esm/LinearPileupDisplay/components/GroupByDialog.d.ts +2 -2
  293. package/esm/LinearPileupDisplay/components/GroupByDialog.js +109 -56
  294. package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +2 -6
  295. package/esm/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +1 -1
  296. package/esm/LinearPileupDisplay/components/SetFeatureHeightDialog.js +2 -2
  297. package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
  298. package/esm/LinearPileupDisplay/components/SortByTagDialog.js +2 -2
  299. package/esm/LinearPileupDisplay/configSchema.d.ts +13 -16
  300. package/esm/LinearPileupDisplay/configSchema.js +12 -30
  301. package/esm/LinearPileupDisplay/index.d.ts +1 -1
  302. package/esm/LinearPileupDisplay/index.js +2 -2
  303. package/esm/LinearPileupDisplay/model.d.ts +103 -105
  304. package/esm/LinearPileupDisplay/model.js +11 -102
  305. package/esm/LinearReadArcsDisplay/components/ReactComponent.d.ts +1 -1
  306. package/esm/LinearReadArcsDisplay/components/ReactComponent.js +2 -6
  307. package/esm/LinearReadArcsDisplay/configSchema.d.ts +12 -20
  308. package/esm/LinearReadArcsDisplay/configSchema.js +8 -31
  309. package/esm/LinearReadArcsDisplay/drawFeats.d.ts +1 -1
  310. package/esm/LinearReadArcsDisplay/drawFeats.js +1 -9
  311. package/esm/LinearReadArcsDisplay/index.d.ts +1 -1
  312. package/esm/LinearReadArcsDisplay/index.js +1 -2
  313. package/esm/LinearReadArcsDisplay/model.d.ts +15 -93
  314. package/esm/LinearReadArcsDisplay/model.js +18 -105
  315. package/esm/LinearReadArcsDisplay/util.d.ts +1 -1
  316. package/esm/LinearReadCloudDisplay/components/ReactComponent.d.ts +1 -1
  317. package/esm/LinearReadCloudDisplay/components/ReactComponent.js +2 -6
  318. package/esm/LinearReadCloudDisplay/configSchema.d.ts +5 -17
  319. package/esm/LinearReadCloudDisplay/configSchema.js +3 -28
  320. package/esm/LinearReadCloudDisplay/drawFeats.d.ts +1 -1
  321. package/esm/LinearReadCloudDisplay/drawFeats.js +2 -2
  322. package/esm/LinearReadCloudDisplay/drawLongReadChains.d.ts +4 -4
  323. package/esm/LinearReadCloudDisplay/drawLongReadChains.js +1 -4
  324. package/esm/LinearReadCloudDisplay/drawPairChains.d.ts +4 -4
  325. package/esm/LinearReadCloudDisplay/drawPairChains.js +0 -3
  326. package/esm/LinearReadCloudDisplay/index.d.ts +1 -1
  327. package/esm/LinearReadCloudDisplay/index.js +1 -2
  328. package/esm/LinearReadCloudDisplay/model.d.ts +13 -55
  329. package/esm/LinearReadCloudDisplay/model.js +17 -68
  330. package/esm/LinearReadCloudDisplay/util.js +0 -1
  331. package/esm/LinearSNPCoverageDisplay/components/Tooltip.d.ts +1 -1
  332. package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +1 -1
  333. package/esm/LinearSNPCoverageDisplay/configSchema.d.ts +17 -22
  334. package/esm/LinearSNPCoverageDisplay/configSchema.js +16 -32
  335. package/esm/LinearSNPCoverageDisplay/index.d.ts +1 -1
  336. package/esm/LinearSNPCoverageDisplay/index.js +1 -2
  337. package/esm/LinearSNPCoverageDisplay/model.d.ts +9 -50
  338. package/esm/LinearSNPCoverageDisplay/model.js +21 -125
  339. package/esm/MismatchParser/cigarToMismatches.d.ts +1 -1
  340. package/esm/MismatchParser/cigarToMismatches.js +4 -7
  341. package/esm/MismatchParser/getNextRefPos.js +0 -2
  342. package/esm/MismatchParser/index.d.ts +2 -2
  343. package/esm/MismatchParser/index.js +1 -9
  344. package/esm/MismatchParser/mdToMismatches.d.ts +2 -2
  345. package/esm/MismatchParser/mdToMismatches.js +0 -6
  346. package/esm/ModificationParser/index.d.ts +1 -1
  347. package/esm/ModificationParser/index.js +1 -18
  348. package/esm/PileupRPC/base.d.ts +2 -2
  349. package/esm/PileupRPC/base.js +0 -1
  350. package/esm/PileupRPC/index.d.ts +1 -1
  351. package/esm/PileupRPC/index.js +1 -1
  352. package/esm/PileupRPC/methods/GetGlobalValueForTag.d.ts +2 -3
  353. package/esm/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
  354. package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +2 -3
  355. package/esm/PileupRPC/methods/GetReducedFeatures.js +3 -5
  356. package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +3 -4
  357. package/esm/PileupRPC/methods/GetVisibleModifications.js +1 -1
  358. package/esm/PileupRPC/util.d.ts +1 -1
  359. package/esm/PileupRenderer/PileupLayoutSession.d.ts +5 -5
  360. package/esm/PileupRenderer/PileupLayoutSession.js +2 -5
  361. package/esm/PileupRenderer/PileupRenderer.d.ts +10 -20
  362. package/esm/PileupRenderer/PileupRenderer.js +12 -17
  363. package/esm/PileupRenderer/colorBy.d.ts +2 -2
  364. package/esm/PileupRenderer/colorBy.js +1 -7
  365. package/esm/PileupRenderer/components/PileupRendering.d.ts +1 -1
  366. package/esm/PileupRenderer/components/PileupRendering.js +1 -4
  367. package/esm/PileupRenderer/configSchema.d.ts +0 -31
  368. package/esm/PileupRenderer/configSchema.js +1 -35
  369. package/esm/PileupRenderer/getAlignmentShapeColor.d.ts +2 -2
  370. package/esm/PileupRenderer/getAlignmentShapeColor.js +2 -7
  371. package/esm/PileupRenderer/index.d.ts +1 -1
  372. package/esm/PileupRenderer/index.js +1 -1
  373. package/esm/PileupRenderer/layoutFeature.d.ts +2 -2
  374. package/esm/PileupRenderer/layoutFeature.js +0 -1
  375. package/esm/PileupRenderer/layoutFeatures.d.ts +5 -2
  376. package/esm/PileupRenderer/layoutFeatures.js +7 -5
  377. package/esm/PileupRenderer/makeImageData.d.ts +3 -4
  378. package/esm/PileupRenderer/makeImageData.js +8 -2
  379. package/esm/PileupRenderer/renderAlignment.d.ts +3 -3
  380. package/esm/PileupRenderer/renderAlignment.js +3 -5
  381. package/esm/PileupRenderer/renderAlignmentShape.d.ts +3 -3
  382. package/esm/PileupRenderer/renderAlignmentShape.js +1 -1
  383. package/esm/PileupRenderer/renderMethylation.d.ts +4 -4
  384. package/esm/PileupRenderer/renderMethylation.js +0 -4
  385. package/esm/PileupRenderer/renderMismatches.d.ts +3 -3
  386. package/esm/PileupRenderer/renderMismatches.js +1 -12
  387. package/esm/PileupRenderer/renderModifications.d.ts +3 -3
  388. package/esm/PileupRenderer/renderModifications.js +1 -3
  389. package/esm/PileupRenderer/renderPerBaseLettering.d.ts +2 -2
  390. package/esm/PileupRenderer/renderPerBaseLettering.js +0 -1
  391. package/esm/PileupRenderer/renderPerBaseQuality.d.ts +2 -2
  392. package/esm/PileupRenderer/renderPerBaseQuality.js +2 -2
  393. package/esm/PileupRenderer/renderSoftClipping.d.ts +5 -5
  394. package/esm/PileupRenderer/renderSoftClipping.js +1 -5
  395. package/esm/PileupRenderer/sortUtil.d.ts +2 -2
  396. package/esm/PileupRenderer/sortUtil.js +1 -4
  397. package/esm/PileupRenderer/types.d.ts +26 -0
  398. package/esm/PileupRenderer/types.js +1 -0
  399. package/esm/PileupRenderer/util.d.ts +2 -2
  400. package/esm/PileupRenderer/util.js +1 -3
  401. package/esm/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +4 -3
  402. package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +5 -7
  403. package/esm/SNPCoverageAdapter/configSchema.d.ts +0 -4
  404. package/esm/SNPCoverageAdapter/configSchema.js +1 -8
  405. package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +4 -8
  406. package/esm/SNPCoverageAdapter/generateCoverageBins.js +24 -246
  407. package/esm/SNPCoverageAdapter/index.d.ts +1 -1
  408. package/esm/SNPCoverageAdapter/processDepth.d.ts +8 -0
  409. package/esm/SNPCoverageAdapter/processDepth.js +35 -0
  410. package/esm/SNPCoverageAdapter/processMismatches.d.ts +9 -0
  411. package/esm/SNPCoverageAdapter/processMismatches.js +55 -0
  412. package/esm/SNPCoverageAdapter/processModifications.d.ts +10 -0
  413. package/esm/SNPCoverageAdapter/processModifications.js +46 -0
  414. package/esm/SNPCoverageAdapter/processReferenceCpGs.d.ts +9 -0
  415. package/esm/SNPCoverageAdapter/processReferenceCpGs.js +60 -0
  416. package/esm/SNPCoverageAdapter/util.d.ts +10 -0
  417. package/esm/SNPCoverageAdapter/util.js +35 -0
  418. package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +5 -4
  419. package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +16 -40
  420. package/esm/SNPCoverageRenderer/configSchema.d.ts +0 -15
  421. package/esm/SNPCoverageRenderer/configSchema.js +1 -19
  422. package/esm/SNPCoverageRenderer/index.d.ts +1 -1
  423. package/esm/SNPCoverageRenderer/index.js +2 -2
  424. package/esm/index.d.ts +2 -2
  425. package/esm/index.js +10 -10
  426. package/esm/shared/afterAttach.d.ts +1 -1
  427. package/esm/shared/afterAttach.js +0 -2
  428. package/esm/shared/color.d.ts +1 -1
  429. package/esm/shared/color.js +0 -8
  430. package/esm/shared/components/BaseDisplayComponent.d.ts +2 -2
  431. package/esm/shared/components/BaseDisplayComponent.js +12 -11
  432. package/esm/shared/components/FilterByTagDialog.d.ts +1 -1
  433. package/esm/shared/components/FilterByTagDialog.js +2 -2
  434. package/esm/shared/fetchChains.d.ts +2 -2
  435. package/esm/shared/fetchChains.js +1 -2
  436. package/esm/shared/getMaximumModificationAtEachPosition.d.ts +1 -1
  437. package/esm/shared/getMaximumModificationAtEachPosition.js +1 -2
  438. package/esm/shared/getUniqueModifications.d.ts +5 -5
  439. package/esm/shared/getUniqueTags.d.ts +4 -4
  440. package/esm/shared/renderSvgUtil.js +0 -2
  441. package/esm/shared/util.d.ts +11 -1
  442. package/esm/shared/util.js +24 -0
  443. package/esm/util.d.ts +4 -4
  444. package/esm/util.js +3 -9
  445. package/package.json +3 -4
@@ -1,9 +1,6 @@
1
- // locals
2
1
  import { getMismatches } from '../MismatchParser';
3
2
  import { cacheGetter } from '../shared/util';
4
3
  export default class BamSlightlyLazyFeature {
5
- // uses parameter properties to automatically create fields on the class
6
- // https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
7
4
  constructor(record, adapter, ref) {
8
5
  this.record = record;
9
6
  this.adapter = adapter;
@@ -1,7 +1,4 @@
1
1
  declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  bamLocation: {
6
3
  type: string;
7
4
  defaultValue: {
@@ -10,17 +7,11 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
10
7
  };
11
8
  };
12
9
  index: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
13
- /**
14
- * #slot index.indexType
15
- */
16
10
  indexType: {
17
11
  model: import("mobx-state-tree").ISimpleType<string>;
18
12
  type: string;
19
13
  defaultValue: string;
20
14
  };
21
- /**
22
- * #slot index.location
23
- */
24
15
  location: {
25
16
  type: string;
26
17
  defaultValue: {
@@ -29,19 +20,11 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
29
20
  };
30
21
  };
31
22
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
32
- /**
33
- * #slot
34
- */
35
23
  fetchSizeLimit: {
36
24
  type: string;
37
25
  description: string;
38
26
  defaultValue: number;
39
27
  };
40
- /**
41
- * #slot
42
- * generally refers to the reference genome assembly's sequence adapter
43
- * currently needs to be manually added
44
- */
45
28
  sequenceAdapter: {
46
29
  type: string;
47
30
  description: string;
@@ -1,30 +1,17 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
2
  import { types } from 'mobx-state-tree';
3
- /**
4
- * #config BamAdapter
5
- * used to configure BAM adapter
6
- */
7
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ function x() { }
8
4
  const configSchema = ConfigurationSchema('BamAdapter', {
9
- /**
10
- * #slot
11
- */
12
5
  bamLocation: {
13
6
  type: 'fileLocation',
14
7
  defaultValue: { uri: '/path/to/my.bam', locationType: 'UriLocation' },
15
8
  },
16
9
  index: ConfigurationSchema('BamIndex', {
17
- /**
18
- * #slot index.indexType
19
- */
20
10
  indexType: {
21
11
  model: types.enumeration('IndexType', ['BAI', 'CSI']),
22
12
  type: 'stringEnum',
23
13
  defaultValue: 'BAI',
24
14
  },
25
- /**
26
- * #slot index.location
27
- */
28
15
  location: {
29
16
  type: 'fileLocation',
30
17
  defaultValue: {
@@ -33,19 +20,11 @@ const configSchema = ConfigurationSchema('BamAdapter', {
33
20
  },
34
21
  },
35
22
  }),
36
- /**
37
- * #slot
38
- */
39
23
  fetchSizeLimit: {
40
24
  type: 'number',
41
25
  description: 'size to fetch in bytes over which to display a warning to the user that too much data will be fetched',
42
26
  defaultValue: 5000000,
43
27
  },
44
- /**
45
- * #slot
46
- * generally refers to the reference genome assembly's sequence adapter
47
- * currently needs to be manually added
48
- */
49
28
  sequenceAdapter: {
50
29
  type: 'frozen',
51
30
  description: 'sequence data adapter, used to calculate SNPs when BAM reads lacking MD tags',
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function BamAdapterF(pluginManager: PluginManager): void;
@@ -1,8 +1,10 @@
1
- import { IndexedCramFile, CramRecord } from '@gmod/cram';
2
- import { BaseFeatureDataAdapter, BaseOptions, BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
- import type { Region, Feature } from '@jbrowse/core/util';
1
+ import { IndexedCramFile } from '@gmod/cram';
2
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
4
3
  import CramSlightlyLazyFeature from './CramSlightlyLazyFeature';
5
- import { FilterBy } from '../shared/types';
4
+ import type { FilterBy } from '../shared/types';
5
+ import type { CramRecord } from '@gmod/cram';
6
+ import type { BaseOptions, BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
7
+ import type { Feature, Region } from '@jbrowse/core/util';
6
8
  interface Header {
7
9
  idToName?: string[];
8
10
  nameToId?: Record<string, number>;
@@ -42,11 +44,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
42
44
  bytes: number;
43
45
  fetchSizeLimit: any;
44
46
  }>;
45
- /**
46
- * get the approximate number of bytes queried from the file for the given
47
- * query regions
48
- * @param regions - list of query regions
49
- */
50
47
  private bytesForRegions;
51
48
  }
52
49
  export {};
@@ -1,26 +1,21 @@
1
1
  import { CraiIndex, IndexedCramFile } from '@gmod/cram';
2
- import { toArray } from 'rxjs/operators';
3
- import { firstValueFrom } from 'rxjs';
4
- // jbrowse
5
- import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
6
- import { checkAbortSignal, updateStatus, toLocale } from '@jbrowse/core/util';
2
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import { toLocale, updateStatus } from '@jbrowse/core/util';
4
+ import QuickLRU from '@jbrowse/core/util/QuickLRU';
7
5
  import { openLocation } from '@jbrowse/core/util/io';
8
6
  import { ObservableCreate } from '@jbrowse/core/util/rxjs';
9
- import QuickLRU from '@jbrowse/core/util/QuickLRU';
10
- // locals
7
+ import { checkStopToken } from '@jbrowse/core/util/stopToken';
8
+ import { firstValueFrom } from 'rxjs';
9
+ import { toArray } from 'rxjs/operators';
11
10
  import CramSlightlyLazyFeature from './CramSlightlyLazyFeature';
11
+ import { filterReadFlag, filterTagValue } from '../shared/util';
12
12
  export default class CramAdapter extends BaseFeatureDataAdapter {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.samHeader = {};
16
- // used for avoiding re-creation new BamSlightlyLazyFeatures, keeping
17
- // mismatches in cache. at an average of 100kb-300kb, keeping even just 500
18
- // of these in memory is fairly intensive but can reduce recomputation on
19
- // these objects
20
16
  this.ultraLongFeatureCache = new QuickLRU({
21
17
  maxSize: 500,
22
18
  });
23
- // maps a seqId to original refname, passed specially to render args, to a seqid
24
19
  this.seqIdToOriginalRefName = [];
25
20
  }
26
21
  async configurePre() {
@@ -60,7 +55,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
60
55
  return cram.cram.getHeaderText();
61
56
  }
62
57
  async seqFetch(seqId, start, end) {
63
- start -= 1; // convert from 1-based closed to interbase
58
+ start -= 1;
64
59
  const { sequenceAdapter } = await this.configure();
65
60
  const refName = this.refIdToOriginalName(seqId) || this.refIdToName(seqId);
66
61
  if (!refName) {
@@ -98,8 +93,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
98
93
  const conf = await this.configure();
99
94
  const { cram } = conf;
100
95
  const samHeader = await cram.cram.getSamHeader();
101
- // use the @SQ lines in the header to figure out the
102
- // mapping between ref ID numbers and names
103
96
  const idToName = [];
104
97
  const nameToId = {};
105
98
  samHeader
@@ -136,8 +129,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
136
129
  }
137
130
  return samHeader.idToName;
138
131
  }
139
- // use info from the SAM header if possible, but fall back to using
140
- // the ref seq order from when the browser's refseqs were loaded
141
132
  refNameToId(refName) {
142
133
  if (this.samHeader.nameToId) {
143
134
  return this.samHeader.nameToId[refName];
@@ -147,8 +138,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
147
138
  }
148
139
  return undefined;
149
140
  }
150
- // use info from the SAM header if possible, but fall back to using
151
- // the ref seq order from when the browser's refseqs were loaded
152
141
  refIdToName(refId) {
153
142
  var _a, _b;
154
143
  return ((_a = this.samHeader.idToName) === null || _a === void 0 ? void 0 : _a[refId]) || ((_b = this.seqIdToRefName) === null || _b === void 0 ? void 0 : _b[refId]);
@@ -157,7 +146,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
157
146
  return this.seqIdToOriginalRefName[refId];
158
147
  }
159
148
  getFeatures(region, opts) {
160
- const { signal, filterBy, statusCallback = () => { } } = opts || {};
149
+ const { stopToken, filterBy, statusCallback = () => { } } = opts || {};
161
150
  const { refName, start, end, originalRefName } = region;
162
151
  return ObservableCreate(async (observer) => {
163
152
  const { cram, samHeader } = await this.setup(opts);
@@ -171,25 +160,19 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
171
160
  this.seqIdToOriginalRefName[refId] = originalRefName;
172
161
  }
173
162
  const records = await updateStatus('Downloading alignments', statusCallback, () => cram.getRecordsForRange(refId, start, end));
174
- checkAbortSignal(signal);
163
+ checkStopToken(stopToken);
175
164
  await updateStatus('Processing alignments', statusCallback, () => {
176
165
  var _a;
177
166
  const { flagInclude = 0, flagExclude = 0, tagFilter, readName, } = filterBy || {};
178
167
  for (const record of records) {
179
- const flags = record.flags;
180
- if ((flags & flagInclude) !== flagInclude && !(flags & flagExclude)) {
168
+ if (filterReadFlag(record.flags, flagInclude, flagExclude)) {
181
169
  continue;
182
170
  }
183
- if (tagFilter) {
184
- const readVal = tagFilter.tag === 'RG'
171
+ if (tagFilter &&
172
+ filterTagValue(tagFilter.tag === 'RG'
185
173
  ? (_a = samHeader.readGroups) === null || _a === void 0 ? void 0 : _a[record.readGroupId]
186
- : record.tags[tagFilter.tag];
187
- const filterVal = tagFilter.value;
188
- if (filterVal === '*'
189
- ? readVal === undefined
190
- : `${readVal}` !== `${filterVal}`) {
191
- continue;
192
- }
174
+ : record.tags[tagFilter.tag], tagFilter.value)) {
175
+ continue;
193
176
  }
194
177
  if (readName && record.readName !== readName) {
195
178
  continue;
@@ -206,13 +189,12 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
206
189
  }
207
190
  observer.complete();
208
191
  });
209
- }, signal);
192
+ }, stopToken);
210
193
  }
211
- freeResources( /* { region } */) { }
194
+ freeResources() { }
212
195
  cramRecordToFeature(record) {
213
196
  return new CramSlightlyLazyFeature(record, this);
214
197
  }
215
- // we return the configured fetchSizeLimit, and the bytes for the region
216
198
  async getMultiRegionFeatureDensityStats(regions, opts) {
217
199
  const bytes = await this.bytesForRegions(regions, opts);
218
200
  const fetchSizeLimit = this.getConf('fetchSizeLimit');
@@ -221,11 +203,6 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
221
203
  fetchSizeLimit,
222
204
  };
223
205
  }
224
- /**
225
- * get the approximate number of bytes queried from the file for the given
226
- * query regions
227
- * @param regions - list of query regions
228
- */
229
206
  async bytesForRegions(regions, _opts) {
230
207
  const { cram } = await this.configure();
231
208
  const blockResults = await Promise.all(regions.map(region => {
@@ -1,6 +1,6 @@
1
- import { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util';
2
- import { CramRecord } from '@gmod/cram';
3
- import CramAdapter from './CramAdapter';
1
+ import type CramAdapter from './CramAdapter';
2
+ import type { CramRecord } from '@gmod/cram';
3
+ import type { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util';
4
4
  export default class CramSlightlyLazyFeature implements Feature {
5
5
  private record;
6
6
  private _store;
@@ -1,8 +1,6 @@
1
1
  import { readFeaturesToCIGAR, readFeaturesToMismatches } from './util';
2
2
  import { cacheGetter } from '../shared/util';
3
3
  export default class CramSlightlyLazyFeature {
4
- // uses parameter properties to automatically create fields on the class
5
- // https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties
6
4
  constructor(record, _store) {
7
5
  this.record = record;
8
6
  this._store = _store;
@@ -66,7 +64,6 @@ export default class CramSlightlyLazyFeature {
66
64
  get seq() {
67
65
  return this.record.getReadBases();
68
66
  }
69
- // generate a CIGAR, based on code from jkbonfield
70
67
  get CIGAR() {
71
68
  return readFeaturesToCIGAR(this.record.readFeatures, this.record.alignmentStart, this.record.readLength, this.record._refRegion);
72
69
  }
@@ -90,18 +87,6 @@ export default class CramSlightlyLazyFeature {
90
87
  }
91
88
  get mismatches() {
92
89
  return readFeaturesToMismatches(this.record.readFeatures, this.start, this.qualRaw);
93
- // this commented code can try to resolve MD tags, xref https://github.com/galaxyproject/tools-iuc/issues/6523#issuecomment-2462927211 but put on hold
94
- // return this.tags.MD && this.seq
95
- // ? mismatches.concat(
96
- // mdToMismatches(
97
- // this.tags.MD,
98
- // parseCigar(this.CIGAR),
99
- // mismatches,
100
- // this.seq,
101
- // this.qualRaw,
102
- // ),
103
- // )
104
- // : mismatches
105
90
  }
106
91
  get fields() {
107
92
  return {
@@ -126,9 +111,7 @@ export default class CramSlightlyLazyFeature {
126
111
  toJSON() {
127
112
  return {
128
113
  ...this.fields,
129
- // lazy
130
114
  CIGAR: this.CIGAR,
131
- // lazy
132
115
  qual: this.qual,
133
116
  };
134
117
  }
@@ -1,7 +1,7 @@
1
- import { GenericFilehandle } from 'generic-filehandle';
2
- import { Observable } from 'rxjs';
3
- import SimpleFeature from '@jbrowse/core/util/simpleFeature';
4
1
  import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import SimpleFeature from '@jbrowse/core/util/simpleFeature';
3
+ import { Observable } from 'rxjs';
4
+ import type { GenericFilehandle } from 'generic-filehandle';
5
5
  export declare function parseSmallFasta(text: string): {
6
6
  id: string;
7
7
  description: string;
@@ -1,8 +1,7 @@
1
- import { Observable } from 'rxjs';
2
- import SimpleFeature from '@jbrowse/core/util/simpleFeature';
3
- import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
4
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
5
- // setup for Cram Adapter Testing
2
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import SimpleFeature from '@jbrowse/core/util/simpleFeature';
4
+ import { Observable } from 'rxjs';
6
5
  export function parseSmallFasta(text) {
7
6
  return text
8
7
  .split('>')
@@ -73,5 +72,5 @@ export class SequenceAdapter extends BaseFeatureDataAdapter {
73
72
  return { unsubscribe: () => { } };
74
73
  });
75
74
  }
76
- freeResources( /* { region } */) { }
75
+ freeResources() { }
77
76
  }
@@ -1,15 +1,9 @@
1
1
  declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot fetchSizeLimit
4
- */
5
2
  fetchSizeLimit: {
6
3
  type: string;
7
4
  description: string;
8
5
  defaultValue: number;
9
6
  };
10
- /**
11
- * #slot cramLocation
12
- */
13
7
  cramLocation: {
14
8
  type: string;
15
9
  defaultValue: {
@@ -17,9 +11,6 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
17
11
  locationType: string;
18
12
  };
19
13
  };
20
- /**
21
- * #slot craiLocation
22
- */
23
14
  craiLocation: {
24
15
  type: string;
25
16
  defaultValue: {
@@ -27,11 +18,6 @@ declare const configSchema: import("@jbrowse/core/configuration/configurationSch
27
18
  locationType: string;
28
19
  };
29
20
  };
30
- /**
31
- * #slot sequenceAdapter
32
- * generally refers to the reference genome assembly's sequence adapter
33
- * currently needs to be manually added
34
- */
35
21
  sequenceAdapter: {
36
22
  type: string;
37
23
  description: string;
@@ -1,21 +1,11 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config CramAdapter
4
- * used to configure CRAM adapter
5
- */
6
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
7
3
  const configSchema = ConfigurationSchema('CramAdapter', {
8
- /**
9
- * #slot fetchSizeLimit
10
- */
11
4
  fetchSizeLimit: {
12
5
  type: 'number',
13
6
  description: 'size in bytes over which to display a warning to the user that too much data will be fetched',
14
7
  defaultValue: 3000000,
15
8
  },
16
- /**
17
- * #slot cramLocation
18
- */
19
9
  cramLocation: {
20
10
  type: 'fileLocation',
21
11
  defaultValue: {
@@ -23,9 +13,6 @@ const configSchema = ConfigurationSchema('CramAdapter', {
23
13
  locationType: 'UriLocation',
24
14
  },
25
15
  },
26
- /**
27
- * #slot craiLocation
28
- */
29
16
  craiLocation: {
30
17
  type: 'fileLocation',
31
18
  defaultValue: {
@@ -33,11 +20,6 @@ const configSchema = ConfigurationSchema('CramAdapter', {
33
20
  locationType: 'UriLocation',
34
21
  },
35
22
  },
36
- /**
37
- * #slot sequenceAdapter
38
- * generally refers to the reference genome assembly's sequence adapter
39
- * currently needs to be manually added
40
- */
41
23
  sequenceAdapter: {
42
24
  type: 'frozen',
43
25
  description: 'sequence data adapter',
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function CramAdapterF(pluginManager: PluginManager): void;
@@ -1,5 +1,4 @@
1
1
  import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
2
- // locals
3
2
  import configSchema from './configSchema';
4
3
  export default function CramAdapterF(pluginManager) {
5
4
  pluginManager.addAdapterType(() => {
@@ -1,5 +1,5 @@
1
- import { CramRecord } from '@gmod/cram';
2
- import { Mismatch } from '../shared/types';
1
+ import type { Mismatch } from '../shared/types';
2
+ import type { CramRecord } from '@gmod/cram';
3
3
  type ReadFeatures = CramRecord['readFeatures'];
4
4
  export declare function readFeaturesToMismatches(readFeatures: ReadFeatures, start: number, qual?: number[] | null): Mismatch[];
5
5
  export declare function readFeaturesToCIGAR(readFeatures: ReadFeatures, alignmentStart: number, readLen: number, refRegion?: {
@@ -22,7 +22,6 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
22
22
  }
23
23
  refPos = p - 1 - start;
24
24
  if (code === 'X') {
25
- // substitution
26
25
  mismatches[j++] = {
27
26
  start: refPos,
28
27
  length: 1,
@@ -33,7 +32,6 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
33
32
  };
34
33
  }
35
34
  else if (code === 'I') {
36
- // insertion
37
35
  mismatches[j++] = {
38
36
  start: refPos,
39
37
  type: 'insertion',
@@ -42,7 +40,6 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
42
40
  };
43
41
  }
44
42
  else if (code === 'N') {
45
- // reference skip
46
43
  mismatches[j++] = {
47
44
  type: 'skip',
48
45
  length: data,
@@ -51,7 +48,6 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
51
48
  };
52
49
  }
53
50
  else if (code === 'S') {
54
- // soft clip
55
51
  const len = data.length;
56
52
  mismatches[j++] = {
57
53
  start: refPos,
@@ -62,10 +58,8 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
62
58
  };
63
59
  }
64
60
  else if (code === 'P') {
65
- // padding
66
61
  }
67
62
  else if (code === 'H') {
68
- // hard clip
69
63
  const len = data;
70
64
  mismatches[j++] = {
71
65
  start: refPos,
@@ -76,7 +70,6 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
76
70
  };
77
71
  }
78
72
  else if (code === 'D') {
79
- // deletion
80
73
  mismatches[j++] = {
81
74
  type: 'deletion',
82
75
  length: data,
@@ -85,21 +78,15 @@ export function readFeaturesToMismatches(readFeatures, start, qual) {
85
78
  };
86
79
  }
87
80
  else if (code === 'b') {
88
- // stretch of bases
89
81
  }
90
82
  else if (code === 'q') {
91
- // stretch of qual scores
92
83
  }
93
84
  else if (code === 'B') {
94
- // a pair of [base, qual]
95
85
  }
96
86
  else if (code === 'i') {
97
- // single-base insertion, we collect these if there are multiple in a row
98
- // into a single insertion entry
99
87
  insLen++;
100
88
  }
101
89
  else if (code === 'Q') {
102
- // single quality value
103
90
  }
104
91
  }
105
92
  if (sublen && insLen > 0) {
@@ -121,7 +108,6 @@ export function readFeaturesToCIGAR(readFeatures, alignmentStart, readLen, refRe
121
108
  if (!refRegion) {
122
109
  return '';
123
110
  }
124
- // not sure I should access these, but...
125
111
  const ref = refRegion.seq;
126
112
  const refStart = refRegion.start;
127
113
  let lastPos = alignmentStart;
@@ -145,7 +131,6 @@ export function readFeaturesToCIGAR(readFeatures, alignmentStart, readLen, refRe
145
131
  oplen += sublen;
146
132
  }
147
133
  if (code === 'b') {
148
- // An array of bases stored verbatim
149
134
  const ret = data.split(',');
150
135
  const added = String.fromCharCode(...ret);
151
136
  seq += added;
@@ -153,19 +138,16 @@ export function readFeaturesToCIGAR(readFeatures, alignmentStart, readLen, refRe
153
138
  oplen += added.length;
154
139
  }
155
140
  else if (code === 'B') {
156
- // Single base (+ qual score)
157
141
  seq += sub;
158
142
  lastPos++;
159
143
  oplen++;
160
144
  }
161
145
  else if (code === 'X') {
162
- // Substitution
163
146
  seq += sub;
164
147
  lastPos++;
165
148
  oplen++;
166
149
  }
167
150
  else if (code === 'D' || code === 'N') {
168
- // Deletion or Ref Skip
169
151
  lastPos += data;
170
152
  if (oplen) {
171
153
  cigar += `${oplen}${op}`;
@@ -174,7 +156,6 @@ export function readFeaturesToCIGAR(readFeatures, alignmentStart, readLen, refRe
174
156
  oplen = 0;
175
157
  }
176
158
  else if (code === 'I' || code === 'S') {
177
- // Insertion or soft-clip
178
159
  seq += data;
179
160
  if (oplen) {
180
161
  cigar += `${oplen}${op}`;
@@ -183,8 +164,6 @@ export function readFeaturesToCIGAR(readFeatures, alignmentStart, readLen, refRe
183
164
  oplen = 0;
184
165
  }
185
166
  else if (code === 'i') {
186
- // Single base insertion
187
- // seq += data
188
167
  if (oplen) {
189
168
  cigar += `${oplen}${op}`;
190
169
  }
@@ -193,20 +172,18 @@ export function readFeaturesToCIGAR(readFeatures, alignmentStart, readLen, refRe
193
172
  oplen = 0;
194
173
  }
195
174
  else if (code === 'P') {
196
- // Padding
197
175
  if (oplen) {
198
176
  cigar += `${oplen}${op}`;
199
177
  }
200
178
  cigar += `${data}P`;
201
179
  }
202
180
  else if (code === 'H') {
203
- // Hard clip
204
181
  if (oplen) {
205
182
  cigar += `${oplen}${op}`;
206
183
  }
207
184
  cigar += `${data}H`;
208
185
  oplen = 0;
209
- } // else q or Q
186
+ }
210
187
  }
211
188
  }
212
189
  else {
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function GuessAlignmentsTypesF(pluginManager: PluginManager): void;
@@ -1,4 +1,4 @@
1
- import { makeIndex, makeIndexType, getFileName, } from '@jbrowse/core/util/tracks';
1
+ import { getFileName, makeIndex, makeIndexType, } from '@jbrowse/core/util/tracks';
2
2
  export default function GuessAlignmentsTypesF(pluginManager) {
3
3
  pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
4
4
  return (file, index, adapterHint) => {
@@ -1,6 +1,6 @@
1
- import { BamFile } from '@gmod/bam';
2
- import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
1
  import BamAdapter from '../BamAdapter/BamAdapter';
2
+ import type { BamFile } from '@gmod/bam';
3
+ import type { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
4
4
  export default class HtsgetBamAdapter extends BamAdapter {
5
5
  protected configurePre(): Promise<{
6
6
  bam: BamFile;
@@ -1,23 +1,14 @@
1
1
  declare const HtsgetBamAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  htsgetBase: {
6
3
  type: string;
7
4
  description: string;
8
5
  defaultValue: string;
9
6
  };
10
- /**
11
- * #slot
12
- */
13
7
  htsgetTrackId: {
14
8
  type: string;
15
9
  description: string;
16
10
  defaultValue: string;
17
11
  };
18
- /**
19
- * #slot
20
- */
21
12
  sequenceAdapter: {
22
13
  type: string;
23
14
  description: string;