@sjcrh/proteinpaint-client 2.181.0 → 2.182.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 (950) hide show
  1. package/dist/2dmaf-SLBAWGPG.js +1371 -0
  2. package/dist/AIProjectAdmin-6SH5X3AF.js +830 -0
  3. package/dist/AppHeader-MVYNRMC7.js +833 -0
  4. package/dist/BoxPlot-HLGWW3IK.js +1295 -0
  5. package/dist/CorrelationVolcano-TZCYC3NI.js +617 -0
  6. package/dist/DE-2J2SK5UT.js +93 -0
  7. package/dist/DE-2J2SK5UT.js.map +7 -0
  8. package/dist/DEinput-QM3GOQHM.js +297 -0
  9. package/dist/DEinput-QM3GOQHM.js.map +7 -0
  10. package/dist/DifferentialAnalysis-DS7CQOT6.js +238 -0
  11. package/dist/Disco-U5I6NJUT.js +3199 -0
  12. package/dist/Disco.UI-J2B7GGEZ.js +242 -0
  13. package/dist/DmrPlot-D5W76QPY.js +640 -0
  14. package/dist/GB-LM5SGUG4.js +1125 -0
  15. package/dist/HicApp-YNBGAGKM.js +2248 -0
  16. package/dist/NumBinaryEditor-4QA5DQJT.js +268 -0
  17. package/dist/NumBinaryEditor-4QA5DQJT.js.map +7 -0
  18. package/dist/NumBinaryEditor.unit.spec-YWSIFTOJ.js +284 -0
  19. package/dist/NumContEditor-ZPLVZFLH.js +105 -0
  20. package/dist/NumContEditor.unit.spec-NBCFOCOX.js +167 -0
  21. package/dist/NumCustomBinEditor-TXEYRVPL.js +36 -0
  22. package/dist/NumCustomBinEditor.unit.spec-SQM63H4B.js +282 -0
  23. package/dist/NumDiscreteEditor-6C4OWX62.js +177 -0
  24. package/dist/NumDiscreteEditor-6C4OWX62.js.map +7 -0
  25. package/dist/NumDiscreteEditor.unit.spec-4HC4AGAM.js +200 -0
  26. package/dist/NumRegularBinEditor-VQAS3OXK.js +36 -0
  27. package/dist/NumRegularBinEditor.unit.spec-RGVEPB3Z.js +225 -0
  28. package/dist/NumSplineEditor-SXOJICHU.js +190 -0
  29. package/dist/NumSplineEditor-SXOJICHU.js.map +7 -0
  30. package/dist/NumSplineEditor.unit.spec-HF5E6ANH.js +197 -0
  31. package/dist/NumericDensity-LMLPMOSE.js +36 -0
  32. package/dist/NumericDensity.unit.spec-3ZI5EVON.js +219 -0
  33. package/dist/NumericHandler-Q6F6ANOS.js +37 -0
  34. package/dist/NumericHandler.unit.spec-E6Z5HUNZ.js +217 -0
  35. package/dist/RunChart2-XSNWNAIL.js +756 -0
  36. package/dist/SC-RA46YM57.js +733 -0
  37. package/dist/Volcano-75UDYPVB.js +1187 -0
  38. package/dist/WSIViewer-GYUUXCSJ.js +47933 -0
  39. package/dist/WsiSamplesPlot-KMI5S2EL.js +163 -0
  40. package/dist/adSandbox-JTK5XEQL.js +36 -0
  41. package/dist/alphaGenome-JRAV6WIY.js +173 -0
  42. package/dist/app-JKDZL23V.js +35 -0
  43. package/dist/app-OEARXM6E.js +47 -0
  44. package/dist/app.js +20 -20
  45. package/dist/bam-CYEPLBK4.js +857 -0
  46. package/dist/bam-CYEPLBK4.js.map +7 -0
  47. package/dist/barchart-GG5UFDG4.js +45 -0
  48. package/dist/barchart.data-KXA66FAL.js +22 -0
  49. package/dist/barchart.events-P2USOIR7.js +45 -0
  50. package/dist/barchart.integration.spec-5QSPQQLJ.js +1675 -0
  51. package/dist/block-6DVPQBSH.js +6200 -0
  52. package/dist/block-6DVPQBSH.js.map +7 -0
  53. package/dist/block.init-ZHX6DFWF.js +36 -0
  54. package/dist/block.mds.expressionrank-YMGYXXYT.js +357 -0
  55. package/dist/block.mds.geneboxplot-IAILQYX4.js +826 -0
  56. package/dist/block.mds.junction-BRNFNQMU.js +1543 -0
  57. package/dist/block.mds.svcnv-OHKC7YPO.js +6799 -0
  58. package/dist/block.svg-PNGK45HW.js +162 -0
  59. package/dist/block.tk.aicheck-SCIOJ4WN.js +281 -0
  60. package/dist/block.tk.ase-BABJ73GG.js +363 -0
  61. package/dist/block.tk.bam-LZWJ5BCQ.js +1904 -0
  62. package/dist/block.tk.bedgraphdot-7NQLC3XJ.js +382 -0
  63. package/dist/block.tk.bigwig.ui-VNY4SFD5.js +209 -0
  64. package/dist/block.tk.hicstraw-36A7VDRM.js +821 -0
  65. package/dist/block.tk.junction-D373YEMK.js +2362 -0
  66. package/dist/block.tk.junction.textmatrixui-FFII7J3X.js +197 -0
  67. package/dist/block.tk.ld-XGB6KMDO.js +97 -0
  68. package/dist/block.tk.menu-PEZANZBZ.js +1027 -0
  69. package/dist/block.tk.pgv-MU5BPTT2.js +942 -0
  70. package/dist/brainImaging-LVJON47N.js +421 -0
  71. package/dist/chat-5FDIAQJ4.js +148 -0
  72. package/dist/chunk-22NJUYET.js +281 -0
  73. package/dist/chunk-22NJUYET.js.map +7 -0
  74. package/dist/chunk-2J3566TA.js +215 -0
  75. package/dist/chunk-2J3566TA.js.map +7 -0
  76. package/dist/chunk-2OSEZCWZ.js +205 -0
  77. package/dist/chunk-5OHXYXLD.js +46 -0
  78. package/dist/chunk-5OHXYXLD.js.map +7 -0
  79. package/dist/chunk-6MSCYO7K.js +119 -0
  80. package/dist/chunk-7A7NMCQ3.js +534 -0
  81. package/dist/chunk-7FEHI46K.js +20456 -0
  82. package/dist/chunk-7FEHI46K.js.map +7 -0
  83. package/dist/chunk-AETE4F7R.js +252 -0
  84. package/dist/chunk-AZYDW5T7.js +441 -0
  85. package/dist/chunk-B6HCIAM3.js +34 -0
  86. package/dist/chunk-BEWDIM6H.js +42 -0
  87. package/dist/chunk-BEWDIM6H.js.map +7 -0
  88. package/dist/chunk-CCIZJAXB.js +2815 -0
  89. package/dist/chunk-DHZL3FBC.js +107 -0
  90. package/dist/chunk-DONWY7TP.js +39 -0
  91. package/dist/chunk-DVDDXOWT.js +815 -0
  92. package/dist/chunk-E6DRQJJT.js +480 -0
  93. package/dist/chunk-ESKU6LNC.js +36 -0
  94. package/dist/chunk-F6V4AYWP.js +177 -0
  95. package/dist/chunk-FBAJTPBU.js +302 -0
  96. package/dist/chunk-FGMPKWT5.js +371 -0
  97. package/dist/chunk-FK4MYVW2.js +261 -0
  98. package/dist/chunk-FMBJ4SKC.js +98 -0
  99. package/dist/chunk-FOEZG4VX.js +505 -0
  100. package/dist/chunk-FOEZG4VX.js.map +7 -0
  101. package/dist/chunk-FQRLSKJC.js +226 -0
  102. package/dist/chunk-G6ELKVBG.js +629 -0
  103. package/dist/chunk-GKK3CZ6H.js +4207 -0
  104. package/dist/chunk-GKK3CZ6H.js.map +7 -0
  105. package/dist/chunk-GO5SIPFE.js +194 -0
  106. package/dist/chunk-GPOECA3V.js +386 -0
  107. package/dist/chunk-GTOY3JJO.js +288 -0
  108. package/dist/chunk-GTOY3JJO.js.map +7 -0
  109. package/dist/chunk-GW7DHJYH.js +439 -0
  110. package/dist/chunk-H2D7EVUA.js +158 -0
  111. package/dist/chunk-H2D7EVUA.js.map +7 -0
  112. package/dist/chunk-H2K5KZP7.js +95 -0
  113. package/dist/chunk-H5XFH3FV.js +153 -0
  114. package/dist/chunk-HAMDFQIX.js +228 -0
  115. package/dist/chunk-HH4QLSTK.js +4952 -0
  116. package/dist/chunk-IBTPGSYI.js +526 -0
  117. package/dist/chunk-IGEQI6MR.js +1561 -0
  118. package/dist/chunk-IGEQI6MR.js.map +7 -0
  119. package/dist/chunk-IIRU6VK2.js +2672 -0
  120. package/dist/chunk-ILF2GKBY.js +1205 -0
  121. package/dist/chunk-ILF2GKBY.js.map +7 -0
  122. package/dist/chunk-IP4T477W.js +92 -0
  123. package/dist/chunk-IQIXGTQV.js +84 -0
  124. package/dist/chunk-IQIXGTQV.js.map +7 -0
  125. package/dist/chunk-IXT4U5CE.js +91 -0
  126. package/dist/chunk-IXT4U5CE.js.map +7 -0
  127. package/dist/chunk-JHOGX5VE.js +272 -0
  128. package/dist/chunk-JOXUBWN3.js +381 -0
  129. package/dist/chunk-K57RR3FD.js +142 -0
  130. package/dist/chunk-K6JLCMVL.js +129 -0
  131. package/dist/chunk-KSFSM46X.js +100 -0
  132. package/dist/chunk-KVG7FTTK.js +470 -0
  133. package/dist/chunk-LEDPPLQK.js +158 -0
  134. package/dist/chunk-LUTT3MBZ.js +1150 -0
  135. package/dist/chunk-MDL2HG3N.js +257 -0
  136. package/dist/chunk-MDL2HG3N.js.map +7 -0
  137. package/dist/chunk-MNRYCG2S.js +1271 -0
  138. package/dist/chunk-MNRYCG2S.js.map +7 -0
  139. package/dist/chunk-MPJHDHBA.js +2784 -0
  140. package/dist/chunk-MXI3NXRB.js +407 -0
  141. package/dist/chunk-MXI3NXRB.js.map +7 -0
  142. package/dist/chunk-O4PXELXF.js +615 -0
  143. package/dist/chunk-ORPCSG6T.js +14 -0
  144. package/dist/chunk-OUKDZKSZ.js +334 -0
  145. package/dist/chunk-P5HLYAHP.js +1087 -0
  146. package/dist/chunk-PIACSJPH.js +148 -0
  147. package/dist/chunk-PQABAAEZ.js +31 -0
  148. package/dist/chunk-PSMDCZET.js +46 -0
  149. package/dist/chunk-RFIVPTMS.js +217 -0
  150. package/dist/chunk-RSU37SVQ.js +54 -0
  151. package/dist/chunk-RTC4U4PH.js +2327 -0
  152. package/dist/chunk-RTC4U4PH.js.map +7 -0
  153. package/dist/chunk-RZ5JP44H.js +276 -0
  154. package/dist/chunk-RZ5JP44H.js.map +7 -0
  155. package/dist/chunk-SPAIFVM2.js +1155 -0
  156. package/dist/chunk-T2HYA2KL.js +55 -0
  157. package/dist/chunk-TCPU43TU.js +1741 -0
  158. package/dist/chunk-TCPU43TU.js.map +7 -0
  159. package/dist/chunk-TE3DK3A6.js +147 -0
  160. package/dist/chunk-TIQPSXFJ.js +237 -0
  161. package/dist/chunk-TN5GSG34.js +26 -0
  162. package/dist/chunk-UBGTQMOO.js +52 -0
  163. package/dist/chunk-UE5ZYM63.js +48 -0
  164. package/dist/chunk-UQACPOCM.js +102 -0
  165. package/dist/chunk-UR3C4SCH.js +446 -0
  166. package/dist/chunk-UWX7W22M.js +121 -0
  167. package/dist/chunk-VJ37HKM6.js +368 -0
  168. package/dist/chunk-VJ37HKM6.js.map +7 -0
  169. package/dist/chunk-VLTDUJRM.js +293 -0
  170. package/dist/chunk-W6UUEAEP.js +6364 -0
  171. package/dist/chunk-X6UPDFDX.js +229 -0
  172. package/dist/chunk-X6UPDFDX.js.map +7 -0
  173. package/dist/chunk-XD6BFNMR.js +172 -0
  174. package/dist/chunk-XD6BFNMR.js.map +7 -0
  175. package/dist/chunk-XOBD3EAM.js +1425 -0
  176. package/dist/chunk-XOBD3EAM.js.map +7 -0
  177. package/dist/chunk-Y3TDC7NU.js +170 -0
  178. package/dist/chunk-YOTWMCT5.js +824 -0
  179. package/dist/chunk-YUMPQ3CJ.js +203 -0
  180. package/dist/chunk-ZIBWLDQI.js +230 -0
  181. package/dist/chunk-ZIBWLDQI.js.map +7 -0
  182. package/dist/condition-VHP2L4GM.js +330 -0
  183. package/dist/controls-N5Q7U7JR.js +39 -0
  184. package/dist/controls.config-NJMW4SLR.js +37 -0
  185. package/dist/correlation-3LDASF5I.js +96 -0
  186. package/dist/cuminc-UWJ23W6C.js +1147 -0
  187. package/dist/cuminc.integration.spec-OZYYET3W.js +676 -0
  188. package/dist/customdata.inputui-2FVCVSE4.js +285 -0
  189. package/dist/dataDownload-4S4PE5HX.js +328 -0
  190. package/dist/dataDownload.integration.spec-B57LEKFZ.js +191 -0
  191. package/dist/databrowser.ui-N6GHEQ2P.js +419 -0
  192. package/dist/dictionary-UP46QRYZ.js +98 -0
  193. package/dist/dnaMethylation-BOGAUAWA.js +36 -0
  194. package/dist/dnaMethylation.integration.spec-UAHBJSSJ.js +179 -0
  195. package/dist/e2pca-L5EBQJNP.js +348 -0
  196. package/dist/ep-Z67ORKUX.js +1254 -0
  197. package/dist/expclust.gdc.spec-SP7VOL64.js +305 -0
  198. package/dist/facet-HDB4VDGU.js +519 -0
  199. package/dist/geneExpClustering-6ZPOLTDJ.js +246 -0
  200. package/dist/geneExpression-T6YIG4XQ.js +312 -0
  201. package/dist/geneExpression-T7QUHV5S.js +36 -0
  202. package/dist/geneExpression.unit.spec-DO52L5IB.js +100 -0
  203. package/dist/geneORA-KOUDUWUO.js +276 -0
  204. package/dist/geneVariant-FVR76F6I.js +39 -0
  205. package/dist/geneVariant-I5QUITKG.js +37 -0
  206. package/dist/geneVariant.integration.spec-D4IRM7B5.js +196 -0
  207. package/dist/genefusion.ui-35IYSZD7.js +249 -0
  208. package/dist/geneset-7ZHJ5KWK.js +194 -0
  209. package/dist/genomeBrowser.spec-VXASVLNH.js +279 -0
  210. package/dist/grin2-7NM56COO.js +1554 -0
  211. package/dist/grin2-IY26UUQI.js +1031 -0
  212. package/dist/gsea-TORO46C6.js +45 -0
  213. package/dist/hierCluster-3BKEGW6P.js +58 -0
  214. package/dist/hierCluster-HM3LOM6V.js +62 -0
  215. package/dist/hierCluster.config-LDO5IGQ5.js +38 -0
  216. package/dist/hierCluster.integration.spec-XO5R6CQT.js +374 -0
  217. package/dist/hierCluster.interactivity-NVQ6262K.js +52 -0
  218. package/dist/hierCluster.renderers-SWPPNBLU.js +21 -0
  219. package/dist/imagePlot-V4WLAPV6.js +139 -0
  220. package/dist/importPlot-NZKQEOX4.js +8 -0
  221. package/dist/isoformExpression-TIZBIGNL.js +38 -0
  222. package/dist/isoformExpression.unit.spec-WHH5LPFG.js +124 -0
  223. package/dist/isoformExpression.unit.spec-WHH5LPFG.js.map +7 -0
  224. package/dist/launch.adhoc-JYEN42NM.js +40 -0
  225. package/dist/leftlabel.sample-43DL3J3H.js +257 -0
  226. package/dist/legacyDataset-QRSNRVUA.js +119 -0
  227. package/dist/lollipop-NMWZ4FVF.js +166 -0
  228. package/dist/maf-DS3EOVGV.js +450 -0
  229. package/dist/maf-DS3EOVGV.js.map +7 -0
  230. package/dist/maftimeline-ZB2753S7.js +591 -0
  231. package/dist/matrix-RCGQWQ3C.js +57 -0
  232. package/dist/matrix-WTTEK4FT.js +62 -0
  233. package/dist/matrix.cells-UO5ASQ35.js +28 -0
  234. package/dist/matrix.config-3UQAT3QR.js +39 -0
  235. package/dist/matrix.controls-PRZ77K5L.js +37 -0
  236. package/dist/matrix.data-4W73RQ3H.js +25 -0
  237. package/dist/matrix.groups-5VMPI7SA.js +26 -0
  238. package/dist/matrix.integration.spec-2F5LDLC2.js +3070 -0
  239. package/dist/matrix.interactivity-MIPZ6ELV.js +40 -0
  240. package/dist/matrix.layout-EO5LVYRO.js +42 -0
  241. package/dist/matrix.legend-QBFBFEUG.js +22 -0
  242. package/dist/matrix.renderers-ERJXVCQL.js +36 -0
  243. package/dist/matrix.serieses-E23EPXHA.js +21 -0
  244. package/dist/matrix.sort-I4UGMEXR.js +27 -0
  245. package/dist/matrix.sort.unit.spec-CRGF6CSE.js +470 -0
  246. package/dist/matrix.sorterUi-YLSYTYLE.js +18 -0
  247. package/dist/matrix.sorterUi.unit.spec-ENG3ICOO.js +340 -0
  248. package/dist/mavb-5WR7OJHI.js +730 -0
  249. package/dist/mds.fimo-3ZRH7BBJ.js +516 -0
  250. package/dist/mds.samplescatterplot-RPXR2FVK.js +1548 -0
  251. package/dist/mds.survivalplot-WSSMYUZD.js +481 -0
  252. package/dist/oncomatrix-JKYPUJQR.js +293 -0
  253. package/dist/oncomatrix-JKYPUJQR.js.map +7 -0
  254. package/dist/oncomatrix.spec-OEGU4DYK.js +446 -0
  255. package/dist/plot.2dvaf-ZGARLQNK.js +375 -0
  256. package/dist/plot.app-TKUJH3LK.js +39 -0
  257. package/dist/plot.barplot-FEIPGDZ2.js +100 -0
  258. package/dist/plot.boxplot-6RASUMZB.js +150 -0
  259. package/dist/plot.brainImaging-ZJPFWX2W.js +51 -0
  260. package/dist/plot.disco-2KTKB3XX.js +101 -0
  261. package/dist/plot.dzi-PC34YI6Y.js +33 -0
  262. package/dist/plot.ssgq-Z4UNJKWO.js +137 -0
  263. package/dist/plot.vaf2cov-NZ4WULKT.js +257 -0
  264. package/dist/plot.wsi-YYXFAZWY.js +36 -0
  265. package/dist/polar-X2GPIBLB.js +184 -0
  266. package/dist/polar2-TZ553QQH.js +226 -0
  267. package/dist/profile.spec-VB6VMFLY.js +78 -0
  268. package/dist/profileBarchart-SKJSTC7B.js +265 -0
  269. package/dist/profileForms-RLOGSMAQ.js +438 -0
  270. package/dist/profilePlot-267ZS3RG.js +52 -0
  271. package/dist/profileRadar-KGOBHCSF.js +261 -0
  272. package/dist/profileRadarFacility-MCJKSHUM.js +261 -0
  273. package/dist/proteomeAbundance-JUYAYO5I.js +63 -0
  274. package/dist/proteomeAbundance-PGHZSVAF.js +19 -0
  275. package/dist/qualitative-3IECKKJM.js +41 -0
  276. package/dist/regression-J6FFRPXN.js +54 -0
  277. package/dist/regression.inputs-T7LWBSYZ.js +46 -0
  278. package/dist/regression.inputs.term-TT7PNX6G.js +46 -0
  279. package/dist/regression.inputs.values.table-SHFUNKCS.js +43 -0
  280. package/dist/regression.integration.spec-QKHMJTHA.js +784 -0
  281. package/dist/regression.results-D4WX6VIV.js +38 -0
  282. package/dist/regression.spec-7SW55L7X.js +706 -0
  283. package/dist/report-QYOZ4BRF.js +220 -0
  284. package/dist/sampleScatter.spec-JCHFMGNF.js +200 -0
  285. package/dist/sampleView-7RPKNAZC.js +46 -0
  286. package/dist/samplelst-4WNPHZVG.js +109 -0
  287. package/dist/samplematrix-CG52DSXJ.js +2196 -0
  288. package/dist/sc-OJSWILSA.js +84 -0
  289. package/dist/scatter-LG2RMMEC.js +800 -0
  290. package/dist/scatter.integration.spec-QPANYTKW.js +1194 -0
  291. package/dist/selectGenomeWithTklst-QXRVE6N4.js +132 -0
  292. package/dist/singleCellCellType-XBSRL33U.js +36 -0
  293. package/dist/singleCellCellType.unit.spec-YZX4CSXA.js +177 -0
  294. package/dist/singleCellGeneExpression-64ECP62X.js +36 -0
  295. package/dist/singleCellGeneExpression.unit.spec-CFHFXMA6.js +163 -0
  296. package/dist/singleCellPlot-E5F62JY6.js +51 -0
  297. package/dist/singlecell-FCY5EOUV.js +84 -0
  298. package/dist/singlecell-S7B5V7NK.js +1570 -0
  299. package/dist/snp-ACKX4GRX.js +36 -0
  300. package/dist/snp.unit.spec-QBGHKKUD.js +174 -0
  301. package/dist/snplocus-7EUOW7J7.js +206 -0
  302. package/dist/spliceevent.a53ss.diagram-ALQZA35Z.js +149 -0
  303. package/dist/spliceevent.exonskip.diagram-UF7WJA5R.js +275 -0
  304. package/dist/spliceevent.noeventdiagram-4HPGRNRR.js +458 -0
  305. package/dist/ssGSEA-FDRBBBLJ.js +36 -0
  306. package/dist/ssGSEA.unit.spec-EZEOWJVV.js +86 -0
  307. package/dist/summarizeCnvGeneexp-FTL2MGAJ.js +158 -0
  308. package/dist/summarizeGeneexpSurvival-DDIF4UW6.js +105 -0
  309. package/dist/summarizeMutationCnv-L3GL5YDY.js +159 -0
  310. package/dist/summarizeMutationDiagnosis-LALOJTHV.js +38 -0
  311. package/dist/summarizeMutationSurvival-TSNTSOBZ.js +97 -0
  312. package/dist/summary-YRHVS64T.js +47 -0
  313. package/dist/summary.integration.spec-766YQLQA.js +412 -0
  314. package/dist/summaryInput-VQ2X6GSX.js +218 -0
  315. package/dist/sunburst-XFOONS6K.js +282 -0
  316. package/dist/survival-FQXZH2MM.js +44 -0
  317. package/dist/survival-TVA3ZWVP.js +56 -0
  318. package/dist/survival.integration.spec-WFIOPD6A.js +787 -0
  319. package/dist/svgraph-4BFBO7EL.js +1385 -0
  320. package/dist/svmr-ML7GAIIA.js +3840 -0
  321. package/dist/table-SMLMUWPP.js +198 -0
  322. package/dist/termCollection-22CPTISZ.js +36 -0
  323. package/dist/termCollection-EE6AOIVA.js +177 -0
  324. package/dist/termCollection.unit.spec-4DIW3CJ3.js +206 -0
  325. package/dist/tk-ITZCKOQ5.js +44 -0
  326. package/dist/tp.ui-R6HVKCBC.js +1457 -0
  327. package/dist/tvs.density-AQ5GD437.js +18 -0
  328. package/dist/tvs.dt-2263TBEJ.js +37 -0
  329. package/dist/tvs.dtcnv.categorical-TRRHL33N.js +38 -0
  330. package/dist/tvs.dtcnv.continuous-GREYNF52.js +70 -0
  331. package/dist/tvs.dtfusion-XOX46L3M.js +38 -0
  332. package/dist/tvs.dtsnvindel-IDMXT53F.js +38 -0
  333. package/dist/tvs.dtsv-ZDWFYH2C.js +38 -0
  334. package/dist/tvs.numeric-ZN2R7BH3.js +21 -0
  335. package/dist/tvs.samplelst-GAP76HRH.js +102 -0
  336. package/dist/tvs.termCollection-GQ65UKSI.js +151 -0
  337. package/dist/violin-JGDL62YA.js +44 -0
  338. package/dist/violin.integration.spec-W4NN7LBY.js +1417 -0
  339. package/dist/violin.interactivity-H4RP4K5U.js +36 -0
  340. package/dist/violin.renderer-QPHLACDC.js +38 -0
  341. package/dist/vocabulary-7JACY4J2.js +39 -0
  342. package/package.json +2 -2
  343. package/dist/2dmaf-PFPBHIUI.js +0 -1371
  344. package/dist/AIProjectAdmin-H2GB5ZOX.js +0 -830
  345. package/dist/AppHeader-FCWML6WH.js +0 -833
  346. package/dist/BoxPlot-QKXGF76K.js +0 -1295
  347. package/dist/CorrelationVolcano-ZJ7Q6JBC.js +0 -617
  348. package/dist/DifferentialAnalysis-PWCFCWFY.js +0 -238
  349. package/dist/Disco-IE5JKIF2.js +0 -3199
  350. package/dist/Disco.UI-SR7LSJE3.js +0 -242
  351. package/dist/DmrPlot-UDY7GOSY.js +0 -640
  352. package/dist/GB-GNTOP5C6.js +0 -1125
  353. package/dist/HicApp-FZTJL3OA.js +0 -2248
  354. package/dist/NumBinaryEditor-R5QVG3C4.js +0 -266
  355. package/dist/NumBinaryEditor-R5QVG3C4.js.map +0 -7
  356. package/dist/NumBinaryEditor.unit.spec-BMVRI24W.js +0 -284
  357. package/dist/NumContEditor-6JT5D6IW.js +0 -105
  358. package/dist/NumContEditor.unit.spec-XBQF2SW6.js +0 -167
  359. package/dist/NumCustomBinEditor-MEKEFOQI.js +0 -36
  360. package/dist/NumCustomBinEditor.unit.spec-LEMQJHDT.js +0 -282
  361. package/dist/NumDiscreteEditor-U3N37XRQ.js +0 -170
  362. package/dist/NumDiscreteEditor-U3N37XRQ.js.map +0 -7
  363. package/dist/NumDiscreteEditor.unit.spec-WQM4DLKO.js +0 -200
  364. package/dist/NumRegularBinEditor-HQR5Y6P7.js +0 -36
  365. package/dist/NumRegularBinEditor.unit.spec-FL4IFT7L.js +0 -225
  366. package/dist/NumSplineEditor-OESWMWP5.js +0 -188
  367. package/dist/NumSplineEditor-OESWMWP5.js.map +0 -7
  368. package/dist/NumSplineEditor.unit.spec-HYOXO45B.js +0 -197
  369. package/dist/NumericDensity-GJZ4BBJS.js +0 -36
  370. package/dist/NumericDensity.unit.spec-6LXWAXW7.js +0 -219
  371. package/dist/NumericHandler-LZIMPOHS.js +0 -37
  372. package/dist/NumericHandler.unit.spec-ZSU35AMD.js +0 -217
  373. package/dist/RunChart2-7XV6TIFO.js +0 -756
  374. package/dist/SC-E4EYAG26.js +0 -733
  375. package/dist/Volcano-Z7TJK6PW.js +0 -1187
  376. package/dist/WSIViewer-ZH2XABLC.js +0 -47933
  377. package/dist/WsiSamplesPlot-BL47MDHQ.js +0 -163
  378. package/dist/adSandbox-V3NTKVBC.js +0 -36
  379. package/dist/alphaGenome-IQVFCSWQ.js +0 -173
  380. package/dist/app-GJLZ2G2U.js +0 -47
  381. package/dist/app-YSD2U64Q.js +0 -35
  382. package/dist/bam-TRIF3AIQ.js +0 -849
  383. package/dist/bam-TRIF3AIQ.js.map +0 -7
  384. package/dist/barchart-GLLUYTAJ.js +0 -45
  385. package/dist/barchart.data-FRYRGKH3.js +0 -22
  386. package/dist/barchart.events-WODVSHRN.js +0 -45
  387. package/dist/barchart.integration.spec-6POS3V3T.js +0 -1675
  388. package/dist/block-2QM37YSE.js +0 -6300
  389. package/dist/block-2QM37YSE.js.map +0 -7
  390. package/dist/block.init-7HDLKQVX.js +0 -36
  391. package/dist/block.mds.expressionrank-UIB25S6E.js +0 -357
  392. package/dist/block.mds.geneboxplot-4PQYO3MR.js +0 -826
  393. package/dist/block.mds.junction-DWFYZEC2.js +0 -1543
  394. package/dist/block.mds.svcnv-N3KJJ4GQ.js +0 -6799
  395. package/dist/block.svg-2HBDI7BT.js +0 -162
  396. package/dist/block.tk.aicheck-2M4522IQ.js +0 -281
  397. package/dist/block.tk.ase-URIKF6JD.js +0 -363
  398. package/dist/block.tk.bam-HTDMASHX.js +0 -1904
  399. package/dist/block.tk.bedgraphdot-RVKMSFCQ.js +0 -382
  400. package/dist/block.tk.bigwig.ui-7JPEOIKM.js +0 -209
  401. package/dist/block.tk.hicstraw-72J7UJ2J.js +0 -821
  402. package/dist/block.tk.junction-GGFMBCV5.js +0 -2362
  403. package/dist/block.tk.junction.textmatrixui-44SAYYWE.js +0 -197
  404. package/dist/block.tk.ld-XDKJFEOL.js +0 -97
  405. package/dist/block.tk.menu-46FOTM7H.js +0 -1027
  406. package/dist/block.tk.pgv-ZVONRT4B.js +0 -942
  407. package/dist/brainImaging-CSLO7ODJ.js +0 -421
  408. package/dist/chat-GMD22F3K.js +0 -148
  409. package/dist/chunk-22KWZOCN.js +0 -153
  410. package/dist/chunk-2K5DSRBJ.js +0 -84
  411. package/dist/chunk-2K5DSRBJ.js.map +0 -7
  412. package/dist/chunk-2NQ4TM74.js +0 -48
  413. package/dist/chunk-2TIYJ3PH.js +0 -815
  414. package/dist/chunk-2UWHV2SB.js +0 -261
  415. package/dist/chunk-2UWHV2SB.js.map +0 -7
  416. package/dist/chunk-3656ZY4T.js +0 -237
  417. package/dist/chunk-3TU6TRLQ.js +0 -98
  418. package/dist/chunk-4FJ5GS6P.js +0 -4202
  419. package/dist/chunk-4FJ5GS6P.js.map +0 -7
  420. package/dist/chunk-4FO7KZY2.js +0 -534
  421. package/dist/chunk-4OEOQX4L.js +0 -334
  422. package/dist/chunk-5HCB4HNL.js +0 -147
  423. package/dist/chunk-5ZICCKEH.js +0 -4952
  424. package/dist/chunk-6UU7VPDO.js +0 -272
  425. package/dist/chunk-6YLQN7FF.js +0 -441
  426. package/dist/chunk-74QJDBIP.js +0 -480
  427. package/dist/chunk-7FXPMQRW.js +0 -34
  428. package/dist/chunk-A2Y3GEUH.js +0 -228
  429. package/dist/chunk-AAEXTQT3.js +0 -330
  430. package/dist/chunk-AAEXTQT3.js.map +0 -7
  431. package/dist/chunk-AG6HVFQY.js +0 -504
  432. package/dist/chunk-AG6HVFQY.js.map +0 -7
  433. package/dist/chunk-AHLUW2BN.js +0 -129
  434. package/dist/chunk-AQ4OP4GR.js +0 -39
  435. package/dist/chunk-AYDXOUFX.js +0 -1275
  436. package/dist/chunk-AYDXOUFX.js.map +0 -7
  437. package/dist/chunk-BBIPZ2UF.js +0 -52
  438. package/dist/chunk-BBVOZ5BY.js +0 -230
  439. package/dist/chunk-BBVOZ5BY.js.map +0 -7
  440. package/dist/chunk-BHVDOW3W.js +0 -470
  441. package/dist/chunk-BNN32RI2.js +0 -36
  442. package/dist/chunk-BQLC6QOH.js +0 -368
  443. package/dist/chunk-BQLC6QOH.js.map +0 -7
  444. package/dist/chunk-C5QOWZK6.js +0 -629
  445. package/dist/chunk-CJJ6LDZM.js +0 -170
  446. package/dist/chunk-CJJ6LDZM.js.map +0 -7
  447. package/dist/chunk-D4U5X2QQ.js +0 -261
  448. package/dist/chunk-DV444SFD.js +0 -26
  449. package/dist/chunk-DWWAB4YQ.js +0 -102
  450. package/dist/chunk-FP5VKE3Z.js +0 -170
  451. package/dist/chunk-FVWCYGJL.js +0 -121
  452. package/dist/chunk-G2MAZI6I.js +0 -205
  453. package/dist/chunk-HLRNIO5K.js +0 -158
  454. package/dist/chunk-HTHH2B6D.js +0 -46
  455. package/dist/chunk-I7X6K4OL.js +0 -217
  456. package/dist/chunk-ITYEOGLB.js +0 -302
  457. package/dist/chunk-J6XKDYNZ.js +0 -276
  458. package/dist/chunk-J6XKDYNZ.js.map +0 -7
  459. package/dist/chunk-JDX4E7ZO.js +0 -381
  460. package/dist/chunk-JWX7GYHP.js +0 -95
  461. package/dist/chunk-KLFROH3F.js +0 -203
  462. package/dist/chunk-KQSN7PUK.js +0 -215
  463. package/dist/chunk-KQSN7PUK.js.map +0 -7
  464. package/dist/chunk-L2ED35QZ.js +0 -2815
  465. package/dist/chunk-L4QG7XZE.js +0 -46
  466. package/dist/chunk-L4QG7XZE.js.map +0 -7
  467. package/dist/chunk-LI7FE335.js +0 -371
  468. package/dist/chunk-LLPFFNLV.js +0 -526
  469. package/dist/chunk-LRV4VWRF.js +0 -94
  470. package/dist/chunk-LRV4VWRF.js.map +0 -7
  471. package/dist/chunk-M464GTNI.js +0 -615
  472. package/dist/chunk-MDN3K2BG.js +0 -229
  473. package/dist/chunk-MDN3K2BG.js.map +0 -7
  474. package/dist/chunk-N46WTUX7.js +0 -286
  475. package/dist/chunk-N46WTUX7.js.map +0 -7
  476. package/dist/chunk-NBMJ2UMA.js +0 -194
  477. package/dist/chunk-NI7VSKJI.js +0 -293
  478. package/dist/chunk-NTVM4ZPG.js +0 -2784
  479. package/dist/chunk-O64UTRAC.js +0 -252
  480. package/dist/chunk-OM326NV3.js +0 -100
  481. package/dist/chunk-P4ENJUBN.js +0 -386
  482. package/dist/chunk-PEKVBCIH.js +0 -824
  483. package/dist/chunk-PF6MKI4X.js +0 -92
  484. package/dist/chunk-PJTQP6RL.js +0 -54
  485. package/dist/chunk-PVSRVJBE.js +0 -1201
  486. package/dist/chunk-PVSRVJBE.js.map +0 -7
  487. package/dist/chunk-PZ3L3KM6.js +0 -55
  488. package/dist/chunk-QEHUEG4X.js +0 -1788
  489. package/dist/chunk-QEHUEG4X.js.map +0 -7
  490. package/dist/chunk-QXCVG66S.js +0 -2672
  491. package/dist/chunk-RIGZHHCP.js +0 -119
  492. package/dist/chunk-SEIANPCX.js +0 -142
  493. package/dist/chunk-SEQLC4AD.js +0 -177
  494. package/dist/chunk-SK7YVOQN.js +0 -148
  495. package/dist/chunk-SPPZB5ZQ.js +0 -158
  496. package/dist/chunk-SPPZB5ZQ.js.map +0 -7
  497. package/dist/chunk-T5KFRIP4.js +0 -1087
  498. package/dist/chunk-TTSNECVD.js +0 -1413
  499. package/dist/chunk-TTSNECVD.js.map +0 -7
  500. package/dist/chunk-TV74I3Y5.js +0 -43
  501. package/dist/chunk-TV74I3Y5.js.map +0 -7
  502. package/dist/chunk-TVXESYIR.js +0 -439
  503. package/dist/chunk-U3UR3U3F.js +0 -446
  504. package/dist/chunk-UFYU7AKL.js +0 -107
  505. package/dist/chunk-VIYGTRUZ.js +0 -6364
  506. package/dist/chunk-WCTH7CB3.js +0 -31
  507. package/dist/chunk-WGSWVYHY.js +0 -1155
  508. package/dist/chunk-WYZ4COTF.js +0 -226
  509. package/dist/chunk-WZRXJ5LL.js +0 -2370
  510. package/dist/chunk-WZRXJ5LL.js.map +0 -7
  511. package/dist/chunk-XZZLEHWC.js +0 -20328
  512. package/dist/chunk-XZZLEHWC.js.map +0 -7
  513. package/dist/chunk-Y7JAPSMG.js +0 -406
  514. package/dist/chunk-Y7JAPSMG.js.map +0 -7
  515. package/dist/chunk-YJ2HC4CP.js +0 -1150
  516. package/dist/chunk-ZLH4PJKX.js +0 -1658
  517. package/dist/chunk-ZLH4PJKX.js.map +0 -7
  518. package/dist/chunk-ZZSDYKD5.js +0 -14
  519. package/dist/condition-S52W57ZO.js +0 -330
  520. package/dist/controls-B4MTTPWO.js +0 -39
  521. package/dist/controls.config-6KBCTIPN.js +0 -37
  522. package/dist/correlation-VSBCBFFP.js +0 -96
  523. package/dist/cuminc-T5ZPAGVB.js +0 -1147
  524. package/dist/cuminc.integration.spec-2QT3IPHU.js +0 -676
  525. package/dist/customdata.inputui-5MHQQHJL.js +0 -285
  526. package/dist/dataDownload-S4EBNHMW.js +0 -328
  527. package/dist/dataDownload.integration.spec-OVSIWI34.js +0 -191
  528. package/dist/databrowser.ui-EAJS3NXV.js +0 -419
  529. package/dist/dictionary-CQHSMVYF.js +0 -98
  530. package/dist/dnaMethylation-G3F2INDH.js +0 -36
  531. package/dist/dnaMethylation.integration.spec-FWF4353K.js +0 -179
  532. package/dist/e2pca-SLXGPVHP.js +0 -348
  533. package/dist/ep-4HGUSDGJ.js +0 -1254
  534. package/dist/expclust.gdc.spec-JJ42ESKE.js +0 -305
  535. package/dist/facet-6WVTVKDV.js +0 -519
  536. package/dist/geneExpClustering-5LOZPD5X.js +0 -246
  537. package/dist/geneExpression-BJ46UGXW.js +0 -312
  538. package/dist/geneExpression-PTSZWKCM.js +0 -36
  539. package/dist/geneExpression.unit.spec-NW5HTO7F.js +0 -100
  540. package/dist/geneORA-H65EZ7QO.js +0 -276
  541. package/dist/geneVariant-T6GWOVZD.js +0 -39
  542. package/dist/geneVariant-WTDFZTXG.js +0 -37
  543. package/dist/geneVariant.integration.spec-OPSBRUM3.js +0 -196
  544. package/dist/genefusion.ui-RSBCC37C.js +0 -249
  545. package/dist/geneset-B67PAZVL.js +0 -194
  546. package/dist/genomeBrowser.spec-AUTULF4C.js +0 -279
  547. package/dist/grin2-CMBP7XVH.js +0 -1031
  548. package/dist/grin2-JVCNH3KW.js +0 -1554
  549. package/dist/gsea-H774WVPQ.js +0 -45
  550. package/dist/hierCluster-IQTXQUMI.js +0 -58
  551. package/dist/hierCluster-ZQJDXYBD.js +0 -62
  552. package/dist/hierCluster.config-ZHJTZK5L.js +0 -38
  553. package/dist/hierCluster.integration.spec-MSJ5GHHK.js +0 -374
  554. package/dist/hierCluster.interactivity-H2GNO6AA.js +0 -52
  555. package/dist/hierCluster.renderers-2TE6HMK2.js +0 -21
  556. package/dist/imagePlot-FMNMB7JZ.js +0 -139
  557. package/dist/importPlot-N66G43XX.js +0 -8
  558. package/dist/isoformExpression-B64WLO3H.js +0 -38
  559. package/dist/isoformExpression.unit.spec-D2R6CRKO.js +0 -126
  560. package/dist/isoformExpression.unit.spec-D2R6CRKO.js.map +0 -7
  561. package/dist/launch.adhoc-MPRAJ3GN.js +0 -40
  562. package/dist/leftlabel.sample-4JCKYXED.js +0 -257
  563. package/dist/legacyDataset-PBCPC5I7.js +0 -119
  564. package/dist/lollipop-25ADHT7O.js +0 -166
  565. package/dist/maf-POYTGXT4.js +0 -442
  566. package/dist/maf-POYTGXT4.js.map +0 -7
  567. package/dist/maftimeline-FOQF6O3X.js +0 -591
  568. package/dist/matrix-LHLAYDTQ.js +0 -57
  569. package/dist/matrix-ZKF7NRAD.js +0 -62
  570. package/dist/matrix.cells-H4TS74FJ.js +0 -28
  571. package/dist/matrix.config-HE7QUDER.js +0 -39
  572. package/dist/matrix.controls-VILCLNSC.js +0 -37
  573. package/dist/matrix.data-2OUWYD35.js +0 -25
  574. package/dist/matrix.groups-5BGJIOOJ.js +0 -26
  575. package/dist/matrix.integration.spec-DSXZHAEY.js +0 -3070
  576. package/dist/matrix.interactivity-VK3NWX5M.js +0 -40
  577. package/dist/matrix.layout-PUNMMNCC.js +0 -42
  578. package/dist/matrix.legend-QMERGVYU.js +0 -22
  579. package/dist/matrix.renderers-2KQ2NXSQ.js +0 -36
  580. package/dist/matrix.serieses-24G3XPJD.js +0 -21
  581. package/dist/matrix.sort-HTVT4K7C.js +0 -27
  582. package/dist/matrix.sort.unit.spec-EUVL76NB.js +0 -470
  583. package/dist/matrix.sorterUi-PJPFXWOJ.js +0 -18
  584. package/dist/matrix.sorterUi.unit.spec-QWL5Y4DQ.js +0 -340
  585. package/dist/mavb-UGM5SHEF.js +0 -730
  586. package/dist/mds.fimo-64US7RTE.js +0 -516
  587. package/dist/mds.samplescatterplot-JMXLXVIE.js +0 -1548
  588. package/dist/mds.survivalplot-RJ5UD3IU.js +0 -481
  589. package/dist/oncomatrix-ZFT3DRAP.js +0 -293
  590. package/dist/oncomatrix-ZFT3DRAP.js.map +0 -7
  591. package/dist/oncomatrix.spec-4YLKDGFE.js +0 -446
  592. package/dist/plot.2dvaf-DYSU6BBN.js +0 -375
  593. package/dist/plot.app-NFBVLAXZ.js +0 -39
  594. package/dist/plot.barplot-DBGTDK7J.js +0 -100
  595. package/dist/plot.boxplot-MCKZUROP.js +0 -150
  596. package/dist/plot.brainImaging-BBAVUEB4.js +0 -51
  597. package/dist/plot.disco-VGOEQYRL.js +0 -101
  598. package/dist/plot.dzi-YQIFOTZQ.js +0 -33
  599. package/dist/plot.ssgq-MU3BRTMC.js +0 -137
  600. package/dist/plot.vaf2cov-KDHZ7JXJ.js +0 -257
  601. package/dist/plot.wsi-G2TUGQF7.js +0 -36
  602. package/dist/polar-RCCZXZIU.js +0 -184
  603. package/dist/polar2-COQ3WIGW.js +0 -226
  604. package/dist/profile.spec-A4ZASR2T.js +0 -78
  605. package/dist/profileBarchart-GB4RK5DF.js +0 -265
  606. package/dist/profileForms-O5KBHRF6.js +0 -438
  607. package/dist/profilePlot-COCLCP5B.js +0 -52
  608. package/dist/profileRadar-4EE3YDOH.js +0 -261
  609. package/dist/profileRadarFacility-JYTSGA5H.js +0 -261
  610. package/dist/proteomeAbundance-JBVXUSD6.js +0 -19
  611. package/dist/proteomeAbundance-NQVU4DOW.js +0 -63
  612. package/dist/qualitative-QROOPDSI.js +0 -41
  613. package/dist/regression-7FQZ22OO.js +0 -54
  614. package/dist/regression.inputs-F62CES3A.js +0 -46
  615. package/dist/regression.inputs.term-BCGP7PX4.js +0 -46
  616. package/dist/regression.inputs.values.table-D3ZXZSH7.js +0 -43
  617. package/dist/regression.integration.spec-P2BBTT2O.js +0 -784
  618. package/dist/regression.results-JX6RJQQP.js +0 -38
  619. package/dist/regression.spec-ROME7T33.js +0 -706
  620. package/dist/report-B6MM4T6B.js +0 -220
  621. package/dist/sampleScatter.spec-EPCMC3SR.js +0 -200
  622. package/dist/sampleView-77EAJ75T.js +0 -46
  623. package/dist/samplelst-CX4NQWA7.js +0 -109
  624. package/dist/samplematrix-PYQFAH64.js +0 -2196
  625. package/dist/sc-X6SI5VVI.js +0 -84
  626. package/dist/scatter-ZFFHAI4F.js +0 -800
  627. package/dist/scatter.integration.spec-NN43OXRN.js +0 -1194
  628. package/dist/selectGenomeWithTklst-CZMVTBMD.js +0 -132
  629. package/dist/singleCellCellType-GOBX7JKV.js +0 -36
  630. package/dist/singleCellCellType.unit.spec-F344QMTQ.js +0 -177
  631. package/dist/singleCellGeneExpression-BLMNMEAI.js +0 -36
  632. package/dist/singleCellGeneExpression.unit.spec-6ZEPUFWC.js +0 -163
  633. package/dist/singleCellPlot-HLD7PLQH.js +0 -51
  634. package/dist/singlecell-HL4GLGIA.js +0 -1570
  635. package/dist/singlecell-JQFPINRS.js +0 -84
  636. package/dist/snp-EAUNFDAV.js +0 -36
  637. package/dist/snp.unit.spec-AVLPMAWI.js +0 -174
  638. package/dist/snplocus-2J7OA6OL.js +0 -206
  639. package/dist/spliceevent.a53ss.diagram-4DU2U7NW.js +0 -149
  640. package/dist/spliceevent.exonskip.diagram-GG5FGXOK.js +0 -275
  641. package/dist/spliceevent.noeventdiagram-T6RNIMCM.js +0 -458
  642. package/dist/ssGSEA-XJWLRVFQ.js +0 -36
  643. package/dist/ssGSEA.unit.spec-MQ23ODYO.js +0 -86
  644. package/dist/summarizeCnvGeneexp-CJPC76RM.js +0 -158
  645. package/dist/summarizeGeneexpSurvival-FGCFZTVG.js +0 -105
  646. package/dist/summarizeMutationCnv-4E7R2NHQ.js +0 -159
  647. package/dist/summarizeMutationDiagnosis-ZVX7AZK7.js +0 -38
  648. package/dist/summarizeMutationSurvival-EWXD7TCT.js +0 -97
  649. package/dist/summary-VUYBKQOC.js +0 -47
  650. package/dist/summary.integration.spec-EPBV5XCT.js +0 -412
  651. package/dist/summaryInput-YX5IRGWM.js +0 -218
  652. package/dist/sunburst-HPDML45I.js +0 -282
  653. package/dist/survival-E6SRRXBB.js +0 -44
  654. package/dist/survival-XOXDPXZR.js +0 -56
  655. package/dist/survival.integration.spec-SJBPJZGJ.js +0 -787
  656. package/dist/svgraph-D23WG3UE.js +0 -1385
  657. package/dist/svmr-UFC4TKWV.js +0 -3840
  658. package/dist/table-US2K6IYZ.js +0 -198
  659. package/dist/termCollection-E7S57CIN.js +0 -177
  660. package/dist/termCollection-ZMP3VE2G.js +0 -36
  661. package/dist/termCollection.unit.spec-MDWK6XH3.js +0 -206
  662. package/dist/tk-TLQJK6R4.js +0 -44
  663. package/dist/tp.ui-NQEAKWUH.js +0 -1457
  664. package/dist/tvs.density-HSVPDDGA.js +0 -18
  665. package/dist/tvs.dt-U2MINIBH.js +0 -37
  666. package/dist/tvs.dtcnv.categorical-2OOAZJKC.js +0 -38
  667. package/dist/tvs.dtcnv.continuous-5ETKBJ52.js +0 -70
  668. package/dist/tvs.dtfusion-EB4PPR3Y.js +0 -38
  669. package/dist/tvs.dtsnvindel-IRQPTKQF.js +0 -38
  670. package/dist/tvs.dtsv-TOVXZJCR.js +0 -38
  671. package/dist/tvs.numeric-ICUGA4WY.js +0 -21
  672. package/dist/tvs.samplelst-4SCH543Y.js +0 -102
  673. package/dist/tvs.termCollection-GGN5F6HC.js +0 -151
  674. package/dist/violin-7D7DN74I.js +0 -44
  675. package/dist/violin.integration.spec-KE76AL54.js +0 -1417
  676. package/dist/violin.interactivity-YPJ2H6SQ.js +0 -36
  677. package/dist/violin.renderer-UK7WSA2Z.js +0 -38
  678. package/dist/vocabulary-KLWZ6LRP.js +0 -39
  679. /package/dist/{2dmaf-PFPBHIUI.js.map → 2dmaf-SLBAWGPG.js.map} +0 -0
  680. /package/dist/{AIProjectAdmin-H2GB5ZOX.js.map → AIProjectAdmin-6SH5X3AF.js.map} +0 -0
  681. /package/dist/{AppHeader-FCWML6WH.js.map → AppHeader-MVYNRMC7.js.map} +0 -0
  682. /package/dist/{BoxPlot-QKXGF76K.js.map → BoxPlot-HLGWW3IK.js.map} +0 -0
  683. /package/dist/{CorrelationVolcano-ZJ7Q6JBC.js.map → CorrelationVolcano-TZCYC3NI.js.map} +0 -0
  684. /package/dist/{DifferentialAnalysis-PWCFCWFY.js.map → DifferentialAnalysis-DS7CQOT6.js.map} +0 -0
  685. /package/dist/{Disco-IE5JKIF2.js.map → Disco-U5I6NJUT.js.map} +0 -0
  686. /package/dist/{Disco.UI-SR7LSJE3.js.map → Disco.UI-J2B7GGEZ.js.map} +0 -0
  687. /package/dist/{DmrPlot-UDY7GOSY.js.map → DmrPlot-D5W76QPY.js.map} +0 -0
  688. /package/dist/{GB-GNTOP5C6.js.map → GB-LM5SGUG4.js.map} +0 -0
  689. /package/dist/{HicApp-FZTJL3OA.js.map → HicApp-YNBGAGKM.js.map} +0 -0
  690. /package/dist/{NumBinaryEditor.unit.spec-BMVRI24W.js.map → NumBinaryEditor.unit.spec-YWSIFTOJ.js.map} +0 -0
  691. /package/dist/{NumContEditor-6JT5D6IW.js.map → NumContEditor-ZPLVZFLH.js.map} +0 -0
  692. /package/dist/{NumContEditor.unit.spec-XBQF2SW6.js.map → NumContEditor.unit.spec-NBCFOCOX.js.map} +0 -0
  693. /package/dist/{NumCustomBinEditor-MEKEFOQI.js.map → NumCustomBinEditor-TXEYRVPL.js.map} +0 -0
  694. /package/dist/{NumCustomBinEditor.unit.spec-LEMQJHDT.js.map → NumCustomBinEditor.unit.spec-SQM63H4B.js.map} +0 -0
  695. /package/dist/{NumDiscreteEditor.unit.spec-WQM4DLKO.js.map → NumDiscreteEditor.unit.spec-4HC4AGAM.js.map} +0 -0
  696. /package/dist/{NumRegularBinEditor-HQR5Y6P7.js.map → NumRegularBinEditor-VQAS3OXK.js.map} +0 -0
  697. /package/dist/{NumRegularBinEditor.unit.spec-FL4IFT7L.js.map → NumRegularBinEditor.unit.spec-RGVEPB3Z.js.map} +0 -0
  698. /package/dist/{NumSplineEditor.unit.spec-HYOXO45B.js.map → NumSplineEditor.unit.spec-HF5E6ANH.js.map} +0 -0
  699. /package/dist/{NumericDensity-GJZ4BBJS.js.map → NumericDensity-LMLPMOSE.js.map} +0 -0
  700. /package/dist/{NumericDensity.unit.spec-6LXWAXW7.js.map → NumericDensity.unit.spec-3ZI5EVON.js.map} +0 -0
  701. /package/dist/{NumericHandler-LZIMPOHS.js.map → NumericHandler-Q6F6ANOS.js.map} +0 -0
  702. /package/dist/{NumericHandler.unit.spec-ZSU35AMD.js.map → NumericHandler.unit.spec-E6Z5HUNZ.js.map} +0 -0
  703. /package/dist/{RunChart2-7XV6TIFO.js.map → RunChart2-XSNWNAIL.js.map} +0 -0
  704. /package/dist/{SC-E4EYAG26.js.map → SC-RA46YM57.js.map} +0 -0
  705. /package/dist/{Volcano-Z7TJK6PW.js.map → Volcano-75UDYPVB.js.map} +0 -0
  706. /package/dist/{WSIViewer-ZH2XABLC.js.map → WSIViewer-GYUUXCSJ.js.map} +0 -0
  707. /package/dist/{WsiSamplesPlot-BL47MDHQ.js.map → WsiSamplesPlot-KMI5S2EL.js.map} +0 -0
  708. /package/dist/{adSandbox-V3NTKVBC.js.map → adSandbox-JTK5XEQL.js.map} +0 -0
  709. /package/dist/{alphaGenome-IQVFCSWQ.js.map → alphaGenome-JRAV6WIY.js.map} +0 -0
  710. /package/dist/{app-GJLZ2G2U.js.map → app-JKDZL23V.js.map} +0 -0
  711. /package/dist/{app-YSD2U64Q.js.map → app-OEARXM6E.js.map} +0 -0
  712. /package/dist/{barchart-GLLUYTAJ.js.map → barchart-GG5UFDG4.js.map} +0 -0
  713. /package/dist/{barchart.data-FRYRGKH3.js.map → barchart.data-KXA66FAL.js.map} +0 -0
  714. /package/dist/{barchart.events-WODVSHRN.js.map → barchart.events-P2USOIR7.js.map} +0 -0
  715. /package/dist/{barchart.integration.spec-6POS3V3T.js.map → barchart.integration.spec-5QSPQQLJ.js.map} +0 -0
  716. /package/dist/{block.init-7HDLKQVX.js.map → block.init-ZHX6DFWF.js.map} +0 -0
  717. /package/dist/{block.mds.expressionrank-UIB25S6E.js.map → block.mds.expressionrank-YMGYXXYT.js.map} +0 -0
  718. /package/dist/{block.mds.geneboxplot-4PQYO3MR.js.map → block.mds.geneboxplot-IAILQYX4.js.map} +0 -0
  719. /package/dist/{block.mds.junction-DWFYZEC2.js.map → block.mds.junction-BRNFNQMU.js.map} +0 -0
  720. /package/dist/{block.mds.svcnv-N3KJJ4GQ.js.map → block.mds.svcnv-OHKC7YPO.js.map} +0 -0
  721. /package/dist/{block.svg-2HBDI7BT.js.map → block.svg-PNGK45HW.js.map} +0 -0
  722. /package/dist/{block.tk.aicheck-2M4522IQ.js.map → block.tk.aicheck-SCIOJ4WN.js.map} +0 -0
  723. /package/dist/{block.tk.ase-URIKF6JD.js.map → block.tk.ase-BABJ73GG.js.map} +0 -0
  724. /package/dist/{block.tk.bam-HTDMASHX.js.map → block.tk.bam-LZWJ5BCQ.js.map} +0 -0
  725. /package/dist/{block.tk.bedgraphdot-RVKMSFCQ.js.map → block.tk.bedgraphdot-7NQLC3XJ.js.map} +0 -0
  726. /package/dist/{block.tk.bigwig.ui-7JPEOIKM.js.map → block.tk.bigwig.ui-VNY4SFD5.js.map} +0 -0
  727. /package/dist/{block.tk.hicstraw-72J7UJ2J.js.map → block.tk.hicstraw-36A7VDRM.js.map} +0 -0
  728. /package/dist/{block.tk.junction-GGFMBCV5.js.map → block.tk.junction-D373YEMK.js.map} +0 -0
  729. /package/dist/{block.tk.junction.textmatrixui-44SAYYWE.js.map → block.tk.junction.textmatrixui-FFII7J3X.js.map} +0 -0
  730. /package/dist/{block.tk.ld-XDKJFEOL.js.map → block.tk.ld-XGB6KMDO.js.map} +0 -0
  731. /package/dist/{block.tk.menu-46FOTM7H.js.map → block.tk.menu-PEZANZBZ.js.map} +0 -0
  732. /package/dist/{block.tk.pgv-ZVONRT4B.js.map → block.tk.pgv-MU5BPTT2.js.map} +0 -0
  733. /package/dist/{brainImaging-CSLO7ODJ.js.map → brainImaging-LVJON47N.js.map} +0 -0
  734. /package/dist/{chat-GMD22F3K.js.map → chat-5FDIAQJ4.js.map} +0 -0
  735. /package/dist/{chunk-G2MAZI6I.js.map → chunk-2OSEZCWZ.js.map} +0 -0
  736. /package/dist/{chunk-RIGZHHCP.js.map → chunk-6MSCYO7K.js.map} +0 -0
  737. /package/dist/{chunk-4FO7KZY2.js.map → chunk-7A7NMCQ3.js.map} +0 -0
  738. /package/dist/{chunk-O64UTRAC.js.map → chunk-AETE4F7R.js.map} +0 -0
  739. /package/dist/{chunk-6YLQN7FF.js.map → chunk-AZYDW5T7.js.map} +0 -0
  740. /package/dist/{chunk-7FXPMQRW.js.map → chunk-B6HCIAM3.js.map} +0 -0
  741. /package/dist/{chunk-L2ED35QZ.js.map → chunk-CCIZJAXB.js.map} +0 -0
  742. /package/dist/{chunk-UFYU7AKL.js.map → chunk-DHZL3FBC.js.map} +0 -0
  743. /package/dist/{chunk-AQ4OP4GR.js.map → chunk-DONWY7TP.js.map} +0 -0
  744. /package/dist/{chunk-2TIYJ3PH.js.map → chunk-DVDDXOWT.js.map} +0 -0
  745. /package/dist/{chunk-74QJDBIP.js.map → chunk-E6DRQJJT.js.map} +0 -0
  746. /package/dist/{chunk-BNN32RI2.js.map → chunk-ESKU6LNC.js.map} +0 -0
  747. /package/dist/{chunk-SEQLC4AD.js.map → chunk-F6V4AYWP.js.map} +0 -0
  748. /package/dist/{chunk-ITYEOGLB.js.map → chunk-FBAJTPBU.js.map} +0 -0
  749. /package/dist/{chunk-LI7FE335.js.map → chunk-FGMPKWT5.js.map} +0 -0
  750. /package/dist/{chunk-D4U5X2QQ.js.map → chunk-FK4MYVW2.js.map} +0 -0
  751. /package/dist/{chunk-3TU6TRLQ.js.map → chunk-FMBJ4SKC.js.map} +0 -0
  752. /package/dist/{chunk-WYZ4COTF.js.map → chunk-FQRLSKJC.js.map} +0 -0
  753. /package/dist/{chunk-C5QOWZK6.js.map → chunk-G6ELKVBG.js.map} +0 -0
  754. /package/dist/{chunk-NBMJ2UMA.js.map → chunk-GO5SIPFE.js.map} +0 -0
  755. /package/dist/{chunk-P4ENJUBN.js.map → chunk-GPOECA3V.js.map} +0 -0
  756. /package/dist/{chunk-TVXESYIR.js.map → chunk-GW7DHJYH.js.map} +0 -0
  757. /package/dist/{chunk-JWX7GYHP.js.map → chunk-H2K5KZP7.js.map} +0 -0
  758. /package/dist/{chunk-22KWZOCN.js.map → chunk-H5XFH3FV.js.map} +0 -0
  759. /package/dist/{chunk-A2Y3GEUH.js.map → chunk-HAMDFQIX.js.map} +0 -0
  760. /package/dist/{chunk-5ZICCKEH.js.map → chunk-HH4QLSTK.js.map} +0 -0
  761. /package/dist/{chunk-LLPFFNLV.js.map → chunk-IBTPGSYI.js.map} +0 -0
  762. /package/dist/{chunk-QXCVG66S.js.map → chunk-IIRU6VK2.js.map} +0 -0
  763. /package/dist/{chunk-PF6MKI4X.js.map → chunk-IP4T477W.js.map} +0 -0
  764. /package/dist/{chunk-6UU7VPDO.js.map → chunk-JHOGX5VE.js.map} +0 -0
  765. /package/dist/{chunk-JDX4E7ZO.js.map → chunk-JOXUBWN3.js.map} +0 -0
  766. /package/dist/{chunk-SEIANPCX.js.map → chunk-K57RR3FD.js.map} +0 -0
  767. /package/dist/{chunk-AHLUW2BN.js.map → chunk-K6JLCMVL.js.map} +0 -0
  768. /package/dist/{chunk-OM326NV3.js.map → chunk-KSFSM46X.js.map} +0 -0
  769. /package/dist/{chunk-BHVDOW3W.js.map → chunk-KVG7FTTK.js.map} +0 -0
  770. /package/dist/{chunk-HLRNIO5K.js.map → chunk-LEDPPLQK.js.map} +0 -0
  771. /package/dist/{chunk-YJ2HC4CP.js.map → chunk-LUTT3MBZ.js.map} +0 -0
  772. /package/dist/{chunk-NTVM4ZPG.js.map → chunk-MPJHDHBA.js.map} +0 -0
  773. /package/dist/{chunk-M464GTNI.js.map → chunk-O4PXELXF.js.map} +0 -0
  774. /package/dist/{chunk-ZZSDYKD5.js.map → chunk-ORPCSG6T.js.map} +0 -0
  775. /package/dist/{chunk-4OEOQX4L.js.map → chunk-OUKDZKSZ.js.map} +0 -0
  776. /package/dist/{chunk-T5KFRIP4.js.map → chunk-P5HLYAHP.js.map} +0 -0
  777. /package/dist/{chunk-SK7YVOQN.js.map → chunk-PIACSJPH.js.map} +0 -0
  778. /package/dist/{chunk-WCTH7CB3.js.map → chunk-PQABAAEZ.js.map} +0 -0
  779. /package/dist/{chunk-HTHH2B6D.js.map → chunk-PSMDCZET.js.map} +0 -0
  780. /package/dist/{chunk-I7X6K4OL.js.map → chunk-RFIVPTMS.js.map} +0 -0
  781. /package/dist/{chunk-PJTQP6RL.js.map → chunk-RSU37SVQ.js.map} +0 -0
  782. /package/dist/{chunk-WGSWVYHY.js.map → chunk-SPAIFVM2.js.map} +0 -0
  783. /package/dist/{chunk-PZ3L3KM6.js.map → chunk-T2HYA2KL.js.map} +0 -0
  784. /package/dist/{chunk-5HCB4HNL.js.map → chunk-TE3DK3A6.js.map} +0 -0
  785. /package/dist/{chunk-3656ZY4T.js.map → chunk-TIQPSXFJ.js.map} +0 -0
  786. /package/dist/{chunk-DV444SFD.js.map → chunk-TN5GSG34.js.map} +0 -0
  787. /package/dist/{chunk-BBIPZ2UF.js.map → chunk-UBGTQMOO.js.map} +0 -0
  788. /package/dist/{chunk-2NQ4TM74.js.map → chunk-UE5ZYM63.js.map} +0 -0
  789. /package/dist/{chunk-DWWAB4YQ.js.map → chunk-UQACPOCM.js.map} +0 -0
  790. /package/dist/{chunk-U3UR3U3F.js.map → chunk-UR3C4SCH.js.map} +0 -0
  791. /package/dist/{chunk-FVWCYGJL.js.map → chunk-UWX7W22M.js.map} +0 -0
  792. /package/dist/{chunk-NI7VSKJI.js.map → chunk-VLTDUJRM.js.map} +0 -0
  793. /package/dist/{chunk-VIYGTRUZ.js.map → chunk-W6UUEAEP.js.map} +0 -0
  794. /package/dist/{chunk-FP5VKE3Z.js.map → chunk-Y3TDC7NU.js.map} +0 -0
  795. /package/dist/{chunk-PEKVBCIH.js.map → chunk-YOTWMCT5.js.map} +0 -0
  796. /package/dist/{chunk-KLFROH3F.js.map → chunk-YUMPQ3CJ.js.map} +0 -0
  797. /package/dist/{condition-S52W57ZO.js.map → condition-VHP2L4GM.js.map} +0 -0
  798. /package/dist/{controls-B4MTTPWO.js.map → controls-N5Q7U7JR.js.map} +0 -0
  799. /package/dist/{controls.config-6KBCTIPN.js.map → controls.config-NJMW4SLR.js.map} +0 -0
  800. /package/dist/{correlation-VSBCBFFP.js.map → correlation-3LDASF5I.js.map} +0 -0
  801. /package/dist/{cuminc-T5ZPAGVB.js.map → cuminc-UWJ23W6C.js.map} +0 -0
  802. /package/dist/{cuminc.integration.spec-2QT3IPHU.js.map → cuminc.integration.spec-OZYYET3W.js.map} +0 -0
  803. /package/dist/{customdata.inputui-5MHQQHJL.js.map → customdata.inputui-2FVCVSE4.js.map} +0 -0
  804. /package/dist/{dataDownload-S4EBNHMW.js.map → dataDownload-4S4PE5HX.js.map} +0 -0
  805. /package/dist/{dataDownload.integration.spec-OVSIWI34.js.map → dataDownload.integration.spec-B57LEKFZ.js.map} +0 -0
  806. /package/dist/{databrowser.ui-EAJS3NXV.js.map → databrowser.ui-N6GHEQ2P.js.map} +0 -0
  807. /package/dist/{dictionary-CQHSMVYF.js.map → dictionary-UP46QRYZ.js.map} +0 -0
  808. /package/dist/{dnaMethylation-G3F2INDH.js.map → dnaMethylation-BOGAUAWA.js.map} +0 -0
  809. /package/dist/{dnaMethylation.integration.spec-FWF4353K.js.map → dnaMethylation.integration.spec-UAHBJSSJ.js.map} +0 -0
  810. /package/dist/{e2pca-SLXGPVHP.js.map → e2pca-L5EBQJNP.js.map} +0 -0
  811. /package/dist/{ep-4HGUSDGJ.js.map → ep-Z67ORKUX.js.map} +0 -0
  812. /package/dist/{expclust.gdc.spec-JJ42ESKE.js.map → expclust.gdc.spec-SP7VOL64.js.map} +0 -0
  813. /package/dist/{facet-6WVTVKDV.js.map → facet-HDB4VDGU.js.map} +0 -0
  814. /package/dist/{geneExpClustering-5LOZPD5X.js.map → geneExpClustering-6ZPOLTDJ.js.map} +0 -0
  815. /package/dist/{geneExpression-BJ46UGXW.js.map → geneExpression-T6YIG4XQ.js.map} +0 -0
  816. /package/dist/{geneExpression-PTSZWKCM.js.map → geneExpression-T7QUHV5S.js.map} +0 -0
  817. /package/dist/{geneExpression.unit.spec-NW5HTO7F.js.map → geneExpression.unit.spec-DO52L5IB.js.map} +0 -0
  818. /package/dist/{geneORA-H65EZ7QO.js.map → geneORA-KOUDUWUO.js.map} +0 -0
  819. /package/dist/{geneVariant-T6GWOVZD.js.map → geneVariant-FVR76F6I.js.map} +0 -0
  820. /package/dist/{geneVariant-WTDFZTXG.js.map → geneVariant-I5QUITKG.js.map} +0 -0
  821. /package/dist/{geneVariant.integration.spec-OPSBRUM3.js.map → geneVariant.integration.spec-D4IRM7B5.js.map} +0 -0
  822. /package/dist/{genefusion.ui-RSBCC37C.js.map → genefusion.ui-35IYSZD7.js.map} +0 -0
  823. /package/dist/{geneset-B67PAZVL.js.map → geneset-7ZHJ5KWK.js.map} +0 -0
  824. /package/dist/{genomeBrowser.spec-AUTULF4C.js.map → genomeBrowser.spec-VXASVLNH.js.map} +0 -0
  825. /package/dist/{grin2-JVCNH3KW.js.map → grin2-7NM56COO.js.map} +0 -0
  826. /package/dist/{grin2-CMBP7XVH.js.map → grin2-IY26UUQI.js.map} +0 -0
  827. /package/dist/{gsea-H774WVPQ.js.map → gsea-TORO46C6.js.map} +0 -0
  828. /package/dist/{hierCluster-IQTXQUMI.js.map → hierCluster-3BKEGW6P.js.map} +0 -0
  829. /package/dist/{hierCluster-ZQJDXYBD.js.map → hierCluster-HM3LOM6V.js.map} +0 -0
  830. /package/dist/{hierCluster.config-ZHJTZK5L.js.map → hierCluster.config-LDO5IGQ5.js.map} +0 -0
  831. /package/dist/{hierCluster.integration.spec-MSJ5GHHK.js.map → hierCluster.integration.spec-XO5R6CQT.js.map} +0 -0
  832. /package/dist/{hierCluster.interactivity-H2GNO6AA.js.map → hierCluster.interactivity-NVQ6262K.js.map} +0 -0
  833. /package/dist/{hierCluster.renderers-2TE6HMK2.js.map → hierCluster.renderers-SWPPNBLU.js.map} +0 -0
  834. /package/dist/{imagePlot-FMNMB7JZ.js.map → imagePlot-V4WLAPV6.js.map} +0 -0
  835. /package/dist/{importPlot-N66G43XX.js.map → importPlot-NZKQEOX4.js.map} +0 -0
  836. /package/dist/{isoformExpression-B64WLO3H.js.map → isoformExpression-TIZBIGNL.js.map} +0 -0
  837. /package/dist/{launch.adhoc-MPRAJ3GN.js.map → launch.adhoc-JYEN42NM.js.map} +0 -0
  838. /package/dist/{leftlabel.sample-4JCKYXED.js.map → leftlabel.sample-43DL3J3H.js.map} +0 -0
  839. /package/dist/{legacyDataset-PBCPC5I7.js.map → legacyDataset-QRSNRVUA.js.map} +0 -0
  840. /package/dist/{lollipop-25ADHT7O.js.map → lollipop-NMWZ4FVF.js.map} +0 -0
  841. /package/dist/{maftimeline-FOQF6O3X.js.map → maftimeline-ZB2753S7.js.map} +0 -0
  842. /package/dist/{matrix-LHLAYDTQ.js.map → matrix-RCGQWQ3C.js.map} +0 -0
  843. /package/dist/{matrix-ZKF7NRAD.js.map → matrix-WTTEK4FT.js.map} +0 -0
  844. /package/dist/{matrix.cells-H4TS74FJ.js.map → matrix.cells-UO5ASQ35.js.map} +0 -0
  845. /package/dist/{matrix.config-HE7QUDER.js.map → matrix.config-3UQAT3QR.js.map} +0 -0
  846. /package/dist/{matrix.controls-VILCLNSC.js.map → matrix.controls-PRZ77K5L.js.map} +0 -0
  847. /package/dist/{matrix.data-2OUWYD35.js.map → matrix.data-4W73RQ3H.js.map} +0 -0
  848. /package/dist/{matrix.groups-5BGJIOOJ.js.map → matrix.groups-5VMPI7SA.js.map} +0 -0
  849. /package/dist/{matrix.integration.spec-DSXZHAEY.js.map → matrix.integration.spec-2F5LDLC2.js.map} +0 -0
  850. /package/dist/{matrix.interactivity-VK3NWX5M.js.map → matrix.interactivity-MIPZ6ELV.js.map} +0 -0
  851. /package/dist/{matrix.layout-PUNMMNCC.js.map → matrix.layout-EO5LVYRO.js.map} +0 -0
  852. /package/dist/{matrix.legend-QMERGVYU.js.map → matrix.legend-QBFBFEUG.js.map} +0 -0
  853. /package/dist/{matrix.renderers-2KQ2NXSQ.js.map → matrix.renderers-ERJXVCQL.js.map} +0 -0
  854. /package/dist/{matrix.serieses-24G3XPJD.js.map → matrix.serieses-E23EPXHA.js.map} +0 -0
  855. /package/dist/{matrix.sort-HTVT4K7C.js.map → matrix.sort-I4UGMEXR.js.map} +0 -0
  856. /package/dist/{matrix.sort.unit.spec-EUVL76NB.js.map → matrix.sort.unit.spec-CRGF6CSE.js.map} +0 -0
  857. /package/dist/{matrix.sorterUi-PJPFXWOJ.js.map → matrix.sorterUi-YLSYTYLE.js.map} +0 -0
  858. /package/dist/{matrix.sorterUi.unit.spec-QWL5Y4DQ.js.map → matrix.sorterUi.unit.spec-ENG3ICOO.js.map} +0 -0
  859. /package/dist/{mavb-UGM5SHEF.js.map → mavb-5WR7OJHI.js.map} +0 -0
  860. /package/dist/{mds.fimo-64US7RTE.js.map → mds.fimo-3ZRH7BBJ.js.map} +0 -0
  861. /package/dist/{mds.samplescatterplot-JMXLXVIE.js.map → mds.samplescatterplot-RPXR2FVK.js.map} +0 -0
  862. /package/dist/{mds.survivalplot-RJ5UD3IU.js.map → mds.survivalplot-WSSMYUZD.js.map} +0 -0
  863. /package/dist/{oncomatrix.spec-4YLKDGFE.js.map → oncomatrix.spec-OEGU4DYK.js.map} +0 -0
  864. /package/dist/{plot.2dvaf-DYSU6BBN.js.map → plot.2dvaf-ZGARLQNK.js.map} +0 -0
  865. /package/dist/{plot.app-NFBVLAXZ.js.map → plot.app-TKUJH3LK.js.map} +0 -0
  866. /package/dist/{plot.barplot-DBGTDK7J.js.map → plot.barplot-FEIPGDZ2.js.map} +0 -0
  867. /package/dist/{plot.boxplot-MCKZUROP.js.map → plot.boxplot-6RASUMZB.js.map} +0 -0
  868. /package/dist/{plot.brainImaging-BBAVUEB4.js.map → plot.brainImaging-ZJPFWX2W.js.map} +0 -0
  869. /package/dist/{plot.disco-VGOEQYRL.js.map → plot.disco-2KTKB3XX.js.map} +0 -0
  870. /package/dist/{plot.dzi-YQIFOTZQ.js.map → plot.dzi-PC34YI6Y.js.map} +0 -0
  871. /package/dist/{plot.ssgq-MU3BRTMC.js.map → plot.ssgq-Z4UNJKWO.js.map} +0 -0
  872. /package/dist/{plot.vaf2cov-KDHZ7JXJ.js.map → plot.vaf2cov-NZ4WULKT.js.map} +0 -0
  873. /package/dist/{plot.wsi-G2TUGQF7.js.map → plot.wsi-YYXFAZWY.js.map} +0 -0
  874. /package/dist/{polar-RCCZXZIU.js.map → polar-X2GPIBLB.js.map} +0 -0
  875. /package/dist/{polar2-COQ3WIGW.js.map → polar2-TZ553QQH.js.map} +0 -0
  876. /package/dist/{profile.spec-A4ZASR2T.js.map → profile.spec-VB6VMFLY.js.map} +0 -0
  877. /package/dist/{profileBarchart-GB4RK5DF.js.map → profileBarchart-SKJSTC7B.js.map} +0 -0
  878. /package/dist/{profileForms-O5KBHRF6.js.map → profileForms-RLOGSMAQ.js.map} +0 -0
  879. /package/dist/{profilePlot-COCLCP5B.js.map → profilePlot-267ZS3RG.js.map} +0 -0
  880. /package/dist/{profileRadar-4EE3YDOH.js.map → profileRadar-KGOBHCSF.js.map} +0 -0
  881. /package/dist/{profileRadarFacility-JYTSGA5H.js.map → profileRadarFacility-MCJKSHUM.js.map} +0 -0
  882. /package/dist/{proteomeAbundance-NQVU4DOW.js.map → proteomeAbundance-JUYAYO5I.js.map} +0 -0
  883. /package/dist/{proteomeAbundance-JBVXUSD6.js.map → proteomeAbundance-PGHZSVAF.js.map} +0 -0
  884. /package/dist/{qualitative-QROOPDSI.js.map → qualitative-3IECKKJM.js.map} +0 -0
  885. /package/dist/{regression-7FQZ22OO.js.map → regression-J6FFRPXN.js.map} +0 -0
  886. /package/dist/{regression.inputs-F62CES3A.js.map → regression.inputs-T7LWBSYZ.js.map} +0 -0
  887. /package/dist/{regression.inputs.term-BCGP7PX4.js.map → regression.inputs.term-TT7PNX6G.js.map} +0 -0
  888. /package/dist/{regression.inputs.values.table-D3ZXZSH7.js.map → regression.inputs.values.table-SHFUNKCS.js.map} +0 -0
  889. /package/dist/{regression.integration.spec-P2BBTT2O.js.map → regression.integration.spec-QKHMJTHA.js.map} +0 -0
  890. /package/dist/{regression.results-JX6RJQQP.js.map → regression.results-D4WX6VIV.js.map} +0 -0
  891. /package/dist/{regression.spec-ROME7T33.js.map → regression.spec-7SW55L7X.js.map} +0 -0
  892. /package/dist/{report-B6MM4T6B.js.map → report-QYOZ4BRF.js.map} +0 -0
  893. /package/dist/{sampleScatter.spec-EPCMC3SR.js.map → sampleScatter.spec-JCHFMGNF.js.map} +0 -0
  894. /package/dist/{sampleView-77EAJ75T.js.map → sampleView-7RPKNAZC.js.map} +0 -0
  895. /package/dist/{samplelst-CX4NQWA7.js.map → samplelst-4WNPHZVG.js.map} +0 -0
  896. /package/dist/{samplematrix-PYQFAH64.js.map → samplematrix-CG52DSXJ.js.map} +0 -0
  897. /package/dist/{sc-X6SI5VVI.js.map → sc-OJSWILSA.js.map} +0 -0
  898. /package/dist/{scatter-ZFFHAI4F.js.map → scatter-LG2RMMEC.js.map} +0 -0
  899. /package/dist/{scatter.integration.spec-NN43OXRN.js.map → scatter.integration.spec-QPANYTKW.js.map} +0 -0
  900. /package/dist/{selectGenomeWithTklst-CZMVTBMD.js.map → selectGenomeWithTklst-QXRVE6N4.js.map} +0 -0
  901. /package/dist/{singleCellCellType-GOBX7JKV.js.map → singleCellCellType-XBSRL33U.js.map} +0 -0
  902. /package/dist/{singleCellCellType.unit.spec-F344QMTQ.js.map → singleCellCellType.unit.spec-YZX4CSXA.js.map} +0 -0
  903. /package/dist/{singleCellGeneExpression-BLMNMEAI.js.map → singleCellGeneExpression-64ECP62X.js.map} +0 -0
  904. /package/dist/{singleCellGeneExpression.unit.spec-6ZEPUFWC.js.map → singleCellGeneExpression.unit.spec-CFHFXMA6.js.map} +0 -0
  905. /package/dist/{singleCellPlot-HLD7PLQH.js.map → singleCellPlot-E5F62JY6.js.map} +0 -0
  906. /package/dist/{singlecell-JQFPINRS.js.map → singlecell-FCY5EOUV.js.map} +0 -0
  907. /package/dist/{singlecell-HL4GLGIA.js.map → singlecell-S7B5V7NK.js.map} +0 -0
  908. /package/dist/{snp-EAUNFDAV.js.map → snp-ACKX4GRX.js.map} +0 -0
  909. /package/dist/{snp.unit.spec-AVLPMAWI.js.map → snp.unit.spec-QBGHKKUD.js.map} +0 -0
  910. /package/dist/{snplocus-2J7OA6OL.js.map → snplocus-7EUOW7J7.js.map} +0 -0
  911. /package/dist/{spliceevent.a53ss.diagram-4DU2U7NW.js.map → spliceevent.a53ss.diagram-ALQZA35Z.js.map} +0 -0
  912. /package/dist/{spliceevent.exonskip.diagram-GG5FGXOK.js.map → spliceevent.exonskip.diagram-UF7WJA5R.js.map} +0 -0
  913. /package/dist/{spliceevent.noeventdiagram-T6RNIMCM.js.map → spliceevent.noeventdiagram-4HPGRNRR.js.map} +0 -0
  914. /package/dist/{ssGSEA-XJWLRVFQ.js.map → ssGSEA-FDRBBBLJ.js.map} +0 -0
  915. /package/dist/{ssGSEA.unit.spec-MQ23ODYO.js.map → ssGSEA.unit.spec-EZEOWJVV.js.map} +0 -0
  916. /package/dist/{summarizeCnvGeneexp-CJPC76RM.js.map → summarizeCnvGeneexp-FTL2MGAJ.js.map} +0 -0
  917. /package/dist/{summarizeGeneexpSurvival-FGCFZTVG.js.map → summarizeGeneexpSurvival-DDIF4UW6.js.map} +0 -0
  918. /package/dist/{summarizeMutationCnv-4E7R2NHQ.js.map → summarizeMutationCnv-L3GL5YDY.js.map} +0 -0
  919. /package/dist/{summarizeMutationDiagnosis-ZVX7AZK7.js.map → summarizeMutationDiagnosis-LALOJTHV.js.map} +0 -0
  920. /package/dist/{summarizeMutationSurvival-EWXD7TCT.js.map → summarizeMutationSurvival-TSNTSOBZ.js.map} +0 -0
  921. /package/dist/{summary-VUYBKQOC.js.map → summary-YRHVS64T.js.map} +0 -0
  922. /package/dist/{summary.integration.spec-EPBV5XCT.js.map → summary.integration.spec-766YQLQA.js.map} +0 -0
  923. /package/dist/{summaryInput-YX5IRGWM.js.map → summaryInput-VQ2X6GSX.js.map} +0 -0
  924. /package/dist/{sunburst-HPDML45I.js.map → sunburst-XFOONS6K.js.map} +0 -0
  925. /package/dist/{survival-E6SRRXBB.js.map → survival-FQXZH2MM.js.map} +0 -0
  926. /package/dist/{survival-XOXDPXZR.js.map → survival-TVA3ZWVP.js.map} +0 -0
  927. /package/dist/{survival.integration.spec-SJBPJZGJ.js.map → survival.integration.spec-WFIOPD6A.js.map} +0 -0
  928. /package/dist/{svgraph-D23WG3UE.js.map → svgraph-4BFBO7EL.js.map} +0 -0
  929. /package/dist/{svmr-UFC4TKWV.js.map → svmr-ML7GAIIA.js.map} +0 -0
  930. /package/dist/{table-US2K6IYZ.js.map → table-SMLMUWPP.js.map} +0 -0
  931. /package/dist/{termCollection-ZMP3VE2G.js.map → termCollection-22CPTISZ.js.map} +0 -0
  932. /package/dist/{termCollection-E7S57CIN.js.map → termCollection-EE6AOIVA.js.map} +0 -0
  933. /package/dist/{termCollection.unit.spec-MDWK6XH3.js.map → termCollection.unit.spec-4DIW3CJ3.js.map} +0 -0
  934. /package/dist/{tk-TLQJK6R4.js.map → tk-ITZCKOQ5.js.map} +0 -0
  935. /package/dist/{tp.ui-NQEAKWUH.js.map → tp.ui-R6HVKCBC.js.map} +0 -0
  936. /package/dist/{tvs.density-HSVPDDGA.js.map → tvs.density-AQ5GD437.js.map} +0 -0
  937. /package/dist/{tvs.dt-U2MINIBH.js.map → tvs.dt-2263TBEJ.js.map} +0 -0
  938. /package/dist/{tvs.dtcnv.categorical-2OOAZJKC.js.map → tvs.dtcnv.categorical-TRRHL33N.js.map} +0 -0
  939. /package/dist/{tvs.dtcnv.continuous-5ETKBJ52.js.map → tvs.dtcnv.continuous-GREYNF52.js.map} +0 -0
  940. /package/dist/{tvs.dtfusion-EB4PPR3Y.js.map → tvs.dtfusion-XOX46L3M.js.map} +0 -0
  941. /package/dist/{tvs.dtsnvindel-IRQPTKQF.js.map → tvs.dtsnvindel-IDMXT53F.js.map} +0 -0
  942. /package/dist/{tvs.dtsv-TOVXZJCR.js.map → tvs.dtsv-ZDWFYH2C.js.map} +0 -0
  943. /package/dist/{tvs.numeric-ICUGA4WY.js.map → tvs.numeric-ZN2R7BH3.js.map} +0 -0
  944. /package/dist/{tvs.samplelst-4SCH543Y.js.map → tvs.samplelst-GAP76HRH.js.map} +0 -0
  945. /package/dist/{tvs.termCollection-GGN5F6HC.js.map → tvs.termCollection-GQ65UKSI.js.map} +0 -0
  946. /package/dist/{violin-7D7DN74I.js.map → violin-JGDL62YA.js.map} +0 -0
  947. /package/dist/{violin.integration.spec-KE76AL54.js.map → violin.integration.spec-W4NN7LBY.js.map} +0 -0
  948. /package/dist/{violin.interactivity-YPJ2H6SQ.js.map → violin.interactivity-H4RP4K5U.js.map} +0 -0
  949. /package/dist/{violin.renderer-UK7WSA2Z.js.map → violin.renderer-QPHLACDC.js.map} +0 -0
  950. /package/dist/{vocabulary-KLWZ6LRP.js.map → vocabulary-7JACY4J2.js.map} +0 -0
@@ -0,0 +1,3199 @@
1
+ import {
2
+ InvalidDataUI,
3
+ configUiInit,
4
+ fillbar,
5
+ getMaxLabelWidth,
6
+ getNormalRoot,
7
+ renderTable,
8
+ svgLegend,
9
+ table2col
10
+ } from "./chunk-7FEHI46K.js";
11
+ import "./chunk-HJ6L54YS.js";
12
+ import "./chunk-XD6BFNMR.js";
13
+ import {
14
+ Menu
15
+ } from "./chunk-2SRMRC6L.js";
16
+ import {
17
+ dofetch3
18
+ } from "./chunk-TCPU43TU.js";
19
+ import "./chunk-XDI4UFCZ.js";
20
+ import "./chunk-FN5XPUPH.js";
21
+ import "./chunk-LSEFWW72.js";
22
+ import {
23
+ topBarInit
24
+ } from "./chunk-5EF5U7MX.js";
25
+ import "./chunk-IQIXGTQV.js";
26
+ import "./chunk-UCLS2SVB.js";
27
+ import {
28
+ copyMerge,
29
+ getCompInit,
30
+ multiInit
31
+ } from "./chunk-MVTCBVSX.js";
32
+ import "./chunk-F6V4AYWP.js";
33
+ import "./chunk-5OHXYXLD.js";
34
+ import "./chunk-DQC5FFGV.js";
35
+ import "./chunk-DVDDXOWT.js";
36
+ import "./chunk-6MSCYO7K.js";
37
+ import "./chunk-22NJUYET.js";
38
+ import "./chunk-MDL2HG3N.js";
39
+ import {
40
+ bplen,
41
+ dtcnv,
42
+ dtfusionrna,
43
+ dtloh,
44
+ dtsnvindel,
45
+ dtsv,
46
+ mclass
47
+ } from "./chunk-IGEQI6MR.js";
48
+ import "./chunk-BEWDIM6H.js";
49
+ import {
50
+ arc_default,
51
+ line_default,
52
+ pie_default,
53
+ ribbon_default
54
+ } from "./chunk-IH7ILDJS.js";
55
+ import "./chunk-LOZEKOES.js";
56
+ import "./chunk-TOU7EVFQ.js";
57
+ import {
58
+ linear,
59
+ ticks
60
+ } from "./chunk-OAWQ6LOO.js";
61
+ import "./chunk-SEEYV6P2.js";
62
+ import {
63
+ pointer_default,
64
+ select_default
65
+ } from "./chunk-NDWTN4U5.js";
66
+ import "./chunk-OMR2DT66.js";
67
+ import "./chunk-HFNDKYVF.js";
68
+
69
+ // plots/disco/arc/FullArcRenderer.ts
70
+ var FullArcRenderer = class {
71
+ constructor(radius, width, color) {
72
+ this.radius = radius;
73
+ this.width = width;
74
+ this.color = color;
75
+ }
76
+ render(holder) {
77
+ const donutGenerator = arc_default();
78
+ const arc = {
79
+ startAngle: 0,
80
+ endAngle: Math.PI * 2,
81
+ innerRadius: this.radius,
82
+ outerRadius: this.radius + this.width,
83
+ color: this.color,
84
+ text: "No label"
85
+ };
86
+ const array = [];
87
+ array.push(arc);
88
+ const donutArc = holder.append("g");
89
+ donutArc.selectAll("path").data(array).enter().append("path").attr("d", (d) => donutGenerator(d)).attr("fill", (d) => d.color);
90
+ }
91
+ };
92
+
93
+ // plots/disco/menu/MenuProvider.ts
94
+ var MenuProvider = class {
95
+ static create() {
96
+ const menu = new Menu({ padding: 5 });
97
+ menu.d.style("border", "1px solid #FFF").style("position", "absolute").style("z-index", 1001);
98
+ return menu;
99
+ }
100
+ };
101
+
102
+ // plots/disco/fusion/FusionColorProvider.ts
103
+ var FusionColorProvider = class {
104
+ static getColor(chrA, chrB) {
105
+ if (chrA != chrB) {
106
+ return "#6A3D9A" /* Interchromosomal */.valueOf();
107
+ } else {
108
+ return "#1B9E77" /* Intrachromosomal */.valueOf();
109
+ }
110
+ }
111
+ };
112
+
113
+ // plots/disco/fusion/FusionRenderer.ts
114
+ var FusionRenderer = class {
115
+ constructor(genome) {
116
+ this.genome = genome;
117
+ }
118
+ render(holder, fusions, opacity = 1) {
119
+ let radius = 0;
120
+ const fusionsWithTarget = fusions.filter((f) => f.target);
121
+ if (fusionsWithTarget.length > 0) {
122
+ radius = fusionsWithTarget[0].target.radius;
123
+ const fullArcRenderer = new FullArcRenderer(radius, 2, "#6464641A");
124
+ fullArcRenderer.render(holder);
125
+ } else return;
126
+ const ribbon = ribbon_default().radius(radius);
127
+ const ribbons = holder.selectAll(".chord").data(fusions);
128
+ const menu = MenuProvider.create();
129
+ const createTooltip = this.createTooltip.bind(this);
130
+ const genome = this.genome;
131
+ ribbons.enter().append("path").attr("class", "chord").attr("d", ribbon).attr("fill", (fusion) => {
132
+ return FusionColorProvider.getColor(
133
+ fusion.source.positionInChromosome.chromosome,
134
+ fusion.target.positionInChromosome.chromosome
135
+ );
136
+ }).style("opacity", opacity).each(function(d) {
137
+ const path = select_default(this);
138
+ const tip = MenuProvider.create();
139
+ path.on("click", async function(event) {
140
+ tip.clear().show(event.x, event.y);
141
+ const div = tip.d.append("div");
142
+ await makeSvgraph(d, div, genome);
143
+ });
144
+ }).on("mouseover", async function(mouseEvent, fusion) {
145
+ const table = table2col({ holder: menu.d });
146
+ createTooltip(table, fusion);
147
+ menu.show(mouseEvent.x, mouseEvent.y);
148
+ }).on("mouseout", () => {
149
+ menu.clear();
150
+ menu.hide();
151
+ });
152
+ }
153
+ createTooltip(table, fusion) {
154
+ {
155
+ const [td1, td2] = table.addRow();
156
+ td1.text("Data type");
157
+ td2.append("span").style("margin-left", "5px").text("Fusion transcript");
158
+ }
159
+ {
160
+ const positionInChromosomeSource = fusion.source.positionInChromosome;
161
+ const positionInChromosomeTarget = fusion.target.positionInChromosome;
162
+ const [td1, td2] = table.addRow();
163
+ td1.text("Position");
164
+ td2.append("span").style("margin-left", "5px").text(
165
+ ` ${fusion.source.gene || ""} ${positionInChromosomeSource.chromosome}:${positionInChromosomeSource.position} ${fusion.source.strand === "+" ? "forward" : "reverse"} > ${fusion.target.gene || ""} ${positionInChromosomeTarget.chromosome}:${positionInChromosomeTarget.position} ${fusion.target.strand === "+" ? "forward" : "reverse"} `
166
+ );
167
+ }
168
+ }
169
+ };
170
+ async function makeSvgraph(fusion, div, genome) {
171
+ const wait = div.append("div").text("Loading...");
172
+ const svpair = {
173
+ a: {
174
+ chr: fusion.source.positionInChromosome.chromosome,
175
+ position: fusion.source.positionInChromosome.position,
176
+ strand: fusion.source.strand
177
+ },
178
+ b: {
179
+ chr: fusion.target.positionInChromosome.chromosome,
180
+ position: fusion.target.positionInChromosome.position,
181
+ strand: fusion.target.strand
182
+ }
183
+ };
184
+ await getGm(svpair.a, genome.name, fusion.source.gene);
185
+ await getGm(svpair.b, genome.name, fusion.target.gene);
186
+ wait.remove();
187
+ const _ = await import("./svgraph-4BFBO7EL.js");
188
+ _.default({
189
+ pairlst: [svpair],
190
+ genome,
191
+ holder: div
192
+ });
193
+ }
194
+ async function getGm(p, genome, name) {
195
+ const d = await dofetch3("isoformbycoord", {
196
+ body: { genome, chr: p.chr, pos: p.position }
197
+ });
198
+ if (d.error) throw d.error;
199
+ const u = d.lst.find((i) => i.isdefault && name === i.name) || d.lst[0];
200
+ if (u) {
201
+ p.name = u.name;
202
+ p.gm = { isoform: u.isoform };
203
+ }
204
+ }
205
+
206
+ // plots/disco/DiscoRenderer.ts
207
+ var DiscoRenderer = class {
208
+ constructor(renders, legendRenderer, genome) {
209
+ this.renders = renders;
210
+ this.legendRenderer = legendRenderer;
211
+ this.fusionRenderer = new FusionRenderer(genome);
212
+ }
213
+ render(holder, viewModel, onCnvSourceSelect) {
214
+ const svgDiv = holder.append("div").style("display", "inline-block").style("font-family", "Arial");
215
+ const svg = svgDiv.append("svg").attr("id", "sjpp_disco_plot").attr("data-testid", "sjpp_disco_plot").attr("width", viewModel.width).attr("height", viewModel.height + viewModel.legendHeight);
216
+ const mainG = svg.append("g").attr("class", "mainG").attr(
217
+ "transform",
218
+ `translate(${viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 100},${viewModel.height / 2})`
219
+ );
220
+ for (const [ringType, renderer] of this.renders) {
221
+ const elements = viewModel.getElements(ringType);
222
+ const collisions = viewModel.getCollisions(ringType);
223
+ renderer.render(mainG, elements, collisions);
224
+ }
225
+ this.fusionRenderer.render(mainG, viewModel.fusions, viewModel.settings.Disco.fusionOpacity);
226
+ if (viewModel.settings.Disco.centerText) {
227
+ const chrRingBbox = mainG.select('[data-testid="sjpp_chromosomes_arc_group"]').node().getBBox();
228
+ const text = viewModel.settings.Disco.centerText.length > 20 ? viewModel.settings.Disco.centerText.slice(0, 20) + "..." : viewModel.settings.Disco.centerText;
229
+ const textElem = mainG.append("text").attr("class", "sjpp-disco-center-text").text(text);
230
+ const textBbox = textElem.node().getBBox();
231
+ textElem.attr("transform", `translate(${chrRingBbox.x + chrRingBbox.width / 2 - textBbox.width / 2},0)`);
232
+ }
233
+ this.legendRenderer.render(
234
+ mainG,
235
+ viewModel.legend,
236
+ -1 * (viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 75),
237
+ viewModel.width,
238
+ viewModel.height / 2,
239
+ viewModel,
240
+ onCnvSourceSelect
241
+ );
242
+ }
243
+ };
244
+
245
+ // plots/disco/interactions/DiscoInteractions.ts
246
+ var DiscoInteractions = class {
247
+ constructor(discoApp) {
248
+ this.discoApp = discoApp;
249
+ this.downloadClickListener = (svg) => {
250
+ const downloadImgName = this.discoApp.state.settings.downloadImgName || "disco.plot";
251
+ const a = document.createElement("a");
252
+ document.body.appendChild(a);
253
+ a.addEventListener(
254
+ "click",
255
+ () => {
256
+ const serializer = new XMLSerializer();
257
+ const svg_blob = new Blob([serializer.serializeToString(svg)], {
258
+ type: "image/svg+xml"
259
+ });
260
+ a.download = downloadImgName + ".svg";
261
+ a.href = URL.createObjectURL(svg_blob);
262
+ document.body.removeChild(a);
263
+ },
264
+ false
265
+ );
266
+ a.click();
267
+ };
268
+ this.geneClickListener = async (gene, mnames) => {
269
+ const { filter, filter0 } = this.discoApp.app.getState().termfilter;
270
+ const arg = {
271
+ holder: this.discoApp.app.opts.holder,
272
+ genome: this.discoApp.app.opts.state.args.genome,
273
+ nobox: true,
274
+ query: gene,
275
+ tklst: [
276
+ {
277
+ type: "mds3",
278
+ dslabel: this.discoApp.app.opts.state.vocab.dslabel,
279
+ hlaachange: mnames.join(","),
280
+ filter0,
281
+ filterObj: getNormalRoot(filter)
282
+ // must not pass filter as frozen. pass unfrozen, normalized copy so mds3 code will work
283
+ }
284
+ ]
285
+ };
286
+ const _ = await import("./block.init-ZHX6DFWF.js");
287
+ await _.default(arg);
288
+ };
289
+ this.colorScaleNumericInputsCallback = async (obj) => {
290
+ const callAppDispatch = (settings) => {
291
+ this.discoApp.app.dispatch({
292
+ type: "plot_edit",
293
+ id: this.discoApp.id,
294
+ config: { settings: { Disco: Object.assign({ cnvCutoffMode: obj.cutoffMode }, settings) } }
295
+ });
296
+ };
297
+ if (obj.cutoffMode == "auto") {
298
+ if (obj.min == null || obj.max == null)
299
+ throw new Error('Color scale must return min and max if cutoffMode "auto"');
300
+ callAppDispatch({
301
+ cnvCapping: this.discoApp.state.settings.cnv.capping,
302
+ cnvPercentile: this.discoApp.state.settings.cnv.percentile
303
+ });
304
+ } else if (obj.cutoffMode == "fixed") {
305
+ if (obj.min == null || obj.max == null)
306
+ throw new Error('Color scale must return min and max if cutoffMode "fixed"');
307
+ const diffValue = obj.max !== this.discoApp.state.settings.cnv.capping ? obj.max : Math.abs(obj.min);
308
+ callAppDispatch({
309
+ cnvCapping: diffValue
310
+ });
311
+ } else if (obj.cutoffMode == "percentile") callAppDispatch({ cnvPercentile: obj.percentile });
312
+ else throw new Error("Unknown cutoff mode returned from dom/ColorScale");
313
+ };
314
+ this.onMutationWaterfallColorChange = (color) => {
315
+ this.discoApp.app.dispatch({
316
+ type: "plot_edit",
317
+ id: this.discoApp.id,
318
+ config: { settings: { Disco: { mutationWaterfallColor: color } } }
319
+ });
320
+ };
321
+ }
322
+ };
323
+
324
+ // plots/disco/chromosome/Reference.ts
325
+ var Reference = class {
326
+ /**
327
+ * Creates a Reference object that contains information about chromosomes.
328
+ * @param settings State settings
329
+ * @param chromosomes Chromosome order. This function formats into an obj with `chr` removed.
330
+ * @param chromosomeOverride Obj of chromsome keys and sizes. Filtered to remove hidden chromosomes in settings.
331
+ */
332
+ constructor(settings, chromosomes, chromosomeOverride) {
333
+ this.chromosomes = [];
334
+ this.chromosomesOrder = [];
335
+ this.keysArray = [];
336
+ this.totalSizeArray = [];
337
+ this.chrSizesArray = [];
338
+ const chrSizes = chromosomeOverride || chromosomes;
339
+ this.settings = settings;
340
+ this.chromosomesOrder = [];
341
+ let totalSize = 0;
342
+ this.totalPadAngle = Object.keys(chrSizes).length * this.settings.padAngle;
343
+ this.totalChromosomesAngle = 2 * Math.PI - this.totalPadAngle;
344
+ for (const chr in chrSizes) {
345
+ const key = chr.slice(0, 3) === "chr" ? chr.slice(3) : chr;
346
+ this.chromosomesOrder.push(chr);
347
+ this.keysArray.push(key);
348
+ this.totalSizeArray.push(totalSize);
349
+ this.chrSizesArray.push(chrSizes[chr]);
350
+ totalSize += chrSizes[chr];
351
+ }
352
+ this.totalSize = totalSize;
353
+ let lastAngle = 0;
354
+ for (let i = 0; i < this.keysArray.length; i++) {
355
+ const chromosomeAngle = this.totalChromosomesAngle * (this.chrSizesArray[i] / totalSize);
356
+ const startAngle = i == 0 ? this.settings.padAngle / 2 : lastAngle + this.settings.padAngle;
357
+ const endAngle = i == 0 ? this.settings.padAngle / 2 + chromosomeAngle : lastAngle + this.settings.padAngle + chromosomeAngle;
358
+ const chromosome = {
359
+ start: this.totalSizeArray[i],
360
+ size: this.chrSizesArray[i],
361
+ factor: 1,
362
+ startAngle,
363
+ endAngle,
364
+ angle: (startAngle + endAngle) / 2,
365
+ innerRadius: this.settings.rings.chromosomeInnerRadius,
366
+ outerRadius: this.settings.rings.chromosomeInnerRadius + this.settings.rings.chromosomeWidth,
367
+ color: "#AAA",
368
+ text: this.keysArray[i]
369
+ };
370
+ this.chromosomes.push(chromosome);
371
+ if (chromosome.endAngle != null) {
372
+ lastAngle = chromosome.endAngle;
373
+ }
374
+ }
375
+ }
376
+ };
377
+
378
+ // plots/disco/data/DataObjectMapper.ts
379
+ var DataObjectMapper = class {
380
+ constructor(sampleName, prioritizedGenes) {
381
+ this.sampleName = sampleName;
382
+ this.prioritizedGenes = prioritizedGenes;
383
+ }
384
+ map(dObject) {
385
+ return {
386
+ dt: dObject.dt,
387
+ mname: dObject.mname,
388
+ mClass: dObject.class,
389
+ gene: dObject.gene,
390
+ chr: dObject.chr,
391
+ ref: dObject.ref,
392
+ alt: dObject.alt,
393
+ vafs: dObject.vafs,
394
+ position: dObject.pos ? dObject.pos : dObject.position,
395
+ poschr: dObject.poschr,
396
+ posbins: dObject.posbins,
397
+ poslabel: dObject.poslabel,
398
+ sampleName: this.sampleName,
399
+ ssm_id: dObject.ssm_id,
400
+ start: dObject.start,
401
+ stop: dObject.stop,
402
+ value: dObject.value,
403
+ segmean: dObject.segmean,
404
+ isPrioritized: this.prioritizedGenes.some((cancerGene) => cancerGene == dObject.gene),
405
+ chrA: dObject.chrA,
406
+ chrB: dObject.chrB,
407
+ geneA: dObject.geneA,
408
+ geneB: dObject.geneB,
409
+ posA: dObject.posA,
410
+ posB: dObject.posB,
411
+ strandA: dObject.strandA,
412
+ strandB: dObject.strandB
413
+ };
414
+ }
415
+ };
416
+
417
+ // plots/disco/data/PercentileMapper.ts
418
+ var PercentileMapper = class {
419
+ map(data, percentile) {
420
+ return this.calculatePercentileForPositivesAndNegatives(data, percentile);
421
+ }
422
+ calculatePercentileForPositivesAndNegatives(data, percentile) {
423
+ const positives = data.filter((x) => x > 0);
424
+ const negatives = data.filter((x) => x < 0).map((x) => -1 * x);
425
+ let positive = NaN;
426
+ let negative = NaN;
427
+ if (positives.length > 0) {
428
+ positive = this.calculatePercentile(positives, percentile);
429
+ }
430
+ if (negatives.length > 0) {
431
+ negative = -1 * this.calculatePercentile(negatives, percentile);
432
+ }
433
+ return { positive, negative };
434
+ }
435
+ calculatePercentile(data, percentile) {
436
+ if (data.length === 0) {
437
+ throw new Error("Array must contain at least one element.");
438
+ }
439
+ const sortedValues = data.sort((a, b) => a - b);
440
+ const index = percentile / 100 * (sortedValues.length - 1);
441
+ const lowerIndex = Math.floor(index);
442
+ const upperIndex = Math.ceil(index);
443
+ const fraction = index - lowerIndex;
444
+ if (lowerIndex === upperIndex) {
445
+ return sortedValues[lowerIndex];
446
+ }
447
+ return sortedValues[lowerIndex] + fraction * (sortedValues[upperIndex] - sortedValues[lowerIndex]);
448
+ }
449
+ };
450
+
451
+ // plots/disco/data/DataMapper.ts
452
+ var DataMapper = class _DataMapper {
453
+ constructor(settings, reference, sample, prioritizedGenes = []) {
454
+ // remove fields and extract filters to seperate classes
455
+ this.labelData = [];
456
+ this.nonExonicSnvData = [];
457
+ this.nonExonicInnerRadius = 0;
458
+ this.snvRingDataMap = /* @__PURE__ */ new Map();
459
+ this.snvInnerRadius = 0;
460
+ this.snvData = [];
461
+ this.bpx = 0;
462
+ this.onePxArcAngle = 0;
463
+ this.filteredSnvData = [];
464
+ this.filteredSnvCountByChr = /* @__PURE__ */ new Map();
465
+ this.lohData = [];
466
+ this.lohInnerRadius = 0;
467
+ this.cnvData = [];
468
+ this.cnvInnerRadius = 0;
469
+ this.fusionData = [];
470
+ this.fusionRadius = 0;
471
+ this.hasPrioritizedGenes = false;
472
+ this.hasWaterfallEligibleChromosome = false;
473
+ this.invalidEntries = [];
474
+ this.cnvLossMaxValue = 0;
475
+ this.cnvGainMaxValue = 0;
476
+ this.percentilePositive = 0;
477
+ this.percentileNegative = 0;
478
+ this.cnvMaxPercentileAbs = 0;
479
+ this.mutationWaterfallData = [];
480
+ this.mutationWaterfallInnerRadius = 0;
481
+ this.mutationWaterfallRangeMin = Infinity;
482
+ this.mutationWaterfallRangeMax = -Infinity;
483
+ this.lohMaxValue = void 0;
484
+ this.lohMinValue = void 0;
485
+ this.snvFilter = (data) => data.dt == dtsnvindel;
486
+ this.fusionFilter = (data) => data.dt == dtfusionrna || data.dt == dtsv;
487
+ this.cnvFilter = (data) => data.dt == dtcnv;
488
+ this.lohFilter = (data) => data.dt == dtloh;
489
+ this.compareData = (a, b) => {
490
+ const chrDiff = this.reference.chromosomesOrder.indexOf(a.chr) - this.reference.chromosomesOrder.indexOf(b.chr);
491
+ if (chrDiff != 0) {
492
+ return chrDiff;
493
+ }
494
+ const aPos = a.pos ? a.pos : a.start;
495
+ const bPos = b.pos ? b.pos : b.start;
496
+ return aPos - bPos;
497
+ };
498
+ this.settings = settings;
499
+ this.reference = reference;
500
+ this.sample = sample;
501
+ this.excludedChromosomes = this.settings.Disco.hiddenChromosomes;
502
+ this.lastInnerRadious = this.settings.rings.chromosomeInnerRadius;
503
+ this.gainCapped = this.settings.Disco.cnvCapping;
504
+ this.lossCapped = -1 * this.settings.Disco.cnvCapping;
505
+ this.nonExonicFilter = (data) => {
506
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
507
+ return prioritizedGenes.includes(data.gene) && settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
508
+ } else {
509
+ return settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
510
+ }
511
+ };
512
+ this.snvRingFilter = (data) => {
513
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
514
+ return prioritizedGenes.includes(data.gene) && settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
515
+ } else {
516
+ return settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
517
+ }
518
+ };
519
+ this.dataObjectMapper = new DataObjectMapper(sample, prioritizedGenes);
520
+ }
521
+ map(data) {
522
+ const dataArray = [];
523
+ this.filteredSnvCountByChr.clear();
524
+ this.hasWaterfallEligibleChromosome = false;
525
+ this.mutationWaterfallData = [];
526
+ this.mutationWaterfallInnerRadius = 0;
527
+ this.mutationWaterfallRangeMin = Infinity;
528
+ this.mutationWaterfallRangeMax = -Infinity;
529
+ data.forEach((dObject) => {
530
+ const index = this.reference.chromosomesOrder.indexOf(dObject.chr);
531
+ const indexA = this.reference.chromosomesOrder.indexOf(dObject.chrA);
532
+ const indexB = this.reference.chromosomesOrder.indexOf(dObject.chrB);
533
+ if (dObject.dt == dtsnvindel) {
534
+ if (index != -1 && this.snvData.length < this.settings.snv.maxMutationCount) {
535
+ const pos = dObject.pos ?? dObject.position;
536
+ const chrSize = this.reference.chromosomes[index].size;
537
+ if (Number.isFinite(pos) && pos >= 0 && pos <= chrSize) {
538
+ this.addData(dObject, dataArray);
539
+ } else {
540
+ this.invalidEntries.push({ dataType: "SNV", reason: `Position ${pos} outside of ${dObject.chr}` });
541
+ }
542
+ } else if (index == -1) {
543
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
544
+ this.invalidEntries.push({ dataType: "SNV", reason: `Unknown chr ${dObject.chr}` });
545
+ }
546
+ }
547
+ } else if (dObject.dt == dtfusionrna || dObject.dt == dtsv) {
548
+ if (indexA != -1 && indexB != -1) {
549
+ const posA = dObject.posA;
550
+ const posB = dObject.posB;
551
+ const chrSizeA = this.reference.chromosomes[indexA].size;
552
+ const chrSizeB = this.reference.chromosomes[indexB].size;
553
+ if (Number.isFinite(posA) && Number.isFinite(posB) && posA >= 0 && posA <= chrSizeA && posB >= 0 && posB <= chrSizeB) {
554
+ this.addData(dObject, dataArray);
555
+ } else {
556
+ const reasonParts = [];
557
+ if (!(Number.isFinite(posA) && posA >= 0 && posA <= chrSizeA))
558
+ reasonParts.push(`Position ${posA} outside of ${dObject.chrA}`);
559
+ if (!(Number.isFinite(posB) && posB >= 0 && posB <= chrSizeB))
560
+ reasonParts.push(`Position ${posB} outside of ${dObject.chrB}`);
561
+ this.invalidEntries.push({ dataType: "Fusion", reason: reasonParts.join("; ") });
562
+ }
563
+ } else {
564
+ const missing = [];
565
+ if (indexA == -1 && !this.excludedChromosomes.includes(dObject.chrA)) missing.push(dObject.chrA);
566
+ if (indexB == -1 && !this.excludedChromosomes.includes(dObject.chrB)) missing.push(dObject.chrB);
567
+ if (missing.length) this.invalidEntries.push({ dataType: "Fusion", reason: "Unknown chr in fusion" });
568
+ }
569
+ } else if ([dtcnv, dtloh].includes(Number(dObject.dt))) {
570
+ const idx = this.reference.chromosomesOrder.indexOf(dObject.chr);
571
+ if (dObject.chr && idx != -1) {
572
+ const chrSize = this.reference.chromosomes[idx].size;
573
+ const start = dObject.start;
574
+ const stop = dObject.stop;
575
+ if (Number.isFinite(start) && Number.isFinite(stop) && start >= 0 && stop <= chrSize && start <= stop) {
576
+ this.addData(dObject, dataArray);
577
+ } else {
578
+ this.invalidEntries.push({
579
+ dataType: dObject.dt == dtcnv ? "CNV" : "LOH",
580
+ reason: `Position ${start}-${stop} outside of ${dObject.chr}`
581
+ });
582
+ }
583
+ } else {
584
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
585
+ this.invalidEntries.push({
586
+ dataType: dObject.dt == dtcnv ? "CNV" : "LOH",
587
+ reason: `Unknown chr ${dObject.chr}`
588
+ });
589
+ }
590
+ }
591
+ } else {
592
+ throw Error("Unknown mutation type!");
593
+ }
594
+ });
595
+ const sortedData = dataArray.sort(this.compareData);
596
+ if (this.settings.rings.nonExonicRingEnabled) {
597
+ sortedData.forEach((data2) => {
598
+ this.filterNonExonicSnvData(data2);
599
+ });
600
+ }
601
+ if (this.nonExonicSnvData.length > 0) {
602
+ this.nonExonicInnerRadius = this.lastInnerRadious - this.settings.rings.nonExonicRingWidth;
603
+ this.lastInnerRadious = this.nonExonicInnerRadius;
604
+ }
605
+ sortedData.forEach((data2) => {
606
+ this.filterSnvs(data2);
607
+ });
608
+ this.hasWaterfallEligibleChromosome = Array.from(this.filteredSnvCountByChr.values()).some((count) => count >= 2);
609
+ if (this.settings.Disco.mutationWaterfallPlot && this.hasWaterfallEligibleChromosome) {
610
+ this.prepareMutationWaterfallData();
611
+ }
612
+ sortedData.forEach((data2) => {
613
+ this.filterLohs(data2);
614
+ });
615
+ if (this.lohData.length > 0) {
616
+ this.lohInnerRadius = this.lastInnerRadious - this.settings.rings.lohRingWidth;
617
+ this.lastInnerRadious = this.lohInnerRadius;
618
+ }
619
+ sortedData.forEach((data2) => {
620
+ this.filterCnvs(data2);
621
+ });
622
+ if (this.cnvData.length > 0) {
623
+ this.cnvInnerRadius = this.lastInnerRadious - this.settings.rings.cnvRingWidth;
624
+ this.lastInnerRadious = this.cnvInnerRadius;
625
+ this.cappedCnvMaxAbsValue = Math.min(
626
+ this.settings.Disco.cnvCapping,
627
+ Math.max(
628
+ Math.abs(_DataMapper.capMaxValue(this.cnvLossMaxValue, this.gainCapped, this.lossCapped)),
629
+ Math.abs(_DataMapper.capMaxValue(this.cnvGainMaxValue, this.gainCapped, this.lossCapped))
630
+ )
631
+ );
632
+ const percentilePair = new PercentileMapper().map(
633
+ this.cnvData.map((data2) => data2.value),
634
+ this.settings.Disco.cnvPercentile
635
+ );
636
+ this.percentilePositive = _DataMapper.capMaxValue(percentilePair.positive, this.gainCapped, this.lossCapped);
637
+ this.percentileNegative = _DataMapper.capMaxValue(percentilePair.negative, this.gainCapped, this.lossCapped);
638
+ this.cnvMaxPercentileAbs = Math.min(
639
+ this.settings.Disco.cnvCapping,
640
+ Math.max(this.percentilePositive, Math.abs(this.percentileNegative))
641
+ );
642
+ }
643
+ sortedData.forEach((data2) => {
644
+ this.filterFusion(data2);
645
+ });
646
+ if (this.fusionData.length > 0) {
647
+ this.fusionRadius = this.lastInnerRadious;
648
+ }
649
+ const dataHolder = {
650
+ labelData: this.labelData,
651
+ nonExonicSnvData: this.nonExonicSnvData,
652
+ nonExonicInnerRadius: this.nonExonicInnerRadius,
653
+ snvRingDataMap: this.snvRingDataMap,
654
+ snvInnerRadius: this.snvInnerRadius,
655
+ snvData: this.snvData,
656
+ bpx: this.bpx,
657
+ onePxArcAngle: this.onePxArcAngle,
658
+ filteredSnvData: this.filteredSnvData,
659
+ lohData: this.lohData,
660
+ lohInnerRadius: this.lohInnerRadius,
661
+ cnvData: this.cnvData,
662
+ cnvInnerRadius: this.cnvInnerRadius,
663
+ fusionData: this.fusionData,
664
+ fusionRadius: this.fusionRadius,
665
+ hasPrioritizedGenes: this.hasPrioritizedGenes,
666
+ hasWaterfallEligibleChromosome: this.hasWaterfallEligibleChromosome,
667
+ cnvGainMaxValue: this.cnvGainMaxValue,
668
+ cnvLossMaxValue: this.cnvLossMaxValue,
669
+ cappedCnvMaxAbsValue: this.cappedCnvMaxAbsValue,
670
+ percentilePositive: this.percentilePositive,
671
+ percentileNegative: this.percentileNegative,
672
+ cnvMaxPercentileAbs: this.cnvMaxPercentileAbs,
673
+ lohMaxValue: this.lohMaxValue,
674
+ lohMinValue: this.lohMinValue,
675
+ mutationWaterfallData: this.mutationWaterfallData,
676
+ mutationWaterfallInnerRadius: this.mutationWaterfallInnerRadius,
677
+ mutationWaterfallLogRange: this.mutationWaterfallData.length ? { min: this.mutationWaterfallRangeMin, max: this.mutationWaterfallRangeMax } : void 0,
678
+ invalidDataInfo: {
679
+ entries: this.invalidEntries,
680
+ errorMsg: `Entries listed above were skipped due to invalid or unsupported chromosome information.`
681
+ }
682
+ };
683
+ return dataHolder;
684
+ }
685
+ addData(dObject, dataArray) {
686
+ const instance = this.dataObjectMapper.map(dObject);
687
+ if (instance.isPrioritized) {
688
+ this.hasPrioritizedGenes = true;
689
+ }
690
+ dataArray.push(instance);
691
+ }
692
+ filterNonExonicSnvData(data) {
693
+ if (this.snvFilter(data)) {
694
+ if (this.settings.rings.nonExonicRingEnabled && this.nonExonicFilter(data)) {
695
+ this.nonExonicSnvData.push(data);
696
+ }
697
+ }
698
+ }
699
+ filterSnvs(data) {
700
+ if (this.snvFilter(data)) {
701
+ this.snvData.push(data);
702
+ if (this.snvRingFilter(data)) {
703
+ if (this.snvInnerRadius == 0) {
704
+ this.snvInnerRadius = this.lastInnerRadious - this.settings.rings.snvRingWidth;
705
+ this.lastInnerRadious = this.snvInnerRadius;
706
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * this.snvInnerRadius));
707
+ this.onePxArcAngle = 1 / this.snvInnerRadius;
708
+ }
709
+ this.filteredSnvData.push(data);
710
+ this.labelData.push(data);
711
+ const currentCount = this.filteredSnvCountByChr.get(data.chr) || 0;
712
+ this.filteredSnvCountByChr.set(data.chr, currentCount + 1);
713
+ const arcAngle = this.calculateArcAngle(data);
714
+ let dataArray = this.snvRingDataMap.get(arcAngle);
715
+ if (!dataArray) {
716
+ dataArray = new Array();
717
+ }
718
+ dataArray.push(data);
719
+ this.snvRingDataMap.set(arcAngle, dataArray);
720
+ }
721
+ }
722
+ }
723
+ filterFusion(data) {
724
+ if (this.fusionFilter(data)) {
725
+ data.isPrioritized = true;
726
+ this.fusionData.push(data);
727
+ this.labelData.push(data);
728
+ }
729
+ }
730
+ filterLohs(data) {
731
+ if (this.lohFilter(data)) {
732
+ if (this.lohMaxValue == void 0 || this.lohMaxValue < data.value) {
733
+ this.lohMaxValue = data.segmean;
734
+ }
735
+ if (this.lohMinValue == void 0 || this.lohMinValue > data.value) {
736
+ this.lohMinValue = data.segmean;
737
+ }
738
+ this.lohData.push(data);
739
+ }
740
+ }
741
+ filterCnvs(data) {
742
+ if (this.cnvFilter(data)) {
743
+ if (!data.chr || this.reference.chromosomesOrder.indexOf(data.chr) == -1) {
744
+ return;
745
+ }
746
+ if (this.cnvGainMaxValue == void 0 || this.cnvGainMaxValue < data.value) {
747
+ this.cnvGainMaxValue = data.value;
748
+ }
749
+ if (this.cnvLossMaxValue == void 0 || this.cnvLossMaxValue > data.value) {
750
+ this.cnvLossMaxValue = data.value;
751
+ }
752
+ this.cnvData.push(data);
753
+ }
754
+ }
755
+ prepareMutationWaterfallData() {
756
+ this.mutationWaterfallInnerRadius = this.lastInnerRadious - this.settings.rings.mutationWaterfallRingWidth;
757
+ this.lastInnerRadious = this.mutationWaterfallInnerRadius;
758
+ const groupedSnvs = /* @__PURE__ */ new Map();
759
+ const firstMutationByChr = [];
760
+ for (const snv of this.filteredSnvData) {
761
+ const list = groupedSnvs.get(snv.chr) || [];
762
+ list.push(snv);
763
+ groupedSnvs.set(snv.chr, list);
764
+ }
765
+ for (const [, snvs] of groupedSnvs) {
766
+ if (snvs.length < 2) continue;
767
+ snvs.sort((a, b) => a.position - b.position);
768
+ firstMutationByChr.push({
769
+ chr: snvs[0].chr,
770
+ position: snvs[0].position,
771
+ logDistance: 0
772
+ // placeholder updated after range computed
773
+ });
774
+ for (let i = 1; i < snvs.length; i++) {
775
+ const prev = snvs[i - 1];
776
+ const curr = snvs[i];
777
+ const distance = Math.max(1, Math.abs(curr.position - prev.position));
778
+ const logDistance = Math.log10(distance);
779
+ this.mutationWaterfallData.push({
780
+ chr: curr.chr,
781
+ position: curr.position,
782
+ logDistance
783
+ });
784
+ if (logDistance < this.mutationWaterfallRangeMin) {
785
+ this.mutationWaterfallRangeMin = logDistance;
786
+ }
787
+ if (logDistance > this.mutationWaterfallRangeMax) {
788
+ this.mutationWaterfallRangeMax = logDistance;
789
+ }
790
+ }
791
+ }
792
+ if (!this.mutationWaterfallData.length) {
793
+ this.mutationWaterfallRangeMin = 0;
794
+ this.mutationWaterfallRangeMax = 0;
795
+ }
796
+ const topLogDistance = this.mutationWaterfallRangeMax;
797
+ for (const first of firstMutationByChr) {
798
+ this.mutationWaterfallData.push({
799
+ ...first,
800
+ logDistance: topLogDistance
801
+ });
802
+ }
803
+ }
804
+ calculateArcAngle(data) {
805
+ const currentChromosome = this.reference.chromosomes[this.reference.chromosomesOrder.findIndex((chromosomeOrder) => data.chr == chromosomeOrder)];
806
+ const dataAnglePos = Math.floor(data.position / this.bpx);
807
+ return currentChromosome.startAngle + dataAnglePos * this.onePxArcAngle;
808
+ }
809
+ static capMaxValue(value, gainCapped, lossCapped) {
810
+ if (value && Math.sign(value) == 1) {
811
+ return value > gainCapped ? gainCapped : value;
812
+ }
813
+ if (Math.sign(value) == -1) {
814
+ return value < lossCapped ? lossCapped : value;
815
+ }
816
+ return 0;
817
+ }
818
+ static capMinValue(value, capMinValue = 1) {
819
+ if (Math.sign(value) == 1) {
820
+ return value > capMinValue ? value : capMinValue;
821
+ }
822
+ if (Math.sign(value) == -1) {
823
+ return value < -1 * capMinValue ? value : -1 * capMinValue;
824
+ }
825
+ return 1;
826
+ }
827
+ };
828
+
829
+ // plots/disco/legend/Legend.ts
830
+ var Legend = class {
831
+ constructor(snvTitle, cnvTitle, lohTitle, fusionTitle, cnvPercentile, cnvCutoffmode, snvClassMap, cnvClassMap, cnvRenderingType, fusionLegend, discoInteractions, lohLegend, mutationWaterfallLegend) {
832
+ this.snvTitle = snvTitle;
833
+ this.cnvTitle = cnvTitle;
834
+ this.lohTitle = lohTitle;
835
+ this.fusionTitle = fusionTitle;
836
+ this.cnvPercentile = cnvPercentile;
837
+ this.cnvCutoffMode = cnvCutoffmode;
838
+ this.snvClassMap = snvClassMap;
839
+ this.cnvClassMap = cnvClassMap;
840
+ this.cnvRenderingType = cnvRenderingType;
841
+ this.lohLegend = lohLegend;
842
+ this.fusionLegend = fusionLegend;
843
+ this.discoInteractions = discoInteractions;
844
+ this.mutationWaterfallLegend = mutationWaterfallLegend;
845
+ }
846
+ legendCount() {
847
+ return (this.snvClassMap.size > 0 ? 1 : 0) + (this.cnvClassMap.size > 0 ? 1 : 0) + (this.lohLegend ? 1 : 0) + (this.fusionLegend ? 1 : 0) + (this.mutationWaterfallLegend ? 1 : 0);
848
+ }
849
+ };
850
+
851
+ // plots/disco/fusion/Fusion.ts
852
+ var Fusion = class {
853
+ constructor(source, target, genes, count, endpts) {
854
+ this.source = source;
855
+ this.target = target;
856
+ this.genes = genes;
857
+ this.count = count;
858
+ this.endpts = endpts;
859
+ }
860
+ };
861
+
862
+ // plots/disco/fusion/FusionSubgroup.ts
863
+ var FusionSubgroup = class {
864
+ constructor(startAngle, endAngle, radius, gene, value, genes, positionInChromosome, strand) {
865
+ this.startAngle = startAngle;
866
+ this.endAngle = endAngle;
867
+ this.radius = radius;
868
+ this.gene = gene;
869
+ this.value = value;
870
+ this.genes = genes;
871
+ this.positionInChromosome = positionInChromosome;
872
+ this.strand = strand;
873
+ }
874
+ };
875
+
876
+ // plots/disco/fusion/FusionMapper.ts
877
+ var FusionMapper = class {
878
+ constructor(radius, sampleName, reference) {
879
+ this.radius = radius;
880
+ this.sampleName = sampleName;
881
+ this.reference = reference;
882
+ }
883
+ map(fusionData) {
884
+ const fusions = [];
885
+ fusionData.forEach((data) => {
886
+ const genes = /* @__PURE__ */ new Set();
887
+ genes.add(data.geneA);
888
+ genes.add(data.geneB);
889
+ const startAngle = this.calculateStartAngle(data.chrA, data.posA);
890
+ const endAngle = this.calculateEndAngle(data.chrA, data.posA);
891
+ if (startAngle === null || endAngle === null) return;
892
+ const source = new FusionSubgroup(
893
+ startAngle,
894
+ endAngle,
895
+ this.radius,
896
+ data.geneA,
897
+ data.value,
898
+ genes,
899
+ {
900
+ chromosome: data.chrA,
901
+ position: data.posA
902
+ },
903
+ data.strandA
904
+ );
905
+ let target;
906
+ if (data.chrB && data.posB) {
907
+ const startAngle2 = this.calculateStartAngle(data.chrB, data.posB);
908
+ const endAngle2 = this.calculateEndAngle(data.chrB, data.posB);
909
+ if (startAngle2 === null || endAngle2 === null) return;
910
+ target = new FusionSubgroup(
911
+ startAngle2,
912
+ endAngle2,
913
+ this.radius,
914
+ data.geneB,
915
+ data.value,
916
+ genes,
917
+ {
918
+ chromosome: data.chrB,
919
+ position: data.posB
920
+ },
921
+ data.strandB
922
+ );
923
+ }
924
+ const fusion = new Fusion(source, target, "genes", -1, "Endpoints");
925
+ fusions.push(fusion);
926
+ });
927
+ return fusions;
928
+ }
929
+ calculateStartAngle(chr, pos) {
930
+ const index = this.reference.chromosomesOrder.indexOf(chr);
931
+ if (index === -1) return null;
932
+ const chromosome = this.reference.chromosomes[index];
933
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size) - 0.01;
934
+ }
935
+ calculateEndAngle(chr, pos) {
936
+ const index = this.reference.chromosomesOrder.indexOf(chr);
937
+ if (index === -1) return null;
938
+ const chromosome = this.reference.chromosomes[index];
939
+ return 0.01 + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size);
940
+ }
941
+ };
942
+
943
+ // plots/disco/loh/GradientColorProvider.ts
944
+ var GradientColorProvider = class {
945
+ static provide(value) {
946
+ const clampedValue = Math.min(Math.max(value, 0), 1);
947
+ const colorValue = Math.round(clampedValue * 255);
948
+ return `rgb(${colorValue}, ${colorValue}, ${colorValue})`;
949
+ }
950
+ };
951
+
952
+ // plots/disco/loh/LohLegend.ts
953
+ var LohLegend = class {
954
+ constructor(minValue, maxValue) {
955
+ this.minValue = minValue;
956
+ this.maxValue = maxValue;
957
+ this.colorStartValue = GradientColorProvider.provide(minValue);
958
+ this.colorEndValue = GradientColorProvider.provide(maxValue);
959
+ }
960
+ };
961
+
962
+ // plots/disco/viewmodel/ViewModel.ts
963
+ var ViewModel = class {
964
+ constructor(settings, rings, legend, fusions, dataHolder, genesetName, snvDataLengthAll) {
965
+ this.settings = settings;
966
+ this.rings = rings;
967
+ this.legend = legend;
968
+ this.fusions = fusions;
969
+ this.genesetName = genesetName;
970
+ const tempHolder = select_default("body").append("div").style("position", "absolute").style("visibility", "hidden");
971
+ const tempSvg = tempHolder.append("svg");
972
+ const labels = rings.labelsRing?.elementsToDisplay?.map((l) => l.text) || [];
973
+ const maxLabelSpace = getMaxLabelWidth(tempSvg, labels);
974
+ tempHolder.remove();
975
+ this.width = 2 * (this.settings.horizontalPadding + this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + maxLabelSpace);
976
+ this.height = 2 * (this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + this.settings.verticalPadding + this.settings.label.fontSize * 2 + maxLabelSpace);
977
+ this.legendHeight = this.calculateLegendHeight(legend);
978
+ this.snvDataLength = dataHolder.snvData.length;
979
+ this.filteredSnvDataLength = dataHolder.filteredSnvData.length;
980
+ this.snvDataLengthAll = snvDataLengthAll;
981
+ this.cnvMaxValue = dataHolder.cnvGainMaxValue;
982
+ this.cnvMinValue = dataHolder.cnvLossMaxValue;
983
+ this.cappedCnvMaxAbsValue = dataHolder.cappedCnvMaxAbsValue;
984
+ this.negativePercentile = dataHolder.percentileNegative;
985
+ this.positivePercentile = dataHolder.percentilePositive;
986
+ this.invalidDataInfo = dataHolder.invalidDataInfo;
987
+ this.canShowMutationWaterfallPlot = dataHolder.hasWaterfallEligibleChromosome;
988
+ }
989
+ getElements(ringType) {
990
+ switch (ringType) {
991
+ case 0 /* CHROMOSOME */:
992
+ return this.rings.chromosomesRing ? this.rings.chromosomesRing.elements : [];
993
+ case 1 /* LABEL */:
994
+ return this.rings.labelsRing.elementsToDisplay;
995
+ case 2 /* NONEXONICSNV */:
996
+ return this.rings.nonExonicArcRing ? this.rings.nonExonicArcRing.elements : [];
997
+ case 3 /* SNV */:
998
+ return this.rings.snvArcRing ? this.rings.snvArcRing.elements : [];
999
+ case 5 /* CNV */:
1000
+ return this.rings.cnvArcRing ? this.rings.cnvArcRing.elements : [];
1001
+ case 6 /* LOH */:
1002
+ return this.rings.lohArcRing ? this.rings.lohArcRing.elements : [];
1003
+ case 4 /* MUTATION_WATERFALL */:
1004
+ return this.rings.mutationWaterfallRing ? this.rings.mutationWaterfallRing.elements : [];
1005
+ default:
1006
+ throw new Error(`ringType ${ringType} not defined`);
1007
+ }
1008
+ }
1009
+ getCollisions(ringType) {
1010
+ if (ringType == 1 /* LABEL */) {
1011
+ return this.rings.labelsRing.collisions;
1012
+ } else {
1013
+ return void 0;
1014
+ }
1015
+ }
1016
+ calculateLegendHeight(legend) {
1017
+ const rawHeight = this.settings.legend.rowHeight;
1018
+ return rawHeight * legend.legendCount();
1019
+ }
1020
+ };
1021
+
1022
+ // plots/disco/ring/Ring.ts
1023
+ var Ring = class {
1024
+ constructor(innerRadius, width, elements) {
1025
+ this.innerRadius = innerRadius;
1026
+ this.outerRadius = innerRadius + width;
1027
+ this.width = width;
1028
+ this.elements = elements;
1029
+ }
1030
+ };
1031
+
1032
+ // plots/disco/label/MLabel.ts
1033
+ var MLabel = class _MLabel {
1034
+ /**
1035
+ * The Singleton's constructor should always be private to prevent direct
1036
+ * construction calls with the `new` operator.
1037
+ */
1038
+ constructor() {
1039
+ const mlabel = {};
1040
+ for (const key in mclass) {
1041
+ mlabel[mclass[key].label] = mclass[key];
1042
+ mlabel[key] = mclass[key];
1043
+ }
1044
+ this.mlabel = mlabel;
1045
+ }
1046
+ /**
1047
+ * The static method that controls the access to the singleton instance.
1048
+ *
1049
+ * This implementation let you subclass the Singleton class while keeping
1050
+ * just one instance of each subclass around.
1051
+ */
1052
+ static getInstance() {
1053
+ if (!_MLabel.instance) {
1054
+ _MLabel.instance = new _MLabel();
1055
+ }
1056
+ return _MLabel.instance;
1057
+ }
1058
+ };
1059
+
1060
+ // plots/disco/snv/SnvLegendElement.ts
1061
+ var SnvLegendElement = class {
1062
+ constructor(snvType, color, count) {
1063
+ this.snvType = snvType;
1064
+ this.color = color;
1065
+ this.count = count;
1066
+ }
1067
+ };
1068
+
1069
+ // plots/disco/snv/SnvArcsMapper.ts
1070
+ var SnvArcsMapper = class {
1071
+ constructor(svnInnerRadius, svnWidth, sampleName, reference) {
1072
+ this.snvClassMap = /* @__PURE__ */ new Map();
1073
+ this.svnInnerRadius = svnInnerRadius;
1074
+ this.svnWidth = svnWidth;
1075
+ this.sampleName = sampleName;
1076
+ this.reference = reference;
1077
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * svnInnerRadius));
1078
+ this.onePxArcAngle = 1 / svnInnerRadius;
1079
+ }
1080
+ map(exonicSnvDataMap) {
1081
+ const snvArray = [];
1082
+ for (const angle of exonicSnvDataMap.keys()) {
1083
+ const array = exonicSnvDataMap.get(angle);
1084
+ if (array) {
1085
+ const arraySize = array.length;
1086
+ for (let i = 0; i < array.length; i++) {
1087
+ const data = array[i];
1088
+ const snvLegendElement = this.snvClassMap.get(data.mClass);
1089
+ if (snvLegendElement) {
1090
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, ++snvLegendElement.count));
1091
+ } else {
1092
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, 1));
1093
+ }
1094
+ const startAngle = angle;
1095
+ const endAngle = angle + this.onePxArcAngle;
1096
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1097
+ const arc = {
1098
+ startAngle,
1099
+ endAngle,
1100
+ innerRadius: this.svnInnerRadius + i * this.svnWidth / arraySize,
1101
+ outerRadius: this.svnInnerRadius + (i + 1) * this.svnWidth / arraySize,
1102
+ color: mLabel.color,
1103
+ text: data.gene,
1104
+ dataClass: mLabel.label,
1105
+ mname: data.mname,
1106
+ chr: data.chr,
1107
+ pos: data.position,
1108
+ vafs: data.vafs,
1109
+ sampleName: [data.sampleName]
1110
+ };
1111
+ snvArray.push(arc);
1112
+ }
1113
+ }
1114
+ }
1115
+ return snvArray;
1116
+ }
1117
+ createSnvLegend(dataClass, count) {
1118
+ const mClass = MLabel.getInstance().mlabel[dataClass];
1119
+ return new SnvLegendElement(mClass.label, mClass.color, count);
1120
+ }
1121
+ };
1122
+
1123
+ // plots/disco/cnv/CnvLegend.ts
1124
+ var CnvLegend = class {
1125
+ constructor(text, cnvType, color, value) {
1126
+ this.text = text;
1127
+ this.cnvType = cnvType;
1128
+ this.color = color;
1129
+ this.value = value;
1130
+ }
1131
+ };
1132
+
1133
+ // plots/disco/cnv/CnvColorProvider.ts
1134
+ var CnvColorProvider = class {
1135
+ static getColor(value, settings, cnvMaxPercentileAbs = 0) {
1136
+ const cnv = settings.cnv;
1137
+ const gainCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? settings.Disco.cnvCapping : cnvMaxPercentileAbs;
1138
+ const lossCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? -1 * settings.Disco.cnvCapping : -1 * cnvMaxPercentileAbs;
1139
+ if (value < lossCapped) {
1140
+ return cnv.cappedLossColor;
1141
+ } else if (value >= lossCapped && value <= 0) {
1142
+ return cnv.lossColor;
1143
+ } else if (value > 0 && value <= gainCapped) {
1144
+ return cnv.ampColor;
1145
+ } else {
1146
+ return cnv.cappedAmpColor;
1147
+ }
1148
+ }
1149
+ };
1150
+
1151
+ // plots/disco/cnv/CnvArcsMapper.ts
1152
+ var CnvArcsMapper = class {
1153
+ constructor(cnvInnerRadius, cnvWidth, settings, sampleName, reference, cnvMaxValue = 0, cnvMinValue = 0, cnvMaxAbsValue = 0, cnvAbsPercentile = 0, cnvUnit = "", cnvRenderingType) {
1154
+ this.cnvClassMap = /* @__PURE__ */ new Map();
1155
+ this.cnvInnerRadius = cnvInnerRadius;
1156
+ this.cnvWidth = cnvWidth;
1157
+ this.settings = settings;
1158
+ this.sampleName = sampleName;
1159
+ this.reference = reference;
1160
+ this.cnvMaxValue = cnvMaxValue;
1161
+ this.cnvMinValue = cnvMinValue;
1162
+ this.cnvMaxAbsValue = cnvMaxAbsValue;
1163
+ this.cnvAbsPercentile = cnvAbsPercentile;
1164
+ this.cnvUnit = cnvUnit;
1165
+ this.cnvRenderingType = cnvRenderingType;
1166
+ this.gainCapped = Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1167
+ this.lossCapped = -1 * Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1168
+ this.lossOnly = cnvMaxValue <= 0;
1169
+ this.gainOnly = cnvMinValue >= 0;
1170
+ this.onePxArcAngle = 1 / this.cnvInnerRadius;
1171
+ const gain = new CnvLegend(
1172
+ "Max",
1173
+ cnvMaxValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1174
+ this.getColor(cnvMaxValue),
1175
+ cnvMaxValue
1176
+ );
1177
+ const loss = new CnvLegend(
1178
+ "Min",
1179
+ cnvMinValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1180
+ this.getColor(cnvMinValue),
1181
+ cnvMinValue
1182
+ );
1183
+ const cap = new CnvLegend(
1184
+ "Capping",
1185
+ 0 /* Loss */,
1186
+ this.getColor(cnvMinValue > 0 ? cnvMinValue : cnvMaxValue),
1187
+ this.settings.Disco.cnvCapping
1188
+ );
1189
+ this.cnvClassMap.set(1 /* Gain */, gain);
1190
+ this.cnvClassMap.set(0 /* Loss */, loss);
1191
+ this.cnvClassMap.set(2 /* Cap */, cap);
1192
+ }
1193
+ map(arcData) {
1194
+ const arcs = [];
1195
+ arcData.forEach((data) => {
1196
+ let startAngle = this.calculateStartAngle(data);
1197
+ let endAngle = this.calculateEndAngle(data);
1198
+ if (startAngle === null || endAngle === null) return;
1199
+ if (endAngle - startAngle < this.onePxArcAngle) {
1200
+ const restAngle = this.onePxArcAngle - (endAngle - startAngle);
1201
+ startAngle = startAngle - restAngle / 2;
1202
+ endAngle = startAngle + restAngle / 2;
1203
+ }
1204
+ const innerRadius = this.calculateInnerRadius(data);
1205
+ const outerRadius = this.calculateOuterRadius(data);
1206
+ const color = this.getColor(data.value);
1207
+ const arc = {
1208
+ startAngle,
1209
+ endAngle,
1210
+ innerRadius,
1211
+ outerRadius,
1212
+ color,
1213
+ text: data.gene,
1214
+ chr: data.chr,
1215
+ start: data.start,
1216
+ stop: data.stop,
1217
+ value: data.value,
1218
+ unit: this.cnvUnit,
1219
+ sampleName: [this.sampleName]
1220
+ };
1221
+ arcs.push(arc);
1222
+ });
1223
+ return arcs;
1224
+ }
1225
+ calculateStartAngle(data) {
1226
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1227
+ if (index == -1) return null;
1228
+ const chromosome = this.reference.chromosomes[index];
1229
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1230
+ }
1231
+ calculateEndAngle(data) {
1232
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1233
+ const chromosome = this.reference.chromosomes[index];
1234
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1235
+ }
1236
+ getColor(value) {
1237
+ return CnvColorProvider.getColor(value, this.settings, this.cnvAbsPercentile);
1238
+ }
1239
+ calculateInnerRadius(data) {
1240
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1241
+ return this.cnvInnerRadius;
1242
+ }
1243
+ if (this.gainOnly) {
1244
+ return this.cnvInnerRadius;
1245
+ }
1246
+ if (this.lossOnly) {
1247
+ const outerRadius = this.cnvInnerRadius + this.cnvWidth;
1248
+ return outerRadius + DataMapper.capMinValue(
1249
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1250
+ );
1251
+ }
1252
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1253
+ if (Math.sign(data.value) == 1) {
1254
+ return centerRadius;
1255
+ }
1256
+ if (Math.sign(data.value) == -1) {
1257
+ return centerRadius + DataMapper.capMinValue(
1258
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile * (this.cnvWidth / 2)
1259
+ );
1260
+ }
1261
+ return 1;
1262
+ }
1263
+ calculateOuterRadius(data) {
1264
+ const maxOuterRadius = this.cnvInnerRadius + this.cnvWidth;
1265
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1266
+ return maxOuterRadius;
1267
+ }
1268
+ if (this.gainOnly) {
1269
+ return this.cnvInnerRadius + DataMapper.capMinValue(
1270
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1271
+ );
1272
+ }
1273
+ if (this.lossOnly) {
1274
+ return maxOuterRadius;
1275
+ }
1276
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1277
+ if (Math.sign(data.value) == 1) {
1278
+ return centerRadius + DataMapper.capMinValue(
1279
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvMaxAbsValue * (this.cnvWidth / 2)
1280
+ );
1281
+ }
1282
+ if (Math.sign(data.value) == -1) {
1283
+ return centerRadius;
1284
+ }
1285
+ return 1;
1286
+ }
1287
+ };
1288
+
1289
+ // plots/disco/label/Line.ts
1290
+ var Line = class {
1291
+ constructor(points, color) {
1292
+ this.points = new Array();
1293
+ this.points = points;
1294
+ this.color = color;
1295
+ }
1296
+ };
1297
+
1298
+ // plots/disco/label/LabelFactory.ts
1299
+ var LabelFactory = class {
1300
+ static createLabel(startAngle, endAngle, innerRadius, outerRadius, value, gene, color, dataClass, chr, position, isPrioritized = false, labelsToLinesGap, mutationTooltip, fusionTooltip) {
1301
+ const angle = (startAngle + endAngle) / 2;
1302
+ const ccAngle = angle - Math.PI / 2;
1303
+ const transform = `rotate(${angle * 180 / Math.PI - 90}) translate(${outerRadius})${angle > Math.PI ? "rotate(180)" : ""}`;
1304
+ const textAnchor = angle > Math.PI ? "end" : "";
1305
+ const r0 = innerRadius;
1306
+ const r1 = outerRadius - labelsToLinesGap;
1307
+ const points = [];
1308
+ const point0 = {
1309
+ x: r0 * Math.cos(ccAngle),
1310
+ y: r0 * Math.sin(ccAngle)
1311
+ };
1312
+ const point1 = {
1313
+ x: r1 * Math.cos(ccAngle),
1314
+ y: r1 * Math.sin(ccAngle)
1315
+ };
1316
+ points.push(point0);
1317
+ points.push(point1);
1318
+ const line = new Line(points, color);
1319
+ const label = {
1320
+ startAngle,
1321
+ endAngle,
1322
+ innerRadius,
1323
+ outerRadius,
1324
+ angle,
1325
+ value,
1326
+ text: gene,
1327
+ color,
1328
+ transform,
1329
+ textAnchor,
1330
+ ccAngle,
1331
+ line,
1332
+ isPrioritized,
1333
+ start: position,
1334
+ stop: position,
1335
+ chr,
1336
+ mutationsTooltip: mutationTooltip ? [mutationTooltip] : void 0,
1337
+ fusionTooltip: fusionTooltip ? [fusionTooltip] : void 0
1338
+ };
1339
+ return label;
1340
+ }
1341
+ static createMovedLabel(element, overlap) {
1342
+ const startAngle = element.startAngle + overlap;
1343
+ const endAngle = element.endAngle + overlap;
1344
+ const angle = (startAngle + endAngle) / 2;
1345
+ const ccAngle = angle - Math.PI / 2;
1346
+ const r0 = element.innerRadius;
1347
+ const r1 = element.outerRadius - 2;
1348
+ const dr = (r1 - r0) / 3;
1349
+ const cos0 = Math.cos(element.ccAngle);
1350
+ const sin0 = Math.sin(element.ccAngle);
1351
+ const cos1 = Math.cos(element.ccAngle + overlap);
1352
+ const sin1 = Math.sin(element.ccAngle + overlap);
1353
+ const points = [];
1354
+ const point0 = {
1355
+ x: r0 * cos0,
1356
+ y: r0 * sin0
1357
+ };
1358
+ const point1 = {
1359
+ x: (r0 + dr) * cos0,
1360
+ y: (r0 + dr) * sin0
1361
+ };
1362
+ const point2 = {
1363
+ x: (r0 + 2 * dr) * cos1,
1364
+ y: (r0 + 2 * dr) * sin1
1365
+ };
1366
+ const point3 = {
1367
+ x: (r0 + 3 * dr) * cos1,
1368
+ y: (r0 + 3 * dr) * sin1
1369
+ };
1370
+ points.push(point0);
1371
+ points.push(point1);
1372
+ points.push(point2);
1373
+ points.push(point3);
1374
+ const line = new Line(points, element.color);
1375
+ const transform = "rotate(" + (angle * 180 / Math.PI - 90) + ")translate(" + element.outerRadius + ")" + (angle > Math.PI ? "rotate(180)" : "");
1376
+ const textAnchor = angle > Math.PI ? "end" : "";
1377
+ const color = element.mutationsTooltip ? element.mutationsTooltip[0].color : element.fusionTooltip ? element.fusionTooltip[0].color : void 0;
1378
+ const label = {
1379
+ startAngle,
1380
+ endAngle,
1381
+ innerRadius: element.innerRadius,
1382
+ outerRadius: element.outerRadius,
1383
+ angle,
1384
+ value: element.value,
1385
+ text: element.text,
1386
+ transform,
1387
+ textAnchor,
1388
+ ccAngle,
1389
+ color,
1390
+ line,
1391
+ isPrioritized: element.isPrioritized,
1392
+ start: element.start,
1393
+ stop: element.stop,
1394
+ chr: element.chr,
1395
+ mutationsTooltip: element.mutationsTooltip,
1396
+ fusionTooltip: element.fusionTooltip
1397
+ };
1398
+ return label;
1399
+ }
1400
+ };
1401
+
1402
+ // plots/disco/label/LabelsMapper.ts
1403
+ var LabelsMapper = class {
1404
+ constructor(settings, sampleName, reference, cnvMaxPercentileAbs = 0) {
1405
+ this.labelMap = /* @__PURE__ */ new Map();
1406
+ this.settings = settings;
1407
+ this.sampleName = sampleName;
1408
+ this.reference = reference;
1409
+ this.cnvMaxPercentileAbs = cnvMaxPercentileAbs;
1410
+ }
1411
+ map(data, cnvData = []) {
1412
+ const innerRadius = this.settings.rings.labelLinesInnerRadius;
1413
+ const outerRadius = innerRadius + this.settings.rings.labelsToLinesDistance;
1414
+ data.forEach((data2) => {
1415
+ if (data2.dt == dtsnvindel) {
1416
+ const startAngle = this.calculateStartAngle(data2.chr, data2.position);
1417
+ const endAngle = this.calculateEndAngle(data2.chr, data2.position);
1418
+ if (startAngle === null || endAngle === null) return;
1419
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data2.mClass] : void 0;
1420
+ this.addLabelOrMutation(
1421
+ data2,
1422
+ data2.gene,
1423
+ data2.mname,
1424
+ startAngle,
1425
+ endAngle,
1426
+ innerRadius,
1427
+ outerRadius,
1428
+ mLabel.color,
1429
+ mLabel.label
1430
+ );
1431
+ }
1432
+ if (data2.dt == dtfusionrna) {
1433
+ const color = FusionColorProvider.getColor(data2.chrA, data2.chrB);
1434
+ if (data2.geneA) {
1435
+ const startAngleSource = this.calculateStartAngle(data2.chrA, data2.posA);
1436
+ const endAngleSource = this.calculateEndAngle(data2.chrA, data2.posA);
1437
+ if (startAngleSource === null || endAngleSource === null) return;
1438
+ this.addLabelOrFusion(
1439
+ data2,
1440
+ data2.geneA,
1441
+ data2.posA,
1442
+ startAngleSource,
1443
+ endAngleSource,
1444
+ innerRadius,
1445
+ outerRadius,
1446
+ color
1447
+ );
1448
+ }
1449
+ if (data2.geneB && data2.geneA != data2.geneB) {
1450
+ const startAngleTarget = this.calculateStartAngle(data2.chrB, data2.posB);
1451
+ const endAngleTarget = this.calculateEndAngle(data2.chrB, data2.posB);
1452
+ if (startAngleTarget == null || endAngleTarget == null) return;
1453
+ this.addLabelOrFusion(
1454
+ data2,
1455
+ data2.geneB,
1456
+ data2.posB,
1457
+ startAngleTarget,
1458
+ endAngleTarget,
1459
+ innerRadius,
1460
+ outerRadius,
1461
+ color
1462
+ );
1463
+ }
1464
+ }
1465
+ });
1466
+ const labelsArray = Array.from(this.labelMap.values());
1467
+ labelsArray.forEach((label) => {
1468
+ cnvData.forEach((cnv) => {
1469
+ if (label.stop >= cnv.start && cnv.stop >= label.start && label.chr == cnv.chr) {
1470
+ const mutation = {
1471
+ value: cnv.value,
1472
+ color: CnvColorProvider.getColor(cnv.value, this.settings, this.cnvMaxPercentileAbs),
1473
+ chr: cnv.chr,
1474
+ start: cnv.start,
1475
+ stop: cnv.stop
1476
+ };
1477
+ if (label.cnvTooltip) {
1478
+ label.cnvTooltip.push(mutation);
1479
+ } else {
1480
+ label.cnvTooltip = [];
1481
+ label.cnvTooltip.push(mutation);
1482
+ }
1483
+ }
1484
+ });
1485
+ });
1486
+ return Array.from(this.labelMap.values());
1487
+ }
1488
+ addLabelOrMutation(data, gene, mname, startAngle, endAngle, innerRadius, outerRadius, color, dataClass) {
1489
+ const label = this.labelMap.get(gene);
1490
+ const mutation = {
1491
+ mname,
1492
+ color,
1493
+ dataClass,
1494
+ chr: data.chr,
1495
+ position: data.position,
1496
+ vafs: data.vafs
1497
+ };
1498
+ if (!label) {
1499
+ this.labelMap.set(
1500
+ gene,
1501
+ LabelFactory.createLabel(
1502
+ startAngle,
1503
+ endAngle,
1504
+ innerRadius,
1505
+ outerRadius,
1506
+ data.value,
1507
+ gene,
1508
+ color,
1509
+ dataClass,
1510
+ data.chr,
1511
+ data.position,
1512
+ data.isPrioritized,
1513
+ this.settings.rings.labelsToLinesGap,
1514
+ mutation
1515
+ )
1516
+ );
1517
+ } else {
1518
+ if (label.mutationsTooltip) {
1519
+ label.start = Math.min(label.start, data.position);
1520
+ label.stop = Math.max(label.stop, data.position);
1521
+ label.mutationsTooltip.push(mutation);
1522
+ } else {
1523
+ label.mutationsTooltip = [];
1524
+ label.start = Math.min(label.start, data.position);
1525
+ label.stop = Math.max(label.stop, data.position);
1526
+ label.mutationsTooltip.push(mutation);
1527
+ }
1528
+ }
1529
+ }
1530
+ addLabelOrFusion(data, gene, position, startAngle, endAngle, innerRadius, outerRadius, color) {
1531
+ const label = this.labelMap.get(gene);
1532
+ const fusionTooltip = {
1533
+ color,
1534
+ chrA: data.chrA,
1535
+ chrB: data.chrB,
1536
+ posA: data.posA,
1537
+ posB: data.posB,
1538
+ geneA: data.geneA,
1539
+ geneB: data.geneB,
1540
+ strandA: data.strandA,
1541
+ strandB: data.strandB
1542
+ };
1543
+ if (!label) {
1544
+ this.labelMap.set(
1545
+ gene,
1546
+ LabelFactory.createLabel(
1547
+ startAngle,
1548
+ endAngle,
1549
+ innerRadius,
1550
+ outerRadius,
1551
+ data.value,
1552
+ gene,
1553
+ color,
1554
+ "Fusion transcript",
1555
+ data.chr,
1556
+ data.position,
1557
+ data.isPrioritized,
1558
+ this.settings.rings.labelsToLinesGap,
1559
+ void 0,
1560
+ fusionTooltip
1561
+ )
1562
+ );
1563
+ } else {
1564
+ if (label.fusionTooltip) {
1565
+ label.start = Math.min(label.start, position);
1566
+ label.stop = Math.max(label.stop, position);
1567
+ label.fusionTooltip.push(fusionTooltip);
1568
+ } else {
1569
+ label.fusionTooltip = [];
1570
+ label.start = Math.min(label.start, position);
1571
+ label.stop = Math.max(label.stop, position);
1572
+ label.fusionTooltip.push(fusionTooltip);
1573
+ }
1574
+ }
1575
+ }
1576
+ calculateStartAngle(chr, position) {
1577
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1578
+ if (index === -1) return null;
1579
+ const chromosome = this.reference.chromosomes[index];
1580
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1581
+ }
1582
+ calculateEndAngle(chr, position) {
1583
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1584
+ if (index === -1) return null;
1585
+ const chromosome = this.reference.chromosomes[index];
1586
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1587
+ }
1588
+ };
1589
+
1590
+ // plots/disco/label/Labels.ts
1591
+ var Labels = class extends Ring {
1592
+ constructor(settings, elements, hasPrioritizedGenes) {
1593
+ super(
1594
+ settings.rings.labelLinesInnerRadius,
1595
+ settings.rings.labelsToLinesDistance,
1596
+ elements.sort((a, b) => {
1597
+ return a.startAngle < b.startAngle ? -1 : a.startAngle > b.startAngle ? 1 : 0;
1598
+ })
1599
+ );
1600
+ this.elementsToDisplay = [];
1601
+ this.settings = settings;
1602
+ this.hasPrioritizedGenes = hasPrioritizedGenes;
1603
+ const circumference = 2 * Math.PI * (settings.rings.labelLinesInnerRadius + settings.rings.labelsToLinesDistance);
1604
+ this.overlapAngle = this.settings.label.overlapAngleFactor * this.settings.label.fontSize / circumference;
1605
+ this.calculateCollisions();
1606
+ }
1607
+ calculateCollisions() {
1608
+ this.collisions = [];
1609
+ let hasPrioritizedGenesList = [];
1610
+ hasPrioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1611
+ if (this.settings.label.prioritizeGeneLabelsByGeneSets) {
1612
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(hasPrioritizedGenesList);
1613
+ } else if (this.hasPrioritizedGenes) {
1614
+ const prioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1615
+ const filteredPrioritizedGenesList = this.getLabelsWithPrioritizedGenes(prioritizedGenesList);
1616
+ const withoutPrioritizedGenesList = this.elements.filter((label) => !label.isPrioritized);
1617
+ const combinedAndSortedList = [...withoutPrioritizedGenesList, ...filteredPrioritizedGenesList].sort(
1618
+ (a, b) => a.startAngle - b.startAngle
1619
+ );
1620
+ this.elementsToDisplay = this.getAllLabels(combinedAndSortedList);
1621
+ } else {
1622
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(this.elements);
1623
+ }
1624
+ }
1625
+ getLabelsWithPrioritizedGenes(elemenets) {
1626
+ const filteredList = [];
1627
+ let prev = { endAngle: 0 };
1628
+ elemenets.forEach((element, index) => {
1629
+ if (index == 0) {
1630
+ filteredList.push(element);
1631
+ prev = element;
1632
+ } else {
1633
+ const overlap = prev.endAngle - element.startAngle + this.overlapAngle;
1634
+ if (overlap > 0 && overlap < this.settings.label.maxDeltaAngle) {
1635
+ const labelCopy = LabelFactory.createMovedLabel(element, overlap);
1636
+ filteredList?.push(labelCopy);
1637
+ prev = labelCopy;
1638
+ }
1639
+ if (overlap <= 0) {
1640
+ filteredList.push(element);
1641
+ prev = element;
1642
+ }
1643
+ }
1644
+ });
1645
+ return filteredList;
1646
+ }
1647
+ getAllLabels(elemenets) {
1648
+ const filteredList = [];
1649
+ let prev = { endAngle: 0 };
1650
+ const elemenetsLength = elemenets.length;
1651
+ let lastCancerGeneLabelIndex = -1;
1652
+ for (let index = 0; index < elemenets.length; index++) {
1653
+ const element = elemenets[index];
1654
+ if (element.isPrioritized) {
1655
+ filteredList.push(element);
1656
+ lastCancerGeneLabelIndex = index;
1657
+ prev = element;
1658
+ continue;
1659
+ }
1660
+ if (index == 0) {
1661
+ if (elemenetsLength > 1) {
1662
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1663
+ continue;
1664
+ }
1665
+ filteredList.push(element);
1666
+ prev = element;
1667
+ }
1668
+ continue;
1669
+ }
1670
+ const prevOverlap = prev.endAngle - element.startAngle + this.overlapAngle;
1671
+ if (prevOverlap > 0 && prevOverlap < this.settings.label.maxDeltaAngle) {
1672
+ if (index == length - 1) {
1673
+ filteredList.push(element);
1674
+ continue;
1675
+ }
1676
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap)) {
1677
+ continue;
1678
+ }
1679
+ const labelCopy = LabelFactory.createMovedLabel(element, prevOverlap);
1680
+ this.collisions?.push(labelCopy);
1681
+ filteredList.push(element);
1682
+ prev = labelCopy;
1683
+ }
1684
+ if (prevOverlap <= 0) {
1685
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1686
+ continue;
1687
+ }
1688
+ filteredList.push(element);
1689
+ prev = element;
1690
+ }
1691
+ }
1692
+ return filteredList;
1693
+ }
1694
+ isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap) {
1695
+ const nextLabelWithCancerGene = this.getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex);
1696
+ if (nextLabelWithCancerGene) {
1697
+ const nextOverlap = element.endAngle + prevOverlap - nextLabelWithCancerGene.startAngle + this.overlapAngle;
1698
+ if (nextOverlap > 0) {
1699
+ return true;
1700
+ }
1701
+ }
1702
+ return false;
1703
+ }
1704
+ getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex) {
1705
+ return elemenets.find((label, index) => label.isPrioritized && index > lastCancerGeneLabelIndex);
1706
+ }
1707
+ };
1708
+
1709
+ // plots/disco/snv/NonExonicSnvArcsMapper.ts
1710
+ var NonExonicSnvArcsMapper = class {
1711
+ constructor(nonExonicInnerRadius, nonExonicWidht, sampleName, reference) {
1712
+ this.nonExonicInnerRadius = nonExonicInnerRadius;
1713
+ this.nonExonicWidht = nonExonicWidht;
1714
+ this.sampleName = sampleName;
1715
+ this.reference = reference;
1716
+ this.onePxArcAngle = 1 / nonExonicInnerRadius;
1717
+ }
1718
+ map(arcData) {
1719
+ const innerRadius = this.nonExonicInnerRadius;
1720
+ const outerRadius = innerRadius + this.nonExonicWidht;
1721
+ const arcs = [];
1722
+ arcData.forEach((data) => {
1723
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1724
+ const startAngle = this.calculateStartAngle(data);
1725
+ const endAngle = this.calculateEndAngle(data);
1726
+ if (startAngle === null || endAngle === null) return;
1727
+ const arc = {
1728
+ startAngle,
1729
+ endAngle,
1730
+ innerRadius,
1731
+ outerRadius,
1732
+ color: mLabel.color,
1733
+ text: data.gene,
1734
+ dataClass: mLabel.label,
1735
+ mname: data.mname,
1736
+ chr: data.chr,
1737
+ pos: data.position,
1738
+ vafs: data.vafs,
1739
+ sampleName: [data.sampleName]
1740
+ };
1741
+ arcs.push(arc);
1742
+ });
1743
+ return arcs;
1744
+ }
1745
+ calculateStartAngle(data) {
1746
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1747
+ if (index === -1) return null;
1748
+ const chromosome = this.reference.chromosomes[index];
1749
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size) - this.onePxArcAngle;
1750
+ }
1751
+ calculateEndAngle(data) {
1752
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1753
+ const chromosome = this.reference.chromosomes[index];
1754
+ return this.onePxArcAngle + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size);
1755
+ }
1756
+ };
1757
+
1758
+ // plots/disco/loh/LohArcMapper.ts
1759
+ var LohArcMapper = class {
1760
+ constructor(lohInnerRadius, lohWidth, sampleName, reference) {
1761
+ this.lohInnerRadius = lohInnerRadius;
1762
+ this.lohWidth = lohWidth;
1763
+ this.sampleName = sampleName;
1764
+ this.reference = reference;
1765
+ }
1766
+ map(arcData) {
1767
+ const arcs = [];
1768
+ arcData.forEach((data) => {
1769
+ const startAngle = this.calculateStartAngle(data);
1770
+ const endAngle = this.calculateEndAngle(data);
1771
+ if (startAngle === null || endAngle === null) return;
1772
+ const innerRadius = this.lohInnerRadius;
1773
+ const outerRadius = innerRadius + this.lohWidth;
1774
+ const color = GradientColorProvider.provide(data.segmean);
1775
+ const arc = {
1776
+ startAngle,
1777
+ endAngle,
1778
+ innerRadius,
1779
+ outerRadius,
1780
+ color,
1781
+ text: data.gene,
1782
+ chr: data.chr,
1783
+ start: data.start,
1784
+ stop: data.stop,
1785
+ value: data.segmean
1786
+ };
1787
+ arcs.push(arc);
1788
+ });
1789
+ return arcs;
1790
+ }
1791
+ calculateStartAngle(data) {
1792
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1793
+ if (index === -1) return null;
1794
+ const chromosome = this.reference.chromosomes[index];
1795
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1796
+ }
1797
+ calculateEndAngle(data) {
1798
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1799
+ const chromosome = this.reference.chromosomes[index];
1800
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1801
+ }
1802
+ };
1803
+
1804
+ // plots/disco/ring/Rings.ts
1805
+ var Rings = class {
1806
+ constructor(labelsRing, chromosomesRing, nonExonicArcRing, snvArcRing, cnvArcRing, lohArcRing, mutationWaterfallRing) {
1807
+ this.labelsRing = labelsRing;
1808
+ this.chromosomesRing = chromosomesRing;
1809
+ this.nonExonicArcRing = nonExonicArcRing;
1810
+ this.snvArcRing = snvArcRing;
1811
+ this.cnvArcRing = cnvArcRing;
1812
+ this.lohArcRing = lohArcRing;
1813
+ this.mutationWaterfallRing = mutationWaterfallRing;
1814
+ }
1815
+ };
1816
+
1817
+ // plots/disco/waterfall/MutationWaterfallMapper.ts
1818
+ var MutationWaterfallMapper = class {
1819
+ constructor(innerRadius, ringWidth, reference, logRange, color = "#4d4d4d") {
1820
+ this.innerRadius = innerRadius;
1821
+ this.ringWidth = ringWidth;
1822
+ this.reference = reference;
1823
+ this.logRange = logRange;
1824
+ this.color = color;
1825
+ }
1826
+ map(data = []) {
1827
+ if (!data.length) return [];
1828
+ const min = this.logRange?.min ?? 0;
1829
+ const max = this.logRange?.max ?? min + 1;
1830
+ const span = max - min || 1;
1831
+ const points = [];
1832
+ for (const datum of data) {
1833
+ const chrIndex = this.reference.chromosomesOrder.indexOf(datum.chr);
1834
+ if (chrIndex === -1) continue;
1835
+ const chromosome = this.reference.chromosomes[chrIndex];
1836
+ const chrAngleSpan = chromosome.endAngle - chromosome.startAngle;
1837
+ const relPos = chromosome.size > 0 ? datum.position / chromosome.size : 0;
1838
+ const angle = chromosome.startAngle + chrAngleSpan * relPos;
1839
+ const normalized = Math.max(0, Math.min(1, (datum.logDistance - min) / span));
1840
+ const radius = this.innerRadius + this.ringWidth * normalized;
1841
+ points.push({
1842
+ startAngle: angle,
1843
+ endAngle: angle,
1844
+ innerRadius: radius,
1845
+ outerRadius: radius,
1846
+ text: chromosome.text,
1847
+ color: this.color,
1848
+ chr: datum.chr,
1849
+ position: datum.position,
1850
+ logDistance: datum.logDistance,
1851
+ ringInnerRadius: this.innerRadius,
1852
+ ringWidth: this.ringWidth,
1853
+ rangeMin: min,
1854
+ rangeMax: max
1855
+ });
1856
+ }
1857
+ return points;
1858
+ }
1859
+ };
1860
+
1861
+ // plots/disco/viewmodel/ViewModelProvider.ts
1862
+ var ViewModelProvider = class {
1863
+ constructor(settings, dataMapper, reference, sampleName, genesetName, discoInteractions) {
1864
+ this.nonExonicArcRing = void 0;
1865
+ this.settings = settings;
1866
+ this.dataMapper = dataMapper;
1867
+ this.reference = reference;
1868
+ this.sampleName = sampleName;
1869
+ this.genesetName = genesetName;
1870
+ this.discoInteractions = discoInteractions;
1871
+ }
1872
+ map(data) {
1873
+ const dataHolder = this.dataMapper.map(data);
1874
+ const labelsMapper = new LabelsMapper(
1875
+ this.settings,
1876
+ this.sampleName,
1877
+ this.reference,
1878
+ dataHolder.cnvMaxPercentileAbs
1879
+ );
1880
+ const labelsData = labelsMapper.map(dataHolder.labelData, dataHolder.cnvData);
1881
+ const labelsRing = new Labels(this.settings, labelsData, dataHolder.hasPrioritizedGenes);
1882
+ const chromosomesRing = new Ring(
1883
+ this.settings.rings.chromosomeInnerRadius,
1884
+ this.settings.rings.chromosomeWidth,
1885
+ this.reference.chromosomes
1886
+ );
1887
+ const nonExonicSnvArcsMapper = new NonExonicSnvArcsMapper(
1888
+ dataHolder.nonExonicInnerRadius,
1889
+ this.settings.rings.nonExonicRingWidth,
1890
+ this.sampleName,
1891
+ this.reference
1892
+ );
1893
+ const nonExonicData = nonExonicSnvArcsMapper.map(dataHolder.nonExonicSnvData);
1894
+ if (nonExonicData.length > 0) {
1895
+ this.nonExonicArcRing = new Ring(
1896
+ dataHolder.nonExonicInnerRadius,
1897
+ this.settings.rings.nonExonicRingWidth,
1898
+ nonExonicData
1899
+ );
1900
+ }
1901
+ this.snvArcsMapper = new SnvArcsMapper(
1902
+ dataHolder.snvInnerRadius,
1903
+ this.settings.rings.snvRingWidth,
1904
+ this.sampleName,
1905
+ this.reference
1906
+ );
1907
+ const snvData = this.snvArcsMapper.map(dataHolder.snvRingDataMap);
1908
+ if (snvData.length > 0) {
1909
+ this.snvArcRing = new Ring(dataHolder.snvInnerRadius, this.settings.rings.snvRingWidth, snvData);
1910
+ }
1911
+ const lohMapper = new LohArcMapper(
1912
+ dataHolder.lohInnerRadius,
1913
+ this.settings.rings.lohRingWidth,
1914
+ this.sampleName,
1915
+ this.reference
1916
+ );
1917
+ const lohData = lohMapper.map(dataHolder.lohData);
1918
+ if (lohData.length > 0) {
1919
+ this.lohArcRing = new Ring(dataHolder.lohInnerRadius, this.settings.rings.lohRingWidth, lohData);
1920
+ }
1921
+ this.cnvArcsMapper = new CnvArcsMapper(
1922
+ dataHolder.cnvInnerRadius,
1923
+ this.settings.rings.cnvRingWidth,
1924
+ this.settings,
1925
+ this.sampleName,
1926
+ this.reference,
1927
+ dataHolder.percentilePositive,
1928
+ dataHolder.percentileNegative,
1929
+ dataHolder.cappedCnvMaxAbsValue,
1930
+ dataHolder.cnvMaxPercentileAbs,
1931
+ this.settings.cnv.unit,
1932
+ this.settings.Disco.cnvRenderingType
1933
+ );
1934
+ const cnvData = this.cnvArcsMapper.map(dataHolder.cnvData);
1935
+ if (cnvData.length > 0) {
1936
+ this.cnvArcRing = new Ring(dataHolder.cnvInnerRadius, this.settings.rings.cnvRingWidth, cnvData);
1937
+ }
1938
+ if (this.settings.Disco.mutationWaterfallPlot && dataHolder.mutationWaterfallData?.length && dataHolder.mutationWaterfallInnerRadius !== void 0 && //Added this check to prevent TypeScript error "mutationWaterfallInnerRadius might be undefined"
1939
+ (dataHolder.mutationWaterfallInnerRadius ?? 0) > 0 && dataHolder.mutationWaterfallLogRange) {
1940
+ const mutationWaterfallMapper = new MutationWaterfallMapper(
1941
+ dataHolder.mutationWaterfallInnerRadius,
1942
+ this.settings.rings.mutationWaterfallRingWidth,
1943
+ this.reference,
1944
+ dataHolder.mutationWaterfallLogRange,
1945
+ this.settings.Disco.mutationWaterfallColor || "#4d4d4d"
1946
+ );
1947
+ const waterfallData = mutationWaterfallMapper.map(dataHolder.mutationWaterfallData);
1948
+ if (waterfallData.length > 0) {
1949
+ this.mutationWaterfallRing = new Ring(
1950
+ dataHolder.mutationWaterfallInnerRadius,
1951
+ this.settings.rings.mutationWaterfallRingWidth,
1952
+ waterfallData
1953
+ );
1954
+ }
1955
+ }
1956
+ const fusionMapper = new FusionMapper(dataHolder.fusionRadius, this.sampleName, this.reference);
1957
+ const fusions = fusionMapper.map(dataHolder.fusionData);
1958
+ let lohLegend;
1959
+ if (this.settings.legend.lohLegendEnabled && dataHolder.lohMinValue && dataHolder.lohMaxValue) {
1960
+ lohLegend = new LohLegend(dataHolder.lohMinValue, dataHolder.lohMaxValue);
1961
+ }
1962
+ const legend = new Legend(
1963
+ this.settings.legend.snvTitle,
1964
+ this.settings.legend.cnvTitle,
1965
+ this.settings.legend.lohTitle,
1966
+ this.settings.legend.fusionTitle,
1967
+ this.settings.Disco.cnvPercentile,
1968
+ this.settings.Disco.cnvCutoffMode,
1969
+ this.snvArcsMapper ? this.snvArcsMapper.snvClassMap : /* @__PURE__ */ new Map(),
1970
+ this.cnvArcsMapper ? this.cnvArcsMapper.cnvClassMap : /* @__PURE__ */ new Map(),
1971
+ this.settings.Disco.cnvRenderingType,
1972
+ fusions.length > 0,
1973
+ this.discoInteractions,
1974
+ lohLegend,
1975
+ this.settings.Disco.mutationWaterfallPlot && this.mutationWaterfallRing ? {
1976
+ color: this.settings.Disco.mutationWaterfallColor || "#4d4d4d",
1977
+ onColorChange: this.discoInteractions.onMutationWaterfallColorChange
1978
+ } : void 0
1979
+ );
1980
+ const rings = new Rings(
1981
+ labelsRing,
1982
+ chromosomesRing,
1983
+ this.nonExonicArcRing,
1984
+ this.snvArcRing,
1985
+ this.cnvArcRing,
1986
+ this.lohArcRing,
1987
+ this.mutationWaterfallRing
1988
+ );
1989
+ return new ViewModel(
1990
+ this.settings,
1991
+ rings,
1992
+ legend,
1993
+ fusions,
1994
+ dataHolder,
1995
+ this.genesetName,
1996
+ data.filter((i) => i.dt == dtsnvindel).length
1997
+ );
1998
+ }
1999
+ };
2000
+
2001
+ // plots/disco/viewmodel/ViewModelMapper.ts
2002
+ var ViewModelMapper = class {
2003
+ static {
2004
+ this.snvClassLayer = {
2005
+ M: "exonic",
2006
+ E: "exonic",
2007
+ F: "exonic",
2008
+ N: "exonic",
2009
+ S: "exonic",
2010
+ D: "exonic",
2011
+ I: "exonic",
2012
+ P: "exonic",
2013
+ L: "exonic",
2014
+ Utr3: "exonic",
2015
+ Utr5: "exonic",
2016
+ ProteinAltering: "exonic",
2017
+ mnv: "non-exonic",
2018
+ ITD: "non-exonic",
2019
+ insertion: "non-exonic",
2020
+ deletion: "non-exonic",
2021
+ Intron: "non-exonic",
2022
+ X: "non-exonic",
2023
+ noncoding: "non-exonic"
2024
+ };
2025
+ }
2026
+ constructor(settings, discoInteractions) {
2027
+ this.settings = JSON.parse(JSON.stringify(settings));
2028
+ this.discoInteractions = discoInteractions;
2029
+ }
2030
+ applyRadius() {
2031
+ const radius = this.settings.Disco.radius;
2032
+ if (!radius) return;
2033
+ const scale = radius / this.settings.rings.labelLinesInnerRadius;
2034
+ this.settings.rings.labelLinesInnerRadius *= scale;
2035
+ this.settings.rings.labelsToLinesDistance *= scale;
2036
+ this.settings.rings.chromosomeInnerRadius *= scale;
2037
+ this.settings.rings.chromosomeWidth *= scale;
2038
+ this.settings.rings.nonExonicRingWidth *= scale;
2039
+ this.settings.rings.snvRingWidth *= scale;
2040
+ this.settings.rings.lohRingWidth *= scale;
2041
+ this.settings.rings.cnvRingWidth *= scale;
2042
+ this.settings.rings.mutationWaterfallRingWidth *= scale;
2043
+ this.settings.label.fontSize *= scale;
2044
+ this.settings.legend.fontSize *= scale;
2045
+ }
2046
+ map(opts) {
2047
+ const chrSizes = opts.args.genome.majorchr;
2048
+ const chromosomesOverride = {};
2049
+ for (const chr of Object.keys(chrSizes)) {
2050
+ if (!this.settings.Disco.hiddenChromosomes.includes(chr)) {
2051
+ chromosomesOverride[chr] = chrSizes[chr];
2052
+ }
2053
+ }
2054
+ const sampleName = opts.args.sampleName;
2055
+ const genome = opts.args.genome;
2056
+ const prioritizedGenes = genome?.geneset?.[0] ? genome.geneset[0].lst : [];
2057
+ const genesetName = genome?.geneset?.[0] ? genome.geneset[0].name : "";
2058
+ const data = opts.args.data;
2059
+ this.applyRadius();
2060
+ const reference = new Reference(this.settings, chrSizes, chromosomesOverride);
2061
+ const dataMapper = new DataMapper(this.settings, reference, sampleName, prioritizedGenes);
2062
+ return new ViewModelProvider(
2063
+ this.settings,
2064
+ dataMapper,
2065
+ reference,
2066
+ sampleName,
2067
+ genesetName,
2068
+ this.discoInteractions
2069
+ ).map(data);
2070
+ }
2071
+ };
2072
+
2073
+ // plots/disco/legend/LegendJSONMapper.ts
2074
+ var LegendJSONMapper = class {
2075
+ constructor(cappedCnvMaxAbsValue) {
2076
+ this.cappedCnvMaxAbsValue = cappedCnvMaxAbsValue;
2077
+ }
2078
+ map(legend) {
2079
+ const legendJSON = [];
2080
+ let order = 0;
2081
+ if (legend.snvClassMap) {
2082
+ this.mapSnv(legend, legendJSON, order++);
2083
+ }
2084
+ if (legend.cnvRenderingType == "heatmap" /* heatmap */) {
2085
+ this.mapCnvHeatmap(legend, legendJSON, order++);
2086
+ } else if (legend.cnvRenderingType == "bar" /* bar */) {
2087
+ if (legend.cnvClassMap) {
2088
+ this.mapCnvBar(legend, legendJSON, order++);
2089
+ }
2090
+ }
2091
+ if (legend.lohLegend) {
2092
+ this.mapLoh(legend, legendJSON, order++);
2093
+ }
2094
+ if (legend.fusionLegend) {
2095
+ this.mapFusion(legend, legendJSON, order++);
2096
+ }
2097
+ if (legend.mutationWaterfallLegend) {
2098
+ this.mapMutationWaterfall(legend, legendJSON, order++);
2099
+ }
2100
+ return legendJSON;
2101
+ }
2102
+ mapSnv(legend, legendJSON, order) {
2103
+ const snvItems = [];
2104
+ let snvOrder = 0;
2105
+ for (const [snvKey, snvLegendElement] of legend.snvClassMap) {
2106
+ snvItems.push({
2107
+ termid: legend.snvTitle,
2108
+ key: snvKey,
2109
+ text: `${snvLegendElement.snvType} (${snvLegendElement.count})`,
2110
+ color: snvLegendElement.color,
2111
+ order: snvOrder++,
2112
+ border: "1px solid #ccc"
2113
+ });
2114
+ }
2115
+ legendJSON.push({
2116
+ name: legend.snvTitle,
2117
+ order,
2118
+ items: snvItems
2119
+ });
2120
+ }
2121
+ mapCnvBar(legend, legendJSON, order) {
2122
+ if (!legend.cnvClassMap) return;
2123
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2124
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2125
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2126
+ if (gain && loss && cap) {
2127
+ let cnvOrder = 0;
2128
+ const cnvItems = [];
2129
+ if (gain.value > 0) {
2130
+ cnvItems.push({
2131
+ termid: legend.cnvTitle,
2132
+ key: 1 /* Gain */,
2133
+ text: `Max: ${gain.value}`,
2134
+ color: gain.color,
2135
+ order: cnvOrder++,
2136
+ border: "1px solid #ccc"
2137
+ });
2138
+ }
2139
+ if (loss.value < 0) {
2140
+ cnvItems.push({
2141
+ termid: legend.cnvTitle,
2142
+ key: 0 /* Loss */,
2143
+ text: `Min: ${loss.value}`,
2144
+ color: loss.color,
2145
+ order: cnvOrder++,
2146
+ border: "1px solid #ccc"
2147
+ });
2148
+ }
2149
+ cnvItems.push({
2150
+ termid: legend.cnvTitle,
2151
+ key: 2 /* Cap */,
2152
+ text: `Capping: ${cap.value}`,
2153
+ color: cap.color,
2154
+ order: cnvOrder++,
2155
+ border: "1px solid #ccc"
2156
+ // ,
2157
+ // onClickCallback: this.onClickCallback
2158
+ });
2159
+ legendJSON.push({
2160
+ name: legend.cnvTitle,
2161
+ id: "sjpp-disco-cnv-legend",
2162
+ order,
2163
+ items: cnvItems
2164
+ });
2165
+ }
2166
+ }
2167
+ mapCnvHeatmap(legend, legendJSON, order) {
2168
+ if (!legend.cnvClassMap) return;
2169
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2170
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2171
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2172
+ if (gain && loss && cap) {
2173
+ let cnvOrder = 0;
2174
+ const cnvItems = [];
2175
+ const base = {
2176
+ termid: legend.cnvTitle,
2177
+ width: 100,
2178
+ order: cnvOrder++,
2179
+ isLegendItem: true,
2180
+ dt: 4
2181
+ };
2182
+ if (gain.value > 0 && loss.value < 0) {
2183
+ const maxValue = Math.max(Math.abs(loss.value), gain.value);
2184
+ const domain = [-maxValue, 0, maxValue];
2185
+ cnvItems.push(
2186
+ Object.assign(
2187
+ {
2188
+ key: 3 /* LossGain */,
2189
+ domain,
2190
+ scale: linear([-1, 0, 1], [loss.color, "white", gain.color]),
2191
+ labels: { left: "Loss", right: "Gain" },
2192
+ numericInputs: {
2193
+ cutoffMode: legend.cnvCutoffMode,
2194
+ defaultPercentile: legend.cnvPercentile,
2195
+ callback: (obj) => legend.discoInteractions.colorScaleNumericInputsCallback(obj)
2196
+ }
2197
+ },
2198
+ base
2199
+ )
2200
+ );
2201
+ } else {
2202
+ if (gain.value > 0) {
2203
+ cnvItems.push(
2204
+ Object.assign(
2205
+ {
2206
+ key: 1 /* Gain */,
2207
+ text: "Copy number gain",
2208
+ domain: [0, gain.value],
2209
+ scale: linear([0, 1], ["white", gain.color])
2210
+ },
2211
+ base
2212
+ )
2213
+ );
2214
+ }
2215
+ if (loss.value < 0) {
2216
+ cnvItems.push(
2217
+ Object.assign(
2218
+ {
2219
+ key: 0 /* Loss */,
2220
+ text: "Copy number loss",
2221
+ domain: [loss.value, 0],
2222
+ scale: linear([0, 1], [loss.color, "white"])
2223
+ },
2224
+ base
2225
+ )
2226
+ );
2227
+ }
2228
+ }
2229
+ legendJSON.push({
2230
+ name: legend.cnvTitle,
2231
+ order,
2232
+ id: "sjpp-disco-cnv-legend",
2233
+ items: cnvItems
2234
+ });
2235
+ }
2236
+ }
2237
+ mapLoh(legend, legendJSON, order) {
2238
+ if (!legend.lohLegend) return;
2239
+ const lohItems = [];
2240
+ lohItems.push({
2241
+ termid: legend.lohTitle,
2242
+ key: "min",
2243
+ text: "min",
2244
+ color: legend.lohLegend.colorStartValue,
2245
+ order: 0,
2246
+ border: "1px solid #ccc"
2247
+ });
2248
+ lohItems.push({
2249
+ termid: legend.lohTitle,
2250
+ key: "max",
2251
+ text: "max",
2252
+ color: legend.lohLegend.colorEndValue,
2253
+ order: 1,
2254
+ border: "1px solid #ccc"
2255
+ });
2256
+ legendJSON.push({
2257
+ name: legend.lohTitle,
2258
+ order,
2259
+ items: lohItems
2260
+ });
2261
+ }
2262
+ mapFusion(legend, legendJSON, order) {
2263
+ const fusionItems = [];
2264
+ fusionItems.push({
2265
+ termid: legend.fusionTitle,
2266
+ key: "#6A3D9A" /* Interchromosomal */,
2267
+ text: "Interchromosomal",
2268
+ color: "#6A3D9A" /* Interchromosomal */.valueOf(),
2269
+ order: 0,
2270
+ border: "1px solid #ccc"
2271
+ });
2272
+ fusionItems.push({
2273
+ termid: legend.fusionTitle,
2274
+ key: "#1B9E77" /* Intrachromosomal */,
2275
+ text: "Intrachromosomal",
2276
+ color: "#1B9E77" /* Intrachromosomal */.valueOf(),
2277
+ order: 1,
2278
+ border: "1px solid #ccc"
2279
+ });
2280
+ legendJSON.push({
2281
+ name: legend.fusionTitle,
2282
+ order,
2283
+ items: fusionItems
2284
+ });
2285
+ }
2286
+ mapMutationWaterfall(legend, legendJSON, order) {
2287
+ if (!legend.mutationWaterfallLegend) return;
2288
+ const waterfallItems = [];
2289
+ waterfallItems.push({
2290
+ termid: "Mutation Waterfall Plot",
2291
+ key: "mutation-waterfall-color",
2292
+ text: "Dot color",
2293
+ color: legend.mutationWaterfallLegend.color,
2294
+ order: 0,
2295
+ colorPicker: true,
2296
+ inputWidth: 28,
2297
+ width: 0,
2298
+ onColorChange: legend.mutationWaterfallLegend.onColorChange
2299
+ });
2300
+ waterfallItems.push({
2301
+ termid: "Mutation Waterfall Plot",
2302
+ key: "mutation-waterfall-axis",
2303
+ text: "Axis: log10 intermutation distance",
2304
+ order: 1,
2305
+ skipIcon: true,
2306
+ width: 0
2307
+ });
2308
+ legendJSON.push({
2309
+ name: "Mutation Waterfall Plot",
2310
+ order,
2311
+ items: waterfallItems
2312
+ });
2313
+ }
2314
+ };
2315
+
2316
+ // plots/disco/cnv/renderCnvSourceLegend.ts
2317
+ function parseSetLabel(set, index) {
2318
+ let text = set.name || `Set ${index + 1}`;
2319
+ let href;
2320
+ let target = "_blank";
2321
+ if (set.nameHtml) {
2322
+ const parser = new DOMParser();
2323
+ const doc = parser.parseFromString(set.nameHtml, "text/html");
2324
+ const anchor = doc.querySelector("a");
2325
+ if (anchor) {
2326
+ href = anchor.getAttribute("href") || void 0;
2327
+ target = anchor.getAttribute("target") || "_blank";
2328
+ text = anchor.textContent?.trim() || text;
2329
+ } else {
2330
+ text = doc.body.textContent?.trim() || text;
2331
+ }
2332
+ }
2333
+ return { text, href, target };
2334
+ }
2335
+ function renderCnvSourceLegend(legendG, datasets, fontSize, onChange) {
2336
+ if (!legendG || legendG.empty()) throw new Error("legendG is required");
2337
+ if (!datasets || datasets.length === 0) throw new Error("at least one dataset is required");
2338
+ legendG.select("g.sjpp-cnv-source").remove();
2339
+ const gBBox = legendG.node().getBBox();
2340
+ const cnvSrcWrapper = legendG.append("g").attr("class", "sjpp-cnv-source").attr("transform", `translate(${gBBox.width},${gBBox.y + fontSize})`);
2341
+ const btnPaddingX = Math.round(fontSize * 0.8);
2342
+ const btnHgt = Math.round(fontSize * 1.8);
2343
+ const btnWrapper = cnvSrcWrapper.append("g").attr("transform", `translate(${fontSize},${-btnHgt / 2})`).style("cursor", "pointer").on("click", function(event) {
2344
+ event.stopPropagation();
2345
+ showCnvMenu(this);
2346
+ });
2347
+ const btnText = btnWrapper.append("text").attr("x", 0).attr("y", btnHgt / 2).attr("font-size", fontSize).attr("text-anchor", "start").attr("dominant-baseline", "middle").text("Select source \u25B2".toUpperCase());
2348
+ const textW = btnText.node() ? Math.ceil(btnText.node().getBBox().width) : 0;
2349
+ const btnWdt = textW + btnPaddingX * 2;
2350
+ btnWrapper.insert("rect", ":first-child").attr("width", btnWdt).attr("height", btnHgt).attr("rx", 10).attr("ry", 10).style("fill", "#f2f2f2");
2351
+ btnText.attr("x", btnWdt / 2).attr("text-anchor", "middle");
2352
+ const cnvMenu = new Menu({
2353
+ onHide: () => {
2354
+ btnText.text("Select source \u25B2".toUpperCase());
2355
+ }
2356
+ });
2357
+ function showCnvMenu(dom) {
2358
+ btnText.text("Select source \u25BC".toUpperCase());
2359
+ cnvMenu.clear().showunder(dom);
2360
+ cnvMenu.d.append("div").text("Choose data source for CNV:").style("margin", "5px 5px 0 5px");
2361
+ const tableHolder = cnvMenu.d.append("div").style("padding", "5px");
2362
+ const { columns, rows } = buildTableData(datasets);
2363
+ const [, activeIndex] = getActiveDataset(datasets);
2364
+ renderTable({
2365
+ columns,
2366
+ rows,
2367
+ div: tableHolder,
2368
+ singleMode: true,
2369
+ maxWidth: "70vw",
2370
+ maxHeight: "60vh",
2371
+ selectedRows: [activeIndex],
2372
+ header: { allowSort: false },
2373
+ noButtonCallback: (rowIndex, node) => {
2374
+ const inputIndex = Number(node?.value);
2375
+ const selectedIndex = Number.isNaN(inputIndex) ? rowIndex : inputIndex;
2376
+ if (!Number.isNaN(selectedIndex)) onChange(selectedIndex);
2377
+ cnvMenu.hide();
2378
+ }
2379
+ });
2380
+ }
2381
+ }
2382
+ function getActiveDataset(datasets) {
2383
+ let currentIndex = datasets.findIndex((d) => d.inuse);
2384
+ if (currentIndex == -1) currentIndex = 0;
2385
+ return [datasets[currentIndex], currentIndex];
2386
+ }
2387
+ function buildTableData(datasets) {
2388
+ const attrKeys = [];
2389
+ for (const set of datasets) {
2390
+ if (!set.attrs) continue;
2391
+ for (const key of Object.keys(set.attrs)) {
2392
+ if (!attrKeys.includes(key)) attrKeys.push(key);
2393
+ }
2394
+ }
2395
+ const columns = [{ label: "Source" }];
2396
+ for (const key of attrKeys) columns.push({ label: key });
2397
+ const rows = datasets.map((set, index) => {
2398
+ const sourceInfo = parseSetLabel(set, index);
2399
+ const cells = [];
2400
+ if (set.nameHtml) cells.push({ html: set.nameHtml });
2401
+ else if (sourceInfo.href) cells.push({ value: sourceInfo.text, url: sourceInfo.href });
2402
+ else cells.push({ value: sourceInfo.text });
2403
+ for (const key of attrKeys) {
2404
+ const value = set.attrs?.[key];
2405
+ cells.push({ value: value ?? "" });
2406
+ }
2407
+ return cells;
2408
+ });
2409
+ return { columns, rows };
2410
+ }
2411
+
2412
+ // plots/disco/legend/LegendRenderer.ts
2413
+ var LegendRenderer = class {
2414
+ constructor(cappedCnvMaxAbsValue = 0, fontSize) {
2415
+ this.fontSize = fontSize;
2416
+ this.legendJSONMapper = new LegendJSONMapper(cappedCnvMaxAbsValue);
2417
+ }
2418
+ render(holder, legend, xOffset, svgw, svgh, viewModel, onCnvSourceSelect) {
2419
+ const svgLegendRenderer = svgLegend({
2420
+ holder: holder.append("g").attr("data-testid", "sjpp_disco_plot_legend"),
2421
+ rectFillFxn: (d2) => d2.color,
2422
+ iconStroke: "#aaa"
2423
+ });
2424
+ const data = this.legendJSONMapper.map(legend);
2425
+ const legendTitles = data.map((d2) => d2.name.trim());
2426
+ const maxLabelWidth = getMaxLabelWidth(holder, legendTitles);
2427
+ const d = {
2428
+ xOffset: maxLabelWidth + xOffset
2429
+ };
2430
+ svgLegendRenderer(data, {
2431
+ settings: Object.assign(
2432
+ {},
2433
+ {
2434
+ svgw,
2435
+ svgh,
2436
+ dimensions: d,
2437
+ fontsize: this.fontSize
2438
+ }
2439
+ )
2440
+ });
2441
+ const altCnv = viewModel.appState.args.alternativeDataByDt?.[dtcnv];
2442
+ if (altCnv && altCnv.length > 0) {
2443
+ const legendG = holder.select('g[data-testid="sjpp_disco_plot_legend"]');
2444
+ const cnvLegendG = legendG.select("#sjpp-disco-cnv-legend");
2445
+ if (!legendG.empty()) {
2446
+ const add2G = cnvLegendG.empty() ? legendG : cnvLegendG;
2447
+ renderCnvSourceLegend(add2G, altCnv, this.fontSize, onCnvSourceSelect);
2448
+ }
2449
+ }
2450
+ }
2451
+ };
2452
+
2453
+ // plots/disco/chromosome/ChromosomesRenderer.ts
2454
+ var ChromosomesRenderer = class {
2455
+ constructor(padAngle, innerRadius, outerRadius, fontSize) {
2456
+ this.padAngle = padAngle;
2457
+ this.innerRadius = innerRadius;
2458
+ this.outerRadius = outerRadius;
2459
+ this.fontSize = fontSize;
2460
+ }
2461
+ render(holder, elements) {
2462
+ const pie = pie_default().padAngle(this.padAngle).value((d) => d.size).sort(null);
2463
+ const arcData = pie(elements);
2464
+ const arc = arc_default().innerRadius(this.innerRadius).outerRadius(this.outerRadius);
2465
+ const arcs = holder.append("g").attr("data-testid", "sjpp_chromosomes_arc_group");
2466
+ const menu = MenuProvider.create();
2467
+ arcs.selectAll("path").data(arcData).enter().append("path").attr("d", arc).attr("fill", "black").on("mousemove", (event, d) => {
2468
+ const [x, y] = pointer_default(event, arcs.node());
2469
+ let angle = Math.atan2(y, x) + Math.PI / 2;
2470
+ if (angle < 0) angle += 2 * Math.PI;
2471
+ const frac = Math.max(0, Math.min(1, (angle - d.data.startAngle) / (d.data.endAngle - d.data.startAngle)));
2472
+ const pos = Math.round(frac * d.data.size);
2473
+ menu.d.html(`<span style="font-size:.8em">chr${d.data.text}</span> ${bplen(pos)}`).style("padding", "5px");
2474
+ menu.show(event.x, event.y);
2475
+ }).on("mouseenter", (event) => {
2476
+ select_default(event.currentTarget).attr("stroke", "orange").attr("stroke-width", 1);
2477
+ }).on("mouseleave", (event) => {
2478
+ select_default(event.currentTarget).attr("stroke", null).attr("stroke-width", null);
2479
+ menu.hide();
2480
+ });
2481
+ arcs.selectAll("text").data(arcData).enter().append("text").attr("transform", (d) => {
2482
+ return `translate(${arc.centroid(d)}) rotate(${d.data.angle * 180 / Math.PI - 90})${d.data.angle > Math.PI ? "rotate(180)" : ""}`;
2483
+ }).attr("dy", "0.35em").attr("text-anchor", "middle").text((d) => d.data.text).style("fill", "white").style("font-size", `${this.fontSize}px`).style("padding", "500px").style("pointer-events", "none").style("padding", "500px");
2484
+ }
2485
+ };
2486
+
2487
+ // plots/disco/snv/vafTooltip.ts
2488
+ function getIntegerCount(v) {
2489
+ if (Number.isInteger(v)) return v;
2490
+ if (typeof v == "string" && /^-?\d+$/.test(v)) {
2491
+ const n = Number(v);
2492
+ if (Number.isInteger(n)) return n;
2493
+ }
2494
+ return null;
2495
+ }
2496
+ function hasValidReadCounts(refCountValue, altCountValue) {
2497
+ const refCount = getIntegerCount(refCountValue);
2498
+ const altCount = getIntegerCount(altCountValue);
2499
+ return refCount != null && altCount != null && refCount >= 0 && altCount >= 0 && refCount + altCount > 0;
2500
+ }
2501
+ function getVafEntries(vafs) {
2502
+ const entries = [];
2503
+ if (Array.isArray(vafs)) {
2504
+ for (const vaf of vafs) {
2505
+ const label = vaf?.id || vaf?.name;
2506
+ const refCount = vaf?.refCount;
2507
+ const altCount = vaf?.altCount;
2508
+ if (!label || refCount == null || altCount == null) continue;
2509
+ entries.push({ label, refCount, altCount });
2510
+ }
2511
+ }
2512
+ return entries;
2513
+ }
2514
+ function hasAnyValidVafEntry(vafs) {
2515
+ return getVafEntries(vafs).some((vaf) => hasValidReadCounts(vaf.refCount, vaf.altCount));
2516
+ }
2517
+ function appendVafBar(td2, refCountValue, altCountValue, label = "VAF") {
2518
+ const refCount = getIntegerCount(refCountValue);
2519
+ const altCount = getIntegerCount(altCountValue);
2520
+ if (refCount == null || altCount == null) return;
2521
+ const totalCount = refCount + altCount;
2522
+ const fraction = altCount / totalCount;
2523
+ const div = td2.append("div").style("margin-left", "5px").style("margin-top", "4px").style("display", "flex").style("align-items", "center").style("gap", "6px");
2524
+ div.append("span").style("font-size", "0.8em").style("color", "#555").text(label);
2525
+ fillbar(div, { f: fraction, v1: altCount, v2: totalCount });
2526
+ }
2527
+ function appendVafBars(td2, vafs) {
2528
+ for (const vaf of getVafEntries(vafs)) {
2529
+ if (!hasValidReadCounts(vaf.refCount, vaf.altCount)) continue;
2530
+ appendVafBar(td2, vaf.refCount, vaf.altCount, vaf.label);
2531
+ }
2532
+ }
2533
+
2534
+ // plots/disco/label/LabelsRenderer.ts
2535
+ var LabelsRenderer = class {
2536
+ constructor(animationDuration, fontSize, geneClickListener) {
2537
+ this.animationDuration = animationDuration;
2538
+ this.fontSize = fontSize;
2539
+ this.geneClickListener = geneClickListener;
2540
+ }
2541
+ render(holder, elements, collisions) {
2542
+ const labelsG = holder.append("g");
2543
+ const lineFunction = line_default().x((point) => point.x).y((point) => point.y);
2544
+ const menu = MenuProvider.create();
2545
+ labelsG.selectAll(".group").data(elements).enter().append("g").attr("class", "group").each((label, i, nodes) => {
2546
+ const g = select_default(nodes[i]);
2547
+ g.append("text").attr("class", "chord-text").attr("dy", ".35em").attr("transform", label.transform).style("text-anchor", label.textAnchor).style("font-size", `${this.fontSize}px`).style("fill", label.color).style("cursor", "pointer").text(label.text).on("click", () => {
2548
+ if (label.mutationsTooltip) {
2549
+ this.geneClickListener(
2550
+ label.text,
2551
+ label.mutationsTooltip.map((value) => value.mname)
2552
+ );
2553
+ }
2554
+ }).on("mouseover", (mouseEvent) => {
2555
+ const table = table2col({ holder: menu.d });
2556
+ this.createTooltip(table, label);
2557
+ menu.show(mouseEvent.x, mouseEvent.y);
2558
+ }).on("mouseout", () => {
2559
+ menu.clear();
2560
+ menu.hide();
2561
+ });
2562
+ g.append("path").attr("class", "chord-tick").datum(label.line.points).style("stroke", label.color).style("fill", "none").attr("d", lineFunction);
2563
+ });
2564
+ labelsG.selectAll(".group").each((label, i, nodes) => {
2565
+ const collision = collisions ? collisions.find((l) => l.text === label.text) : void 0;
2566
+ if (collision) {
2567
+ const g = select_default(nodes[i]);
2568
+ g.selectAll(".chord-text").datum(collision).transition().duration(this.animationDuration).attr("transform", collision.transform).style("text-anchor", collision.textAnchor);
2569
+ g.selectAll(".chord-tick").datum(collision.line.points).transition().duration(this.animationDuration).style("fill", "none").attr("d", lineFunction);
2570
+ }
2571
+ });
2572
+ }
2573
+ createTooltip(table, label) {
2574
+ if (label.mutationsTooltip) {
2575
+ const [td1, td2] = table.addRow();
2576
+ td1.text("Gene");
2577
+ td2.append("span").style("margin-left", "5px").text(label.text);
2578
+ label.mutationsTooltip.forEach((mutation) => {
2579
+ {
2580
+ const [td12, td22] = table.addRow();
2581
+ td12.text("Mutation");
2582
+ td22.append("span").style("margin-left", "5px").text(mutation.mname).append("span").style("margin-left", "5px").style("color", mutation.color).text(`${mutation.dataClass}`).append("span").style("margin-left", "5px").style("color", "black").style("font-size", "0.8em").text(` ${mutation.chr}:${mutation.position}`);
2583
+ if (hasAnyValidVafEntry(mutation.vafs)) {
2584
+ appendVafBars(td22, mutation.vafs);
2585
+ }
2586
+ }
2587
+ });
2588
+ }
2589
+ if (label.fusionTooltip) {
2590
+ const [td1, td2] = table.addRow();
2591
+ td1.text("Data type");
2592
+ td2.append("span").text("Fusion transcript");
2593
+ label.fusionTooltip.forEach((fusionTooltip) => {
2594
+ const [td12, td22] = table.addRow();
2595
+ td12.text("Position");
2596
+ td22.append("span").text(
2597
+ ` ${fusionTooltip.geneA ? fusionTooltip.geneA : "?"} ${fusionTooltip.chrA}:${fusionTooltip.posA}
2598
+ ${fusionTooltip.strandA == "+" ? "forward" : "reverse"} > ${fusionTooltip.geneB ? fusionTooltip.geneB : "?"} ${fusionTooltip.chrB}:${fusionTooltip.posB} ${fusionTooltip.strandB == "+" ? "forward" : "reverse"} `
2599
+ );
2600
+ });
2601
+ }
2602
+ if (label.cnvTooltip) {
2603
+ label.cnvTooltip.forEach((cnv) => {
2604
+ const [td1, td2] = table.addRow();
2605
+ td1.text("CNV");
2606
+ td2.append("span").style("margin-left", "5px").style("background-color", cnv.color).html("&nbsp;&nbsp;");
2607
+ td2.append("span").style("margin-left", "7.5px").text(cnv.value).append("span").style("margin-left", "7.5px").style("font-size", "0.8em").text(`${cnv.chr}:${cnv.start}-${cnv.stop}`);
2608
+ });
2609
+ }
2610
+ }
2611
+ };
2612
+
2613
+ // plots/disco/defaults.ts
2614
+ function discoDefaults(overrides = {}, app) {
2615
+ const hiddenChromosomes = [];
2616
+ if (app?.vocabApi?.termdbConfig?.queries?.singleSampleMutation?.discoPlot?.skipChrM) {
2617
+ hiddenChromosomes.push("chrM");
2618
+ }
2619
+ const defaults = {
2620
+ downloadImgName: "disco.plot",
2621
+ Disco: {
2622
+ centerText: null,
2623
+ cnvCapping: 5,
2624
+ isOpen: false,
2625
+ prioritizeGeneLabelsByGeneSets: false,
2626
+ showPrioritizeGeneLabelsByGeneSets: false,
2627
+ mutationWaterfallPlot: false,
2628
+ mutationWaterfallColor: "#4d4d4d",
2629
+ cnvRenderingType: "heatmap" /* heatmap */,
2630
+ cnvPercentile: 90,
2631
+ // 90th percentile for removing outliers
2632
+ cnvCutoffMode: "percentile",
2633
+ radius: 300,
2634
+ fusionOpacity: 1,
2635
+ hiddenChromosomes
2636
+ },
2637
+ rings: {
2638
+ nonExonicRingWidth: 20,
2639
+ snvRingWidth: 20,
2640
+ lohRingWidth: 20,
2641
+ cnvRingWidth: 30,
2642
+ mutationWaterfallRingWidth: 35,
2643
+ snvRingFilters: ["exonic"],
2644
+ chromosomeInnerRadius: 190,
2645
+ chromosomeWidth: 20,
2646
+ labelLinesInnerRadius: 210,
2647
+ labelsToLinesDistance: 30,
2648
+ labelsToLinesGap: 2,
2649
+ nonExonicRingEnabled: true,
2650
+ nonExonicFilterValues: ["non-exonic"]
2651
+ },
2652
+ verticalPadding: 70,
2653
+ horizontalPadding: 500,
2654
+ layerScaler: 1,
2655
+ padAngle: 2e-3,
2656
+ //0.01, //0.04,
2657
+ label: {
2658
+ fontSize: 12,
2659
+ maxDeltaAngle: 0.05,
2660
+ animationDuration: 1e3,
2661
+ overlapAngleFactor: 5
2662
+ // 5 is set by testing, because label height is not known before rendering
2663
+ },
2664
+ cnv: {
2665
+ capping: 5,
2666
+ percentile: 80,
2667
+ ampColor: "#D6683C",
2668
+ lossColor: "#67a9cf",
2669
+ cappedAmpColor: "#8B0000",
2670
+ cappedLossColor: "#00008B",
2671
+ unit: "Unit"
2672
+ },
2673
+ snv: {
2674
+ maxMutationCount: 1e4
2675
+ },
2676
+ legend: {
2677
+ snvTitle: "SNV",
2678
+ cnvTitle: "CNV",
2679
+ lohTitle: "LOH",
2680
+ fusionTitle: "SV",
2681
+ // Structural Variants (color by co-location)
2682
+ lohLegendEnabled: true,
2683
+ fontSize: 12,
2684
+ rowHeight: 48
2685
+ },
2686
+ menu: {
2687
+ padding: 5
2688
+ }
2689
+ };
2690
+ if (overrides?.Disco?.radius > 1e3 || overrides?.Disco?.radius < 300) {
2691
+ console.log(`${overrides?.Disco?.radius} is greater or lower than the min and max for the radius`);
2692
+ }
2693
+ return copyMerge(defaults, overrides);
2694
+ }
2695
+
2696
+ // plots/disco/snv/NonExonicSnvRenderer.ts
2697
+ var NonExonicSnvRenderer = class {
2698
+ constructor(geneClickListener) {
2699
+ this.geneClickListener = geneClickListener;
2700
+ }
2701
+ render(holder, elements) {
2702
+ const arcGenerator = arc_default();
2703
+ const arcs = holder.append("g");
2704
+ const menu = MenuProvider.create();
2705
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2706
+ const table = table2col({ holder: menu.d });
2707
+ const snv = structuredClone(arc);
2708
+ snv.dt = dtsnvindel;
2709
+ snv.class = arc.dataClass;
2710
+ snv.gene = snv.text;
2711
+ {
2712
+ const [td1, td2] = table.addRow();
2713
+ td1.text("Consequence");
2714
+ td2.append("span").text(snv.mname);
2715
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2716
+ }
2717
+ {
2718
+ const [td1, td2] = table.addRow();
2719
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2720
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2721
+ }
2722
+ if (snv.gene) {
2723
+ const [td1, td2] = table.addRow();
2724
+ td1.text("Gene");
2725
+ td2.text(snv.gene);
2726
+ }
2727
+ if (snv.occurrence > 1) {
2728
+ const [td1, td2] = table.addRow();
2729
+ td1.text("Occurrence");
2730
+ td2.text(snv.occurrence);
2731
+ }
2732
+ if (hasAnyValidVafEntry(arc.vafs)) {
2733
+ const [td1, td2] = table.addRow();
2734
+ td1.text("Read count");
2735
+ appendVafBars(td2, arc.vafs);
2736
+ }
2737
+ menu.show(mouseEvent.x, mouseEvent.y);
2738
+ }).on("mouseout", () => {
2739
+ menu.clear();
2740
+ menu.hide();
2741
+ }).on("click", (mouseEvent, arc) => {
2742
+ this.geneClickListener(arc.text, [arc.mname]);
2743
+ });
2744
+ }
2745
+ };
2746
+
2747
+ // plots/disco/snv/SnvRenderer.ts
2748
+ var SnvRenderer = class {
2749
+ constructor(svnWidth, geneClickListener) {
2750
+ this.svnWidth = svnWidth;
2751
+ this.geneClickListener = geneClickListener;
2752
+ }
2753
+ render(holder, elements) {
2754
+ if (elements.length > 0) {
2755
+ const svnInnerRadius = elements[0].innerRadius;
2756
+ const fullArcRenderer = new FullArcRenderer(svnInnerRadius, this.svnWidth, "#6464641A");
2757
+ fullArcRenderer.render(holder);
2758
+ }
2759
+ const arcGenerator = arc_default();
2760
+ const arcs = holder.append("g");
2761
+ const menu = MenuProvider.create();
2762
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2763
+ const table = table2col({ holder: menu.d });
2764
+ const snv = structuredClone(arc);
2765
+ snv.dt = dtsnvindel;
2766
+ snv.class = arc.dataClass;
2767
+ snv.gene = snv.text;
2768
+ {
2769
+ const [td1, td2] = table.addRow();
2770
+ td1.text("Consequence");
2771
+ td2.append("span").text(snv.mname);
2772
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2773
+ }
2774
+ {
2775
+ const [td1, td2] = table.addRow();
2776
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2777
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2778
+ }
2779
+ if (snv.gene) {
2780
+ const [td1, td2] = table.addRow();
2781
+ td1.text("Gene");
2782
+ td2.text(snv.gene);
2783
+ }
2784
+ if (snv.occurrence > 1) {
2785
+ const [td1, td2] = table.addRow();
2786
+ td1.text("Occurrence");
2787
+ td2.text(snv.occurrence);
2788
+ }
2789
+ if (hasAnyValidVafEntry(arc.vafs)) {
2790
+ const [td1, td2] = table.addRow();
2791
+ td1.text("Read count");
2792
+ appendVafBars(td2, arc.vafs);
2793
+ }
2794
+ menu.show(mouseEvent.x, mouseEvent.y);
2795
+ }).on("mouseout", () => {
2796
+ menu.clear();
2797
+ menu.hide();
2798
+ }).on("click", (mouseEvent, arc) => {
2799
+ this.geneClickListener(arc.text, [arc.mname]);
2800
+ });
2801
+ }
2802
+ };
2803
+
2804
+ // plots/disco/loh/LohRenderer.ts
2805
+ var LohRenderer = class {
2806
+ render(holder, elements) {
2807
+ const arcGenerator = arc_default();
2808
+ const arcs = holder.append("g");
2809
+ const menu = MenuProvider.create();
2810
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2811
+ const table = table2col({ holder: menu.d });
2812
+ const loh = structuredClone(arc);
2813
+ loh.dt = dtloh;
2814
+ loh.gene = loh.text;
2815
+ {
2816
+ const [td12, td22] = table.addRow();
2817
+ td12.text("Data type");
2818
+ td22.append("span").style("margin-left", "5px").text("Loss of Heterozygosity");
2819
+ }
2820
+ const [td1, td2] = table.addRow();
2821
+ td1.text("Position");
2822
+ td2.append("span").text(`${arc.chr}:${arc.start}-${arc.stop}`);
2823
+ menu.show(mouseEvent.x, mouseEvent.y);
2824
+ }).on("mouseout", () => {
2825
+ menu.clear();
2826
+ menu.hide();
2827
+ });
2828
+ }
2829
+ };
2830
+
2831
+ // plots/disco/cnv/CnvBarRenderer.ts
2832
+ var CnvBarRenderer = class {
2833
+ render(holder, elements) {
2834
+ const arcGenerator = arc_default();
2835
+ const arcs = holder.append("g");
2836
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
2837
+ const menu = MenuProvider.create();
2838
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2839
+ hoverOverlay.selectAll("*").remove();
2840
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
2841
+ const cnv = structuredClone(arc);
2842
+ cnv.dt = dtcnv;
2843
+ cnv.samples = [{ sample_id: arc.sampleName }];
2844
+ cnv.gene = cnv.text;
2845
+ const table = table2col({ holder: menu.d });
2846
+ {
2847
+ const [c1, c2] = table.addRow();
2848
+ c1.text("CNV");
2849
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span> ${cnv.value}`);
2850
+ }
2851
+ {
2852
+ const [c1, c2] = table.addRow();
2853
+ c1.text("Position");
2854
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
2855
+ }
2856
+ {
2857
+ const [c1, c2] = table.addRow();
2858
+ c1.text("Unit");
2859
+ c2.text(cnv.value);
2860
+ }
2861
+ menu.show(mouseEvent.x, mouseEvent.y);
2862
+ }).on("mouseout", () => {
2863
+ hoverOverlay.selectAll("*").remove();
2864
+ menu.clear();
2865
+ menu.hide();
2866
+ });
2867
+ }
2868
+ };
2869
+
2870
+ // plots/disco/cnv/CnvHeatmapRenderer.ts
2871
+ var CnvHeatmapRenderer = class {
2872
+ constructor(positivePercentile = 0, negativePercentile = 0) {
2873
+ this.positivePercentile = positivePercentile;
2874
+ this.negativePercentile = negativePercentile;
2875
+ }
2876
+ render(holder, elements) {
2877
+ const arcGenerator = arc_default();
2878
+ const arcs = holder.append("g");
2879
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
2880
+ const menu = MenuProvider.create();
2881
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => this.getColor(d.color, d.value)).on("mouseenter", (mouseEvent, arc) => {
2882
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
2883
+ const table = table2col({ holder: menu.d });
2884
+ const cnv = structuredClone(arc);
2885
+ cnv.dt = dtcnv;
2886
+ cnv.samples = [{ sample_id: arc.sampleName }];
2887
+ cnv.gene = cnv.text;
2888
+ {
2889
+ const [c1, c2] = table.addRow();
2890
+ c1.text("CNV");
2891
+ c2.html(
2892
+ `<span style="background:${this.getColor(
2893
+ cnv.color,
2894
+ cnv.value
2895
+ )}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span> ${cnv.value}`
2896
+ );
2897
+ }
2898
+ {
2899
+ const [c1, c2] = table.addRow();
2900
+ c1.text("Position");
2901
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
2902
+ }
2903
+ menu.show(mouseEvent.x, mouseEvent.y);
2904
+ }).on("mouseleave", () => {
2905
+ hoverOverlay.selectAll("*").remove();
2906
+ menu.clear();
2907
+ menu.hide();
2908
+ });
2909
+ }
2910
+ // Computes fill color using linear scale between -P80, 0, and +P80
2911
+ getColor(color, value) {
2912
+ const maxValue = Math.max(this.positivePercentile, Math.abs(this.negativePercentile));
2913
+ return linear(
2914
+ [-maxValue, 0, maxValue],
2915
+ [color, "white", color]
2916
+ // transitions to white in the middle
2917
+ ).clamp(true)(value);
2918
+ }
2919
+ };
2920
+
2921
+ // plots/disco/waterfall/MutationWaterfallRenderer.ts
2922
+ var MutationWaterfallRenderer = class {
2923
+ constructor(dotRadius = 1.5) {
2924
+ this.dotRadius = dotRadius;
2925
+ }
2926
+ render(holder, elements) {
2927
+ if (!elements.length) return;
2928
+ const ringGroup = holder.append("g").attr("data-testid", "sjpp_mutation_waterfall_ring");
2929
+ const menu = MenuProvider.create();
2930
+ ringGroup.append("g").selectAll("circle").data(elements).enter().append("circle").attr("cx", (d) => Math.cos(d.startAngle - Math.PI / 2) * d.innerRadius).attr("cy", (d) => Math.sin(d.startAngle - Math.PI / 2) * d.innerRadius).attr("r", this.dotRadius).attr("fill", (d) => d.color).attr("opacity", 0.9).on("mouseover", (event, d) => {
2931
+ const distance = Math.round(Math.pow(10, d.logDistance));
2932
+ menu.clear();
2933
+ const table = table2col({ holder: menu.d });
2934
+ {
2935
+ const [td1, td2] = table.addRow();
2936
+ td1.text("Intermutation distance");
2937
+ td2.text(`${bplen(distance)}`);
2938
+ }
2939
+ menu.show(event.x, event.y);
2940
+ }).on("mouseout", () => {
2941
+ menu.clear();
2942
+ menu.hide();
2943
+ });
2944
+ this.renderAxis(ringGroup, elements[0]);
2945
+ }
2946
+ renderAxis(holder, referencePoint) {
2947
+ const { ringInnerRadius, ringWidth, rangeMin, rangeMax } = referencePoint;
2948
+ const axisGroup = holder.append("g").attr("class", "sjpp-waterfall-axis");
2949
+ const topRadius = ringInnerRadius + ringWidth;
2950
+ axisGroup.append("line").attr("x1", 0).attr("y1", -topRadius).attr("x2", 0).attr("y2", -ringInnerRadius).attr("stroke", "#6e6e6e").attr("stroke-width", 1);
2951
+ const span = rangeMax - rangeMin || 1;
2952
+ const tickValues = rangeMax === rangeMin ? [rangeMin] : ticks(rangeMin, rangeMax, 4);
2953
+ tickValues.forEach((value) => {
2954
+ const ratio = (value - rangeMin) / span;
2955
+ const radius = ringInnerRadius + ringWidth * ratio;
2956
+ const y = -radius;
2957
+ axisGroup.append("line").attr("x1", -4).attr("x2", 4).attr("y1", y).attr("y2", y).attr("stroke", "#6e6e6e");
2958
+ const exponent = Math.round(value * 10) / 10;
2959
+ const formatted = Number.isInteger(exponent) ? `${exponent}` : exponent.toFixed(1);
2960
+ axisGroup.append("text").attr("x", 6).attr("y", y + 3).style("font-size", "10px").style("fill", "#4d4d4d").text(`10^${formatted} bp`);
2961
+ });
2962
+ }
2963
+ };
2964
+
2965
+ // plots/disco/Disco.ts
2966
+ var Disco = class {
2967
+ constructor(opts) {
2968
+ this.recreateViewModel = false;
2969
+ this.onCnvSourceSelect = (index) => {
2970
+ const state = this.app.getState();
2971
+ const args = state.args;
2972
+ const alt = args.alternativeDataByDt?.[dtcnv];
2973
+ if (!alt) return;
2974
+ const altClone = structuredClone(args.alternativeDataByDt);
2975
+ altClone[dtcnv].forEach((d, i) => d.inuse = i === index);
2976
+ const selected = altClone[dtcnv][index];
2977
+ selected.mlst.forEach((d) => d.position = d.pos);
2978
+ const baseData = args.data.filter((d) => d.dt != dtcnv && d.dt != dtloh);
2979
+ const newData = baseData.concat(selected.mlst);
2980
+ this.app.dispatch({
2981
+ type: "app_refresh",
2982
+ state: { args: { ...args, data: newData, alternativeDataByDt: altClone } }
2983
+ });
2984
+ };
2985
+ this.type = "Disco";
2986
+ this.opts = opts;
2987
+ this.isOpen = false;
2988
+ this.discoInteractions = new DiscoInteractions(this);
2989
+ }
2990
+ static {
2991
+ this.type = "Disco";
2992
+ }
2993
+ async init() {
2994
+ const state = this.app.getState();
2995
+ const settings = state.plots.find((p) => p.id === this.id).settings;
2996
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
2997
+ this.viewModel = this.stateViewModelMapper.map(state);
2998
+ const holder = this.opts.holder;
2999
+ const controlsHolder = holder.append("div").style("display", "inline-block").style("vertical-align", "top");
3000
+ const topbar = controlsHolder.append("div");
3001
+ const config_div = controlsHolder.append("div");
3002
+ const configInputsOptions = this.getConfigInputsOptions(this.viewModel);
3003
+ this.features = await multiInit({
3004
+ topbar: topBarInit({
3005
+ app: this.app,
3006
+ id: this.id,
3007
+ // TODO change the way svg is selected
3008
+ downloadHandler: () => this.discoInteractions.downloadClickListener(holder.select('svg[id="sjpp_disco_plot"]').node()),
3009
+ callback: () => this.toggleVisibility(this.isOpen),
3010
+ isOpen: () => this.isOpen,
3011
+ holder: topbar
3012
+ }),
3013
+ config: configUiInit({
3014
+ app: this.app,
3015
+ id: this.id,
3016
+ holder: config_div,
3017
+ isOpen: () => this.isOpen,
3018
+ inputs: configInputsOptions
3019
+ })
3020
+ });
3021
+ this.errorDiv = holder.append("div");
3022
+ }
3023
+ getConfigInputsOptions(viewModel) {
3024
+ const configInputsOptions = [];
3025
+ if (viewModel.settings.Disco.showPrioritizeGeneLabelsByGeneSets) {
3026
+ const filterMutationsGenesCheckbox = [
3027
+ {
3028
+ boxLabel: viewModel.genesetName,
3029
+ label: `Filter mutations`,
3030
+ type: "checkbox",
3031
+ chartType: "Disco",
3032
+ settingsKey: "prioritizeGeneLabelsByGeneSets",
3033
+ title: `Only show mutations for ${viewModel.genesetName} genes`
3034
+ }
3035
+ ];
3036
+ configInputsOptions.push(...filterMutationsGenesCheckbox);
3037
+ }
3038
+ if (viewModel.cnvMaxValue !== 0 || viewModel.cnvMinValue !== 0) {
3039
+ const cnvConfigInputOptions = [
3040
+ {
3041
+ boxLabel: "",
3042
+ label: "CNV rendering type",
3043
+ type: "radio",
3044
+ chartType: "Disco",
3045
+ settingsKey: "cnvRenderingType",
3046
+ title: "CNV rendering type",
3047
+ options: [
3048
+ { label: "Heatmap", value: "heatmap" /* heatmap */ },
3049
+ { label: "Bar", value: "bar" /* bar */ }
3050
+ ]
3051
+ }
3052
+ ];
3053
+ configInputsOptions.push(...cnvConfigInputOptions);
3054
+ }
3055
+ const genomeChr = this.app.opts.state.args.genome.majorchr;
3056
+ const chromosomeConfigOption = {
3057
+ label: "Chromosomes",
3058
+ title: "Chromosomes shown in the plot",
3059
+ type: "multiCheckbox",
3060
+ chartType: "Disco",
3061
+ settingsKey: "hiddenChromosomes",
3062
+ style: {
3063
+ colNum: 4
3064
+ },
3065
+ options: Object.keys(genomeChr).map((c) => ({ label: c, value: c })),
3066
+ processInput: (values = []) => {
3067
+ const reverse = Object.keys(genomeChr).filter((c) => !values.includes(c));
3068
+ return reverse;
3069
+ }
3070
+ };
3071
+ configInputsOptions.push(chromosomeConfigOption);
3072
+ const dimensionOptions = [
3073
+ {
3074
+ label: "Radius",
3075
+ title: "Set the radius of the entire plot, between 300 and 1000 pixels.",
3076
+ type: "number",
3077
+ chartType: "Disco",
3078
+ settingsKey: "radius",
3079
+ debounceInterval: 500,
3080
+ step: 25,
3081
+ min: 300,
3082
+ max: 1e3
3083
+ },
3084
+ {
3085
+ label: "Fusion opacity",
3086
+ title: "Adjust opacity of fusion arcs, between 0 and 1",
3087
+ type: "number",
3088
+ chartType: "Disco",
3089
+ settingsKey: "fusionOpacity",
3090
+ step: 0.01,
3091
+ min: 0,
3092
+ max: 1,
3093
+ debounceInterval: 500
3094
+ }
3095
+ ];
3096
+ configInputsOptions.push(...dimensionOptions);
3097
+ if (viewModel.canShowMutationWaterfallPlot && viewModel.snvDataLength > 0) {
3098
+ configInputsOptions.push({
3099
+ boxLabel: "",
3100
+ label: "Mutation Waterfall Plot",
3101
+ type: "checkbox",
3102
+ chartType: "Disco",
3103
+ settingsKey: "mutationWaterfallPlot",
3104
+ title: "Render log10 intermutation distance ring for SNV/indel data"
3105
+ });
3106
+ }
3107
+ return configInputsOptions;
3108
+ }
3109
+ async main() {
3110
+ const settings = this.state.settings;
3111
+ this.isOpen = settings.Disco.isOpen;
3112
+ if (this.recreateViewModel) {
3113
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3114
+ this.viewModel = this.stateViewModelMapper.map(this.app.getState());
3115
+ }
3116
+ this.recreateViewModel = true;
3117
+ if (this.viewModel) {
3118
+ const holder = this.opts.holder;
3119
+ holder.select('div[id="sjpp_disco_plot_holder_div"]').remove();
3120
+ const svgDiv = holder.append("div").attr("id", "sjpp_disco_plot_holder_div").style("display", "inline-block").style("position", "relative");
3121
+ const appState = this.app.getState();
3122
+ this.viewModel.svgDiv = svgDiv;
3123
+ this.viewModel.appState = appState;
3124
+ for (const name in this.features) {
3125
+ this.features[name].update({ state: this.state, appState });
3126
+ }
3127
+ const legendRenderer = new LegendRenderer(this.viewModel.cappedCnvMaxAbsValue, settings.label.fontSize);
3128
+ const discoRenderer = new DiscoRenderer(
3129
+ this.getRingRenderers(this.viewModel.settings, this.viewModel, this.discoInteractions.geneClickListener),
3130
+ legendRenderer,
3131
+ this.app.opts.state.args.genome
3132
+ );
3133
+ discoRenderer.render(svgDiv, this.viewModel, this.onCnvSourceSelect);
3134
+ if (this.viewModel.invalidDataInfo?.entries?.length) {
3135
+ InvalidDataUI.render(this.errorDiv, this.viewModel.invalidDataInfo);
3136
+ }
3137
+ }
3138
+ }
3139
+ getState(appState) {
3140
+ const config = appState.plots.find((p) => p.id === this.id);
3141
+ if (!config) return config;
3142
+ return { ...config, mlst: appState.args.data };
3143
+ }
3144
+ getRingRenderers(settings, viewModel, geneClickListener) {
3145
+ const chromosomesRenderer = new ChromosomesRenderer(
3146
+ settings.padAngle,
3147
+ settings.rings.chromosomeInnerRadius,
3148
+ settings.rings.chromosomeInnerRadius + settings.rings.chromosomeWidth,
3149
+ settings.label.fontSize
3150
+ );
3151
+ const labelsRenderer = new LabelsRenderer(
3152
+ settings.label.animationDuration,
3153
+ settings.label.fontSize,
3154
+ geneClickListener
3155
+ );
3156
+ const nonExonicSnvRenderer = new NonExonicSnvRenderer(geneClickListener);
3157
+ const snvRenderer = new SnvRenderer(settings.rings.snvRingWidth, geneClickListener);
3158
+ const cnvRenderer = settings.Disco.cnvRenderingType === "heatmap" /* heatmap */ ? new CnvHeatmapRenderer(viewModel.positivePercentile, viewModel.negativePercentile) : new CnvBarRenderer();
3159
+ const lohRenderer = new LohRenderer();
3160
+ const mutationWaterfallRenderer = new MutationWaterfallRenderer();
3161
+ const renderersMap = /* @__PURE__ */ new Map();
3162
+ renderersMap.set(0 /* CHROMOSOME */, chromosomesRenderer);
3163
+ renderersMap.set(1 /* LABEL */, labelsRenderer);
3164
+ renderersMap.set(2 /* NONEXONICSNV */, nonExonicSnvRenderer);
3165
+ renderersMap.set(3 /* SNV */, snvRenderer);
3166
+ renderersMap.set(4 /* MUTATION_WATERFALL */, mutationWaterfallRenderer);
3167
+ renderersMap.set(5 /* CNV */, cnvRenderer);
3168
+ renderersMap.set(6 /* LOH */, lohRenderer);
3169
+ return renderersMap;
3170
+ }
3171
+ toggleVisibility(isOpen) {
3172
+ this.app.dispatch({
3173
+ type: "plot_edit",
3174
+ id: this.opts.id,
3175
+ config: {
3176
+ settings: {
3177
+ Disco: { isOpen: !isOpen }
3178
+ }
3179
+ }
3180
+ });
3181
+ }
3182
+ };
3183
+ var discoInit = getCompInit(Disco);
3184
+ var componentInit = discoInit;
3185
+ async function getPlotConfig(opts, app) {
3186
+ return {
3187
+ chartType: "Disco",
3188
+ subfolder: "disco",
3189
+ extension: "ts",
3190
+ settings: discoDefaults(opts.overrides, app)
3191
+ };
3192
+ }
3193
+ export {
3194
+ componentInit,
3195
+ Disco as default,
3196
+ discoInit,
3197
+ getPlotConfig
3198
+ };
3199
+ //# sourceMappingURL=Disco-U5I6NJUT.js.map