@sjcrh/proteinpaint-client 2.204.0 → 2.206.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 (955) hide show
  1. package/dist/2dmaf-5OYM4MXA.js +1367 -0
  2. package/dist/AggMatrixInput-4VTI4Y6E.js +277 -0
  3. package/dist/AggregateMatrix-K7SGNO63.js +41 -0
  4. package/dist/AppHeader-WU6TO2OZ.js +830 -0
  5. package/dist/BoxPlot-OW7U3XTF.js +1211 -0
  6. package/dist/CorrelationVolcano-B3JTTZHF.js +614 -0
  7. package/dist/Cuminc-AJEXWRU2.js +1219 -0
  8. package/dist/DE-2J7DSRPC.js +89 -0
  9. package/dist/DE-2J7DSRPC.js.map +7 -0
  10. package/dist/DEinput-I7JWNOSD.js +499 -0
  11. package/dist/DEinput-I7JWNOSD.js.map +7 -0
  12. package/dist/DM-NQ46YPGF.js +90 -0
  13. package/dist/DM-NQ46YPGF.js.map +7 -0
  14. package/dist/DifferentialAnalysis-BFCQBX5J.js +237 -0
  15. package/dist/Disco-ZJLVQRTC.js +3389 -0
  16. package/dist/Disco.UI-AEDACXW2.js +243 -0
  17. package/dist/DmrPlot-QMRXAOM3.js +637 -0
  18. package/dist/GB-MFU2UJ22.js +1391 -0
  19. package/dist/GSEA-E3NHU22A.js +851 -0
  20. package/dist/GeneExpInput-MIUNSOPY.js +362 -0
  21. package/dist/Geomap-HAJG3STN.js +84 -0
  22. package/dist/HicApp-ECFFIRWI.js +2245 -0
  23. package/dist/IDCViewer-TNSD3U2V.js +10812 -0
  24. package/dist/NumBinaryEditor-CNBGZ6WY.js +279 -0
  25. package/dist/NumBinaryEditor.unit.spec-SKFDALF3.js +312 -0
  26. package/dist/NumContEditor-7ID2U7JL.js +105 -0
  27. package/dist/NumContEditor.unit.spec-XHSQSAWK.js +164 -0
  28. package/dist/NumCustomBinEditor-PAIPRJPO.js +33 -0
  29. package/dist/NumCustomBinEditor.unit.spec-QYVZMMHV.js +397 -0
  30. package/dist/NumDiscreteEditor-K2NZZQTH.js +170 -0
  31. package/dist/NumDiscreteEditor.unit.spec-3CG5VEQL.js +233 -0
  32. package/dist/NumRegularBinEditor-EOVZ22TP.js +33 -0
  33. package/dist/NumRegularBinEditor.unit.spec-FHTVH5FH.js +278 -0
  34. package/dist/NumSplineEditor-N3REMJUC.js +210 -0
  35. package/dist/NumSplineEditor.unit.spec-DZCP35GL.js +224 -0
  36. package/dist/NumericDensity-42MWVI2S.js +33 -0
  37. package/dist/NumericDensity.unit.spec-T2HHSQON.js +418 -0
  38. package/dist/NumericHandler-5XU3SSPD.js +34 -0
  39. package/dist/NumericHandler.unit.spec-3F23KSAQ.js +214 -0
  40. package/dist/ProteomeInput-UN2BUNRO.js +388 -0
  41. package/dist/Regression-HWLJENA5.js +1416 -0
  42. package/dist/RunChart2-YO55WE4M.js +749 -0
  43. package/dist/SC-LEDJ4DQR.js +1107 -0
  44. package/dist/Violin-E6PDJZ2B.js +1082 -0
  45. package/dist/Volcano-XJTBWYUK.js +1649 -0
  46. package/dist/Volcano-XJTBWYUK.js.map +7 -0
  47. package/dist/Wsi-S675CYTW.js +431 -0
  48. package/dist/adSandbox-ZJQ5ZW2T.js +33 -0
  49. package/dist/animatedBubbleChart-LRUS7W36.js +547 -0
  50. package/dist/app-7Q3QIBU4.js +32 -0
  51. package/dist/app-PKSI4MV5.js +42 -0
  52. package/dist/app.js +17 -17
  53. package/dist/bam-X5JH5ZT7.js +876 -0
  54. package/dist/barchart-UT6J4L2N.js +42 -0
  55. package/dist/barchart2-ZG5QJO3C.js +309 -0
  56. package/dist/block-TC466NGW.js +6249 -0
  57. package/dist/block.init-CIBNSYAC.js +33 -0
  58. package/dist/block.mds.expressionrank-EY5PCQCK.js +354 -0
  59. package/dist/block.mds.geneboxplot-R6AOMHO5.js +823 -0
  60. package/dist/block.mds.junction-JMV6FNYC.js +1539 -0
  61. package/dist/block.mds.svcnv-IHTV3QYG.js +6796 -0
  62. package/dist/block.svg-NTFLVQAQ.js +159 -0
  63. package/dist/block.tk.aicheck-FYPL32Y4.js +278 -0
  64. package/dist/block.tk.ase-FWCB6VBO.js +360 -0
  65. package/dist/block.tk.bam-Q5UFUABN.js +1901 -0
  66. package/dist/block.tk.bedgraphdot-KBI3GFDM.js +379 -0
  67. package/dist/block.tk.bigwig.ui-KXNFX7G7.js +206 -0
  68. package/dist/block.tk.hicstraw-MQBH3YAJ.js +818 -0
  69. package/dist/block.tk.junction-EBTVXLJH.js +2358 -0
  70. package/dist/block.tk.junction.textmatrixui-ETYLCP2O.js +194 -0
  71. package/dist/block.tk.ld-NLB6L6WQ.js +94 -0
  72. package/dist/block.tk.menu-PJLCOXVJ.js +1024 -0
  73. package/dist/block.tk.pgv-JOIQVWL2.js +938 -0
  74. package/dist/brainImaging-SPRC3QFB.js +515 -0
  75. package/dist/brainRegions-LGQGRWG7.js +217 -0
  76. package/dist/brainRegions-LGQGRWG7.js.map +7 -0
  77. package/dist/bubbleHeatmap-CFTZ5RXH.js +378 -0
  78. package/dist/cellTypeBubbleHeatmap-DXPLFT5U.js +278 -0
  79. package/dist/chunk-2BQ572SL.js +102 -0
  80. package/dist/chunk-2DQIQYY3.js +103 -0
  81. package/dist/chunk-2POQWEK6.js +134 -0
  82. package/dist/chunk-2SQEVMAL.js +446 -0
  83. package/dist/chunk-37HTZ6IG.js +158 -0
  84. package/dist/chunk-452765PG.js +2676 -0
  85. package/dist/chunk-4DXQJGJ7.js +31 -0
  86. package/dist/chunk-4OLM3KSB.js +2708 -0
  87. package/dist/chunk-4OLM3KSB.js.map +7 -0
  88. package/dist/chunk-54KC7DAB.js +178 -0
  89. package/dist/chunk-54KC7DAB.js.map +7 -0
  90. package/dist/chunk-5D5YTFI2.js +783 -0
  91. package/dist/chunk-5D5YTFI2.js.map +7 -0
  92. package/dist/chunk-5DBW3WLK.js +129 -0
  93. package/dist/chunk-5ILEFNXJ.js +402 -0
  94. package/dist/chunk-5UO7MKCO.js +59 -0
  95. package/dist/chunk-7R7P6VMT.js +243 -0
  96. package/dist/chunk-7X6NF7NI.js +96 -0
  97. package/dist/chunk-ANGLZ4XR.js +26 -0
  98. package/dist/chunk-BMQDU7KN.js +38 -0
  99. package/dist/chunk-C5TU4AYP.js +281 -0
  100. package/dist/chunk-DBQA6QIJ.js +4311 -0
  101. package/dist/chunk-DBQA6QIJ.js.map +7 -0
  102. package/dist/chunk-DHNET3P4.js +42 -0
  103. package/dist/chunk-EGKHDALO.js +382 -0
  104. package/dist/chunk-EPWGUWQP.js +34 -0
  105. package/dist/chunk-F3EYPES3.js +1339 -0
  106. package/dist/chunk-F4DM3WS4.js +194 -0
  107. package/dist/chunk-FTLCINDC.js +294 -0
  108. package/dist/chunk-GT6WJUJY.js +480 -0
  109. package/dist/chunk-GWCK5QGV.js +70 -0
  110. package/dist/chunk-HJSGHFJ6.js +464 -0
  111. package/dist/chunk-HS6BTSFX.js +49 -0
  112. package/dist/chunk-IB5TKNG5.js +5071 -0
  113. package/dist/chunk-IIMTOPH3.js +54 -0
  114. package/dist/chunk-ILEXRHF7.js +367 -0
  115. package/dist/chunk-ILEXRHF7.js.map +7 -0
  116. package/dist/chunk-IZUYLFOX.js +1608 -0
  117. package/dist/chunk-IZUYLFOX.js.map +7 -0
  118. package/dist/chunk-JAXN3Q3K.js +272 -0
  119. package/dist/chunk-K6PYTAXW.js +2853 -0
  120. package/dist/chunk-K6PYTAXW.js.map +7 -0
  121. package/dist/chunk-KIRZXPMB.js +141 -0
  122. package/dist/chunk-KT4OZVO3.js +1275 -0
  123. package/dist/chunk-KT4OZVO3.js.map +7 -0
  124. package/dist/chunk-L32KMIC3.js +54 -0
  125. package/dist/chunk-LB7NENEB.js +123 -0
  126. package/dist/chunk-LDWMVZYF.js +562 -0
  127. package/dist/chunk-M367Y7ML.js +140 -0
  128. package/dist/chunk-M4XXKTH2.js +339 -0
  129. package/dist/chunk-ME7OF3CS.js +176 -0
  130. package/dist/chunk-N2CXLMNX.js +626 -0
  131. package/dist/chunk-N7DVQTPC.js +119 -0
  132. package/dist/chunk-N7TD7N7D.js +518 -0
  133. package/dist/chunk-NBX6TT5C.js +299 -0
  134. package/dist/chunk-NLR7JIMM.js +1986 -0
  135. package/dist/chunk-NLR7JIMM.js.map +7 -0
  136. package/dist/chunk-NSRGYBDM.js +339 -0
  137. package/dist/chunk-NVS7KYYI.js +379 -0
  138. package/dist/chunk-OVPEMVXT.js +397 -0
  139. package/dist/chunk-OXWLQQXL.js +274 -0
  140. package/dist/chunk-Q5SK3U2T.js +24163 -0
  141. package/dist/chunk-Q5SK3U2T.js.map +7 -0
  142. package/dist/chunk-QGGSYEVJ.js +55 -0
  143. package/dist/chunk-QLEVONLD.js +50 -0
  144. package/dist/chunk-RFW5BRIZ.js +1233 -0
  145. package/dist/chunk-RFW5BRIZ.js.map +7 -0
  146. package/dist/chunk-RNWHB5DI.js +98 -0
  147. package/dist/chunk-RPDVFM7E.js +2133 -0
  148. package/dist/chunk-RPDVFM7E.js.map +7 -0
  149. package/dist/chunk-RUHLDUOT.js +203 -0
  150. package/dist/chunk-RV34WFGZ.js +197 -0
  151. package/dist/chunk-SDVE5ECI.js +6360 -0
  152. package/dist/chunk-SWO6DZTG.js +170 -0
  153. package/dist/chunk-SYPSS3JQ.js +387 -0
  154. package/dist/chunk-TDM3645O.js +2327 -0
  155. package/dist/chunk-VVO3R5JV.js +217 -0
  156. package/dist/chunk-VYEU6Y35.js +14 -0
  157. package/dist/chunk-WGXC6IEF.js +263 -0
  158. package/dist/chunk-WPDM57B5.js +1720 -0
  159. package/dist/chunk-WS7WKS2B.js +2784 -0
  160. package/dist/chunk-WTAPOH2W.js +22699 -0
  161. package/dist/chunk-WTAPOH2W.js.map +7 -0
  162. package/dist/chunk-X63NSV33.js +276 -0
  163. package/dist/chunk-XXNRSSBR.js +56 -0
  164. package/dist/chunk-YD6UGDFI.js +102 -0
  165. package/dist/chunk-YRIYDFNU.js +160 -0
  166. package/dist/chunk-YY5WQQ3J.js +194 -0
  167. package/dist/chunk-Z2ZITHT4.js +4195 -0
  168. package/dist/chunk-Z4SM3FBK.js +302 -0
  169. package/dist/chunk-ZEYEIUEZ.js +240 -0
  170. package/dist/chunk-ZLYTDHQP.js +677 -0
  171. package/dist/chunk-ZWCVRVV4.js +550 -0
  172. package/dist/cohort-FZNMFWOX.js +70 -0
  173. package/dist/condition-AJJLFCBQ.js +327 -0
  174. package/dist/controls-SZOLV37V.js +34 -0
  175. package/dist/controls.config-CVP75WFA.js +34 -0
  176. package/dist/correlation-UFJFQHQ3.js +95 -0
  177. package/dist/customdata.inputui-HOVA4A6O.js +284 -0
  178. package/dist/dataDownload-VTUG4IOK.js +329 -0
  179. package/dist/databrowser.ui-O5S4Y4EK.js +425 -0
  180. package/dist/dictionary-L2UNNNP7.js +113 -0
  181. package/dist/dnaMethylation-B4SWZI4O.js +33 -0
  182. package/dist/dnaMethylation.integration.spec-ANJAMNYJ.js +198 -0
  183. package/dist/dofetch-F5XSHQIS.js +48 -0
  184. package/dist/e2pca-66ARIMKL.js +344 -0
  185. package/dist/ep-OFGJYVUY.js +1249 -0
  186. package/dist/expclust.gdc.spec-22RXQTTP.js +302 -0
  187. package/dist/facet-GVZQ3RPN.js +519 -0
  188. package/dist/gb-HEPGVYEK.js +81 -0
  189. package/dist/geneExpClustering-3NU2U422.js +244 -0
  190. package/dist/geneExpression-FXQ4L2J2.js +310 -0
  191. package/dist/geneExpression-XYVYJJA5.js +33 -0
  192. package/dist/geneExpression.unit.spec-K3FIRSNK.js +99 -0
  193. package/dist/geneORA-5M2JSDMF.js +273 -0
  194. package/dist/geneRanking-TP3R3CS3.js +548 -0
  195. package/dist/geneVariant-232EYUFJ.js +36 -0
  196. package/dist/geneVariant-BHXTPUDC.js +286 -0
  197. package/dist/geneVariant.integration.spec-ICFHVFIR.js +388 -0
  198. package/dist/genefusion.ui-ABRCUQFC.js +303 -0
  199. package/dist/geneset-N42FIVA6.js +203 -0
  200. package/dist/genomeBrowser.spec-5HKQKLRU.js +276 -0
  201. package/dist/grin2-H2KJYLP6.js +1137 -0
  202. package/dist/grin2-NGMTEMXF.js +70 -0
  203. package/dist/hierCluster-JU5JPLM7.js +55 -0
  204. package/dist/hierCluster-LSSH275H.js +59 -0
  205. package/dist/hierCluster.config-ILOR7GBB.js +36 -0
  206. package/dist/hierCluster.integration.spec-CNR5OJOH.js +483 -0
  207. package/dist/hierCluster.interactivity-TLEIVTFK.js +49 -0
  208. package/dist/hierCluster.renderers-P7JNIT3N.js +19 -0
  209. package/dist/imagePlot-BF67SXQR.js +156 -0
  210. package/dist/importPlot-OHXSXNZN.js +8 -0
  211. package/dist/isoformExpression-4VKHE4HA.js +35 -0
  212. package/dist/isoformExpression.unit.spec-4TVSIFG4.js +237 -0
  213. package/dist/junction-VUHORV43.js +36 -0
  214. package/dist/junction.customTerm-FRYWSS4P.js +16 -0
  215. package/dist/junction.unit.spec-KKVLYT7Q.js +182 -0
  216. package/dist/launch.adhoc-UDYMFZTQ.js +37 -0
  217. package/dist/leftlabel.sample-R5FFBWG3.js +258 -0
  218. package/dist/legacyDataset-IEFWFVS6.js +117 -0
  219. package/dist/lollipop-3IX6ZYUN.js +166 -0
  220. package/dist/maf-42UFYSL4.js +455 -0
  221. package/dist/maftimeline-M5WYEN62.js +587 -0
  222. package/dist/matrix-CI76EDHU.js +54 -0
  223. package/dist/matrix-WJZKA6VR.js +59 -0
  224. package/dist/matrix.cells-ZFKVIPDC.js +26 -0
  225. package/dist/matrix.config-24TFHBEM.js +37 -0
  226. package/dist/matrix.data-NCGZPNWR.js +23 -0
  227. package/dist/matrix.groups-XQJTGM6M.js +26 -0
  228. package/dist/matrix.integration.spec-OGXZUDE6.js +3160 -0
  229. package/dist/matrix.interactivity-ZOOTPNSW.js +37 -0
  230. package/dist/matrix.layout-5J2YENK3.js +39 -0
  231. package/dist/matrix.legend-U36VCS46.js +20 -0
  232. package/dist/matrix.renderers-4KFE7ZVR.js +34 -0
  233. package/dist/matrix.serieses-AW7XBXLJ.js +19 -0
  234. package/dist/matrix.sort-7PMECLOE.js +26 -0
  235. package/dist/matrix.sort.unit.spec-GIA2YOTQ.js +468 -0
  236. package/dist/matrix.sorterUi-J6PRUT6J.js +16 -0
  237. package/dist/matrix.sorterUi.unit.spec-OPGKZZL6.js +338 -0
  238. package/dist/matrix.unit.spec-7UIVVR4T.js +150 -0
  239. package/dist/mavb-MSYUMT6W.js +727 -0
  240. package/dist/mds.fimo-OYEAQP37.js +513 -0
  241. package/dist/mds.samplescatterplot-EXISSRQQ.js +1545 -0
  242. package/dist/mds.survivalplot-SZST6BLN.js +477 -0
  243. package/dist/multivalue-YDE7L75Y.js +83 -0
  244. package/dist/numericDictTermCluster-5AKP6ICC.js +63 -0
  245. package/dist/oncomatrix-2OEIYWR6.js +290 -0
  246. package/dist/oncomatrix.spec-CXQW4JWU.js +443 -0
  247. package/dist/plot.2dvaf-LN7A3NNC.js +372 -0
  248. package/dist/plot.app-YIQOY2Z7.js +36 -0
  249. package/dist/plot.barplot-HF2J25XP.js +97 -0
  250. package/dist/plot.boxplot-YJH4L27U.js +146 -0
  251. package/dist/plot.brainImaging-PS4TRSPI.js +51 -0
  252. package/dist/plot.disco-BN5RNZ6Q.js +99 -0
  253. package/dist/plot.ssgq-N2HTOIY3.js +134 -0
  254. package/dist/plot.vaf2cov-6AOHRUQ2.js +253 -0
  255. package/dist/polar2-TC5OEJRE.js +232 -0
  256. package/dist/profileForms-5WV2TSBB.js +941 -0
  257. package/dist/profilePlot-OJLLW44P.js +49 -0
  258. package/dist/proteinView-CGNAJN4S.js +1357 -0
  259. package/dist/proteinView-CGNAJN4S.js.map +7 -0
  260. package/dist/proteomeCohortCompare-XXQGGVCF.js +912 -0
  261. package/dist/proteomeCohortCompare-XXQGGVCF.js.map +7 -0
  262. package/dist/pseudbulk.unit.spec-RAYRGN6C.js +86 -0
  263. package/dist/pseudobulk-ADHAYVSQ.js +35 -0
  264. package/dist/qualitative-JXEI3IYC.js +38 -0
  265. package/dist/radar2-BWTKSTT3.js +327 -0
  266. package/dist/radarFacility2-WIRSKTDG.js +335 -0
  267. package/dist/rememberedGvQ.unit.spec-N43O4YTF.js +211 -0
  268. package/dist/render-J7WOYBOL.js +33 -0
  269. package/dist/report-DRPCXX2B.js +217 -0
  270. package/dist/sampleView-BV6BQGGQ.js +43 -0
  271. package/dist/samplelst-ZD63EYO7.js +106 -0
  272. package/dist/samplematrix-ZZ3DVELU.js +2193 -0
  273. package/dist/sc-MUI43YTB.js +81 -0
  274. package/dist/scatter-7B44HTKN.js +88 -0
  275. package/dist/scatter-UEDVIE4Y.js +880 -0
  276. package/dist/selectGenomeWithTklst-WGOKGVZ5.js +129 -0
  277. package/dist/singleCellCellType-Z7OXK7PI.js +33 -0
  278. package/dist/singleCellCellType.unit.spec-IIOVCCJQ.js +154 -0
  279. package/dist/singleCellGeneExpression-LYZAIJ2Z.js +33 -0
  280. package/dist/singleCellGeneExpression.unit.spec-67AAWZTG.js +148 -0
  281. package/dist/singleCellPlot-TXPYQLSH.js +49 -0
  282. package/dist/singlecell-22OG6HNI.js +1566 -0
  283. package/dist/singlecell-7TBALI2S.js +81 -0
  284. package/dist/snp-3U2G3Z57.js +33 -0
  285. package/dist/snp.unit.spec-BMBBUBYD.js +171 -0
  286. package/dist/snplocus-SSVZDIQV.js +203 -0
  287. package/dist/spliceevent.a53ss.diagram-FK7CN4AU.js +146 -0
  288. package/dist/spliceevent.exonskip.diagram-EFLGV3O4.js +278 -0
  289. package/dist/spliceevent.noeventdiagram-2DYO7CCZ.js +455 -0
  290. package/dist/ssGSEA-52LWBQJP.js +33 -0
  291. package/dist/ssGSEA.unit.spec-3JV6WHUQ.js +83 -0
  292. package/dist/stattable-RLMYQ4G6.js +117 -0
  293. package/dist/studyCatalog-DKB3U7EV.js +414 -0
  294. package/dist/studyCatalog-DKB3U7EV.js.map +7 -0
  295. package/dist/summarizeCnvGeneexp-QPRYAKC2.js +158 -0
  296. package/dist/summarizeGeneexpSurvival-RWVQXEKB.js +105 -0
  297. package/dist/summarizeMutationCnv-DW5F6NUJ.js +159 -0
  298. package/dist/summarizeMutationDiagnosis-5FOQ7CHI.js +35 -0
  299. package/dist/summarizeMutationSurvival-4UKB4EVO.js +99 -0
  300. package/dist/summary-TYC6QNT4.js +42 -0
  301. package/dist/summary.integration.spec-5GLJJZNM.js +409 -0
  302. package/dist/summaryInput-4IJGKW4P.js +242 -0
  303. package/dist/sunburst-G7DGATWP.js +278 -0
  304. package/dist/survival-IHM6A7LL.js +1248 -0
  305. package/dist/survival-IHM6A7LL.js.map +7 -0
  306. package/dist/survival-MKNABJPU.js +53 -0
  307. package/dist/survival.integration.spec-THOKI3DL.js +613 -0
  308. package/dist/survival.integration.spec-THOKI3DL.js.map +7 -0
  309. package/dist/svgraph-VB7JWWR5.js +1382 -0
  310. package/dist/svmr-VLQIO2U5.js +3837 -0
  311. package/dist/table-EAXMDWOY.js +197 -0
  312. package/dist/termCollection-5LG7ICQY.js +252 -0
  313. package/dist/termCollection-SB6MWLFK.js +33 -0
  314. package/dist/termCollection.unit.spec-H5ITGTR3.js +299 -0
  315. package/dist/termCollectionFractionSelection-2XZSTDCQ.js +42 -0
  316. package/dist/termCollectionFractionSelection.unit.spec-BIO7V6KA.js +188 -0
  317. package/dist/tk-TRWYZLQ2.js +1121 -0
  318. package/dist/tk-VZI5HNSX.js +41 -0
  319. package/dist/tp.ui-J5SNNAT3.js +1454 -0
  320. package/dist/tvs.dt-6YHFJPER.js +34 -0
  321. package/dist/tvs.dtcnv.categorical-WTIE63GM.js +35 -0
  322. package/dist/tvs.dtcnv.continuous-OCMKGTF5.js +67 -0
  323. package/dist/tvs.dtfusion-CA23UNM3.js +35 -0
  324. package/dist/tvs.dtitd-VSYMR3OD.js +35 -0
  325. package/dist/tvs.dtsnvindel-YBNO3CYF.js +35 -0
  326. package/dist/tvs.dtsv-S743GBB5.js +35 -0
  327. package/dist/tvs.numeric-22AHXO5K.js +20 -0
  328. package/dist/tvs.samplelst-XAJO4EM6.js +98 -0
  329. package/dist/tvs.termCollection-QOVJGAUC.js +124 -0
  330. package/dist/vocabulary-6EADTHP3.js +36 -0
  331. package/dist/wsi.direct-2WB2NGC5.js +8184 -0
  332. package/dist/wsi.direct-2WB2NGC5.js.map +7 -0
  333. package/package.json +3 -3
  334. package/dist/2dmaf-JIY57FG6.js +0 -1367
  335. package/dist/AIProjectAdmin-DGTBIE6E.js +0 -952
  336. package/dist/AIProjectAdmin-DGTBIE6E.js.map +0 -7
  337. package/dist/AggMatrixInput-FH6WRTLP.js +0 -277
  338. package/dist/AggregateMatrix-MGEX5AVF.js +0 -41
  339. package/dist/AppHeader-FFOQFH55.js +0 -830
  340. package/dist/BoxPlot-KCY4JVRX.js +0 -1211
  341. package/dist/CorrelationVolcano-E5URKQSM.js +0 -614
  342. package/dist/Cuminc-CBPMCKIC.js +0 -1219
  343. package/dist/DE-VANPWKZI.js +0 -88
  344. package/dist/DE-VANPWKZI.js.map +0 -7
  345. package/dist/DEinput-MONPHDB2.js +0 -405
  346. package/dist/DEinput-MONPHDB2.js.map +0 -7
  347. package/dist/DifferentialAnalysis-XRBS4PZI.js +0 -237
  348. package/dist/Disco-V2VJIDWG.js +0 -3389
  349. package/dist/Disco.UI-OEF5JXBU.js +0 -243
  350. package/dist/DmrPlot-KZUWJWBD.js +0 -637
  351. package/dist/GB-IYTEMMU7.js +0 -1391
  352. package/dist/GSEA-QB62B5KB.js +0 -851
  353. package/dist/GeneExpInput-CXX7SXMQ.js +0 -362
  354. package/dist/Geomap-QNHSCN4N.js +0 -84
  355. package/dist/HicApp-UIULZYYJ.js +0 -2245
  356. package/dist/IDCViewer-B2JENGZZ.js +0 -10812
  357. package/dist/NumBinaryEditor-JOU2J23M.js +0 -279
  358. package/dist/NumBinaryEditor.unit.spec-UXZBBVWL.js +0 -312
  359. package/dist/NumContEditor-BJGP4PVS.js +0 -105
  360. package/dist/NumContEditor.unit.spec-HEXOYIXC.js +0 -164
  361. package/dist/NumCustomBinEditor-HDRTVWNK.js +0 -33
  362. package/dist/NumCustomBinEditor.unit.spec-MN6QZ3ZB.js +0 -397
  363. package/dist/NumDiscreteEditor-JUBR45IJ.js +0 -170
  364. package/dist/NumDiscreteEditor.unit.spec-SDK2LR5B.js +0 -233
  365. package/dist/NumRegularBinEditor-AQPRZ3MI.js +0 -33
  366. package/dist/NumRegularBinEditor.unit.spec-GM3SFB2N.js +0 -278
  367. package/dist/NumSplineEditor-LYLROEGE.js +0 -210
  368. package/dist/NumSplineEditor.unit.spec-3Q2HP6IB.js +0 -224
  369. package/dist/NumericDensity-3ZCDZORO.js +0 -33
  370. package/dist/NumericDensity.unit.spec-MNIAR2PR.js +0 -418
  371. package/dist/NumericHandler-MUNEB5IS.js +0 -34
  372. package/dist/NumericHandler.unit.spec-KPWG2T27.js +0 -214
  373. package/dist/ProteomeInput-NEUHQ2G4.js +0 -388
  374. package/dist/Regression-C75T5LOY.js +0 -1416
  375. package/dist/RunChart2-CMQ2BBSJ.js +0 -749
  376. package/dist/SC-HYK26DXI.js +0 -1107
  377. package/dist/Violin-J5Z3NKMU.js +0 -1082
  378. package/dist/Volcano-VZGOJFM7.js +0 -1573
  379. package/dist/Volcano-VZGOJFM7.js.map +0 -7
  380. package/dist/WSIViewer-EEKHINZU.js +0 -18892
  381. package/dist/WSIViewer-EEKHINZU.js.map +0 -7
  382. package/dist/Wsi-ZP36MKK7.js +0 -431
  383. package/dist/WsiSamplesPlot-6G3U7U5L.js +0 -160
  384. package/dist/WsiSamplesPlot-6G3U7U5L.js.map +0 -7
  385. package/dist/adSandbox-W4THMDUI.js +0 -33
  386. package/dist/animatedBubbleChart-2IVR2WC3.js +0 -547
  387. package/dist/app-LAIPU5IO.js +0 -42
  388. package/dist/app-WMRDJINC.js +0 -32
  389. package/dist/bam-44WCWB5P.js +0 -876
  390. package/dist/barchart-P6XKCJRF.js +0 -42
  391. package/dist/barchart2-5NTYCQYN.js +0 -309
  392. package/dist/block-VEOD6CP4.js +0 -6249
  393. package/dist/block.init-RCPDUYAV.js +0 -33
  394. package/dist/block.mds.expressionrank-KALPK27B.js +0 -354
  395. package/dist/block.mds.geneboxplot-ZASU25BG.js +0 -823
  396. package/dist/block.mds.junction-DCVGVSYG.js +0 -1539
  397. package/dist/block.mds.svcnv-CEGYMRSE.js +0 -6796
  398. package/dist/block.svg-AW4E7NSS.js +0 -159
  399. package/dist/block.tk.aicheck-4ZPFLI5I.js +0 -278
  400. package/dist/block.tk.ase-F3VMNBE3.js +0 -360
  401. package/dist/block.tk.bam-3VDSEMVO.js +0 -1901
  402. package/dist/block.tk.bedgraphdot-3F6AMWFD.js +0 -379
  403. package/dist/block.tk.bigwig.ui-QO334QC3.js +0 -206
  404. package/dist/block.tk.hicstraw-VA7GNOOD.js +0 -818
  405. package/dist/block.tk.junction-7WIZ63R7.js +0 -2358
  406. package/dist/block.tk.junction.textmatrixui-ZHSVODGI.js +0 -194
  407. package/dist/block.tk.ld-JME4SP6A.js +0 -94
  408. package/dist/block.tk.menu-7BFQTH3Q.js +0 -1024
  409. package/dist/block.tk.pgv-C2N7UFYT.js +0 -938
  410. package/dist/brainImaging-6XFUKFZE.js +0 -515
  411. package/dist/brainRegions-SEMS7V4O.js +0 -216
  412. package/dist/brainRegions-SEMS7V4O.js.map +0 -7
  413. package/dist/bubbleHeatmap-YO4232WO.js +0 -378
  414. package/dist/cellTypeBubbleHeatmap-GM4BGCQ3.js +0 -278
  415. package/dist/chunk-2YDQC5BV.js +0 -562
  416. package/dist/chunk-3QMXNK7G.js +0 -379
  417. package/dist/chunk-4C2N2BQC.js +0 -6360
  418. package/dist/chunk-4Q46RDNU.js +0 -34
  419. package/dist/chunk-4YEDSMFX.js +0 -123
  420. package/dist/chunk-56HEUYYM.js +0 -2891
  421. package/dist/chunk-56HEUYYM.js.map +0 -7
  422. package/dist/chunk-5VMEMA4O.js +0 -158
  423. package/dist/chunk-66BJC6ZX.js +0 -217
  424. package/dist/chunk-6JBLNS4D.js +0 -387
  425. package/dist/chunk-6RN4RVKF.js +0 -480
  426. package/dist/chunk-6SKLD7JU.js +0 -59
  427. package/dist/chunk-7C45EYL6.js +0 -274
  428. package/dist/chunk-7RX5UEF3.js +0 -24193
  429. package/dist/chunk-7RX5UEF3.js.map +0 -7
  430. package/dist/chunk-AAM7HHPU.js +0 -103
  431. package/dist/chunk-AFMD6226.js +0 -240
  432. package/dist/chunk-AK3SW3VT.js +0 -176
  433. package/dist/chunk-BBYVVPEO.js +0 -1271
  434. package/dist/chunk-BBYVVPEO.js.map +0 -7
  435. package/dist/chunk-BEJJS2HC.js +0 -194
  436. package/dist/chunk-BMVRYEN2.js +0 -397
  437. package/dist/chunk-BZYTL2EU.js +0 -294
  438. package/dist/chunk-CLOHFGFX.js +0 -14
  439. package/dist/chunk-D6G64XPJ.js +0 -96
  440. package/dist/chunk-DAJT3XVZ.js +0 -31
  441. package/dist/chunk-DKPV7GCZ.js +0 -7966
  442. package/dist/chunk-DKPV7GCZ.js.map +0 -7
  443. package/dist/chunk-DMT6S5HJ.js +0 -5071
  444. package/dist/chunk-DO4SLQNP.js +0 -194
  445. package/dist/chunk-DUGOFIQS.js +0 -464
  446. package/dist/chunk-E3O6ZEWQ.js +0 -129
  447. package/dist/chunk-EJ3SSI5J.js +0 -382
  448. package/dist/chunk-FSDY4QVA.js +0 -272
  449. package/dist/chunk-FUEJFIQX.js +0 -203
  450. package/dist/chunk-FUSTNOQZ.js +0 -2130
  451. package/dist/chunk-FUSTNOQZ.js.map +0 -7
  452. package/dist/chunk-GAW2EETX.js +0 -281
  453. package/dist/chunk-GF6CKFXE.js +0 -1720
  454. package/dist/chunk-GI3RVOO4.js +0 -339
  455. package/dist/chunk-GQ6T62VJ.js +0 -141
  456. package/dist/chunk-GTMHDSOQ.js +0 -550
  457. package/dist/chunk-H555QBYP.js +0 -243
  458. package/dist/chunk-HDTFYTEL.js +0 -2694
  459. package/dist/chunk-HDTFYTEL.js.map +0 -7
  460. package/dist/chunk-HKQDZKSF.js +0 -119
  461. package/dist/chunk-HLZVDBAI.js +0 -1985
  462. package/dist/chunk-HLZVDBAI.js.map +0 -7
  463. package/dist/chunk-HWMZ2OHD.js +0 -49
  464. package/dist/chunk-JG6SE6YU.js +0 -1339
  465. package/dist/chunk-JSVLKCIQ.js +0 -160
  466. package/dist/chunk-JVRGY6IU.js +0 -54
  467. package/dist/chunk-JXUFZZRJ.js +0 -626
  468. package/dist/chunk-K5YG7MVJ.js +0 -2676
  469. package/dist/chunk-KAUMP3RR.js +0 -56
  470. package/dist/chunk-KLGNLUXR.js +0 -518
  471. package/dist/chunk-KWLBPOPE.js +0 -38
  472. package/dist/chunk-L42F5J5C.js +0 -185
  473. package/dist/chunk-L42F5J5C.js.map +0 -7
  474. package/dist/chunk-LXTBOUBG.js +0 -677
  475. package/dist/chunk-MCRWA655.js +0 -98
  476. package/dist/chunk-NGBQL4CM.js +0 -54
  477. package/dist/chunk-OKUFTLFL.js +0 -4297
  478. package/dist/chunk-OKUFTLFL.js.map +0 -7
  479. package/dist/chunk-ONXYJWY6.js +0 -102
  480. package/dist/chunk-OYHID2D7.js +0 -50
  481. package/dist/chunk-PT5JDHPR.js +0 -42
  482. package/dist/chunk-PZZIDJIB.js +0 -806
  483. package/dist/chunk-PZZIDJIB.js.map +0 -7
  484. package/dist/chunk-S5SOLLGM.js +0 -1654
  485. package/dist/chunk-S5SOLLGM.js.map +0 -7
  486. package/dist/chunk-S6XG74R4.js +0 -70
  487. package/dist/chunk-TAEU6SPJ.js +0 -197
  488. package/dist/chunk-UBZRZ3PS.js +0 -102
  489. package/dist/chunk-UM5NWVMA.js +0 -140
  490. package/dist/chunk-VHDVTQFR.js +0 -2784
  491. package/dist/chunk-VRY7WSS6.js +0 -170
  492. package/dist/chunk-VSPUFGDX.js +0 -339
  493. package/dist/chunk-VVDFRJVN.js +0 -306
  494. package/dist/chunk-VVDFRJVN.js.map +0 -7
  495. package/dist/chunk-WFOC4W5A.js +0 -55
  496. package/dist/chunk-WVPFLPWB.js +0 -402
  497. package/dist/chunk-WZUUWGEU.js +0 -22834
  498. package/dist/chunk-WZUUWGEU.js.map +0 -7
  499. package/dist/chunk-X7IAKV5Z.js +0 -276
  500. package/dist/chunk-XHOL37O6.js +0 -299
  501. package/dist/chunk-XJGPL2JZ.js +0 -39
  502. package/dist/chunk-XJGPL2JZ.js.map +0 -7
  503. package/dist/chunk-XPB2GP3C.js +0 -2327
  504. package/dist/chunk-XPVU5AMT.js +0 -263
  505. package/dist/chunk-YLJOZP4P.js +0 -4195
  506. package/dist/chunk-YLWSTPPL.js +0 -302
  507. package/dist/chunk-YZVWOQBP.js +0 -134
  508. package/dist/chunk-ZB3RP5QP.js +0 -446
  509. package/dist/chunk-ZU47ERPU.js +0 -26
  510. package/dist/cohort-ZTT2PSQA.js +0 -70
  511. package/dist/condition-L5DXIAJT.js +0 -327
  512. package/dist/controls-ROZP2O7A.js +0 -34
  513. package/dist/controls.config-YQKGHMIP.js +0 -34
  514. package/dist/correlation-6AKRIQXN.js +0 -95
  515. package/dist/customdata.inputui-DD3OFHUS.js +0 -284
  516. package/dist/dataDownload-VHHSLSZV.js +0 -329
  517. package/dist/databrowser.ui-RLYJOEWQ.js +0 -425
  518. package/dist/dictionary-IMOOQHIH.js +0 -113
  519. package/dist/dnaMethylation-T6XUIOJF.js +0 -33
  520. package/dist/dnaMethylation.integration.spec-NRJOIDRD.js +0 -198
  521. package/dist/dofetch-MLAEV3A2.js +0 -48
  522. package/dist/e2pca-F3TGJOMW.js +0 -344
  523. package/dist/ep-UAF6OL2Y.js +0 -1249
  524. package/dist/expclust.gdc.spec-GHH3JQ65.js +0 -302
  525. package/dist/facet-MB4C7GII.js +0 -519
  526. package/dist/gb-C5YSAFWP.js +0 -81
  527. package/dist/geneExpClustering-3BRSI5BR.js +0 -244
  528. package/dist/geneExpression-K3IZLSYC.js +0 -310
  529. package/dist/geneExpression-SIAPRA3E.js +0 -33
  530. package/dist/geneExpression.unit.spec-I66QVNT5.js +0 -99
  531. package/dist/geneORA-SLM3SNNS.js +0 -273
  532. package/dist/geneRanking-4EFYOR6A.js +0 -548
  533. package/dist/geneVariant-O347F2OY.js +0 -286
  534. package/dist/geneVariant-Z3BUIBLS.js +0 -36
  535. package/dist/geneVariant.integration.spec-ZZ65EYEL.js +0 -388
  536. package/dist/genefusion.ui-TK6UKPDR.js +0 -303
  537. package/dist/geneset-MVXSEOKZ.js +0 -203
  538. package/dist/genomeBrowser.spec-QDB4Z2L6.js +0 -276
  539. package/dist/grin2-DCU6PLPU.js +0 -70
  540. package/dist/grin2-P6Z45MCJ.js +0 -1137
  541. package/dist/hierCluster-3H47NLKS.js +0 -55
  542. package/dist/hierCluster-JG6VXTCV.js +0 -59
  543. package/dist/hierCluster.config-IP6I7RTS.js +0 -36
  544. package/dist/hierCluster.integration.spec-7PUNHRRS.js +0 -483
  545. package/dist/hierCluster.interactivity-FIDVRACV.js +0 -49
  546. package/dist/hierCluster.renderers-QMJWUPAI.js +0 -19
  547. package/dist/imagePlot-CXYKBCWS.js +0 -156
  548. package/dist/importPlot-Z4A54RXH.js +0 -8
  549. package/dist/isoformExpression-DMDV2PZY.js +0 -35
  550. package/dist/isoformExpression.unit.spec-W2LIYOXS.js +0 -237
  551. package/dist/junction-R5GMEO7Z.js +0 -36
  552. package/dist/junction.customTerm-AI44GNFV.js +0 -16
  553. package/dist/junction.unit.spec-SCRCANOC.js +0 -182
  554. package/dist/launch.adhoc-THLTYZJT.js +0 -37
  555. package/dist/leftlabel.sample-GKQXEY4J.js +0 -258
  556. package/dist/legacyDataset-27L4DMCL.js +0 -117
  557. package/dist/lollipop-2TW6GGPY.js +0 -166
  558. package/dist/maf-A4PVW5V2.js +0 -455
  559. package/dist/maftimeline-QMX3HOAU.js +0 -587
  560. package/dist/matrix-BGRYRU3T.js +0 -54
  561. package/dist/matrix-GPXTUVCQ.js +0 -59
  562. package/dist/matrix.cells-C6OY7F5T.js +0 -26
  563. package/dist/matrix.config-Z5ZGHXDV.js +0 -37
  564. package/dist/matrix.data-WB26I3TF.js +0 -23
  565. package/dist/matrix.groups-C2V2CV4A.js +0 -26
  566. package/dist/matrix.integration.spec-3COAXQBV.js +0 -3160
  567. package/dist/matrix.interactivity-NGHIQR3A.js +0 -37
  568. package/dist/matrix.layout-NYIOESGN.js +0 -39
  569. package/dist/matrix.legend-Q5HHWP5Q.js +0 -20
  570. package/dist/matrix.renderers-GLXZARIP.js +0 -34
  571. package/dist/matrix.serieses-LDQEPXPD.js +0 -19
  572. package/dist/matrix.sort-44TQNRIX.js +0 -26
  573. package/dist/matrix.sort.unit.spec-T3BDWJ3Z.js +0 -468
  574. package/dist/matrix.sorterUi-6Y4YBQYL.js +0 -16
  575. package/dist/matrix.sorterUi.unit.spec-NHUYNMNU.js +0 -338
  576. package/dist/matrix.unit.spec-C7IRIBN6.js +0 -150
  577. package/dist/mavb-E37LI73X.js +0 -727
  578. package/dist/mds.fimo-YTGX7VEN.js +0 -513
  579. package/dist/mds.samplescatterplot-FFGGJSI3.js +0 -1545
  580. package/dist/mds.survivalplot-NCWRXXV4.js +0 -477
  581. package/dist/multivalue-N7A2PU5K.js +0 -83
  582. package/dist/numericDictTermCluster-AKQKRBQH.js +0 -63
  583. package/dist/oncomatrix-QPVGACMF.js +0 -290
  584. package/dist/oncomatrix.spec-6L2NDN2G.js +0 -443
  585. package/dist/plot.2dvaf-6TLON77B.js +0 -372
  586. package/dist/plot.app-VM273TXU.js +0 -36
  587. package/dist/plot.barplot-IQTZURHK.js +0 -97
  588. package/dist/plot.boxplot-WEXB6HII.js +0 -146
  589. package/dist/plot.brainImaging-REGSSBHV.js +0 -51
  590. package/dist/plot.disco-F25Z3FQL.js +0 -99
  591. package/dist/plot.ssgq-CRRK26RS.js +0 -134
  592. package/dist/plot.vaf2cov-WCNPZKXK.js +0 -253
  593. package/dist/plot.wsi-6OAPT5BA.js +0 -36
  594. package/dist/plot.wsi-6OAPT5BA.js.map +0 -7
  595. package/dist/polar2-MH5GPXHJ.js +0 -232
  596. package/dist/profileForms-2YX2OYDI.js +0 -941
  597. package/dist/profilePlot-FUTMZ2PP.js +0 -49
  598. package/dist/proteinView-6Z4ALZW2.js +0 -1562
  599. package/dist/proteinView-6Z4ALZW2.js.map +0 -7
  600. package/dist/proteomeCohortCompare-6GLFOYI5.js +0 -780
  601. package/dist/proteomeCohortCompare-6GLFOYI5.js.map +0 -7
  602. package/dist/pseudbulk.unit.spec-S7FDL3IX.js +0 -86
  603. package/dist/pseudobulk-A3LB23N2.js +0 -35
  604. package/dist/qualitative-5VJRMF4S.js +0 -38
  605. package/dist/radar2-2SJX4ZXN.js +0 -327
  606. package/dist/radarFacility2-7FPO34JS.js +0 -335
  607. package/dist/rememberedGvQ.unit.spec-WOQVPQ75.js +0 -211
  608. package/dist/render-ZLA2RRBP.js +0 -33
  609. package/dist/report-VCE6RILD.js +0 -217
  610. package/dist/sampleView-QYTX4OLI.js +0 -43
  611. package/dist/samplelst-7NGH3SUM.js +0 -106
  612. package/dist/samplematrix-SNAR6IBB.js +0 -2193
  613. package/dist/sc-2JETYAI4.js +0 -81
  614. package/dist/scatter-D7VZOBEE.js +0 -880
  615. package/dist/scatter-GHBQM2RR.js +0 -88
  616. package/dist/selectGenomeWithTklst-BD4GMGX3.js +0 -129
  617. package/dist/singleCellCellType-XHLOJVVC.js +0 -33
  618. package/dist/singleCellCellType.unit.spec-LCLR3IOD.js +0 -154
  619. package/dist/singleCellGeneExpression-JRBONI5C.js +0 -33
  620. package/dist/singleCellGeneExpression.unit.spec-Z2KSVCIG.js +0 -148
  621. package/dist/singleCellPlot-4462CQHF.js +0 -49
  622. package/dist/singlecell-CDUQ6MTO.js +0 -81
  623. package/dist/singlecell-SO3B5KJ7.js +0 -1566
  624. package/dist/snp-YE2MXKJO.js +0 -33
  625. package/dist/snp.unit.spec-MT57TGGQ.js +0 -171
  626. package/dist/snplocus-RSNKWY63.js +0 -203
  627. package/dist/spliceevent.a53ss.diagram-6N6YGYV7.js +0 -146
  628. package/dist/spliceevent.exonskip.diagram-LMNUS4XV.js +0 -278
  629. package/dist/spliceevent.noeventdiagram-LTBH4YD5.js +0 -455
  630. package/dist/ssGSEA-DPK4PDM2.js +0 -33
  631. package/dist/ssGSEA.unit.spec-K2SA7ME7.js +0 -83
  632. package/dist/stattable-PR47XT4F.js +0 -117
  633. package/dist/studyCatalog-GMUWIUL4.js +0 -378
  634. package/dist/studyCatalog-GMUWIUL4.js.map +0 -7
  635. package/dist/summarizeCnvGeneexp-YZEMDLES.js +0 -158
  636. package/dist/summarizeGeneexpSurvival-3TXV6ZNI.js +0 -105
  637. package/dist/summarizeMutationCnv-EBWSEHWJ.js +0 -159
  638. package/dist/summarizeMutationDiagnosis-FXA25W3O.js +0 -35
  639. package/dist/summarizeMutationSurvival-MR4AOMNS.js +0 -99
  640. package/dist/summary-4C6LGTMF.js +0 -42
  641. package/dist/summary.integration.spec-Y6JLH7NH.js +0 -409
  642. package/dist/summaryInput-NWT2DXWU.js +0 -242
  643. package/dist/sunburst-266MA7E2.js +0 -278
  644. package/dist/survival-CAZCIY2N.js +0 -53
  645. package/dist/survival-EILGNIY7.js +0 -1246
  646. package/dist/survival-EILGNIY7.js.map +0 -7
  647. package/dist/survival.integration.spec-34JJVLLI.js +0 -613
  648. package/dist/survival.integration.spec-34JJVLLI.js.map +0 -7
  649. package/dist/svgraph-OFUESREM.js +0 -1382
  650. package/dist/svmr-PVH42MY4.js +0 -3837
  651. package/dist/table-C2SICFZV.js +0 -197
  652. package/dist/termCollection-H4RL5WJG.js +0 -33
  653. package/dist/termCollection-TGYDI7NP.js +0 -252
  654. package/dist/termCollection.unit.spec-JSALS7GL.js +0 -299
  655. package/dist/termCollectionFractionSelection-YJVDNV4I.js +0 -42
  656. package/dist/termCollectionFractionSelection.unit.spec-4GM7P4ZW.js +0 -188
  657. package/dist/tk-RZCPSHJG.js +0 -1121
  658. package/dist/tk-SNTRA5CC.js +0 -41
  659. package/dist/tp.ui-2W4K3XH6.js +0 -1454
  660. package/dist/tvs.dt-GIPVC3R6.js +0 -34
  661. package/dist/tvs.dtcnv.categorical-TEYAS4OU.js +0 -35
  662. package/dist/tvs.dtcnv.continuous-VQRATYPZ.js +0 -67
  663. package/dist/tvs.dtfusion-P2KF5Z4H.js +0 -35
  664. package/dist/tvs.dtitd-TM6UROSH.js +0 -35
  665. package/dist/tvs.dtsnvindel-FZXC23NF.js +0 -35
  666. package/dist/tvs.dtsv-Y5QEJPYG.js +0 -35
  667. package/dist/tvs.numeric-3UXW4JHJ.js +0 -20
  668. package/dist/tvs.samplelst-MLAFPFER.js +0 -98
  669. package/dist/tvs.termCollection-ZQQDKESH.js +0 -124
  670. package/dist/vocabulary-JRUZPHMG.js +0 -36
  671. package/dist/wsi.direct-6QYNXOBY.js +0 -244
  672. package/dist/wsi.direct-6QYNXOBY.js.map +0 -7
  673. /package/dist/{2dmaf-JIY57FG6.js.map → 2dmaf-5OYM4MXA.js.map} +0 -0
  674. /package/dist/{AggMatrixInput-FH6WRTLP.js.map → AggMatrixInput-4VTI4Y6E.js.map} +0 -0
  675. /package/dist/{AggregateMatrix-MGEX5AVF.js.map → AggregateMatrix-K7SGNO63.js.map} +0 -0
  676. /package/dist/{AppHeader-FFOQFH55.js.map → AppHeader-WU6TO2OZ.js.map} +0 -0
  677. /package/dist/{BoxPlot-KCY4JVRX.js.map → BoxPlot-OW7U3XTF.js.map} +0 -0
  678. /package/dist/{CorrelationVolcano-E5URKQSM.js.map → CorrelationVolcano-B3JTTZHF.js.map} +0 -0
  679. /package/dist/{Cuminc-CBPMCKIC.js.map → Cuminc-AJEXWRU2.js.map} +0 -0
  680. /package/dist/{DifferentialAnalysis-XRBS4PZI.js.map → DifferentialAnalysis-BFCQBX5J.js.map} +0 -0
  681. /package/dist/{Disco-V2VJIDWG.js.map → Disco-ZJLVQRTC.js.map} +0 -0
  682. /package/dist/{Disco.UI-OEF5JXBU.js.map → Disco.UI-AEDACXW2.js.map} +0 -0
  683. /package/dist/{DmrPlot-KZUWJWBD.js.map → DmrPlot-QMRXAOM3.js.map} +0 -0
  684. /package/dist/{GB-IYTEMMU7.js.map → GB-MFU2UJ22.js.map} +0 -0
  685. /package/dist/{GSEA-QB62B5KB.js.map → GSEA-E3NHU22A.js.map} +0 -0
  686. /package/dist/{GeneExpInput-CXX7SXMQ.js.map → GeneExpInput-MIUNSOPY.js.map} +0 -0
  687. /package/dist/{Geomap-QNHSCN4N.js.map → Geomap-HAJG3STN.js.map} +0 -0
  688. /package/dist/{HicApp-UIULZYYJ.js.map → HicApp-ECFFIRWI.js.map} +0 -0
  689. /package/dist/{IDCViewer-B2JENGZZ.js.map → IDCViewer-TNSD3U2V.js.map} +0 -0
  690. /package/dist/{NumBinaryEditor-JOU2J23M.js.map → NumBinaryEditor-CNBGZ6WY.js.map} +0 -0
  691. /package/dist/{NumBinaryEditor.unit.spec-UXZBBVWL.js.map → NumBinaryEditor.unit.spec-SKFDALF3.js.map} +0 -0
  692. /package/dist/{NumContEditor-BJGP4PVS.js.map → NumContEditor-7ID2U7JL.js.map} +0 -0
  693. /package/dist/{NumContEditor.unit.spec-HEXOYIXC.js.map → NumContEditor.unit.spec-XHSQSAWK.js.map} +0 -0
  694. /package/dist/{NumCustomBinEditor-HDRTVWNK.js.map → NumCustomBinEditor-PAIPRJPO.js.map} +0 -0
  695. /package/dist/{NumCustomBinEditor.unit.spec-MN6QZ3ZB.js.map → NumCustomBinEditor.unit.spec-QYVZMMHV.js.map} +0 -0
  696. /package/dist/{NumDiscreteEditor-JUBR45IJ.js.map → NumDiscreteEditor-K2NZZQTH.js.map} +0 -0
  697. /package/dist/{NumDiscreteEditor.unit.spec-SDK2LR5B.js.map → NumDiscreteEditor.unit.spec-3CG5VEQL.js.map} +0 -0
  698. /package/dist/{NumRegularBinEditor-AQPRZ3MI.js.map → NumRegularBinEditor-EOVZ22TP.js.map} +0 -0
  699. /package/dist/{NumRegularBinEditor.unit.spec-GM3SFB2N.js.map → NumRegularBinEditor.unit.spec-FHTVH5FH.js.map} +0 -0
  700. /package/dist/{NumSplineEditor-LYLROEGE.js.map → NumSplineEditor-N3REMJUC.js.map} +0 -0
  701. /package/dist/{NumSplineEditor.unit.spec-3Q2HP6IB.js.map → NumSplineEditor.unit.spec-DZCP35GL.js.map} +0 -0
  702. /package/dist/{NumericDensity-3ZCDZORO.js.map → NumericDensity-42MWVI2S.js.map} +0 -0
  703. /package/dist/{NumericDensity.unit.spec-MNIAR2PR.js.map → NumericDensity.unit.spec-T2HHSQON.js.map} +0 -0
  704. /package/dist/{NumericHandler-MUNEB5IS.js.map → NumericHandler-5XU3SSPD.js.map} +0 -0
  705. /package/dist/{NumericHandler.unit.spec-KPWG2T27.js.map → NumericHandler.unit.spec-3F23KSAQ.js.map} +0 -0
  706. /package/dist/{ProteomeInput-NEUHQ2G4.js.map → ProteomeInput-UN2BUNRO.js.map} +0 -0
  707. /package/dist/{Regression-C75T5LOY.js.map → Regression-HWLJENA5.js.map} +0 -0
  708. /package/dist/{RunChart2-CMQ2BBSJ.js.map → RunChart2-YO55WE4M.js.map} +0 -0
  709. /package/dist/{SC-HYK26DXI.js.map → SC-LEDJ4DQR.js.map} +0 -0
  710. /package/dist/{Violin-J5Z3NKMU.js.map → Violin-E6PDJZ2B.js.map} +0 -0
  711. /package/dist/{Wsi-ZP36MKK7.js.map → Wsi-S675CYTW.js.map} +0 -0
  712. /package/dist/{adSandbox-W4THMDUI.js.map → adSandbox-ZJQ5ZW2T.js.map} +0 -0
  713. /package/dist/{animatedBubbleChart-2IVR2WC3.js.map → animatedBubbleChart-LRUS7W36.js.map} +0 -0
  714. /package/dist/{app-LAIPU5IO.js.map → app-7Q3QIBU4.js.map} +0 -0
  715. /package/dist/{app-WMRDJINC.js.map → app-PKSI4MV5.js.map} +0 -0
  716. /package/dist/{bam-44WCWB5P.js.map → bam-X5JH5ZT7.js.map} +0 -0
  717. /package/dist/{barchart-P6XKCJRF.js.map → barchart-UT6J4L2N.js.map} +0 -0
  718. /package/dist/{barchart2-5NTYCQYN.js.map → barchart2-ZG5QJO3C.js.map} +0 -0
  719. /package/dist/{block-VEOD6CP4.js.map → block-TC466NGW.js.map} +0 -0
  720. /package/dist/{block.init-RCPDUYAV.js.map → block.init-CIBNSYAC.js.map} +0 -0
  721. /package/dist/{block.mds.expressionrank-KALPK27B.js.map → block.mds.expressionrank-EY5PCQCK.js.map} +0 -0
  722. /package/dist/{block.mds.geneboxplot-ZASU25BG.js.map → block.mds.geneboxplot-R6AOMHO5.js.map} +0 -0
  723. /package/dist/{block.mds.junction-DCVGVSYG.js.map → block.mds.junction-JMV6FNYC.js.map} +0 -0
  724. /package/dist/{block.mds.svcnv-CEGYMRSE.js.map → block.mds.svcnv-IHTV3QYG.js.map} +0 -0
  725. /package/dist/{block.svg-AW4E7NSS.js.map → block.svg-NTFLVQAQ.js.map} +0 -0
  726. /package/dist/{block.tk.aicheck-4ZPFLI5I.js.map → block.tk.aicheck-FYPL32Y4.js.map} +0 -0
  727. /package/dist/{block.tk.ase-F3VMNBE3.js.map → block.tk.ase-FWCB6VBO.js.map} +0 -0
  728. /package/dist/{block.tk.bam-3VDSEMVO.js.map → block.tk.bam-Q5UFUABN.js.map} +0 -0
  729. /package/dist/{block.tk.bedgraphdot-3F6AMWFD.js.map → block.tk.bedgraphdot-KBI3GFDM.js.map} +0 -0
  730. /package/dist/{block.tk.bigwig.ui-QO334QC3.js.map → block.tk.bigwig.ui-KXNFX7G7.js.map} +0 -0
  731. /package/dist/{block.tk.hicstraw-VA7GNOOD.js.map → block.tk.hicstraw-MQBH3YAJ.js.map} +0 -0
  732. /package/dist/{block.tk.junction-7WIZ63R7.js.map → block.tk.junction-EBTVXLJH.js.map} +0 -0
  733. /package/dist/{block.tk.junction.textmatrixui-ZHSVODGI.js.map → block.tk.junction.textmatrixui-ETYLCP2O.js.map} +0 -0
  734. /package/dist/{block.tk.ld-JME4SP6A.js.map → block.tk.ld-NLB6L6WQ.js.map} +0 -0
  735. /package/dist/{block.tk.menu-7BFQTH3Q.js.map → block.tk.menu-PJLCOXVJ.js.map} +0 -0
  736. /package/dist/{block.tk.pgv-C2N7UFYT.js.map → block.tk.pgv-JOIQVWL2.js.map} +0 -0
  737. /package/dist/{brainImaging-6XFUKFZE.js.map → brainImaging-SPRC3QFB.js.map} +0 -0
  738. /package/dist/{bubbleHeatmap-YO4232WO.js.map → bubbleHeatmap-CFTZ5RXH.js.map} +0 -0
  739. /package/dist/{cellTypeBubbleHeatmap-GM4BGCQ3.js.map → cellTypeBubbleHeatmap-DXPLFT5U.js.map} +0 -0
  740. /package/dist/{chunk-UBZRZ3PS.js.map → chunk-2BQ572SL.js.map} +0 -0
  741. /package/dist/{chunk-AAM7HHPU.js.map → chunk-2DQIQYY3.js.map} +0 -0
  742. /package/dist/{chunk-YZVWOQBP.js.map → chunk-2POQWEK6.js.map} +0 -0
  743. /package/dist/{chunk-ZB3RP5QP.js.map → chunk-2SQEVMAL.js.map} +0 -0
  744. /package/dist/{chunk-5VMEMA4O.js.map → chunk-37HTZ6IG.js.map} +0 -0
  745. /package/dist/{chunk-K5YG7MVJ.js.map → chunk-452765PG.js.map} +0 -0
  746. /package/dist/{chunk-DAJT3XVZ.js.map → chunk-4DXQJGJ7.js.map} +0 -0
  747. /package/dist/{chunk-E3O6ZEWQ.js.map → chunk-5DBW3WLK.js.map} +0 -0
  748. /package/dist/{chunk-WVPFLPWB.js.map → chunk-5ILEFNXJ.js.map} +0 -0
  749. /package/dist/{chunk-6SKLD7JU.js.map → chunk-5UO7MKCO.js.map} +0 -0
  750. /package/dist/{chunk-H555QBYP.js.map → chunk-7R7P6VMT.js.map} +0 -0
  751. /package/dist/{chunk-D6G64XPJ.js.map → chunk-7X6NF7NI.js.map} +0 -0
  752. /package/dist/{chunk-ZU47ERPU.js.map → chunk-ANGLZ4XR.js.map} +0 -0
  753. /package/dist/{chunk-KWLBPOPE.js.map → chunk-BMQDU7KN.js.map} +0 -0
  754. /package/dist/{chunk-GAW2EETX.js.map → chunk-C5TU4AYP.js.map} +0 -0
  755. /package/dist/{chunk-PT5JDHPR.js.map → chunk-DHNET3P4.js.map} +0 -0
  756. /package/dist/{chunk-EJ3SSI5J.js.map → chunk-EGKHDALO.js.map} +0 -0
  757. /package/dist/{chunk-4Q46RDNU.js.map → chunk-EPWGUWQP.js.map} +0 -0
  758. /package/dist/{chunk-JG6SE6YU.js.map → chunk-F3EYPES3.js.map} +0 -0
  759. /package/dist/{chunk-BEJJS2HC.js.map → chunk-F4DM3WS4.js.map} +0 -0
  760. /package/dist/{chunk-BZYTL2EU.js.map → chunk-FTLCINDC.js.map} +0 -0
  761. /package/dist/{chunk-6RN4RVKF.js.map → chunk-GT6WJUJY.js.map} +0 -0
  762. /package/dist/{chunk-S6XG74R4.js.map → chunk-GWCK5QGV.js.map} +0 -0
  763. /package/dist/{chunk-DUGOFIQS.js.map → chunk-HJSGHFJ6.js.map} +0 -0
  764. /package/dist/{chunk-HWMZ2OHD.js.map → chunk-HS6BTSFX.js.map} +0 -0
  765. /package/dist/{chunk-DMT6S5HJ.js.map → chunk-IB5TKNG5.js.map} +0 -0
  766. /package/dist/{chunk-NGBQL4CM.js.map → chunk-IIMTOPH3.js.map} +0 -0
  767. /package/dist/{chunk-FSDY4QVA.js.map → chunk-JAXN3Q3K.js.map} +0 -0
  768. /package/dist/{chunk-GQ6T62VJ.js.map → chunk-KIRZXPMB.js.map} +0 -0
  769. /package/dist/{chunk-JVRGY6IU.js.map → chunk-L32KMIC3.js.map} +0 -0
  770. /package/dist/{chunk-4YEDSMFX.js.map → chunk-LB7NENEB.js.map} +0 -0
  771. /package/dist/{chunk-2YDQC5BV.js.map → chunk-LDWMVZYF.js.map} +0 -0
  772. /package/dist/{chunk-UM5NWVMA.js.map → chunk-M367Y7ML.js.map} +0 -0
  773. /package/dist/{chunk-VSPUFGDX.js.map → chunk-M4XXKTH2.js.map} +0 -0
  774. /package/dist/{chunk-AK3SW3VT.js.map → chunk-ME7OF3CS.js.map} +0 -0
  775. /package/dist/{chunk-JXUFZZRJ.js.map → chunk-N2CXLMNX.js.map} +0 -0
  776. /package/dist/{chunk-HKQDZKSF.js.map → chunk-N7DVQTPC.js.map} +0 -0
  777. /package/dist/{chunk-KLGNLUXR.js.map → chunk-N7TD7N7D.js.map} +0 -0
  778. /package/dist/{chunk-XHOL37O6.js.map → chunk-NBX6TT5C.js.map} +0 -0
  779. /package/dist/{chunk-GI3RVOO4.js.map → chunk-NSRGYBDM.js.map} +0 -0
  780. /package/dist/{chunk-3QMXNK7G.js.map → chunk-NVS7KYYI.js.map} +0 -0
  781. /package/dist/{chunk-BMVRYEN2.js.map → chunk-OVPEMVXT.js.map} +0 -0
  782. /package/dist/{chunk-7C45EYL6.js.map → chunk-OXWLQQXL.js.map} +0 -0
  783. /package/dist/{chunk-WFOC4W5A.js.map → chunk-QGGSYEVJ.js.map} +0 -0
  784. /package/dist/{chunk-OYHID2D7.js.map → chunk-QLEVONLD.js.map} +0 -0
  785. /package/dist/{chunk-MCRWA655.js.map → chunk-RNWHB5DI.js.map} +0 -0
  786. /package/dist/{chunk-FUEJFIQX.js.map → chunk-RUHLDUOT.js.map} +0 -0
  787. /package/dist/{chunk-TAEU6SPJ.js.map → chunk-RV34WFGZ.js.map} +0 -0
  788. /package/dist/{chunk-4C2N2BQC.js.map → chunk-SDVE5ECI.js.map} +0 -0
  789. /package/dist/{chunk-VRY7WSS6.js.map → chunk-SWO6DZTG.js.map} +0 -0
  790. /package/dist/{chunk-6JBLNS4D.js.map → chunk-SYPSS3JQ.js.map} +0 -0
  791. /package/dist/{chunk-XPB2GP3C.js.map → chunk-TDM3645O.js.map} +0 -0
  792. /package/dist/{chunk-66BJC6ZX.js.map → chunk-VVO3R5JV.js.map} +0 -0
  793. /package/dist/{chunk-CLOHFGFX.js.map → chunk-VYEU6Y35.js.map} +0 -0
  794. /package/dist/{chunk-XPVU5AMT.js.map → chunk-WGXC6IEF.js.map} +0 -0
  795. /package/dist/{chunk-GF6CKFXE.js.map → chunk-WPDM57B5.js.map} +0 -0
  796. /package/dist/{chunk-VHDVTQFR.js.map → chunk-WS7WKS2B.js.map} +0 -0
  797. /package/dist/{chunk-X7IAKV5Z.js.map → chunk-X63NSV33.js.map} +0 -0
  798. /package/dist/{chunk-KAUMP3RR.js.map → chunk-XXNRSSBR.js.map} +0 -0
  799. /package/dist/{chunk-ONXYJWY6.js.map → chunk-YD6UGDFI.js.map} +0 -0
  800. /package/dist/{chunk-JSVLKCIQ.js.map → chunk-YRIYDFNU.js.map} +0 -0
  801. /package/dist/{chunk-DO4SLQNP.js.map → chunk-YY5WQQ3J.js.map} +0 -0
  802. /package/dist/{chunk-YLJOZP4P.js.map → chunk-Z2ZITHT4.js.map} +0 -0
  803. /package/dist/{chunk-YLWSTPPL.js.map → chunk-Z4SM3FBK.js.map} +0 -0
  804. /package/dist/{chunk-AFMD6226.js.map → chunk-ZEYEIUEZ.js.map} +0 -0
  805. /package/dist/{chunk-LXTBOUBG.js.map → chunk-ZLYTDHQP.js.map} +0 -0
  806. /package/dist/{chunk-GTMHDSOQ.js.map → chunk-ZWCVRVV4.js.map} +0 -0
  807. /package/dist/{cohort-ZTT2PSQA.js.map → cohort-FZNMFWOX.js.map} +0 -0
  808. /package/dist/{condition-L5DXIAJT.js.map → condition-AJJLFCBQ.js.map} +0 -0
  809. /package/dist/{controls-ROZP2O7A.js.map → controls-SZOLV37V.js.map} +0 -0
  810. /package/dist/{controls.config-YQKGHMIP.js.map → controls.config-CVP75WFA.js.map} +0 -0
  811. /package/dist/{correlation-6AKRIQXN.js.map → correlation-UFJFQHQ3.js.map} +0 -0
  812. /package/dist/{customdata.inputui-DD3OFHUS.js.map → customdata.inputui-HOVA4A6O.js.map} +0 -0
  813. /package/dist/{dataDownload-VHHSLSZV.js.map → dataDownload-VTUG4IOK.js.map} +0 -0
  814. /package/dist/{databrowser.ui-RLYJOEWQ.js.map → databrowser.ui-O5S4Y4EK.js.map} +0 -0
  815. /package/dist/{dictionary-IMOOQHIH.js.map → dictionary-L2UNNNP7.js.map} +0 -0
  816. /package/dist/{dnaMethylation-T6XUIOJF.js.map → dnaMethylation-B4SWZI4O.js.map} +0 -0
  817. /package/dist/{dnaMethylation.integration.spec-NRJOIDRD.js.map → dnaMethylation.integration.spec-ANJAMNYJ.js.map} +0 -0
  818. /package/dist/{dofetch-MLAEV3A2.js.map → dofetch-F5XSHQIS.js.map} +0 -0
  819. /package/dist/{e2pca-F3TGJOMW.js.map → e2pca-66ARIMKL.js.map} +0 -0
  820. /package/dist/{ep-UAF6OL2Y.js.map → ep-OFGJYVUY.js.map} +0 -0
  821. /package/dist/{expclust.gdc.spec-GHH3JQ65.js.map → expclust.gdc.spec-22RXQTTP.js.map} +0 -0
  822. /package/dist/{facet-MB4C7GII.js.map → facet-GVZQ3RPN.js.map} +0 -0
  823. /package/dist/{gb-C5YSAFWP.js.map → gb-HEPGVYEK.js.map} +0 -0
  824. /package/dist/{geneExpClustering-3BRSI5BR.js.map → geneExpClustering-3NU2U422.js.map} +0 -0
  825. /package/dist/{geneExpression-K3IZLSYC.js.map → geneExpression-FXQ4L2J2.js.map} +0 -0
  826. /package/dist/{geneExpression-SIAPRA3E.js.map → geneExpression-XYVYJJA5.js.map} +0 -0
  827. /package/dist/{geneExpression.unit.spec-I66QVNT5.js.map → geneExpression.unit.spec-K3FIRSNK.js.map} +0 -0
  828. /package/dist/{geneORA-SLM3SNNS.js.map → geneORA-5M2JSDMF.js.map} +0 -0
  829. /package/dist/{geneRanking-4EFYOR6A.js.map → geneRanking-TP3R3CS3.js.map} +0 -0
  830. /package/dist/{geneVariant-Z3BUIBLS.js.map → geneVariant-232EYUFJ.js.map} +0 -0
  831. /package/dist/{geneVariant-O347F2OY.js.map → geneVariant-BHXTPUDC.js.map} +0 -0
  832. /package/dist/{geneVariant.integration.spec-ZZ65EYEL.js.map → geneVariant.integration.spec-ICFHVFIR.js.map} +0 -0
  833. /package/dist/{genefusion.ui-TK6UKPDR.js.map → genefusion.ui-ABRCUQFC.js.map} +0 -0
  834. /package/dist/{geneset-MVXSEOKZ.js.map → geneset-N42FIVA6.js.map} +0 -0
  835. /package/dist/{genomeBrowser.spec-QDB4Z2L6.js.map → genomeBrowser.spec-5HKQKLRU.js.map} +0 -0
  836. /package/dist/{grin2-P6Z45MCJ.js.map → grin2-H2KJYLP6.js.map} +0 -0
  837. /package/dist/{grin2-DCU6PLPU.js.map → grin2-NGMTEMXF.js.map} +0 -0
  838. /package/dist/{hierCluster-3H47NLKS.js.map → hierCluster-JU5JPLM7.js.map} +0 -0
  839. /package/dist/{hierCluster-JG6VXTCV.js.map → hierCluster-LSSH275H.js.map} +0 -0
  840. /package/dist/{hierCluster.config-IP6I7RTS.js.map → hierCluster.config-ILOR7GBB.js.map} +0 -0
  841. /package/dist/{hierCluster.integration.spec-7PUNHRRS.js.map → hierCluster.integration.spec-CNR5OJOH.js.map} +0 -0
  842. /package/dist/{hierCluster.interactivity-FIDVRACV.js.map → hierCluster.interactivity-TLEIVTFK.js.map} +0 -0
  843. /package/dist/{hierCluster.renderers-QMJWUPAI.js.map → hierCluster.renderers-P7JNIT3N.js.map} +0 -0
  844. /package/dist/{imagePlot-CXYKBCWS.js.map → imagePlot-BF67SXQR.js.map} +0 -0
  845. /package/dist/{importPlot-Z4A54RXH.js.map → importPlot-OHXSXNZN.js.map} +0 -0
  846. /package/dist/{isoformExpression-DMDV2PZY.js.map → isoformExpression-4VKHE4HA.js.map} +0 -0
  847. /package/dist/{isoformExpression.unit.spec-W2LIYOXS.js.map → isoformExpression.unit.spec-4TVSIFG4.js.map} +0 -0
  848. /package/dist/{junction-R5GMEO7Z.js.map → junction-VUHORV43.js.map} +0 -0
  849. /package/dist/{junction.customTerm-AI44GNFV.js.map → junction.customTerm-FRYWSS4P.js.map} +0 -0
  850. /package/dist/{junction.unit.spec-SCRCANOC.js.map → junction.unit.spec-KKVLYT7Q.js.map} +0 -0
  851. /package/dist/{launch.adhoc-THLTYZJT.js.map → launch.adhoc-UDYMFZTQ.js.map} +0 -0
  852. /package/dist/{leftlabel.sample-GKQXEY4J.js.map → leftlabel.sample-R5FFBWG3.js.map} +0 -0
  853. /package/dist/{legacyDataset-27L4DMCL.js.map → legacyDataset-IEFWFVS6.js.map} +0 -0
  854. /package/dist/{lollipop-2TW6GGPY.js.map → lollipop-3IX6ZYUN.js.map} +0 -0
  855. /package/dist/{maf-A4PVW5V2.js.map → maf-42UFYSL4.js.map} +0 -0
  856. /package/dist/{maftimeline-QMX3HOAU.js.map → maftimeline-M5WYEN62.js.map} +0 -0
  857. /package/dist/{matrix-BGRYRU3T.js.map → matrix-CI76EDHU.js.map} +0 -0
  858. /package/dist/{matrix-GPXTUVCQ.js.map → matrix-WJZKA6VR.js.map} +0 -0
  859. /package/dist/{matrix.cells-C6OY7F5T.js.map → matrix.cells-ZFKVIPDC.js.map} +0 -0
  860. /package/dist/{matrix.config-Z5ZGHXDV.js.map → matrix.config-24TFHBEM.js.map} +0 -0
  861. /package/dist/{matrix.data-WB26I3TF.js.map → matrix.data-NCGZPNWR.js.map} +0 -0
  862. /package/dist/{matrix.groups-C2V2CV4A.js.map → matrix.groups-XQJTGM6M.js.map} +0 -0
  863. /package/dist/{matrix.integration.spec-3COAXQBV.js.map → matrix.integration.spec-OGXZUDE6.js.map} +0 -0
  864. /package/dist/{matrix.interactivity-NGHIQR3A.js.map → matrix.interactivity-ZOOTPNSW.js.map} +0 -0
  865. /package/dist/{matrix.layout-NYIOESGN.js.map → matrix.layout-5J2YENK3.js.map} +0 -0
  866. /package/dist/{matrix.legend-Q5HHWP5Q.js.map → matrix.legend-U36VCS46.js.map} +0 -0
  867. /package/dist/{matrix.renderers-GLXZARIP.js.map → matrix.renderers-4KFE7ZVR.js.map} +0 -0
  868. /package/dist/{matrix.serieses-LDQEPXPD.js.map → matrix.serieses-AW7XBXLJ.js.map} +0 -0
  869. /package/dist/{matrix.sort-44TQNRIX.js.map → matrix.sort-7PMECLOE.js.map} +0 -0
  870. /package/dist/{matrix.sort.unit.spec-T3BDWJ3Z.js.map → matrix.sort.unit.spec-GIA2YOTQ.js.map} +0 -0
  871. /package/dist/{matrix.sorterUi-6Y4YBQYL.js.map → matrix.sorterUi-J6PRUT6J.js.map} +0 -0
  872. /package/dist/{matrix.sorterUi.unit.spec-NHUYNMNU.js.map → matrix.sorterUi.unit.spec-OPGKZZL6.js.map} +0 -0
  873. /package/dist/{matrix.unit.spec-C7IRIBN6.js.map → matrix.unit.spec-7UIVVR4T.js.map} +0 -0
  874. /package/dist/{mavb-E37LI73X.js.map → mavb-MSYUMT6W.js.map} +0 -0
  875. /package/dist/{mds.fimo-YTGX7VEN.js.map → mds.fimo-OYEAQP37.js.map} +0 -0
  876. /package/dist/{mds.samplescatterplot-FFGGJSI3.js.map → mds.samplescatterplot-EXISSRQQ.js.map} +0 -0
  877. /package/dist/{mds.survivalplot-NCWRXXV4.js.map → mds.survivalplot-SZST6BLN.js.map} +0 -0
  878. /package/dist/{multivalue-N7A2PU5K.js.map → multivalue-YDE7L75Y.js.map} +0 -0
  879. /package/dist/{numericDictTermCluster-AKQKRBQH.js.map → numericDictTermCluster-5AKP6ICC.js.map} +0 -0
  880. /package/dist/{oncomatrix-QPVGACMF.js.map → oncomatrix-2OEIYWR6.js.map} +0 -0
  881. /package/dist/{oncomatrix.spec-6L2NDN2G.js.map → oncomatrix.spec-CXQW4JWU.js.map} +0 -0
  882. /package/dist/{plot.2dvaf-6TLON77B.js.map → plot.2dvaf-LN7A3NNC.js.map} +0 -0
  883. /package/dist/{plot.app-VM273TXU.js.map → plot.app-YIQOY2Z7.js.map} +0 -0
  884. /package/dist/{plot.barplot-IQTZURHK.js.map → plot.barplot-HF2J25XP.js.map} +0 -0
  885. /package/dist/{plot.boxplot-WEXB6HII.js.map → plot.boxplot-YJH4L27U.js.map} +0 -0
  886. /package/dist/{plot.brainImaging-REGSSBHV.js.map → plot.brainImaging-PS4TRSPI.js.map} +0 -0
  887. /package/dist/{plot.disco-F25Z3FQL.js.map → plot.disco-BN5RNZ6Q.js.map} +0 -0
  888. /package/dist/{plot.ssgq-CRRK26RS.js.map → plot.ssgq-N2HTOIY3.js.map} +0 -0
  889. /package/dist/{plot.vaf2cov-WCNPZKXK.js.map → plot.vaf2cov-6AOHRUQ2.js.map} +0 -0
  890. /package/dist/{polar2-MH5GPXHJ.js.map → polar2-TC5OEJRE.js.map} +0 -0
  891. /package/dist/{profileForms-2YX2OYDI.js.map → profileForms-5WV2TSBB.js.map} +0 -0
  892. /package/dist/{profilePlot-FUTMZ2PP.js.map → profilePlot-OJLLW44P.js.map} +0 -0
  893. /package/dist/{pseudbulk.unit.spec-S7FDL3IX.js.map → pseudbulk.unit.spec-RAYRGN6C.js.map} +0 -0
  894. /package/dist/{pseudobulk-A3LB23N2.js.map → pseudobulk-ADHAYVSQ.js.map} +0 -0
  895. /package/dist/{qualitative-5VJRMF4S.js.map → qualitative-JXEI3IYC.js.map} +0 -0
  896. /package/dist/{radar2-2SJX4ZXN.js.map → radar2-BWTKSTT3.js.map} +0 -0
  897. /package/dist/{radarFacility2-7FPO34JS.js.map → radarFacility2-WIRSKTDG.js.map} +0 -0
  898. /package/dist/{rememberedGvQ.unit.spec-WOQVPQ75.js.map → rememberedGvQ.unit.spec-N43O4YTF.js.map} +0 -0
  899. /package/dist/{render-ZLA2RRBP.js.map → render-J7WOYBOL.js.map} +0 -0
  900. /package/dist/{report-VCE6RILD.js.map → report-DRPCXX2B.js.map} +0 -0
  901. /package/dist/{sampleView-QYTX4OLI.js.map → sampleView-BV6BQGGQ.js.map} +0 -0
  902. /package/dist/{samplelst-7NGH3SUM.js.map → samplelst-ZD63EYO7.js.map} +0 -0
  903. /package/dist/{samplematrix-SNAR6IBB.js.map → samplematrix-ZZ3DVELU.js.map} +0 -0
  904. /package/dist/{sc-2JETYAI4.js.map → sc-MUI43YTB.js.map} +0 -0
  905. /package/dist/{scatter-GHBQM2RR.js.map → scatter-7B44HTKN.js.map} +0 -0
  906. /package/dist/{scatter-D7VZOBEE.js.map → scatter-UEDVIE4Y.js.map} +0 -0
  907. /package/dist/{selectGenomeWithTklst-BD4GMGX3.js.map → selectGenomeWithTklst-WGOKGVZ5.js.map} +0 -0
  908. /package/dist/{singleCellCellType-XHLOJVVC.js.map → singleCellCellType-Z7OXK7PI.js.map} +0 -0
  909. /package/dist/{singleCellCellType.unit.spec-LCLR3IOD.js.map → singleCellCellType.unit.spec-IIOVCCJQ.js.map} +0 -0
  910. /package/dist/{singleCellGeneExpression-JRBONI5C.js.map → singleCellGeneExpression-LYZAIJ2Z.js.map} +0 -0
  911. /package/dist/{singleCellGeneExpression.unit.spec-Z2KSVCIG.js.map → singleCellGeneExpression.unit.spec-67AAWZTG.js.map} +0 -0
  912. /package/dist/{singleCellPlot-4462CQHF.js.map → singleCellPlot-TXPYQLSH.js.map} +0 -0
  913. /package/dist/{singlecell-SO3B5KJ7.js.map → singlecell-22OG6HNI.js.map} +0 -0
  914. /package/dist/{singlecell-CDUQ6MTO.js.map → singlecell-7TBALI2S.js.map} +0 -0
  915. /package/dist/{snp-YE2MXKJO.js.map → snp-3U2G3Z57.js.map} +0 -0
  916. /package/dist/{snp.unit.spec-MT57TGGQ.js.map → snp.unit.spec-BMBBUBYD.js.map} +0 -0
  917. /package/dist/{snplocus-RSNKWY63.js.map → snplocus-SSVZDIQV.js.map} +0 -0
  918. /package/dist/{spliceevent.a53ss.diagram-6N6YGYV7.js.map → spliceevent.a53ss.diagram-FK7CN4AU.js.map} +0 -0
  919. /package/dist/{spliceevent.exonskip.diagram-LMNUS4XV.js.map → spliceevent.exonskip.diagram-EFLGV3O4.js.map} +0 -0
  920. /package/dist/{spliceevent.noeventdiagram-LTBH4YD5.js.map → spliceevent.noeventdiagram-2DYO7CCZ.js.map} +0 -0
  921. /package/dist/{ssGSEA-DPK4PDM2.js.map → ssGSEA-52LWBQJP.js.map} +0 -0
  922. /package/dist/{ssGSEA.unit.spec-K2SA7ME7.js.map → ssGSEA.unit.spec-3JV6WHUQ.js.map} +0 -0
  923. /package/dist/{stattable-PR47XT4F.js.map → stattable-RLMYQ4G6.js.map} +0 -0
  924. /package/dist/{summarizeCnvGeneexp-YZEMDLES.js.map → summarizeCnvGeneexp-QPRYAKC2.js.map} +0 -0
  925. /package/dist/{summarizeGeneexpSurvival-3TXV6ZNI.js.map → summarizeGeneexpSurvival-RWVQXEKB.js.map} +0 -0
  926. /package/dist/{summarizeMutationCnv-EBWSEHWJ.js.map → summarizeMutationCnv-DW5F6NUJ.js.map} +0 -0
  927. /package/dist/{summarizeMutationDiagnosis-FXA25W3O.js.map → summarizeMutationDiagnosis-5FOQ7CHI.js.map} +0 -0
  928. /package/dist/{summarizeMutationSurvival-MR4AOMNS.js.map → summarizeMutationSurvival-4UKB4EVO.js.map} +0 -0
  929. /package/dist/{summary-4C6LGTMF.js.map → summary-TYC6QNT4.js.map} +0 -0
  930. /package/dist/{summary.integration.spec-Y6JLH7NH.js.map → summary.integration.spec-5GLJJZNM.js.map} +0 -0
  931. /package/dist/{summaryInput-NWT2DXWU.js.map → summaryInput-4IJGKW4P.js.map} +0 -0
  932. /package/dist/{sunburst-266MA7E2.js.map → sunburst-G7DGATWP.js.map} +0 -0
  933. /package/dist/{survival-CAZCIY2N.js.map → survival-MKNABJPU.js.map} +0 -0
  934. /package/dist/{svgraph-OFUESREM.js.map → svgraph-VB7JWWR5.js.map} +0 -0
  935. /package/dist/{svmr-PVH42MY4.js.map → svmr-VLQIO2U5.js.map} +0 -0
  936. /package/dist/{table-C2SICFZV.js.map → table-EAXMDWOY.js.map} +0 -0
  937. /package/dist/{termCollection-TGYDI7NP.js.map → termCollection-5LG7ICQY.js.map} +0 -0
  938. /package/dist/{termCollection-H4RL5WJG.js.map → termCollection-SB6MWLFK.js.map} +0 -0
  939. /package/dist/{termCollection.unit.spec-JSALS7GL.js.map → termCollection.unit.spec-H5ITGTR3.js.map} +0 -0
  940. /package/dist/{termCollectionFractionSelection-YJVDNV4I.js.map → termCollectionFractionSelection-2XZSTDCQ.js.map} +0 -0
  941. /package/dist/{termCollectionFractionSelection.unit.spec-4GM7P4ZW.js.map → termCollectionFractionSelection.unit.spec-BIO7V6KA.js.map} +0 -0
  942. /package/dist/{tk-RZCPSHJG.js.map → tk-TRWYZLQ2.js.map} +0 -0
  943. /package/dist/{tk-SNTRA5CC.js.map → tk-VZI5HNSX.js.map} +0 -0
  944. /package/dist/{tp.ui-2W4K3XH6.js.map → tp.ui-J5SNNAT3.js.map} +0 -0
  945. /package/dist/{tvs.dt-GIPVC3R6.js.map → tvs.dt-6YHFJPER.js.map} +0 -0
  946. /package/dist/{tvs.dtcnv.categorical-TEYAS4OU.js.map → tvs.dtcnv.categorical-WTIE63GM.js.map} +0 -0
  947. /package/dist/{tvs.dtcnv.continuous-VQRATYPZ.js.map → tvs.dtcnv.continuous-OCMKGTF5.js.map} +0 -0
  948. /package/dist/{tvs.dtfusion-P2KF5Z4H.js.map → tvs.dtfusion-CA23UNM3.js.map} +0 -0
  949. /package/dist/{tvs.dtitd-TM6UROSH.js.map → tvs.dtitd-VSYMR3OD.js.map} +0 -0
  950. /package/dist/{tvs.dtsnvindel-FZXC23NF.js.map → tvs.dtsnvindel-YBNO3CYF.js.map} +0 -0
  951. /package/dist/{tvs.dtsv-Y5QEJPYG.js.map → tvs.dtsv-S743GBB5.js.map} +0 -0
  952. /package/dist/{tvs.numeric-3UXW4JHJ.js.map → tvs.numeric-22AHXO5K.js.map} +0 -0
  953. /package/dist/{tvs.samplelst-MLAFPFER.js.map → tvs.samplelst-XAJO4EM6.js.map} +0 -0
  954. /package/dist/{tvs.termCollection-ZQQDKESH.js.map → tvs.termCollection-QOVJGAUC.js.map} +0 -0
  955. /package/dist/{vocabulary-JRUZPHMG.js.map → vocabulary-6EADTHP3.js.map} +0 -0
@@ -0,0 +1,3389 @@
1
+ import {
2
+ InvalidDataUI,
3
+ PlotBase,
4
+ configUiInit,
5
+ fillbar,
6
+ getMaxLabelWidth,
7
+ getNormalRoot,
8
+ renderTable,
9
+ svgLegend,
10
+ table2col
11
+ } from "./chunk-Q5SK3U2T.js";
12
+ import "./chunk-HJ6L54YS.js";
13
+ import "./chunk-KV4W2ACA.js";
14
+ import "./chunk-54KC7DAB.js";
15
+ import "./chunk-N7DVQTPC.js";
16
+ import {
17
+ Menu
18
+ } from "./chunk-ELJX3QIQ.js";
19
+ import "./chunk-EEB5VE2A.js";
20
+ import {
21
+ topBarInit
22
+ } from "./chunk-6RRZRISL.js";
23
+ import "./chunk-2KM4PRQM.js";
24
+ import {
25
+ dofetch3
26
+ } from "./chunk-RPDVFM7E.js";
27
+ import "./chunk-M4XXKTH2.js";
28
+ import "./chunk-5ILEFNXJ.js";
29
+ import {
30
+ bplen,
31
+ dtcnv,
32
+ dtfusionrna,
33
+ dtitd,
34
+ dtloh,
35
+ dtsnvindel,
36
+ dtsv,
37
+ mclass,
38
+ mclassitd
39
+ } from "./chunk-IZUYLFOX.js";
40
+ import {
41
+ copyMerge,
42
+ getCompInit,
43
+ multiInit
44
+ } from "./chunk-WINIL2KN.js";
45
+ import "./chunk-PF4DSFDR.js";
46
+ import "./chunk-7X6NF7NI.js";
47
+ import "./chunk-W5J3LTYS.js";
48
+ import {
49
+ arc_default,
50
+ line_default,
51
+ pie_default,
52
+ ribbon_default
53
+ } from "./chunk-Z2ZITHT4.js";
54
+ import {
55
+ linear,
56
+ ticks
57
+ } from "./chunk-4OLM3KSB.js";
58
+ import "./chunk-FXQXCOII.js";
59
+ import "./chunk-TLT4YIG3.js";
60
+ import "./chunk-5R63Q5KH.js";
61
+ import {
62
+ pointer_default,
63
+ select_default
64
+ } from "./chunk-I6Y4O3RR.js";
65
+ import "./chunk-Q5RDQNIT.js";
66
+ import "./chunk-DQC5FFGV.js";
67
+ import "./chunk-HS5PO5ZQ.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-VB7JWWR5.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-CIBNSYAC.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/snv/vafTooltip.ts
452
+ function getIntegerCount(v) {
453
+ if (Number.isInteger(v)) return v;
454
+ if (typeof v == "string" && /^-?\d+$/.test(v)) {
455
+ const n = Number(v);
456
+ if (Number.isInteger(n)) return n;
457
+ }
458
+ return null;
459
+ }
460
+ function getReadCounts(refCountValue, altCountValue, totalCountValue) {
461
+ const altCount = getIntegerCount(altCountValue);
462
+ if (altCount == null || altCount < 0) return null;
463
+ const totalCount = getIntegerCount(totalCountValue);
464
+ if (totalCount != null) {
465
+ if (totalCount <= 0 || totalCount < altCount) return null;
466
+ return { altCount, refCount: totalCount - altCount, totalCount };
467
+ }
468
+ const refCount = getIntegerCount(refCountValue);
469
+ if (refCount == null || refCount < 0 || refCount + altCount <= 0) return null;
470
+ return { altCount, refCount, totalCount: refCount + altCount };
471
+ }
472
+ function hasValidReadCounts(refCountValue, altCountValue, totalCountValue) {
473
+ return getReadCounts(refCountValue, altCountValue, totalCountValue) != null;
474
+ }
475
+ function getVafEntries(vafs) {
476
+ const entries = [];
477
+ if (Array.isArray(vafs)) {
478
+ for (const vaf of vafs) {
479
+ const label = vaf?.id || vaf?.name;
480
+ const refCount = vaf?.refCount;
481
+ const totalCount = vaf?.totalCount;
482
+ const altCount = vaf?.altCount;
483
+ if (!label || altCount == null || refCount == null && totalCount == null) continue;
484
+ const entry = { label, altCount };
485
+ if (refCount != null) entry.refCount = refCount;
486
+ if (totalCount != null) entry.totalCount = totalCount;
487
+ entries.push(entry);
488
+ }
489
+ }
490
+ return entries;
491
+ }
492
+ function getNumericFraction(v) {
493
+ if (typeof v != "number" && typeof v != "string") return null;
494
+ const n = Number(v);
495
+ return Number.isFinite(n) && n >= 0 && n <= 1 ? n : null;
496
+ }
497
+ function getMutationFractions(vafs) {
498
+ const fractions = [];
499
+ if (!Array.isArray(vafs)) return fractions;
500
+ for (const vaf of vafs) {
501
+ const explicitFraction = getNumericFraction(vaf?.fraction ?? vaf?.mutationFraction);
502
+ if (explicitFraction != null) {
503
+ fractions.push(explicitFraction);
504
+ continue;
505
+ }
506
+ const counts = getReadCounts(vaf?.refCount, vaf?.altCount, vaf?.totalCount);
507
+ if (!counts) continue;
508
+ fractions.push(counts.altCount / counts.totalCount);
509
+ }
510
+ return fractions;
511
+ }
512
+ function getMaxMutationFraction(vafs) {
513
+ const fractions = getMutationFractions(vafs);
514
+ return fractions.length ? Math.max(...fractions) : null;
515
+ }
516
+ function hasAnyValidVafEntry(vafs) {
517
+ return getVafEntries(vafs).some((vaf) => hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount));
518
+ }
519
+ function appendVafBar(td2, refCountValue, altCountValue, label = "VAF", totalCountValue) {
520
+ const counts = getReadCounts(refCountValue, altCountValue, totalCountValue);
521
+ if (!counts) return;
522
+ const fraction = counts.altCount / counts.totalCount;
523
+ const div = td2.append("div").style("margin-left", "5px").style("margin-top", "4px").style("display", "flex").style("align-items", "center").style("gap", "6px");
524
+ div.append("span").style("font-size", "0.8em").style("color", "#555").text(label);
525
+ fillbar(div, { f: fraction, v1: counts.altCount, v2: counts.totalCount });
526
+ }
527
+ function appendVafBars(td2, vafs) {
528
+ for (const vaf of getVafEntries(vafs)) {
529
+ if (!hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount)) continue;
530
+ appendVafBar(td2, vaf.refCount, vaf.altCount, vaf.label, vaf.totalCount);
531
+ }
532
+ }
533
+
534
+ // plots/disco/data/DataMapper.ts
535
+ var DataMapper = class _DataMapper {
536
+ constructor(settings, reference, sample, prioritizedGenes = []) {
537
+ // remove fields and extract filters to seperate classes
538
+ this.labelData = [];
539
+ this.nonExonicSnvData = [];
540
+ this.nonExonicInnerRadius = 0;
541
+ this.snvRingDataMap = /* @__PURE__ */ new Map();
542
+ this.snvInnerRadius = 0;
543
+ this.snvData = [];
544
+ this.bpx = 0;
545
+ this.onePxArcAngle = 0;
546
+ this.filteredSnvData = [];
547
+ this.filteredSnvCountByChr = /* @__PURE__ */ new Map();
548
+ this.lohData = [];
549
+ this.lohInnerRadius = 0;
550
+ this.cnvData = [];
551
+ this.cnvInnerRadius = 0;
552
+ this.fusionData = [];
553
+ this.fusionRadius = 0;
554
+ this.hasPrioritizedGenes = false;
555
+ this.hasWaterfallEligibleChromosome = false;
556
+ this.invalidEntries = [];
557
+ this.cnvLossMaxValue = 0;
558
+ this.cnvGainMaxValue = 0;
559
+ this.percentilePositive = 0;
560
+ this.percentileNegative = 0;
561
+ this.cnvMaxPercentileAbs = 0;
562
+ this.mutationWaterfallData = [];
563
+ this.hasMutationFractionData = false;
564
+ this.mutationWaterfallInnerRadius = 0;
565
+ this.mutationWaterfallRangeMin = Infinity;
566
+ this.mutationWaterfallRangeMax = -Infinity;
567
+ this.lohMaxValue = void 0;
568
+ this.lohMinValue = void 0;
569
+ this.snvFilter = (data) => data.dt == dtsnvindel;
570
+ this.fusionFilter = (data) => data.dt == dtfusionrna || data.dt == dtsv;
571
+ this.cnvFilter = (data) => data.dt == dtcnv || data.dt == dtitd;
572
+ this.lohFilter = (data) => data.dt == dtloh;
573
+ this.compareData = (a, b) => {
574
+ const chrDiff = this.reference.chromosomesOrder.indexOf(a.chr) - this.reference.chromosomesOrder.indexOf(b.chr);
575
+ if (chrDiff != 0) {
576
+ return chrDiff;
577
+ }
578
+ const aPos = a.pos ? a.pos : a.start;
579
+ const bPos = b.pos ? b.pos : b.start;
580
+ return aPos - bPos;
581
+ };
582
+ this.settings = settings;
583
+ this.reference = reference;
584
+ this.sample = sample;
585
+ this.excludedChromosomes = this.settings.Disco.hiddenChromosomes;
586
+ this.lastInnerRadious = this.settings.rings.chromosomeInnerRadius;
587
+ this.gainCapped = this.settings.Disco.cnvCapping;
588
+ this.lossCapped = -1 * this.settings.Disco.cnvCapping;
589
+ this.nonExonicFilter = (data) => {
590
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
591
+ return prioritizedGenes.includes(data.gene) && settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
592
+ } else {
593
+ return settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
594
+ }
595
+ };
596
+ this.snvRingFilter = (data) => {
597
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
598
+ return prioritizedGenes.includes(data.gene) && settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
599
+ } else {
600
+ return settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
601
+ }
602
+ };
603
+ this.dataObjectMapper = new DataObjectMapper(sample, prioritizedGenes);
604
+ }
605
+ map(data) {
606
+ const dataArray = [];
607
+ this.filteredSnvCountByChr.clear();
608
+ this.hasWaterfallEligibleChromosome = false;
609
+ this.mutationWaterfallData = [];
610
+ this.mutationWaterfallInnerRadius = 0;
611
+ this.mutationWaterfallRangeMin = Infinity;
612
+ this.mutationWaterfallRangeMax = -Infinity;
613
+ this.hasMutationFractionData = false;
614
+ data.forEach((dObject) => {
615
+ if (dObject.dt == dtsnvindel && getMaxMutationFraction(dObject.vafs) != null) {
616
+ this.hasMutationFractionData = true;
617
+ }
618
+ const index = this.reference.chromosomesOrder.indexOf(dObject.chr);
619
+ const indexA = this.reference.chromosomesOrder.indexOf(dObject.chrA);
620
+ const indexB = this.reference.chromosomesOrder.indexOf(dObject.chrB);
621
+ if (dObject.dt == dtsnvindel) {
622
+ if (index != -1 && this.snvData.length < this.settings.snv.maxMutationCount) {
623
+ const pos = dObject.pos ?? dObject.position;
624
+ const chrSize = this.reference.chromosomes[index].size;
625
+ if (Number.isFinite(pos) && pos >= 0 && pos <= chrSize) {
626
+ this.addData(dObject, dataArray);
627
+ } else {
628
+ this.invalidEntries.push({ dataType: "SNV", reason: `Position ${pos} outside of ${dObject.chr}` });
629
+ }
630
+ } else if (index == -1) {
631
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
632
+ this.invalidEntries.push({ dataType: "SNV", reason: `Unknown chr ${dObject.chr}` });
633
+ }
634
+ }
635
+ } else if (dObject.dt == dtfusionrna || dObject.dt == dtsv) {
636
+ if (indexA != -1 && indexB != -1) {
637
+ const posA = dObject.posA;
638
+ const posB = dObject.posB;
639
+ const chrSizeA = this.reference.chromosomes[indexA].size;
640
+ const chrSizeB = this.reference.chromosomes[indexB].size;
641
+ if (Number.isFinite(posA) && Number.isFinite(posB) && posA >= 0 && posA <= chrSizeA && posB >= 0 && posB <= chrSizeB) {
642
+ this.addData(dObject, dataArray);
643
+ } else {
644
+ const reasonParts = [];
645
+ if (!(Number.isFinite(posA) && posA >= 0 && posA <= chrSizeA))
646
+ reasonParts.push(`Position ${posA} outside of ${dObject.chrA}`);
647
+ if (!(Number.isFinite(posB) && posB >= 0 && posB <= chrSizeB))
648
+ reasonParts.push(`Position ${posB} outside of ${dObject.chrB}`);
649
+ this.invalidEntries.push({ dataType: "Fusion", reason: reasonParts.join("; ") });
650
+ }
651
+ } else {
652
+ const missing = [];
653
+ if (indexA == -1 && !this.excludedChromosomes.includes(dObject.chrA)) missing.push(dObject.chrA);
654
+ if (indexB == -1 && !this.excludedChromosomes.includes(dObject.chrB)) missing.push(dObject.chrB);
655
+ if (missing.length) this.invalidEntries.push({ dataType: "Fusion", reason: "Unknown chr in fusion" });
656
+ }
657
+ } else if ([dtcnv, dtloh, dtitd].includes(Number(dObject.dt))) {
658
+ const idx = this.reference.chromosomesOrder.indexOf(dObject.chr);
659
+ const dataType = dObject.dt == dtcnv ? "CNV" : dObject.dt == dtloh ? "LOH" : "ITD";
660
+ if (dObject.chr && idx != -1) {
661
+ const chrSize = this.reference.chromosomes[idx].size;
662
+ const start = dObject.start;
663
+ const stop = dObject.stop;
664
+ if (Number.isFinite(start) && Number.isFinite(stop) && start >= 0 && stop <= chrSize && start <= stop) {
665
+ this.addData(dObject, dataArray);
666
+ } else {
667
+ this.invalidEntries.push({
668
+ dataType,
669
+ reason: `Position ${start}-${stop} outside of ${dObject.chr}`
670
+ });
671
+ }
672
+ } else {
673
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
674
+ this.invalidEntries.push({
675
+ dataType,
676
+ reason: `Unknown chr ${dObject.chr}`
677
+ });
678
+ }
679
+ }
680
+ } else {
681
+ throw Error("Unknown mutation type!");
682
+ }
683
+ });
684
+ const sortedData = dataArray.sort(this.compareData);
685
+ if (this.settings.rings.nonExonicRingEnabled) {
686
+ sortedData.forEach((data2) => {
687
+ this.filterNonExonicSnvData(data2);
688
+ });
689
+ }
690
+ if (this.nonExonicSnvData.length > 0) {
691
+ this.nonExonicInnerRadius = this.lastInnerRadious - this.settings.rings.nonExonicRingWidth;
692
+ this.lastInnerRadious = this.nonExonicInnerRadius;
693
+ }
694
+ sortedData.forEach((data2) => {
695
+ this.filterSnvs(data2);
696
+ });
697
+ this.hasWaterfallEligibleChromosome = Array.from(this.filteredSnvCountByChr.values()).some((count) => count >= 2);
698
+ if (this.settings.Disco.mutationWaterfallPlot && this.hasWaterfallEligibleChromosome) {
699
+ this.prepareMutationWaterfallData();
700
+ }
701
+ sortedData.forEach((data2) => {
702
+ this.filterLohs(data2);
703
+ });
704
+ if (this.lohData.length > 0) {
705
+ this.lohInnerRadius = this.lastInnerRadious - this.settings.rings.lohRingWidth;
706
+ this.lastInnerRadious = this.lohInnerRadius;
707
+ }
708
+ sortedData.forEach((data2) => {
709
+ this.filterCnvs(data2);
710
+ });
711
+ if (this.cnvData.length > 0) {
712
+ this.cnvInnerRadius = this.lastInnerRadious - this.settings.rings.cnvRingWidth;
713
+ this.lastInnerRadious = this.cnvInnerRadius;
714
+ this.cappedCnvMaxAbsValue = Math.min(
715
+ this.settings.Disco.cnvCapping,
716
+ Math.max(
717
+ Math.abs(_DataMapper.capMaxValue(this.cnvLossMaxValue, this.gainCapped, this.lossCapped)),
718
+ Math.abs(_DataMapper.capMaxValue(this.cnvGainMaxValue, this.gainCapped, this.lossCapped))
719
+ )
720
+ );
721
+ const cnvValues = this.cnvData.filter((data2) => data2.dt == dtcnv).map((data2) => data2.value);
722
+ if (cnvValues.length) {
723
+ const percentilePair = new PercentileMapper().map(cnvValues, this.settings.Disco.cnvPercentile);
724
+ this.percentilePositive = _DataMapper.capMaxValue(percentilePair.positive, this.gainCapped, this.lossCapped);
725
+ this.percentileNegative = _DataMapper.capMaxValue(percentilePair.negative, this.gainCapped, this.lossCapped);
726
+ this.cnvMaxPercentileAbs = Math.min(
727
+ this.settings.Disco.cnvCapping,
728
+ Math.max(this.percentilePositive, Math.abs(this.percentileNegative))
729
+ );
730
+ }
731
+ }
732
+ sortedData.forEach((data2) => {
733
+ this.filterFusion(data2);
734
+ });
735
+ if (this.fusionData.length > 0) {
736
+ this.fusionRadius = this.lastInnerRadious;
737
+ }
738
+ const dataHolder = {
739
+ labelData: this.labelData,
740
+ nonExonicSnvData: this.nonExonicSnvData,
741
+ nonExonicInnerRadius: this.nonExonicInnerRadius,
742
+ snvRingDataMap: this.snvRingDataMap,
743
+ snvInnerRadius: this.snvInnerRadius,
744
+ snvData: this.snvData,
745
+ bpx: this.bpx,
746
+ onePxArcAngle: this.onePxArcAngle,
747
+ filteredSnvData: this.filteredSnvData,
748
+ lohData: this.lohData,
749
+ lohInnerRadius: this.lohInnerRadius,
750
+ cnvData: this.cnvData,
751
+ cnvInnerRadius: this.cnvInnerRadius,
752
+ fusionData: this.fusionData,
753
+ fusionRadius: this.fusionRadius,
754
+ hasPrioritizedGenes: this.hasPrioritizedGenes,
755
+ hasWaterfallEligibleChromosome: this.hasWaterfallEligibleChromosome,
756
+ cnvGainMaxValue: this.cnvGainMaxValue,
757
+ cnvLossMaxValue: this.cnvLossMaxValue,
758
+ cappedCnvMaxAbsValue: this.cappedCnvMaxAbsValue,
759
+ percentilePositive: this.percentilePositive,
760
+ percentileNegative: this.percentileNegative,
761
+ cnvMaxPercentileAbs: this.cnvMaxPercentileAbs,
762
+ lohMaxValue: this.lohMaxValue,
763
+ lohMinValue: this.lohMinValue,
764
+ hasMutationFractionData: this.hasMutationFractionData,
765
+ mutationWaterfallData: this.mutationWaterfallData,
766
+ mutationWaterfallInnerRadius: this.mutationWaterfallInnerRadius,
767
+ mutationWaterfallLogRange: this.mutationWaterfallData.length ? { min: this.mutationWaterfallRangeMin, max: this.mutationWaterfallRangeMax } : void 0,
768
+ invalidDataInfo: {
769
+ entries: this.invalidEntries,
770
+ errorMsg: `Entries listed above were skipped due to invalid or unsupported chromosome information.`
771
+ }
772
+ };
773
+ return dataHolder;
774
+ }
775
+ addData(dObject, dataArray) {
776
+ const instance = this.dataObjectMapper.map(dObject);
777
+ if (instance.isPrioritized) {
778
+ this.hasPrioritizedGenes = true;
779
+ }
780
+ dataArray.push(instance);
781
+ }
782
+ filterNonExonicSnvData(data) {
783
+ if (this.snvFilter(data) && this.passesMutationFractionFilter(data)) {
784
+ if (this.settings.rings.nonExonicRingEnabled && this.nonExonicFilter(data)) {
785
+ this.nonExonicSnvData.push(data);
786
+ }
787
+ }
788
+ }
789
+ filterSnvs(data) {
790
+ if (this.snvFilter(data)) {
791
+ this.snvData.push(data);
792
+ if (this.passesMutationFractionFilter(data) && this.snvRingFilter(data)) {
793
+ if (this.snvInnerRadius == 0) {
794
+ this.snvInnerRadius = this.lastInnerRadious - this.settings.rings.snvRingWidth;
795
+ this.lastInnerRadious = this.snvInnerRadius;
796
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * this.snvInnerRadius));
797
+ this.onePxArcAngle = 1 / this.snvInnerRadius;
798
+ }
799
+ this.filteredSnvData.push(data);
800
+ this.labelData.push(data);
801
+ const currentCount = this.filteredSnvCountByChr.get(data.chr) || 0;
802
+ this.filteredSnvCountByChr.set(data.chr, currentCount + 1);
803
+ const arcAngle = this.calculateArcAngle(data);
804
+ let dataArray = this.snvRingDataMap.get(arcAngle);
805
+ if (!dataArray) {
806
+ dataArray = new Array();
807
+ }
808
+ dataArray.push(data);
809
+ this.snvRingDataMap.set(arcAngle, dataArray);
810
+ }
811
+ }
812
+ }
813
+ passesMutationFractionFilter(data) {
814
+ if (!this.hasMutationFractionData) return true;
815
+ const minMutationFraction = this.settings.Disco.minMutationFraction || 0;
816
+ if (minMutationFraction <= 0) return true;
817
+ const fraction = getMaxMutationFraction(data.vafs);
818
+ return fraction != null && fraction >= minMutationFraction;
819
+ }
820
+ filterFusion(data) {
821
+ if (this.fusionFilter(data)) {
822
+ data.isPrioritized = true;
823
+ this.fusionData.push(data);
824
+ this.labelData.push(data);
825
+ }
826
+ }
827
+ filterLohs(data) {
828
+ if (this.lohFilter(data)) {
829
+ if (this.lohMaxValue == void 0 || this.lohMaxValue < data.value) {
830
+ this.lohMaxValue = data.segmean;
831
+ }
832
+ if (this.lohMinValue == void 0 || this.lohMinValue > data.value) {
833
+ this.lohMinValue = data.segmean;
834
+ }
835
+ this.lohData.push(data);
836
+ }
837
+ }
838
+ filterCnvs(data) {
839
+ if (this.cnvFilter(data)) {
840
+ if (!data.chr || this.reference.chromosomesOrder.indexOf(data.chr) == -1) {
841
+ return;
842
+ }
843
+ if (data.dt == dtcnv) {
844
+ if (this.cnvGainMaxValue == void 0 || this.cnvGainMaxValue < data.value) {
845
+ this.cnvGainMaxValue = data.value;
846
+ }
847
+ if (this.cnvLossMaxValue == void 0 || this.cnvLossMaxValue > data.value) {
848
+ this.cnvLossMaxValue = data.value;
849
+ }
850
+ }
851
+ this.cnvData.push(data);
852
+ }
853
+ }
854
+ prepareMutationWaterfallData() {
855
+ this.mutationWaterfallInnerRadius = this.lastInnerRadious - this.settings.rings.mutationWaterfallRingWidth;
856
+ this.lastInnerRadious = this.mutationWaterfallInnerRadius;
857
+ const groupedSnvs = /* @__PURE__ */ new Map();
858
+ const firstMutationByChr = [];
859
+ for (const snv of this.filteredSnvData) {
860
+ const list = groupedSnvs.get(snv.chr) || [];
861
+ list.push(snv);
862
+ groupedSnvs.set(snv.chr, list);
863
+ }
864
+ for (const [, snvs] of groupedSnvs) {
865
+ if (snvs.length < 2) continue;
866
+ snvs.sort((a, b) => a.position - b.position);
867
+ firstMutationByChr.push({
868
+ chr: snvs[0].chr,
869
+ position: snvs[0].position,
870
+ logDistance: 0
871
+ // placeholder updated after range computed
872
+ });
873
+ for (let i = 1; i < snvs.length; i++) {
874
+ const prev = snvs[i - 1];
875
+ const curr = snvs[i];
876
+ const distance = Math.max(1, Math.abs(curr.position - prev.position));
877
+ const logDistance = Math.log10(distance);
878
+ this.mutationWaterfallData.push({
879
+ chr: curr.chr,
880
+ position: curr.position,
881
+ logDistance
882
+ });
883
+ if (logDistance < this.mutationWaterfallRangeMin) {
884
+ this.mutationWaterfallRangeMin = logDistance;
885
+ }
886
+ if (logDistance > this.mutationWaterfallRangeMax) {
887
+ this.mutationWaterfallRangeMax = logDistance;
888
+ }
889
+ }
890
+ }
891
+ if (!this.mutationWaterfallData.length) {
892
+ this.mutationWaterfallRangeMin = 0;
893
+ this.mutationWaterfallRangeMax = 0;
894
+ }
895
+ const topLogDistance = this.mutationWaterfallRangeMax;
896
+ for (const first of firstMutationByChr) {
897
+ this.mutationWaterfallData.push({
898
+ ...first,
899
+ logDistance: topLogDistance
900
+ });
901
+ }
902
+ }
903
+ calculateArcAngle(data) {
904
+ const currentChromosome = this.reference.chromosomes[this.reference.chromosomesOrder.findIndex((chromosomeOrder) => data.chr == chromosomeOrder)];
905
+ const dataAnglePos = Math.floor(data.position / this.bpx);
906
+ return currentChromosome.startAngle + dataAnglePos * this.onePxArcAngle;
907
+ }
908
+ static capMaxValue(value, gainCapped, lossCapped) {
909
+ if (value && Math.sign(value) == 1) {
910
+ return value > gainCapped ? gainCapped : value;
911
+ }
912
+ if (Math.sign(value) == -1) {
913
+ return value < lossCapped ? lossCapped : value;
914
+ }
915
+ return 0;
916
+ }
917
+ static capMinValue(value, capMinValue = 1) {
918
+ if (Math.sign(value) == 1) {
919
+ return value > capMinValue ? value : capMinValue;
920
+ }
921
+ if (Math.sign(value) == -1) {
922
+ return value < -1 * capMinValue ? value : -1 * capMinValue;
923
+ }
924
+ return 1;
925
+ }
926
+ };
927
+
928
+ // plots/disco/legend/Legend.ts
929
+ var Legend = class {
930
+ constructor(snvTitle, cnvTitle, lohTitle, fusionTitle, cnvPercentile, cnvCutoffmode, snvClassMap, cnvClassMap, cnvRenderingType, fusionLegend, discoInteractions, lohLegend, mutationWaterfallLegend, fusionLegendCounts = { interchromosomal: 0, intrachromosomal: 0 }, cnvCount = 0) {
931
+ this.snvTitle = snvTitle;
932
+ this.cnvTitle = cnvTitle;
933
+ this.lohTitle = lohTitle;
934
+ this.fusionTitle = fusionTitle;
935
+ this.cnvPercentile = cnvPercentile;
936
+ this.cnvCutoffMode = cnvCutoffmode;
937
+ this.cnvCount = cnvCount;
938
+ this.snvClassMap = snvClassMap;
939
+ this.cnvClassMap = cnvClassMap;
940
+ this.cnvRenderingType = cnvRenderingType;
941
+ this.lohLegend = lohLegend;
942
+ this.fusionLegend = fusionLegend;
943
+ this.fusionLegendCounts = fusionLegendCounts;
944
+ this.discoInteractions = discoInteractions;
945
+ this.mutationWaterfallLegend = mutationWaterfallLegend;
946
+ }
947
+ legendCount() {
948
+ const hasItd = this.cnvClassMap.has(4 /* ITD */);
949
+ return (this.snvClassMap.size > 0 ? 1 : 0) + (this.cnvCount > 0 ? 1 : 0) + (hasItd ? 1 : 0) + (this.lohLegend ? 1 : 0) + (this.fusionLegend ? 1 : 0) + (this.mutationWaterfallLegend ? 1 : 0);
950
+ }
951
+ };
952
+
953
+ // plots/disco/fusion/Fusion.ts
954
+ var Fusion = class {
955
+ constructor(source, target, genes, count, endpts) {
956
+ this.source = source;
957
+ this.target = target;
958
+ this.genes = genes;
959
+ this.count = count;
960
+ this.endpts = endpts;
961
+ }
962
+ };
963
+
964
+ // plots/disco/fusion/FusionSubgroup.ts
965
+ var FusionSubgroup = class {
966
+ constructor(startAngle, endAngle, radius, gene, value, genes, positionInChromosome, strand) {
967
+ this.startAngle = startAngle;
968
+ this.endAngle = endAngle;
969
+ this.radius = radius;
970
+ this.gene = gene;
971
+ this.value = value;
972
+ this.genes = genes;
973
+ this.positionInChromosome = positionInChromosome;
974
+ this.strand = strand;
975
+ }
976
+ };
977
+
978
+ // plots/disco/fusion/FusionMapper.ts
979
+ var FusionMapper = class {
980
+ constructor(radius, sampleName, reference) {
981
+ this.radius = radius;
982
+ this.sampleName = sampleName;
983
+ this.reference = reference;
984
+ }
985
+ map(fusionData) {
986
+ const fusions = [];
987
+ fusionData.forEach((data) => {
988
+ const genes = /* @__PURE__ */ new Set();
989
+ genes.add(data.geneA);
990
+ genes.add(data.geneB);
991
+ const startAngle = this.calculateStartAngle(data.chrA, data.posA);
992
+ const endAngle = this.calculateEndAngle(data.chrA, data.posA);
993
+ if (startAngle === null || endAngle === null) return;
994
+ const source = new FusionSubgroup(
995
+ startAngle,
996
+ endAngle,
997
+ this.radius,
998
+ data.geneA,
999
+ data.value,
1000
+ genes,
1001
+ {
1002
+ chromosome: data.chrA,
1003
+ position: data.posA
1004
+ },
1005
+ data.strandA
1006
+ );
1007
+ let target;
1008
+ if (data.chrB && data.posB) {
1009
+ const startAngle2 = this.calculateStartAngle(data.chrB, data.posB);
1010
+ const endAngle2 = this.calculateEndAngle(data.chrB, data.posB);
1011
+ if (startAngle2 === null || endAngle2 === null) return;
1012
+ target = new FusionSubgroup(
1013
+ startAngle2,
1014
+ endAngle2,
1015
+ this.radius,
1016
+ data.geneB,
1017
+ data.value,
1018
+ genes,
1019
+ {
1020
+ chromosome: data.chrB,
1021
+ position: data.posB
1022
+ },
1023
+ data.strandB
1024
+ );
1025
+ }
1026
+ const fusion = new Fusion(source, target, "genes", -1, "Endpoints");
1027
+ fusions.push(fusion);
1028
+ });
1029
+ return fusions;
1030
+ }
1031
+ calculateStartAngle(chr, pos) {
1032
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1033
+ if (index === -1) return null;
1034
+ const chromosome = this.reference.chromosomes[index];
1035
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size) - 0.01;
1036
+ }
1037
+ calculateEndAngle(chr, pos) {
1038
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1039
+ if (index === -1) return null;
1040
+ const chromosome = this.reference.chromosomes[index];
1041
+ return 0.01 + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size);
1042
+ }
1043
+ };
1044
+
1045
+ // plots/disco/loh/LohLegend.ts
1046
+ var LohLegend = class {
1047
+ constructor(count) {
1048
+ this.count = count;
1049
+ }
1050
+ };
1051
+
1052
+ // plots/disco/viewmodel/ViewModel.ts
1053
+ var ViewModel = class {
1054
+ constructor(settings, rings, legend, fusions, dataHolder, genesetName, snvDataLengthAll) {
1055
+ this.settings = settings;
1056
+ this.rings = rings;
1057
+ this.legend = legend;
1058
+ this.fusions = fusions;
1059
+ this.genesetName = genesetName;
1060
+ const tempHolder = select_default("body").append("div").style("position", "absolute").style("visibility", "hidden");
1061
+ const tempSvg = tempHolder.append("svg");
1062
+ const labels = rings.labelsRing?.elementsToDisplay?.map((l) => l.text) || [];
1063
+ const maxLabelSpace = getMaxLabelWidth(tempSvg, labels);
1064
+ tempHolder.remove();
1065
+ this.width = 2 * (this.settings.horizontalPadding + this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + maxLabelSpace);
1066
+ this.height = 2 * (this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + this.settings.verticalPadding + this.settings.label.fontSize * 2 + maxLabelSpace);
1067
+ this.legendHeight = this.calculateLegendHeight(legend);
1068
+ this.snvDataLength = dataHolder.snvData.length;
1069
+ this.filteredSnvDataLength = dataHolder.filteredSnvData.length;
1070
+ this.snvDataLengthAll = snvDataLengthAll;
1071
+ this.cnvMaxValue = dataHolder.cnvGainMaxValue;
1072
+ this.cnvMinValue = dataHolder.cnvLossMaxValue;
1073
+ this.cappedCnvMaxAbsValue = dataHolder.cappedCnvMaxAbsValue;
1074
+ this.negativePercentile = dataHolder.percentileNegative;
1075
+ this.positivePercentile = dataHolder.percentilePositive;
1076
+ this.invalidDataInfo = dataHolder.invalidDataInfo;
1077
+ this.canShowMutationWaterfallPlot = dataHolder.hasWaterfallEligibleChromosome;
1078
+ this.hasMutationFractionData = dataHolder.hasMutationFractionData;
1079
+ }
1080
+ getElements(ringType) {
1081
+ switch (ringType) {
1082
+ case 0 /* CHROMOSOME */:
1083
+ return this.rings.chromosomesRing ? this.rings.chromosomesRing.elements : [];
1084
+ case 1 /* LABEL */:
1085
+ return this.rings.labelsRing.elementsToDisplay;
1086
+ case 2 /* NONEXONICSNV */:
1087
+ return this.rings.nonExonicArcRing ? this.rings.nonExonicArcRing.elements : [];
1088
+ case 3 /* SNV */:
1089
+ return this.rings.snvArcRing ? this.rings.snvArcRing.elements : [];
1090
+ case 5 /* CNV */:
1091
+ return this.rings.cnvArcRing ? this.rings.cnvArcRing.elements : [];
1092
+ case 6 /* LOH */:
1093
+ return this.rings.lohArcRing ? this.rings.lohArcRing.elements : [];
1094
+ case 4 /* MUTATION_WATERFALL */:
1095
+ return this.rings.mutationWaterfallRing ? this.rings.mutationWaterfallRing.elements : [];
1096
+ default:
1097
+ throw new Error(`ringType ${ringType} not defined`);
1098
+ }
1099
+ }
1100
+ getCollisions(ringType) {
1101
+ if (ringType == 1 /* LABEL */) {
1102
+ return this.rings.labelsRing.collisions;
1103
+ } else {
1104
+ return void 0;
1105
+ }
1106
+ }
1107
+ calculateLegendHeight(legend) {
1108
+ const rawHeight = this.settings.legend.rowHeight;
1109
+ return rawHeight * legend.legendCount();
1110
+ }
1111
+ };
1112
+
1113
+ // plots/disco/ring/Ring.ts
1114
+ var Ring = class {
1115
+ constructor(innerRadius, width, elements) {
1116
+ this.innerRadius = innerRadius;
1117
+ this.outerRadius = innerRadius + width;
1118
+ this.width = width;
1119
+ this.elements = elements;
1120
+ }
1121
+ };
1122
+
1123
+ // plots/disco/label/MLabel.ts
1124
+ var MLabel = class _MLabel {
1125
+ /**
1126
+ * The Singleton's constructor should always be private to prevent direct
1127
+ * construction calls with the `new` operator.
1128
+ */
1129
+ constructor() {
1130
+ const mlabel = {};
1131
+ for (const key in mclass) {
1132
+ mlabel[mclass[key].label] = mclass[key];
1133
+ mlabel[key] = mclass[key];
1134
+ }
1135
+ this.mlabel = mlabel;
1136
+ }
1137
+ /**
1138
+ * The static method that controls the access to the singleton instance.
1139
+ *
1140
+ * This implementation let you subclass the Singleton class while keeping
1141
+ * just one instance of each subclass around.
1142
+ */
1143
+ static getInstance() {
1144
+ if (!_MLabel.instance) {
1145
+ _MLabel.instance = new _MLabel();
1146
+ }
1147
+ return _MLabel.instance;
1148
+ }
1149
+ };
1150
+
1151
+ // plots/disco/snv/SnvLegendElement.ts
1152
+ var SnvLegendElement = class {
1153
+ constructor(snvType, color, count) {
1154
+ this.snvType = snvType;
1155
+ this.color = color;
1156
+ this.count = count;
1157
+ }
1158
+ };
1159
+
1160
+ // plots/disco/snv/SnvArcsMapper.ts
1161
+ var SnvArcsMapper = class {
1162
+ constructor(svnInnerRadius, svnWidth, sampleName, reference) {
1163
+ this.snvClassMap = /* @__PURE__ */ new Map();
1164
+ this.svnInnerRadius = svnInnerRadius;
1165
+ this.svnWidth = svnWidth;
1166
+ this.sampleName = sampleName;
1167
+ this.reference = reference;
1168
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * svnInnerRadius));
1169
+ this.onePxArcAngle = 1 / svnInnerRadius;
1170
+ }
1171
+ map(exonicSnvDataMap) {
1172
+ const snvArray = [];
1173
+ for (const angle of exonicSnvDataMap.keys()) {
1174
+ const array = exonicSnvDataMap.get(angle);
1175
+ if (array) {
1176
+ const arraySize = array.length;
1177
+ for (let i = 0; i < array.length; i++) {
1178
+ const data = array[i];
1179
+ const snvLegendElement = this.snvClassMap.get(data.mClass);
1180
+ if (snvLegendElement) {
1181
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, ++snvLegendElement.count));
1182
+ } else {
1183
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, 1));
1184
+ }
1185
+ const startAngle = angle;
1186
+ const endAngle = angle + this.onePxArcAngle;
1187
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1188
+ const arc = {
1189
+ startAngle,
1190
+ endAngle,
1191
+ innerRadius: this.svnInnerRadius + i * this.svnWidth / arraySize,
1192
+ outerRadius: this.svnInnerRadius + (i + 1) * this.svnWidth / arraySize,
1193
+ color: mLabel.color,
1194
+ text: data.gene,
1195
+ dataClass: mLabel.label,
1196
+ mname: data.mname,
1197
+ chr: data.chr,
1198
+ pos: data.position,
1199
+ vafs: data.vafs,
1200
+ sampleName: [data.sampleName]
1201
+ };
1202
+ snvArray.push(arc);
1203
+ }
1204
+ }
1205
+ }
1206
+ return snvArray;
1207
+ }
1208
+ createSnvLegend(dataClass, count) {
1209
+ const mClass = MLabel.getInstance().mlabel[dataClass];
1210
+ return new SnvLegendElement(mClass.label, mClass.color, count);
1211
+ }
1212
+ };
1213
+
1214
+ // plots/disco/cnv/CnvLegend.ts
1215
+ var CnvLegend = class {
1216
+ constructor(text, cnvType, color, value) {
1217
+ this.text = text;
1218
+ this.cnvType = cnvType;
1219
+ this.color = color;
1220
+ this.value = value;
1221
+ }
1222
+ };
1223
+
1224
+ // plots/disco/cnv/CnvColorProvider.ts
1225
+ var CnvColorProvider = class {
1226
+ static getColor(value, settings, cnvMaxPercentileAbs = 0) {
1227
+ const cnv = settings.cnv;
1228
+ const gainCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? settings.Disco.cnvCapping : cnvMaxPercentileAbs;
1229
+ const lossCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? -1 * settings.Disco.cnvCapping : -1 * cnvMaxPercentileAbs;
1230
+ if (value < lossCapped) {
1231
+ return cnv.cappedLossColor;
1232
+ } else if (value >= lossCapped && value <= 0) {
1233
+ return cnv.lossColor;
1234
+ } else if (value > 0 && value <= gainCapped) {
1235
+ return cnv.ampColor;
1236
+ } else {
1237
+ return cnv.cappedAmpColor;
1238
+ }
1239
+ }
1240
+ };
1241
+
1242
+ // plots/disco/cnv/CnvArcsMapper.ts
1243
+ var CnvArcsMapper = class {
1244
+ constructor(cnvInnerRadius, cnvWidth, settings, sampleName, reference, cnvMaxValue = 0, cnvMinValue = 0, cnvMaxAbsValue = 0, cnvAbsPercentile = 0, cnvUnit = "", cnvRenderingType) {
1245
+ this.cnvClassMap = /* @__PURE__ */ new Map();
1246
+ this.cnvInnerRadius = cnvInnerRadius;
1247
+ this.cnvWidth = cnvWidth;
1248
+ this.settings = settings;
1249
+ this.sampleName = sampleName;
1250
+ this.reference = reference;
1251
+ this.cnvMaxValue = cnvMaxValue;
1252
+ this.cnvMinValue = cnvMinValue;
1253
+ this.cnvMaxAbsValue = cnvMaxAbsValue;
1254
+ this.cnvAbsPercentile = cnvAbsPercentile;
1255
+ this.cnvUnit = cnvUnit;
1256
+ this.cnvRenderingType = cnvRenderingType;
1257
+ this.gainCapped = Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1258
+ this.lossCapped = -1 * Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1259
+ this.lossOnly = cnvMaxValue <= 0;
1260
+ this.gainOnly = cnvMinValue >= 0;
1261
+ this.onePxArcAngle = 1 / this.cnvInnerRadius;
1262
+ const gain = new CnvLegend(
1263
+ "Max",
1264
+ cnvMaxValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1265
+ this.getColor(cnvMaxValue),
1266
+ cnvMaxValue
1267
+ );
1268
+ const loss = new CnvLegend(
1269
+ "Min",
1270
+ cnvMinValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1271
+ this.getColor(cnvMinValue),
1272
+ cnvMinValue
1273
+ );
1274
+ const cap = new CnvLegend(
1275
+ "Capping",
1276
+ 0 /* Loss */,
1277
+ this.getColor(cnvMinValue > 0 ? cnvMinValue : cnvMaxValue),
1278
+ this.settings.Disco.cnvCapping
1279
+ );
1280
+ this.cnvClassMap.set(1 /* Gain */, gain);
1281
+ this.cnvClassMap.set(0 /* Loss */, loss);
1282
+ this.cnvClassMap.set(2 /* Cap */, cap);
1283
+ }
1284
+ map(arcData) {
1285
+ const arcs = [];
1286
+ let itdCount = 0;
1287
+ arcData.forEach((data) => {
1288
+ let startAngle = this.calculateStartAngle(data);
1289
+ let endAngle = this.calculateEndAngle(data);
1290
+ if (startAngle === null || endAngle === null) return;
1291
+ if (endAngle - startAngle < this.onePxArcAngle) {
1292
+ const restAngle = this.onePxArcAngle - (endAngle - startAngle);
1293
+ startAngle = startAngle - restAngle / 2;
1294
+ endAngle = endAngle + restAngle / 2;
1295
+ }
1296
+ const isItd = data.dt == dtitd;
1297
+ if (isItd) itdCount++;
1298
+ const color = isItd ? mclass[mclassitd].color : this.getColor(data.value);
1299
+ const innerRadius = isItd ? this.cnvInnerRadius : this.calculateInnerRadius(data);
1300
+ const outerRadius = isItd ? this.cnvInnerRadius + this.cnvWidth : this.calculateOuterRadius(data);
1301
+ const arc = {
1302
+ startAngle,
1303
+ endAngle,
1304
+ innerRadius,
1305
+ outerRadius,
1306
+ color,
1307
+ dt: data.dt,
1308
+ dataClass: data.mClass,
1309
+ text: data.gene,
1310
+ chr: data.chr,
1311
+ start: data.start,
1312
+ stop: data.stop,
1313
+ value: data.value,
1314
+ unit: this.cnvUnit,
1315
+ sampleName: [this.sampleName]
1316
+ };
1317
+ arcs.push(arc);
1318
+ });
1319
+ if (itdCount) {
1320
+ this.cnvClassMap.set(4 /* ITD */, new CnvLegend("ITD", 4 /* ITD */, mclass[mclassitd].color, itdCount));
1321
+ }
1322
+ return arcs;
1323
+ }
1324
+ calculateStartAngle(data) {
1325
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1326
+ if (index == -1) return null;
1327
+ const chromosome = this.reference.chromosomes[index];
1328
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1329
+ }
1330
+ calculateEndAngle(data) {
1331
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1332
+ const chromosome = this.reference.chromosomes[index];
1333
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1334
+ }
1335
+ getColor(value) {
1336
+ return CnvColorProvider.getColor(value, this.settings, this.cnvAbsPercentile);
1337
+ }
1338
+ calculateInnerRadius(data) {
1339
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1340
+ return this.cnvInnerRadius;
1341
+ }
1342
+ if (this.gainOnly) {
1343
+ return this.cnvInnerRadius;
1344
+ }
1345
+ if (this.lossOnly) {
1346
+ const outerRadius = this.cnvInnerRadius + this.cnvWidth;
1347
+ return outerRadius + DataMapper.capMinValue(
1348
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1349
+ );
1350
+ }
1351
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1352
+ if (Math.sign(data.value) == 1) {
1353
+ return centerRadius;
1354
+ }
1355
+ if (Math.sign(data.value) == -1) {
1356
+ return centerRadius + DataMapper.capMinValue(
1357
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile * (this.cnvWidth / 2)
1358
+ );
1359
+ }
1360
+ return 1;
1361
+ }
1362
+ calculateOuterRadius(data) {
1363
+ const maxOuterRadius = this.cnvInnerRadius + this.cnvWidth;
1364
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1365
+ return maxOuterRadius;
1366
+ }
1367
+ if (this.gainOnly) {
1368
+ return this.cnvInnerRadius + DataMapper.capMinValue(
1369
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1370
+ );
1371
+ }
1372
+ if (this.lossOnly) {
1373
+ return maxOuterRadius;
1374
+ }
1375
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1376
+ if (Math.sign(data.value) == 1) {
1377
+ return centerRadius + DataMapper.capMinValue(
1378
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvMaxAbsValue * (this.cnvWidth / 2)
1379
+ );
1380
+ }
1381
+ if (Math.sign(data.value) == -1) {
1382
+ return centerRadius;
1383
+ }
1384
+ return 1;
1385
+ }
1386
+ };
1387
+
1388
+ // plots/disco/label/Line.ts
1389
+ var Line = class {
1390
+ constructor(points, color) {
1391
+ this.points = new Array();
1392
+ this.points = points;
1393
+ this.color = color;
1394
+ }
1395
+ };
1396
+
1397
+ // plots/disco/label/LabelFactory.ts
1398
+ var LabelFactory = class {
1399
+ static createLabel(startAngle, endAngle, innerRadius, outerRadius, value, gene, color, dataClass, chr, position, isPrioritized = false, labelsToLinesGap, mutationTooltip, fusionTooltip) {
1400
+ const angle = (startAngle + endAngle) / 2;
1401
+ const ccAngle = angle - Math.PI / 2;
1402
+ const transform = `rotate(${angle * 180 / Math.PI - 90}) translate(${outerRadius})${angle > Math.PI ? "rotate(180)" : ""}`;
1403
+ const textAnchor = angle > Math.PI ? "end" : "";
1404
+ const r0 = innerRadius;
1405
+ const r1 = outerRadius - labelsToLinesGap;
1406
+ const points = [];
1407
+ const point0 = {
1408
+ x: r0 * Math.cos(ccAngle),
1409
+ y: r0 * Math.sin(ccAngle)
1410
+ };
1411
+ const point1 = {
1412
+ x: r1 * Math.cos(ccAngle),
1413
+ y: r1 * Math.sin(ccAngle)
1414
+ };
1415
+ points.push(point0);
1416
+ points.push(point1);
1417
+ const line = new Line(points, color);
1418
+ const label = {
1419
+ startAngle,
1420
+ endAngle,
1421
+ innerRadius,
1422
+ outerRadius,
1423
+ angle,
1424
+ value,
1425
+ text: gene,
1426
+ color,
1427
+ transform,
1428
+ textAnchor,
1429
+ ccAngle,
1430
+ line,
1431
+ isPrioritized,
1432
+ start: position,
1433
+ stop: position,
1434
+ chr,
1435
+ mutationsTooltip: mutationTooltip ? [mutationTooltip] : void 0,
1436
+ fusionTooltip: fusionTooltip ? [fusionTooltip] : void 0
1437
+ };
1438
+ return label;
1439
+ }
1440
+ static createMovedLabel(element, overlap) {
1441
+ const startAngle = element.startAngle + overlap;
1442
+ const endAngle = element.endAngle + overlap;
1443
+ const angle = (startAngle + endAngle) / 2;
1444
+ const ccAngle = angle - Math.PI / 2;
1445
+ const r0 = element.innerRadius;
1446
+ const r1 = element.outerRadius - 2;
1447
+ const dr = (r1 - r0) / 3;
1448
+ const cos0 = Math.cos(element.ccAngle);
1449
+ const sin0 = Math.sin(element.ccAngle);
1450
+ const cos1 = Math.cos(element.ccAngle + overlap);
1451
+ const sin1 = Math.sin(element.ccAngle + overlap);
1452
+ const points = [];
1453
+ const point0 = {
1454
+ x: r0 * cos0,
1455
+ y: r0 * sin0
1456
+ };
1457
+ const point1 = {
1458
+ x: (r0 + dr) * cos0,
1459
+ y: (r0 + dr) * sin0
1460
+ };
1461
+ const point2 = {
1462
+ x: (r0 + 2 * dr) * cos1,
1463
+ y: (r0 + 2 * dr) * sin1
1464
+ };
1465
+ const point3 = {
1466
+ x: (r0 + 3 * dr) * cos1,
1467
+ y: (r0 + 3 * dr) * sin1
1468
+ };
1469
+ points.push(point0);
1470
+ points.push(point1);
1471
+ points.push(point2);
1472
+ points.push(point3);
1473
+ const line = new Line(points, element.color);
1474
+ const transform = "rotate(" + (angle * 180 / Math.PI - 90) + ")translate(" + element.outerRadius + ")" + (angle > Math.PI ? "rotate(180)" : "");
1475
+ const textAnchor = angle > Math.PI ? "end" : "";
1476
+ const color = element.mutationsTooltip ? element.mutationsTooltip[0].color : element.fusionTooltip ? element.fusionTooltip[0].color : void 0;
1477
+ const label = {
1478
+ startAngle,
1479
+ endAngle,
1480
+ innerRadius: element.innerRadius,
1481
+ outerRadius: element.outerRadius,
1482
+ angle,
1483
+ value: element.value,
1484
+ text: element.text,
1485
+ transform,
1486
+ textAnchor,
1487
+ ccAngle,
1488
+ color,
1489
+ line,
1490
+ isPrioritized: element.isPrioritized,
1491
+ start: element.start,
1492
+ stop: element.stop,
1493
+ chr: element.chr,
1494
+ mutationsTooltip: element.mutationsTooltip,
1495
+ fusionTooltip: element.fusionTooltip,
1496
+ cnvTooltip: element.cnvTooltip
1497
+ };
1498
+ return label;
1499
+ }
1500
+ };
1501
+
1502
+ // plots/disco/label/LabelsMapper.ts
1503
+ var LabelsMapper = class {
1504
+ constructor(settings, sampleName, reference, cnvMaxPercentileAbs = 0) {
1505
+ this.labelMap = /* @__PURE__ */ new Map();
1506
+ this.settings = settings;
1507
+ this.sampleName = sampleName;
1508
+ this.reference = reference;
1509
+ this.cnvMaxPercentileAbs = cnvMaxPercentileAbs;
1510
+ }
1511
+ map(data, cnvData = []) {
1512
+ const innerRadius = this.settings.rings.labelLinesInnerRadius;
1513
+ const outerRadius = innerRadius + this.settings.rings.labelsToLinesDistance;
1514
+ data.forEach((data2) => {
1515
+ if (data2.dt == dtsnvindel) {
1516
+ const startAngle = this.calculateStartAngle(data2.chr, data2.position);
1517
+ const endAngle = this.calculateEndAngle(data2.chr, data2.position);
1518
+ if (startAngle === null || endAngle === null) return;
1519
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data2.mClass] : void 0;
1520
+ this.addLabelOrMutation(
1521
+ data2,
1522
+ data2.gene,
1523
+ data2.mname,
1524
+ startAngle,
1525
+ endAngle,
1526
+ innerRadius,
1527
+ outerRadius,
1528
+ mLabel.color,
1529
+ mLabel.label
1530
+ );
1531
+ }
1532
+ if (data2.dt == dtfusionrna) {
1533
+ const color = FusionColorProvider.getColor(data2.chrA, data2.chrB);
1534
+ if (data2.geneA) {
1535
+ const startAngleSource = this.calculateStartAngle(data2.chrA, data2.posA);
1536
+ const endAngleSource = this.calculateEndAngle(data2.chrA, data2.posA);
1537
+ if (startAngleSource === null || endAngleSource === null) return;
1538
+ this.addLabelOrFusion(
1539
+ data2,
1540
+ data2.geneA,
1541
+ data2.posA,
1542
+ data2.chrA,
1543
+ startAngleSource,
1544
+ endAngleSource,
1545
+ innerRadius,
1546
+ outerRadius,
1547
+ color
1548
+ );
1549
+ }
1550
+ if (data2.geneB && data2.geneA != data2.geneB) {
1551
+ const startAngleTarget = this.calculateStartAngle(data2.chrB, data2.posB);
1552
+ const endAngleTarget = this.calculateEndAngle(data2.chrB, data2.posB);
1553
+ if (startAngleTarget == null || endAngleTarget == null) return;
1554
+ this.addLabelOrFusion(
1555
+ data2,
1556
+ data2.geneB,
1557
+ data2.posB,
1558
+ data2.chrB,
1559
+ startAngleTarget,
1560
+ endAngleTarget,
1561
+ innerRadius,
1562
+ outerRadius,
1563
+ color
1564
+ );
1565
+ }
1566
+ }
1567
+ });
1568
+ const labelsArray = Array.from(this.labelMap.values());
1569
+ labelsArray.forEach((label) => {
1570
+ cnvData.forEach((cnv) => {
1571
+ if ((cnv.dt == dtcnv || cnv.dt == dtitd) && label.chr == cnv.chr && label.stop >= cnv.start && cnv.stop >= label.start) {
1572
+ const mutation = {
1573
+ dt: cnv.dt,
1574
+ value: cnv.value,
1575
+ color: cnv.dt == dtitd ? mclass[mclassitd].color : CnvColorProvider.getColor(cnv.value, this.settings, this.cnvMaxPercentileAbs),
1576
+ chr: cnv.chr,
1577
+ start: cnv.start,
1578
+ stop: cnv.stop
1579
+ };
1580
+ if (label.cnvTooltip) {
1581
+ label.cnvTooltip.push(mutation);
1582
+ } else {
1583
+ label.cnvTooltip = [];
1584
+ label.cnvTooltip.push(mutation);
1585
+ }
1586
+ }
1587
+ });
1588
+ });
1589
+ return Array.from(this.labelMap.values());
1590
+ }
1591
+ addLabelOrMutation(data, gene, mname, startAngle, endAngle, innerRadius, outerRadius, color, dataClass) {
1592
+ const label = this.labelMap.get(gene);
1593
+ const mutation = {
1594
+ mname,
1595
+ color,
1596
+ dataClass,
1597
+ chr: data.chr,
1598
+ position: data.position,
1599
+ vafs: data.vafs
1600
+ };
1601
+ if (!label) {
1602
+ this.labelMap.set(
1603
+ gene,
1604
+ LabelFactory.createLabel(
1605
+ startAngle,
1606
+ endAngle,
1607
+ innerRadius,
1608
+ outerRadius,
1609
+ data.value,
1610
+ gene,
1611
+ color,
1612
+ dataClass,
1613
+ data.chr,
1614
+ data.position,
1615
+ data.isPrioritized,
1616
+ this.settings.rings.labelsToLinesGap,
1617
+ mutation
1618
+ )
1619
+ );
1620
+ } else {
1621
+ if (label.mutationsTooltip) {
1622
+ label.start = Math.min(label.start, data.position);
1623
+ label.stop = Math.max(label.stop, data.position);
1624
+ label.mutationsTooltip.push(mutation);
1625
+ } else {
1626
+ label.mutationsTooltip = [];
1627
+ label.start = Math.min(label.start, data.position);
1628
+ label.stop = Math.max(label.stop, data.position);
1629
+ label.mutationsTooltip.push(mutation);
1630
+ }
1631
+ }
1632
+ }
1633
+ addLabelOrFusion(data, gene, position, chr, startAngle, endAngle, innerRadius, outerRadius, color) {
1634
+ const label = this.labelMap.get(gene);
1635
+ const fusionTooltip = {
1636
+ color,
1637
+ chrA: data.chrA,
1638
+ chrB: data.chrB,
1639
+ posA: data.posA,
1640
+ posB: data.posB,
1641
+ geneA: data.geneA,
1642
+ geneB: data.geneB,
1643
+ strandA: data.strandA,
1644
+ strandB: data.strandB
1645
+ };
1646
+ if (!label) {
1647
+ this.labelMap.set(
1648
+ gene,
1649
+ LabelFactory.createLabel(
1650
+ startAngle,
1651
+ endAngle,
1652
+ innerRadius,
1653
+ outerRadius,
1654
+ data.value,
1655
+ gene,
1656
+ color,
1657
+ "Fusion transcript",
1658
+ chr,
1659
+ position,
1660
+ data.isPrioritized,
1661
+ this.settings.rings.labelsToLinesGap,
1662
+ void 0,
1663
+ fusionTooltip
1664
+ )
1665
+ );
1666
+ } else {
1667
+ if (label.fusionTooltip) {
1668
+ label.start = Math.min(label.start, position);
1669
+ label.stop = Math.max(label.stop, position);
1670
+ label.fusionTooltip.push(fusionTooltip);
1671
+ } else {
1672
+ label.fusionTooltip = [];
1673
+ label.start = Math.min(label.start, position);
1674
+ label.stop = Math.max(label.stop, position);
1675
+ label.fusionTooltip.push(fusionTooltip);
1676
+ }
1677
+ }
1678
+ }
1679
+ calculateStartAngle(chr, position) {
1680
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1681
+ if (index === -1) return null;
1682
+ const chromosome = this.reference.chromosomes[index];
1683
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1684
+ }
1685
+ calculateEndAngle(chr, position) {
1686
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1687
+ if (index === -1) return null;
1688
+ const chromosome = this.reference.chromosomes[index];
1689
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1690
+ }
1691
+ };
1692
+
1693
+ // plots/disco/label/Labels.ts
1694
+ var Labels = class extends Ring {
1695
+ constructor(settings, elements, hasPrioritizedGenes) {
1696
+ super(
1697
+ settings.rings.labelLinesInnerRadius,
1698
+ settings.rings.labelsToLinesDistance,
1699
+ elements.sort((a, b) => {
1700
+ return a.startAngle < b.startAngle ? -1 : a.startAngle > b.startAngle ? 1 : 0;
1701
+ })
1702
+ );
1703
+ this.elementsToDisplay = [];
1704
+ this.settings = settings;
1705
+ this.hasPrioritizedGenes = hasPrioritizedGenes;
1706
+ const circumference = 2 * Math.PI * (settings.rings.labelLinesInnerRadius + settings.rings.labelsToLinesDistance);
1707
+ this.overlapAngle = this.settings.label.overlapAngleFactor * this.settings.label.fontSize / circumference;
1708
+ this.calculateCollisions();
1709
+ }
1710
+ calculateCollisions() {
1711
+ this.collisions = [];
1712
+ let hasPrioritizedGenesList = [];
1713
+ hasPrioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1714
+ if (this.settings.label.prioritizeGeneLabelsByGeneSets) {
1715
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(hasPrioritizedGenesList);
1716
+ } else if (this.hasPrioritizedGenes) {
1717
+ const prioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1718
+ const filteredPrioritizedGenesList = this.getLabelsWithPrioritizedGenes(prioritizedGenesList);
1719
+ const withoutPrioritizedGenesList = this.elements.filter((label) => !label.isPrioritized);
1720
+ const combinedAndSortedList = [...withoutPrioritizedGenesList, ...filteredPrioritizedGenesList].sort(
1721
+ (a, b) => a.startAngle - b.startAngle
1722
+ );
1723
+ this.elementsToDisplay = this.getAllLabels(combinedAndSortedList);
1724
+ } else {
1725
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(this.elements);
1726
+ }
1727
+ }
1728
+ getLabelsWithPrioritizedGenes(elemenets) {
1729
+ const filteredList = [];
1730
+ let prev = { endAngle: 0 };
1731
+ elemenets.forEach((element, index) => {
1732
+ if (index == 0) {
1733
+ filteredList.push(element);
1734
+ prev = element;
1735
+ } else {
1736
+ const overlap = prev.endAngle - element.startAngle + this.overlapAngle;
1737
+ if (overlap > 0 && overlap < this.settings.label.maxDeltaAngle) {
1738
+ const labelCopy = LabelFactory.createMovedLabel(element, overlap);
1739
+ filteredList?.push(labelCopy);
1740
+ prev = labelCopy;
1741
+ }
1742
+ if (overlap <= 0) {
1743
+ filteredList.push(element);
1744
+ prev = element;
1745
+ }
1746
+ }
1747
+ });
1748
+ return filteredList;
1749
+ }
1750
+ getAllLabels(elemenets) {
1751
+ const filteredList = [];
1752
+ let prev = { endAngle: 0 };
1753
+ const elemenetsLength = elemenets.length;
1754
+ let lastCancerGeneLabelIndex = -1;
1755
+ for (let index = 0; index < elemenets.length; index++) {
1756
+ const element = elemenets[index];
1757
+ if (element.isPrioritized) {
1758
+ filteredList.push(element);
1759
+ lastCancerGeneLabelIndex = index;
1760
+ prev = element;
1761
+ continue;
1762
+ }
1763
+ if (index == 0) {
1764
+ if (elemenetsLength > 1) {
1765
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1766
+ continue;
1767
+ }
1768
+ filteredList.push(element);
1769
+ prev = element;
1770
+ }
1771
+ continue;
1772
+ }
1773
+ const prevOverlap = prev.endAngle - element.startAngle + this.overlapAngle;
1774
+ if (prevOverlap > 0 && prevOverlap < this.settings.label.maxDeltaAngle) {
1775
+ if (index == length - 1) {
1776
+ filteredList.push(element);
1777
+ continue;
1778
+ }
1779
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap)) {
1780
+ continue;
1781
+ }
1782
+ const labelCopy = LabelFactory.createMovedLabel(element, prevOverlap);
1783
+ this.collisions?.push(labelCopy);
1784
+ filteredList.push(element);
1785
+ prev = labelCopy;
1786
+ }
1787
+ if (prevOverlap <= 0) {
1788
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1789
+ continue;
1790
+ }
1791
+ filteredList.push(element);
1792
+ prev = element;
1793
+ }
1794
+ }
1795
+ return filteredList;
1796
+ }
1797
+ isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap) {
1798
+ const nextLabelWithCancerGene = this.getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex);
1799
+ if (nextLabelWithCancerGene) {
1800
+ const nextOverlap = element.endAngle + prevOverlap - nextLabelWithCancerGene.startAngle + this.overlapAngle;
1801
+ if (nextOverlap > 0) {
1802
+ return true;
1803
+ }
1804
+ }
1805
+ return false;
1806
+ }
1807
+ getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex) {
1808
+ return elemenets.find((label, index) => label.isPrioritized && index > lastCancerGeneLabelIndex);
1809
+ }
1810
+ };
1811
+
1812
+ // plots/disco/snv/NonExonicSnvArcsMapper.ts
1813
+ var NonExonicSnvArcsMapper = class {
1814
+ constructor(nonExonicInnerRadius, nonExonicWidht, sampleName, reference) {
1815
+ this.nonExonicInnerRadius = nonExonicInnerRadius;
1816
+ this.nonExonicWidht = nonExonicWidht;
1817
+ this.sampleName = sampleName;
1818
+ this.reference = reference;
1819
+ this.onePxArcAngle = 1 / nonExonicInnerRadius;
1820
+ }
1821
+ map(arcData) {
1822
+ const innerRadius = this.nonExonicInnerRadius;
1823
+ const outerRadius = innerRadius + this.nonExonicWidht;
1824
+ const arcs = [];
1825
+ arcData.forEach((data) => {
1826
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1827
+ const startAngle = this.calculateStartAngle(data);
1828
+ const endAngle = this.calculateEndAngle(data);
1829
+ if (startAngle === null || endAngle === null) return;
1830
+ const arc = {
1831
+ startAngle,
1832
+ endAngle,
1833
+ innerRadius,
1834
+ outerRadius,
1835
+ color: mLabel.color,
1836
+ text: data.gene,
1837
+ dataClass: mLabel.label,
1838
+ mname: data.mname,
1839
+ chr: data.chr,
1840
+ pos: data.position,
1841
+ vafs: data.vafs,
1842
+ sampleName: [data.sampleName]
1843
+ };
1844
+ arcs.push(arc);
1845
+ });
1846
+ return arcs;
1847
+ }
1848
+ calculateStartAngle(data) {
1849
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1850
+ if (index === -1) return null;
1851
+ const chromosome = this.reference.chromosomes[index];
1852
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size) - this.onePxArcAngle;
1853
+ }
1854
+ calculateEndAngle(data) {
1855
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1856
+ const chromosome = this.reference.chromosomes[index];
1857
+ return this.onePxArcAngle + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size);
1858
+ }
1859
+ };
1860
+
1861
+ // plots/disco/loh/GradientColorProvider.ts
1862
+ var GradientColorProvider = class {
1863
+ static provide(value) {
1864
+ const clampedValue = Math.min(Math.max(value, 0), 1);
1865
+ const colorValue = Math.round(clampedValue * 255);
1866
+ return `rgb(${colorValue}, ${colorValue}, ${colorValue})`;
1867
+ }
1868
+ };
1869
+
1870
+ // plots/disco/loh/LohArcMapper.ts
1871
+ var LohArcMapper = class {
1872
+ constructor(lohInnerRadius, lohWidth, sampleName, reference) {
1873
+ this.lohInnerRadius = lohInnerRadius;
1874
+ this.lohWidth = lohWidth;
1875
+ this.sampleName = sampleName;
1876
+ this.reference = reference;
1877
+ }
1878
+ map(arcData) {
1879
+ const arcs = [];
1880
+ arcData.forEach((data) => {
1881
+ const startAngle = this.calculateStartAngle(data);
1882
+ const endAngle = this.calculateEndAngle(data);
1883
+ if (startAngle === null || endAngle === null) return;
1884
+ const innerRadius = this.lohInnerRadius;
1885
+ const outerRadius = innerRadius + this.lohWidth;
1886
+ const color = GradientColorProvider.provide(data.segmean);
1887
+ const arc = {
1888
+ startAngle,
1889
+ endAngle,
1890
+ innerRadius,
1891
+ outerRadius,
1892
+ color,
1893
+ text: data.gene,
1894
+ chr: data.chr,
1895
+ start: data.start,
1896
+ stop: data.stop,
1897
+ value: data.segmean
1898
+ };
1899
+ arcs.push(arc);
1900
+ });
1901
+ return arcs;
1902
+ }
1903
+ calculateStartAngle(data) {
1904
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1905
+ if (index === -1) return null;
1906
+ const chromosome = this.reference.chromosomes[index];
1907
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1908
+ }
1909
+ calculateEndAngle(data) {
1910
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1911
+ const chromosome = this.reference.chromosomes[index];
1912
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1913
+ }
1914
+ };
1915
+
1916
+ // plots/disco/ring/Rings.ts
1917
+ var Rings = class {
1918
+ constructor(labelsRing, chromosomesRing, nonExonicArcRing, snvArcRing, cnvArcRing, lohArcRing, mutationWaterfallRing) {
1919
+ this.labelsRing = labelsRing;
1920
+ this.chromosomesRing = chromosomesRing;
1921
+ this.nonExonicArcRing = nonExonicArcRing;
1922
+ this.snvArcRing = snvArcRing;
1923
+ this.cnvArcRing = cnvArcRing;
1924
+ this.lohArcRing = lohArcRing;
1925
+ this.mutationWaterfallRing = mutationWaterfallRing;
1926
+ }
1927
+ };
1928
+
1929
+ // plots/disco/waterfall/MutationWaterfallMapper.ts
1930
+ var MutationWaterfallMapper = class {
1931
+ constructor(innerRadius, ringWidth, reference, logRange, color = "#4d4d4d") {
1932
+ this.innerRadius = innerRadius;
1933
+ this.ringWidth = ringWidth;
1934
+ this.reference = reference;
1935
+ this.logRange = logRange;
1936
+ this.color = color;
1937
+ }
1938
+ map(data = []) {
1939
+ if (!data.length) return [];
1940
+ const min = this.logRange?.min ?? 0;
1941
+ const max = this.logRange?.max ?? min + 1;
1942
+ const span = max - min || 1;
1943
+ const points = [];
1944
+ for (const datum of data) {
1945
+ const chrIndex = this.reference.chromosomesOrder.indexOf(datum.chr);
1946
+ if (chrIndex === -1) continue;
1947
+ const chromosome = this.reference.chromosomes[chrIndex];
1948
+ const chrAngleSpan = chromosome.endAngle - chromosome.startAngle;
1949
+ const relPos = chromosome.size > 0 ? datum.position / chromosome.size : 0;
1950
+ const angle = chromosome.startAngle + chrAngleSpan * relPos;
1951
+ const normalized = Math.max(0, Math.min(1, (datum.logDistance - min) / span));
1952
+ const radius = this.innerRadius + this.ringWidth * normalized;
1953
+ points.push({
1954
+ startAngle: angle,
1955
+ endAngle: angle,
1956
+ innerRadius: radius,
1957
+ outerRadius: radius,
1958
+ text: chromosome.text,
1959
+ color: this.color,
1960
+ chr: datum.chr,
1961
+ position: datum.position,
1962
+ logDistance: datum.logDistance,
1963
+ ringInnerRadius: this.innerRadius,
1964
+ ringWidth: this.ringWidth,
1965
+ rangeMin: min,
1966
+ rangeMax: max
1967
+ });
1968
+ }
1969
+ return points;
1970
+ }
1971
+ };
1972
+
1973
+ // plots/disco/viewmodel/ViewModelProvider.ts
1974
+ var ViewModelProvider = class {
1975
+ constructor(settings, dataMapper, reference, sampleName, genesetName, discoInteractions) {
1976
+ this.nonExonicArcRing = void 0;
1977
+ this.settings = settings;
1978
+ this.dataMapper = dataMapper;
1979
+ this.reference = reference;
1980
+ this.sampleName = sampleName;
1981
+ this.genesetName = genesetName;
1982
+ this.discoInteractions = discoInteractions;
1983
+ }
1984
+ map(data) {
1985
+ const dataHolder = this.dataMapper.map(data);
1986
+ let labelsRing;
1987
+ if (this.settings.Disco.showGeneNames) {
1988
+ const labelsMapper = new LabelsMapper(
1989
+ this.settings,
1990
+ this.sampleName,
1991
+ this.reference,
1992
+ dataHolder.cnvMaxPercentileAbs
1993
+ );
1994
+ const labelsData = labelsMapper.map(dataHolder.labelData, dataHolder.cnvData);
1995
+ labelsRing = new Labels(this.settings, labelsData, dataHolder.hasPrioritizedGenes);
1996
+ } else {
1997
+ labelsRing = new Labels(this.settings, [], false);
1998
+ }
1999
+ const chromosomesRing = new Ring(
2000
+ this.settings.rings.chromosomeInnerRadius,
2001
+ this.settings.rings.chromosomeWidth,
2002
+ this.reference.chromosomes
2003
+ );
2004
+ const nonExonicSnvArcsMapper = new NonExonicSnvArcsMapper(
2005
+ dataHolder.nonExonicInnerRadius,
2006
+ this.settings.rings.nonExonicRingWidth,
2007
+ this.sampleName,
2008
+ this.reference
2009
+ );
2010
+ const nonExonicData = nonExonicSnvArcsMapper.map(dataHolder.nonExonicSnvData);
2011
+ if (nonExonicData.length > 0) {
2012
+ this.nonExonicArcRing = new Ring(
2013
+ dataHolder.nonExonicInnerRadius,
2014
+ this.settings.rings.nonExonicRingWidth,
2015
+ nonExonicData
2016
+ );
2017
+ }
2018
+ this.snvArcsMapper = new SnvArcsMapper(
2019
+ dataHolder.snvInnerRadius,
2020
+ this.settings.rings.snvRingWidth,
2021
+ this.sampleName,
2022
+ this.reference
2023
+ );
2024
+ const snvData = this.snvArcsMapper.map(dataHolder.snvRingDataMap);
2025
+ if (snvData.length > 0) {
2026
+ this.snvArcRing = new Ring(dataHolder.snvInnerRadius, this.settings.rings.snvRingWidth, snvData);
2027
+ }
2028
+ const lohMapper = new LohArcMapper(
2029
+ dataHolder.lohInnerRadius,
2030
+ this.settings.rings.lohRingWidth,
2031
+ this.sampleName,
2032
+ this.reference
2033
+ );
2034
+ const lohData = lohMapper.map(dataHolder.lohData);
2035
+ if (lohData.length > 0) {
2036
+ this.lohArcRing = new Ring(dataHolder.lohInnerRadius, this.settings.rings.lohRingWidth, lohData);
2037
+ }
2038
+ this.cnvArcsMapper = new CnvArcsMapper(
2039
+ dataHolder.cnvInnerRadius,
2040
+ this.settings.rings.cnvRingWidth,
2041
+ this.settings,
2042
+ this.sampleName,
2043
+ this.reference,
2044
+ dataHolder.percentilePositive,
2045
+ dataHolder.percentileNegative,
2046
+ dataHolder.cappedCnvMaxAbsValue,
2047
+ dataHolder.cnvMaxPercentileAbs,
2048
+ this.settings.cnv.unit,
2049
+ this.settings.Disco.cnvRenderingType
2050
+ );
2051
+ const cnvData = this.cnvArcsMapper.map(dataHolder.cnvData);
2052
+ if (cnvData.length > 0) {
2053
+ this.cnvArcRing = new Ring(dataHolder.cnvInnerRadius, this.settings.rings.cnvRingWidth, cnvData);
2054
+ }
2055
+ if (this.settings.Disco.mutationWaterfallPlot && dataHolder.mutationWaterfallData?.length && dataHolder.mutationWaterfallInnerRadius !== void 0 && //Added this check to prevent TypeScript error "mutationWaterfallInnerRadius might be undefined"
2056
+ (dataHolder.mutationWaterfallInnerRadius ?? 0) > 0 && dataHolder.mutationWaterfallLogRange) {
2057
+ const mutationWaterfallMapper = new MutationWaterfallMapper(
2058
+ dataHolder.mutationWaterfallInnerRadius,
2059
+ this.settings.rings.mutationWaterfallRingWidth,
2060
+ this.reference,
2061
+ dataHolder.mutationWaterfallLogRange,
2062
+ this.settings.Disco.mutationWaterfallColor || "#4d4d4d"
2063
+ );
2064
+ const waterfallData = mutationWaterfallMapper.map(dataHolder.mutationWaterfallData);
2065
+ if (waterfallData.length > 0) {
2066
+ this.mutationWaterfallRing = new Ring(
2067
+ dataHolder.mutationWaterfallInnerRadius,
2068
+ this.settings.rings.mutationWaterfallRingWidth,
2069
+ waterfallData
2070
+ );
2071
+ }
2072
+ }
2073
+ const fusionMapper = new FusionMapper(dataHolder.fusionRadius, this.sampleName, this.reference);
2074
+ const fusions = fusionMapper.map(dataHolder.fusionData);
2075
+ let lohLegend;
2076
+ if (this.settings.legend.lohLegendEnabled && dataHolder.lohData.length) {
2077
+ lohLegend = new LohLegend(dataHolder.lohData.length);
2078
+ }
2079
+ const fusionLegendCounts = fusions.reduce(
2080
+ (counts, fusion) => {
2081
+ if (fusion.target && fusion.source.positionInChromosome.chromosome == fusion.target.positionInChromosome.chromosome)
2082
+ counts.intrachromosomal++;
2083
+ else counts.interchromosomal++;
2084
+ return counts;
2085
+ },
2086
+ { interchromosomal: 0, intrachromosomal: 0 }
2087
+ );
2088
+ const legend = new Legend(
2089
+ this.settings.legend.snvTitle,
2090
+ this.settings.legend.cnvTitle,
2091
+ this.settings.legend.lohTitle,
2092
+ this.settings.legend.fusionTitle,
2093
+ this.settings.Disco.cnvPercentile,
2094
+ this.settings.Disco.cnvCutoffMode,
2095
+ this.snvArcsMapper ? this.snvArcsMapper.snvClassMap : /* @__PURE__ */ new Map(),
2096
+ this.cnvArcsMapper ? this.cnvArcsMapper.cnvClassMap : /* @__PURE__ */ new Map(),
2097
+ this.settings.Disco.cnvRenderingType,
2098
+ fusions.length > 0,
2099
+ this.discoInteractions,
2100
+ lohLegend,
2101
+ this.settings.Disco.mutationWaterfallPlot && this.mutationWaterfallRing ? {
2102
+ color: this.settings.Disco.mutationWaterfallColor || "#4d4d4d",
2103
+ onColorChange: this.discoInteractions.onMutationWaterfallColorChange
2104
+ } : void 0,
2105
+ fusionLegendCounts,
2106
+ dataHolder.cnvData.filter((event) => event.dt == dtcnv).length
2107
+ );
2108
+ const rings = new Rings(
2109
+ labelsRing,
2110
+ chromosomesRing,
2111
+ this.nonExonicArcRing,
2112
+ this.snvArcRing,
2113
+ this.cnvArcRing,
2114
+ this.lohArcRing,
2115
+ this.mutationWaterfallRing
2116
+ );
2117
+ return new ViewModel(
2118
+ this.settings,
2119
+ rings,
2120
+ legend,
2121
+ fusions,
2122
+ dataHolder,
2123
+ this.genesetName,
2124
+ data.filter((i) => i.dt == dtsnvindel).length
2125
+ );
2126
+ }
2127
+ };
2128
+
2129
+ // plots/disco/viewmodel/ViewModelMapper.ts
2130
+ var ViewModelMapper = class _ViewModelMapper {
2131
+ static {
2132
+ this.snvClassLayer = {
2133
+ M: "exonic",
2134
+ E: "exonic",
2135
+ F: "exonic",
2136
+ N: "exonic",
2137
+ S: "exonic",
2138
+ D: "exonic",
2139
+ I: "exonic",
2140
+ P: "exonic",
2141
+ L: "exonic",
2142
+ Utr3: "exonic",
2143
+ Utr5: "exonic",
2144
+ ProteinAltering: "exonic",
2145
+ mnv: "non-exonic",
2146
+ ITD: "non-exonic",
2147
+ insertion: "non-exonic",
2148
+ deletion: "non-exonic",
2149
+ Intron: "non-exonic",
2150
+ X: "non-exonic",
2151
+ noncoding: "non-exonic"
2152
+ };
2153
+ }
2154
+ constructor(settings, discoInteractions) {
2155
+ this.settings = JSON.parse(JSON.stringify(settings));
2156
+ this.discoInteractions = discoInteractions;
2157
+ }
2158
+ applyRadius() {
2159
+ const radius = this.settings.Disco.radius;
2160
+ if (!radius) return;
2161
+ const scale = radius / this.settings.rings.labelLinesInnerRadius;
2162
+ this.settings.rings.labelLinesInnerRadius *= scale;
2163
+ this.settings.rings.labelsToLinesDistance *= scale;
2164
+ this.settings.rings.chromosomeInnerRadius *= scale;
2165
+ }
2166
+ static computeDynamicRadius(data) {
2167
+ let ringCount = 0;
2168
+ if (data.some((d) => d.dt == dtsnvindel)) ringCount++;
2169
+ if (data.some((d) => d.dt == dtcnv || d.dt == dtitd)) ringCount++;
2170
+ if (data.some((d) => d.dt == dtloh)) ringCount++;
2171
+ if (ringCount <= 1) return 200;
2172
+ if (ringCount == 2) return 250;
2173
+ return 300;
2174
+ }
2175
+ map(opts) {
2176
+ const chrSizes = opts.args.genome.majorchr;
2177
+ const chromosomesOverride = {};
2178
+ for (const chr of Object.keys(chrSizes)) {
2179
+ if (!this.settings.Disco.hiddenChromosomes.includes(chr)) {
2180
+ chromosomesOverride[chr] = chrSizes[chr];
2181
+ }
2182
+ }
2183
+ const sampleName = opts.args.sampleName;
2184
+ const genome = opts.args.genome;
2185
+ const prioritizedGenes = genome?.geneset?.[0] ? genome.geneset[0].lst : [];
2186
+ const genesetName = genome?.geneset?.[0] ? genome.geneset[0].name : "";
2187
+ const data = opts.args.data;
2188
+ if (this.settings.Disco.autoRadius) {
2189
+ this.settings.Disco.radius = _ViewModelMapper.computeDynamicRadius(data);
2190
+ }
2191
+ this.applyRadius();
2192
+ const reference = new Reference(this.settings, chrSizes, chromosomesOverride);
2193
+ const dataMapper = new DataMapper(this.settings, reference, sampleName, prioritizedGenes);
2194
+ return new ViewModelProvider(
2195
+ this.settings,
2196
+ dataMapper,
2197
+ reference,
2198
+ sampleName,
2199
+ genesetName,
2200
+ this.discoInteractions
2201
+ ).map(data);
2202
+ }
2203
+ };
2204
+
2205
+ // plots/disco/legend/LegendJSONMapper.ts
2206
+ var LegendJSONMapper = class {
2207
+ constructor(cappedCnvMaxAbsValue) {
2208
+ this.cappedCnvMaxAbsValue = cappedCnvMaxAbsValue;
2209
+ }
2210
+ map(legend) {
2211
+ const legendJSON = [];
2212
+ let order = 0;
2213
+ if (legend.snvClassMap) {
2214
+ this.mapSnv(legend, legendJSON, order++);
2215
+ }
2216
+ if (legend.cnvCount > 0 && legend.cnvRenderingType == "heatmap" /* heatmap */) {
2217
+ this.mapCnvHeatmap(legend, legendJSON, order++);
2218
+ } else if (legend.cnvCount > 0 && legend.cnvRenderingType == "bar" /* bar */) {
2219
+ if (legend.cnvClassMap) {
2220
+ this.mapCnvBar(legend, legendJSON, order++);
2221
+ }
2222
+ }
2223
+ if (legend.cnvClassMap.has(4 /* ITD */)) {
2224
+ this.mapItd(legend, legendJSON, order++);
2225
+ }
2226
+ if (legend.lohLegend) {
2227
+ this.mapLoh(legend, legendJSON, order++);
2228
+ }
2229
+ if (legend.fusionLegend) {
2230
+ this.mapFusion(legend, legendJSON, order++);
2231
+ }
2232
+ if (legend.mutationWaterfallLegend) {
2233
+ this.mapMutationWaterfall(legend, legendJSON, order++);
2234
+ }
2235
+ return legendJSON;
2236
+ }
2237
+ mapSnv(legend, legendJSON, order) {
2238
+ const snvItems = [];
2239
+ let snvOrder = 0;
2240
+ for (const [snvKey, snvLegendElement] of legend.snvClassMap) {
2241
+ snvItems.push({
2242
+ termid: legend.snvTitle,
2243
+ key: snvKey,
2244
+ text: `${snvLegendElement.snvType} (${snvLegendElement.count})`,
2245
+ color: snvLegendElement.color,
2246
+ order: snvOrder++
2247
+ });
2248
+ }
2249
+ legendJSON.push({
2250
+ name: legend.snvTitle,
2251
+ order,
2252
+ items: snvItems
2253
+ });
2254
+ }
2255
+ mapCnvBar(legend, legendJSON, order) {
2256
+ if (!legend.cnvClassMap) return;
2257
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2258
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2259
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2260
+ if (gain && loss && cap) {
2261
+ let cnvOrder = 0;
2262
+ const cnvItems = [];
2263
+ if (gain.value > 0) {
2264
+ cnvItems.push({
2265
+ termid: legend.cnvTitle,
2266
+ key: 1 /* Gain */,
2267
+ text: `Max: ${gain.value}`,
2268
+ color: gain.color,
2269
+ order: cnvOrder++
2270
+ });
2271
+ }
2272
+ if (loss.value < 0) {
2273
+ cnvItems.push({
2274
+ termid: legend.cnvTitle,
2275
+ key: 0 /* Loss */,
2276
+ text: `Min: ${loss.value}`,
2277
+ color: loss.color,
2278
+ order: cnvOrder++
2279
+ });
2280
+ }
2281
+ cnvItems.push({
2282
+ termid: legend.cnvTitle,
2283
+ key: 2 /* Cap */,
2284
+ text: `Capping: ${cap.value}`,
2285
+ color: cap.color,
2286
+ order: cnvOrder++
2287
+ // ,
2288
+ // onClickCallback: this.onClickCallback
2289
+ });
2290
+ legendJSON.push({
2291
+ name: legend.cnvTitle,
2292
+ id: "sjpp-disco-cnv-legend",
2293
+ order,
2294
+ items: cnvItems
2295
+ });
2296
+ }
2297
+ }
2298
+ mapCnvHeatmap(legend, legendJSON, order) {
2299
+ if (!legend.cnvClassMap) return;
2300
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2301
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2302
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2303
+ if (gain && loss && cap) {
2304
+ let cnvOrder = 0;
2305
+ const cnvItems = [];
2306
+ const base = {
2307
+ termid: legend.cnvTitle,
2308
+ width: 100,
2309
+ order: cnvOrder++,
2310
+ isLegendItem: true,
2311
+ dt: 4
2312
+ };
2313
+ if (gain.value > 0 && loss.value < 0) {
2314
+ const maxValue = Math.max(Math.abs(loss.value), gain.value);
2315
+ const domain = [-maxValue, 0, maxValue];
2316
+ cnvItems.push(
2317
+ Object.assign(
2318
+ {
2319
+ key: 3 /* LossGain */,
2320
+ domain,
2321
+ scale: linear([-1, 0, 1], [loss.color, "white", gain.color]),
2322
+ labels: { left: "Loss", right: "Gain" },
2323
+ numericInputs: {
2324
+ cutoffMode: legend.cnvCutoffMode,
2325
+ defaultPercentile: legend.cnvPercentile,
2326
+ callback: (obj) => legend.discoInteractions.colorScaleNumericInputsCallback(obj)
2327
+ }
2328
+ },
2329
+ base
2330
+ )
2331
+ );
2332
+ } else {
2333
+ if (gain.value > 0) {
2334
+ cnvItems.push(
2335
+ Object.assign(
2336
+ {
2337
+ key: 1 /* Gain */,
2338
+ text: "Copy number gain",
2339
+ domain: [0, gain.value],
2340
+ scale: linear([0, 1], ["white", gain.color])
2341
+ },
2342
+ base
2343
+ )
2344
+ );
2345
+ }
2346
+ if (loss.value < 0) {
2347
+ cnvItems.push(
2348
+ Object.assign(
2349
+ {
2350
+ key: 0 /* Loss */,
2351
+ text: "Copy number loss",
2352
+ domain: [loss.value, 0],
2353
+ scale: linear([0, 1], [loss.color, "white"])
2354
+ },
2355
+ base
2356
+ )
2357
+ );
2358
+ }
2359
+ }
2360
+ legendJSON.push({
2361
+ name: legend.cnvTitle,
2362
+ order,
2363
+ id: "sjpp-disco-cnv-legend",
2364
+ items: cnvItems
2365
+ });
2366
+ }
2367
+ }
2368
+ mapItd(legend, legendJSON, order) {
2369
+ const itd = legend.cnvClassMap.get(4 /* ITD */);
2370
+ if (!itd) return;
2371
+ legendJSON.push({
2372
+ name: "ITD",
2373
+ order,
2374
+ items: [
2375
+ {
2376
+ termid: "ITD",
2377
+ key: 4 /* ITD */,
2378
+ text: `ITD (${itd.value})`,
2379
+ color: itd.color,
2380
+ order: 0
2381
+ }
2382
+ ]
2383
+ });
2384
+ }
2385
+ mapLoh(legend, legendJSON, order) {
2386
+ if (!legend.lohLegend) return;
2387
+ legendJSON.push({
2388
+ name: legend.lohTitle,
2389
+ order,
2390
+ items: [
2391
+ {
2392
+ termid: legend.lohTitle,
2393
+ key: "count",
2394
+ text: `LOH (${legend.lohLegend.count})`,
2395
+ skipIcon: true,
2396
+ order: 0
2397
+ }
2398
+ ]
2399
+ });
2400
+ }
2401
+ mapFusion(legend, legendJSON, order) {
2402
+ const fusionItems = [];
2403
+ fusionItems.push({
2404
+ termid: legend.fusionTitle,
2405
+ key: "#6A3D9A" /* Interchromosomal */,
2406
+ text: `Interchromosomal (${legend.fusionLegendCounts.interchromosomal})`,
2407
+ color: "#6A3D9A" /* Interchromosomal */.valueOf(),
2408
+ order: 0
2409
+ });
2410
+ fusionItems.push({
2411
+ termid: legend.fusionTitle,
2412
+ key: "#1B9E77" /* Intrachromosomal */,
2413
+ text: `Intrachromosomal (${legend.fusionLegendCounts.intrachromosomal})`,
2414
+ color: "#1B9E77" /* Intrachromosomal */.valueOf(),
2415
+ order: 1
2416
+ });
2417
+ legendJSON.push({
2418
+ name: legend.fusionTitle,
2419
+ order,
2420
+ items: fusionItems
2421
+ });
2422
+ }
2423
+ mapMutationWaterfall(legend, legendJSON, order) {
2424
+ if (!legend.mutationWaterfallLegend) return;
2425
+ const waterfallItems = [];
2426
+ waterfallItems.push({
2427
+ termid: "Mutation Waterfall Plot",
2428
+ key: "mutation-waterfall-color",
2429
+ text: "Dot color",
2430
+ color: legend.mutationWaterfallLegend.color,
2431
+ order: 0,
2432
+ colorPicker: true,
2433
+ inputWidth: 28,
2434
+ width: 0,
2435
+ onColorChange: legend.mutationWaterfallLegend.onColorChange
2436
+ });
2437
+ waterfallItems.push({
2438
+ termid: "Mutation Waterfall Plot",
2439
+ key: "mutation-waterfall-axis",
2440
+ text: "Axis: log10 intermutation distance",
2441
+ order: 1,
2442
+ skipIcon: true,
2443
+ width: 0
2444
+ });
2445
+ legendJSON.push({
2446
+ name: "Mutation Waterfall Plot",
2447
+ order,
2448
+ items: waterfallItems
2449
+ });
2450
+ }
2451
+ };
2452
+
2453
+ // plots/disco/cnv/renderCnvSourceLegend.ts
2454
+ function parseSetLabel(set, index) {
2455
+ let text = set.name || `Set ${index + 1}`;
2456
+ let href;
2457
+ let target = "_blank";
2458
+ if (set.nameHtml) {
2459
+ const parser = new DOMParser();
2460
+ const doc = parser.parseFromString(set.nameHtml, "text/html");
2461
+ const anchor = doc.querySelector("a");
2462
+ if (anchor) {
2463
+ href = anchor.getAttribute("href") || void 0;
2464
+ target = anchor.getAttribute("target") || "_blank";
2465
+ text = anchor.textContent?.trim() || text;
2466
+ } else {
2467
+ text = doc.body.textContent?.trim() || text;
2468
+ }
2469
+ }
2470
+ return { text, href, target };
2471
+ }
2472
+ function renderCnvSourceLegend(legendG, datasets, fontSize, onChange) {
2473
+ if (!legendG || legendG.empty()) throw new Error("legendG is required");
2474
+ if (!datasets || datasets.length === 0) throw new Error("at least one dataset is required");
2475
+ legendG.select("g.sjpp-cnv-source").remove();
2476
+ const gBBox = legendG.node().getBBox();
2477
+ const cnvSrcWrapper = legendG.append("g").attr("class", "sjpp-cnv-source").attr("transform", `translate(${gBBox.width},${gBBox.y + fontSize})`);
2478
+ const btnPaddingX = Math.round(fontSize * 0.8);
2479
+ const btnHgt = Math.round(fontSize * 1.8);
2480
+ const btnWrapper = cnvSrcWrapper.append("g").attr("transform", `translate(${fontSize},${-btnHgt / 2})`).style("cursor", "pointer").on("click", function(event) {
2481
+ event.stopPropagation();
2482
+ showCnvMenu(this);
2483
+ });
2484
+ 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());
2485
+ const textW = btnText.node() ? Math.ceil(btnText.node().getBBox().width) : 0;
2486
+ const btnWdt = textW + btnPaddingX * 2;
2487
+ btnWrapper.insert("rect", ":first-child").attr("width", btnWdt).attr("height", btnHgt).attr("rx", 10).attr("ry", 10).style("fill", "#f2f2f2");
2488
+ btnText.attr("x", btnWdt / 2).attr("text-anchor", "middle");
2489
+ const cnvMenu = new Menu({
2490
+ onHide: () => {
2491
+ btnText.text("Select source \u25B2".toUpperCase());
2492
+ }
2493
+ });
2494
+ function showCnvMenu(dom) {
2495
+ btnText.text("Select source \u25BC".toUpperCase());
2496
+ cnvMenu.clear().showunder(dom);
2497
+ cnvMenu.d.append("div").text("Choose data source for CNV:").style("margin", "5px 5px 0 5px");
2498
+ const tableHolder = cnvMenu.d.append("div").style("padding", "5px");
2499
+ const { columns, rows } = buildTableData(datasets);
2500
+ const [, activeIndex] = getActiveDataset(datasets);
2501
+ renderTable({
2502
+ columns,
2503
+ rows,
2504
+ div: tableHolder,
2505
+ singleMode: true,
2506
+ maxWidth: "70vw",
2507
+ maxHeight: "60vh",
2508
+ selectedRows: [activeIndex],
2509
+ header: { allowSort: false },
2510
+ noButtonCallback: (rowIndex, node) => {
2511
+ const inputIndex = Number(node?.value);
2512
+ const selectedIndex = Number.isNaN(inputIndex) ? rowIndex : inputIndex;
2513
+ if (!Number.isNaN(selectedIndex)) onChange(selectedIndex);
2514
+ cnvMenu.hide();
2515
+ }
2516
+ });
2517
+ }
2518
+ }
2519
+ function getActiveDataset(datasets) {
2520
+ let currentIndex = datasets.findIndex((d) => d.inuse);
2521
+ if (currentIndex == -1) currentIndex = 0;
2522
+ return [datasets[currentIndex], currentIndex];
2523
+ }
2524
+ function buildTableData(datasets) {
2525
+ const attrKeys = [];
2526
+ for (const set of datasets) {
2527
+ if (!set.attrs) continue;
2528
+ for (const key of Object.keys(set.attrs)) {
2529
+ if (!attrKeys.includes(key)) attrKeys.push(key);
2530
+ }
2531
+ }
2532
+ const columns = [{ label: "Source" }];
2533
+ for (const key of attrKeys) columns.push({ label: key });
2534
+ const rows = datasets.map((set, index) => {
2535
+ const sourceInfo = parseSetLabel(set, index);
2536
+ const cells = [];
2537
+ if (set.nameHtml) cells.push({ html: set.nameHtml });
2538
+ else if (sourceInfo.href) cells.push({ value: sourceInfo.text, url: sourceInfo.href });
2539
+ else cells.push({ value: sourceInfo.text });
2540
+ for (const key of attrKeys) {
2541
+ const value = set.attrs?.[key];
2542
+ cells.push({ value: value ?? "" });
2543
+ }
2544
+ return cells;
2545
+ });
2546
+ return { columns, rows };
2547
+ }
2548
+
2549
+ // plots/disco/legend/LegendRenderer.ts
2550
+ var LegendRenderer = class {
2551
+ constructor(cappedCnvMaxAbsValue = 0, fontSize) {
2552
+ this.fontSize = fontSize;
2553
+ this.legendJSONMapper = new LegendJSONMapper(cappedCnvMaxAbsValue);
2554
+ }
2555
+ render(holder, legend, xOffset, svgw, svgh, viewModel, onCnvSourceSelect) {
2556
+ const svgLegendRenderer = svgLegend({
2557
+ holder: holder.append("g").attr("data-testid", "sjpp_disco_plot_legend"),
2558
+ rectFillFxn: (d2) => d2.color,
2559
+ iconStroke: "#aaa"
2560
+ });
2561
+ const data = this.legendJSONMapper.map(legend);
2562
+ const legendTitles = data.map((d2) => d2.name.trim());
2563
+ const maxLabelWidth = getMaxLabelWidth(holder, legendTitles);
2564
+ const d = {
2565
+ xOffset: maxLabelWidth + xOffset
2566
+ };
2567
+ svgLegendRenderer(data, {
2568
+ settings: Object.assign(
2569
+ {},
2570
+ {
2571
+ svgw,
2572
+ svgh,
2573
+ dimensions: d,
2574
+ fontsize: this.fontSize
2575
+ }
2576
+ )
2577
+ });
2578
+ const altCnv = viewModel.appState.args.alternativeDataByDt?.[dtcnv];
2579
+ if (altCnv && altCnv.length > 0) {
2580
+ const legendG = holder.select('g[data-testid="sjpp_disco_plot_legend"]');
2581
+ const cnvLegendG = legendG.select("#sjpp-disco-cnv-legend");
2582
+ if (!legendG.empty()) {
2583
+ const add2G = cnvLegendG.empty() ? legendG : cnvLegendG;
2584
+ renderCnvSourceLegend(add2G, altCnv, this.fontSize, onCnvSourceSelect);
2585
+ }
2586
+ }
2587
+ }
2588
+ };
2589
+
2590
+ // plots/disco/chromosome/ChromosomesRenderer.ts
2591
+ var ChromosomesRenderer = class {
2592
+ constructor(padAngle, innerRadius, outerRadius, fontSize) {
2593
+ this.padAngle = padAngle;
2594
+ this.innerRadius = innerRadius;
2595
+ this.outerRadius = outerRadius;
2596
+ this.fontSize = fontSize;
2597
+ }
2598
+ render(holder, elements) {
2599
+ const pie = pie_default().padAngle(this.padAngle).value((d) => d.size).sort(null);
2600
+ const arcData = pie(elements);
2601
+ const arc = arc_default().innerRadius(this.innerRadius).outerRadius(this.outerRadius);
2602
+ const arcs = holder.append("g").attr("data-testid", "sjpp_chromosomes_arc_group");
2603
+ const menu = MenuProvider.create();
2604
+ arcs.selectAll("path").data(arcData).enter().append("path").attr("d", arc).attr("fill", "black").on("mousemove", (event, d) => {
2605
+ const [x, y] = pointer_default(event, arcs.node());
2606
+ let angle = Math.atan2(y, x) + Math.PI / 2;
2607
+ if (angle < 0) angle += 2 * Math.PI;
2608
+ const frac = Math.max(0, Math.min(1, (angle - d.data.startAngle) / (d.data.endAngle - d.data.startAngle)));
2609
+ const pos = Math.round(frac * d.data.size);
2610
+ menu.d.html(`<span style="font-size:.8em">chr${d.data.text}</span> ${bplen(pos)}`).style("padding", "5px");
2611
+ menu.show(event.x, event.y);
2612
+ }).on("mouseenter", (event) => {
2613
+ select_default(event.currentTarget).attr("stroke", "orange").attr("stroke-width", 1);
2614
+ }).on("mouseleave", (event) => {
2615
+ select_default(event.currentTarget).attr("stroke", null).attr("stroke-width", null);
2616
+ menu.hide();
2617
+ });
2618
+ arcs.selectAll("text").data(arcData).enter().append("text").attr("transform", (d) => {
2619
+ return `translate(${arc.centroid(d)}) rotate(${d.data.angle * 180 / Math.PI - 90})${d.data.angle > Math.PI ? "rotate(180)" : ""}`;
2620
+ }).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");
2621
+ }
2622
+ };
2623
+
2624
+ // plots/disco/label/LabelsRenderer.ts
2625
+ var LabelsRenderer = class {
2626
+ constructor(animationDuration, fontSize, geneClickListener, genomeName, intervalEvents = [], geneLookup = async (gene, genome) => await dofetch3("genelookup", { body: { deep: 1, input: gene, genome } })) {
2627
+ this.geneCoordinatesCache = /* @__PURE__ */ new Map();
2628
+ this.hoverRequestId = 0;
2629
+ this.animationDuration = animationDuration;
2630
+ this.fontSize = fontSize;
2631
+ this.geneClickListener = geneClickListener;
2632
+ this.genomeName = genomeName;
2633
+ this.intervalEvents = intervalEvents;
2634
+ this.geneLookup = geneLookup;
2635
+ }
2636
+ render(holder, elements, collisions) {
2637
+ const labelsG = holder.append("g");
2638
+ const lineFunction = line_default().x((point) => point.x).y((point) => point.y);
2639
+ const menu = MenuProvider.create();
2640
+ labelsG.selectAll(".group").data(elements).enter().append("g").attr("class", "group").each((label, i, nodes) => {
2641
+ const g = select_default(nodes[i]);
2642
+ g.append("text").attr("class", "chord-text").attr("data-testid", "sjpp-disco-genelabel").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", () => {
2643
+ if (label.mutationsTooltip) {
2644
+ this.geneClickListener(
2645
+ label.text,
2646
+ label.mutationsTooltip.map((value) => value.mname)
2647
+ );
2648
+ }
2649
+ }).on("mouseover", async (mouseEvent) => {
2650
+ const requestId = ++this.hoverRequestId;
2651
+ this.renderTooltip(menu, label);
2652
+ menu.show(mouseEvent.x, mouseEvent.y);
2653
+ const coordinates = await this.getGeneCoordinates(label);
2654
+ if (requestId != this.hoverRequestId || !coordinates) return;
2655
+ const overlappingEvents = this.intervalEvents.filter(
2656
+ (event) => this.sameChromosome(event.chr, coordinates.chr) && coordinates.stop >= event.start && event.stop >= coordinates.start
2657
+ );
2658
+ this.renderTooltip(menu, label, overlappingEvents);
2659
+ }).on("mouseout", () => {
2660
+ this.hoverRequestId++;
2661
+ menu.clear();
2662
+ menu.hide();
2663
+ });
2664
+ g.append("path").attr("class", "chord-tick").datum(label.line.points).style("stroke", label.color).style("fill", "none").attr("d", lineFunction);
2665
+ });
2666
+ labelsG.selectAll(".group").each((label, i, nodes) => {
2667
+ const collision = collisions ? collisions.find((l) => l.text === label.text) : void 0;
2668
+ if (collision) {
2669
+ const g = select_default(nodes[i]);
2670
+ g.selectAll(".chord-text").datum(collision).transition().duration(this.animationDuration).attr("transform", collision.transform).style("text-anchor", collision.textAnchor);
2671
+ g.selectAll(".chord-tick").datum(collision.line.points).transition().duration(this.animationDuration).style("fill", "none").attr("d", lineFunction);
2672
+ }
2673
+ });
2674
+ }
2675
+ renderTooltip(menu, label, intervalEvents = label.cnvTooltip) {
2676
+ menu.clear();
2677
+ const table = table2col({ holder: menu.d });
2678
+ this.createTooltip(table, label, intervalEvents);
2679
+ }
2680
+ async getGeneCoordinates(label) {
2681
+ if (!this.genomeName || !this.intervalEvents.length) return;
2682
+ const cacheKey = `${this.genomeName}:${label.text}:${label.chr}`;
2683
+ let lookup = this.geneCoordinatesCache.get(cacheKey);
2684
+ if (!lookup) {
2685
+ lookup = this.lookupGeneCoordinates(label);
2686
+ this.geneCoordinatesCache.set(cacheKey, lookup);
2687
+ }
2688
+ return await lookup;
2689
+ }
2690
+ async lookupGeneCoordinates(label) {
2691
+ try {
2692
+ const response = await this.geneLookup(label.text, this.genomeName);
2693
+ if (response?.error || !Array.isArray(response?.gmlst)) return;
2694
+ const models = response.gmlst.filter(
2695
+ (model) => this.sameChromosome(model.chr, label.chr) && Number.isFinite(model.start) && Number.isFinite(model.stop)
2696
+ );
2697
+ if (!models.length) return;
2698
+ return {
2699
+ chr: models[0].chr,
2700
+ start: Math.min(...models.map((model) => model.start)),
2701
+ stop: Math.max(...models.map((model) => model.stop))
2702
+ };
2703
+ } catch {
2704
+ return;
2705
+ }
2706
+ }
2707
+ sameChromosome(a, b) {
2708
+ return a?.replace(/^chr/i, "").toLowerCase() == b?.replace(/^chr/i, "").toLowerCase();
2709
+ }
2710
+ createTooltip(table, label, intervalEvents = label.cnvTooltip) {
2711
+ if (label.mutationsTooltip) {
2712
+ const [td1, td2] = table.addRow();
2713
+ td1.text("Gene");
2714
+ td2.append("span").style("margin-left", "5px").text(label.text);
2715
+ label.mutationsTooltip.forEach((mutation) => {
2716
+ {
2717
+ const [td12, td22] = table.addRow();
2718
+ td12.text("Mutation");
2719
+ 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}`);
2720
+ if (hasAnyValidVafEntry(mutation.vafs)) {
2721
+ appendVafBars(td22, mutation.vafs);
2722
+ }
2723
+ }
2724
+ });
2725
+ }
2726
+ if (label.fusionTooltip) {
2727
+ const [td1, td2] = table.addRow();
2728
+ td1.text("Data type");
2729
+ td2.append("span").text("Fusion transcript");
2730
+ label.fusionTooltip.forEach((fusionTooltip) => {
2731
+ const [td12, td22] = table.addRow();
2732
+ td12.text("Position");
2733
+ td22.append("span").text(
2734
+ ` ${fusionTooltip.geneA ? fusionTooltip.geneA : "?"} ${fusionTooltip.chrA}:${fusionTooltip.posA}
2735
+ ${fusionTooltip.strandA == "+" ? "forward" : "reverse"} > ${fusionTooltip.geneB ? fusionTooltip.geneB : "?"} ${fusionTooltip.chrB}:${fusionTooltip.posB} ${fusionTooltip.strandB == "+" ? "forward" : "reverse"} `
2736
+ );
2737
+ });
2738
+ }
2739
+ if (intervalEvents) {
2740
+ intervalEvents.forEach((cnv) => {
2741
+ const [td1, td2] = table.addRow();
2742
+ td1.text(cnv.dt == dtitd ? "ITD" : cnv.dt == dtloh ? "LOH" : "CNV");
2743
+ td2.append("span").style("margin-left", "5px").style("background-color", cnv.color).html("&nbsp;&nbsp;");
2744
+ if (cnv.dt != dtitd && cnv.dt != dtloh) td2.append("span").style("margin-left", "7.5px").text(cnv.value);
2745
+ td2.append("span").style("margin-left", "7.5px").style("font-size", "0.8em").text(`${cnv.chr}:${cnv.start}-${cnv.stop}`);
2746
+ });
2747
+ }
2748
+ }
2749
+ };
2750
+
2751
+ // plots/disco/defaults.ts
2752
+ function discoDefaults(overrides = {}, app) {
2753
+ const hiddenChromosomes = [];
2754
+ if (app?.vocabApi?.termdbConfig?.queries?.singleSampleMutation?.discoPlot?.skipChrM) {
2755
+ hiddenChromosomes.push("chrM");
2756
+ }
2757
+ const defaults = {
2758
+ downloadImgName: "disco.plot",
2759
+ Disco: {
2760
+ centerText: null,
2761
+ cnvCapping: 5,
2762
+ isOpen: false,
2763
+ prioritizeGeneLabelsByGeneSets: false,
2764
+ showPrioritizeGeneLabelsByGeneSets: false,
2765
+ showGeneNames: true,
2766
+ mutationWaterfallPlot: false,
2767
+ mutationWaterfallColor: "#4d4d4d",
2768
+ minMutationFraction: 0,
2769
+ cnvRenderingType: "heatmap" /* heatmap */,
2770
+ cnvPercentile: 90,
2771
+ // 90th percentile for removing outliers
2772
+ cnvCutoffMode: "percentile",
2773
+ autoRadius: true,
2774
+ radius: 300,
2775
+ fusionOpacity: 1,
2776
+ hiddenChromosomes
2777
+ },
2778
+ rings: {
2779
+ nonExonicRingWidth: 20,
2780
+ snvRingWidth: 20,
2781
+ lohRingWidth: 20,
2782
+ cnvRingWidth: 30,
2783
+ mutationWaterfallRingWidth: 35,
2784
+ snvRingFilters: ["exonic"],
2785
+ chromosomeInnerRadius: 190,
2786
+ chromosomeWidth: 20,
2787
+ labelLinesInnerRadius: 210,
2788
+ labelsToLinesDistance: 30,
2789
+ labelsToLinesGap: 2,
2790
+ nonExonicRingEnabled: true,
2791
+ nonExonicFilterValues: ["non-exonic"]
2792
+ },
2793
+ verticalPadding: 0,
2794
+ horizontalPadding: 50,
2795
+ layerScaler: 1,
2796
+ padAngle: 2e-3,
2797
+ //0.01, //0.04,
2798
+ label: {
2799
+ fontSize: 12,
2800
+ maxDeltaAngle: 0.05,
2801
+ animationDuration: 1e3,
2802
+ overlapAngleFactor: 5
2803
+ // 5 is set by testing, because label height is not known before rendering
2804
+ },
2805
+ cnv: {
2806
+ capping: 5,
2807
+ percentile: 80,
2808
+ ampColor: "#D6683C",
2809
+ lossColor: "#67a9cf",
2810
+ cappedAmpColor: "#8B0000",
2811
+ cappedLossColor: "#00008B",
2812
+ unit: "Unit"
2813
+ },
2814
+ snv: {
2815
+ maxMutationCount: 1e4
2816
+ },
2817
+ legend: {
2818
+ snvTitle: "Mutations",
2819
+ cnvTitle: "CNV",
2820
+ lohTitle: "LOH",
2821
+ fusionTitle: "SV",
2822
+ // Structural Variants (color by co-location)
2823
+ lohLegendEnabled: true,
2824
+ fontSize: 12,
2825
+ rowHeight: 48
2826
+ },
2827
+ menu: {
2828
+ padding: 5
2829
+ }
2830
+ };
2831
+ if (overrides?.Disco?.radius != null && (overrides.Disco.radius > 1e3 || overrides.Disco.radius < 200)) {
2832
+ console.log(`${overrides?.Disco?.radius} is greater or lower than the min and max for the radius`);
2833
+ }
2834
+ return copyMerge(defaults, overrides);
2835
+ }
2836
+
2837
+ // plots/disco/snv/NonExonicSnvRenderer.ts
2838
+ var NonExonicSnvRenderer = class {
2839
+ constructor(geneClickListener) {
2840
+ this.geneClickListener = geneClickListener;
2841
+ }
2842
+ render(holder, elements) {
2843
+ const arcGenerator = arc_default();
2844
+ const arcs = holder.append("g");
2845
+ const menu = MenuProvider.create();
2846
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2847
+ const table = table2col({ holder: menu.d });
2848
+ const snv = structuredClone(arc);
2849
+ snv.dt = dtsnvindel;
2850
+ snv.class = arc.dataClass;
2851
+ snv.gene = snv.text;
2852
+ {
2853
+ const [td1, td2] = table.addRow();
2854
+ td1.text("Consequence");
2855
+ td2.append("span").text(snv.mname);
2856
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2857
+ }
2858
+ {
2859
+ const [td1, td2] = table.addRow();
2860
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2861
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2862
+ }
2863
+ if (snv.gene) {
2864
+ const [td1, td2] = table.addRow();
2865
+ td1.text("Gene");
2866
+ td2.text(snv.gene);
2867
+ }
2868
+ if (snv.occurrence > 1) {
2869
+ const [td1, td2] = table.addRow();
2870
+ td1.text("Occurrence");
2871
+ td2.text(snv.occurrence);
2872
+ }
2873
+ if (hasAnyValidVafEntry(arc.vafs)) {
2874
+ const [td1, td2] = table.addRow();
2875
+ td1.text("Read count");
2876
+ appendVafBars(td2, arc.vafs);
2877
+ }
2878
+ menu.show(mouseEvent.x, mouseEvent.y);
2879
+ }).on("mouseout", () => {
2880
+ menu.clear();
2881
+ menu.hide();
2882
+ }).on("click", (mouseEvent, arc) => {
2883
+ this.geneClickListener(arc.text, [arc.mname]);
2884
+ });
2885
+ }
2886
+ };
2887
+
2888
+ // plots/disco/snv/SnvRenderer.ts
2889
+ var SnvRenderer = class {
2890
+ constructor(svnWidth, geneClickListener) {
2891
+ this.svnWidth = svnWidth;
2892
+ this.geneClickListener = geneClickListener;
2893
+ }
2894
+ render(holder, elements) {
2895
+ if (elements.length > 0) {
2896
+ const svnInnerRadius = elements[0].innerRadius;
2897
+ const fullArcRenderer = new FullArcRenderer(svnInnerRadius, this.svnWidth, "#6464641A");
2898
+ fullArcRenderer.render(holder);
2899
+ }
2900
+ const arcGenerator = arc_default();
2901
+ const arcs = holder.append("g");
2902
+ const menu = MenuProvider.create();
2903
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2904
+ const table = table2col({ holder: menu.d });
2905
+ const snv = structuredClone(arc);
2906
+ snv.dt = dtsnvindel;
2907
+ snv.class = arc.dataClass;
2908
+ snv.gene = snv.text;
2909
+ {
2910
+ const [td1, td2] = table.addRow();
2911
+ td1.text("Consequence");
2912
+ td2.append("span").text(snv.mname);
2913
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2914
+ }
2915
+ {
2916
+ const [td1, td2] = table.addRow();
2917
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2918
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2919
+ }
2920
+ if (snv.gene) {
2921
+ const [td1, td2] = table.addRow();
2922
+ td1.text("Gene");
2923
+ td2.text(snv.gene);
2924
+ }
2925
+ if (snv.occurrence > 1) {
2926
+ const [td1, td2] = table.addRow();
2927
+ td1.text("Occurrence");
2928
+ td2.text(snv.occurrence);
2929
+ }
2930
+ if (hasAnyValidVafEntry(arc.vafs)) {
2931
+ const [td1, td2] = table.addRow();
2932
+ td1.text("Read count");
2933
+ appendVafBars(td2, arc.vafs);
2934
+ }
2935
+ menu.show(mouseEvent.x, mouseEvent.y);
2936
+ }).on("mouseout", () => {
2937
+ menu.clear();
2938
+ menu.hide();
2939
+ }).on("click", (mouseEvent, arc) => {
2940
+ this.geneClickListener(arc.text, [arc.mname]);
2941
+ });
2942
+ }
2943
+ };
2944
+
2945
+ // plots/disco/loh/LohRenderer.ts
2946
+ var LohRenderer = class {
2947
+ render(holder, elements) {
2948
+ const arcGenerator = arc_default();
2949
+ const arcs = holder.append("g");
2950
+ const menu = MenuProvider.create();
2951
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2952
+ const table = table2col({ holder: menu.d });
2953
+ const loh = structuredClone(arc);
2954
+ loh.dt = dtloh;
2955
+ loh.gene = loh.text;
2956
+ {
2957
+ const [td12, td22] = table.addRow();
2958
+ td12.text("Data type");
2959
+ td22.append("span").style("margin-left", "5px").text("Loss of Heterozygosity");
2960
+ }
2961
+ const [td1, td2] = table.addRow();
2962
+ td1.text("Position");
2963
+ td2.append("span").text(`${arc.chr}:${arc.start}-${arc.stop}`);
2964
+ menu.show(mouseEvent.x, mouseEvent.y);
2965
+ }).on("mouseout", () => {
2966
+ menu.clear();
2967
+ menu.hide();
2968
+ });
2969
+ }
2970
+ };
2971
+
2972
+ // plots/disco/cnv/CnvBarRenderer.ts
2973
+ var CnvBarRenderer = class {
2974
+ render(holder, elements) {
2975
+ const arcGenerator = arc_default();
2976
+ const arcs = holder.append("g");
2977
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
2978
+ const menu = MenuProvider.create();
2979
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2980
+ hoverOverlay.selectAll("*").remove();
2981
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
2982
+ const cnv = structuredClone(arc);
2983
+ cnv.dt = arc.dt;
2984
+ cnv.samples = [{ sample_id: arc.sampleName }];
2985
+ cnv.gene = cnv.text;
2986
+ const table = table2col({ holder: menu.d });
2987
+ if (arc.dt == dtcnv) {
2988
+ const [c1, c2] = table.addRow();
2989
+ c1.text("CNV");
2990
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span> ${cnv.value}`);
2991
+ }
2992
+ if (arc.dt == dtitd) {
2993
+ const [c1, c2] = table.addRow();
2994
+ c1.text("ITD");
2995
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span>`);
2996
+ }
2997
+ {
2998
+ const [c1, c2] = table.addRow();
2999
+ c1.text("Position");
3000
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
3001
+ }
3002
+ if (arc.dt == dtcnv) {
3003
+ const [c1, c2] = table.addRow();
3004
+ c1.text("Unit");
3005
+ c2.text(cnv.value);
3006
+ }
3007
+ menu.show(mouseEvent.x, mouseEvent.y);
3008
+ }).on("mouseout", () => {
3009
+ hoverOverlay.selectAll("*").remove();
3010
+ menu.clear();
3011
+ menu.hide();
3012
+ });
3013
+ }
3014
+ };
3015
+
3016
+ // plots/disco/cnv/CnvHeatmapRenderer.ts
3017
+ var CnvHeatmapRenderer = class {
3018
+ constructor(positivePercentile = 0, negativePercentile = 0) {
3019
+ this.positivePercentile = positivePercentile;
3020
+ this.negativePercentile = negativePercentile;
3021
+ }
3022
+ render(holder, elements) {
3023
+ const arcGenerator = arc_default();
3024
+ const arcs = holder.append("g");
3025
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
3026
+ const menu = MenuProvider.create();
3027
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => this.getColor(d.color, d.value, d.dt)).on("mouseenter", (mouseEvent, arc) => {
3028
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
3029
+ const table = table2col({ holder: menu.d });
3030
+ const cnv = structuredClone(arc);
3031
+ cnv.dt = arc.dt;
3032
+ cnv.samples = [{ sample_id: arc.sampleName }];
3033
+ cnv.gene = cnv.text;
3034
+ if (arc.dt == dtcnv) {
3035
+ const [c1, c2] = table.addRow();
3036
+ c1.text("CNV");
3037
+ c2.html(
3038
+ `<span style="background:${this.getColor(
3039
+ cnv.color,
3040
+ cnv.value,
3041
+ cnv.dt
3042
+ )}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span> ${cnv.value}`
3043
+ );
3044
+ }
3045
+ if (arc.dt == dtitd) {
3046
+ const [c1, c2] = table.addRow();
3047
+ c1.text("ITD");
3048
+ c2.html(`<span style="background:${cnv.color}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span>`);
3049
+ }
3050
+ {
3051
+ const [c1, c2] = table.addRow();
3052
+ c1.text("Position");
3053
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
3054
+ }
3055
+ menu.show(mouseEvent.x, mouseEvent.y);
3056
+ }).on("mouseleave", () => {
3057
+ hoverOverlay.selectAll("*").remove();
3058
+ menu.clear();
3059
+ menu.hide();
3060
+ });
3061
+ }
3062
+ // Computes fill color using linear scale between -P80, 0, and +P80
3063
+ getColor(color, value, dt = dtcnv) {
3064
+ if (dt == dtitd) return color;
3065
+ const maxValue = Math.max(this.positivePercentile, Math.abs(this.negativePercentile));
3066
+ return linear(
3067
+ [-maxValue, 0, maxValue],
3068
+ [color, "white", color]
3069
+ // transitions to white in the middle
3070
+ ).clamp(true)(value);
3071
+ }
3072
+ };
3073
+
3074
+ // plots/disco/waterfall/MutationWaterfallRenderer.ts
3075
+ var MutationWaterfallRenderer = class {
3076
+ constructor(dotRadius = 1.5) {
3077
+ this.dotRadius = dotRadius;
3078
+ }
3079
+ render(holder, elements) {
3080
+ if (!elements.length) return;
3081
+ const ringGroup = holder.append("g").attr("data-testid", "sjpp_mutation_waterfall_ring");
3082
+ const menu = MenuProvider.create();
3083
+ 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) => {
3084
+ const distance = Math.round(Math.pow(10, d.logDistance));
3085
+ menu.clear();
3086
+ const table = table2col({ holder: menu.d });
3087
+ {
3088
+ const [td1, td2] = table.addRow();
3089
+ td1.text("Intermutation distance");
3090
+ td2.text(`${bplen(distance)}`);
3091
+ }
3092
+ menu.show(event.x, event.y);
3093
+ }).on("mouseout", () => {
3094
+ menu.clear();
3095
+ menu.hide();
3096
+ });
3097
+ this.renderAxis(ringGroup, elements[0]);
3098
+ }
3099
+ renderAxis(holder, referencePoint) {
3100
+ const { ringInnerRadius, ringWidth, rangeMin, rangeMax } = referencePoint;
3101
+ const axisGroup = holder.append("g").attr("class", "sjpp-waterfall-axis");
3102
+ const topRadius = ringInnerRadius + ringWidth;
3103
+ axisGroup.append("line").attr("x1", 0).attr("y1", -topRadius).attr("x2", 0).attr("y2", -ringInnerRadius).attr("stroke", "#6e6e6e").attr("stroke-width", 1);
3104
+ const span = rangeMax - rangeMin || 1;
3105
+ const tickValues = rangeMax === rangeMin ? [rangeMin] : ticks(rangeMin, rangeMax, 4);
3106
+ tickValues.forEach((value) => {
3107
+ const ratio = (value - rangeMin) / span;
3108
+ const radius = ringInnerRadius + ringWidth * ratio;
3109
+ const y = -radius;
3110
+ axisGroup.append("line").attr("x1", -4).attr("x2", 4).attr("y1", y).attr("y2", y).attr("stroke", "#6e6e6e");
3111
+ const exponent = Math.round(value * 10) / 10;
3112
+ const formatted = Number.isInteger(exponent) ? `${exponent}` : exponent.toFixed(1);
3113
+ axisGroup.append("text").attr("x", 6).attr("y", y + 3).style("font-size", "10px").style("fill", "#4d4d4d").text(`10^${formatted} bp`);
3114
+ });
3115
+ }
3116
+ };
3117
+
3118
+ // plots/disco/Disco.ts
3119
+ var Disco = class _Disco extends PlotBase {
3120
+ constructor(opts, api) {
3121
+ super(opts, api);
3122
+ this.recreateViewModel = false;
3123
+ this.onCnvSourceSelect = (index) => {
3124
+ const state = this.app.getState();
3125
+ const args = state.args;
3126
+ const alt = args.alternativeDataByDt?.[dtcnv];
3127
+ if (!alt) return;
3128
+ const altClone = structuredClone(args.alternativeDataByDt);
3129
+ altClone[dtcnv].forEach((d, i) => d.inuse = i === index);
3130
+ const selected = altClone[dtcnv][index];
3131
+ selected.mlst.forEach((d) => d.position = d.pos);
3132
+ const baseData = args.data.filter((d) => d.dt != dtcnv && d.dt != dtloh);
3133
+ const newData = baseData.concat(selected.mlst);
3134
+ this.app.dispatch({
3135
+ type: "app_refresh",
3136
+ state: { args: { ...args, data: newData, alternativeDataByDt: altClone } }
3137
+ });
3138
+ };
3139
+ this.type = _Disco.type;
3140
+ this.dom.errdiv = opts.holder.append("div").attr("class", "sja_errorbar").style("display", "none");
3141
+ this.isOpen = false;
3142
+ this.discoInteractions = new DiscoInteractions(this);
3143
+ }
3144
+ static {
3145
+ this.type = "Disco";
3146
+ }
3147
+ async init() {
3148
+ const state = this.app.getState();
3149
+ const settings = state.plots.find((p) => p.id === this.id).settings;
3150
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3151
+ this.viewModel = this.stateViewModelMapper.map(state);
3152
+ const holder = this.opts.holder;
3153
+ const controlsHolder = holder.append("div").style("display", "inline-block").style("vertical-align", "top");
3154
+ const mainDiv = holder.append("div").style("display", "inline-block");
3155
+ const topbar = controlsHolder.append("div");
3156
+ const config_div = controlsHolder.append("div");
3157
+ const configInputsOptions = this.getConfigInputsOptions(this.viewModel);
3158
+ this.features = await multiInit({
3159
+ topbar: topBarInit({
3160
+ app: this.app,
3161
+ id: this.id,
3162
+ // TODO change the way svg is selected
3163
+ downloadHandler: () => this.discoInteractions.downloadClickListener(holder.select('svg[id="sjpp_disco_plot"]').node()),
3164
+ callback: () => this.toggleVisibility(this.isOpen),
3165
+ isOpen: () => this.isOpen,
3166
+ holder: topbar
3167
+ }),
3168
+ config: configUiInit({
3169
+ app: this.app,
3170
+ id: this.id,
3171
+ holder: config_div,
3172
+ isOpen: () => this.isOpen,
3173
+ inputs: configInputsOptions
3174
+ })
3175
+ });
3176
+ this.errorDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-errorDiv");
3177
+ this.svgDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-svgDiv");
3178
+ }
3179
+ getConfigInputsOptions(viewModel) {
3180
+ const configInputsOptions = [];
3181
+ if (viewModel.settings.Disco.showPrioritizeGeneLabelsByGeneSets) {
3182
+ const filterMutationsGenesCheckbox = [
3183
+ {
3184
+ boxLabel: viewModel.genesetName,
3185
+ label: `Filter mutations`,
3186
+ type: "checkbox",
3187
+ chartType: "Disco",
3188
+ settingsKey: "prioritizeGeneLabelsByGeneSets",
3189
+ title: `Only show mutations for ${viewModel.genesetName} genes`
3190
+ }
3191
+ ];
3192
+ configInputsOptions.push(...filterMutationsGenesCheckbox);
3193
+ }
3194
+ if (viewModel.cnvMaxValue !== 0 || viewModel.cnvMinValue !== 0) {
3195
+ const cnvConfigInputOptions = [
3196
+ {
3197
+ boxLabel: "",
3198
+ label: "CNV rendering type",
3199
+ type: "radio",
3200
+ chartType: "Disco",
3201
+ settingsKey: "cnvRenderingType",
3202
+ title: "CNV rendering type",
3203
+ options: [
3204
+ { label: "Heatmap", value: "heatmap" /* heatmap */ },
3205
+ { label: "Bar", value: "bar" /* bar */ }
3206
+ ]
3207
+ }
3208
+ ];
3209
+ configInputsOptions.push(...cnvConfigInputOptions);
3210
+ }
3211
+ if (viewModel.hasMutationFractionData) {
3212
+ configInputsOptions.push({
3213
+ boxLabel: "",
3214
+ label: "Minimum mutation fraction",
3215
+ type: "number",
3216
+ chartType: "Disco",
3217
+ settingsKey: "minMutationFraction",
3218
+ title: "Only show SNV/indel mutations with at least one DNA/RNA mutation fraction at or above this value.",
3219
+ step: 0.01,
3220
+ min: 0,
3221
+ max: 1,
3222
+ debounceInterval: 500
3223
+ });
3224
+ }
3225
+ configInputsOptions.push({
3226
+ boxLabel: "",
3227
+ label: "Show gene names",
3228
+ type: "checkbox",
3229
+ chartType: "Disco",
3230
+ settingsKey: "showGeneNames",
3231
+ title: "Show gene name labels on the outside of the plot"
3232
+ });
3233
+ const genomeChr = this.app.opts.state.args.genome.majorchr;
3234
+ const chromosomeConfigOption = {
3235
+ label: "Chromosomes",
3236
+ title: "Chromosomes shown in the plot",
3237
+ type: "multiCheckbox",
3238
+ chartType: "Disco",
3239
+ settingsKey: "hiddenChromosomes",
3240
+ style: {
3241
+ colNum: 4
3242
+ },
3243
+ options: Object.keys(genomeChr).map((c) => ({ label: c, value: c })),
3244
+ processInput: (values = []) => {
3245
+ const reverse = Object.keys(genomeChr).filter((c) => !values.includes(c));
3246
+ return reverse;
3247
+ }
3248
+ };
3249
+ configInputsOptions.push(chromosomeConfigOption);
3250
+ configInputsOptions.push({
3251
+ boxLabel: "",
3252
+ label: "Auto radius",
3253
+ type: "checkbox",
3254
+ chartType: "Disco",
3255
+ settingsKey: "autoRadius",
3256
+ title: "Automatically set the radius based on the number of data rings"
3257
+ });
3258
+ const dimensionOptions = [
3259
+ {
3260
+ label: "Radius",
3261
+ title: "Set the radius of the entire plot, between 200 and 1000 pixels.",
3262
+ type: "number",
3263
+ chartType: "Disco",
3264
+ settingsKey: "radius",
3265
+ debounceInterval: 500,
3266
+ step: 25,
3267
+ min: 200,
3268
+ max: 1e3,
3269
+ getDisplayStyle: (plot) => plot.settings.Disco.autoRadius ? "none" : "table-row"
3270
+ },
3271
+ {
3272
+ label: "Fusion opacity",
3273
+ title: "Adjust opacity of fusion arcs, between 0 and 1",
3274
+ type: "number",
3275
+ chartType: "Disco",
3276
+ settingsKey: "fusionOpacity",
3277
+ step: 0.01,
3278
+ min: 0,
3279
+ max: 1,
3280
+ debounceInterval: 500
3281
+ }
3282
+ ];
3283
+ configInputsOptions.push(...dimensionOptions);
3284
+ if (viewModel.canShowMutationWaterfallPlot && viewModel.snvDataLength > 0) {
3285
+ configInputsOptions.push({
3286
+ boxLabel: "",
3287
+ label: "Mutation Waterfall Plot",
3288
+ type: "checkbox",
3289
+ chartType: "Disco",
3290
+ settingsKey: "mutationWaterfallPlot",
3291
+ title: "Render log10 intermutation distance ring for SNV/indel data"
3292
+ });
3293
+ }
3294
+ return configInputsOptions;
3295
+ }
3296
+ async main() {
3297
+ const settings = this.state.settings;
3298
+ this.isOpen = settings.Disco.isOpen;
3299
+ if (this.recreateViewModel) {
3300
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3301
+ this.viewModel = this.stateViewModelMapper.map(this.app.getState());
3302
+ }
3303
+ this.recreateViewModel = true;
3304
+ if (this.viewModel) {
3305
+ this.svgDiv.selectAll("*").remove();
3306
+ const appState = this.app.getState();
3307
+ this.viewModel.svgDiv = this.svgDiv;
3308
+ this.viewModel.appState = appState;
3309
+ for (const name in this.features) {
3310
+ this.features[name].update({ state: this.state, appState });
3311
+ }
3312
+ const legendRenderer = new LegendRenderer(this.viewModel.cappedCnvMaxAbsValue, settings.label.fontSize);
3313
+ const discoRenderer = new DiscoRenderer(
3314
+ this.getRingRenderers(this.viewModel.settings, this.viewModel, this.discoInteractions.geneClickListener),
3315
+ legendRenderer,
3316
+ this.app.opts.state.args.genome
3317
+ );
3318
+ discoRenderer.render(this.svgDiv, this.viewModel, this.onCnvSourceSelect);
3319
+ if (this.viewModel.invalidDataInfo?.entries?.length) {
3320
+ InvalidDataUI.render(this.errorDiv, this.viewModel.invalidDataInfo);
3321
+ }
3322
+ }
3323
+ }
3324
+ getState(appState) {
3325
+ const config = appState.plots.find((p) => p.id === this.id);
3326
+ if (!config) return config;
3327
+ return { ...config, mlst: appState.args.data };
3328
+ }
3329
+ getRingRenderers(settings, viewModel, geneClickListener) {
3330
+ const chromosomesRenderer = new ChromosomesRenderer(
3331
+ settings.padAngle,
3332
+ settings.rings.chromosomeInnerRadius,
3333
+ settings.rings.chromosomeInnerRadius + settings.rings.chromosomeWidth,
3334
+ settings.label.fontSize
3335
+ );
3336
+ const labelsRenderer = new LabelsRenderer(
3337
+ settings.label.animationDuration,
3338
+ settings.label.fontSize,
3339
+ geneClickListener,
3340
+ this.app.opts.state.args.genome.name,
3341
+ [
3342
+ ...viewModel.rings.cnvArcRing?.elements || [],
3343
+ ...(viewModel.rings.lohArcRing?.elements || []).map((event) => ({ ...event, dt: dtloh }))
3344
+ ]
3345
+ );
3346
+ const nonExonicSnvRenderer = new NonExonicSnvRenderer(geneClickListener);
3347
+ const snvRenderer = new SnvRenderer(settings.rings.snvRingWidth, geneClickListener);
3348
+ const cnvRenderer = settings.Disco.cnvRenderingType === "heatmap" /* heatmap */ ? new CnvHeatmapRenderer(viewModel.positivePercentile, viewModel.negativePercentile) : new CnvBarRenderer();
3349
+ const lohRenderer = new LohRenderer();
3350
+ const mutationWaterfallRenderer = new MutationWaterfallRenderer();
3351
+ const renderersMap = /* @__PURE__ */ new Map();
3352
+ renderersMap.set(0 /* CHROMOSOME */, chromosomesRenderer);
3353
+ renderersMap.set(1 /* LABEL */, labelsRenderer);
3354
+ renderersMap.set(2 /* NONEXONICSNV */, nonExonicSnvRenderer);
3355
+ renderersMap.set(3 /* SNV */, snvRenderer);
3356
+ renderersMap.set(4 /* MUTATION_WATERFALL */, mutationWaterfallRenderer);
3357
+ renderersMap.set(5 /* CNV */, cnvRenderer);
3358
+ renderersMap.set(6 /* LOH */, lohRenderer);
3359
+ return renderersMap;
3360
+ }
3361
+ toggleVisibility(isOpen) {
3362
+ this.app.dispatch({
3363
+ type: "plot_edit",
3364
+ id: this.opts.id,
3365
+ config: {
3366
+ settings: {
3367
+ Disco: { isOpen: !isOpen }
3368
+ }
3369
+ }
3370
+ });
3371
+ }
3372
+ };
3373
+ var discoInit = getCompInit(Disco);
3374
+ var componentInit = discoInit;
3375
+ async function getPlotConfig(opts, app) {
3376
+ return {
3377
+ chartType: "Disco",
3378
+ subfolder: "disco",
3379
+ extension: "ts",
3380
+ settings: discoDefaults(opts.overrides, app)
3381
+ };
3382
+ }
3383
+ export {
3384
+ componentInit,
3385
+ Disco as default,
3386
+ discoInit,
3387
+ getPlotConfig
3388
+ };
3389
+ //# sourceMappingURL=Disco-ZJLVQRTC.js.map