@jbrowse/plugin-linear-comparative-view 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/LICENSE +201 -0
  2. package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +52 -0
  3. package/dist/LGVSyntenyDisplay/configSchemaF.js +18 -0
  4. package/dist/LGVSyntenyDisplay/configSchemaF.js.map +1 -0
  5. package/dist/LGVSyntenyDisplay/index.d.ts +3 -0
  6. package/dist/LGVSyntenyDisplay/index.js +24 -0
  7. package/dist/LGVSyntenyDisplay/index.js.map +1 -0
  8. package/dist/LGVSyntenyDisplay/model.d.ts +380 -0
  9. package/dist/LGVSyntenyDisplay/model.js +154 -0
  10. package/dist/LGVSyntenyDisplay/model.js.map +1 -0
  11. package/dist/LaunchLinearSyntenyView.d.ts +2 -0
  12. package/dist/LaunchLinearSyntenyView.js +58 -0
  13. package/dist/LaunchLinearSyntenyView.js.map +1 -0
  14. package/dist/LinearComparativeDisplay/configSchemaF.d.ts +5 -0
  15. package/dist/LinearComparativeDisplay/configSchemaF.js +18 -0
  16. package/dist/LinearComparativeDisplay/configSchemaF.js.map +1 -0
  17. package/dist/LinearComparativeDisplay/index.d.ts +3 -0
  18. package/dist/LinearComparativeDisplay/index.js +24 -0
  19. package/dist/LinearComparativeDisplay/index.js.map +1 -0
  20. package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +275 -0
  21. package/dist/LinearComparativeDisplay/stateModelFactory.js +172 -0
  22. package/dist/LinearComparativeDisplay/stateModelFactory.js.map +1 -0
  23. package/dist/LinearComparativeView/components/Header.d.ts +7 -0
  24. package/dist/LinearComparativeView/components/Header.js +89 -0
  25. package/dist/LinearComparativeView/components/Header.js.map +1 -0
  26. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +8 -0
  27. package/dist/LinearComparativeView/components/LinearComparativeView.js +99 -0
  28. package/dist/LinearComparativeView/components/LinearComparativeView.js.map +1 -0
  29. package/dist/LinearComparativeView/components/Rubberband.d.ts +9 -0
  30. package/dist/LinearComparativeView/components/Rubberband.js +225 -0
  31. package/dist/LinearComparativeView/components/Rubberband.js.map +1 -0
  32. package/dist/LinearComparativeView/index.d.ts +3 -0
  33. package/dist/LinearComparativeView/index.js +42 -0
  34. package/dist/LinearComparativeView/index.js.map +1 -0
  35. package/dist/LinearComparativeView/model.d.ts +326 -0
  36. package/dist/LinearComparativeView/model.js +346 -0
  37. package/dist/LinearComparativeView/model.js.map +1 -0
  38. package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +7 -0
  39. package/dist/LinearReadVsRef/LinearReadVsRef.js +284 -0
  40. package/dist/LinearReadVsRef/LinearReadVsRef.js.map +1 -0
  41. package/dist/LinearReadVsRef/index.d.ts +2 -0
  42. package/dist/LinearReadVsRef/index.js +55 -0
  43. package/dist/LinearReadVsRef/index.js.map +1 -0
  44. package/dist/LinearSyntenyDisplay/afterAttach.d.ts +2 -0
  45. package/dist/LinearSyntenyDisplay/afterAttach.js +108 -0
  46. package/dist/LinearSyntenyDisplay/afterAttach.js.map +1 -0
  47. package/dist/LinearSyntenyDisplay/components/Component.d.ts +6 -0
  48. package/dist/LinearSyntenyDisplay/components/Component.js +87 -0
  49. package/dist/LinearSyntenyDisplay/components/Component.js.map +1 -0
  50. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +6 -0
  51. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +160 -0
  52. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js.map +1 -0
  53. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +7 -0
  54. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +83 -0
  55. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js.map +1 -0
  56. package/dist/LinearSyntenyDisplay/components/util.d.ts +27 -0
  57. package/dist/LinearSyntenyDisplay/components/util.js +84 -0
  58. package/dist/LinearSyntenyDisplay/components/util.js.map +1 -0
  59. package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +23 -0
  60. package/dist/LinearSyntenyDisplay/configSchemaF.js +36 -0
  61. package/dist/LinearSyntenyDisplay/configSchemaF.js.map +1 -0
  62. package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +5 -0
  63. package/dist/LinearSyntenyDisplay/drawSynteny.js +235 -0
  64. package/dist/LinearSyntenyDisplay/drawSynteny.js.map +1 -0
  65. package/dist/LinearSyntenyDisplay/index.d.ts +3 -0
  66. package/dist/LinearSyntenyDisplay/index.js +47 -0
  67. package/dist/LinearSyntenyDisplay/index.js.map +1 -0
  68. package/dist/LinearSyntenyDisplay/model.d.ts +333 -0
  69. package/dist/LinearSyntenyDisplay/model.js +179 -0
  70. package/dist/LinearSyntenyDisplay/model.js.map +1 -0
  71. package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +8 -0
  72. package/dist/LinearSyntenyView/components/ExportSvgDialog.js +86 -0
  73. package/dist/LinearSyntenyView/components/ExportSvgDialog.js.map +1 -0
  74. package/dist/LinearSyntenyView/components/Icons.d.ts +4 -0
  75. package/dist/LinearSyntenyView/components/Icons.js +19 -0
  76. package/dist/LinearSyntenyView/components/Icons.js.map +1 -0
  77. package/dist/LinearSyntenyView/components/ImportCustomTrack.d.ts +11 -0
  78. package/dist/LinearSyntenyView/components/ImportCustomTrack.js +180 -0
  79. package/dist/LinearSyntenyView/components/ImportCustomTrack.js.map +1 -0
  80. package/dist/LinearSyntenyView/components/ImportForm.d.ts +6 -0
  81. package/dist/LinearSyntenyView/components/ImportForm.js +127 -0
  82. package/dist/LinearSyntenyView/components/ImportForm.js.map +1 -0
  83. package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.d.ts +9 -0
  84. package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.js +63 -0
  85. package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.js.map +1 -0
  86. package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +7 -0
  87. package/dist/LinearSyntenyView/components/LinearSyntenyView.js +38 -0
  88. package/dist/LinearSyntenyView/components/LinearSyntenyView.js.map +1 -0
  89. package/dist/LinearSyntenyView/index.d.ts +3 -0
  90. package/dist/LinearSyntenyView/index.js +42 -0
  91. package/dist/LinearSyntenyView/index.js.map +1 -0
  92. package/dist/LinearSyntenyView/model.d.ts +754 -0
  93. package/dist/LinearSyntenyView/model.js +170 -0
  94. package/dist/LinearSyntenyView/model.js.map +1 -0
  95. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +6 -0
  96. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +13 -0
  97. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js.map +1 -0
  98. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +4 -0
  99. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +85 -0
  100. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js.map +1 -0
  101. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -0
  102. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +66 -0
  103. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js.map +1 -0
  104. package/dist/SyntenyFeatureDetail/index.d.ts +3 -0
  105. package/dist/SyntenyFeatureDetail/index.js +58 -0
  106. package/dist/SyntenyFeatureDetail/index.js.map +1 -0
  107. package/dist/SyntenyTrack/configSchema.d.ts +75 -0
  108. package/dist/SyntenyTrack/configSchema.js +16 -0
  109. package/dist/SyntenyTrack/configSchema.js.map +1 -0
  110. package/dist/SyntenyTrack/index.d.ts +3 -0
  111. package/dist/SyntenyTrack/index.js +19 -0
  112. package/dist/SyntenyTrack/index.js.map +1 -0
  113. package/dist/index.d.ts +7 -0
  114. package/dist/index.js +47 -0
  115. package/dist/index.js.map +1 -0
  116. package/dist/util.d.ts +25 -0
  117. package/dist/util.js +77 -0
  118. package/dist/util.js.map +1 -0
  119. package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +52 -0
  120. package/esm/LGVSyntenyDisplay/configSchemaF.js +16 -0
  121. package/esm/LGVSyntenyDisplay/configSchemaF.js.map +1 -0
  122. package/esm/LGVSyntenyDisplay/index.d.ts +3 -0
  123. package/esm/LGVSyntenyDisplay/index.js +19 -0
  124. package/esm/LGVSyntenyDisplay/index.js.map +1 -0
  125. package/esm/LGVSyntenyDisplay/model.d.ts +380 -0
  126. package/esm/LGVSyntenyDisplay/model.js +152 -0
  127. package/esm/LGVSyntenyDisplay/model.js.map +1 -0
  128. package/esm/LaunchLinearSyntenyView.d.ts +2 -0
  129. package/esm/LaunchLinearSyntenyView.js +55 -0
  130. package/esm/LaunchLinearSyntenyView.js.map +1 -0
  131. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +5 -0
  132. package/esm/LinearComparativeDisplay/configSchemaF.js +16 -0
  133. package/esm/LinearComparativeDisplay/configSchemaF.js.map +1 -0
  134. package/esm/LinearComparativeDisplay/index.d.ts +3 -0
  135. package/esm/LinearComparativeDisplay/index.js +19 -0
  136. package/esm/LinearComparativeDisplay/index.js.map +1 -0
  137. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +275 -0
  138. package/esm/LinearComparativeDisplay/stateModelFactory.js +170 -0
  139. package/esm/LinearComparativeDisplay/stateModelFactory.js.map +1 -0
  140. package/esm/LinearComparativeView/components/Header.d.ts +7 -0
  141. package/esm/LinearComparativeView/components/Header.js +61 -0
  142. package/esm/LinearComparativeView/components/Header.js.map +1 -0
  143. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +8 -0
  144. package/esm/LinearComparativeView/components/LinearComparativeView.js +94 -0
  145. package/esm/LinearComparativeView/components/LinearComparativeView.js.map +1 -0
  146. package/esm/LinearComparativeView/components/Rubberband.d.ts +9 -0
  147. package/esm/LinearComparativeView/components/Rubberband.js +200 -0
  148. package/esm/LinearComparativeView/components/Rubberband.js.map +1 -0
  149. package/esm/LinearComparativeView/index.d.ts +3 -0
  150. package/esm/LinearComparativeView/index.js +14 -0
  151. package/esm/LinearComparativeView/index.js.map +1 -0
  152. package/esm/LinearComparativeView/model.d.ts +326 -0
  153. package/esm/LinearComparativeView/model.js +318 -0
  154. package/esm/LinearComparativeView/model.js.map +1 -0
  155. package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +7 -0
  156. package/esm/LinearReadVsRef/LinearReadVsRef.js +258 -0
  157. package/esm/LinearReadVsRef/LinearReadVsRef.js.map +1 -0
  158. package/esm/LinearReadVsRef/index.d.ts +2 -0
  159. package/esm/LinearReadVsRef/index.js +49 -0
  160. package/esm/LinearReadVsRef/index.js.map +1 -0
  161. package/esm/LinearSyntenyDisplay/afterAttach.d.ts +2 -0
  162. package/esm/LinearSyntenyDisplay/afterAttach.js +104 -0
  163. package/esm/LinearSyntenyDisplay/afterAttach.js.map +1 -0
  164. package/esm/LinearSyntenyDisplay/components/Component.d.ts +6 -0
  165. package/esm/LinearSyntenyDisplay/components/Component.js +59 -0
  166. package/esm/LinearSyntenyDisplay/components/Component.js.map +1 -0
  167. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +6 -0
  168. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +132 -0
  169. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js.map +1 -0
  170. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +7 -0
  171. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +58 -0
  172. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js.map +1 -0
  173. package/esm/LinearSyntenyDisplay/components/util.d.ts +27 -0
  174. package/esm/LinearSyntenyDisplay/components/util.js +77 -0
  175. package/esm/LinearSyntenyDisplay/components/util.js.map +1 -0
  176. package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +23 -0
  177. package/esm/LinearSyntenyDisplay/configSchemaF.js +31 -0
  178. package/esm/LinearSyntenyDisplay/configSchemaF.js.map +1 -0
  179. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +5 -0
  180. package/esm/LinearSyntenyDisplay/drawSynteny.js +229 -0
  181. package/esm/LinearSyntenyDisplay/drawSynteny.js.map +1 -0
  182. package/esm/LinearSyntenyDisplay/index.d.ts +3 -0
  183. package/esm/LinearSyntenyDisplay/index.js +19 -0
  184. package/esm/LinearSyntenyDisplay/index.js.map +1 -0
  185. package/esm/LinearSyntenyDisplay/model.d.ts +333 -0
  186. package/esm/LinearSyntenyDisplay/model.js +151 -0
  187. package/esm/LinearSyntenyDisplay/model.js.map +1 -0
  188. package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +8 -0
  189. package/esm/LinearSyntenyView/components/ExportSvgDialog.js +60 -0
  190. package/esm/LinearSyntenyView/components/ExportSvgDialog.js.map +1 -0
  191. package/esm/LinearSyntenyView/components/Icons.d.ts +4 -0
  192. package/esm/LinearSyntenyView/components/Icons.js +11 -0
  193. package/esm/LinearSyntenyView/components/Icons.js.map +1 -0
  194. package/esm/LinearSyntenyView/components/ImportCustomTrack.d.ts +11 -0
  195. package/esm/LinearSyntenyView/components/ImportCustomTrack.js +152 -0
  196. package/esm/LinearSyntenyView/components/ImportCustomTrack.js.map +1 -0
  197. package/esm/LinearSyntenyView/components/ImportForm.d.ts +6 -0
  198. package/esm/LinearSyntenyView/components/ImportForm.js +99 -0
  199. package/esm/LinearSyntenyView/components/ImportForm.js.map +1 -0
  200. package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.d.ts +9 -0
  201. package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.js +38 -0
  202. package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.js.map +1 -0
  203. package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +7 -0
  204. package/esm/LinearSyntenyView/components/LinearSyntenyView.js +10 -0
  205. package/esm/LinearSyntenyView/components/LinearSyntenyView.js.map +1 -0
  206. package/esm/LinearSyntenyView/index.d.ts +3 -0
  207. package/esm/LinearSyntenyView/index.js +14 -0
  208. package/esm/LinearSyntenyView/index.js.map +1 -0
  209. package/esm/LinearSyntenyView/model.d.ts +754 -0
  210. package/esm/LinearSyntenyView/model.js +141 -0
  211. package/esm/LinearSyntenyView/model.js.map +1 -0
  212. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +6 -0
  213. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +7 -0
  214. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js.map +1 -0
  215. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +4 -0
  216. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +78 -0
  217. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js.map +1 -0
  218. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -0
  219. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +38 -0
  220. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js.map +1 -0
  221. package/esm/SyntenyFeatureDetail/index.d.ts +3 -0
  222. package/esm/SyntenyFeatureDetail/index.js +30 -0
  223. package/esm/SyntenyFeatureDetail/index.js.map +1 -0
  224. package/esm/SyntenyTrack/configSchema.d.ts +75 -0
  225. package/esm/SyntenyTrack/configSchema.js +14 -0
  226. package/esm/SyntenyTrack/configSchema.js.map +1 -0
  227. package/esm/SyntenyTrack/index.d.ts +3 -0
  228. package/esm/SyntenyTrack/index.js +14 -0
  229. package/esm/SyntenyTrack/index.js.map +1 -0
  230. package/esm/index.d.ts +7 -0
  231. package/esm/index.js +41 -0
  232. package/esm/index.js.map +1 -0
  233. package/esm/util.d.ts +25 -0
  234. package/esm/util.js +69 -0
  235. package/esm/util.js.map +1 -0
  236. package/package.json +67 -0
  237. package/src/LGVSyntenyDisplay/configSchemaF.ts +22 -0
  238. package/src/LGVSyntenyDisplay/index.ts +20 -0
  239. package/src/LGVSyntenyDisplay/model.ts +177 -0
  240. package/src/LaunchLinearSyntenyView.ts +86 -0
  241. package/src/LinearComparativeDisplay/configSchemaF.ts +22 -0
  242. package/src/LinearComparativeDisplay/index.ts +21 -0
  243. package/src/LinearComparativeDisplay/stateModelFactory.ts +212 -0
  244. package/src/LinearComparativeView/components/Header.tsx +103 -0
  245. package/src/LinearComparativeView/components/LinearComparativeView.tsx +152 -0
  246. package/src/LinearComparativeView/components/Rubberband.tsx +329 -0
  247. package/src/LinearComparativeView/index.ts +15 -0
  248. package/src/LinearComparativeView/model.ts +395 -0
  249. package/src/LinearReadVsRef/LinearReadVsRef.tsx +360 -0
  250. package/src/LinearReadVsRef/index.ts +58 -0
  251. package/src/LinearSyntenyDisplay/afterAttach.ts +149 -0
  252. package/src/LinearSyntenyDisplay/components/Component.tsx +75 -0
  253. package/src/LinearSyntenyDisplay/components/LinearSyntenyRendering.tsx +200 -0
  254. package/src/LinearSyntenyDisplay/components/SyntenyTooltip.tsx +82 -0
  255. package/src/LinearSyntenyDisplay/components/util.ts +142 -0
  256. package/src/LinearSyntenyDisplay/configSchemaF.ts +38 -0
  257. package/src/LinearSyntenyDisplay/drawSynteny.ts +266 -0
  258. package/src/LinearSyntenyDisplay/index.ts +21 -0
  259. package/src/LinearSyntenyDisplay/model.ts +187 -0
  260. package/src/LinearSyntenyView/components/ExportSvgDialog.tsx +148 -0
  261. package/src/LinearSyntenyView/components/Icons.tsx +24 -0
  262. package/src/LinearSyntenyView/components/ImportCustomTrack.tsx +262 -0
  263. package/src/LinearSyntenyView/components/ImportForm.tsx +221 -0
  264. package/src/LinearSyntenyView/components/ImportSyntenyTrackSelector.tsx +82 -0
  265. package/src/LinearSyntenyView/components/LinearSyntenyView.tsx +20 -0
  266. package/src/LinearSyntenyView/index.ts +15 -0
  267. package/src/LinearSyntenyView/model.test.ts +1605 -0
  268. package/src/LinearSyntenyView/model.ts +169 -0
  269. package/src/LinearSyntenyView/svgcomponents/SVGBackground.tsx +21 -0
  270. package/src/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.tsx +176 -0
  271. package/src/SyntenyFeatureDetail/SyntenyFeatureDetail.tsx +64 -0
  272. package/src/SyntenyFeatureDetail/index.ts +36 -0
  273. package/src/SyntenyTrack/configSchema.ts +23 -0
  274. package/src/SyntenyTrack/index.tsx +15 -0
  275. package/src/index.tsx +42 -0
  276. package/src/util.ts +124 -0
@@ -0,0 +1,380 @@
1
+ /// <reference types="react" />
2
+ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
3
+ import { Feature } from '@jbrowse/core/util';
4
+ /**
5
+ * #stateModel LGVSyntenyDisplay
6
+ * extends `LinearPileupDisplay`, displays location of "synteny" feature in a
7
+ * plain LGV, allowing linking out to external synteny views
8
+ */
9
+ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
10
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
11
+ type: import("mobx-state-tree").ISimpleType<string>;
12
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
13
+ } & {
14
+ heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
15
+ } & {
16
+ userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
17
+ userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
18
+ } & {
19
+ blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
20
+ key: import("mobx-state-tree").ISimpleType<string>;
21
+ region: import("mobx-state-tree").IModelType<{
22
+ refName: import("mobx-state-tree").ISimpleType<string>;
23
+ start: import("mobx-state-tree").ISimpleType<number>;
24
+ end: import("mobx-state-tree").ISimpleType<number>;
25
+ reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
26
+ } & {
27
+ assemblyName: import("mobx-state-tree").ISimpleType<string>;
28
+ }, {
29
+ setRefName(newRefName: string): void;
30
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
31
+ reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
32
+ isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
33
+ isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
34
+ }, {
35
+ renderInProgress: AbortController | undefined;
36
+ filled: boolean;
37
+ reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
38
+ features: Map<string, Feature> | undefined;
39
+ layout: any;
40
+ status: string;
41
+ error: unknown;
42
+ message: string | undefined;
43
+ maxHeightReached: boolean;
44
+ ReactComponent: ({ model, }: {
45
+ model: any;
46
+ }) => any;
47
+ renderProps: any;
48
+ } & {
49
+ doReload(): void;
50
+ afterAttach(): void;
51
+ setStatus(message: string): void;
52
+ setLoading(abortController: AbortController): void;
53
+ setMessage(messageText: string): void;
54
+ setRendered(props: {
55
+ reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
56
+ features: Map<string, Feature>;
57
+ layout: any;
58
+ maxHeightReached: boolean;
59
+ renderProps: any;
60
+ } | undefined): void;
61
+ setError(error: unknown): void;
62
+ reload(): void;
63
+ beforeDestroy(): void;
64
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
65
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
66
+ maxFeatureScreenDensity: {
67
+ type: string;
68
+ description: string;
69
+ defaultValue: number;
70
+ };
71
+ fetchSizeLimit: {
72
+ type: string;
73
+ defaultValue: number;
74
+ description: string;
75
+ };
76
+ height: {
77
+ type: string;
78
+ defaultValue: number;
79
+ description: string;
80
+ };
81
+ mouseover: {
82
+ type: string;
83
+ description: string;
84
+ defaultValue: string;
85
+ contextVariable: string[];
86
+ };
87
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
88
+ } & {
89
+ type: import("mobx-state-tree").ISimpleType<"LinearPileupDisplay">;
90
+ configuration: AnyConfigurationSchemaType;
91
+ showSoftClipping: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
92
+ featureHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
93
+ noSpacing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
94
+ fadeLikelihood: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
95
+ trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
96
+ mismatchAlpha: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
97
+ sortedBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
98
+ type: import("mobx-state-tree").ISimpleType<string>;
99
+ pos: import("mobx-state-tree").ISimpleType<number>;
100
+ tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
101
+ refName: import("mobx-state-tree").ISimpleType<string>;
102
+ assemblyName: import("mobx-state-tree").ISimpleType<string>;
103
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
104
+ colorBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
105
+ type: import("mobx-state-tree").ISimpleType<string>;
106
+ tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
107
+ extra: import("mobx-state-tree").IType<any, any, any>;
108
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
109
+ filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
110
+ flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
111
+ flagExclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
112
+ readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
113
+ tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
114
+ tag: import("mobx-state-tree").ISimpleType<string>;
115
+ value: import("mobx-state-tree").ISimpleType<string>;
116
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
117
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
118
+ } & {
119
+ /**
120
+ * #property
121
+ */
122
+ type: import("mobx-state-tree").ISimpleType<"LGVSyntenyDisplay">;
123
+ /**
124
+ * #property
125
+ */
126
+ configuration: AnyConfigurationSchemaType;
127
+ }, {
128
+ rendererTypeName: string;
129
+ error: unknown;
130
+ message: string | undefined;
131
+ } & {
132
+ readonly RenderingComponent: import("react").FC<{
133
+ model: {
134
+ id: string;
135
+ type: string;
136
+ rpcDriverName: string | undefined;
137
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
138
+ rendererTypeName: string;
139
+ error: unknown;
140
+ message: string | undefined;
141
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
142
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
143
+ type: import("mobx-state-tree").ISimpleType<string>;
144
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
145
+ }, {
146
+ rendererTypeName: string;
147
+ error: unknown;
148
+ message: string | undefined;
149
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
150
+ onHorizontalScroll?: Function | undefined;
151
+ blockState?: Record<string, any> | undefined;
152
+ }>;
153
+ readonly DisplayBlurb: import("react").FC<{
154
+ model: {
155
+ id: string;
156
+ type: string;
157
+ rpcDriverName: string | undefined;
158
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
159
+ rendererTypeName: string;
160
+ error: unknown;
161
+ message: string | undefined;
162
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
163
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
164
+ type: import("mobx-state-tree").ISimpleType<string>;
165
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
166
+ }, {
167
+ rendererTypeName: string;
168
+ error: unknown;
169
+ message: string | undefined;
170
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
171
+ }> | null;
172
+ readonly adapterConfig: any;
173
+ readonly parentTrack: any;
174
+ renderProps(): any;
175
+ readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
176
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
177
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
178
+ readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
179
+ regionCannotBeRendered(): null;
180
+ } & {
181
+ setMessage(arg?: string | undefined): void;
182
+ setError(error?: unknown): void;
183
+ setRpcDriverName(rpcDriverName: string): void;
184
+ reload(): void;
185
+ } & {
186
+ scrollTop: number;
187
+ } & {
188
+ readonly height: number;
189
+ } & {
190
+ setScrollTop(scrollTop: number): void;
191
+ setHeight(displayHeight: number): number;
192
+ resizeHeight(distance: number): number;
193
+ } & {
194
+ featureDensityStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats> | undefined;
195
+ featureDensityStats: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined;
196
+ currStatsBpPerPx: number;
197
+ } & {
198
+ readonly currentBytesRequested: number;
199
+ readonly currentFeatureScreenDensity: number;
200
+ readonly maxFeatureScreenDensity: any;
201
+ readonly featureDensityStatsReady: boolean;
202
+ readonly maxAllowableBytes: number;
203
+ } & {
204
+ afterAttach(): void;
205
+ } & {
206
+ setCurrStatsBpPerPx(n: number): void;
207
+ setFeatureDensityStatsLimit(stats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void;
208
+ getFeatureDensityStats(): Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
209
+ setFeatureDensityStatsP(arg: any): void;
210
+ setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats | undefined): void;
211
+ clearFeatureDensityStats(): void;
212
+ } & {
213
+ readonly regionTooLarge: boolean;
214
+ readonly regionTooLargeReason: string;
215
+ } & {
216
+ regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
217
+ regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
218
+ } & {
219
+ featureIdUnderMouse: string | undefined;
220
+ contextMenuFeature: Feature | undefined;
221
+ } & {
222
+ readonly blockType: "staticBlocks" | "dynamicBlocks";
223
+ readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
224
+ } & {
225
+ readonly renderDelay: number;
226
+ readonly TooltipComponent: import("react").FC<any>;
227
+ readonly selectedFeatureId: string | undefined;
228
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
229
+ } & {
230
+ readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
231
+ readonly featureUnderMouse: Feature | undefined;
232
+ getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
233
+ getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
234
+ searchFeatureByID(id: string): [number, number, number, number] | undefined;
235
+ } & {
236
+ addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
237
+ deleteBlock(key: string): void;
238
+ selectFeature(feature: Feature): void;
239
+ clearFeatureSelection(): void;
240
+ setFeatureIdUnderMouse(feature?: string | undefined): void;
241
+ setContextMenuFeature(feature?: Feature | undefined): void;
242
+ } & {
243
+ reload(): Promise<void>;
244
+ } & {
245
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
246
+ contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
247
+ renderProps(): any;
248
+ } & {
249
+ renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
250
+ afterAttach(): void;
251
+ } & {
252
+ colorTagMap: import("mobx").ObservableMap<string, string>;
253
+ modificationTagMap: import("mobx").ObservableMap<string, string>;
254
+ featureUnderMouseVolatile: Feature | undefined;
255
+ currSortBpPerPx: number;
256
+ modificationsReady: boolean;
257
+ sortReady: boolean;
258
+ tagsReady: boolean;
259
+ } & {
260
+ readonly autorunReady: boolean;
261
+ } & {
262
+ setModificationsReady(flag: boolean): void;
263
+ setTagsReady(flag: boolean): void;
264
+ setSortReady(flag: boolean): void;
265
+ setCurrSortBpPerPx(n: number): void;
266
+ setMaxHeight(n: number): void;
267
+ setFeatureHeight(n?: number | undefined): void;
268
+ setNoSpacing(flag?: boolean | undefined): void;
269
+ setColorScheme(colorScheme: {
270
+ type: string;
271
+ tag?: string | undefined;
272
+ }): void;
273
+ updateModificationColorMap(uniqueModifications: string[]): void;
274
+ updateColorTagMap(uniqueTag: string[]): void;
275
+ setFeatureUnderMouse(feat?: Feature | undefined): void;
276
+ selectFeature(feature: Feature): void;
277
+ clearSelected(): void;
278
+ copyFeatureToClipboard(feature: Feature): void;
279
+ toggleSoftClipping(): void;
280
+ toggleMismatchAlpha(): void;
281
+ setConfig(conf: {
282
+ [x: string]: any;
283
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
284
+ setSubschema(slotName: string, data: unknown): any;
285
+ } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>): void;
286
+ setSortedBy(type: string, tag?: string | undefined): void;
287
+ setFilterBy(filter: import("@jbrowse/plugin-alignments/src/LinearPileupDisplay/model").Filter): void;
288
+ } & {
289
+ reload(): void;
290
+ } & {
291
+ readonly rendererConfig: {
292
+ [x: string]: any;
293
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
294
+ setSubschema(slotName: string, data: unknown): any;
295
+ } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
296
+ } & {
297
+ readonly maxHeight: any;
298
+ readonly featureHeightSetting: any;
299
+ readonly mismatchAlphaSetting: any;
300
+ readonly featureUnderMouse: Feature | undefined;
301
+ readonly renderReady: boolean;
302
+ } & {
303
+ readonly rendererTypeName: string;
304
+ contextMenuItems(): ({
305
+ label: string;
306
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
307
+ muiName: string;
308
+ };
309
+ onClick: () => void;
310
+ } | {
311
+ label: string;
312
+ icon: typeof import("@jbrowse/core/ui/Icons").ContentCopy;
313
+ onClick: () => void;
314
+ })[];
315
+ readonly DisplayBlurb: (props: import("@jbrowse/plugin-alignments/src/LinearPileupDisplay/components/LinearPileupDisplayBlurb").LinearPileupDisplayBlurbProps) => import("react").JSX.Element | null;
316
+ renderPropsPre(): any;
317
+ renderProps(): any;
318
+ trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
319
+ label: string;
320
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
321
+ muiName: string;
322
+ };
323
+ type: string;
324
+ checked: boolean;
325
+ onClick: () => void;
326
+ disabled?: undefined;
327
+ subMenu?: undefined;
328
+ } | {
329
+ label: string;
330
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
331
+ muiName: string;
332
+ };
333
+ disabled: boolean;
334
+ subMenu: {
335
+ label: string;
336
+ onClick: () => void;
337
+ }[];
338
+ type?: undefined;
339
+ checked?: undefined;
340
+ onClick?: undefined;
341
+ } | {
342
+ label: string;
343
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
344
+ muiName: string;
345
+ };
346
+ subMenu: {
347
+ label: string;
348
+ onClick: () => void;
349
+ }[];
350
+ type?: undefined;
351
+ checked?: undefined;
352
+ onClick?: undefined;
353
+ disabled?: undefined;
354
+ } | {
355
+ label: string;
356
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
357
+ muiName: string;
358
+ };
359
+ onClick: () => void;
360
+ type?: undefined;
361
+ checked?: undefined;
362
+ disabled?: undefined;
363
+ subMenu?: undefined;
364
+ } | {
365
+ label: string;
366
+ type: string;
367
+ checked: any;
368
+ onClick: () => void;
369
+ icon?: undefined;
370
+ disabled?: undefined;
371
+ subMenu?: undefined;
372
+ })[];
373
+ } & {
374
+ afterAttach(): void;
375
+ } & {
376
+ contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
377
+ } & {
378
+ afterCreate(): void;
379
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
380
+ export default stateModelFactory;
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const configuration_1 = require("@jbrowse/core/configuration");
4
+ const util_1 = require("@jbrowse/core/util");
5
+ const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
6
+ const mobx_state_tree_1 = require("mobx-state-tree");
7
+ const mobx_1 = require("mobx");
8
+ const { parseCigar } = plugin_alignments_1.MismatchParser;
9
+ function findPosInCigar(cigar, startX) {
10
+ let featX = 0;
11
+ let mateX = 0;
12
+ for (let i = 0; i < cigar.length; i++) {
13
+ const len = +cigar[i];
14
+ const op = cigar[i + 1];
15
+ const min = Math.min(len, startX - featX);
16
+ if (featX >= startX) {
17
+ break;
18
+ }
19
+ else if (op === 'I') {
20
+ mateX += len;
21
+ }
22
+ else if (op === 'D') {
23
+ featX += min;
24
+ }
25
+ else if (op === 'M') {
26
+ mateX += min;
27
+ featX += min;
28
+ }
29
+ }
30
+ return [featX, mateX];
31
+ }
32
+ async function navToSynteny(feature, self) {
33
+ const session = (0, util_1.getSession)(self);
34
+ const track = (0, util_1.getContainingTrack)(self);
35
+ const view = (0, util_1.getContainingView)(self);
36
+ const reg = view.dynamicBlocks.contentBlocks[0];
37
+ const cigar = feature.get('CIGAR');
38
+ const strand = feature.get('strand');
39
+ const regStart = reg.start;
40
+ const regEnd = reg.end;
41
+ const featStart = feature.get('start');
42
+ const featEnd = feature.get('end');
43
+ const mate = feature.get('mate');
44
+ const mateStart = mate.start;
45
+ const mateEnd = mate.end;
46
+ const mateAsm = mate.assemblyName;
47
+ const mateRef = mate.refName;
48
+ const featAsm = reg.assemblyName;
49
+ const featRef = reg.refName;
50
+ let rMateStart;
51
+ let rMateEnd;
52
+ let rFeatStart;
53
+ let rFeatEnd;
54
+ if (cigar) {
55
+ const p = parseCigar(cigar);
56
+ const [fStartX, mStartX] = findPosInCigar(p, regStart - featStart);
57
+ const [fEndX, mEndX] = findPosInCigar(p, regEnd - featStart);
58
+ // avoid multiply by 0 with strand undefined
59
+ const flipper = strand === -1 ? -1 : 1;
60
+ rFeatStart = featStart + fStartX;
61
+ rFeatEnd = featStart + fEndX;
62
+ rMateStart = (strand === -1 ? mateEnd : mateStart) + mStartX * flipper;
63
+ rMateEnd = (strand === -1 ? mateEnd : mateStart) + mEndX * flipper;
64
+ }
65
+ else {
66
+ rFeatStart = featStart;
67
+ rFeatEnd = featEnd;
68
+ rMateStart = mateStart;
69
+ rMateEnd = mateEnd;
70
+ }
71
+ const trackId = track.configuration.trackId;
72
+ const view2 = session.addView('LinearSyntenyView', {
73
+ type: 'LinearSyntenyView',
74
+ views: [
75
+ {
76
+ id: `${Math.random()}`,
77
+ type: 'LinearGenomeView',
78
+ hideHeader: true,
79
+ },
80
+ {
81
+ id: `${Math.random()}`,
82
+ type: 'LinearGenomeView',
83
+ hideHeader: true,
84
+ },
85
+ ],
86
+ tracks: [
87
+ {
88
+ configuration: trackId,
89
+ type: 'SyntenyTrack',
90
+ displays: [
91
+ {
92
+ type: 'LinearSyntenyDisplay',
93
+ configuration: `${trackId}-LinearSyntenyDisplay`,
94
+ },
95
+ ],
96
+ },
97
+ ],
98
+ });
99
+ const f = (n) => Math.floor(n);
100
+ const l1 = `${featRef}:${f(rFeatStart)}-${f(rFeatEnd)}`;
101
+ const m1 = Math.min(rMateStart, rMateEnd);
102
+ const m2 = Math.max(rMateStart, rMateEnd);
103
+ const l2 = `${mateRef}:${f(m1)}-${f(m2)}${strand === -1 ? '[rev]' : ''}`;
104
+ await (0, mobx_1.when)(() => view2.width !== undefined);
105
+ await Promise.all([
106
+ view2.views[0].navToLocString(l1, featAsm),
107
+ view2.views[1].navToLocString(l2, mateAsm),
108
+ ]);
109
+ }
110
+ /**
111
+ * #stateModel LGVSyntenyDisplay
112
+ * extends `LinearPileupDisplay`, displays location of "synteny" feature in a
113
+ * plain LGV, allowing linking out to external synteny views
114
+ */
115
+ function stateModelFactory(schema) {
116
+ return mobx_state_tree_1.types
117
+ .compose('LGVSyntenyDisplay', (0, plugin_alignments_1.linearPileupDisplayStateModelFactory)(schema), mobx_state_tree_1.types.model({
118
+ /**
119
+ * #property
120
+ */
121
+ type: mobx_state_tree_1.types.literal('LGVSyntenyDisplay'),
122
+ /**
123
+ * #property
124
+ */
125
+ configuration: (0, configuration_1.ConfigurationReference)(schema),
126
+ }))
127
+ .views(self => {
128
+ const superContextMenuItems = self.contextMenuItems;
129
+ return {
130
+ contextMenuItems() {
131
+ const feature = self.contextMenuFeature;
132
+ return [
133
+ ...superContextMenuItems(),
134
+ ...(feature
135
+ ? [
136
+ {
137
+ label: 'Open synteny view for this position',
138
+ onClick: () => navToSynteny(feature, self),
139
+ },
140
+ ]
141
+ : []),
142
+ ];
143
+ },
144
+ };
145
+ })
146
+ .actions(self => ({
147
+ afterCreate() {
148
+ // use color by strand to help indicate inversions better
149
+ self.setColorScheme({ type: 'strand' });
150
+ },
151
+ }));
152
+ }
153
+ exports.default = stateModelFactory;
154
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/LGVSyntenyDisplay/model.ts"],"names":[],"mappings":";;AAAA,+DAGoC;AACpC,6CAK2B;AAC3B,kEAGmC;AACnC,qDAA0D;AAC1D,+BAA2B;AAO3B,MAAM,EAAE,UAAU,EAAE,GAAG,kCAAc,CAAA;AAErC,SAAS,cAAc,CAAC,KAAe,EAAE,MAAc;IACrD,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACrB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QACvB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,CAAA;QAEzC,IAAI,KAAK,IAAI,MAAM,EAAE;YACnB,MAAK;SACN;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE;YACrB,KAAK,IAAI,GAAG,CAAA;SACb;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE;YACrB,KAAK,IAAI,GAAG,CAAA;SACb;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE;YACrB,KAAK,IAAI,GAAG,CAAA;YACZ,KAAK,IAAI,GAAG,CAAA;SACb;KACF;IACD,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACvB,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,OAAgB,EAAE,IAAuB;IACnE,MAAM,OAAO,GAAG,IAAA,iBAAU,EAAC,IAAI,CAAC,CAAA;IAChC,MAAM,KAAK,GAAG,IAAA,yBAAkB,EAAC,IAAI,CAAC,CAAA;IACtC,MAAM,IAAI,GAAG,I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AAqB,GAAG,IAAI,CAAC,gBAAgB,CAAA;QACnD,OAAO;YACL,gBAAgB;gBACd,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAA;gBACvC,OAAO;oBACL,GAAG,qBAAqB,EAAE;oBAC1B,GAAG,CAAC,OAAO;wBACT,CAAC,CAAC;4BACE;gCACE,KAAK,EAAE,qCAAqC;gCAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC;6BAC3C;yBACF;wBACH,CAAC,CAAC,EAAE,CAAC;iBACR,CAAA;YACH,CAAC;SACF,CAAA;IACH,CAAC,CAAC;SACD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,WAAW;YACT,yDAAyD;YACzD,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;QACzC,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC;AAED,kBAAe,iBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import PluginManager from '@jbrowse/core/PluginManager';
2
+ export default function LaunchLinearSyntenyView(pluginManager: PluginManager): void;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mobx_1 = require("mobx");
4
+ function LaunchLinearSyntenyView(pluginManager) {
5
+ pluginManager.addToExtensionPoint('LaunchView-LinearSyntenyView',
6
+ // @ts-expect-error
7
+ async ({ session, views, tracks = [], }) => {
8
+ try {
9
+ const { assemblyManager } = session;
10
+ const model = session.addView('LinearSyntenyView', {});
11
+ await (0, mobx_1.when)(() => !!model.width);
12
+ model.setViews(await Promise.all(views.map(async (view) => {
13
+ const asm = await assemblyManager.waitForAssembly(view.assembly);
14
+ if (!asm) {
15
+ throw new Error(`Assembly ${view.assembly} failed to load`);
16
+ }
17
+ return {
18
+ type: 'LinearGenomeView',
19
+ bpPerPx: 1,
20
+ offsetPx: 0,
21
+ hideHeader: true,
22
+ displayedRegions: asm.regions,
23
+ };
24
+ })));
25
+ await Promise.all(model.views.map(view => (0, mobx_1.when)(() => view.initialized)));
26
+ const idsNotFound = [];
27
+ await Promise.all(views.map(async (data, idx) => {
28
+ const view = model.views[idx];
29
+ const { loc, tracks = [] } = data;
30
+ await view.navToLocString(loc);
31
+ tracks.forEach(track => tryTrack(view, track, idsNotFound));
32
+ }));
33
+ tracks.forEach(track => tryTrack(model, track, idsNotFound));
34
+ if (idsNotFound.length) {
35
+ throw new Error(`Could not resolve identifiers: ${idsNotFound.join(',')}`);
36
+ }
37
+ }
38
+ catch (e) {
39
+ session.notify(`${e}`, 'error');
40
+ throw e;
41
+ }
42
+ });
43
+ }
44
+ exports.default = LaunchLinearSyntenyView;
45
+ function tryTrack(model, trackId, idsNotFound) {
46
+ try {
47
+ model.showTrack(trackId);
48
+ }
49
+ catch (e) {
50
+ if (`${e}`.match('Could not resolve identifier')) {
51
+ idsNotFound.push(trackId);
52
+ }
53
+ else {
54
+ throw e;
55
+ }
56
+ }
57
+ }
58
+ //# sourceMappingURL=LaunchLinearSyntenyView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LaunchLinearSyntenyView.js","sourceRoot":"","sources":["../src/LaunchLinearSyntenyView.ts"],"names":[],"mappings":";;AAGA,+BAA2B;AAI3B,SAAwB,uBAAuB,CAAC,aAA4B;IAC1E,aAAa,CAAC,mBAAmB,CAC/B,8BAA8B;IAC9B,mBAAmB;IACnB,KAAK,EAAE,EACL,OAAO,EACP,KAAK,EACL,MAAM,GAAG,EAAE,GAKZ,EAAE,EAAE;QACH,IAAI;YACF,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAA;YACnC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAQ,CAAA;YAE7D,MAAM,IAAA,WAAI,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAE/B,KAAK,CAAC,QAA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AK,EAAE,WAAW,CAAC,CAAC,CAAA;YAE5D,IAAI,WAAW,CAAC,MAAM,EAAE;gBACtB,MAAM,IAAI,KAAK,CACb,kCAAkC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC1D,CAAA;aACF;SACF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;YAC/B,MAAM,CAAC,CAAA;SACR;IACH,CAAC,CACF,CAAA;AACH,CAAC;AA9DD,0CA8DC;AAED,SAAS,QAAQ,CACf,KAA2C,EAC3C,OAAe,EACf,WAAqB;IAErB,IAAI;QACF,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;KACzB;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,EAAE;YAChD,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;SAC1B;aAAM;YACL,MAAM,CAAC,CAAA;SACR;KACF;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * #config LinearComparativeDisplay
3
+ */
4
+ declare function configSchemaFactory(pluginManager: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
5
+ export default configSchemaFactory;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* eslint-disable @typescript-eslint/no-explicit-any */
4
+ const configuration_1 = require("@jbrowse/core/configuration");
5
+ /**
6
+ * #config LinearComparativeDisplay
7
+ */
8
+ function configSchemaFactory(pluginManager) {
9
+ return (0, configuration_1.ConfigurationSchema)('LinearComparativeDisplay', {}, {
10
+ explicitlyTyped: true,
11
+ /**
12
+ * #identifier
13
+ */
14
+ explicitIdentifier: 'displayId',
15
+ });
16
+ }
17
+ exports.default = configSchemaFactory;
18
+ //# sourceMappingURL=configSchemaF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchemaF.js","sourceRoot":"","sources":["../../src/LinearComparativeDisplay/configSchemaF.ts"],"names":[],"mappings":";;AAAA,uDAAuD;AACvD,+DAAiE;AAEjE;;GAEG;AACH,SAAS,mBAAmB,CAAC,aAAkB;IAC7C,OAAO,IAAA,mCAAmB,EACxB,0BAA0B,EAC1B,EAAE,EACF;QACE,eAAe,EAAE,IAAI;QAErB;;WAEG;QACH,kBAAkB,EAAE,WAAW;KAChC,CACF,CAAA;AACH,CAAC;AAED,kBAAe,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import PluginManager from '@jbrowse/core/PluginManager';
2
+ declare const _default: (pluginManager: PluginManager) => void;
3
+ export default _default;