@sjcrh/proteinpaint-client 2.226.0 → 2.227.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (949) hide show
  1. package/dist/2dmaf-75YAQQ3P.js +1362 -0
  2. package/dist/AggMatrixInput-KYDS23KP.js +402 -0
  3. package/dist/AggregateMatrix-XGGF6KBX.js +37 -0
  4. package/dist/AppHeader-CNY5RTJN.js +826 -0
  5. package/dist/BoxPlot-OQIJJO66.js +1247 -0
  6. package/dist/CorrelationVolcano-QN5D37V7.js +613 -0
  7. package/dist/CorrelationVolcano-QN5D37V7.js.map +7 -0
  8. package/dist/Cuminc-J6DONJTA.js +1217 -0
  9. package/dist/DE-XUBJUUBB.js +85 -0
  10. package/dist/DEinput-DCOPTSWO.js +483 -0
  11. package/dist/DEinput-DCOPTSWO.js.map +7 -0
  12. package/dist/DM-2UUXUJOC.js +86 -0
  13. package/dist/DifferentialAnalysis-U6ZPFHNM.js +236 -0
  14. package/dist/Disco-RR2NN66T.js +3445 -0
  15. package/dist/Disco.UI-MQ7WZQOP.js +239 -0
  16. package/dist/DmrPlot-MKAKFUJR.js +366 -0
  17. package/dist/GB-2X3ZRFXN.js +1388 -0
  18. package/dist/GB-2X3ZRFXN.js.map +7 -0
  19. package/dist/GSEA-DTIA4MNS.js +870 -0
  20. package/dist/GeneExpInput-4GM5MBBX.js +38 -0
  21. package/dist/Geomap-FF6DBN7M.js +80 -0
  22. package/dist/HicApp-LGXNL36X.js +2240 -0
  23. package/dist/IDCViewer-FQABJNUI.js +10810 -0
  24. package/dist/NumBinaryEditor-7NOHUH76.js +274 -0
  25. package/dist/NumBinaryEditor.unit.spec-SVE5SZYB.js +308 -0
  26. package/dist/NumContEditor-MSWCQUKL.js +100 -0
  27. package/dist/NumContEditor.unit.spec-UFPASWBH.js +160 -0
  28. package/dist/NumCustomBinEditor-DF24SO2N.js +29 -0
  29. package/dist/NumCustomBinEditor.unit.spec-N3S3ROBI.js +393 -0
  30. package/dist/NumDiscreteEditor-HL257XGY.js +165 -0
  31. package/dist/NumDiscreteEditor.unit.spec-6PTPX547.js +229 -0
  32. package/dist/NumRegularBinEditor-EWCKTXWY.js +29 -0
  33. package/dist/NumRegularBinEditor.unit.spec-AMGPMY7U.js +274 -0
  34. package/dist/NumSplineEditor-YDNJ2DW2.js +205 -0
  35. package/dist/NumSplineEditor.unit.spec-L4JZ3OND.js +220 -0
  36. package/dist/NumericDensity-SQW67WKL.js +29 -0
  37. package/dist/NumericDensity.unit.spec-KBK3JZZG.js +414 -0
  38. package/dist/NumericHandler-HG7FK4D4.js +30 -0
  39. package/dist/NumericHandler.unit.spec-N7PYAGGF.js +225 -0
  40. package/dist/ProteomeInput-6XGREJFP.js +610 -0
  41. package/dist/Regression-4DDXNQNO.js +1412 -0
  42. package/dist/RunChart2-ARCUC4Z3.js +744 -0
  43. package/dist/SC-AV6COOPI.js +1290 -0
  44. package/dist/Violin-2P5I6NL5.js +1105 -0
  45. package/dist/Volcano-TZQF3HY6.js +2745 -0
  46. package/dist/Volcano-TZQF3HY6.js.map +7 -0
  47. package/dist/Wsi-KN26SIP3.js +650 -0
  48. package/dist/Wsi-KN26SIP3.js.map +7 -0
  49. package/dist/aboutSunburst-V557OK5L.js +93 -0
  50. package/dist/adSandbox-76PMWKTX.js +29 -0
  51. package/dist/animatedBubbleChart-CFRJJDAC.js +542 -0
  52. package/dist/app-2SUVPURX.js +38 -0
  53. package/dist/app-PR42RXHC.js +28 -0
  54. package/dist/app.js +12 -12
  55. package/dist/bam-AYHWKHXL.js +872 -0
  56. package/dist/barchart-S4CLMJO7.js +38 -0
  57. package/dist/barchart2-R2BGA2WO.js +305 -0
  58. package/dist/block-QKO2PO4A.js +6208 -0
  59. package/dist/block-QKO2PO4A.js.map +7 -0
  60. package/dist/block.init-SSWOFFJR.js +29 -0
  61. package/dist/block.mds.expressionrank-GJBLSUUM.js +350 -0
  62. package/dist/block.mds.geneboxplot-SAAU4OH5.js +819 -0
  63. package/dist/block.mds.junction-IIZPRLPH.js +1534 -0
  64. package/dist/block.mds.svcnv-KOG7O25F.js +6325 -0
  65. package/dist/block.svg-5GJ744H3.js +155 -0
  66. package/dist/block.tk.aicheck-CTIJCHIC.js +274 -0
  67. package/dist/block.tk.bam-RTB7C6CW.js +1906 -0
  68. package/dist/block.tk.bigwig.ui-OJVOCOWS.js +202 -0
  69. package/dist/block.tk.hicstraw-GUE6G2DA.js +814 -0
  70. package/dist/block.tk.junction-XILEKNJY.js +2353 -0
  71. package/dist/block.tk.junction.textmatrixui-OF6BW6OY.js +190 -0
  72. package/dist/block.tk.ld-QZVJUGZU.js +90 -0
  73. package/dist/block.tk.menu-B2NV6ZX3.js +1050 -0
  74. package/dist/block.tk.pgv-46OQHX7S.js +934 -0
  75. package/dist/brainImaging-TWTGRSHJ.js +550 -0
  76. package/dist/brainRegions-YTTLJMBU.js +213 -0
  77. package/dist/bubbleHeatmap-OZVG67KF.js +374 -0
  78. package/dist/bubbleHeatmap-OZVG67KF.js.map +7 -0
  79. package/dist/cellTypeBubbleHeatmap-4QFAAED5.js +274 -0
  80. package/dist/cellTypeBubbleHeatmap-4QFAAED5.js.map +7 -0
  81. package/dist/chunk-255OQYGC.js +267 -0
  82. package/dist/chunk-2B3CYHUF.js +30 -0
  83. package/dist/chunk-2BXMWQTJ.js +1339 -0
  84. package/dist/chunk-2E3AJFOA.js +550 -0
  85. package/dist/chunk-2IAELUCN.js +348 -0
  86. package/dist/chunk-2W6U53AG.js +195 -0
  87. package/dist/chunk-3R6VYZYB.js +96 -0
  88. package/dist/chunk-3YAQY5NZ.js +626 -0
  89. package/dist/chunk-52WVSXYC.js +305 -0
  90. package/dist/chunk-6CQ5ADIY.js +56 -0
  91. package/dist/chunk-6UHSGC6G.js +276 -0
  92. package/dist/chunk-6YRM7Z4F.js +4521 -0
  93. package/dist/chunk-6YRM7Z4F.js.map +7 -0
  94. package/dist/chunk-7E37WMAX.js +141 -0
  95. package/dist/chunk-7EP77LOA.js +194 -0
  96. package/dist/chunk-7LJ4LTD6.js +54 -0
  97. package/dist/chunk-7MEBMH77.js +14 -0
  98. package/dist/chunk-7NVFEGCE.js +30 -0
  99. package/dist/chunk-A52K2E32.js +340 -0
  100. package/dist/chunk-A6DDXPLN.js +961 -0
  101. package/dist/chunk-A6DDXPLN.js.map +7 -0
  102. package/dist/chunk-A7UNLPQQ.js +243 -0
  103. package/dist/chunk-BH4KIOUQ.js +480 -0
  104. package/dist/chunk-CFYWQJ7F.js +472 -0
  105. package/dist/chunk-CFYWQJ7F.js.map +7 -0
  106. package/dist/chunk-CG2H6EFQ.js +55 -0
  107. package/dist/chunk-CNDQFKUB.js +468 -0
  108. package/dist/chunk-CVLHDO2O.js +2685 -0
  109. package/dist/chunk-CVRTDBLZ.js +2008 -0
  110. package/dist/chunk-CXCAQOFB.js +26888 -0
  111. package/dist/chunk-CXCAQOFB.js.map +7 -0
  112. package/dist/chunk-DMG4ZMX5.js +830 -0
  113. package/dist/chunk-DMG4ZMX5.js.map +7 -0
  114. package/dist/chunk-DYX6B6RN.js +328 -0
  115. package/dist/chunk-FA2B6PKK.js +42 -0
  116. package/dist/chunk-FA6M7PSZ.js +134 -0
  117. package/dist/chunk-FCQPQD7Z.js +181 -0
  118. package/dist/chunk-FCQPQD7Z.js.map +7 -0
  119. package/dist/chunk-FF4J6QSF.js +240 -0
  120. package/dist/chunk-FYHUHKUC.js +6375 -0
  121. package/dist/chunk-G3CJDTG4.js +48 -0
  122. package/dist/chunk-HRD5MN33.js +1219 -0
  123. package/dist/chunk-HRD5MN33.js.map +7 -0
  124. package/dist/chunk-ILAYJZBC.js +184 -0
  125. package/dist/chunk-IT7EE7LY.js +2334 -0
  126. package/dist/chunk-JG5CF5Q3.js +397 -0
  127. package/dist/chunk-JI632MAR.js +400 -0
  128. package/dist/chunk-JI632MAR.js.map +7 -0
  129. package/dist/chunk-L3ORR2TC.js +2799 -0
  130. package/dist/chunk-L6BT6WZP.js +54 -0
  131. package/dist/chunk-LF2DWEKN.js +255 -0
  132. package/dist/chunk-MJZ66SUG.js +35 -0
  133. package/dist/chunk-N5T7TT5H.js +56 -0
  134. package/dist/chunk-NB4C446B.js +299 -0
  135. package/dist/chunk-NJYYF2LF.js +263 -0
  136. package/dist/chunk-NMVEXITA.js +379 -0
  137. package/dist/chunk-NS2H3C6X.js +182 -0
  138. package/dist/chunk-O7346S3P.js +1253 -0
  139. package/dist/chunk-OV3W5AMN.js +103 -0
  140. package/dist/chunk-PQDYA3ZQ.js +274 -0
  141. package/dist/chunk-QFRR3ZRE.js +466 -0
  142. package/dist/chunk-QLKEA3WE.js +102 -0
  143. package/dist/chunk-QM7CXRSF.js +96 -0
  144. package/dist/chunk-QV6VZLS5.js +2932 -0
  145. package/dist/chunk-RTE32A22.js +123 -0
  146. package/dist/chunk-RUFY5VCS.js +161 -0
  147. package/dist/chunk-RUFY5VCS.js.map +7 -0
  148. package/dist/chunk-SB5DR4NL.js +562 -0
  149. package/dist/chunk-SCATA75L.js +100 -0
  150. package/dist/chunk-SCATA75L.js.map +7 -0
  151. package/dist/chunk-SDUMZTIK.js +2095 -0
  152. package/dist/chunk-TIU2GGWN.js +5258 -0
  153. package/dist/chunk-TIU2GGWN.js.map +7 -0
  154. package/dist/chunk-TYLCIGGN.js +296 -0
  155. package/dist/chunk-UHZDDPUU.js +444 -0
  156. package/dist/chunk-UW6GRHZ4.js +516 -0
  157. package/dist/chunk-UYA5LCAR.js +281 -0
  158. package/dist/chunk-V7CB5D7A.js +50 -0
  159. package/dist/chunk-VBUDRJJG.js +203 -0
  160. package/dist/chunk-VVWZ4BOI.js +2349 -0
  161. package/dist/chunk-W3K3N275.js +418 -0
  162. package/dist/chunk-WENNRY5E.js +170 -0
  163. package/dist/chunk-Z4R7TCTB.js +257 -0
  164. package/dist/chunk-ZFNEHOW4.js +848 -0
  165. package/dist/chunk-ZLEGHQOO.js +217 -0
  166. package/dist/cohort-TLSGXKV5.js +66 -0
  167. package/dist/cohortSunburst-TNMXPHJW.js +402 -0
  168. package/dist/condition-NN7YK7AI.js +323 -0
  169. package/dist/controls-472G34VU.js +30 -0
  170. package/dist/controls.config-2BQ7QYOB.js +30 -0
  171. package/dist/correlation-5UPYEHC6.js +91 -0
  172. package/dist/customdata.inputui-EWYP4MRY.js +280 -0
  173. package/dist/dataDownload-X5UXBEK4.js +326 -0
  174. package/dist/databrowser.ui-PFHJKHIW.js +424 -0
  175. package/dist/dictionary-M2MCNRN2.js +109 -0
  176. package/dist/dnaMethylation-A7AWG2P5.js +29 -0
  177. package/dist/dnaMethylation.integration.spec-JWCMRFAM.js +194 -0
  178. package/dist/dnaMethylation.unit.spec-PIVJBW7Z.js +95 -0
  179. package/dist/dofetch-XID2XEJT.js +49 -0
  180. package/dist/e2pca-VJRNE6BU.js +340 -0
  181. package/dist/ep-BZE65IX2.js +1247 -0
  182. package/dist/expclust.gdc.spec-5BGBANUV.js +298 -0
  183. package/dist/facet-RXUO4LRY.js +556 -0
  184. package/dist/gb-NDRFDS5A.js +77 -0
  185. package/dist/geneExpClustering-ONJGTSGM.js +240 -0
  186. package/dist/geneExpression-NXDXXKEA.js +309 -0
  187. package/dist/geneExpression-PYI42HV6.js +29 -0
  188. package/dist/geneExpression.unit.spec-PTFHHTP7.js +150 -0
  189. package/dist/geneORA-SDR43UOL.js +269 -0
  190. package/dist/geneRanking-QI43IRNV.js +544 -0
  191. package/dist/geneVariant-OT4V554H.js +32 -0
  192. package/dist/geneVariant-V7EKM7RW.js +289 -0
  193. package/dist/geneVariant-V7EKM7RW.js.map +7 -0
  194. package/dist/geneVariant.integration.spec-6OE4HKYB.js +672 -0
  195. package/dist/genefusion.ui-IQDKCZPX.js +299 -0
  196. package/dist/geneset-TLZPZOQP.js +199 -0
  197. package/dist/genomeBrowser.spec-HIOTFKFK.js +272 -0
  198. package/dist/grin2-G2PVFRKR.js +945 -0
  199. package/dist/grin2-RJQZRVFF.js +66 -0
  200. package/dist/hierCluster-C6ICZSOB.js +51 -0
  201. package/dist/hierCluster-MESFVAO7.js +55 -0
  202. package/dist/hierCluster.config-7HROWR2T.js +32 -0
  203. package/dist/hierCluster.integration.spec-CJT22MJI.js +479 -0
  204. package/dist/hierCluster.interactivity-MDX5QSEF.js +45 -0
  205. package/dist/hierCluster.renderers-SU5IYI33.js +18 -0
  206. package/dist/imagePlot-3Y5FNIJL.js +152 -0
  207. package/dist/importPlot-WE5QSSFY.js +8 -0
  208. package/dist/isoformExpression-TMLFOZVK.js +31 -0
  209. package/dist/isoformExpression.unit.spec-MSVTQC3E.js +233 -0
  210. package/dist/junction-YKZV4LEL.js +32 -0
  211. package/dist/junction.unit.spec-3GPBCHXJ.js +224 -0
  212. package/dist/junction.unit.spec-3GPBCHXJ.js.map +7 -0
  213. package/dist/launch.adhoc-DS6UME2S.js +33 -0
  214. package/dist/leftlabel.sample-F6TEFWEW.js +260 -0
  215. package/dist/leftlabel.sample-F6TEFWEW.js.map +7 -0
  216. package/dist/lollipop-ZKDAU3O5.js +162 -0
  217. package/dist/maf-DKOORWGV.js +451 -0
  218. package/dist/maftimeline-EHJ2CWJJ.js +583 -0
  219. package/dist/matrix-7JDLGNU7.js +55 -0
  220. package/dist/matrix-EB7YOLMN.js +50 -0
  221. package/dist/matrix.cells-A5E63KDN.js +25 -0
  222. package/dist/matrix.config-GSW2WJM4.js +33 -0
  223. package/dist/matrix.data-R4FW2PQH.js +22 -0
  224. package/dist/matrix.groups-3UH2KOIY.js +25 -0
  225. package/dist/matrix.integration.spec-R32TIABT.js +3156 -0
  226. package/dist/matrix.interactivity-RDPMBDVK.js +33 -0
  227. package/dist/matrix.layout-FD275D3P.js +35 -0
  228. package/dist/matrix.legend-SE7SQTNN.js +19 -0
  229. package/dist/matrix.renderers-RK2BRCHZ.js +30 -0
  230. package/dist/matrix.serieses-BEZCQDLJ.js +18 -0
  231. package/dist/matrix.sort-KRNS4VPF.js +25 -0
  232. package/dist/matrix.sort.unit.spec-LZG3GOXM.js +464 -0
  233. package/dist/matrix.sorterUi.unit.spec-RR2KK4R5.js +334 -0
  234. package/dist/matrix.unit.spec-3PK6LUNE.js +146 -0
  235. package/dist/mavb-CUPAESFH.js +726 -0
  236. package/dist/mds.samplescatterplot-WGQ7A7UC.js +1545 -0
  237. package/dist/mds.survivalplot-ZEGSEJO2.js +472 -0
  238. package/dist/multivalue-DKUQCROX.js +79 -0
  239. package/dist/numericDictTermCluster-IFIEM3E4.js +62 -0
  240. package/dist/oncomatrix-WSPJAWHW.js +286 -0
  241. package/dist/oncomatrix.spec-LDWTZ7LO.js +439 -0
  242. package/dist/plot.2dvaf-N333YSMC.js +368 -0
  243. package/dist/plot.app-HU5RQS5I.js +32 -0
  244. package/dist/plot.barplot-4T2UEIYX.js +93 -0
  245. package/dist/plot.boxplot-C4OXCRFB.js +142 -0
  246. package/dist/plot.brainImaging-A6FEKFEA.js +51 -0
  247. package/dist/plot.disco-VDL7YKRX.js +100 -0
  248. package/dist/plot.ssgq-OII7PFPG.js +130 -0
  249. package/dist/plot.vaf2cov-RZ5JPWMC.js +249 -0
  250. package/dist/polar2-6KR2KX5D.js +228 -0
  251. package/dist/profileForms-YJDJIBSY.js +937 -0
  252. package/dist/profilePlot-U4U4AYMO.js +45 -0
  253. package/dist/proteinView-F5QEDDWR.js +1346 -0
  254. package/dist/proteinView-F5QEDDWR.js.map +7 -0
  255. package/dist/proteomeCohortCompare-QCXKLAWG.js +866 -0
  256. package/dist/pseudbulk.unit.spec-3A2FWQZI.js +82 -0
  257. package/dist/pseudobulk-WB6NXFJ6.js +31 -0
  258. package/dist/qualitative-CQUBCCGT.js +34 -0
  259. package/dist/qualitative-QQ3CWFVP.js +241 -0
  260. package/dist/radar2-FNC67FNX.js +323 -0
  261. package/dist/radarFacility2-3X77B4WP.js +331 -0
  262. package/dist/render-G5NCZTMW.js +29 -0
  263. package/dist/report-CR645KQ4.js +213 -0
  264. package/dist/sampleView-6PG2HJZL.js +39 -0
  265. package/dist/samplelst-FCQ7YPPQ.js +114 -0
  266. package/dist/samplematrix-GXMN5QTS.js +2188 -0
  267. package/dist/sc-4ZTSQOXC.js +77 -0
  268. package/dist/scatter-2PUQU22I.js +84 -0
  269. package/dist/scatter-ZSZTA37T.js +919 -0
  270. package/dist/selectGenomeWithTklst-XHWBEM2G.js +125 -0
  271. package/dist/singleCellCellType-NP7Y4N6Z.js +29 -0
  272. package/dist/singleCellCellType.unit.spec-5I3FECB4.js +150 -0
  273. package/dist/singleCellGeneExpression-7RWH633E.js +29 -0
  274. package/dist/singleCellGeneExpression.unit.spec-2X2BDTNO.js +144 -0
  275. package/dist/singleCellNumericValue-I6V4ME6T.js +29 -0
  276. package/dist/singleCellNumericValue.unit.spec-4HKAJXB3.js +412 -0
  277. package/dist/singleCellPlot-QRFR3AJH.js +44 -0
  278. package/dist/singlecell-AQEAB445.js +77 -0
  279. package/dist/singlecell-DX4EXNUV.js +1562 -0
  280. package/dist/snp-2URSYPBL.js +29 -0
  281. package/dist/snp.unit.spec-ZV2RCDT4.js +167 -0
  282. package/dist/snplocus-BB4I2QIP.js +200 -0
  283. package/dist/snplst-A5S7CQEM.js +36 -0
  284. package/dist/spliceevent.a53ss.diagram-6C4OQOVF.js +142 -0
  285. package/dist/spliceevent.exonskip.diagram-FKSR3JEL.js +274 -0
  286. package/dist/spliceevent.noeventdiagram-G3JQUZKK.js +451 -0
  287. package/dist/ssGSEA-KLMOSI53.js +29 -0
  288. package/dist/ssGSEA.unit.spec-HBALWLVB.js +79 -0
  289. package/dist/stattable-ZCMPIC3I.js +112 -0
  290. package/dist/studyCatalog-UZ4BSYY6.js +457 -0
  291. package/dist/summarizeCnvGeneexp-Z43GYKZB.js +154 -0
  292. package/dist/summarizeGeneexpSurvival-4OHRMCFV.js +101 -0
  293. package/dist/summarizeMutationCnv-EZXMLADC.js +155 -0
  294. package/dist/summarizeMutationDiagnosis-RPQP4TM5.js +31 -0
  295. package/dist/summarizeMutationSurvival-LX4TRGJZ.js +95 -0
  296. package/dist/summary-FZQVK5KR.js +40 -0
  297. package/dist/summary.integration.spec-46T65LR5.js +405 -0
  298. package/dist/summaryInput-BHU7G5FC.js +238 -0
  299. package/dist/sunburst-A5NS3KJQ.js +274 -0
  300. package/dist/sunburst-R5X2C7FK.js +34 -0
  301. package/dist/survival-MKW5J5ZH.js +1248 -0
  302. package/dist/survival-N2NKMVOV.js +49 -0
  303. package/dist/survival.integration.spec-K5FMOOTF.js +609 -0
  304. package/dist/svgraph-3WRCJA5D.js +1377 -0
  305. package/dist/svmr-TLMT7GE3.js +3574 -0
  306. package/dist/svmr-TLMT7GE3.js.map +7 -0
  307. package/dist/swimmer-XV5KVWEM.js +993 -0
  308. package/dist/table-XUGFZSGV.js +192 -0
  309. package/dist/termCollection-23ZRHZHF.js +247 -0
  310. package/dist/termCollection-NWTAUSSW.js +29 -0
  311. package/dist/termCollection.unit.spec-WE3JMSUI.js +295 -0
  312. package/dist/termCollectionFractionSelection-5FLFLMIY.js +38 -0
  313. package/dist/termCollectionFractionSelection.unit.spec-CCFGGXAA.js +184 -0
  314. package/dist/tk-CTHINOMN.js +1224 -0
  315. package/dist/tk-CTHINOMN.js.map +7 -0
  316. package/dist/tk-F3TSB4IB.js +38 -0
  317. package/dist/tp.ui-4QDX3FGM.js +1453 -0
  318. package/dist/tvs.categorical-24OT3XZI.js +28 -0
  319. package/dist/tvs.condition-X4SXCVGN.js +160 -0
  320. package/dist/tvs.dt-FRBJRSWI.js +34 -0
  321. package/dist/tvs.dtcnv.categorical-4RRSO735.js +31 -0
  322. package/dist/tvs.dtcnv.continuous-HXY2PBUA.js +72 -0
  323. package/dist/tvs.dtfusion-67LXBQA4.js +31 -0
  324. package/dist/tvs.dtitd-MCJZCNV2.js +31 -0
  325. package/dist/tvs.dtsnvindel-K5YIIBQJ.js +31 -0
  326. package/dist/tvs.dtsv-RP7FUB2N.js +31 -0
  327. package/dist/tvs.multivalue-CROMWUCP.js +84 -0
  328. package/dist/tvs.numeric-IYYYV6ZJ.js +32 -0
  329. package/dist/tvs.samplelst-5DXKRFYM.js +95 -0
  330. package/dist/tvs.survival-W5RXODBT.js +110 -0
  331. package/dist/tvs.termCollection-OSJYIWDX.js +118 -0
  332. package/dist/vocabulary-HTRYJUD7.js +32 -0
  333. package/dist/wsi.direct-UHVG525G.js +11600 -0
  334. package/dist/wsi.direct-UHVG525G.js.map +7 -0
  335. package/package.json +3 -3
  336. package/dist/2dmaf-CSBPMYHO.js +0 -1362
  337. package/dist/AggMatrixInput-2HST4LLJ.js +0 -402
  338. package/dist/AggregateMatrix-UPOAX44L.js +0 -37
  339. package/dist/AppHeader-H5QBVKUS.js +0 -826
  340. package/dist/BoxPlot-JTBQA6PL.js +0 -1247
  341. package/dist/CorrelationVolcano-AWBPVDMT.js +0 -613
  342. package/dist/CorrelationVolcano-AWBPVDMT.js.map +0 -7
  343. package/dist/Cuminc-3BXJVWIH.js +0 -1217
  344. package/dist/DE-237VV46D.js +0 -85
  345. package/dist/DEinput-W443UW5T.js +0 -479
  346. package/dist/DEinput-W443UW5T.js.map +0 -7
  347. package/dist/DM-TIW623IR.js +0 -86
  348. package/dist/DifferentialAnalysis-PHUA2GPK.js +0 -236
  349. package/dist/Disco-WHV52SCI.js +0 -3445
  350. package/dist/Disco.UI-UDUXNCZX.js +0 -239
  351. package/dist/DmrPlot-FZCD6FTX.js +0 -366
  352. package/dist/GB-6UW5LOUV.js +0 -1388
  353. package/dist/GB-6UW5LOUV.js.map +0 -7
  354. package/dist/GSEA-3CNHMK6M.js +0 -870
  355. package/dist/GeneExpInput-ZOVP7BFY.js +0 -38
  356. package/dist/Geomap-JREOIESM.js +0 -80
  357. package/dist/HicApp-RKAMIUXQ.js +0 -2240
  358. package/dist/IDCViewer-KXV4FU3V.js +0 -10810
  359. package/dist/NumBinaryEditor-FNVYUK2J.js +0 -274
  360. package/dist/NumBinaryEditor.unit.spec-PWR23U3J.js +0 -308
  361. package/dist/NumContEditor-YLBJW64K.js +0 -100
  362. package/dist/NumContEditor.unit.spec-6JWBCPFY.js +0 -160
  363. package/dist/NumCustomBinEditor-42AFCXRN.js +0 -29
  364. package/dist/NumCustomBinEditor.unit.spec-AFBTF2CL.js +0 -393
  365. package/dist/NumDiscreteEditor-FJIBZTBP.js +0 -165
  366. package/dist/NumDiscreteEditor.unit.spec-MC4INDCB.js +0 -229
  367. package/dist/NumRegularBinEditor-2WRE72TL.js +0 -29
  368. package/dist/NumRegularBinEditor.unit.spec-L3S6NRCM.js +0 -274
  369. package/dist/NumSplineEditor-TVMVAN7I.js +0 -205
  370. package/dist/NumSplineEditor.unit.spec-GEL36GZZ.js +0 -220
  371. package/dist/NumericDensity-BNFAVOFO.js +0 -29
  372. package/dist/NumericDensity.unit.spec-XBYUFBTQ.js +0 -414
  373. package/dist/NumericHandler-4VFFJNX6.js +0 -30
  374. package/dist/NumericHandler.unit.spec-76T2IVRS.js +0 -225
  375. package/dist/ProteomeInput-M5UIO73Q.js +0 -610
  376. package/dist/Regression-5LB5TLA6.js +0 -1412
  377. package/dist/RunChart2-HIFXOEKZ.js +0 -744
  378. package/dist/SC-SMMW5MJG.js +0 -1290
  379. package/dist/Violin-COAFYZOV.js +0 -1105
  380. package/dist/Volcano-62II76B4.js +0 -2748
  381. package/dist/Volcano-62II76B4.js.map +0 -7
  382. package/dist/Wsi-OYW2L7FR.js +0 -637
  383. package/dist/Wsi-OYW2L7FR.js.map +0 -7
  384. package/dist/aboutSunburst-3FYJGR6B.js +0 -93
  385. package/dist/adSandbox-4VHYWBQC.js +0 -29
  386. package/dist/animatedBubbleChart-QCCIC5IT.js +0 -542
  387. package/dist/app-IF7YPCGZ.js +0 -28
  388. package/dist/app-JZ43TSJP.js +0 -38
  389. package/dist/bam-2VPZGSW3.js +0 -872
  390. package/dist/barchart-VYTWYYGG.js +0 -38
  391. package/dist/barchart2-XC7J4VEO.js +0 -305
  392. package/dist/block-YGQFUK5L.js +0 -6203
  393. package/dist/block-YGQFUK5L.js.map +0 -7
  394. package/dist/block.init-BVP3YZHQ.js +0 -29
  395. package/dist/block.mds.expressionrank-RKDDKY4J.js +0 -350
  396. package/dist/block.mds.geneboxplot-3FZ3EZZ6.js +0 -819
  397. package/dist/block.mds.junction-MCOG37RA.js +0 -1534
  398. package/dist/block.mds.svcnv-IEOR5IQZ.js +0 -6325
  399. package/dist/block.svg-3XHRHYCV.js +0 -155
  400. package/dist/block.tk.aicheck-TMDUGNZX.js +0 -274
  401. package/dist/block.tk.bam-73KW4QEJ.js +0 -1906
  402. package/dist/block.tk.bigwig.ui-E5W6R7DQ.js +0 -202
  403. package/dist/block.tk.hicstraw-BNNE6ZMW.js +0 -814
  404. package/dist/block.tk.junction-DMPRZRNY.js +0 -2353
  405. package/dist/block.tk.junction.textmatrixui-XS2E7MQL.js +0 -190
  406. package/dist/block.tk.ld-QD3XDLO4.js +0 -90
  407. package/dist/block.tk.menu-S6XI732E.js +0 -1050
  408. package/dist/block.tk.pgv-KH4TMR3A.js +0 -934
  409. package/dist/brainImaging-NK4JENN3.js +0 -550
  410. package/dist/brainRegions-YUEMTKYH.js +0 -213
  411. package/dist/bubbleHeatmap-LQCVS4WK.js +0 -374
  412. package/dist/bubbleHeatmap-LQCVS4WK.js.map +0 -7
  413. package/dist/cellTypeBubbleHeatmap-DFRSPWAY.js +0 -274
  414. package/dist/cellTypeBubbleHeatmap-DFRSPWAY.js.map +0 -7
  415. package/dist/chunk-37ZEGLVY.js +0 -267
  416. package/dist/chunk-3RPX4ZVV.js +0 -2334
  417. package/dist/chunk-4LK5YFHF.js +0 -102
  418. package/dist/chunk-4WFG5Y3A.js +0 -2095
  419. package/dist/chunk-4WFXCUT4.js +0 -141
  420. package/dist/chunk-5LY2ASQX.js +0 -305
  421. package/dist/chunk-6V7ITU5F.js +0 -2349
  422. package/dist/chunk-7UK7CU4F.js +0 -398
  423. package/dist/chunk-7UK7CU4F.js.map +0 -7
  424. package/dist/chunk-AAQDXVQT.js +0 -134
  425. package/dist/chunk-ADJBQCFM.js +0 -243
  426. package/dist/chunk-ATIITEOR.js +0 -692
  427. package/dist/chunk-ATIITEOR.js.map +0 -7
  428. package/dist/chunk-BWVJAFEQ.js +0 -35
  429. package/dist/chunk-CDCNBN6G.js +0 -50
  430. package/dist/chunk-CGSBIFFO.js +0 -1339
  431. package/dist/chunk-DPWSIN62.js +0 -26787
  432. package/dist/chunk-DPWSIN62.js.map +0 -7
  433. package/dist/chunk-EARMOT6Q.js +0 -176
  434. package/dist/chunk-EARMOT6Q.js.map +0 -7
  435. package/dist/chunk-ECCXTB5S.js +0 -562
  436. package/dist/chunk-ECTOEM7X.js +0 -96
  437. package/dist/chunk-EKIWZUEO.js +0 -54
  438. package/dist/chunk-FALP6GXG.js +0 -96
  439. package/dist/chunk-FRD6LQF7.js +0 -103
  440. package/dist/chunk-FRPYXYYQ.js +0 -263
  441. package/dist/chunk-FV2GLMSI.js +0 -397
  442. package/dist/chunk-G6SP5IQT.js +0 -626
  443. package/dist/chunk-GZL6YFZJ.js +0 -30
  444. package/dist/chunk-H353EVLK.js +0 -240
  445. package/dist/chunk-HKR5R5YR.js +0 -466
  446. package/dist/chunk-HULTLO4D.js +0 -217
  447. package/dist/chunk-IIN4CG67.js +0 -56
  448. package/dist/chunk-ISWFHYEZ.js +0 -123
  449. package/dist/chunk-JBUTLI3V.js +0 -1253
  450. package/dist/chunk-JCNZJKLK.js +0 -55
  451. package/dist/chunk-JEVDRC64.js +0 -56
  452. package/dist/chunk-KBZAB2H2.js +0 -340
  453. package/dist/chunk-KDKJLITX.js +0 -54
  454. package/dist/chunk-KNFJN6CM.js +0 -299
  455. package/dist/chunk-KSYGLBZ4.js +0 -4389
  456. package/dist/chunk-KSYGLBZ4.js.map +0 -7
  457. package/dist/chunk-KUOXZIH4.js +0 -348
  458. package/dist/chunk-KZ54E2FU.js +0 -184
  459. package/dist/chunk-L7FMBWWK.js +0 -6375
  460. package/dist/chunk-LMONIWPI.js +0 -30
  461. package/dist/chunk-LTY7WOAT.js +0 -281
  462. package/dist/chunk-LYDN734A.js +0 -194
  463. package/dist/chunk-LYMYO6TY.js +0 -652
  464. package/dist/chunk-LYMYO6TY.js.map +0 -7
  465. package/dist/chunk-MRZUZDRA.js +0 -444
  466. package/dist/chunk-NGBI4FST.js +0 -195
  467. package/dist/chunk-OKM4ACTA.js +0 -170
  468. package/dist/chunk-OUDHHMZU.js +0 -159
  469. package/dist/chunk-OUDHHMZU.js.map +0 -7
  470. package/dist/chunk-OYXRYWGU.js +0 -2932
  471. package/dist/chunk-P2HMCEMM.js +0 -5254
  472. package/dist/chunk-P2HMCEMM.js.map +0 -7
  473. package/dist/chunk-P5FHYGJK.js +0 -848
  474. package/dist/chunk-P7QDNXSH.js +0 -276
  475. package/dist/chunk-Q7GK35TB.js +0 -257
  476. package/dist/chunk-QXRM5NMW.js +0 -274
  477. package/dist/chunk-RI3GAHQE.js +0 -255
  478. package/dist/chunk-SH7SL4I5.js +0 -1219
  479. package/dist/chunk-SH7SL4I5.js.map +0 -7
  480. package/dist/chunk-SJHWZZ4M.js +0 -70
  481. package/dist/chunk-SJHWZZ4M.js.map +0 -7
  482. package/dist/chunk-T2W4JHWJ.js +0 -472
  483. package/dist/chunk-T2W4JHWJ.js.map +0 -7
  484. package/dist/chunk-TDBS3UFZ.js +0 -379
  485. package/dist/chunk-THHYPA5K.js +0 -48
  486. package/dist/chunk-U2OB3S3M.js +0 -14
  487. package/dist/chunk-UA2ADBTO.js +0 -42
  488. package/dist/chunk-USGUVW5Q.js +0 -182
  489. package/dist/chunk-UWVDD4C2.js +0 -480
  490. package/dist/chunk-W2SBSEKT.js +0 -550
  491. package/dist/chunk-XAHZYGKW.js +0 -468
  492. package/dist/chunk-XKWLP433.js +0 -328
  493. package/dist/chunk-YWB2QHV2.js +0 -2799
  494. package/dist/chunk-Z6M77JDG.js +0 -2008
  495. package/dist/chunk-Z7RFFJXU.js +0 -516
  496. package/dist/chunk-ZG7EBTHK.js +0 -203
  497. package/dist/chunk-ZJLJHQWM.js +0 -418
  498. package/dist/chunk-ZKU6RST3.js +0 -2685
  499. package/dist/chunk-ZLWEUYPT.js +0 -296
  500. package/dist/cohort-X327AG3O.js +0 -66
  501. package/dist/cohortSunburst-GNWIVDNA.js +0 -402
  502. package/dist/condition-3M4L2HIM.js +0 -323
  503. package/dist/controls-OKNHZJOU.js +0 -30
  504. package/dist/controls.config-FUKM5LEP.js +0 -30
  505. package/dist/correlation-PC4MXCFM.js +0 -91
  506. package/dist/customdata.inputui-HCRTX56R.js +0 -280
  507. package/dist/dataDownload-HJO7UW7S.js +0 -326
  508. package/dist/databrowser.ui-EY3H6B4S.js +0 -424
  509. package/dist/dictionary-L6CTMFY7.js +0 -109
  510. package/dist/dnaMethylation-FEB5GGXK.js +0 -29
  511. package/dist/dnaMethylation.integration.spec-4DC6TJNZ.js +0 -194
  512. package/dist/dnaMethylation.unit.spec-REOHQOBC.js +0 -95
  513. package/dist/dofetch-YFGOKCKV.js +0 -49
  514. package/dist/e2pca-QSAVTCPL.js +0 -340
  515. package/dist/ep-LAFLKVSW.js +0 -1247
  516. package/dist/expclust.gdc.spec-OM4J6WBL.js +0 -298
  517. package/dist/facet-WHTV2VIX.js +0 -556
  518. package/dist/gb-DLXWWBB6.js +0 -77
  519. package/dist/geneExpClustering-KB2MB2VM.js +0 -240
  520. package/dist/geneExpression-3D7PDZ2I.js +0 -309
  521. package/dist/geneExpression-3RSRGYGQ.js +0 -29
  522. package/dist/geneExpression.unit.spec-EINAWLPR.js +0 -150
  523. package/dist/geneORA-J4KVSZT3.js +0 -269
  524. package/dist/geneRanking-HKLJ7CN6.js +0 -544
  525. package/dist/geneVariant-3BRGRFPT.js +0 -32
  526. package/dist/geneVariant-VI5DGDAB.js +0 -289
  527. package/dist/geneVariant-VI5DGDAB.js.map +0 -7
  528. package/dist/geneVariant.integration.spec-3IBX4NNE.js +0 -672
  529. package/dist/genefusion.ui-OESQL7TW.js +0 -299
  530. package/dist/geneset-3BMV3KP4.js +0 -199
  531. package/dist/genomeBrowser.spec-I3WKAITC.js +0 -272
  532. package/dist/grin2-4BBCH3H5.js +0 -66
  533. package/dist/grin2-5L2U32LY.js +0 -945
  534. package/dist/hierCluster-KM56NTN6.js +0 -51
  535. package/dist/hierCluster-XCJF5IQ6.js +0 -55
  536. package/dist/hierCluster.config-E2EYOXX6.js +0 -32
  537. package/dist/hierCluster.integration.spec-IIEJ2YEI.js +0 -479
  538. package/dist/hierCluster.interactivity-AJFEJTGX.js +0 -45
  539. package/dist/hierCluster.renderers-XKI344FM.js +0 -18
  540. package/dist/imagePlot-3B3BXI6I.js +0 -152
  541. package/dist/importPlot-JDVH7Q2Z.js +0 -8
  542. package/dist/isoformExpression-UFHY5LB2.js +0 -31
  543. package/dist/isoformExpression.unit.spec-U6GDCNQR.js +0 -233
  544. package/dist/junction-W2STW5WW.js +0 -32
  545. package/dist/junction.unit.spec-R4DIBFLB.js +0 -178
  546. package/dist/junction.unit.spec-R4DIBFLB.js.map +0 -7
  547. package/dist/launch.adhoc-KN7HFHJH.js +0 -33
  548. package/dist/leftlabel.sample-CK2EK7J6.js +0 -254
  549. package/dist/leftlabel.sample-CK2EK7J6.js.map +0 -7
  550. package/dist/lollipop-EKIGAAK6.js +0 -162
  551. package/dist/maf-MK2MM7J4.js +0 -451
  552. package/dist/maftimeline-7RTMXWFA.js +0 -583
  553. package/dist/matrix-UM2EZODJ.js +0 -50
  554. package/dist/matrix-YBL4FZYJ.js +0 -55
  555. package/dist/matrix.cells-45ZFADK5.js +0 -25
  556. package/dist/matrix.config-QTBIRXKU.js +0 -33
  557. package/dist/matrix.data-WAMOLSKW.js +0 -22
  558. package/dist/matrix.groups-RXFXZABD.js +0 -25
  559. package/dist/matrix.integration.spec-JZDZRVOK.js +0 -3156
  560. package/dist/matrix.interactivity-P4VYGTB2.js +0 -33
  561. package/dist/matrix.layout-WWPRXXHX.js +0 -35
  562. package/dist/matrix.legend-4MCMVVKO.js +0 -19
  563. package/dist/matrix.renderers-JQTUODDS.js +0 -30
  564. package/dist/matrix.serieses-3IDRKSGO.js +0 -18
  565. package/dist/matrix.sort-EAWOB56R.js +0 -25
  566. package/dist/matrix.sort.unit.spec-FOWLULHA.js +0 -464
  567. package/dist/matrix.sorterUi.unit.spec-U5CQDTMX.js +0 -334
  568. package/dist/matrix.unit.spec-VTLD4EOZ.js +0 -146
  569. package/dist/mavb-JIIXJHBK.js +0 -726
  570. package/dist/mds.samplescatterplot-PTWA2V6E.js +0 -1545
  571. package/dist/mds.survivalplot-XVZ66GP5.js +0 -472
  572. package/dist/multivalue-2H7QX7MG.js +0 -79
  573. package/dist/numericDictTermCluster-EHCDRT6J.js +0 -62
  574. package/dist/oncomatrix-RZLZUC32.js +0 -286
  575. package/dist/oncomatrix.spec-Z5UQGTW2.js +0 -439
  576. package/dist/plot.2dvaf-IRBZBJ6B.js +0 -368
  577. package/dist/plot.app-I23IAZ3Z.js +0 -32
  578. package/dist/plot.barplot-PYLRAZB7.js +0 -93
  579. package/dist/plot.boxplot-VBWU7DUG.js +0 -142
  580. package/dist/plot.brainImaging-HDJMEMTK.js +0 -51
  581. package/dist/plot.disco-5BVG3WMT.js +0 -100
  582. package/dist/plot.ssgq-S3BKXJMW.js +0 -130
  583. package/dist/plot.vaf2cov-VD7DU2XR.js +0 -249
  584. package/dist/polar2-PYLEVG7E.js +0 -228
  585. package/dist/profileForms-CI2YYD3Y.js +0 -937
  586. package/dist/profilePlot-UCC4ZVHQ.js +0 -45
  587. package/dist/proteinView-FBY6TK3S.js +0 -1346
  588. package/dist/proteinView-FBY6TK3S.js.map +0 -7
  589. package/dist/proteomeCohortCompare-2VUSLC6I.js +0 -866
  590. package/dist/pseudbulk.unit.spec-VPZWNTIA.js +0 -82
  591. package/dist/pseudobulk-RUXGZ7OY.js +0 -31
  592. package/dist/qualitative-3AVR4GRX.js +0 -34
  593. package/dist/qualitative-5QNBKDOZ.js +0 -241
  594. package/dist/radar2-AOYMS54Y.js +0 -323
  595. package/dist/radarFacility2-PP2MAXIP.js +0 -331
  596. package/dist/render-ASLVKYEX.js +0 -29
  597. package/dist/report-UVYKDMQC.js +0 -213
  598. package/dist/sampleView-6UHR7FSR.js +0 -39
  599. package/dist/samplelst-ABC2CCNN.js +0 -114
  600. package/dist/samplematrix-36UCHZLC.js +0 -2188
  601. package/dist/sc-XLSAM725.js +0 -77
  602. package/dist/scatter-ADOBAOW2.js +0 -84
  603. package/dist/scatter-ZNVLI627.js +0 -919
  604. package/dist/selectGenomeWithTklst-DPDBDYTR.js +0 -125
  605. package/dist/singleCellCellType-STVPYZD4.js +0 -29
  606. package/dist/singleCellCellType.unit.spec-ZLY37AXL.js +0 -150
  607. package/dist/singleCellGeneExpression-PCGLU35S.js +0 -29
  608. package/dist/singleCellGeneExpression.unit.spec-PSLKK362.js +0 -144
  609. package/dist/singleCellNumericValue-SR3SJEOB.js +0 -29
  610. package/dist/singleCellNumericValue.unit.spec-PXVXJ4HJ.js +0 -412
  611. package/dist/singleCellPlot-JXB7M6OH.js +0 -44
  612. package/dist/singlecell-EDSX56QO.js +0 -1562
  613. package/dist/singlecell-PH55NFRX.js +0 -77
  614. package/dist/snp-3VEYBTAQ.js +0 -29
  615. package/dist/snp.unit.spec-V7OB44US.js +0 -167
  616. package/dist/snplocus-HX67RBT5.js +0 -200
  617. package/dist/snplst-H5YXCY33.js +0 -36
  618. package/dist/spliceevent.a53ss.diagram-DBDEEHSK.js +0 -142
  619. package/dist/spliceevent.exonskip.diagram-EYEL6BY6.js +0 -274
  620. package/dist/spliceevent.noeventdiagram-64OEXK7U.js +0 -451
  621. package/dist/ssGSEA-3YWQH6KM.js +0 -29
  622. package/dist/ssGSEA.unit.spec-23V2IXP5.js +0 -79
  623. package/dist/stattable-GPSBCNYC.js +0 -112
  624. package/dist/studyCatalog-W5PATRNY.js +0 -457
  625. package/dist/summarizeCnvGeneexp-YGI23QH5.js +0 -154
  626. package/dist/summarizeGeneexpSurvival-KQ6OLWYR.js +0 -101
  627. package/dist/summarizeMutationCnv-XDHBNEPU.js +0 -155
  628. package/dist/summarizeMutationDiagnosis-VKIJRJ2Q.js +0 -31
  629. package/dist/summarizeMutationSurvival-57YKJGLE.js +0 -95
  630. package/dist/summary-4WQOVIUF.js +0 -40
  631. package/dist/summary.integration.spec-FRNWBU7F.js +0 -405
  632. package/dist/summaryInput-X7DS2YA7.js +0 -238
  633. package/dist/sunburst-3OEAQA3O.js +0 -34
  634. package/dist/sunburst-MSGTXYMM.js +0 -274
  635. package/dist/survival-5KC5CNZU.js +0 -1248
  636. package/dist/survival-QXDS6N46.js +0 -49
  637. package/dist/survival.integration.spec-PKENHLTZ.js +0 -609
  638. package/dist/svgraph-VJLB7BBN.js +0 -1377
  639. package/dist/svmr-6BDEZAS6.js +0 -3834
  640. package/dist/svmr-6BDEZAS6.js.map +0 -7
  641. package/dist/swimmer-R3DN7N36.js +0 -993
  642. package/dist/table-YF5VORU6.js +0 -192
  643. package/dist/termCollection-3KGLZFDW.js +0 -29
  644. package/dist/termCollection-KSHVOPS5.js +0 -247
  645. package/dist/termCollection.unit.spec-HTBDG5PL.js +0 -295
  646. package/dist/termCollectionFractionSelection-MK4NKWUX.js +0 -38
  647. package/dist/termCollectionFractionSelection.unit.spec-AMF32FDN.js +0 -184
  648. package/dist/tk-FDHBAKXQ.js +0 -1198
  649. package/dist/tk-FDHBAKXQ.js.map +0 -7
  650. package/dist/tk-Z54DOECH.js +0 -38
  651. package/dist/tp.ui-M4TZVT53.js +0 -1453
  652. package/dist/tvs.categorical-HY3BWCZR.js +0 -28
  653. package/dist/tvs.condition-Y36TRIX4.js +0 -160
  654. package/dist/tvs.dt-XKVJZP7Y.js +0 -34
  655. package/dist/tvs.dtcnv.categorical-OMRZR4Y7.js +0 -31
  656. package/dist/tvs.dtcnv.continuous-AGYOBI5K.js +0 -72
  657. package/dist/tvs.dtfusion-2JX5Y2IH.js +0 -31
  658. package/dist/tvs.dtitd-SDSLBBWC.js +0 -31
  659. package/dist/tvs.dtsnvindel-LI7K464K.js +0 -31
  660. package/dist/tvs.dtsv-VRCLX7QY.js +0 -31
  661. package/dist/tvs.multivalue-4OTY6J2S.js +0 -84
  662. package/dist/tvs.numeric-CDATYOR2.js +0 -32
  663. package/dist/tvs.samplelst-76JOJG2M.js +0 -95
  664. package/dist/tvs.survival-WTFJOKIZ.js +0 -110
  665. package/dist/tvs.termCollection-QQXAS7PE.js +0 -118
  666. package/dist/vocabulary-6ACAEFTL.js +0 -32
  667. package/dist/wsi.direct-OS32TQRM.js +0 -11515
  668. package/dist/wsi.direct-OS32TQRM.js.map +0 -7
  669. /package/dist/{2dmaf-CSBPMYHO.js.map → 2dmaf-75YAQQ3P.js.map} +0 -0
  670. /package/dist/{AggMatrixInput-2HST4LLJ.js.map → AggMatrixInput-KYDS23KP.js.map} +0 -0
  671. /package/dist/{AggregateMatrix-UPOAX44L.js.map → AggregateMatrix-XGGF6KBX.js.map} +0 -0
  672. /package/dist/{AppHeader-H5QBVKUS.js.map → AppHeader-CNY5RTJN.js.map} +0 -0
  673. /package/dist/{BoxPlot-JTBQA6PL.js.map → BoxPlot-OQIJJO66.js.map} +0 -0
  674. /package/dist/{Cuminc-3BXJVWIH.js.map → Cuminc-J6DONJTA.js.map} +0 -0
  675. /package/dist/{DE-237VV46D.js.map → DE-XUBJUUBB.js.map} +0 -0
  676. /package/dist/{DM-TIW623IR.js.map → DM-2UUXUJOC.js.map} +0 -0
  677. /package/dist/{DifferentialAnalysis-PHUA2GPK.js.map → DifferentialAnalysis-U6ZPFHNM.js.map} +0 -0
  678. /package/dist/{Disco-WHV52SCI.js.map → Disco-RR2NN66T.js.map} +0 -0
  679. /package/dist/{Disco.UI-UDUXNCZX.js.map → Disco.UI-MQ7WZQOP.js.map} +0 -0
  680. /package/dist/{DmrPlot-FZCD6FTX.js.map → DmrPlot-MKAKFUJR.js.map} +0 -0
  681. /package/dist/{GSEA-3CNHMK6M.js.map → GSEA-DTIA4MNS.js.map} +0 -0
  682. /package/dist/{GeneExpInput-ZOVP7BFY.js.map → GeneExpInput-4GM5MBBX.js.map} +0 -0
  683. /package/dist/{Geomap-JREOIESM.js.map → Geomap-FF6DBN7M.js.map} +0 -0
  684. /package/dist/{HicApp-RKAMIUXQ.js.map → HicApp-LGXNL36X.js.map} +0 -0
  685. /package/dist/{IDCViewer-KXV4FU3V.js.map → IDCViewer-FQABJNUI.js.map} +0 -0
  686. /package/dist/{NumBinaryEditor-FNVYUK2J.js.map → NumBinaryEditor-7NOHUH76.js.map} +0 -0
  687. /package/dist/{NumBinaryEditor.unit.spec-PWR23U3J.js.map → NumBinaryEditor.unit.spec-SVE5SZYB.js.map} +0 -0
  688. /package/dist/{NumContEditor-YLBJW64K.js.map → NumContEditor-MSWCQUKL.js.map} +0 -0
  689. /package/dist/{NumContEditor.unit.spec-6JWBCPFY.js.map → NumContEditor.unit.spec-UFPASWBH.js.map} +0 -0
  690. /package/dist/{NumCustomBinEditor-42AFCXRN.js.map → NumCustomBinEditor-DF24SO2N.js.map} +0 -0
  691. /package/dist/{NumCustomBinEditor.unit.spec-AFBTF2CL.js.map → NumCustomBinEditor.unit.spec-N3S3ROBI.js.map} +0 -0
  692. /package/dist/{NumDiscreteEditor-FJIBZTBP.js.map → NumDiscreteEditor-HL257XGY.js.map} +0 -0
  693. /package/dist/{NumDiscreteEditor.unit.spec-MC4INDCB.js.map → NumDiscreteEditor.unit.spec-6PTPX547.js.map} +0 -0
  694. /package/dist/{NumRegularBinEditor-2WRE72TL.js.map → NumRegularBinEditor-EWCKTXWY.js.map} +0 -0
  695. /package/dist/{NumRegularBinEditor.unit.spec-L3S6NRCM.js.map → NumRegularBinEditor.unit.spec-AMGPMY7U.js.map} +0 -0
  696. /package/dist/{NumSplineEditor-TVMVAN7I.js.map → NumSplineEditor-YDNJ2DW2.js.map} +0 -0
  697. /package/dist/{NumSplineEditor.unit.spec-GEL36GZZ.js.map → NumSplineEditor.unit.spec-L4JZ3OND.js.map} +0 -0
  698. /package/dist/{NumericDensity-BNFAVOFO.js.map → NumericDensity-SQW67WKL.js.map} +0 -0
  699. /package/dist/{NumericDensity.unit.spec-XBYUFBTQ.js.map → NumericDensity.unit.spec-KBK3JZZG.js.map} +0 -0
  700. /package/dist/{NumericHandler-4VFFJNX6.js.map → NumericHandler-HG7FK4D4.js.map} +0 -0
  701. /package/dist/{NumericHandler.unit.spec-76T2IVRS.js.map → NumericHandler.unit.spec-N7PYAGGF.js.map} +0 -0
  702. /package/dist/{ProteomeInput-M5UIO73Q.js.map → ProteomeInput-6XGREJFP.js.map} +0 -0
  703. /package/dist/{Regression-5LB5TLA6.js.map → Regression-4DDXNQNO.js.map} +0 -0
  704. /package/dist/{RunChart2-HIFXOEKZ.js.map → RunChart2-ARCUC4Z3.js.map} +0 -0
  705. /package/dist/{SC-SMMW5MJG.js.map → SC-AV6COOPI.js.map} +0 -0
  706. /package/dist/{Violin-COAFYZOV.js.map → Violin-2P5I6NL5.js.map} +0 -0
  707. /package/dist/{aboutSunburst-3FYJGR6B.js.map → aboutSunburst-V557OK5L.js.map} +0 -0
  708. /package/dist/{adSandbox-4VHYWBQC.js.map → adSandbox-76PMWKTX.js.map} +0 -0
  709. /package/dist/{animatedBubbleChart-QCCIC5IT.js.map → animatedBubbleChart-CFRJJDAC.js.map} +0 -0
  710. /package/dist/{app-IF7YPCGZ.js.map → app-2SUVPURX.js.map} +0 -0
  711. /package/dist/{app-JZ43TSJP.js.map → app-PR42RXHC.js.map} +0 -0
  712. /package/dist/{bam-2VPZGSW3.js.map → bam-AYHWKHXL.js.map} +0 -0
  713. /package/dist/{barchart-VYTWYYGG.js.map → barchart-S4CLMJO7.js.map} +0 -0
  714. /package/dist/{barchart2-XC7J4VEO.js.map → barchart2-R2BGA2WO.js.map} +0 -0
  715. /package/dist/{block.init-BVP3YZHQ.js.map → block.init-SSWOFFJR.js.map} +0 -0
  716. /package/dist/{block.mds.expressionrank-RKDDKY4J.js.map → block.mds.expressionrank-GJBLSUUM.js.map} +0 -0
  717. /package/dist/{block.mds.geneboxplot-3FZ3EZZ6.js.map → block.mds.geneboxplot-SAAU4OH5.js.map} +0 -0
  718. /package/dist/{block.mds.junction-MCOG37RA.js.map → block.mds.junction-IIZPRLPH.js.map} +0 -0
  719. /package/dist/{block.mds.svcnv-IEOR5IQZ.js.map → block.mds.svcnv-KOG7O25F.js.map} +0 -0
  720. /package/dist/{block.svg-3XHRHYCV.js.map → block.svg-5GJ744H3.js.map} +0 -0
  721. /package/dist/{block.tk.aicheck-TMDUGNZX.js.map → block.tk.aicheck-CTIJCHIC.js.map} +0 -0
  722. /package/dist/{block.tk.bam-73KW4QEJ.js.map → block.tk.bam-RTB7C6CW.js.map} +0 -0
  723. /package/dist/{block.tk.bigwig.ui-E5W6R7DQ.js.map → block.tk.bigwig.ui-OJVOCOWS.js.map} +0 -0
  724. /package/dist/{block.tk.hicstraw-BNNE6ZMW.js.map → block.tk.hicstraw-GUE6G2DA.js.map} +0 -0
  725. /package/dist/{block.tk.junction-DMPRZRNY.js.map → block.tk.junction-XILEKNJY.js.map} +0 -0
  726. /package/dist/{block.tk.junction.textmatrixui-XS2E7MQL.js.map → block.tk.junction.textmatrixui-OF6BW6OY.js.map} +0 -0
  727. /package/dist/{block.tk.ld-QD3XDLO4.js.map → block.tk.ld-QZVJUGZU.js.map} +0 -0
  728. /package/dist/{block.tk.menu-S6XI732E.js.map → block.tk.menu-B2NV6ZX3.js.map} +0 -0
  729. /package/dist/{block.tk.pgv-KH4TMR3A.js.map → block.tk.pgv-46OQHX7S.js.map} +0 -0
  730. /package/dist/{brainImaging-NK4JENN3.js.map → brainImaging-TWTGRSHJ.js.map} +0 -0
  731. /package/dist/{brainRegions-YUEMTKYH.js.map → brainRegions-YTTLJMBU.js.map} +0 -0
  732. /package/dist/{chunk-37ZEGLVY.js.map → chunk-255OQYGC.js.map} +0 -0
  733. /package/dist/{chunk-GZL6YFZJ.js.map → chunk-2B3CYHUF.js.map} +0 -0
  734. /package/dist/{chunk-CGSBIFFO.js.map → chunk-2BXMWQTJ.js.map} +0 -0
  735. /package/dist/{chunk-W2SBSEKT.js.map → chunk-2E3AJFOA.js.map} +0 -0
  736. /package/dist/{chunk-KUOXZIH4.js.map → chunk-2IAELUCN.js.map} +0 -0
  737. /package/dist/{chunk-NGBI4FST.js.map → chunk-2W6U53AG.js.map} +0 -0
  738. /package/dist/{chunk-FALP6GXG.js.map → chunk-3R6VYZYB.js.map} +0 -0
  739. /package/dist/{chunk-G6SP5IQT.js.map → chunk-3YAQY5NZ.js.map} +0 -0
  740. /package/dist/{chunk-5LY2ASQX.js.map → chunk-52WVSXYC.js.map} +0 -0
  741. /package/dist/{chunk-JEVDRC64.js.map → chunk-6CQ5ADIY.js.map} +0 -0
  742. /package/dist/{chunk-P7QDNXSH.js.map → chunk-6UHSGC6G.js.map} +0 -0
  743. /package/dist/{chunk-4WFXCUT4.js.map → chunk-7E37WMAX.js.map} +0 -0
  744. /package/dist/{chunk-LYDN734A.js.map → chunk-7EP77LOA.js.map} +0 -0
  745. /package/dist/{chunk-KDKJLITX.js.map → chunk-7LJ4LTD6.js.map} +0 -0
  746. /package/dist/{chunk-U2OB3S3M.js.map → chunk-7MEBMH77.js.map} +0 -0
  747. /package/dist/{chunk-LMONIWPI.js.map → chunk-7NVFEGCE.js.map} +0 -0
  748. /package/dist/{chunk-KBZAB2H2.js.map → chunk-A52K2E32.js.map} +0 -0
  749. /package/dist/{chunk-ADJBQCFM.js.map → chunk-A7UNLPQQ.js.map} +0 -0
  750. /package/dist/{chunk-UWVDD4C2.js.map → chunk-BH4KIOUQ.js.map} +0 -0
  751. /package/dist/{chunk-JCNZJKLK.js.map → chunk-CG2H6EFQ.js.map} +0 -0
  752. /package/dist/{chunk-XAHZYGKW.js.map → chunk-CNDQFKUB.js.map} +0 -0
  753. /package/dist/{chunk-ZKU6RST3.js.map → chunk-CVLHDO2O.js.map} +0 -0
  754. /package/dist/{chunk-Z6M77JDG.js.map → chunk-CVRTDBLZ.js.map} +0 -0
  755. /package/dist/{chunk-XKWLP433.js.map → chunk-DYX6B6RN.js.map} +0 -0
  756. /package/dist/{chunk-UA2ADBTO.js.map → chunk-FA2B6PKK.js.map} +0 -0
  757. /package/dist/{chunk-AAQDXVQT.js.map → chunk-FA6M7PSZ.js.map} +0 -0
  758. /package/dist/{chunk-H353EVLK.js.map → chunk-FF4J6QSF.js.map} +0 -0
  759. /package/dist/{chunk-L7FMBWWK.js.map → chunk-FYHUHKUC.js.map} +0 -0
  760. /package/dist/{chunk-THHYPA5K.js.map → chunk-G3CJDTG4.js.map} +0 -0
  761. /package/dist/{chunk-KZ54E2FU.js.map → chunk-ILAYJZBC.js.map} +0 -0
  762. /package/dist/{chunk-3RPX4ZVV.js.map → chunk-IT7EE7LY.js.map} +0 -0
  763. /package/dist/{chunk-FV2GLMSI.js.map → chunk-JG5CF5Q3.js.map} +0 -0
  764. /package/dist/{chunk-YWB2QHV2.js.map → chunk-L3ORR2TC.js.map} +0 -0
  765. /package/dist/{chunk-EKIWZUEO.js.map → chunk-L6BT6WZP.js.map} +0 -0
  766. /package/dist/{chunk-RI3GAHQE.js.map → chunk-LF2DWEKN.js.map} +0 -0
  767. /package/dist/{chunk-BWVJAFEQ.js.map → chunk-MJZ66SUG.js.map} +0 -0
  768. /package/dist/{chunk-IIN4CG67.js.map → chunk-N5T7TT5H.js.map} +0 -0
  769. /package/dist/{chunk-KNFJN6CM.js.map → chunk-NB4C446B.js.map} +0 -0
  770. /package/dist/{chunk-FRPYXYYQ.js.map → chunk-NJYYF2LF.js.map} +0 -0
  771. /package/dist/{chunk-TDBS3UFZ.js.map → chunk-NMVEXITA.js.map} +0 -0
  772. /package/dist/{chunk-USGUVW5Q.js.map → chunk-NS2H3C6X.js.map} +0 -0
  773. /package/dist/{chunk-JBUTLI3V.js.map → chunk-O7346S3P.js.map} +0 -0
  774. /package/dist/{chunk-FRD6LQF7.js.map → chunk-OV3W5AMN.js.map} +0 -0
  775. /package/dist/{chunk-QXRM5NMW.js.map → chunk-PQDYA3ZQ.js.map} +0 -0
  776. /package/dist/{chunk-HKR5R5YR.js.map → chunk-QFRR3ZRE.js.map} +0 -0
  777. /package/dist/{chunk-4LK5YFHF.js.map → chunk-QLKEA3WE.js.map} +0 -0
  778. /package/dist/{chunk-ECTOEM7X.js.map → chunk-QM7CXRSF.js.map} +0 -0
  779. /package/dist/{chunk-OYXRYWGU.js.map → chunk-QV6VZLS5.js.map} +0 -0
  780. /package/dist/{chunk-ISWFHYEZ.js.map → chunk-RTE32A22.js.map} +0 -0
  781. /package/dist/{chunk-ECCXTB5S.js.map → chunk-SB5DR4NL.js.map} +0 -0
  782. /package/dist/{chunk-4WFG5Y3A.js.map → chunk-SDUMZTIK.js.map} +0 -0
  783. /package/dist/{chunk-ZLWEUYPT.js.map → chunk-TYLCIGGN.js.map} +0 -0
  784. /package/dist/{chunk-MRZUZDRA.js.map → chunk-UHZDDPUU.js.map} +0 -0
  785. /package/dist/{chunk-Z7RFFJXU.js.map → chunk-UW6GRHZ4.js.map} +0 -0
  786. /package/dist/{chunk-LTY7WOAT.js.map → chunk-UYA5LCAR.js.map} +0 -0
  787. /package/dist/{chunk-CDCNBN6G.js.map → chunk-V7CB5D7A.js.map} +0 -0
  788. /package/dist/{chunk-ZG7EBTHK.js.map → chunk-VBUDRJJG.js.map} +0 -0
  789. /package/dist/{chunk-6V7ITU5F.js.map → chunk-VVWZ4BOI.js.map} +0 -0
  790. /package/dist/{chunk-ZJLJHQWM.js.map → chunk-W3K3N275.js.map} +0 -0
  791. /package/dist/{chunk-OKM4ACTA.js.map → chunk-WENNRY5E.js.map} +0 -0
  792. /package/dist/{chunk-Q7GK35TB.js.map → chunk-Z4R7TCTB.js.map} +0 -0
  793. /package/dist/{chunk-P5FHYGJK.js.map → chunk-ZFNEHOW4.js.map} +0 -0
  794. /package/dist/{chunk-HULTLO4D.js.map → chunk-ZLEGHQOO.js.map} +0 -0
  795. /package/dist/{cohort-X327AG3O.js.map → cohort-TLSGXKV5.js.map} +0 -0
  796. /package/dist/{cohortSunburst-GNWIVDNA.js.map → cohortSunburst-TNMXPHJW.js.map} +0 -0
  797. /package/dist/{condition-3M4L2HIM.js.map → condition-NN7YK7AI.js.map} +0 -0
  798. /package/dist/{controls-OKNHZJOU.js.map → controls-472G34VU.js.map} +0 -0
  799. /package/dist/{controls.config-FUKM5LEP.js.map → controls.config-2BQ7QYOB.js.map} +0 -0
  800. /package/dist/{correlation-PC4MXCFM.js.map → correlation-5UPYEHC6.js.map} +0 -0
  801. /package/dist/{customdata.inputui-HCRTX56R.js.map → customdata.inputui-EWYP4MRY.js.map} +0 -0
  802. /package/dist/{dataDownload-HJO7UW7S.js.map → dataDownload-X5UXBEK4.js.map} +0 -0
  803. /package/dist/{databrowser.ui-EY3H6B4S.js.map → databrowser.ui-PFHJKHIW.js.map} +0 -0
  804. /package/dist/{dictionary-L6CTMFY7.js.map → dictionary-M2MCNRN2.js.map} +0 -0
  805. /package/dist/{dnaMethylation-FEB5GGXK.js.map → dnaMethylation-A7AWG2P5.js.map} +0 -0
  806. /package/dist/{dnaMethylation.integration.spec-4DC6TJNZ.js.map → dnaMethylation.integration.spec-JWCMRFAM.js.map} +0 -0
  807. /package/dist/{dnaMethylation.unit.spec-REOHQOBC.js.map → dnaMethylation.unit.spec-PIVJBW7Z.js.map} +0 -0
  808. /package/dist/{dofetch-YFGOKCKV.js.map → dofetch-XID2XEJT.js.map} +0 -0
  809. /package/dist/{e2pca-QSAVTCPL.js.map → e2pca-VJRNE6BU.js.map} +0 -0
  810. /package/dist/{ep-LAFLKVSW.js.map → ep-BZE65IX2.js.map} +0 -0
  811. /package/dist/{expclust.gdc.spec-OM4J6WBL.js.map → expclust.gdc.spec-5BGBANUV.js.map} +0 -0
  812. /package/dist/{facet-WHTV2VIX.js.map → facet-RXUO4LRY.js.map} +0 -0
  813. /package/dist/{gb-DLXWWBB6.js.map → gb-NDRFDS5A.js.map} +0 -0
  814. /package/dist/{geneExpClustering-KB2MB2VM.js.map → geneExpClustering-ONJGTSGM.js.map} +0 -0
  815. /package/dist/{geneExpression-3D7PDZ2I.js.map → geneExpression-NXDXXKEA.js.map} +0 -0
  816. /package/dist/{geneExpression-3RSRGYGQ.js.map → geneExpression-PYI42HV6.js.map} +0 -0
  817. /package/dist/{geneExpression.unit.spec-EINAWLPR.js.map → geneExpression.unit.spec-PTFHHTP7.js.map} +0 -0
  818. /package/dist/{geneORA-J4KVSZT3.js.map → geneORA-SDR43UOL.js.map} +0 -0
  819. /package/dist/{geneRanking-HKLJ7CN6.js.map → geneRanking-QI43IRNV.js.map} +0 -0
  820. /package/dist/{geneVariant-3BRGRFPT.js.map → geneVariant-OT4V554H.js.map} +0 -0
  821. /package/dist/{geneVariant.integration.spec-3IBX4NNE.js.map → geneVariant.integration.spec-6OE4HKYB.js.map} +0 -0
  822. /package/dist/{genefusion.ui-OESQL7TW.js.map → genefusion.ui-IQDKCZPX.js.map} +0 -0
  823. /package/dist/{geneset-3BMV3KP4.js.map → geneset-TLZPZOQP.js.map} +0 -0
  824. /package/dist/{genomeBrowser.spec-I3WKAITC.js.map → genomeBrowser.spec-HIOTFKFK.js.map} +0 -0
  825. /package/dist/{grin2-5L2U32LY.js.map → grin2-G2PVFRKR.js.map} +0 -0
  826. /package/dist/{grin2-4BBCH3H5.js.map → grin2-RJQZRVFF.js.map} +0 -0
  827. /package/dist/{hierCluster-KM56NTN6.js.map → hierCluster-C6ICZSOB.js.map} +0 -0
  828. /package/dist/{hierCluster-XCJF5IQ6.js.map → hierCluster-MESFVAO7.js.map} +0 -0
  829. /package/dist/{hierCluster.config-E2EYOXX6.js.map → hierCluster.config-7HROWR2T.js.map} +0 -0
  830. /package/dist/{hierCluster.integration.spec-IIEJ2YEI.js.map → hierCluster.integration.spec-CJT22MJI.js.map} +0 -0
  831. /package/dist/{hierCluster.interactivity-AJFEJTGX.js.map → hierCluster.interactivity-MDX5QSEF.js.map} +0 -0
  832. /package/dist/{hierCluster.renderers-XKI344FM.js.map → hierCluster.renderers-SU5IYI33.js.map} +0 -0
  833. /package/dist/{imagePlot-3B3BXI6I.js.map → imagePlot-3Y5FNIJL.js.map} +0 -0
  834. /package/dist/{importPlot-JDVH7Q2Z.js.map → importPlot-WE5QSSFY.js.map} +0 -0
  835. /package/dist/{isoformExpression-UFHY5LB2.js.map → isoformExpression-TMLFOZVK.js.map} +0 -0
  836. /package/dist/{isoformExpression.unit.spec-U6GDCNQR.js.map → isoformExpression.unit.spec-MSVTQC3E.js.map} +0 -0
  837. /package/dist/{junction-W2STW5WW.js.map → junction-YKZV4LEL.js.map} +0 -0
  838. /package/dist/{launch.adhoc-KN7HFHJH.js.map → launch.adhoc-DS6UME2S.js.map} +0 -0
  839. /package/dist/{lollipop-EKIGAAK6.js.map → lollipop-ZKDAU3O5.js.map} +0 -0
  840. /package/dist/{maf-MK2MM7J4.js.map → maf-DKOORWGV.js.map} +0 -0
  841. /package/dist/{maftimeline-7RTMXWFA.js.map → maftimeline-EHJ2CWJJ.js.map} +0 -0
  842. /package/dist/{matrix-UM2EZODJ.js.map → matrix-7JDLGNU7.js.map} +0 -0
  843. /package/dist/{matrix-YBL4FZYJ.js.map → matrix-EB7YOLMN.js.map} +0 -0
  844. /package/dist/{matrix.cells-45ZFADK5.js.map → matrix.cells-A5E63KDN.js.map} +0 -0
  845. /package/dist/{matrix.config-QTBIRXKU.js.map → matrix.config-GSW2WJM4.js.map} +0 -0
  846. /package/dist/{matrix.data-WAMOLSKW.js.map → matrix.data-R4FW2PQH.js.map} +0 -0
  847. /package/dist/{matrix.groups-RXFXZABD.js.map → matrix.groups-3UH2KOIY.js.map} +0 -0
  848. /package/dist/{matrix.integration.spec-JZDZRVOK.js.map → matrix.integration.spec-R32TIABT.js.map} +0 -0
  849. /package/dist/{matrix.interactivity-P4VYGTB2.js.map → matrix.interactivity-RDPMBDVK.js.map} +0 -0
  850. /package/dist/{matrix.layout-WWPRXXHX.js.map → matrix.layout-FD275D3P.js.map} +0 -0
  851. /package/dist/{matrix.legend-4MCMVVKO.js.map → matrix.legend-SE7SQTNN.js.map} +0 -0
  852. /package/dist/{matrix.renderers-JQTUODDS.js.map → matrix.renderers-RK2BRCHZ.js.map} +0 -0
  853. /package/dist/{matrix.serieses-3IDRKSGO.js.map → matrix.serieses-BEZCQDLJ.js.map} +0 -0
  854. /package/dist/{matrix.sort-EAWOB56R.js.map → matrix.sort-KRNS4VPF.js.map} +0 -0
  855. /package/dist/{matrix.sort.unit.spec-FOWLULHA.js.map → matrix.sort.unit.spec-LZG3GOXM.js.map} +0 -0
  856. /package/dist/{matrix.sorterUi.unit.spec-U5CQDTMX.js.map → matrix.sorterUi.unit.spec-RR2KK4R5.js.map} +0 -0
  857. /package/dist/{matrix.unit.spec-VTLD4EOZ.js.map → matrix.unit.spec-3PK6LUNE.js.map} +0 -0
  858. /package/dist/{mavb-JIIXJHBK.js.map → mavb-CUPAESFH.js.map} +0 -0
  859. /package/dist/{mds.samplescatterplot-PTWA2V6E.js.map → mds.samplescatterplot-WGQ7A7UC.js.map} +0 -0
  860. /package/dist/{mds.survivalplot-XVZ66GP5.js.map → mds.survivalplot-ZEGSEJO2.js.map} +0 -0
  861. /package/dist/{multivalue-2H7QX7MG.js.map → multivalue-DKUQCROX.js.map} +0 -0
  862. /package/dist/{numericDictTermCluster-EHCDRT6J.js.map → numericDictTermCluster-IFIEM3E4.js.map} +0 -0
  863. /package/dist/{oncomatrix-RZLZUC32.js.map → oncomatrix-WSPJAWHW.js.map} +0 -0
  864. /package/dist/{oncomatrix.spec-Z5UQGTW2.js.map → oncomatrix.spec-LDWTZ7LO.js.map} +0 -0
  865. /package/dist/{plot.2dvaf-IRBZBJ6B.js.map → plot.2dvaf-N333YSMC.js.map} +0 -0
  866. /package/dist/{plot.app-I23IAZ3Z.js.map → plot.app-HU5RQS5I.js.map} +0 -0
  867. /package/dist/{plot.barplot-PYLRAZB7.js.map → plot.barplot-4T2UEIYX.js.map} +0 -0
  868. /package/dist/{plot.boxplot-VBWU7DUG.js.map → plot.boxplot-C4OXCRFB.js.map} +0 -0
  869. /package/dist/{plot.brainImaging-HDJMEMTK.js.map → plot.brainImaging-A6FEKFEA.js.map} +0 -0
  870. /package/dist/{plot.disco-5BVG3WMT.js.map → plot.disco-VDL7YKRX.js.map} +0 -0
  871. /package/dist/{plot.ssgq-S3BKXJMW.js.map → plot.ssgq-OII7PFPG.js.map} +0 -0
  872. /package/dist/{plot.vaf2cov-VD7DU2XR.js.map → plot.vaf2cov-RZ5JPWMC.js.map} +0 -0
  873. /package/dist/{polar2-PYLEVG7E.js.map → polar2-6KR2KX5D.js.map} +0 -0
  874. /package/dist/{profileForms-CI2YYD3Y.js.map → profileForms-YJDJIBSY.js.map} +0 -0
  875. /package/dist/{profilePlot-UCC4ZVHQ.js.map → profilePlot-U4U4AYMO.js.map} +0 -0
  876. /package/dist/{proteomeCohortCompare-2VUSLC6I.js.map → proteomeCohortCompare-QCXKLAWG.js.map} +0 -0
  877. /package/dist/{pseudbulk.unit.spec-VPZWNTIA.js.map → pseudbulk.unit.spec-3A2FWQZI.js.map} +0 -0
  878. /package/dist/{pseudobulk-RUXGZ7OY.js.map → pseudobulk-WB6NXFJ6.js.map} +0 -0
  879. /package/dist/{qualitative-3AVR4GRX.js.map → qualitative-CQUBCCGT.js.map} +0 -0
  880. /package/dist/{qualitative-5QNBKDOZ.js.map → qualitative-QQ3CWFVP.js.map} +0 -0
  881. /package/dist/{radar2-AOYMS54Y.js.map → radar2-FNC67FNX.js.map} +0 -0
  882. /package/dist/{radarFacility2-PP2MAXIP.js.map → radarFacility2-3X77B4WP.js.map} +0 -0
  883. /package/dist/{render-ASLVKYEX.js.map → render-G5NCZTMW.js.map} +0 -0
  884. /package/dist/{report-UVYKDMQC.js.map → report-CR645KQ4.js.map} +0 -0
  885. /package/dist/{sampleView-6UHR7FSR.js.map → sampleView-6PG2HJZL.js.map} +0 -0
  886. /package/dist/{samplelst-ABC2CCNN.js.map → samplelst-FCQ7YPPQ.js.map} +0 -0
  887. /package/dist/{samplematrix-36UCHZLC.js.map → samplematrix-GXMN5QTS.js.map} +0 -0
  888. /package/dist/{sc-XLSAM725.js.map → sc-4ZTSQOXC.js.map} +0 -0
  889. /package/dist/{scatter-ADOBAOW2.js.map → scatter-2PUQU22I.js.map} +0 -0
  890. /package/dist/{scatter-ZNVLI627.js.map → scatter-ZSZTA37T.js.map} +0 -0
  891. /package/dist/{selectGenomeWithTklst-DPDBDYTR.js.map → selectGenomeWithTklst-XHWBEM2G.js.map} +0 -0
  892. /package/dist/{singleCellCellType-STVPYZD4.js.map → singleCellCellType-NP7Y4N6Z.js.map} +0 -0
  893. /package/dist/{singleCellCellType.unit.spec-ZLY37AXL.js.map → singleCellCellType.unit.spec-5I3FECB4.js.map} +0 -0
  894. /package/dist/{singleCellGeneExpression-PCGLU35S.js.map → singleCellGeneExpression-7RWH633E.js.map} +0 -0
  895. /package/dist/{singleCellGeneExpression.unit.spec-PSLKK362.js.map → singleCellGeneExpression.unit.spec-2X2BDTNO.js.map} +0 -0
  896. /package/dist/{singleCellNumericValue-SR3SJEOB.js.map → singleCellNumericValue-I6V4ME6T.js.map} +0 -0
  897. /package/dist/{singleCellNumericValue.unit.spec-PXVXJ4HJ.js.map → singleCellNumericValue.unit.spec-4HKAJXB3.js.map} +0 -0
  898. /package/dist/{singleCellPlot-JXB7M6OH.js.map → singleCellPlot-QRFR3AJH.js.map} +0 -0
  899. /package/dist/{singlecell-PH55NFRX.js.map → singlecell-AQEAB445.js.map} +0 -0
  900. /package/dist/{singlecell-EDSX56QO.js.map → singlecell-DX4EXNUV.js.map} +0 -0
  901. /package/dist/{snp-3VEYBTAQ.js.map → snp-2URSYPBL.js.map} +0 -0
  902. /package/dist/{snp.unit.spec-V7OB44US.js.map → snp.unit.spec-ZV2RCDT4.js.map} +0 -0
  903. /package/dist/{snplocus-HX67RBT5.js.map → snplocus-BB4I2QIP.js.map} +0 -0
  904. /package/dist/{snplst-H5YXCY33.js.map → snplst-A5S7CQEM.js.map} +0 -0
  905. /package/dist/{spliceevent.a53ss.diagram-DBDEEHSK.js.map → spliceevent.a53ss.diagram-6C4OQOVF.js.map} +0 -0
  906. /package/dist/{spliceevent.exonskip.diagram-EYEL6BY6.js.map → spliceevent.exonskip.diagram-FKSR3JEL.js.map} +0 -0
  907. /package/dist/{spliceevent.noeventdiagram-64OEXK7U.js.map → spliceevent.noeventdiagram-G3JQUZKK.js.map} +0 -0
  908. /package/dist/{ssGSEA-3YWQH6KM.js.map → ssGSEA-KLMOSI53.js.map} +0 -0
  909. /package/dist/{ssGSEA.unit.spec-23V2IXP5.js.map → ssGSEA.unit.spec-HBALWLVB.js.map} +0 -0
  910. /package/dist/{stattable-GPSBCNYC.js.map → stattable-ZCMPIC3I.js.map} +0 -0
  911. /package/dist/{studyCatalog-W5PATRNY.js.map → studyCatalog-UZ4BSYY6.js.map} +0 -0
  912. /package/dist/{summarizeCnvGeneexp-YGI23QH5.js.map → summarizeCnvGeneexp-Z43GYKZB.js.map} +0 -0
  913. /package/dist/{summarizeGeneexpSurvival-KQ6OLWYR.js.map → summarizeGeneexpSurvival-4OHRMCFV.js.map} +0 -0
  914. /package/dist/{summarizeMutationCnv-XDHBNEPU.js.map → summarizeMutationCnv-EZXMLADC.js.map} +0 -0
  915. /package/dist/{summarizeMutationDiagnosis-VKIJRJ2Q.js.map → summarizeMutationDiagnosis-RPQP4TM5.js.map} +0 -0
  916. /package/dist/{summarizeMutationSurvival-57YKJGLE.js.map → summarizeMutationSurvival-LX4TRGJZ.js.map} +0 -0
  917. /package/dist/{summary-4WQOVIUF.js.map → summary-FZQVK5KR.js.map} +0 -0
  918. /package/dist/{summary.integration.spec-FRNWBU7F.js.map → summary.integration.spec-46T65LR5.js.map} +0 -0
  919. /package/dist/{summaryInput-X7DS2YA7.js.map → summaryInput-BHU7G5FC.js.map} +0 -0
  920. /package/dist/{sunburst-MSGTXYMM.js.map → sunburst-A5NS3KJQ.js.map} +0 -0
  921. /package/dist/{sunburst-3OEAQA3O.js.map → sunburst-R5X2C7FK.js.map} +0 -0
  922. /package/dist/{survival-5KC5CNZU.js.map → survival-MKW5J5ZH.js.map} +0 -0
  923. /package/dist/{survival-QXDS6N46.js.map → survival-N2NKMVOV.js.map} +0 -0
  924. /package/dist/{survival.integration.spec-PKENHLTZ.js.map → survival.integration.spec-K5FMOOTF.js.map} +0 -0
  925. /package/dist/{svgraph-VJLB7BBN.js.map → svgraph-3WRCJA5D.js.map} +0 -0
  926. /package/dist/{swimmer-R3DN7N36.js.map → swimmer-XV5KVWEM.js.map} +0 -0
  927. /package/dist/{table-YF5VORU6.js.map → table-XUGFZSGV.js.map} +0 -0
  928. /package/dist/{termCollection-KSHVOPS5.js.map → termCollection-23ZRHZHF.js.map} +0 -0
  929. /package/dist/{termCollection-3KGLZFDW.js.map → termCollection-NWTAUSSW.js.map} +0 -0
  930. /package/dist/{termCollection.unit.spec-HTBDG5PL.js.map → termCollection.unit.spec-WE3JMSUI.js.map} +0 -0
  931. /package/dist/{termCollectionFractionSelection-MK4NKWUX.js.map → termCollectionFractionSelection-5FLFLMIY.js.map} +0 -0
  932. /package/dist/{termCollectionFractionSelection.unit.spec-AMF32FDN.js.map → termCollectionFractionSelection.unit.spec-CCFGGXAA.js.map} +0 -0
  933. /package/dist/{tk-Z54DOECH.js.map → tk-F3TSB4IB.js.map} +0 -0
  934. /package/dist/{tp.ui-M4TZVT53.js.map → tp.ui-4QDX3FGM.js.map} +0 -0
  935. /package/dist/{tvs.categorical-HY3BWCZR.js.map → tvs.categorical-24OT3XZI.js.map} +0 -0
  936. /package/dist/{tvs.condition-Y36TRIX4.js.map → tvs.condition-X4SXCVGN.js.map} +0 -0
  937. /package/dist/{tvs.dt-XKVJZP7Y.js.map → tvs.dt-FRBJRSWI.js.map} +0 -0
  938. /package/dist/{tvs.dtcnv.categorical-OMRZR4Y7.js.map → tvs.dtcnv.categorical-4RRSO735.js.map} +0 -0
  939. /package/dist/{tvs.dtcnv.continuous-AGYOBI5K.js.map → tvs.dtcnv.continuous-HXY2PBUA.js.map} +0 -0
  940. /package/dist/{tvs.dtfusion-2JX5Y2IH.js.map → tvs.dtfusion-67LXBQA4.js.map} +0 -0
  941. /package/dist/{tvs.dtitd-SDSLBBWC.js.map → tvs.dtitd-MCJZCNV2.js.map} +0 -0
  942. /package/dist/{tvs.dtsnvindel-LI7K464K.js.map → tvs.dtsnvindel-K5YIIBQJ.js.map} +0 -0
  943. /package/dist/{tvs.dtsv-VRCLX7QY.js.map → tvs.dtsv-RP7FUB2N.js.map} +0 -0
  944. /package/dist/{tvs.multivalue-4OTY6J2S.js.map → tvs.multivalue-CROMWUCP.js.map} +0 -0
  945. /package/dist/{tvs.numeric-CDATYOR2.js.map → tvs.numeric-IYYYV6ZJ.js.map} +0 -0
  946. /package/dist/{tvs.samplelst-76JOJG2M.js.map → tvs.samplelst-5DXKRFYM.js.map} +0 -0
  947. /package/dist/{tvs.survival-WTFJOKIZ.js.map → tvs.survival-W5RXODBT.js.map} +0 -0
  948. /package/dist/{tvs.termCollection-QQXAS7PE.js.map → tvs.termCollection-OSJYIWDX.js.map} +0 -0
  949. /package/dist/{vocabulary-6ACAEFTL.js.map → vocabulary-HTRYJUD7.js.map} +0 -0
@@ -0,0 +1,3445 @@
1
+ import {
2
+ renderEventImages
3
+ } from "./chunk-LVFWXUUX.js";
4
+ import {
5
+ InvalidDataUI,
6
+ PlotBase,
7
+ configUiInit,
8
+ fillbar,
9
+ getMaxLabelWidth,
10
+ getNormalRoot,
11
+ renderTable,
12
+ svgLegend,
13
+ table2col
14
+ } from "./chunk-CXCAQOFB.js";
15
+ import "./chunk-HJ6L54YS.js";
16
+ import "./chunk-ILAYJZBC.js";
17
+ import {
18
+ Menu
19
+ } from "./chunk-CNFTQSNE.js";
20
+ import "./chunk-DOC3HBOV.js";
21
+ import "./chunk-TVJOSRCH.js";
22
+ import {
23
+ topBarInit
24
+ } from "./chunk-3CIL7KH7.js";
25
+ import "./chunk-T4XPCSLP.js";
26
+ import {
27
+ dofetch3
28
+ } from "./chunk-VVWZ4BOI.js";
29
+ import "./chunk-W5J3LTYS.js";
30
+ import "./chunk-2IAELUCN.js";
31
+ import "./chunk-CFYWQJ7F.js";
32
+ import {
33
+ arc_default,
34
+ bplen,
35
+ dtcnv,
36
+ dtfusionrna,
37
+ dtitd,
38
+ dtloh,
39
+ dtsnvindel,
40
+ dtsv,
41
+ line_default,
42
+ mclass,
43
+ mclassitd,
44
+ pie_default,
45
+ ribbon_default
46
+ } from "./chunk-2N345NXD.js";
47
+ import {
48
+ copyMerge,
49
+ getCompInit,
50
+ multiInit
51
+ } from "./chunk-HBNB5TRH.js";
52
+ import "./chunk-PF4DSFDR.js";
53
+ import {
54
+ linear,
55
+ ticks
56
+ } from "./chunk-4OLM3KSB.js";
57
+ import "./chunk-PWYMHUXY.js";
58
+ import "./chunk-TLT4YIG3.js";
59
+ import "./chunk-5R63Q5KH.js";
60
+ import {
61
+ pointer_default,
62
+ select_default
63
+ } from "./chunk-I6Y4O3RR.js";
64
+ import "./chunk-Q5RDQNIT.js";
65
+ import "./chunk-HS5PO5ZQ.js";
66
+
67
+ // plots/disco/arc/FullArcRenderer.ts
68
+ var FullArcRenderer = class {
69
+ constructor(radius, width, color) {
70
+ this.radius = radius;
71
+ this.width = width;
72
+ this.color = color;
73
+ }
74
+ render(holder) {
75
+ const donutGenerator = arc_default();
76
+ const arc = {
77
+ startAngle: 0,
78
+ endAngle: Math.PI * 2,
79
+ innerRadius: this.radius,
80
+ outerRadius: this.radius + this.width,
81
+ color: this.color,
82
+ text: "No label"
83
+ };
84
+ const array = [];
85
+ array.push(arc);
86
+ const donutArc = holder.append("g");
87
+ donutArc.selectAll("path").data(array).enter().append("path").attr("d", (d) => donutGenerator(d)).attr("fill", (d) => d.color);
88
+ }
89
+ };
90
+
91
+ // plots/disco/menu/MenuProvider.ts
92
+ var MenuProvider = class {
93
+ static create() {
94
+ const menu = new Menu({ padding: 5 });
95
+ menu.d.style("border", "1px solid #FFF").style("position", "absolute").style("z-index", 1001);
96
+ return menu;
97
+ }
98
+ };
99
+
100
+ // plots/disco/fusion/FusionColorProvider.ts
101
+ var FusionColorProvider = class {
102
+ static getColor(chrA, chrB) {
103
+ if (chrA != chrB) {
104
+ return "#6A3D9A" /* Interchromosomal */.valueOf();
105
+ } else {
106
+ return "#1B9E77" /* Intrachromosomal */.valueOf();
107
+ }
108
+ }
109
+ };
110
+
111
+ // plots/disco/fusion/FusionRenderer.ts
112
+ var FusionRenderer = class {
113
+ constructor(genome, context = {}) {
114
+ this.genome = genome;
115
+ this.context = context;
116
+ }
117
+ render(holder, fusions, opacity = 1) {
118
+ let radius = 0;
119
+ const fusionsWithTarget = fusions.filter((f) => f.target);
120
+ if (fusionsWithTarget.length > 0) {
121
+ radius = fusionsWithTarget[0].target.radius;
122
+ const fullArcRenderer = new FullArcRenderer(radius, 2, "#6464641A");
123
+ fullArcRenderer.render(holder);
124
+ } else return;
125
+ const ribbon = ribbon_default().radius(radius);
126
+ const ribbons = holder.selectAll(".chord").data(fusions);
127
+ const menu = MenuProvider.create();
128
+ const createTooltip = this.createTooltip.bind(this);
129
+ const showEvents = this.showEvents.bind(this);
130
+ ribbons.enter().append("path").attr("class", "chord").attr("d", ribbon).attr("fill", (fusion) => {
131
+ return FusionColorProvider.getColor(
132
+ fusion.source.positionInChromosome.chromosome,
133
+ fusion.target.positionInChromosome.chromosome
134
+ );
135
+ }).style("opacity", opacity).each(function(d) {
136
+ const path = select_default(this);
137
+ const tip = MenuProvider.create();
138
+ path.on("click", function(event) {
139
+ menu.clear().hide();
140
+ tip.clear().show(event.x, event.y);
141
+ showEvents(tip.d.append("div"), getOverlappingFusions(fusions, d));
142
+ });
143
+ }).on("mouseover", function(mouseEvent, fusion) {
144
+ const table = table2col({ holder: menu.d });
145
+ createTooltip(table, getOverlappingFusions(fusions, fusion));
146
+ menu.show(mouseEvent.x, mouseEvent.y);
147
+ }).on("mouseout", () => {
148
+ menu.clear();
149
+ menu.hide();
150
+ });
151
+ }
152
+ createTooltip(table, events) {
153
+ {
154
+ const [td1, td2] = table.addRow();
155
+ td1.text("Data type");
156
+ td2.append("span").style("margin-left", "5px").text("Fusion transcript");
157
+ }
158
+ for (const fusion of events) {
159
+ const [td1, td2] = table.addRow();
160
+ td1.text("Position");
161
+ td2.append("span").style("margin-left", "5px").text(fusionText(fusion));
162
+ }
163
+ }
164
+ showEvents(holder, events) {
165
+ if (events.length == 1) return this.showEvent(holder, events[0]);
166
+ holder.selectAll("*").remove();
167
+ holder.append("div").style("padding", "5px").style("font-size", "0.85em").style("opacity", 0.7).text(`${events.length} fusion events, select one:`);
168
+ for (const fusion of events) {
169
+ holder.append("div").attr("class", "sja_menuoption").attr("data-testid", "sjpp-disco-fusion-option").text(fusionText(fusion)).on("click", () => this.showEvent(holder, fusion, () => this.showEvents(holder, events)));
170
+ }
171
+ }
172
+ async showEvent(holder, fusion, back) {
173
+ holder.selectAll("*").remove();
174
+ if (back) {
175
+ holder.append("div").attr("class", "sja_menuoption").style("display", "inline-block").text("\xAB All events").on("click", back);
176
+ }
177
+ holder.append("div").style("padding", "5px").text(fusionText(fusion));
178
+ const graph = holder.append("div");
179
+ if (this.context.eventImages && this.context.dslabel && fusion.eventImage) {
180
+ const section = holder.append("div").attr("data-testid", "sjpp-disco-event-images").style("margin", "10px 5px");
181
+ section.append("div").style("font-weight", "bold").text(this.context.eventImages.label);
182
+ this.showEventImages(section, fusion);
183
+ }
184
+ try {
185
+ await makeSvgraph(fusion, graph, this.genome);
186
+ } catch (e) {
187
+ graph.text("Error: " + (e.message || e));
188
+ }
189
+ }
190
+ async showEventImages(section, fusion) {
191
+ const content = section.append("div").text("Loading...");
192
+ try {
193
+ const body = { genome: this.genome.name, dslabel: this.context.dslabel, eventImage: fusion.eventImage };
194
+ const data = await dofetch3("termdb/mds3/eventImage", { body });
195
+ if (data.error) throw data.error;
196
+ const images = data.images;
197
+ if (!Array.isArray(images)) throw "images[] not array from return";
198
+ if (!images.length) return section.remove();
199
+ renderEventImages(content, images);
200
+ } catch (e) {
201
+ content.text("Error: " + (e.message || e));
202
+ }
203
+ }
204
+ };
205
+ function fusionText(fusion) {
206
+ return `${sideText(fusion.source)} > ${sideText(fusion.target)}`;
207
+ }
208
+ function sideText(side) {
209
+ const p = side.positionInChromosome;
210
+ return `${side.gene || ""} ${p.chromosome}:${p.position} ${side.strand === "+" ? "forward" : "reverse"}`;
211
+ }
212
+ function getOverlappingFusions(fusions, fusion) {
213
+ if (!fusion.target) return [fusion];
214
+ const overlaps = (x, y) => x.startAngle < y.endAngle && y.startAngle < x.endAngle;
215
+ return fusions.filter(
216
+ (f) => f == fusion || f.target && (overlaps(f.source, fusion.source) && overlaps(f.target, fusion.target) || overlaps(f.source, fusion.target) && overlaps(f.target, fusion.source))
217
+ );
218
+ }
219
+ async function makeSvgraph(fusion, div, genome) {
220
+ const wait = div.append("div").text("Loading...");
221
+ const svpair = {
222
+ a: {
223
+ chr: fusion.source.positionInChromosome.chromosome,
224
+ position: fusion.source.positionInChromosome.position,
225
+ strand: fusion.source.strand
226
+ },
227
+ b: {
228
+ chr: fusion.target.positionInChromosome.chromosome,
229
+ position: fusion.target.positionInChromosome.position,
230
+ strand: fusion.target.strand
231
+ }
232
+ };
233
+ await getGm(svpair.a, genome.name, fusion.source.gene);
234
+ await getGm(svpair.b, genome.name, fusion.target.gene);
235
+ wait.remove();
236
+ const _ = await import("./svgraph-3WRCJA5D.js");
237
+ _.default({
238
+ pairlst: [svpair],
239
+ genome,
240
+ holder: div
241
+ });
242
+ }
243
+ async function getGm(p, genome, name) {
244
+ const d = await dofetch3("isoformbycoord", {
245
+ body: { genome, chr: p.chr, pos: p.position }
246
+ });
247
+ if (d.error) throw d.error;
248
+ const u = d.lst.find((i) => i.isdefault && name === i.name) || d.lst[0];
249
+ if (u) {
250
+ p.name = u.name;
251
+ p.gm = { isoform: u.isoform };
252
+ }
253
+ }
254
+
255
+ // plots/disco/DiscoRenderer.ts
256
+ var DiscoRenderer = class {
257
+ constructor(renders, legendRenderer, genome, fusionContext = {}) {
258
+ this.renders = renders;
259
+ this.legendRenderer = legendRenderer;
260
+ this.fusionRenderer = new FusionRenderer(genome, fusionContext);
261
+ }
262
+ render(holder, viewModel, onCnvSourceSelect) {
263
+ const svgDiv = holder.append("div").style("display", "inline-block").style("font-family", "Arial");
264
+ 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);
265
+ const mainG = svg.append("g").attr("class", "mainG").attr(
266
+ "transform",
267
+ `translate(${viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 100},${viewModel.height / 2})`
268
+ );
269
+ for (const [ringType, renderer] of this.renders) {
270
+ const elements = viewModel.getElements(ringType);
271
+ const collisions = viewModel.getCollisions(ringType);
272
+ renderer.render(mainG, elements, collisions);
273
+ }
274
+ this.fusionRenderer.render(mainG, viewModel.fusions, viewModel.settings.Disco.fusionOpacity);
275
+ if (viewModel.settings.Disco.centerText) {
276
+ const chrRingBbox = mainG.select('[data-testid="sjpp_chromosomes_arc_group"]').node().getBBox();
277
+ const text = viewModel.settings.Disco.centerText.length > 20 ? viewModel.settings.Disco.centerText.slice(0, 20) + "..." : viewModel.settings.Disco.centerText;
278
+ const textElem = mainG.append("text").attr("class", "sjpp-disco-center-text").text(text);
279
+ const textBbox = textElem.node().getBBox();
280
+ textElem.attr("transform", `translate(${chrRingBbox.x + chrRingBbox.width / 2 - textBbox.width / 2},0)`);
281
+ }
282
+ this.legendRenderer.render(
283
+ mainG,
284
+ viewModel.legend,
285
+ -1 * (viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 75),
286
+ viewModel.width,
287
+ viewModel.height / 2,
288
+ viewModel,
289
+ onCnvSourceSelect
290
+ );
291
+ }
292
+ };
293
+
294
+ // plots/disco/interactions/DiscoInteractions.ts
295
+ var DiscoInteractions = class {
296
+ constructor(discoApp) {
297
+ this.discoApp = discoApp;
298
+ this.downloadClickListener = (svg) => {
299
+ const downloadImgName = this.discoApp.state.settings.downloadImgName || "disco.plot";
300
+ const a = document.createElement("a");
301
+ document.body.appendChild(a);
302
+ a.addEventListener(
303
+ "click",
304
+ () => {
305
+ const serializer = new XMLSerializer();
306
+ const svg_blob = new Blob([serializer.serializeToString(svg)], {
307
+ type: "image/svg+xml"
308
+ });
309
+ a.download = downloadImgName + ".svg";
310
+ a.href = URL.createObjectURL(svg_blob);
311
+ document.body.removeChild(a);
312
+ },
313
+ false
314
+ );
315
+ a.click();
316
+ };
317
+ this.geneClickListener = async (gene, mnames) => {
318
+ const { filter, filter0 } = this.discoApp.app.getState().termfilter;
319
+ const arg = {
320
+ holder: this.discoApp.app.opts.holder,
321
+ genome: this.discoApp.app.opts.state.args.genome,
322
+ nobox: true,
323
+ query: gene,
324
+ tklst: [
325
+ {
326
+ type: "mds3",
327
+ dslabel: this.discoApp.app.opts.state.vocab.dslabel,
328
+ hlaachange: mnames.join(","),
329
+ filter0,
330
+ filterObj: getNormalRoot(filter)
331
+ // must not pass filter as frozen. pass unfrozen, normalized copy so mds3 code will work
332
+ }
333
+ ]
334
+ };
335
+ const _ = await import("./block.init-SSWOFFJR.js");
336
+ await _.default(arg);
337
+ };
338
+ this.colorScaleNumericInputsCallback = async (obj) => {
339
+ const callAppDispatch = (settings) => {
340
+ this.discoApp.app.dispatch({
341
+ type: "plot_edit",
342
+ id: this.discoApp.id,
343
+ config: { settings: { Disco: Object.assign({ cnvCutoffMode: obj.cutoffMode }, settings) } }
344
+ });
345
+ };
346
+ if (obj.cutoffMode == "auto") {
347
+ if (obj.min == null || obj.max == null)
348
+ throw new Error('Color scale must return min and max if cutoffMode "auto"');
349
+ callAppDispatch({
350
+ cnvCapping: this.discoApp.state.settings.cnv.capping,
351
+ cnvPercentile: this.discoApp.state.settings.cnv.percentile
352
+ });
353
+ } else if (obj.cutoffMode == "fixed") {
354
+ if (obj.min == null || obj.max == null)
355
+ throw new Error('Color scale must return min and max if cutoffMode "fixed"');
356
+ const diffValue = obj.max !== this.discoApp.state.settings.cnv.capping ? obj.max : Math.abs(obj.min);
357
+ callAppDispatch({
358
+ cnvCapping: diffValue
359
+ });
360
+ } else if (obj.cutoffMode == "percentile") callAppDispatch({ cnvPercentile: obj.percentile });
361
+ else throw new Error("Unknown cutoff mode returned from dom/ColorScale");
362
+ };
363
+ this.onMutationWaterfallColorChange = (color) => {
364
+ this.discoApp.app.dispatch({
365
+ type: "plot_edit",
366
+ id: this.discoApp.id,
367
+ config: { settings: { Disco: { mutationWaterfallColor: color } } }
368
+ });
369
+ };
370
+ }
371
+ };
372
+
373
+ // plots/disco/chromosome/Reference.ts
374
+ var Reference = class {
375
+ /**
376
+ * Creates a Reference object that contains information about chromosomes.
377
+ * @param settings State settings
378
+ * @param chromosomes Chromosome order. This function formats into an obj with `chr` removed.
379
+ * @param chromosomeOverride Obj of chromsome keys and sizes. Filtered to remove hidden chromosomes in settings.
380
+ */
381
+ constructor(settings, chromosomes, chromosomeOverride) {
382
+ this.chromosomes = [];
383
+ this.chromosomesOrder = [];
384
+ this.keysArray = [];
385
+ this.totalSizeArray = [];
386
+ this.chrSizesArray = [];
387
+ const chrSizes = chromosomeOverride || chromosomes;
388
+ this.settings = settings;
389
+ this.chromosomesOrder = [];
390
+ let totalSize = 0;
391
+ this.totalPadAngle = Object.keys(chrSizes).length * this.settings.padAngle;
392
+ this.totalChromosomesAngle = 2 * Math.PI - this.totalPadAngle;
393
+ for (const chr in chrSizes) {
394
+ const key = chr.slice(0, 3) === "chr" ? chr.slice(3) : chr;
395
+ this.chromosomesOrder.push(chr);
396
+ this.keysArray.push(key);
397
+ this.totalSizeArray.push(totalSize);
398
+ this.chrSizesArray.push(chrSizes[chr]);
399
+ totalSize += chrSizes[chr];
400
+ }
401
+ this.totalSize = totalSize;
402
+ let lastAngle = 0;
403
+ for (let i = 0; i < this.keysArray.length; i++) {
404
+ const chromosomeAngle = this.totalChromosomesAngle * (this.chrSizesArray[i] / totalSize);
405
+ const startAngle = i == 0 ? this.settings.padAngle / 2 : lastAngle + this.settings.padAngle;
406
+ const endAngle = i == 0 ? this.settings.padAngle / 2 + chromosomeAngle : lastAngle + this.settings.padAngle + chromosomeAngle;
407
+ const chromosome = {
408
+ start: this.totalSizeArray[i],
409
+ size: this.chrSizesArray[i],
410
+ factor: 1,
411
+ startAngle,
412
+ endAngle,
413
+ angle: (startAngle + endAngle) / 2,
414
+ innerRadius: this.settings.rings.chromosomeInnerRadius,
415
+ outerRadius: this.settings.rings.chromosomeInnerRadius + this.settings.rings.chromosomeWidth,
416
+ color: "#AAA",
417
+ text: this.keysArray[i]
418
+ };
419
+ this.chromosomes.push(chromosome);
420
+ if (chromosome.endAngle != null) {
421
+ lastAngle = chromosome.endAngle;
422
+ }
423
+ }
424
+ }
425
+ };
426
+
427
+ // plots/disco/data/DataObjectMapper.ts
428
+ var DataObjectMapper = class {
429
+ constructor(sampleName, prioritizedGenes) {
430
+ this.sampleName = sampleName;
431
+ this.prioritizedGenes = prioritizedGenes;
432
+ }
433
+ map(dObject) {
434
+ return {
435
+ dt: dObject.dt,
436
+ mname: dObject.mname,
437
+ mClass: dObject.class,
438
+ gene: dObject.gene,
439
+ chr: dObject.chr,
440
+ ref: dObject.ref,
441
+ alt: dObject.alt,
442
+ vafs: dObject.vafs,
443
+ position: dObject.pos ? dObject.pos : dObject.position,
444
+ poschr: dObject.poschr,
445
+ posbins: dObject.posbins,
446
+ poslabel: dObject.poslabel,
447
+ sampleName: this.sampleName,
448
+ ssm_id: dObject.ssm_id,
449
+ start: dObject.start,
450
+ stop: dObject.stop,
451
+ value: dObject.value,
452
+ segmean: dObject.segmean,
453
+ isPrioritized: this.prioritizedGenes.some((cancerGene) => cancerGene == dObject.gene),
454
+ chrA: dObject.chrA,
455
+ chrB: dObject.chrB,
456
+ geneA: dObject.geneA,
457
+ geneB: dObject.geneB,
458
+ posA: dObject.posA,
459
+ posB: dObject.posB,
460
+ strandA: dObject.strandA,
461
+ strandB: dObject.strandB,
462
+ eventImage: dObject.eventImage
463
+ };
464
+ }
465
+ };
466
+
467
+ // plots/disco/data/PercentileMapper.ts
468
+ var PercentileMapper = class {
469
+ map(data, percentile) {
470
+ return this.calculatePercentileForPositivesAndNegatives(data, percentile);
471
+ }
472
+ calculatePercentileForPositivesAndNegatives(data, percentile) {
473
+ const positives = data.filter((x) => x > 0);
474
+ const negatives = data.filter((x) => x < 0).map((x) => -1 * x);
475
+ let positive = NaN;
476
+ let negative = NaN;
477
+ if (positives.length > 0) {
478
+ positive = this.calculatePercentile(positives, percentile);
479
+ }
480
+ if (negatives.length > 0) {
481
+ negative = -1 * this.calculatePercentile(negatives, percentile);
482
+ }
483
+ return { positive, negative };
484
+ }
485
+ calculatePercentile(data, percentile) {
486
+ if (data.length === 0) {
487
+ throw new Error("Array must contain at least one element.");
488
+ }
489
+ const sortedValues = data.sort((a, b) => a - b);
490
+ const index = percentile / 100 * (sortedValues.length - 1);
491
+ const lowerIndex = Math.floor(index);
492
+ const upperIndex = Math.ceil(index);
493
+ const fraction = index - lowerIndex;
494
+ if (lowerIndex === upperIndex) {
495
+ return sortedValues[lowerIndex];
496
+ }
497
+ return sortedValues[lowerIndex] + fraction * (sortedValues[upperIndex] - sortedValues[lowerIndex]);
498
+ }
499
+ };
500
+
501
+ // plots/disco/snv/vafTooltip.ts
502
+ function getIntegerCount(v) {
503
+ if (Number.isInteger(v)) return v;
504
+ if (typeof v == "string" && /^-?\d+$/.test(v)) {
505
+ const n = Number(v);
506
+ if (Number.isInteger(n)) return n;
507
+ }
508
+ return null;
509
+ }
510
+ function getReadCounts(refCountValue, altCountValue, totalCountValue) {
511
+ const altCount = getIntegerCount(altCountValue);
512
+ if (altCount == null || altCount < 0) return null;
513
+ const totalCount = getIntegerCount(totalCountValue);
514
+ if (totalCount != null) {
515
+ if (totalCount <= 0 || totalCount < altCount) return null;
516
+ return { altCount, refCount: totalCount - altCount, totalCount };
517
+ }
518
+ const refCount = getIntegerCount(refCountValue);
519
+ if (refCount == null || refCount < 0 || refCount + altCount <= 0) return null;
520
+ return { altCount, refCount, totalCount: refCount + altCount };
521
+ }
522
+ function hasValidReadCounts(refCountValue, altCountValue, totalCountValue) {
523
+ return getReadCounts(refCountValue, altCountValue, totalCountValue) != null;
524
+ }
525
+ function getVafEntries(vafs) {
526
+ const entries = [];
527
+ if (Array.isArray(vafs)) {
528
+ for (const vaf of vafs) {
529
+ const label = vaf?.id || vaf?.name;
530
+ const refCount = vaf?.refCount;
531
+ const totalCount = vaf?.totalCount;
532
+ const altCount = vaf?.altCount;
533
+ if (!label || altCount == null || refCount == null && totalCount == null) continue;
534
+ const entry = { label, altCount };
535
+ if (refCount != null) entry.refCount = refCount;
536
+ if (totalCount != null) entry.totalCount = totalCount;
537
+ entries.push(entry);
538
+ }
539
+ }
540
+ return entries;
541
+ }
542
+ function getNumericFraction(v) {
543
+ if (typeof v != "number" && typeof v != "string") return null;
544
+ const n = Number(v);
545
+ return Number.isFinite(n) && n >= 0 && n <= 1 ? n : null;
546
+ }
547
+ function getMutationFractions(vafs) {
548
+ const fractions = [];
549
+ if (!Array.isArray(vafs)) return fractions;
550
+ for (const vaf of vafs) {
551
+ const explicitFraction = getNumericFraction(vaf?.fraction ?? vaf?.mutationFraction);
552
+ if (explicitFraction != null) {
553
+ fractions.push(explicitFraction);
554
+ continue;
555
+ }
556
+ const counts = getReadCounts(vaf?.refCount, vaf?.altCount, vaf?.totalCount);
557
+ if (!counts) continue;
558
+ fractions.push(counts.altCount / counts.totalCount);
559
+ }
560
+ return fractions;
561
+ }
562
+ function getMaxMutationFraction(vafs) {
563
+ const fractions = getMutationFractions(vafs);
564
+ return fractions.length ? Math.max(...fractions) : null;
565
+ }
566
+ function hasAnyValidVafEntry(vafs) {
567
+ return getVafEntries(vafs).some((vaf) => hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount));
568
+ }
569
+ function appendVafBar(td2, refCountValue, altCountValue, label = "VAF", totalCountValue) {
570
+ const counts = getReadCounts(refCountValue, altCountValue, totalCountValue);
571
+ if (!counts) return;
572
+ const fraction = counts.altCount / counts.totalCount;
573
+ const div = td2.append("div").style("margin-left", "5px").style("margin-top", "4px").style("display", "flex").style("align-items", "center").style("gap", "6px");
574
+ div.append("span").style("font-size", "0.8em").style("color", "#555").text(label);
575
+ fillbar(div, { f: fraction, v1: counts.altCount, v2: counts.totalCount });
576
+ }
577
+ function appendVafBars(td2, vafs) {
578
+ for (const vaf of getVafEntries(vafs)) {
579
+ if (!hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount)) continue;
580
+ appendVafBar(td2, vaf.refCount, vaf.altCount, vaf.label, vaf.totalCount);
581
+ }
582
+ }
583
+
584
+ // plots/disco/data/DataMapper.ts
585
+ var DataMapper = class _DataMapper {
586
+ constructor(settings, reference, sample, prioritizedGenes = []) {
587
+ // remove fields and extract filters to seperate classes
588
+ this.labelData = [];
589
+ this.nonExonicSnvData = [];
590
+ this.nonExonicInnerRadius = 0;
591
+ this.snvRingDataMap = /* @__PURE__ */ new Map();
592
+ this.snvInnerRadius = 0;
593
+ this.snvData = [];
594
+ this.bpx = 0;
595
+ this.onePxArcAngle = 0;
596
+ this.filteredSnvData = [];
597
+ this.filteredSnvCountByChr = /* @__PURE__ */ new Map();
598
+ this.lohData = [];
599
+ this.lohInnerRadius = 0;
600
+ this.cnvData = [];
601
+ this.cnvInnerRadius = 0;
602
+ this.fusionData = [];
603
+ this.fusionRadius = 0;
604
+ this.hasPrioritizedGenes = false;
605
+ this.hasWaterfallEligibleChromosome = false;
606
+ this.invalidEntries = [];
607
+ this.cnvLossMaxValue = 0;
608
+ this.cnvGainMaxValue = 0;
609
+ this.percentilePositive = 0;
610
+ this.percentileNegative = 0;
611
+ this.cnvMaxPercentileAbs = 0;
612
+ this.mutationWaterfallData = [];
613
+ this.hasMutationFractionData = false;
614
+ this.mutationWaterfallInnerRadius = 0;
615
+ this.mutationWaterfallRangeMin = Infinity;
616
+ this.mutationWaterfallRangeMax = -Infinity;
617
+ this.lohMaxValue = void 0;
618
+ this.lohMinValue = void 0;
619
+ this.snvFilter = (data) => data.dt == dtsnvindel;
620
+ this.fusionFilter = (data) => data.dt == dtfusionrna || data.dt == dtsv;
621
+ this.cnvFilter = (data) => data.dt == dtcnv || data.dt == dtitd;
622
+ this.lohFilter = (data) => data.dt == dtloh;
623
+ this.compareData = (a, b) => {
624
+ const chrDiff = this.reference.chromosomesOrder.indexOf(a.chr) - this.reference.chromosomesOrder.indexOf(b.chr);
625
+ if (chrDiff != 0) {
626
+ return chrDiff;
627
+ }
628
+ const aPos = a.pos ? a.pos : a.start;
629
+ const bPos = b.pos ? b.pos : b.start;
630
+ return aPos - bPos;
631
+ };
632
+ this.settings = settings;
633
+ this.reference = reference;
634
+ this.sample = sample;
635
+ this.excludedChromosomes = this.settings.Disco.hiddenChromosomes;
636
+ this.lastInnerRadious = this.settings.rings.chromosomeInnerRadius;
637
+ this.gainCapped = this.settings.Disco.cnvCapping;
638
+ this.lossCapped = -1 * this.settings.Disco.cnvCapping;
639
+ this.nonExonicFilter = (data) => {
640
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
641
+ return prioritizedGenes.includes(data.gene) && settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
642
+ } else {
643
+ return settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
644
+ }
645
+ };
646
+ this.snvRingFilter = (data) => {
647
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
648
+ return prioritizedGenes.includes(data.gene) && settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
649
+ } else {
650
+ return settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
651
+ }
652
+ };
653
+ this.dataObjectMapper = new DataObjectMapper(sample, prioritizedGenes);
654
+ }
655
+ map(data) {
656
+ const dataArray = [];
657
+ this.filteredSnvCountByChr.clear();
658
+ this.hasWaterfallEligibleChromosome = false;
659
+ this.mutationWaterfallData = [];
660
+ this.mutationWaterfallInnerRadius = 0;
661
+ this.mutationWaterfallRangeMin = Infinity;
662
+ this.mutationWaterfallRangeMax = -Infinity;
663
+ this.hasMutationFractionData = false;
664
+ data.forEach((dObject) => {
665
+ if (dObject.dt == dtsnvindel && getMaxMutationFraction(dObject.vafs) != null) {
666
+ this.hasMutationFractionData = true;
667
+ }
668
+ const index = this.reference.chromosomesOrder.indexOf(dObject.chr);
669
+ const indexA = this.reference.chromosomesOrder.indexOf(dObject.chrA);
670
+ const indexB = this.reference.chromosomesOrder.indexOf(dObject.chrB);
671
+ if (dObject.dt == dtsnvindel) {
672
+ if (index != -1 && this.snvData.length < this.settings.snv.maxMutationCount) {
673
+ const pos = dObject.pos ?? dObject.position;
674
+ const chrSize = this.reference.chromosomes[index].size;
675
+ if (Number.isFinite(pos) && pos >= 0 && pos <= chrSize) {
676
+ this.addData(dObject, dataArray);
677
+ } else {
678
+ this.invalidEntries.push({ dataType: "SNV", reason: `Position ${pos} outside of ${dObject.chr}` });
679
+ }
680
+ } else if (index == -1) {
681
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
682
+ this.invalidEntries.push({ dataType: "SNV", reason: `Unknown chr ${dObject.chr}` });
683
+ }
684
+ }
685
+ } else if (dObject.dt == dtfusionrna || dObject.dt == dtsv) {
686
+ if (indexA != -1 && indexB != -1) {
687
+ const posA = dObject.posA;
688
+ const posB = dObject.posB;
689
+ const chrSizeA = this.reference.chromosomes[indexA].size;
690
+ const chrSizeB = this.reference.chromosomes[indexB].size;
691
+ if (Number.isFinite(posA) && Number.isFinite(posB) && posA >= 0 && posA <= chrSizeA && posB >= 0 && posB <= chrSizeB) {
692
+ this.addData(dObject, dataArray);
693
+ } else {
694
+ const reasonParts = [];
695
+ if (!(Number.isFinite(posA) && posA >= 0 && posA <= chrSizeA))
696
+ reasonParts.push(`Position ${posA} outside of ${dObject.chrA}`);
697
+ if (!(Number.isFinite(posB) && posB >= 0 && posB <= chrSizeB))
698
+ reasonParts.push(`Position ${posB} outside of ${dObject.chrB}`);
699
+ this.invalidEntries.push({ dataType: "Fusion", reason: reasonParts.join("; ") });
700
+ }
701
+ } else {
702
+ const missing = [];
703
+ if (indexA == -1 && !this.excludedChromosomes.includes(dObject.chrA)) missing.push(dObject.chrA);
704
+ if (indexB == -1 && !this.excludedChromosomes.includes(dObject.chrB)) missing.push(dObject.chrB);
705
+ if (missing.length) this.invalidEntries.push({ dataType: "Fusion", reason: "Unknown chr in fusion" });
706
+ }
707
+ } else if ([dtcnv, dtloh, dtitd].includes(Number(dObject.dt))) {
708
+ const idx = this.reference.chromosomesOrder.indexOf(dObject.chr);
709
+ const dataType = dObject.dt == dtcnv ? "CNV" : dObject.dt == dtloh ? "LOH" : "ITD";
710
+ if (dObject.chr && idx != -1) {
711
+ const chrSize = this.reference.chromosomes[idx].size;
712
+ const start = dObject.start;
713
+ const stop = dObject.stop;
714
+ if (Number.isFinite(start) && Number.isFinite(stop) && start >= 0 && stop <= chrSize && start <= stop) {
715
+ this.addData(dObject, dataArray);
716
+ } else {
717
+ this.invalidEntries.push({
718
+ dataType,
719
+ reason: `Position ${start}-${stop} outside of ${dObject.chr}`
720
+ });
721
+ }
722
+ } else {
723
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
724
+ this.invalidEntries.push({
725
+ dataType,
726
+ reason: `Unknown chr ${dObject.chr}`
727
+ });
728
+ }
729
+ }
730
+ } else {
731
+ throw Error("Unknown mutation type!");
732
+ }
733
+ });
734
+ const sortedData = dataArray.sort(this.compareData);
735
+ if (this.settings.rings.nonExonicRingEnabled) {
736
+ sortedData.forEach((data2) => {
737
+ this.filterNonExonicSnvData(data2);
738
+ });
739
+ }
740
+ if (this.nonExonicSnvData.length > 0) {
741
+ this.nonExonicInnerRadius = this.lastInnerRadious - this.settings.rings.nonExonicRingWidth;
742
+ this.lastInnerRadious = this.nonExonicInnerRadius;
743
+ }
744
+ sortedData.forEach((data2) => {
745
+ this.filterSnvs(data2);
746
+ });
747
+ this.hasWaterfallEligibleChromosome = Array.from(this.filteredSnvCountByChr.values()).some((count) => count >= 2);
748
+ if (this.settings.Disco.mutationWaterfallPlot && this.hasWaterfallEligibleChromosome) {
749
+ this.prepareMutationWaterfallData();
750
+ }
751
+ sortedData.forEach((data2) => {
752
+ this.filterLohs(data2);
753
+ });
754
+ if (this.lohData.length > 0) {
755
+ this.lohInnerRadius = this.lastInnerRadious - this.settings.rings.lohRingWidth;
756
+ this.lastInnerRadious = this.lohInnerRadius;
757
+ }
758
+ sortedData.forEach((data2) => {
759
+ this.filterCnvs(data2);
760
+ });
761
+ if (this.cnvData.length > 0) {
762
+ this.cnvInnerRadius = this.lastInnerRadious - this.settings.rings.cnvRingWidth;
763
+ this.lastInnerRadious = this.cnvInnerRadius;
764
+ this.cappedCnvMaxAbsValue = Math.min(
765
+ this.settings.Disco.cnvCapping,
766
+ Math.max(
767
+ Math.abs(_DataMapper.capMaxValue(this.cnvLossMaxValue, this.gainCapped, this.lossCapped)),
768
+ Math.abs(_DataMapper.capMaxValue(this.cnvGainMaxValue, this.gainCapped, this.lossCapped))
769
+ )
770
+ );
771
+ const cnvValues = this.cnvData.filter((data2) => data2.dt == dtcnv).map((data2) => data2.value);
772
+ if (cnvValues.length) {
773
+ const percentilePair = new PercentileMapper().map(cnvValues, this.settings.Disco.cnvPercentile);
774
+ this.percentilePositive = _DataMapper.capMaxValue(percentilePair.positive, this.gainCapped, this.lossCapped);
775
+ this.percentileNegative = _DataMapper.capMaxValue(percentilePair.negative, this.gainCapped, this.lossCapped);
776
+ this.cnvMaxPercentileAbs = Math.min(
777
+ this.settings.Disco.cnvCapping,
778
+ Math.max(this.percentilePositive, Math.abs(this.percentileNegative))
779
+ );
780
+ }
781
+ }
782
+ sortedData.forEach((data2) => {
783
+ this.filterFusion(data2);
784
+ });
785
+ if (this.fusionData.length > 0) {
786
+ this.fusionRadius = this.lastInnerRadious;
787
+ }
788
+ const dataHolder = {
789
+ labelData: this.labelData,
790
+ nonExonicSnvData: this.nonExonicSnvData,
791
+ nonExonicInnerRadius: this.nonExonicInnerRadius,
792
+ snvRingDataMap: this.snvRingDataMap,
793
+ snvInnerRadius: this.snvInnerRadius,
794
+ snvData: this.snvData,
795
+ bpx: this.bpx,
796
+ onePxArcAngle: this.onePxArcAngle,
797
+ filteredSnvData: this.filteredSnvData,
798
+ lohData: this.lohData,
799
+ lohInnerRadius: this.lohInnerRadius,
800
+ cnvData: this.cnvData,
801
+ cnvInnerRadius: this.cnvInnerRadius,
802
+ fusionData: this.fusionData,
803
+ fusionRadius: this.fusionRadius,
804
+ hasPrioritizedGenes: this.hasPrioritizedGenes,
805
+ hasWaterfallEligibleChromosome: this.hasWaterfallEligibleChromosome,
806
+ cnvGainMaxValue: this.cnvGainMaxValue,
807
+ cnvLossMaxValue: this.cnvLossMaxValue,
808
+ cappedCnvMaxAbsValue: this.cappedCnvMaxAbsValue,
809
+ percentilePositive: this.percentilePositive,
810
+ percentileNegative: this.percentileNegative,
811
+ cnvMaxPercentileAbs: this.cnvMaxPercentileAbs,
812
+ lohMaxValue: this.lohMaxValue,
813
+ lohMinValue: this.lohMinValue,
814
+ hasMutationFractionData: this.hasMutationFractionData,
815
+ mutationWaterfallData: this.mutationWaterfallData,
816
+ mutationWaterfallInnerRadius: this.mutationWaterfallInnerRadius,
817
+ mutationWaterfallLogRange: this.mutationWaterfallData.length ? { min: this.mutationWaterfallRangeMin, max: this.mutationWaterfallRangeMax } : void 0,
818
+ invalidDataInfo: {
819
+ entries: this.invalidEntries,
820
+ errorMsg: `Entries listed above were skipped due to invalid or unsupported chromosome information.`
821
+ }
822
+ };
823
+ return dataHolder;
824
+ }
825
+ addData(dObject, dataArray) {
826
+ const instance = this.dataObjectMapper.map(dObject);
827
+ if (instance.isPrioritized) {
828
+ this.hasPrioritizedGenes = true;
829
+ }
830
+ dataArray.push(instance);
831
+ }
832
+ filterNonExonicSnvData(data) {
833
+ if (this.snvFilter(data) && this.passesMutationFractionFilter(data)) {
834
+ if (this.settings.rings.nonExonicRingEnabled && this.nonExonicFilter(data)) {
835
+ this.nonExonicSnvData.push(data);
836
+ }
837
+ }
838
+ }
839
+ filterSnvs(data) {
840
+ if (this.snvFilter(data)) {
841
+ this.snvData.push(data);
842
+ if (this.passesMutationFractionFilter(data) && this.snvRingFilter(data)) {
843
+ if (this.snvInnerRadius == 0) {
844
+ this.snvInnerRadius = this.lastInnerRadious - this.settings.rings.snvRingWidth;
845
+ this.lastInnerRadious = this.snvInnerRadius;
846
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * this.snvInnerRadius));
847
+ this.onePxArcAngle = 1 / this.snvInnerRadius;
848
+ }
849
+ this.filteredSnvData.push(data);
850
+ this.labelData.push(data);
851
+ const currentCount = this.filteredSnvCountByChr.get(data.chr) || 0;
852
+ this.filteredSnvCountByChr.set(data.chr, currentCount + 1);
853
+ const arcAngle = this.calculateArcAngle(data);
854
+ let dataArray = this.snvRingDataMap.get(arcAngle);
855
+ if (!dataArray) {
856
+ dataArray = new Array();
857
+ }
858
+ dataArray.push(data);
859
+ this.snvRingDataMap.set(arcAngle, dataArray);
860
+ }
861
+ }
862
+ }
863
+ passesMutationFractionFilter(data) {
864
+ if (!this.hasMutationFractionData) return true;
865
+ const minMutationFraction = this.settings.Disco.minMutationFraction || 0;
866
+ if (minMutationFraction <= 0) return true;
867
+ const fraction = getMaxMutationFraction(data.vafs);
868
+ return fraction != null && fraction >= minMutationFraction;
869
+ }
870
+ filterFusion(data) {
871
+ if (this.fusionFilter(data)) {
872
+ data.isPrioritized = true;
873
+ this.fusionData.push(data);
874
+ this.labelData.push(data);
875
+ }
876
+ }
877
+ filterLohs(data) {
878
+ if (this.lohFilter(data)) {
879
+ if (this.lohMaxValue == void 0 || this.lohMaxValue < data.value) {
880
+ this.lohMaxValue = data.segmean;
881
+ }
882
+ if (this.lohMinValue == void 0 || this.lohMinValue > data.value) {
883
+ this.lohMinValue = data.segmean;
884
+ }
885
+ this.lohData.push(data);
886
+ }
887
+ }
888
+ filterCnvs(data) {
889
+ if (this.cnvFilter(data)) {
890
+ if (!data.chr || this.reference.chromosomesOrder.indexOf(data.chr) == -1) {
891
+ return;
892
+ }
893
+ if (data.dt == dtcnv) {
894
+ if (this.cnvGainMaxValue == void 0 || this.cnvGainMaxValue < data.value) {
895
+ this.cnvGainMaxValue = data.value;
896
+ }
897
+ if (this.cnvLossMaxValue == void 0 || this.cnvLossMaxValue > data.value) {
898
+ this.cnvLossMaxValue = data.value;
899
+ }
900
+ }
901
+ this.cnvData.push(data);
902
+ }
903
+ }
904
+ prepareMutationWaterfallData() {
905
+ this.mutationWaterfallInnerRadius = this.lastInnerRadious - this.settings.rings.mutationWaterfallRingWidth;
906
+ this.lastInnerRadious = this.mutationWaterfallInnerRadius;
907
+ const groupedSnvs = /* @__PURE__ */ new Map();
908
+ const firstMutationByChr = [];
909
+ for (const snv of this.filteredSnvData) {
910
+ const list = groupedSnvs.get(snv.chr) || [];
911
+ list.push(snv);
912
+ groupedSnvs.set(snv.chr, list);
913
+ }
914
+ for (const [, snvs] of groupedSnvs) {
915
+ if (snvs.length < 2) continue;
916
+ snvs.sort((a, b) => a.position - b.position);
917
+ firstMutationByChr.push({
918
+ chr: snvs[0].chr,
919
+ position: snvs[0].position,
920
+ logDistance: 0
921
+ // placeholder updated after range computed
922
+ });
923
+ for (let i = 1; i < snvs.length; i++) {
924
+ const prev = snvs[i - 1];
925
+ const curr = snvs[i];
926
+ const distance = Math.max(1, Math.abs(curr.position - prev.position));
927
+ const logDistance = Math.log10(distance);
928
+ this.mutationWaterfallData.push({
929
+ chr: curr.chr,
930
+ position: curr.position,
931
+ logDistance
932
+ });
933
+ if (logDistance < this.mutationWaterfallRangeMin) {
934
+ this.mutationWaterfallRangeMin = logDistance;
935
+ }
936
+ if (logDistance > this.mutationWaterfallRangeMax) {
937
+ this.mutationWaterfallRangeMax = logDistance;
938
+ }
939
+ }
940
+ }
941
+ if (!this.mutationWaterfallData.length) {
942
+ this.mutationWaterfallRangeMin = 0;
943
+ this.mutationWaterfallRangeMax = 0;
944
+ }
945
+ const topLogDistance = this.mutationWaterfallRangeMax;
946
+ for (const first of firstMutationByChr) {
947
+ this.mutationWaterfallData.push({
948
+ ...first,
949
+ logDistance: topLogDistance
950
+ });
951
+ }
952
+ }
953
+ calculateArcAngle(data) {
954
+ const currentChromosome = this.reference.chromosomes[this.reference.chromosomesOrder.findIndex((chromosomeOrder) => data.chr == chromosomeOrder)];
955
+ const dataAnglePos = Math.floor(data.position / this.bpx);
956
+ return currentChromosome.startAngle + dataAnglePos * this.onePxArcAngle;
957
+ }
958
+ static capMaxValue(value, gainCapped, lossCapped) {
959
+ if (value && Math.sign(value) == 1) {
960
+ return value > gainCapped ? gainCapped : value;
961
+ }
962
+ if (Math.sign(value) == -1) {
963
+ return value < lossCapped ? lossCapped : value;
964
+ }
965
+ return 0;
966
+ }
967
+ static capMinValue(value, capMinValue = 1) {
968
+ if (Math.sign(value) == 1) {
969
+ return value > capMinValue ? value : capMinValue;
970
+ }
971
+ if (Math.sign(value) == -1) {
972
+ return value < -1 * capMinValue ? value : -1 * capMinValue;
973
+ }
974
+ return 1;
975
+ }
976
+ };
977
+
978
+ // plots/disco/legend/Legend.ts
979
+ var Legend = class {
980
+ constructor(snvTitle, cnvTitle, lohTitle, fusionTitle, cnvPercentile, cnvCutoffmode, snvClassMap, cnvClassMap, cnvRenderingType, fusionLegend, discoInteractions, lohLegend, mutationWaterfallLegend, fusionLegendCounts = { interchromosomal: 0, intrachromosomal: 0 }, cnvCount = 0) {
981
+ this.snvTitle = snvTitle;
982
+ this.cnvTitle = cnvTitle;
983
+ this.lohTitle = lohTitle;
984
+ this.fusionTitle = fusionTitle;
985
+ this.cnvPercentile = cnvPercentile;
986
+ this.cnvCutoffMode = cnvCutoffmode;
987
+ this.cnvCount = cnvCount;
988
+ this.snvClassMap = snvClassMap;
989
+ this.cnvClassMap = cnvClassMap;
990
+ this.cnvRenderingType = cnvRenderingType;
991
+ this.lohLegend = lohLegend;
992
+ this.fusionLegend = fusionLegend;
993
+ this.fusionLegendCounts = fusionLegendCounts;
994
+ this.discoInteractions = discoInteractions;
995
+ this.mutationWaterfallLegend = mutationWaterfallLegend;
996
+ }
997
+ legendCount() {
998
+ const hasItd = this.cnvClassMap.has(4 /* ITD */);
999
+ 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);
1000
+ }
1001
+ };
1002
+
1003
+ // plots/disco/fusion/Fusion.ts
1004
+ var Fusion = class {
1005
+ constructor(source, target, genes, count, endpts, dt, eventImage) {
1006
+ this.source = source;
1007
+ this.target = target;
1008
+ this.genes = genes;
1009
+ this.count = count;
1010
+ this.endpts = endpts;
1011
+ this.dt = dt;
1012
+ this.eventImage = eventImage;
1013
+ }
1014
+ };
1015
+
1016
+ // plots/disco/fusion/FusionSubgroup.ts
1017
+ var FusionSubgroup = class {
1018
+ constructor(startAngle, endAngle, radius, gene, value, genes, positionInChromosome, strand) {
1019
+ this.startAngle = startAngle;
1020
+ this.endAngle = endAngle;
1021
+ this.radius = radius;
1022
+ this.gene = gene;
1023
+ this.value = value;
1024
+ this.genes = genes;
1025
+ this.positionInChromosome = positionInChromosome;
1026
+ this.strand = strand;
1027
+ }
1028
+ };
1029
+
1030
+ // plots/disco/fusion/FusionMapper.ts
1031
+ var FusionMapper = class {
1032
+ constructor(radius, sampleName, reference) {
1033
+ this.radius = radius;
1034
+ this.sampleName = sampleName;
1035
+ this.reference = reference;
1036
+ }
1037
+ map(fusionData) {
1038
+ const fusions = [];
1039
+ fusionData.forEach((data) => {
1040
+ const genes = /* @__PURE__ */ new Set();
1041
+ genes.add(data.geneA);
1042
+ genes.add(data.geneB);
1043
+ const startAngle = this.calculateStartAngle(data.chrA, data.posA);
1044
+ const endAngle = this.calculateEndAngle(data.chrA, data.posA);
1045
+ if (startAngle === null || endAngle === null) return;
1046
+ const source = new FusionSubgroup(
1047
+ startAngle,
1048
+ endAngle,
1049
+ this.radius,
1050
+ data.geneA,
1051
+ data.value,
1052
+ genes,
1053
+ {
1054
+ chromosome: data.chrA,
1055
+ position: data.posA
1056
+ },
1057
+ data.strandA
1058
+ );
1059
+ let target;
1060
+ if (data.chrB && data.posB) {
1061
+ const startAngle2 = this.calculateStartAngle(data.chrB, data.posB);
1062
+ const endAngle2 = this.calculateEndAngle(data.chrB, data.posB);
1063
+ if (startAngle2 === null || endAngle2 === null) return;
1064
+ target = new FusionSubgroup(
1065
+ startAngle2,
1066
+ endAngle2,
1067
+ this.radius,
1068
+ data.geneB,
1069
+ data.value,
1070
+ genes,
1071
+ {
1072
+ chromosome: data.chrB,
1073
+ position: data.posB
1074
+ },
1075
+ data.strandB
1076
+ );
1077
+ }
1078
+ const fusion = new Fusion(source, target, "genes", -1, "Endpoints", data.dt, data.eventImage);
1079
+ fusions.push(fusion);
1080
+ });
1081
+ return fusions;
1082
+ }
1083
+ calculateStartAngle(chr, pos) {
1084
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1085
+ if (index === -1) return null;
1086
+ const chromosome = this.reference.chromosomes[index];
1087
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size) - 0.01;
1088
+ }
1089
+ calculateEndAngle(chr, pos) {
1090
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1091
+ if (index === -1) return null;
1092
+ const chromosome = this.reference.chromosomes[index];
1093
+ return 0.01 + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size);
1094
+ }
1095
+ };
1096
+
1097
+ // plots/disco/loh/LohLegend.ts
1098
+ var LohLegend = class {
1099
+ constructor(count) {
1100
+ this.count = count;
1101
+ }
1102
+ };
1103
+
1104
+ // plots/disco/viewmodel/ViewModel.ts
1105
+ var ViewModel = class {
1106
+ constructor(settings, rings, legend, fusions, dataHolder, genesetName, snvDataLengthAll) {
1107
+ this.settings = settings;
1108
+ this.rings = rings;
1109
+ this.legend = legend;
1110
+ this.fusions = fusions;
1111
+ this.genesetName = genesetName;
1112
+ const tempHolder = select_default("body").append("div").style("position", "absolute").style("visibility", "hidden");
1113
+ const tempSvg = tempHolder.append("svg");
1114
+ const labels = rings.labelsRing?.elementsToDisplay?.map((l) => l.text) || [];
1115
+ const maxLabelSpace = getMaxLabelWidth(tempSvg, labels);
1116
+ tempHolder.remove();
1117
+ this.width = 2 * (this.settings.horizontalPadding + this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + maxLabelSpace);
1118
+ this.height = 2 * (this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + this.settings.verticalPadding + this.settings.label.fontSize * 2 + maxLabelSpace);
1119
+ this.legendHeight = this.calculateLegendHeight(legend);
1120
+ this.snvDataLength = dataHolder.snvData.length;
1121
+ this.filteredSnvDataLength = dataHolder.filteredSnvData.length;
1122
+ this.snvDataLengthAll = snvDataLengthAll;
1123
+ this.cnvMaxValue = dataHolder.cnvGainMaxValue;
1124
+ this.cnvMinValue = dataHolder.cnvLossMaxValue;
1125
+ this.cappedCnvMaxAbsValue = dataHolder.cappedCnvMaxAbsValue;
1126
+ this.negativePercentile = dataHolder.percentileNegative;
1127
+ this.positivePercentile = dataHolder.percentilePositive;
1128
+ this.invalidDataInfo = dataHolder.invalidDataInfo;
1129
+ this.canShowMutationWaterfallPlot = dataHolder.hasWaterfallEligibleChromosome;
1130
+ this.hasMutationFractionData = dataHolder.hasMutationFractionData;
1131
+ }
1132
+ getElements(ringType) {
1133
+ switch (ringType) {
1134
+ case 0 /* CHROMOSOME */:
1135
+ return this.rings.chromosomesRing ? this.rings.chromosomesRing.elements : [];
1136
+ case 1 /* LABEL */:
1137
+ return this.rings.labelsRing.elementsToDisplay;
1138
+ case 2 /* NONEXONICSNV */:
1139
+ return this.rings.nonExonicArcRing ? this.rings.nonExonicArcRing.elements : [];
1140
+ case 3 /* SNV */:
1141
+ return this.rings.snvArcRing ? this.rings.snvArcRing.elements : [];
1142
+ case 5 /* CNV */:
1143
+ return this.rings.cnvArcRing ? this.rings.cnvArcRing.elements : [];
1144
+ case 6 /* LOH */:
1145
+ return this.rings.lohArcRing ? this.rings.lohArcRing.elements : [];
1146
+ case 4 /* MUTATION_WATERFALL */:
1147
+ return this.rings.mutationWaterfallRing ? this.rings.mutationWaterfallRing.elements : [];
1148
+ default:
1149
+ throw new Error(`ringType ${ringType} not defined`);
1150
+ }
1151
+ }
1152
+ getCollisions(ringType) {
1153
+ if (ringType == 1 /* LABEL */) {
1154
+ return this.rings.labelsRing.collisions;
1155
+ } else {
1156
+ return void 0;
1157
+ }
1158
+ }
1159
+ calculateLegendHeight(legend) {
1160
+ const rawHeight = this.settings.legend.rowHeight;
1161
+ return rawHeight * legend.legendCount();
1162
+ }
1163
+ };
1164
+
1165
+ // plots/disco/ring/Ring.ts
1166
+ var Ring = class {
1167
+ constructor(innerRadius, width, elements) {
1168
+ this.innerRadius = innerRadius;
1169
+ this.outerRadius = innerRadius + width;
1170
+ this.width = width;
1171
+ this.elements = elements;
1172
+ }
1173
+ };
1174
+
1175
+ // plots/disco/label/MLabel.ts
1176
+ var MLabel = class _MLabel {
1177
+ /**
1178
+ * The Singleton's constructor should always be private to prevent direct
1179
+ * construction calls with the `new` operator.
1180
+ */
1181
+ constructor() {
1182
+ const mlabel = {};
1183
+ for (const key in mclass) {
1184
+ mlabel[mclass[key].label] = mclass[key];
1185
+ mlabel[key] = mclass[key];
1186
+ }
1187
+ this.mlabel = mlabel;
1188
+ }
1189
+ /**
1190
+ * The static method that controls the access to the singleton instance.
1191
+ *
1192
+ * This implementation let you subclass the Singleton class while keeping
1193
+ * just one instance of each subclass around.
1194
+ */
1195
+ static getInstance() {
1196
+ if (!_MLabel.instance) {
1197
+ _MLabel.instance = new _MLabel();
1198
+ }
1199
+ return _MLabel.instance;
1200
+ }
1201
+ };
1202
+
1203
+ // plots/disco/snv/SnvLegendElement.ts
1204
+ var SnvLegendElement = class {
1205
+ constructor(snvType, color, count) {
1206
+ this.snvType = snvType;
1207
+ this.color = color;
1208
+ this.count = count;
1209
+ }
1210
+ };
1211
+
1212
+ // plots/disco/snv/SnvArcsMapper.ts
1213
+ var SnvArcsMapper = class {
1214
+ constructor(svnInnerRadius, svnWidth, sampleName, reference) {
1215
+ this.snvClassMap = /* @__PURE__ */ new Map();
1216
+ this.svnInnerRadius = svnInnerRadius;
1217
+ this.svnWidth = svnWidth;
1218
+ this.sampleName = sampleName;
1219
+ this.reference = reference;
1220
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * svnInnerRadius));
1221
+ this.onePxArcAngle = 1 / svnInnerRadius;
1222
+ }
1223
+ map(exonicSnvDataMap) {
1224
+ const snvArray = [];
1225
+ for (const angle of exonicSnvDataMap.keys()) {
1226
+ const array = exonicSnvDataMap.get(angle);
1227
+ if (array) {
1228
+ const arraySize = array.length;
1229
+ for (let i = 0; i < array.length; i++) {
1230
+ const data = array[i];
1231
+ const snvLegendElement = this.snvClassMap.get(data.mClass);
1232
+ if (snvLegendElement) {
1233
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, ++snvLegendElement.count));
1234
+ } else {
1235
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, 1));
1236
+ }
1237
+ const startAngle = angle;
1238
+ const endAngle = angle + this.onePxArcAngle;
1239
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1240
+ const arc = {
1241
+ startAngle,
1242
+ endAngle,
1243
+ innerRadius: this.svnInnerRadius + i * this.svnWidth / arraySize,
1244
+ outerRadius: this.svnInnerRadius + (i + 1) * this.svnWidth / arraySize,
1245
+ color: mLabel.color,
1246
+ text: data.gene,
1247
+ dataClass: mLabel.label,
1248
+ mname: data.mname,
1249
+ chr: data.chr,
1250
+ pos: data.position,
1251
+ vafs: data.vafs,
1252
+ sampleName: [data.sampleName]
1253
+ };
1254
+ snvArray.push(arc);
1255
+ }
1256
+ }
1257
+ }
1258
+ return snvArray;
1259
+ }
1260
+ createSnvLegend(dataClass, count) {
1261
+ const mClass = MLabel.getInstance().mlabel[dataClass];
1262
+ return new SnvLegendElement(mClass.label, mClass.color, count);
1263
+ }
1264
+ };
1265
+
1266
+ // plots/disco/cnv/CnvLegend.ts
1267
+ var CnvLegend = class {
1268
+ constructor(text, cnvType, color, value) {
1269
+ this.text = text;
1270
+ this.cnvType = cnvType;
1271
+ this.color = color;
1272
+ this.value = value;
1273
+ }
1274
+ };
1275
+
1276
+ // plots/disco/cnv/CnvColorProvider.ts
1277
+ var CnvColorProvider = class {
1278
+ static getColor(value, settings, cnvMaxPercentileAbs = 0) {
1279
+ const cnv = settings.cnv;
1280
+ const gainCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? settings.Disco.cnvCapping : cnvMaxPercentileAbs;
1281
+ const lossCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? -1 * settings.Disco.cnvCapping : -1 * cnvMaxPercentileAbs;
1282
+ if (value < lossCapped) {
1283
+ return cnv.cappedLossColor;
1284
+ } else if (value >= lossCapped && value <= 0) {
1285
+ return cnv.lossColor;
1286
+ } else if (value > 0 && value <= gainCapped) {
1287
+ return cnv.ampColor;
1288
+ } else {
1289
+ return cnv.cappedAmpColor;
1290
+ }
1291
+ }
1292
+ };
1293
+
1294
+ // plots/disco/cnv/CnvArcsMapper.ts
1295
+ var CnvArcsMapper = class {
1296
+ constructor(cnvInnerRadius, cnvWidth, settings, sampleName, reference, cnvMaxValue = 0, cnvMinValue = 0, cnvMaxAbsValue = 0, cnvAbsPercentile = 0, cnvUnit = "", cnvRenderingType) {
1297
+ this.cnvClassMap = /* @__PURE__ */ new Map();
1298
+ this.cnvInnerRadius = cnvInnerRadius;
1299
+ this.cnvWidth = cnvWidth;
1300
+ this.settings = settings;
1301
+ this.sampleName = sampleName;
1302
+ this.reference = reference;
1303
+ this.cnvMaxValue = cnvMaxValue;
1304
+ this.cnvMinValue = cnvMinValue;
1305
+ this.cnvMaxAbsValue = cnvMaxAbsValue;
1306
+ this.cnvAbsPercentile = cnvAbsPercentile;
1307
+ this.cnvUnit = cnvUnit;
1308
+ this.cnvRenderingType = cnvRenderingType;
1309
+ this.gainCapped = Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1310
+ this.lossCapped = -1 * Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1311
+ this.lossOnly = cnvMaxValue <= 0;
1312
+ this.gainOnly = cnvMinValue >= 0;
1313
+ this.onePxArcAngle = 1 / this.cnvInnerRadius;
1314
+ const gain = new CnvLegend(
1315
+ "Max",
1316
+ cnvMaxValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1317
+ this.getColor(cnvMaxValue),
1318
+ cnvMaxValue
1319
+ );
1320
+ const loss = new CnvLegend(
1321
+ "Min",
1322
+ cnvMinValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1323
+ this.getColor(cnvMinValue),
1324
+ cnvMinValue
1325
+ );
1326
+ const cap = new CnvLegend(
1327
+ "Capping",
1328
+ 0 /* Loss */,
1329
+ this.getColor(cnvMinValue > 0 ? cnvMinValue : cnvMaxValue),
1330
+ this.settings.Disco.cnvCapping
1331
+ );
1332
+ this.cnvClassMap.set(1 /* Gain */, gain);
1333
+ this.cnvClassMap.set(0 /* Loss */, loss);
1334
+ this.cnvClassMap.set(2 /* Cap */, cap);
1335
+ }
1336
+ map(arcData) {
1337
+ const arcs = [];
1338
+ let itdCount = 0;
1339
+ arcData.forEach((data) => {
1340
+ let startAngle = this.calculateStartAngle(data);
1341
+ let endAngle = this.calculateEndAngle(data);
1342
+ if (startAngle === null || endAngle === null) return;
1343
+ if (endAngle - startAngle < this.onePxArcAngle) {
1344
+ const restAngle = this.onePxArcAngle - (endAngle - startAngle);
1345
+ startAngle = startAngle - restAngle / 2;
1346
+ endAngle = endAngle + restAngle / 2;
1347
+ }
1348
+ const isItd = data.dt == dtitd;
1349
+ if (isItd) itdCount++;
1350
+ const color = isItd ? mclass[mclassitd].color : this.getColor(data.value);
1351
+ const innerRadius = isItd ? this.cnvInnerRadius : this.calculateInnerRadius(data);
1352
+ const outerRadius = isItd ? this.cnvInnerRadius + this.cnvWidth : this.calculateOuterRadius(data);
1353
+ const arc = {
1354
+ startAngle,
1355
+ endAngle,
1356
+ innerRadius,
1357
+ outerRadius,
1358
+ color,
1359
+ dt: data.dt,
1360
+ dataClass: data.mClass,
1361
+ text: data.gene,
1362
+ chr: data.chr,
1363
+ start: data.start,
1364
+ stop: data.stop,
1365
+ value: data.value,
1366
+ unit: this.cnvUnit,
1367
+ sampleName: [this.sampleName]
1368
+ };
1369
+ arcs.push(arc);
1370
+ });
1371
+ if (itdCount) {
1372
+ this.cnvClassMap.set(4 /* ITD */, new CnvLegend("ITD", 4 /* ITD */, mclass[mclassitd].color, itdCount));
1373
+ }
1374
+ return arcs;
1375
+ }
1376
+ calculateStartAngle(data) {
1377
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1378
+ if (index == -1) return null;
1379
+ const chromosome = this.reference.chromosomes[index];
1380
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1381
+ }
1382
+ calculateEndAngle(data) {
1383
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1384
+ const chromosome = this.reference.chromosomes[index];
1385
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1386
+ }
1387
+ getColor(value) {
1388
+ return CnvColorProvider.getColor(value, this.settings, this.cnvAbsPercentile);
1389
+ }
1390
+ calculateInnerRadius(data) {
1391
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1392
+ return this.cnvInnerRadius;
1393
+ }
1394
+ if (this.gainOnly) {
1395
+ return this.cnvInnerRadius;
1396
+ }
1397
+ if (this.lossOnly) {
1398
+ const outerRadius = this.cnvInnerRadius + this.cnvWidth;
1399
+ return outerRadius + DataMapper.capMinValue(
1400
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1401
+ );
1402
+ }
1403
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1404
+ if (Math.sign(data.value) == 1) {
1405
+ return centerRadius;
1406
+ }
1407
+ if (Math.sign(data.value) == -1) {
1408
+ return centerRadius + DataMapper.capMinValue(
1409
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile * (this.cnvWidth / 2)
1410
+ );
1411
+ }
1412
+ return 1;
1413
+ }
1414
+ calculateOuterRadius(data) {
1415
+ const maxOuterRadius = this.cnvInnerRadius + this.cnvWidth;
1416
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1417
+ return maxOuterRadius;
1418
+ }
1419
+ if (this.gainOnly) {
1420
+ return this.cnvInnerRadius + DataMapper.capMinValue(
1421
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1422
+ );
1423
+ }
1424
+ if (this.lossOnly) {
1425
+ return maxOuterRadius;
1426
+ }
1427
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1428
+ if (Math.sign(data.value) == 1) {
1429
+ return centerRadius + DataMapper.capMinValue(
1430
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvMaxAbsValue * (this.cnvWidth / 2)
1431
+ );
1432
+ }
1433
+ if (Math.sign(data.value) == -1) {
1434
+ return centerRadius;
1435
+ }
1436
+ return 1;
1437
+ }
1438
+ };
1439
+
1440
+ // plots/disco/label/Line.ts
1441
+ var Line = class {
1442
+ constructor(points, color) {
1443
+ this.points = new Array();
1444
+ this.points = points;
1445
+ this.color = color;
1446
+ }
1447
+ };
1448
+
1449
+ // plots/disco/label/LabelFactory.ts
1450
+ var LabelFactory = class {
1451
+ static createLabel(startAngle, endAngle, innerRadius, outerRadius, value, gene, color, dataClass, chr, position, isPrioritized = false, labelsToLinesGap, mutationTooltip, fusionTooltip) {
1452
+ const angle = (startAngle + endAngle) / 2;
1453
+ const ccAngle = angle - Math.PI / 2;
1454
+ const transform = `rotate(${angle * 180 / Math.PI - 90}) translate(${outerRadius})${angle > Math.PI ? "rotate(180)" : ""}`;
1455
+ const textAnchor = angle > Math.PI ? "end" : "";
1456
+ const r0 = innerRadius;
1457
+ const r1 = outerRadius - labelsToLinesGap;
1458
+ const points = [];
1459
+ const point0 = {
1460
+ x: r0 * Math.cos(ccAngle),
1461
+ y: r0 * Math.sin(ccAngle)
1462
+ };
1463
+ const point1 = {
1464
+ x: r1 * Math.cos(ccAngle),
1465
+ y: r1 * Math.sin(ccAngle)
1466
+ };
1467
+ points.push(point0);
1468
+ points.push(point1);
1469
+ const line = new Line(points, color);
1470
+ const label = {
1471
+ startAngle,
1472
+ endAngle,
1473
+ innerRadius,
1474
+ outerRadius,
1475
+ angle,
1476
+ value,
1477
+ text: gene,
1478
+ color,
1479
+ transform,
1480
+ textAnchor,
1481
+ ccAngle,
1482
+ line,
1483
+ isPrioritized,
1484
+ start: position,
1485
+ stop: position,
1486
+ chr,
1487
+ mutationsTooltip: mutationTooltip ? [mutationTooltip] : void 0,
1488
+ fusionTooltip: fusionTooltip ? [fusionTooltip] : void 0
1489
+ };
1490
+ return label;
1491
+ }
1492
+ static createMovedLabel(element, overlap) {
1493
+ const startAngle = element.startAngle + overlap;
1494
+ const endAngle = element.endAngle + overlap;
1495
+ const angle = (startAngle + endAngle) / 2;
1496
+ const ccAngle = angle - Math.PI / 2;
1497
+ const r0 = element.innerRadius;
1498
+ const r1 = element.outerRadius - 2;
1499
+ const dr = (r1 - r0) / 3;
1500
+ const cos0 = Math.cos(element.ccAngle);
1501
+ const sin0 = Math.sin(element.ccAngle);
1502
+ const cos1 = Math.cos(element.ccAngle + overlap);
1503
+ const sin1 = Math.sin(element.ccAngle + overlap);
1504
+ const points = [];
1505
+ const point0 = {
1506
+ x: r0 * cos0,
1507
+ y: r0 * sin0
1508
+ };
1509
+ const point1 = {
1510
+ x: (r0 + dr) * cos0,
1511
+ y: (r0 + dr) * sin0
1512
+ };
1513
+ const point2 = {
1514
+ x: (r0 + 2 * dr) * cos1,
1515
+ y: (r0 + 2 * dr) * sin1
1516
+ };
1517
+ const point3 = {
1518
+ x: (r0 + 3 * dr) * cos1,
1519
+ y: (r0 + 3 * dr) * sin1
1520
+ };
1521
+ points.push(point0);
1522
+ points.push(point1);
1523
+ points.push(point2);
1524
+ points.push(point3);
1525
+ const line = new Line(points, element.color);
1526
+ const transform = "rotate(" + (angle * 180 / Math.PI - 90) + ")translate(" + element.outerRadius + ")" + (angle > Math.PI ? "rotate(180)" : "");
1527
+ const textAnchor = angle > Math.PI ? "end" : "";
1528
+ const color = element.mutationsTooltip ? element.mutationsTooltip[0].color : element.fusionTooltip ? element.fusionTooltip[0].color : void 0;
1529
+ const label = {
1530
+ startAngle,
1531
+ endAngle,
1532
+ innerRadius: element.innerRadius,
1533
+ outerRadius: element.outerRadius,
1534
+ angle,
1535
+ value: element.value,
1536
+ text: element.text,
1537
+ transform,
1538
+ textAnchor,
1539
+ ccAngle,
1540
+ color,
1541
+ line,
1542
+ isPrioritized: element.isPrioritized,
1543
+ start: element.start,
1544
+ stop: element.stop,
1545
+ chr: element.chr,
1546
+ mutationsTooltip: element.mutationsTooltip,
1547
+ fusionTooltip: element.fusionTooltip,
1548
+ cnvTooltip: element.cnvTooltip
1549
+ };
1550
+ return label;
1551
+ }
1552
+ };
1553
+
1554
+ // plots/disco/label/LabelsMapper.ts
1555
+ var LabelsMapper = class {
1556
+ constructor(settings, sampleName, reference, cnvMaxPercentileAbs = 0) {
1557
+ this.labelMap = /* @__PURE__ */ new Map();
1558
+ this.settings = settings;
1559
+ this.sampleName = sampleName;
1560
+ this.reference = reference;
1561
+ this.cnvMaxPercentileAbs = cnvMaxPercentileAbs;
1562
+ }
1563
+ map(data, cnvData = []) {
1564
+ const innerRadius = this.settings.rings.labelLinesInnerRadius;
1565
+ const outerRadius = innerRadius + this.settings.rings.labelsToLinesDistance;
1566
+ data.forEach((data2) => {
1567
+ if (data2.dt == dtsnvindel) {
1568
+ const startAngle = this.calculateStartAngle(data2.chr, data2.position);
1569
+ const endAngle = this.calculateEndAngle(data2.chr, data2.position);
1570
+ if (startAngle === null || endAngle === null) return;
1571
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data2.mClass] : void 0;
1572
+ this.addLabelOrMutation(
1573
+ data2,
1574
+ data2.gene,
1575
+ data2.mname,
1576
+ startAngle,
1577
+ endAngle,
1578
+ innerRadius,
1579
+ outerRadius,
1580
+ mLabel.color,
1581
+ mLabel.label
1582
+ );
1583
+ }
1584
+ if (data2.dt == dtfusionrna) {
1585
+ const color = FusionColorProvider.getColor(data2.chrA, data2.chrB);
1586
+ if (data2.geneA) {
1587
+ const startAngleSource = this.calculateStartAngle(data2.chrA, data2.posA);
1588
+ const endAngleSource = this.calculateEndAngle(data2.chrA, data2.posA);
1589
+ if (startAngleSource === null || endAngleSource === null) return;
1590
+ this.addLabelOrFusion(
1591
+ data2,
1592
+ data2.geneA,
1593
+ data2.posA,
1594
+ data2.chrA,
1595
+ startAngleSource,
1596
+ endAngleSource,
1597
+ innerRadius,
1598
+ outerRadius,
1599
+ color
1600
+ );
1601
+ }
1602
+ if (data2.geneB && data2.geneA != data2.geneB) {
1603
+ const startAngleTarget = this.calculateStartAngle(data2.chrB, data2.posB);
1604
+ const endAngleTarget = this.calculateEndAngle(data2.chrB, data2.posB);
1605
+ if (startAngleTarget == null || endAngleTarget == null) return;
1606
+ this.addLabelOrFusion(
1607
+ data2,
1608
+ data2.geneB,
1609
+ data2.posB,
1610
+ data2.chrB,
1611
+ startAngleTarget,
1612
+ endAngleTarget,
1613
+ innerRadius,
1614
+ outerRadius,
1615
+ color
1616
+ );
1617
+ }
1618
+ }
1619
+ });
1620
+ const labelsArray = Array.from(this.labelMap.values());
1621
+ labelsArray.forEach((label) => {
1622
+ cnvData.forEach((cnv) => {
1623
+ if ((cnv.dt == dtcnv || cnv.dt == dtitd) && label.chr == cnv.chr && label.stop >= cnv.start && cnv.stop >= label.start) {
1624
+ const mutation = {
1625
+ dt: cnv.dt,
1626
+ value: cnv.value,
1627
+ color: cnv.dt == dtitd ? mclass[mclassitd].color : CnvColorProvider.getColor(cnv.value, this.settings, this.cnvMaxPercentileAbs),
1628
+ chr: cnv.chr,
1629
+ start: cnv.start,
1630
+ stop: cnv.stop
1631
+ };
1632
+ if (label.cnvTooltip) {
1633
+ label.cnvTooltip.push(mutation);
1634
+ } else {
1635
+ label.cnvTooltip = [];
1636
+ label.cnvTooltip.push(mutation);
1637
+ }
1638
+ }
1639
+ });
1640
+ });
1641
+ return Array.from(this.labelMap.values());
1642
+ }
1643
+ addLabelOrMutation(data, gene, mname, startAngle, endAngle, innerRadius, outerRadius, color, dataClass) {
1644
+ const label = this.labelMap.get(gene);
1645
+ const mutation = {
1646
+ mname,
1647
+ color,
1648
+ dataClass,
1649
+ chr: data.chr,
1650
+ position: data.position,
1651
+ vafs: data.vafs
1652
+ };
1653
+ if (!label) {
1654
+ this.labelMap.set(
1655
+ gene,
1656
+ LabelFactory.createLabel(
1657
+ startAngle,
1658
+ endAngle,
1659
+ innerRadius,
1660
+ outerRadius,
1661
+ data.value,
1662
+ gene,
1663
+ color,
1664
+ dataClass,
1665
+ data.chr,
1666
+ data.position,
1667
+ data.isPrioritized,
1668
+ this.settings.rings.labelsToLinesGap,
1669
+ mutation
1670
+ )
1671
+ );
1672
+ } else {
1673
+ if (label.mutationsTooltip) {
1674
+ label.start = Math.min(label.start, data.position);
1675
+ label.stop = Math.max(label.stop, data.position);
1676
+ label.mutationsTooltip.push(mutation);
1677
+ } else {
1678
+ label.mutationsTooltip = [];
1679
+ label.start = Math.min(label.start, data.position);
1680
+ label.stop = Math.max(label.stop, data.position);
1681
+ label.mutationsTooltip.push(mutation);
1682
+ }
1683
+ }
1684
+ }
1685
+ addLabelOrFusion(data, gene, position, chr, startAngle, endAngle, innerRadius, outerRadius, color) {
1686
+ const label = this.labelMap.get(gene);
1687
+ const fusionTooltip = {
1688
+ color,
1689
+ chrA: data.chrA,
1690
+ chrB: data.chrB,
1691
+ posA: data.posA,
1692
+ posB: data.posB,
1693
+ geneA: data.geneA,
1694
+ geneB: data.geneB,
1695
+ strandA: data.strandA,
1696
+ strandB: data.strandB
1697
+ };
1698
+ if (!label) {
1699
+ this.labelMap.set(
1700
+ gene,
1701
+ LabelFactory.createLabel(
1702
+ startAngle,
1703
+ endAngle,
1704
+ innerRadius,
1705
+ outerRadius,
1706
+ data.value,
1707
+ gene,
1708
+ color,
1709
+ "Fusion transcript",
1710
+ chr,
1711
+ position,
1712
+ data.isPrioritized,
1713
+ this.settings.rings.labelsToLinesGap,
1714
+ void 0,
1715
+ fusionTooltip
1716
+ )
1717
+ );
1718
+ } else {
1719
+ if (label.fusionTooltip) {
1720
+ label.start = Math.min(label.start, position);
1721
+ label.stop = Math.max(label.stop, position);
1722
+ label.fusionTooltip.push(fusionTooltip);
1723
+ } else {
1724
+ label.fusionTooltip = [];
1725
+ label.start = Math.min(label.start, position);
1726
+ label.stop = Math.max(label.stop, position);
1727
+ label.fusionTooltip.push(fusionTooltip);
1728
+ }
1729
+ }
1730
+ }
1731
+ calculateStartAngle(chr, position) {
1732
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1733
+ if (index === -1) return null;
1734
+ const chromosome = this.reference.chromosomes[index];
1735
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1736
+ }
1737
+ calculateEndAngle(chr, position) {
1738
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1739
+ if (index === -1) return null;
1740
+ const chromosome = this.reference.chromosomes[index];
1741
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1742
+ }
1743
+ };
1744
+
1745
+ // plots/disco/label/Labels.ts
1746
+ var Labels = class extends Ring {
1747
+ constructor(settings, elements, hasPrioritizedGenes) {
1748
+ super(
1749
+ settings.rings.labelLinesInnerRadius,
1750
+ settings.rings.labelsToLinesDistance,
1751
+ elements.sort((a, b) => {
1752
+ return a.startAngle < b.startAngle ? -1 : a.startAngle > b.startAngle ? 1 : 0;
1753
+ })
1754
+ );
1755
+ this.elementsToDisplay = [];
1756
+ this.settings = settings;
1757
+ this.hasPrioritizedGenes = hasPrioritizedGenes;
1758
+ const circumference = 2 * Math.PI * (settings.rings.labelLinesInnerRadius + settings.rings.labelsToLinesDistance);
1759
+ this.overlapAngle = this.settings.label.overlapAngleFactor * this.settings.label.fontSize / circumference;
1760
+ this.calculateCollisions();
1761
+ }
1762
+ calculateCollisions() {
1763
+ this.collisions = [];
1764
+ let hasPrioritizedGenesList = [];
1765
+ hasPrioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1766
+ if (this.settings.label.prioritizeGeneLabelsByGeneSets) {
1767
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(hasPrioritizedGenesList);
1768
+ } else if (this.hasPrioritizedGenes) {
1769
+ const prioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1770
+ const filteredPrioritizedGenesList = this.getLabelsWithPrioritizedGenes(prioritizedGenesList);
1771
+ const withoutPrioritizedGenesList = this.elements.filter((label) => !label.isPrioritized);
1772
+ const combinedAndSortedList = [...withoutPrioritizedGenesList, ...filteredPrioritizedGenesList].sort(
1773
+ (a, b) => a.startAngle - b.startAngle
1774
+ );
1775
+ this.elementsToDisplay = this.getAllLabels(combinedAndSortedList);
1776
+ } else {
1777
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(this.elements);
1778
+ }
1779
+ }
1780
+ getLabelsWithPrioritizedGenes(elemenets) {
1781
+ const filteredList = [];
1782
+ let prev = { endAngle: 0 };
1783
+ elemenets.forEach((element, index) => {
1784
+ if (index == 0) {
1785
+ filteredList.push(element);
1786
+ prev = element;
1787
+ } else {
1788
+ const overlap = prev.endAngle - element.startAngle + this.overlapAngle;
1789
+ if (overlap > 0 && overlap < this.settings.label.maxDeltaAngle) {
1790
+ const labelCopy = LabelFactory.createMovedLabel(element, overlap);
1791
+ filteredList?.push(labelCopy);
1792
+ prev = labelCopy;
1793
+ }
1794
+ if (overlap <= 0) {
1795
+ filteredList.push(element);
1796
+ prev = element;
1797
+ }
1798
+ }
1799
+ });
1800
+ return filteredList;
1801
+ }
1802
+ getAllLabels(elemenets) {
1803
+ const filteredList = [];
1804
+ let prev = { endAngle: 0 };
1805
+ const elemenetsLength = elemenets.length;
1806
+ let lastCancerGeneLabelIndex = -1;
1807
+ for (let index = 0; index < elemenets.length; index++) {
1808
+ const element = elemenets[index];
1809
+ if (element.isPrioritized) {
1810
+ filteredList.push(element);
1811
+ lastCancerGeneLabelIndex = index;
1812
+ prev = element;
1813
+ continue;
1814
+ }
1815
+ if (index == 0) {
1816
+ if (elemenetsLength > 1) {
1817
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1818
+ continue;
1819
+ }
1820
+ filteredList.push(element);
1821
+ prev = element;
1822
+ }
1823
+ continue;
1824
+ }
1825
+ const prevOverlap = prev.endAngle - element.startAngle + this.overlapAngle;
1826
+ if (prevOverlap > 0 && prevOverlap < this.settings.label.maxDeltaAngle) {
1827
+ if (index == length - 1) {
1828
+ filteredList.push(element);
1829
+ continue;
1830
+ }
1831
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap)) {
1832
+ continue;
1833
+ }
1834
+ const labelCopy = LabelFactory.createMovedLabel(element, prevOverlap);
1835
+ this.collisions?.push(labelCopy);
1836
+ filteredList.push(element);
1837
+ prev = labelCopy;
1838
+ }
1839
+ if (prevOverlap <= 0) {
1840
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1841
+ continue;
1842
+ }
1843
+ filteredList.push(element);
1844
+ prev = element;
1845
+ }
1846
+ }
1847
+ return filteredList;
1848
+ }
1849
+ isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap) {
1850
+ const nextLabelWithCancerGene = this.getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex);
1851
+ if (nextLabelWithCancerGene) {
1852
+ const nextOverlap = element.endAngle + prevOverlap - nextLabelWithCancerGene.startAngle + this.overlapAngle;
1853
+ if (nextOverlap > 0) {
1854
+ return true;
1855
+ }
1856
+ }
1857
+ return false;
1858
+ }
1859
+ getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex) {
1860
+ return elemenets.find((label, index) => label.isPrioritized && index > lastCancerGeneLabelIndex);
1861
+ }
1862
+ };
1863
+
1864
+ // plots/disco/snv/NonExonicSnvArcsMapper.ts
1865
+ var NonExonicSnvArcsMapper = class {
1866
+ constructor(nonExonicInnerRadius, nonExonicWidht, sampleName, reference) {
1867
+ this.nonExonicInnerRadius = nonExonicInnerRadius;
1868
+ this.nonExonicWidht = nonExonicWidht;
1869
+ this.sampleName = sampleName;
1870
+ this.reference = reference;
1871
+ this.onePxArcAngle = 1 / nonExonicInnerRadius;
1872
+ }
1873
+ map(arcData) {
1874
+ const innerRadius = this.nonExonicInnerRadius;
1875
+ const outerRadius = innerRadius + this.nonExonicWidht;
1876
+ const arcs = [];
1877
+ arcData.forEach((data) => {
1878
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1879
+ const startAngle = this.calculateStartAngle(data);
1880
+ const endAngle = this.calculateEndAngle(data);
1881
+ if (startAngle === null || endAngle === null) return;
1882
+ const arc = {
1883
+ startAngle,
1884
+ endAngle,
1885
+ innerRadius,
1886
+ outerRadius,
1887
+ color: mLabel.color,
1888
+ text: data.gene,
1889
+ dataClass: mLabel.label,
1890
+ mname: data.mname,
1891
+ chr: data.chr,
1892
+ pos: data.position,
1893
+ vafs: data.vafs,
1894
+ sampleName: [data.sampleName]
1895
+ };
1896
+ arcs.push(arc);
1897
+ });
1898
+ return arcs;
1899
+ }
1900
+ calculateStartAngle(data) {
1901
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1902
+ if (index === -1) return null;
1903
+ const chromosome = this.reference.chromosomes[index];
1904
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size) - this.onePxArcAngle;
1905
+ }
1906
+ calculateEndAngle(data) {
1907
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1908
+ const chromosome = this.reference.chromosomes[index];
1909
+ return this.onePxArcAngle + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size);
1910
+ }
1911
+ };
1912
+
1913
+ // plots/disco/loh/GradientColorProvider.ts
1914
+ var GradientColorProvider = class {
1915
+ static provide(value) {
1916
+ const clampedValue = Math.min(Math.max(value, 0), 1);
1917
+ const colorValue = Math.round(clampedValue * 255);
1918
+ return `rgb(${colorValue}, ${colorValue}, ${colorValue})`;
1919
+ }
1920
+ };
1921
+
1922
+ // plots/disco/loh/LohArcMapper.ts
1923
+ var LohArcMapper = class {
1924
+ constructor(lohInnerRadius, lohWidth, sampleName, reference) {
1925
+ this.lohInnerRadius = lohInnerRadius;
1926
+ this.lohWidth = lohWidth;
1927
+ this.sampleName = sampleName;
1928
+ this.reference = reference;
1929
+ }
1930
+ map(arcData) {
1931
+ const arcs = [];
1932
+ arcData.forEach((data) => {
1933
+ const startAngle = this.calculateStartAngle(data);
1934
+ const endAngle = this.calculateEndAngle(data);
1935
+ if (startAngle === null || endAngle === null) return;
1936
+ const innerRadius = this.lohInnerRadius;
1937
+ const outerRadius = innerRadius + this.lohWidth;
1938
+ const color = GradientColorProvider.provide(data.segmean);
1939
+ const arc = {
1940
+ startAngle,
1941
+ endAngle,
1942
+ innerRadius,
1943
+ outerRadius,
1944
+ color,
1945
+ text: data.gene,
1946
+ chr: data.chr,
1947
+ start: data.start,
1948
+ stop: data.stop,
1949
+ value: data.segmean
1950
+ };
1951
+ arcs.push(arc);
1952
+ });
1953
+ return arcs;
1954
+ }
1955
+ calculateStartAngle(data) {
1956
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1957
+ if (index === -1) return null;
1958
+ const chromosome = this.reference.chromosomes[index];
1959
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1960
+ }
1961
+ calculateEndAngle(data) {
1962
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1963
+ const chromosome = this.reference.chromosomes[index];
1964
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1965
+ }
1966
+ };
1967
+
1968
+ // plots/disco/ring/Rings.ts
1969
+ var Rings = class {
1970
+ constructor(labelsRing, chromosomesRing, nonExonicArcRing, snvArcRing, cnvArcRing, lohArcRing, mutationWaterfallRing) {
1971
+ this.labelsRing = labelsRing;
1972
+ this.chromosomesRing = chromosomesRing;
1973
+ this.nonExonicArcRing = nonExonicArcRing;
1974
+ this.snvArcRing = snvArcRing;
1975
+ this.cnvArcRing = cnvArcRing;
1976
+ this.lohArcRing = lohArcRing;
1977
+ this.mutationWaterfallRing = mutationWaterfallRing;
1978
+ }
1979
+ };
1980
+
1981
+ // plots/disco/waterfall/MutationWaterfallMapper.ts
1982
+ var MutationWaterfallMapper = class {
1983
+ constructor(innerRadius, ringWidth, reference, logRange, color = "#4d4d4d") {
1984
+ this.innerRadius = innerRadius;
1985
+ this.ringWidth = ringWidth;
1986
+ this.reference = reference;
1987
+ this.logRange = logRange;
1988
+ this.color = color;
1989
+ }
1990
+ map(data = []) {
1991
+ if (!data.length) return [];
1992
+ const min = this.logRange?.min ?? 0;
1993
+ const max = this.logRange?.max ?? min + 1;
1994
+ const span = max - min || 1;
1995
+ const points = [];
1996
+ for (const datum of data) {
1997
+ const chrIndex = this.reference.chromosomesOrder.indexOf(datum.chr);
1998
+ if (chrIndex === -1) continue;
1999
+ const chromosome = this.reference.chromosomes[chrIndex];
2000
+ const chrAngleSpan = chromosome.endAngle - chromosome.startAngle;
2001
+ const relPos = chromosome.size > 0 ? datum.position / chromosome.size : 0;
2002
+ const angle = chromosome.startAngle + chrAngleSpan * relPos;
2003
+ const normalized = Math.max(0, Math.min(1, (datum.logDistance - min) / span));
2004
+ const radius = this.innerRadius + this.ringWidth * normalized;
2005
+ points.push({
2006
+ startAngle: angle,
2007
+ endAngle: angle,
2008
+ innerRadius: radius,
2009
+ outerRadius: radius,
2010
+ text: chromosome.text,
2011
+ color: this.color,
2012
+ chr: datum.chr,
2013
+ position: datum.position,
2014
+ logDistance: datum.logDistance,
2015
+ ringInnerRadius: this.innerRadius,
2016
+ ringWidth: this.ringWidth,
2017
+ rangeMin: min,
2018
+ rangeMax: max
2019
+ });
2020
+ }
2021
+ return points;
2022
+ }
2023
+ };
2024
+
2025
+ // plots/disco/viewmodel/ViewModelProvider.ts
2026
+ var ViewModelProvider = class {
2027
+ constructor(settings, dataMapper, reference, sampleName, genesetName, discoInteractions) {
2028
+ this.nonExonicArcRing = void 0;
2029
+ this.settings = settings;
2030
+ this.dataMapper = dataMapper;
2031
+ this.reference = reference;
2032
+ this.sampleName = sampleName;
2033
+ this.genesetName = genesetName;
2034
+ this.discoInteractions = discoInteractions;
2035
+ }
2036
+ map(data) {
2037
+ const dataHolder = this.dataMapper.map(data);
2038
+ let labelsRing;
2039
+ if (this.settings.Disco.showGeneNames) {
2040
+ const labelsMapper = new LabelsMapper(
2041
+ this.settings,
2042
+ this.sampleName,
2043
+ this.reference,
2044
+ dataHolder.cnvMaxPercentileAbs
2045
+ );
2046
+ const labelsData = labelsMapper.map(dataHolder.labelData, dataHolder.cnvData);
2047
+ labelsRing = new Labels(this.settings, labelsData, dataHolder.hasPrioritizedGenes);
2048
+ } else {
2049
+ labelsRing = new Labels(this.settings, [], false);
2050
+ }
2051
+ const chromosomesRing = new Ring(
2052
+ this.settings.rings.chromosomeInnerRadius,
2053
+ this.settings.rings.chromosomeWidth,
2054
+ this.reference.chromosomes
2055
+ );
2056
+ const nonExonicSnvArcsMapper = new NonExonicSnvArcsMapper(
2057
+ dataHolder.nonExonicInnerRadius,
2058
+ this.settings.rings.nonExonicRingWidth,
2059
+ this.sampleName,
2060
+ this.reference
2061
+ );
2062
+ const nonExonicData = nonExonicSnvArcsMapper.map(dataHolder.nonExonicSnvData);
2063
+ if (nonExonicData.length > 0) {
2064
+ this.nonExonicArcRing = new Ring(
2065
+ dataHolder.nonExonicInnerRadius,
2066
+ this.settings.rings.nonExonicRingWidth,
2067
+ nonExonicData
2068
+ );
2069
+ }
2070
+ this.snvArcsMapper = new SnvArcsMapper(
2071
+ dataHolder.snvInnerRadius,
2072
+ this.settings.rings.snvRingWidth,
2073
+ this.sampleName,
2074
+ this.reference
2075
+ );
2076
+ const snvData = this.snvArcsMapper.map(dataHolder.snvRingDataMap);
2077
+ if (snvData.length > 0) {
2078
+ this.snvArcRing = new Ring(dataHolder.snvInnerRadius, this.settings.rings.snvRingWidth, snvData);
2079
+ }
2080
+ const lohMapper = new LohArcMapper(
2081
+ dataHolder.lohInnerRadius,
2082
+ this.settings.rings.lohRingWidth,
2083
+ this.sampleName,
2084
+ this.reference
2085
+ );
2086
+ const lohData = lohMapper.map(dataHolder.lohData);
2087
+ if (lohData.length > 0) {
2088
+ this.lohArcRing = new Ring(dataHolder.lohInnerRadius, this.settings.rings.lohRingWidth, lohData);
2089
+ }
2090
+ this.cnvArcsMapper = new CnvArcsMapper(
2091
+ dataHolder.cnvInnerRadius,
2092
+ this.settings.rings.cnvRingWidth,
2093
+ this.settings,
2094
+ this.sampleName,
2095
+ this.reference,
2096
+ dataHolder.percentilePositive,
2097
+ dataHolder.percentileNegative,
2098
+ dataHolder.cappedCnvMaxAbsValue,
2099
+ dataHolder.cnvMaxPercentileAbs,
2100
+ this.settings.cnv.unit,
2101
+ this.settings.Disco.cnvRenderingType
2102
+ );
2103
+ const cnvData = this.cnvArcsMapper.map(dataHolder.cnvData);
2104
+ if (cnvData.length > 0) {
2105
+ this.cnvArcRing = new Ring(dataHolder.cnvInnerRadius, this.settings.rings.cnvRingWidth, cnvData);
2106
+ }
2107
+ if (this.settings.Disco.mutationWaterfallPlot && dataHolder.mutationWaterfallData?.length && dataHolder.mutationWaterfallInnerRadius !== void 0 && //Added this check to prevent TypeScript error "mutationWaterfallInnerRadius might be undefined"
2108
+ (dataHolder.mutationWaterfallInnerRadius ?? 0) > 0 && dataHolder.mutationWaterfallLogRange) {
2109
+ const mutationWaterfallMapper = new MutationWaterfallMapper(
2110
+ dataHolder.mutationWaterfallInnerRadius,
2111
+ this.settings.rings.mutationWaterfallRingWidth,
2112
+ this.reference,
2113
+ dataHolder.mutationWaterfallLogRange,
2114
+ this.settings.Disco.mutationWaterfallColor || "#4d4d4d"
2115
+ );
2116
+ const waterfallData = mutationWaterfallMapper.map(dataHolder.mutationWaterfallData);
2117
+ if (waterfallData.length > 0) {
2118
+ this.mutationWaterfallRing = new Ring(
2119
+ dataHolder.mutationWaterfallInnerRadius,
2120
+ this.settings.rings.mutationWaterfallRingWidth,
2121
+ waterfallData
2122
+ );
2123
+ }
2124
+ }
2125
+ const fusionMapper = new FusionMapper(dataHolder.fusionRadius, this.sampleName, this.reference);
2126
+ const fusions = fusionMapper.map(dataHolder.fusionData);
2127
+ let lohLegend;
2128
+ if (this.settings.legend.lohLegendEnabled && dataHolder.lohData.length) {
2129
+ lohLegend = new LohLegend(dataHolder.lohData.length);
2130
+ }
2131
+ const fusionLegendCounts = fusions.reduce(
2132
+ (counts, fusion) => {
2133
+ if (fusion.target && fusion.source.positionInChromosome.chromosome == fusion.target.positionInChromosome.chromosome)
2134
+ counts.intrachromosomal++;
2135
+ else counts.interchromosomal++;
2136
+ return counts;
2137
+ },
2138
+ { interchromosomal: 0, intrachromosomal: 0 }
2139
+ );
2140
+ const legend = new Legend(
2141
+ this.settings.legend.snvTitle,
2142
+ this.settings.legend.cnvTitle,
2143
+ this.settings.legend.lohTitle,
2144
+ this.settings.legend.fusionTitle,
2145
+ this.settings.Disco.cnvPercentile,
2146
+ this.settings.Disco.cnvCutoffMode,
2147
+ this.snvArcsMapper ? this.snvArcsMapper.snvClassMap : /* @__PURE__ */ new Map(),
2148
+ this.cnvArcsMapper ? this.cnvArcsMapper.cnvClassMap : /* @__PURE__ */ new Map(),
2149
+ this.settings.Disco.cnvRenderingType,
2150
+ fusions.length > 0,
2151
+ this.discoInteractions,
2152
+ lohLegend,
2153
+ this.settings.Disco.mutationWaterfallPlot && this.mutationWaterfallRing ? {
2154
+ color: this.settings.Disco.mutationWaterfallColor || "#4d4d4d",
2155
+ onColorChange: this.discoInteractions.onMutationWaterfallColorChange
2156
+ } : void 0,
2157
+ fusionLegendCounts,
2158
+ dataHolder.cnvData.filter((event) => event.dt == dtcnv).length
2159
+ );
2160
+ const rings = new Rings(
2161
+ labelsRing,
2162
+ chromosomesRing,
2163
+ this.nonExonicArcRing,
2164
+ this.snvArcRing,
2165
+ this.cnvArcRing,
2166
+ this.lohArcRing,
2167
+ this.mutationWaterfallRing
2168
+ );
2169
+ return new ViewModel(
2170
+ this.settings,
2171
+ rings,
2172
+ legend,
2173
+ fusions,
2174
+ dataHolder,
2175
+ this.genesetName,
2176
+ data.filter((i) => i.dt == dtsnvindel).length
2177
+ );
2178
+ }
2179
+ };
2180
+
2181
+ // plots/disco/viewmodel/ViewModelMapper.ts
2182
+ var ViewModelMapper = class _ViewModelMapper {
2183
+ static {
2184
+ this.snvClassLayer = {
2185
+ M: "exonic",
2186
+ E: "exonic",
2187
+ F: "exonic",
2188
+ N: "exonic",
2189
+ S: "exonic",
2190
+ D: "exonic",
2191
+ I: "exonic",
2192
+ P: "exonic",
2193
+ L: "exonic",
2194
+ Utr3: "exonic",
2195
+ Utr5: "exonic",
2196
+ ProteinAltering: "exonic",
2197
+ mnv: "non-exonic",
2198
+ ITD: "non-exonic",
2199
+ insertion: "non-exonic",
2200
+ deletion: "non-exonic",
2201
+ Intron: "non-exonic",
2202
+ X: "non-exonic",
2203
+ noncoding: "non-exonic"
2204
+ };
2205
+ }
2206
+ constructor(settings, discoInteractions) {
2207
+ this.settings = JSON.parse(JSON.stringify(settings));
2208
+ this.discoInteractions = discoInteractions;
2209
+ }
2210
+ applyRadius() {
2211
+ const radius = this.settings.Disco.radius;
2212
+ if (!radius) return;
2213
+ const scale = radius / this.settings.rings.labelLinesInnerRadius;
2214
+ this.settings.rings.labelLinesInnerRadius *= scale;
2215
+ this.settings.rings.labelsToLinesDistance *= scale;
2216
+ this.settings.rings.chromosomeInnerRadius *= scale;
2217
+ }
2218
+ static computeDynamicRadius(data) {
2219
+ let ringCount = 0;
2220
+ if (data.some((d) => d.dt == dtsnvindel)) ringCount++;
2221
+ if (data.some((d) => d.dt == dtcnv || d.dt == dtitd)) ringCount++;
2222
+ if (data.some((d) => d.dt == dtloh)) ringCount++;
2223
+ if (ringCount <= 1) return 200;
2224
+ if (ringCount == 2) return 250;
2225
+ return 300;
2226
+ }
2227
+ map(opts) {
2228
+ const chrSizes = opts.args.genome.majorchr;
2229
+ const chromosomesOverride = {};
2230
+ for (const chr of Object.keys(chrSizes)) {
2231
+ if (!this.settings.Disco.hiddenChromosomes.includes(chr)) {
2232
+ chromosomesOverride[chr] = chrSizes[chr];
2233
+ }
2234
+ }
2235
+ const sampleName = opts.args.sampleName;
2236
+ const genome = opts.args.genome;
2237
+ const prioritizedGenes = genome?.geneset?.[0] ? genome.geneset[0].lst : [];
2238
+ const genesetName = genome?.geneset?.[0] ? genome.geneset[0].name : "";
2239
+ const data = opts.args.data;
2240
+ if (this.settings.Disco.autoRadius) {
2241
+ this.settings.Disco.radius = _ViewModelMapper.computeDynamicRadius(data);
2242
+ }
2243
+ this.applyRadius();
2244
+ const reference = new Reference(this.settings, chrSizes, chromosomesOverride);
2245
+ const dataMapper = new DataMapper(this.settings, reference, sampleName, prioritizedGenes);
2246
+ return new ViewModelProvider(
2247
+ this.settings,
2248
+ dataMapper,
2249
+ reference,
2250
+ sampleName,
2251
+ genesetName,
2252
+ this.discoInteractions
2253
+ ).map(data);
2254
+ }
2255
+ };
2256
+
2257
+ // plots/disco/legend/LegendJSONMapper.ts
2258
+ var LegendJSONMapper = class {
2259
+ constructor(cappedCnvMaxAbsValue) {
2260
+ this.cappedCnvMaxAbsValue = cappedCnvMaxAbsValue;
2261
+ }
2262
+ map(legend) {
2263
+ const legendJSON = [];
2264
+ let order = 0;
2265
+ if (legend.snvClassMap) {
2266
+ this.mapSnv(legend, legendJSON, order++);
2267
+ }
2268
+ if (legend.cnvCount > 0 && legend.cnvRenderingType == "heatmap" /* heatmap */) {
2269
+ this.mapCnvHeatmap(legend, legendJSON, order++);
2270
+ } else if (legend.cnvCount > 0 && legend.cnvRenderingType == "bar" /* bar */) {
2271
+ if (legend.cnvClassMap) {
2272
+ this.mapCnvBar(legend, legendJSON, order++);
2273
+ }
2274
+ }
2275
+ if (legend.cnvClassMap.has(4 /* ITD */)) {
2276
+ this.mapItd(legend, legendJSON, order++);
2277
+ }
2278
+ if (legend.lohLegend) {
2279
+ this.mapLoh(legend, legendJSON, order++);
2280
+ }
2281
+ if (legend.fusionLegend) {
2282
+ this.mapFusion(legend, legendJSON, order++);
2283
+ }
2284
+ if (legend.mutationWaterfallLegend) {
2285
+ this.mapMutationWaterfall(legend, legendJSON, order++);
2286
+ }
2287
+ return legendJSON;
2288
+ }
2289
+ mapSnv(legend, legendJSON, order) {
2290
+ const snvItems = [];
2291
+ let snvOrder = 0;
2292
+ for (const [snvKey, snvLegendElement] of legend.snvClassMap) {
2293
+ snvItems.push({
2294
+ termid: legend.snvTitle,
2295
+ key: snvKey,
2296
+ text: `${snvLegendElement.snvType} (${snvLegendElement.count})`,
2297
+ color: snvLegendElement.color,
2298
+ order: snvOrder++
2299
+ });
2300
+ }
2301
+ legendJSON.push({
2302
+ name: legend.snvTitle,
2303
+ order,
2304
+ items: snvItems
2305
+ });
2306
+ }
2307
+ mapCnvBar(legend, legendJSON, order) {
2308
+ if (!legend.cnvClassMap) return;
2309
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2310
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2311
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2312
+ if (gain && loss && cap) {
2313
+ let cnvOrder = 0;
2314
+ const cnvItems = [];
2315
+ if (gain.value > 0) {
2316
+ cnvItems.push({
2317
+ termid: legend.cnvTitle,
2318
+ key: 1 /* Gain */,
2319
+ text: `Max: ${gain.value}`,
2320
+ color: gain.color,
2321
+ order: cnvOrder++
2322
+ });
2323
+ }
2324
+ if (loss.value < 0) {
2325
+ cnvItems.push({
2326
+ termid: legend.cnvTitle,
2327
+ key: 0 /* Loss */,
2328
+ text: `Min: ${loss.value}`,
2329
+ color: loss.color,
2330
+ order: cnvOrder++
2331
+ });
2332
+ }
2333
+ cnvItems.push({
2334
+ termid: legend.cnvTitle,
2335
+ key: 2 /* Cap */,
2336
+ text: `Capping: ${cap.value}`,
2337
+ color: cap.color,
2338
+ order: cnvOrder++
2339
+ // ,
2340
+ // onClickCallback: this.onClickCallback
2341
+ });
2342
+ legendJSON.push({
2343
+ name: legend.cnvTitle,
2344
+ id: "sjpp-disco-cnv-legend",
2345
+ order,
2346
+ items: cnvItems
2347
+ });
2348
+ }
2349
+ }
2350
+ mapCnvHeatmap(legend, legendJSON, order) {
2351
+ if (!legend.cnvClassMap) return;
2352
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2353
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2354
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2355
+ if (gain && loss && cap) {
2356
+ let cnvOrder = 0;
2357
+ const cnvItems = [];
2358
+ const base = {
2359
+ termid: legend.cnvTitle,
2360
+ width: 100,
2361
+ order: cnvOrder++,
2362
+ isLegendItem: true,
2363
+ dt: 4
2364
+ };
2365
+ if (gain.value > 0 && loss.value < 0) {
2366
+ const maxValue = Math.max(Math.abs(loss.value), gain.value);
2367
+ const domain = [-maxValue, 0, maxValue];
2368
+ cnvItems.push(
2369
+ Object.assign(
2370
+ {
2371
+ key: 3 /* LossGain */,
2372
+ domain,
2373
+ scale: linear([-1, 0, 1], [loss.color, "white", gain.color]),
2374
+ labels: { left: "Loss", right: "Gain" },
2375
+ numericInputs: {
2376
+ cutoffMode: legend.cnvCutoffMode,
2377
+ defaultPercentile: legend.cnvPercentile,
2378
+ callback: (obj) => legend.discoInteractions.colorScaleNumericInputsCallback(obj)
2379
+ }
2380
+ },
2381
+ base
2382
+ )
2383
+ );
2384
+ } else {
2385
+ if (gain.value > 0) {
2386
+ cnvItems.push(
2387
+ Object.assign(
2388
+ {
2389
+ key: 1 /* Gain */,
2390
+ text: "Copy number gain",
2391
+ domain: [0, gain.value],
2392
+ scale: linear([0, 1], ["white", gain.color])
2393
+ },
2394
+ base
2395
+ )
2396
+ );
2397
+ }
2398
+ if (loss.value < 0) {
2399
+ cnvItems.push(
2400
+ Object.assign(
2401
+ {
2402
+ key: 0 /* Loss */,
2403
+ text: "Copy number loss",
2404
+ domain: [loss.value, 0],
2405
+ scale: linear([0, 1], [loss.color, "white"])
2406
+ },
2407
+ base
2408
+ )
2409
+ );
2410
+ }
2411
+ }
2412
+ legendJSON.push({
2413
+ name: legend.cnvTitle,
2414
+ order,
2415
+ id: "sjpp-disco-cnv-legend",
2416
+ items: cnvItems
2417
+ });
2418
+ }
2419
+ }
2420
+ mapItd(legend, legendJSON, order) {
2421
+ const itd = legend.cnvClassMap.get(4 /* ITD */);
2422
+ if (!itd) return;
2423
+ legendJSON.push({
2424
+ name: "ITD",
2425
+ order,
2426
+ items: [
2427
+ {
2428
+ termid: "ITD",
2429
+ key: 4 /* ITD */,
2430
+ text: `ITD (${itd.value})`,
2431
+ color: itd.color,
2432
+ order: 0
2433
+ }
2434
+ ]
2435
+ });
2436
+ }
2437
+ mapLoh(legend, legendJSON, order) {
2438
+ if (!legend.lohLegend) return;
2439
+ legendJSON.push({
2440
+ name: legend.lohTitle,
2441
+ order,
2442
+ items: [
2443
+ {
2444
+ termid: legend.lohTitle,
2445
+ key: "count",
2446
+ text: `LOH (${legend.lohLegend.count})`,
2447
+ skipIcon: true,
2448
+ order: 0
2449
+ }
2450
+ ]
2451
+ });
2452
+ }
2453
+ mapFusion(legend, legendJSON, order) {
2454
+ const fusionItems = [];
2455
+ fusionItems.push({
2456
+ termid: legend.fusionTitle,
2457
+ key: "#6A3D9A" /* Interchromosomal */,
2458
+ text: `Interchromosomal (${legend.fusionLegendCounts.interchromosomal})`,
2459
+ color: "#6A3D9A" /* Interchromosomal */.valueOf(),
2460
+ order: 0
2461
+ });
2462
+ fusionItems.push({
2463
+ termid: legend.fusionTitle,
2464
+ key: "#1B9E77" /* Intrachromosomal */,
2465
+ text: `Intrachromosomal (${legend.fusionLegendCounts.intrachromosomal})`,
2466
+ color: "#1B9E77" /* Intrachromosomal */.valueOf(),
2467
+ order: 1
2468
+ });
2469
+ legendJSON.push({
2470
+ name: legend.fusionTitle,
2471
+ order,
2472
+ items: fusionItems
2473
+ });
2474
+ }
2475
+ mapMutationWaterfall(legend, legendJSON, order) {
2476
+ if (!legend.mutationWaterfallLegend) return;
2477
+ const waterfallItems = [];
2478
+ waterfallItems.push({
2479
+ termid: "Mutation Waterfall Plot",
2480
+ key: "mutation-waterfall-color",
2481
+ text: "Dot color",
2482
+ color: legend.mutationWaterfallLegend.color,
2483
+ order: 0,
2484
+ colorPicker: true,
2485
+ inputWidth: 28,
2486
+ width: 0,
2487
+ onColorChange: legend.mutationWaterfallLegend.onColorChange
2488
+ });
2489
+ waterfallItems.push({
2490
+ termid: "Mutation Waterfall Plot",
2491
+ key: "mutation-waterfall-axis",
2492
+ text: "Axis: log10 intermutation distance",
2493
+ order: 1,
2494
+ skipIcon: true,
2495
+ width: 0
2496
+ });
2497
+ legendJSON.push({
2498
+ name: "Mutation Waterfall Plot",
2499
+ order,
2500
+ items: waterfallItems
2501
+ });
2502
+ }
2503
+ };
2504
+
2505
+ // plots/disco/cnv/renderCnvSourceLegend.ts
2506
+ function parseSetLabel(set, index) {
2507
+ let text = set.name || `Set ${index + 1}`;
2508
+ let href;
2509
+ let target = "_blank";
2510
+ if (set.nameHtml) {
2511
+ const parser = new DOMParser();
2512
+ const doc = parser.parseFromString(set.nameHtml, "text/html");
2513
+ const anchor = doc.querySelector("a");
2514
+ if (anchor) {
2515
+ href = anchor.getAttribute("href") || void 0;
2516
+ target = anchor.getAttribute("target") || "_blank";
2517
+ text = anchor.textContent?.trim() || text;
2518
+ } else {
2519
+ text = doc.body.textContent?.trim() || text;
2520
+ }
2521
+ }
2522
+ return { text, href, target };
2523
+ }
2524
+ function renderCnvSourceLegend(legendG, datasets, fontSize, onChange) {
2525
+ if (!legendG || legendG.empty()) throw new Error("legendG is required");
2526
+ if (!datasets || datasets.length === 0) throw new Error("at least one dataset is required");
2527
+ legendG.select("g.sjpp-cnv-source").remove();
2528
+ const gBBox = legendG.node().getBBox();
2529
+ const cnvSrcWrapper = legendG.append("g").attr("class", "sjpp-cnv-source").attr("transform", `translate(${gBBox.width},${gBBox.y + fontSize})`);
2530
+ const btnPaddingX = Math.round(fontSize * 0.8);
2531
+ const btnHgt = Math.round(fontSize * 1.8);
2532
+ const btnWrapper = cnvSrcWrapper.append("g").attr("transform", `translate(${fontSize},${-btnHgt / 2})`).style("cursor", "pointer").on("click", function(event) {
2533
+ event.stopPropagation();
2534
+ showCnvMenu(this);
2535
+ });
2536
+ 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());
2537
+ const textW = btnText.node() ? Math.ceil(btnText.node().getBBox().width) : 0;
2538
+ const btnWdt = textW + btnPaddingX * 2;
2539
+ btnWrapper.insert("rect", ":first-child").attr("width", btnWdt).attr("height", btnHgt).attr("rx", 10).attr("ry", 10).style("fill", "#f2f2f2");
2540
+ btnText.attr("x", btnWdt / 2).attr("text-anchor", "middle");
2541
+ const cnvMenu = new Menu({
2542
+ onHide: () => {
2543
+ btnText.text("Select source \u25B2".toUpperCase());
2544
+ }
2545
+ });
2546
+ function showCnvMenu(dom) {
2547
+ btnText.text("Select source \u25BC".toUpperCase());
2548
+ cnvMenu.clear().showunder(dom);
2549
+ cnvMenu.d.append("div").text("Choose data source for CNV:").style("margin", "5px 5px 0 5px");
2550
+ const tableHolder = cnvMenu.d.append("div").style("padding", "5px");
2551
+ const { columns, rows } = buildTableData(datasets);
2552
+ const [, activeIndex] = getActiveDataset(datasets);
2553
+ renderTable({
2554
+ columns,
2555
+ rows,
2556
+ div: tableHolder,
2557
+ singleMode: true,
2558
+ maxWidth: "70vw",
2559
+ maxHeight: "60vh",
2560
+ selectedRows: [activeIndex],
2561
+ header: { allowSort: false },
2562
+ noButtonCallback: (rowIndex, node) => {
2563
+ const inputIndex = Number(node?.value);
2564
+ const selectedIndex = Number.isNaN(inputIndex) ? rowIndex : inputIndex;
2565
+ if (!Number.isNaN(selectedIndex)) onChange(selectedIndex);
2566
+ cnvMenu.hide();
2567
+ }
2568
+ });
2569
+ }
2570
+ }
2571
+ function getActiveDataset(datasets) {
2572
+ let currentIndex = datasets.findIndex((d) => d.inuse);
2573
+ if (currentIndex == -1) currentIndex = 0;
2574
+ return [datasets[currentIndex], currentIndex];
2575
+ }
2576
+ function buildTableData(datasets) {
2577
+ const attrKeys = [];
2578
+ for (const set of datasets) {
2579
+ if (!set.attrs) continue;
2580
+ for (const key of Object.keys(set.attrs)) {
2581
+ if (!attrKeys.includes(key)) attrKeys.push(key);
2582
+ }
2583
+ }
2584
+ const columns = [{ label: "Source" }];
2585
+ for (const key of attrKeys) columns.push({ label: key });
2586
+ const rows = datasets.map((set, index) => {
2587
+ const sourceInfo = parseSetLabel(set, index);
2588
+ const cells = [];
2589
+ if (set.nameHtml) cells.push({ html: set.nameHtml });
2590
+ else if (sourceInfo.href) cells.push({ value: sourceInfo.text, url: sourceInfo.href });
2591
+ else cells.push({ value: sourceInfo.text });
2592
+ for (const key of attrKeys) {
2593
+ const value = set.attrs?.[key];
2594
+ cells.push({ value: value ?? "" });
2595
+ }
2596
+ return cells;
2597
+ });
2598
+ return { columns, rows };
2599
+ }
2600
+
2601
+ // plots/disco/legend/LegendRenderer.ts
2602
+ var LegendRenderer = class {
2603
+ constructor(cappedCnvMaxAbsValue = 0, fontSize) {
2604
+ this.fontSize = fontSize;
2605
+ this.legendJSONMapper = new LegendJSONMapper(cappedCnvMaxAbsValue);
2606
+ }
2607
+ render(holder, legend, xOffset, svgw, svgh, viewModel, onCnvSourceSelect) {
2608
+ const svgLegendRenderer = svgLegend({
2609
+ holder: holder.append("g").attr("data-testid", "sjpp_disco_plot_legend"),
2610
+ rectFillFxn: (d2) => d2.color,
2611
+ iconStroke: "#aaa"
2612
+ });
2613
+ const data = this.legendJSONMapper.map(legend);
2614
+ const legendTitles = data.map((d2) => d2.name.trim());
2615
+ const maxLabelWidth = getMaxLabelWidth(holder, legendTitles);
2616
+ const d = {
2617
+ xOffset: maxLabelWidth + xOffset
2618
+ };
2619
+ svgLegendRenderer(data, {
2620
+ settings: Object.assign(
2621
+ {},
2622
+ {
2623
+ svgw,
2624
+ svgh,
2625
+ dimensions: d,
2626
+ fontsize: this.fontSize
2627
+ }
2628
+ )
2629
+ });
2630
+ const altCnv = viewModel.appState.args.alternativeDataByDt?.[dtcnv];
2631
+ if (altCnv && altCnv.length > 0) {
2632
+ const legendG = holder.select('g[data-testid="sjpp_disco_plot_legend"]');
2633
+ const cnvLegendG = legendG.select("#sjpp-disco-cnv-legend");
2634
+ if (!legendG.empty()) {
2635
+ const add2G = cnvLegendG.empty() ? legendG : cnvLegendG;
2636
+ renderCnvSourceLegend(add2G, altCnv, this.fontSize, onCnvSourceSelect);
2637
+ }
2638
+ }
2639
+ }
2640
+ };
2641
+
2642
+ // plots/disco/chromosome/ChromosomesRenderer.ts
2643
+ var ChromosomesRenderer = class {
2644
+ constructor(padAngle, innerRadius, outerRadius, fontSize) {
2645
+ this.padAngle = padAngle;
2646
+ this.innerRadius = innerRadius;
2647
+ this.outerRadius = outerRadius;
2648
+ this.fontSize = fontSize;
2649
+ }
2650
+ render(holder, elements) {
2651
+ const pie = pie_default().padAngle(this.padAngle).value((d) => d.size).sort(null);
2652
+ const arcData = pie(elements);
2653
+ const arc = arc_default().innerRadius(this.innerRadius).outerRadius(this.outerRadius);
2654
+ const arcs = holder.append("g").attr("data-testid", "sjpp_chromosomes_arc_group");
2655
+ const menu = MenuProvider.create();
2656
+ arcs.selectAll("path").data(arcData).enter().append("path").attr("d", arc).attr("fill", "black").on("mousemove", (event, d) => {
2657
+ const [x, y] = pointer_default(event, arcs.node());
2658
+ let angle = Math.atan2(y, x) + Math.PI / 2;
2659
+ if (angle < 0) angle += 2 * Math.PI;
2660
+ const frac = Math.max(0, Math.min(1, (angle - d.data.startAngle) / (d.data.endAngle - d.data.startAngle)));
2661
+ const pos = Math.round(frac * d.data.size);
2662
+ menu.d.html(`<span style="font-size:.8em">chr${d.data.text}</span> ${bplen(pos)}`).style("padding", "5px");
2663
+ menu.show(event.x, event.y);
2664
+ }).on("mouseenter", (event) => {
2665
+ select_default(event.currentTarget).attr("stroke", "orange").attr("stroke-width", 1);
2666
+ }).on("mouseleave", (event) => {
2667
+ select_default(event.currentTarget).attr("stroke", null).attr("stroke-width", null);
2668
+ menu.hide();
2669
+ });
2670
+ arcs.selectAll("text").data(arcData).enter().append("text").attr("transform", (d) => {
2671
+ return `translate(${arc.centroid(d)}) rotate(${d.data.angle * 180 / Math.PI - 90})${d.data.angle > Math.PI ? "rotate(180)" : ""}`;
2672
+ }).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");
2673
+ }
2674
+ };
2675
+
2676
+ // plots/disco/label/LabelsRenderer.ts
2677
+ var LabelsRenderer = class {
2678
+ constructor(animationDuration, fontSize, geneClickListener, genomeName, intervalEvents = [], geneLookup = async (gene, genome) => await dofetch3("genelookup", { body: { deep: 1, input: gene, genome } })) {
2679
+ this.geneCoordinatesCache = /* @__PURE__ */ new Map();
2680
+ this.hoverRequestId = 0;
2681
+ this.animationDuration = animationDuration;
2682
+ this.fontSize = fontSize;
2683
+ this.geneClickListener = geneClickListener;
2684
+ this.genomeName = genomeName;
2685
+ this.intervalEvents = intervalEvents;
2686
+ this.geneLookup = geneLookup;
2687
+ }
2688
+ render(holder, elements, collisions) {
2689
+ const labelsG = holder.append("g");
2690
+ const lineFunction = line_default().x((point) => point.x).y((point) => point.y);
2691
+ const menu = MenuProvider.create();
2692
+ labelsG.selectAll(".group").data(elements).enter().append("g").attr("class", "group").each((label, i, nodes) => {
2693
+ const g = select_default(nodes[i]);
2694
+ 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", () => {
2695
+ if (label.mutationsTooltip) {
2696
+ this.geneClickListener(
2697
+ label.text,
2698
+ label.mutationsTooltip.map((value) => value.mname)
2699
+ );
2700
+ }
2701
+ }).on("mouseover", async (mouseEvent) => {
2702
+ const requestId = ++this.hoverRequestId;
2703
+ this.renderTooltip(menu, label);
2704
+ menu.show(mouseEvent.x, mouseEvent.y);
2705
+ const coordinates = await this.getGeneCoordinates(label);
2706
+ if (requestId != this.hoverRequestId || !coordinates) return;
2707
+ const overlappingEvents = this.intervalEvents.filter(
2708
+ (event) => this.sameChromosome(event.chr, coordinates.chr) && coordinates.stop >= event.start && event.stop >= coordinates.start
2709
+ );
2710
+ this.renderTooltip(menu, label, overlappingEvents);
2711
+ }).on("mouseout", () => {
2712
+ this.hoverRequestId++;
2713
+ menu.clear();
2714
+ menu.hide();
2715
+ });
2716
+ g.append("path").attr("class", "chord-tick").datum(label.line.points).style("stroke", label.color).style("fill", "none").attr("d", lineFunction);
2717
+ });
2718
+ labelsG.selectAll(".group").each((label, i, nodes) => {
2719
+ const collision = collisions ? collisions.find((l) => l.text === label.text) : void 0;
2720
+ if (collision) {
2721
+ const g = select_default(nodes[i]);
2722
+ g.selectAll(".chord-text").datum(collision).transition().duration(this.animationDuration).attr("transform", collision.transform).style("text-anchor", collision.textAnchor);
2723
+ g.selectAll(".chord-tick").datum(collision.line.points).transition().duration(this.animationDuration).style("fill", "none").attr("d", lineFunction);
2724
+ }
2725
+ });
2726
+ }
2727
+ renderTooltip(menu, label, intervalEvents = label.cnvTooltip) {
2728
+ menu.clear();
2729
+ const table = table2col({ holder: menu.d });
2730
+ this.createTooltip(table, label, intervalEvents);
2731
+ }
2732
+ async getGeneCoordinates(label) {
2733
+ if (!this.genomeName || !this.intervalEvents.length) return;
2734
+ const cacheKey = `${this.genomeName}:${label.text}:${label.chr}`;
2735
+ let lookup = this.geneCoordinatesCache.get(cacheKey);
2736
+ if (!lookup) {
2737
+ lookup = this.lookupGeneCoordinates(label);
2738
+ this.geneCoordinatesCache.set(cacheKey, lookup);
2739
+ }
2740
+ return await lookup;
2741
+ }
2742
+ async lookupGeneCoordinates(label) {
2743
+ try {
2744
+ const response = await this.geneLookup(label.text, this.genomeName);
2745
+ if (response?.error || !Array.isArray(response?.gmlst)) return;
2746
+ const models = response.gmlst.filter(
2747
+ (model) => this.sameChromosome(model.chr, label.chr) && Number.isFinite(model.start) && Number.isFinite(model.stop)
2748
+ );
2749
+ if (!models.length) return;
2750
+ return {
2751
+ chr: models[0].chr,
2752
+ start: Math.min(...models.map((model) => model.start)),
2753
+ stop: Math.max(...models.map((model) => model.stop))
2754
+ };
2755
+ } catch {
2756
+ return;
2757
+ }
2758
+ }
2759
+ sameChromosome(a, b) {
2760
+ return a?.replace(/^chr/i, "").toLowerCase() == b?.replace(/^chr/i, "").toLowerCase();
2761
+ }
2762
+ createTooltip(table, label, intervalEvents = label.cnvTooltip) {
2763
+ if (label.mutationsTooltip) {
2764
+ const [td1, td2] = table.addRow();
2765
+ td1.text("Gene");
2766
+ td2.append("span").style("margin-left", "5px").text(label.text);
2767
+ label.mutationsTooltip.forEach((mutation) => {
2768
+ {
2769
+ const [td12, td22] = table.addRow();
2770
+ td12.text("Mutation");
2771
+ 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}`);
2772
+ if (hasAnyValidVafEntry(mutation.vafs)) {
2773
+ appendVafBars(td22, mutation.vafs);
2774
+ }
2775
+ }
2776
+ });
2777
+ }
2778
+ if (label.fusionTooltip) {
2779
+ const [td1, td2] = table.addRow();
2780
+ td1.text("Data type");
2781
+ td2.append("span").text("Fusion transcript");
2782
+ label.fusionTooltip.forEach((fusionTooltip) => {
2783
+ const [td12, td22] = table.addRow();
2784
+ td12.text("Position");
2785
+ td22.append("span").text(
2786
+ ` ${fusionTooltip.geneA ? fusionTooltip.geneA : "?"} ${fusionTooltip.chrA}:${fusionTooltip.posA}
2787
+ ${fusionTooltip.strandA == "+" ? "forward" : "reverse"} > ${fusionTooltip.geneB ? fusionTooltip.geneB : "?"} ${fusionTooltip.chrB}:${fusionTooltip.posB} ${fusionTooltip.strandB == "+" ? "forward" : "reverse"} `
2788
+ );
2789
+ });
2790
+ }
2791
+ if (intervalEvents) {
2792
+ intervalEvents.forEach((cnv) => {
2793
+ const [td1, td2] = table.addRow();
2794
+ td1.text(cnv.dt == dtitd ? "ITD" : cnv.dt == dtloh ? "LOH" : "CNV");
2795
+ td2.append("span").style("margin-left", "5px").style("background-color", cnv.color).html("&nbsp;&nbsp;");
2796
+ if (cnv.dt != dtitd && cnv.dt != dtloh) td2.append("span").style("margin-left", "7.5px").text(cnv.value);
2797
+ td2.append("span").style("margin-left", "7.5px").style("font-size", "0.8em").text(`${cnv.chr}:${cnv.start}-${cnv.stop}`);
2798
+ });
2799
+ }
2800
+ }
2801
+ };
2802
+
2803
+ // plots/disco/defaults.ts
2804
+ function discoDefaults(overrides = {}, app) {
2805
+ const hiddenChromosomes = [];
2806
+ if (app?.vocabApi?.termdbConfig?.queries?.singleSampleMutation?.discoPlot?.skipChrM) {
2807
+ hiddenChromosomes.push("chrM");
2808
+ }
2809
+ const defaults = {
2810
+ downloadImgName: "disco.plot",
2811
+ Disco: {
2812
+ centerText: null,
2813
+ cnvCapping: 5,
2814
+ isOpen: false,
2815
+ prioritizeGeneLabelsByGeneSets: false,
2816
+ showPrioritizeGeneLabelsByGeneSets: false,
2817
+ showGeneNames: true,
2818
+ mutationWaterfallPlot: false,
2819
+ mutationWaterfallColor: "#4d4d4d",
2820
+ minMutationFraction: 0,
2821
+ cnvRenderingType: "heatmap" /* heatmap */,
2822
+ cnvPercentile: 90,
2823
+ // 90th percentile for removing outliers
2824
+ cnvCutoffMode: "percentile",
2825
+ autoRadius: true,
2826
+ radius: 300,
2827
+ fusionOpacity: 1,
2828
+ hiddenChromosomes
2829
+ },
2830
+ rings: {
2831
+ nonExonicRingWidth: 20,
2832
+ snvRingWidth: 20,
2833
+ lohRingWidth: 20,
2834
+ cnvRingWidth: 30,
2835
+ mutationWaterfallRingWidth: 35,
2836
+ snvRingFilters: ["exonic"],
2837
+ chromosomeInnerRadius: 190,
2838
+ chromosomeWidth: 20,
2839
+ labelLinesInnerRadius: 210,
2840
+ labelsToLinesDistance: 30,
2841
+ labelsToLinesGap: 2,
2842
+ nonExonicRingEnabled: true,
2843
+ nonExonicFilterValues: ["non-exonic"]
2844
+ },
2845
+ verticalPadding: 0,
2846
+ horizontalPadding: 50,
2847
+ layerScaler: 1,
2848
+ padAngle: 2e-3,
2849
+ //0.01, //0.04,
2850
+ label: {
2851
+ fontSize: 12,
2852
+ maxDeltaAngle: 0.05,
2853
+ animationDuration: 1e3,
2854
+ overlapAngleFactor: 5
2855
+ // 5 is set by testing, because label height is not known before rendering
2856
+ },
2857
+ cnv: {
2858
+ capping: 5,
2859
+ percentile: 80,
2860
+ ampColor: "#D6683C",
2861
+ lossColor: "#67a9cf",
2862
+ cappedAmpColor: "#8B0000",
2863
+ cappedLossColor: "#00008B",
2864
+ unit: "Unit"
2865
+ },
2866
+ snv: {
2867
+ maxMutationCount: 1e4
2868
+ },
2869
+ legend: {
2870
+ snvTitle: "Mutations",
2871
+ cnvTitle: "CNV",
2872
+ lohTitle: "LOH",
2873
+ fusionTitle: "SV",
2874
+ // Structural Variants (color by co-location)
2875
+ lohLegendEnabled: true,
2876
+ fontSize: 12,
2877
+ rowHeight: 48
2878
+ },
2879
+ menu: {
2880
+ padding: 5
2881
+ }
2882
+ };
2883
+ if (overrides?.Disco?.radius != null && (overrides.Disco.radius > 1e3 || overrides.Disco.radius < 200)) {
2884
+ console.log(`${overrides?.Disco?.radius} is greater or lower than the min and max for the radius`);
2885
+ }
2886
+ return copyMerge(defaults, overrides);
2887
+ }
2888
+
2889
+ // plots/disco/snv/NonExonicSnvRenderer.ts
2890
+ var NonExonicSnvRenderer = class {
2891
+ constructor(geneClickListener) {
2892
+ this.geneClickListener = geneClickListener;
2893
+ }
2894
+ render(holder, elements) {
2895
+ const arcGenerator = arc_default();
2896
+ const arcs = holder.append("g");
2897
+ const menu = MenuProvider.create();
2898
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2899
+ const table = table2col({ holder: menu.d });
2900
+ const snv = structuredClone(arc);
2901
+ snv.dt = dtsnvindel;
2902
+ snv.class = arc.dataClass;
2903
+ snv.gene = snv.text;
2904
+ {
2905
+ const [td1, td2] = table.addRow();
2906
+ td1.text("Consequence");
2907
+ td2.append("span").text(snv.mname);
2908
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2909
+ }
2910
+ {
2911
+ const [td1, td2] = table.addRow();
2912
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2913
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2914
+ }
2915
+ if (snv.gene) {
2916
+ const [td1, td2] = table.addRow();
2917
+ td1.text("Gene");
2918
+ td2.text(snv.gene);
2919
+ }
2920
+ if (snv.occurrence > 1) {
2921
+ const [td1, td2] = table.addRow();
2922
+ td1.text("Occurrence");
2923
+ td2.text(snv.occurrence);
2924
+ }
2925
+ if (hasAnyValidVafEntry(arc.vafs)) {
2926
+ const [td1, td2] = table.addRow();
2927
+ td1.text("Read count");
2928
+ appendVafBars(td2, arc.vafs);
2929
+ }
2930
+ menu.show(mouseEvent.x, mouseEvent.y);
2931
+ }).on("mouseout", () => {
2932
+ menu.clear();
2933
+ menu.hide();
2934
+ }).on("click", (mouseEvent, arc) => {
2935
+ this.geneClickListener(arc.text, [arc.mname]);
2936
+ });
2937
+ }
2938
+ };
2939
+
2940
+ // plots/disco/snv/SnvRenderer.ts
2941
+ var SnvRenderer = class {
2942
+ constructor(svnWidth, geneClickListener) {
2943
+ this.svnWidth = svnWidth;
2944
+ this.geneClickListener = geneClickListener;
2945
+ }
2946
+ render(holder, elements) {
2947
+ if (elements.length > 0) {
2948
+ const svnInnerRadius = elements[0].innerRadius;
2949
+ const fullArcRenderer = new FullArcRenderer(svnInnerRadius, this.svnWidth, "#6464641A");
2950
+ fullArcRenderer.render(holder);
2951
+ }
2952
+ const arcGenerator = arc_default();
2953
+ const arcs = holder.append("g");
2954
+ const menu = MenuProvider.create();
2955
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2956
+ const table = table2col({ holder: menu.d });
2957
+ const snv = structuredClone(arc);
2958
+ snv.dt = dtsnvindel;
2959
+ snv.class = arc.dataClass;
2960
+ snv.gene = snv.text;
2961
+ {
2962
+ const [td1, td2] = table.addRow();
2963
+ td1.text("Consequence");
2964
+ td2.append("span").text(snv.mname);
2965
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2966
+ }
2967
+ {
2968
+ const [td1, td2] = table.addRow();
2969
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2970
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2971
+ }
2972
+ if (snv.gene) {
2973
+ const [td1, td2] = table.addRow();
2974
+ td1.text("Gene");
2975
+ td2.text(snv.gene);
2976
+ }
2977
+ if (snv.occurrence > 1) {
2978
+ const [td1, td2] = table.addRow();
2979
+ td1.text("Occurrence");
2980
+ td2.text(snv.occurrence);
2981
+ }
2982
+ if (hasAnyValidVafEntry(arc.vafs)) {
2983
+ const [td1, td2] = table.addRow();
2984
+ td1.text("Read count");
2985
+ appendVafBars(td2, arc.vafs);
2986
+ }
2987
+ menu.show(mouseEvent.x, mouseEvent.y);
2988
+ }).on("mouseout", () => {
2989
+ menu.clear();
2990
+ menu.hide();
2991
+ }).on("click", (mouseEvent, arc) => {
2992
+ this.geneClickListener(arc.text, [arc.mname]);
2993
+ });
2994
+ }
2995
+ };
2996
+
2997
+ // plots/disco/loh/LohRenderer.ts
2998
+ var LohRenderer = class {
2999
+ render(holder, elements) {
3000
+ const arcGenerator = arc_default();
3001
+ const arcs = holder.append("g");
3002
+ const menu = MenuProvider.create();
3003
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
3004
+ const table = table2col({ holder: menu.d });
3005
+ const loh = structuredClone(arc);
3006
+ loh.dt = dtloh;
3007
+ loh.gene = loh.text;
3008
+ {
3009
+ const [td12, td22] = table.addRow();
3010
+ td12.text("Data type");
3011
+ td22.append("span").style("margin-left", "5px").text("Loss of Heterozygosity");
3012
+ }
3013
+ const [td1, td2] = table.addRow();
3014
+ td1.text("Position");
3015
+ td2.append("span").text(`${arc.chr}:${arc.start}-${arc.stop}`);
3016
+ menu.show(mouseEvent.x, mouseEvent.y);
3017
+ }).on("mouseout", () => {
3018
+ menu.clear();
3019
+ menu.hide();
3020
+ });
3021
+ }
3022
+ };
3023
+
3024
+ // plots/disco/cnv/CnvBarRenderer.ts
3025
+ var CnvBarRenderer = class {
3026
+ render(holder, elements) {
3027
+ const arcGenerator = arc_default();
3028
+ const arcs = holder.append("g");
3029
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
3030
+ const menu = MenuProvider.create();
3031
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
3032
+ hoverOverlay.selectAll("*").remove();
3033
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
3034
+ const cnv = structuredClone(arc);
3035
+ cnv.dt = arc.dt;
3036
+ cnv.samples = [{ sample_id: arc.sampleName }];
3037
+ cnv.gene = cnv.text;
3038
+ const table = table2col({ holder: menu.d });
3039
+ if (arc.dt == dtcnv) {
3040
+ const [c1, c2] = table.addRow();
3041
+ c1.text("CNV");
3042
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span> ${cnv.value}`);
3043
+ }
3044
+ if (arc.dt == dtitd) {
3045
+ const [c1, c2] = table.addRow();
3046
+ c1.text("ITD");
3047
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span>`);
3048
+ }
3049
+ {
3050
+ const [c1, c2] = table.addRow();
3051
+ c1.text("Position");
3052
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
3053
+ }
3054
+ if (arc.dt == dtcnv) {
3055
+ const [c1, c2] = table.addRow();
3056
+ c1.text("Unit");
3057
+ c2.text(cnv.value);
3058
+ }
3059
+ menu.show(mouseEvent.x, mouseEvent.y);
3060
+ }).on("mouseout", () => {
3061
+ hoverOverlay.selectAll("*").remove();
3062
+ menu.clear();
3063
+ menu.hide();
3064
+ });
3065
+ }
3066
+ };
3067
+
3068
+ // plots/disco/cnv/CnvHeatmapRenderer.ts
3069
+ var CnvHeatmapRenderer = class {
3070
+ constructor(positivePercentile = 0, negativePercentile = 0) {
3071
+ this.positivePercentile = positivePercentile;
3072
+ this.negativePercentile = negativePercentile;
3073
+ }
3074
+ render(holder, elements) {
3075
+ const arcGenerator = arc_default();
3076
+ const arcs = holder.append("g");
3077
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
3078
+ const menu = MenuProvider.create();
3079
+ 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) => {
3080
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
3081
+ const table = table2col({ holder: menu.d });
3082
+ const cnv = structuredClone(arc);
3083
+ cnv.dt = arc.dt;
3084
+ cnv.samples = [{ sample_id: arc.sampleName }];
3085
+ cnv.gene = cnv.text;
3086
+ if (arc.dt == dtcnv) {
3087
+ const [c1, c2] = table.addRow();
3088
+ c1.text("CNV");
3089
+ c2.html(
3090
+ `<span style="background:${this.getColor(
3091
+ cnv.color,
3092
+ cnv.value,
3093
+ cnv.dt
3094
+ )}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span> ${cnv.value}`
3095
+ );
3096
+ }
3097
+ if (arc.dt == dtitd) {
3098
+ const [c1, c2] = table.addRow();
3099
+ c1.text("ITD");
3100
+ c2.html(`<span style="background:${cnv.color}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span>`);
3101
+ }
3102
+ {
3103
+ const [c1, c2] = table.addRow();
3104
+ c1.text("Position");
3105
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
3106
+ }
3107
+ menu.show(mouseEvent.x, mouseEvent.y);
3108
+ }).on("mouseleave", () => {
3109
+ hoverOverlay.selectAll("*").remove();
3110
+ menu.clear();
3111
+ menu.hide();
3112
+ });
3113
+ }
3114
+ // Computes fill color using linear scale between -P80, 0, and +P80
3115
+ getColor(color, value, dt = dtcnv) {
3116
+ if (dt == dtitd) return color;
3117
+ const maxValue = Math.max(this.positivePercentile, Math.abs(this.negativePercentile));
3118
+ return linear(
3119
+ [-maxValue, 0, maxValue],
3120
+ [color, "white", color]
3121
+ // transitions to white in the middle
3122
+ ).clamp(true)(value);
3123
+ }
3124
+ };
3125
+
3126
+ // plots/disco/waterfall/MutationWaterfallRenderer.ts
3127
+ var MutationWaterfallRenderer = class {
3128
+ constructor(dotRadius = 1.5) {
3129
+ this.dotRadius = dotRadius;
3130
+ }
3131
+ render(holder, elements) {
3132
+ if (!elements.length) return;
3133
+ const ringGroup = holder.append("g").attr("data-testid", "sjpp_mutation_waterfall_ring");
3134
+ const menu = MenuProvider.create();
3135
+ 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) => {
3136
+ const distance = Math.round(Math.pow(10, d.logDistance));
3137
+ menu.clear();
3138
+ const table = table2col({ holder: menu.d });
3139
+ {
3140
+ const [td1, td2] = table.addRow();
3141
+ td1.text("Intermutation distance");
3142
+ td2.text(`${bplen(distance)}`);
3143
+ }
3144
+ menu.show(event.x, event.y);
3145
+ }).on("mouseout", () => {
3146
+ menu.clear();
3147
+ menu.hide();
3148
+ });
3149
+ this.renderAxis(ringGroup, elements[0]);
3150
+ }
3151
+ renderAxis(holder, referencePoint) {
3152
+ const { ringInnerRadius, ringWidth, rangeMin, rangeMax } = referencePoint;
3153
+ const axisGroup = holder.append("g").attr("class", "sjpp-waterfall-axis");
3154
+ const topRadius = ringInnerRadius + ringWidth;
3155
+ axisGroup.append("line").attr("x1", 0).attr("y1", -topRadius).attr("x2", 0).attr("y2", -ringInnerRadius).attr("stroke", "#6e6e6e").attr("stroke-width", 1);
3156
+ const span = rangeMax - rangeMin || 1;
3157
+ const tickValues = rangeMax === rangeMin ? [rangeMin] : ticks(rangeMin, rangeMax, 4);
3158
+ tickValues.forEach((value) => {
3159
+ const ratio = (value - rangeMin) / span;
3160
+ const radius = ringInnerRadius + ringWidth * ratio;
3161
+ const y = -radius;
3162
+ axisGroup.append("line").attr("x1", -4).attr("x2", 4).attr("y1", y).attr("y2", y).attr("stroke", "#6e6e6e");
3163
+ const exponent = Math.round(value * 10) / 10;
3164
+ const formatted = Number.isInteger(exponent) ? `${exponent}` : exponent.toFixed(1);
3165
+ axisGroup.append("text").attr("x", 6).attr("y", y + 3).style("font-size", "10px").style("fill", "#4d4d4d").text(`10^${formatted} bp`);
3166
+ });
3167
+ }
3168
+ };
3169
+
3170
+ // plots/disco/Disco.ts
3171
+ var Disco = class _Disco extends PlotBase {
3172
+ constructor(opts, api) {
3173
+ super(opts, api);
3174
+ this.recreateViewModel = false;
3175
+ this.onCnvSourceSelect = (index) => {
3176
+ const state = this.app.getState();
3177
+ const args = state.args;
3178
+ const alt = args.alternativeDataByDt?.[dtcnv];
3179
+ if (!alt) return;
3180
+ const altClone = structuredClone(args.alternativeDataByDt);
3181
+ altClone[dtcnv].forEach((d, i) => d.inuse = i === index);
3182
+ const selected = altClone[dtcnv][index];
3183
+ selected.mlst.forEach((d) => d.position = d.pos);
3184
+ const baseData = args.data.filter((d) => d.dt != dtcnv && d.dt != dtloh);
3185
+ const newData = baseData.concat(selected.mlst);
3186
+ this.app.dispatch({
3187
+ type: "app_refresh",
3188
+ state: { args: { ...args, data: newData, alternativeDataByDt: altClone } }
3189
+ });
3190
+ };
3191
+ this.type = _Disco.type;
3192
+ this.dom.errdiv = opts.holder.append("div").attr("class", "sja_errorbar").style("display", "none");
3193
+ this.isOpen = false;
3194
+ this.discoInteractions = new DiscoInteractions(this);
3195
+ }
3196
+ static {
3197
+ this.type = "Disco";
3198
+ }
3199
+ async init() {
3200
+ const state = this.app.getState();
3201
+ const settings = state.plots.find((p) => p.id === this.id).settings;
3202
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3203
+ this.viewModel = this.stateViewModelMapper.map(state);
3204
+ const holder = this.opts.holder;
3205
+ const controlsHolder = holder.append("div").style("display", "inline-block").style("vertical-align", "top");
3206
+ const mainDiv = holder.append("div").style("display", "inline-block");
3207
+ const topbar = controlsHolder.append("div");
3208
+ const config_div = controlsHolder.append("div");
3209
+ const configInputsOptions = this.getConfigInputsOptions(this.viewModel);
3210
+ this.features = await multiInit({
3211
+ topbar: topBarInit({
3212
+ app: this.app,
3213
+ id: this.id,
3214
+ // TODO change the way svg is selected
3215
+ downloadHandler: () => this.discoInteractions.downloadClickListener(holder.select('svg[id="sjpp_disco_plot"]').node()),
3216
+ callback: () => this.toggleVisibility(this.isOpen),
3217
+ isOpen: () => this.isOpen,
3218
+ holder: topbar
3219
+ }),
3220
+ config: configUiInit({
3221
+ app: this.app,
3222
+ id: this.id,
3223
+ holder: config_div,
3224
+ isOpen: () => this.isOpen,
3225
+ inputs: configInputsOptions
3226
+ })
3227
+ });
3228
+ this.errorDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-errorDiv");
3229
+ this.svgDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-svgDiv");
3230
+ }
3231
+ getConfigInputsOptions(viewModel) {
3232
+ const configInputsOptions = [];
3233
+ if (viewModel.settings.Disco.showPrioritizeGeneLabelsByGeneSets) {
3234
+ const filterMutationsGenesCheckbox = [
3235
+ {
3236
+ boxLabel: viewModel.genesetName,
3237
+ label: `Filter mutations`,
3238
+ type: "checkbox",
3239
+ chartType: "Disco",
3240
+ settingsKey: "prioritizeGeneLabelsByGeneSets",
3241
+ title: `Only show mutations for ${viewModel.genesetName} genes`
3242
+ }
3243
+ ];
3244
+ configInputsOptions.push(...filterMutationsGenesCheckbox);
3245
+ }
3246
+ if (viewModel.cnvMaxValue !== 0 || viewModel.cnvMinValue !== 0) {
3247
+ const cnvConfigInputOptions = [
3248
+ {
3249
+ boxLabel: "",
3250
+ label: "CNV rendering type",
3251
+ type: "radio",
3252
+ chartType: "Disco",
3253
+ settingsKey: "cnvRenderingType",
3254
+ title: "CNV rendering type",
3255
+ options: [
3256
+ { label: "Heatmap", value: "heatmap" /* heatmap */ },
3257
+ { label: "Bar", value: "bar" /* bar */ }
3258
+ ]
3259
+ }
3260
+ ];
3261
+ configInputsOptions.push(...cnvConfigInputOptions);
3262
+ }
3263
+ if (viewModel.hasMutationFractionData) {
3264
+ configInputsOptions.push({
3265
+ boxLabel: "",
3266
+ label: "Minimum mutation fraction",
3267
+ type: "number",
3268
+ chartType: "Disco",
3269
+ settingsKey: "minMutationFraction",
3270
+ title: "Only show SNV/indel mutations with at least one DNA/RNA mutation fraction at or above this value.",
3271
+ step: 0.01,
3272
+ min: 0,
3273
+ max: 1,
3274
+ debounceInterval: 500
3275
+ });
3276
+ }
3277
+ configInputsOptions.push({
3278
+ boxLabel: "",
3279
+ label: "Show gene names",
3280
+ type: "checkbox",
3281
+ chartType: "Disco",
3282
+ settingsKey: "showGeneNames",
3283
+ title: "Show gene name labels on the outside of the plot"
3284
+ });
3285
+ const genomeChr = this.app.opts.state.args.genome.majorchr;
3286
+ const chromosomeConfigOption = {
3287
+ label: "Chromosomes",
3288
+ title: "Chromosomes shown in the plot",
3289
+ type: "multiCheckbox",
3290
+ chartType: "Disco",
3291
+ settingsKey: "hiddenChromosomes",
3292
+ style: {
3293
+ colNum: 4
3294
+ },
3295
+ options: Object.keys(genomeChr).map((c) => ({ label: c, value: c })),
3296
+ processInput: (values = []) => {
3297
+ const reverse = Object.keys(genomeChr).filter((c) => !values.includes(c));
3298
+ return reverse;
3299
+ }
3300
+ };
3301
+ configInputsOptions.push(chromosomeConfigOption);
3302
+ configInputsOptions.push({
3303
+ boxLabel: "",
3304
+ label: "Auto radius",
3305
+ type: "checkbox",
3306
+ chartType: "Disco",
3307
+ settingsKey: "autoRadius",
3308
+ title: "Automatically set the radius based on the number of data rings"
3309
+ });
3310
+ const dimensionOptions = [
3311
+ {
3312
+ label: "Radius",
3313
+ title: "Set the radius of the entire plot, between 200 and 1000 pixels.",
3314
+ type: "number",
3315
+ chartType: "Disco",
3316
+ settingsKey: "radius",
3317
+ debounceInterval: 500,
3318
+ step: 25,
3319
+ min: 200,
3320
+ max: 1e3,
3321
+ getDisplayStyle: (plot) => plot.settings.Disco.autoRadius ? "none" : "table-row"
3322
+ },
3323
+ {
3324
+ label: "Fusion opacity",
3325
+ title: "Adjust opacity of fusion arcs, between 0 and 1",
3326
+ type: "number",
3327
+ chartType: "Disco",
3328
+ settingsKey: "fusionOpacity",
3329
+ step: 0.01,
3330
+ min: 0,
3331
+ max: 1,
3332
+ debounceInterval: 500
3333
+ }
3334
+ ];
3335
+ configInputsOptions.push(...dimensionOptions);
3336
+ if (viewModel.canShowMutationWaterfallPlot && viewModel.snvDataLength > 0) {
3337
+ configInputsOptions.push({
3338
+ boxLabel: "",
3339
+ label: "Mutation Waterfall Plot",
3340
+ type: "checkbox",
3341
+ chartType: "Disco",
3342
+ settingsKey: "mutationWaterfallPlot",
3343
+ title: "Render log10 intermutation distance ring for SNV/indel data"
3344
+ });
3345
+ }
3346
+ return configInputsOptions;
3347
+ }
3348
+ async main() {
3349
+ const settings = this.state.settings;
3350
+ this.isOpen = settings.Disco.isOpen;
3351
+ if (this.recreateViewModel) {
3352
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3353
+ this.viewModel = this.stateViewModelMapper.map(this.app.getState());
3354
+ }
3355
+ this.recreateViewModel = true;
3356
+ if (this.viewModel) {
3357
+ this.svgDiv.selectAll("*").remove();
3358
+ const appState = this.app.getState();
3359
+ this.viewModel.svgDiv = this.svgDiv;
3360
+ this.viewModel.appState = appState;
3361
+ for (const name in this.features) {
3362
+ this.features[name].update({ state: this.state, appState });
3363
+ }
3364
+ const legendRenderer = new LegendRenderer(this.viewModel.cappedCnvMaxAbsValue, settings.label.fontSize);
3365
+ const discoRenderer = new DiscoRenderer(
3366
+ this.getRingRenderers(this.viewModel.settings, this.viewModel, this.discoInteractions.geneClickListener),
3367
+ legendRenderer,
3368
+ this.app.opts.state.args.genome,
3369
+ {
3370
+ dslabel: this.app.opts.state.vocab.dslabel,
3371
+ eventImages: this.app.opts.state.args.eventImages
3372
+ }
3373
+ );
3374
+ discoRenderer.render(this.svgDiv, this.viewModel, this.onCnvSourceSelect);
3375
+ if (this.viewModel.invalidDataInfo?.entries?.length) {
3376
+ InvalidDataUI.render(this.errorDiv, this.viewModel.invalidDataInfo);
3377
+ }
3378
+ }
3379
+ }
3380
+ getState(appState) {
3381
+ const config = appState.plots.find((p) => p.id === this.id);
3382
+ if (!config) return config;
3383
+ return { ...config, mlst: appState.args.data };
3384
+ }
3385
+ getRingRenderers(settings, viewModel, geneClickListener) {
3386
+ const chromosomesRenderer = new ChromosomesRenderer(
3387
+ settings.padAngle,
3388
+ settings.rings.chromosomeInnerRadius,
3389
+ settings.rings.chromosomeInnerRadius + settings.rings.chromosomeWidth,
3390
+ settings.label.fontSize
3391
+ );
3392
+ const labelsRenderer = new LabelsRenderer(
3393
+ settings.label.animationDuration,
3394
+ settings.label.fontSize,
3395
+ geneClickListener,
3396
+ this.app.opts.state.args.genome.name,
3397
+ [
3398
+ ...viewModel.rings.cnvArcRing?.elements || [],
3399
+ ...(viewModel.rings.lohArcRing?.elements || []).map((event) => ({ ...event, dt: dtloh }))
3400
+ ]
3401
+ );
3402
+ const nonExonicSnvRenderer = new NonExonicSnvRenderer(geneClickListener);
3403
+ const snvRenderer = new SnvRenderer(settings.rings.snvRingWidth, geneClickListener);
3404
+ const cnvRenderer = settings.Disco.cnvRenderingType === "heatmap" /* heatmap */ ? new CnvHeatmapRenderer(viewModel.positivePercentile, viewModel.negativePercentile) : new CnvBarRenderer();
3405
+ const lohRenderer = new LohRenderer();
3406
+ const mutationWaterfallRenderer = new MutationWaterfallRenderer();
3407
+ const renderersMap = /* @__PURE__ */ new Map();
3408
+ renderersMap.set(0 /* CHROMOSOME */, chromosomesRenderer);
3409
+ renderersMap.set(1 /* LABEL */, labelsRenderer);
3410
+ renderersMap.set(2 /* NONEXONICSNV */, nonExonicSnvRenderer);
3411
+ renderersMap.set(3 /* SNV */, snvRenderer);
3412
+ renderersMap.set(4 /* MUTATION_WATERFALL */, mutationWaterfallRenderer);
3413
+ renderersMap.set(5 /* CNV */, cnvRenderer);
3414
+ renderersMap.set(6 /* LOH */, lohRenderer);
3415
+ return renderersMap;
3416
+ }
3417
+ toggleVisibility(isOpen) {
3418
+ this.app.dispatch({
3419
+ type: "plot_edit",
3420
+ id: this.opts.id,
3421
+ config: {
3422
+ settings: {
3423
+ Disco: { isOpen: !isOpen }
3424
+ }
3425
+ }
3426
+ });
3427
+ }
3428
+ };
3429
+ var discoInit = getCompInit(Disco);
3430
+ var componentInit = discoInit;
3431
+ async function getPlotConfig(opts, app) {
3432
+ return {
3433
+ chartType: "Disco",
3434
+ subfolder: "disco",
3435
+ extension: "ts",
3436
+ settings: discoDefaults(opts.overrides, app)
3437
+ };
3438
+ }
3439
+ export {
3440
+ componentInit,
3441
+ Disco as default,
3442
+ discoInit,
3443
+ getPlotConfig
3444
+ };
3445
+ //# sourceMappingURL=Disco-RR2NN66T.js.map