@sjcrh/proteinpaint-client 2.221.0 → 2.222.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (849) hide show
  1. package/dist/2dmaf-QFXSYOYN.js +1362 -0
  2. package/dist/AggMatrixInput-7D4ZUYJK.js +402 -0
  3. package/dist/AggregateMatrix-NVSFZEW3.js +37 -0
  4. package/dist/AppHeader-5YJWBQP6.js +826 -0
  5. package/dist/BoxPlot-52WWBGKN.js +1229 -0
  6. package/dist/CorrelationVolcano-WS23O2JT.js +613 -0
  7. package/dist/Cuminc-5LJQYFEE.js +1217 -0
  8. package/dist/DE-Z5GBDXDU.js +85 -0
  9. package/dist/DEinput-3EAIVG5U.js +479 -0
  10. package/dist/DM-24NZPPS6.js +86 -0
  11. package/dist/DifferentialAnalysis-LRAPDIXB.js +236 -0
  12. package/dist/Disco-IDOTCKSD.js +3384 -0
  13. package/dist/Disco.UI-SLJKAA6N.js +239 -0
  14. package/dist/DmrPlot-5CRGQNM3.js +361 -0
  15. package/dist/GB-YCDIORF3.js +1388 -0
  16. package/dist/GSEA-IGWX3AG7.js +870 -0
  17. package/dist/GeneExpInput-PPOTCILZ.js +38 -0
  18. package/dist/Geomap-D5JPCJ5L.js +80 -0
  19. package/dist/HicApp-BNMMISAR.js +2240 -0
  20. package/dist/IDCViewer-IUPPLC5B.js +10808 -0
  21. package/dist/NumBinaryEditor-45I5YNHI.js +274 -0
  22. package/dist/NumBinaryEditor.unit.spec-5CJPIDH4.js +308 -0
  23. package/dist/NumContEditor-VMCE5LUM.js +100 -0
  24. package/dist/NumContEditor.unit.spec-DKNXTVXT.js +160 -0
  25. package/dist/NumCustomBinEditor-3EESV7PW.js +29 -0
  26. package/dist/NumCustomBinEditor.unit.spec-JPOK7BWZ.js +393 -0
  27. package/dist/NumDiscreteEditor-YZ3Q4J4M.js +165 -0
  28. package/dist/NumDiscreteEditor.unit.spec-V6NSX72E.js +229 -0
  29. package/dist/NumRegularBinEditor-6GI63X5V.js +29 -0
  30. package/dist/NumRegularBinEditor.unit.spec-KCGZLQ6T.js +274 -0
  31. package/dist/NumSplineEditor-OMJUFDSC.js +205 -0
  32. package/dist/NumSplineEditor.unit.spec-KUB2OITH.js +220 -0
  33. package/dist/NumericDensity-M4BIVIB3.js +29 -0
  34. package/dist/NumericDensity.unit.spec-G3GJMO4S.js +414 -0
  35. package/dist/NumericHandler-AMV4BETD.js +30 -0
  36. package/dist/NumericHandler.unit.spec-OJDMQQHX.js +225 -0
  37. package/dist/ProteomeInput-KB7YRARQ.js +610 -0
  38. package/dist/Regression-5KSKHUEJ.js +1412 -0
  39. package/dist/RunChart2-JJ4GQF44.js +744 -0
  40. package/dist/SC-LKCBWZQX.js +1290 -0
  41. package/dist/Violin-JRP7R53K.js +1092 -0
  42. package/dist/Volcano-BDD3PZ4T.js +2661 -0
  43. package/dist/Wsi-3C3ERYSG.js +636 -0
  44. package/dist/aboutSunburst-2T5SLCCB.js +93 -0
  45. package/dist/aboutSunburst-2T5SLCCB.js.map +7 -0
  46. package/dist/adSandbox-GFF6ZCRM.js +29 -0
  47. package/dist/animatedBubbleChart-PUPXCFJW.js +542 -0
  48. package/dist/app-EICBB32X.js +28 -0
  49. package/dist/app-Z7M3CFWA.js +38 -0
  50. package/dist/app.js +8 -8
  51. package/dist/bam-KQ5F34X5.js +872 -0
  52. package/dist/barchart-WRAEMD7B.js +38 -0
  53. package/dist/barchart2-5CX3CO4K.js +305 -0
  54. package/dist/block-53QIZEH3.js +6203 -0
  55. package/dist/block.init-4V3SIUNX.js +29 -0
  56. package/dist/block.mds.expressionrank-5YNTX35V.js +350 -0
  57. package/dist/block.mds.geneboxplot-X5OHLSWT.js +819 -0
  58. package/dist/block.mds.junction-QBJF6MFG.js +1534 -0
  59. package/dist/block.mds.svcnv-BNCMHJJB.js +6413 -0
  60. package/dist/block.svg-KQELYSEO.js +155 -0
  61. package/dist/block.tk.aicheck-5EDNNXGL.js +274 -0
  62. package/dist/block.tk.bam-FRPCGSAE.js +1906 -0
  63. package/dist/block.tk.bigwig.ui-XUJPSA6D.js +202 -0
  64. package/dist/block.tk.hicstraw-MVLZALFC.js +814 -0
  65. package/dist/block.tk.junction-DLZNHWSA.js +2353 -0
  66. package/dist/block.tk.junction.textmatrixui-J3EODITY.js +190 -0
  67. package/dist/block.tk.ld-4GEJ2Y2K.js +90 -0
  68. package/dist/block.tk.menu-NM7KA5GZ.js +1050 -0
  69. package/dist/block.tk.pgv-XFOJACVC.js +934 -0
  70. package/dist/brainImaging-WFRZQANN.js +550 -0
  71. package/dist/brainRegions-66KWCUF2.js +213 -0
  72. package/dist/bubbleHeatmap-VKLIJOMM.js +374 -0
  73. package/dist/cellTypeBubbleHeatmap-ZPCXC52I.js +274 -0
  74. package/dist/chunk-2NDFMFNM.js +134 -0
  75. package/dist/chunk-34AGCF72.js +203 -0
  76. package/dist/chunk-3KKI63GB.js +96 -0
  77. package/dist/chunk-3LUHZYIN.js +14 -0
  78. package/dist/chunk-4ASBDE27.js +26731 -0
  79. package/dist/chunk-4ASBDE27.js.map +7 -0
  80. package/dist/chunk-5XXYEKE2.js +237 -0
  81. package/dist/chunk-6C3USAU5.js +848 -0
  82. package/dist/chunk-7F2FBQRP.js +35 -0
  83. package/dist/chunk-7TRD7A2U.js +141 -0
  84. package/dist/chunk-AG2PISH4.js +257 -0
  85. package/dist/chunk-BGYZJXYZ.js +2799 -0
  86. package/dist/chunk-BVSVFCKB.js +2102 -0
  87. package/dist/chunk-BY5CLUY5.js +5214 -0
  88. package/dist/chunk-C6PMNLN4.js +54 -0
  89. package/dist/chunk-CSYXTB7F.js +418 -0
  90. package/dist/chunk-DFKTWNCC.js +55 -0
  91. package/dist/chunk-FQHE7CLH.js +692 -0
  92. package/dist/chunk-FRLAPBYW.js +299 -0
  93. package/dist/chunk-HKYUCYOQ.js +266 -0
  94. package/dist/chunk-HMTQ4M66.js +305 -0
  95. package/dist/chunk-HMTQ4M66.js.map +7 -0
  96. package/dist/chunk-IQO3VZCP.js +255 -0
  97. package/dist/chunk-J5XV35LN.js +468 -0
  98. package/dist/chunk-JMWCL3QQ.js +56 -0
  99. package/dist/chunk-K3Q3KTBT.js +102 -0
  100. package/dist/chunk-LHM4UVYZ.js +550 -0
  101. package/dist/chunk-LMVYPBT4.js +626 -0
  102. package/dist/chunk-LUGZE4FR.js +56 -0
  103. package/dist/chunk-LXSBSJUL.js +2334 -0
  104. package/dist/chunk-MOAHKBYO.js +379 -0
  105. package/dist/chunk-MU7GTJYA.js +1219 -0
  106. package/dist/chunk-MXZYJ7WN.js +182 -0
  107. package/dist/chunk-NZB6RZK2.js +176 -0
  108. package/dist/chunk-OF6FDDKV.js +184 -0
  109. package/dist/chunk-OPMEDR4F.js +50 -0
  110. package/dist/chunk-ORYAOIVF.js +4389 -0
  111. package/dist/chunk-PHKA5BP7.js +263 -0
  112. package/dist/chunk-QI4EZK7S.js +2941 -0
  113. package/dist/chunk-QNSB6O4W.js +70 -0
  114. package/dist/chunk-QPRSVLI7.js +240 -0
  115. package/dist/chunk-R55JRVX7.js +652 -0
  116. package/dist/chunk-R55JRVX7.js.map +7 -0
  117. package/dist/chunk-RSMASA5S.js +340 -0
  118. package/dist/chunk-S2BMWHFY.js +54 -0
  119. package/dist/chunk-SKL52OWF.js +466 -0
  120. package/dist/chunk-TRWUXFVB.js +102 -0
  121. package/dist/chunk-URCFNXAK.js +2008 -0
  122. package/dist/chunk-V2D7DA2M.js +194 -0
  123. package/dist/chunk-V2ZVMDBY.js +480 -0
  124. package/dist/chunk-VIFY62YA.js +243 -0
  125. package/dist/chunk-VZ2JWFSX.js +296 -0
  126. package/dist/chunk-W5GR42L2.js +159 -0
  127. package/dist/chunk-WDOX6A6T.js +1339 -0
  128. package/dist/chunk-XPL54FXR.js +6375 -0
  129. package/dist/chunk-XV3KWMG3.js +103 -0
  130. package/dist/chunk-YFFQ7JTJ.js +123 -0
  131. package/dist/chunk-ZD6AIFTS.js +1253 -0
  132. package/dist/chunk-ZDVYAOWC.js +516 -0
  133. package/dist/chunk-ZKIC65KR.js +2685 -0
  134. package/dist/chunk-ZPRI5XCE.js +82 -0
  135. package/dist/cohort-CI22KICX.js +66 -0
  136. package/dist/cohortSunburst-Z5DANXVS.js +402 -0
  137. package/dist/condition-GZOA7BZJ.js +323 -0
  138. package/dist/controls-OWC25VQN.js +30 -0
  139. package/dist/controls.config-UVC4Q7BS.js +30 -0
  140. package/dist/correlation-EBA5YVXA.js +91 -0
  141. package/dist/customdata.inputui-FZRZCPS3.js +280 -0
  142. package/dist/dataDownload-WIPQU33P.js +326 -0
  143. package/dist/databrowser.ui-6L6Q72W4.js +421 -0
  144. package/dist/dictionary-4VZEPGW5.js +109 -0
  145. package/dist/dnaMethylation-LN6THRNZ.js +29 -0
  146. package/dist/dnaMethylation.integration.spec-BXC6EPUV.js +194 -0
  147. package/dist/e2pca-EXFI4Q2Y.js +340 -0
  148. package/dist/ep-T7EZ34XV.js +1247 -0
  149. package/dist/expclust.gdc.spec-NAN4M75R.js +298 -0
  150. package/dist/facet-BJFUIWHK.js +556 -0
  151. package/dist/gb-CBC3PDKZ.js +77 -0
  152. package/dist/geneExpClustering-7JFY7TQT.js +240 -0
  153. package/dist/geneExpression-FOQOKD34.js +29 -0
  154. package/dist/geneExpression.unit.spec-XSFC5ZJP.js +151 -0
  155. package/dist/geneORA-KYPN66QU.js +269 -0
  156. package/dist/geneRanking-VEHFMRFL.js +544 -0
  157. package/dist/geneVariant-77V6FNJX.js +289 -0
  158. package/dist/geneVariant-BS3XZFYM.js +32 -0
  159. package/dist/geneVariant.integration.spec-US4OY3S5.js +672 -0
  160. package/dist/genefusion.ui-YNVTTLDE.js +299 -0
  161. package/dist/geneset-BH5MWNJQ.js +199 -0
  162. package/dist/genomeBrowser.spec-BFTGLRHG.js +272 -0
  163. package/dist/grin2-4AXUYJIL.js +66 -0
  164. package/dist/grin2-5T557HKM.js +945 -0
  165. package/dist/hierCluster-IJHBVO2N.js +55 -0
  166. package/dist/hierCluster-POJBHBN6.js +51 -0
  167. package/dist/hierCluster.config-UUQEFTIG.js +32 -0
  168. package/dist/hierCluster.integration.spec-PZFUAOHX.js +479 -0
  169. package/dist/hierCluster.interactivity-6CN5PNFR.js +45 -0
  170. package/dist/imagePlot-HKPPACFV.js +152 -0
  171. package/dist/importPlot-EMI6BVPR.js +8 -0
  172. package/dist/isoformExpression-SFBA3SY7.js +31 -0
  173. package/dist/isoformExpression.unit.spec-JKYWHGRN.js +233 -0
  174. package/dist/junction-PJPOCKK7.js +32 -0
  175. package/dist/junction.unit.spec-CVYLAHZF.js +178 -0
  176. package/dist/launch.adhoc-R7SYX6GF.js +33 -0
  177. package/dist/leftlabel.sample-XJUDFAKS.js +253 -0
  178. package/dist/lollipop-V43BWGBT.js +162 -0
  179. package/dist/maf-KU44HXN3.js +451 -0
  180. package/dist/maftimeline-JPHVYTTU.js +583 -0
  181. package/dist/matrix-EABQEAMC.js +50 -0
  182. package/dist/matrix-HMLF5MDD.js +55 -0
  183. package/dist/matrix.config-RX5GWHTM.js +33 -0
  184. package/dist/matrix.integration.spec-MZPSYXTF.js +3156 -0
  185. package/dist/matrix.interactivity-6AJ5BGEP.js +33 -0
  186. package/dist/matrix.layout-CTHRQE7U.js +35 -0
  187. package/dist/matrix.renderers-UGQXONTG.js +30 -0
  188. package/dist/matrix.sort.unit.spec-FJKIBDTU.js +464 -0
  189. package/dist/matrix.sorterUi.unit.spec-6DQ6KGXT.js +334 -0
  190. package/dist/matrix.unit.spec-7Y3BKFNQ.js +146 -0
  191. package/dist/mavb-ADD57P2Q.js +726 -0
  192. package/dist/mds.fimo-7WH5GVFZ.js +509 -0
  193. package/dist/mds.samplescatterplot-JYFOORUG.js +1545 -0
  194. package/dist/mds.survivalplot-2V4H3YZY.js +472 -0
  195. package/dist/multivalue-GLS3RPQ5.js +79 -0
  196. package/dist/oncomatrix-QA267TP2.js +286 -0
  197. package/dist/oncomatrix.spec-H6AAIP7H.js +439 -0
  198. package/dist/plot.2dvaf-JW3Z25M3.js +368 -0
  199. package/dist/plot.app-CUCDOVC5.js +32 -0
  200. package/dist/plot.barplot-KBVYKICH.js +93 -0
  201. package/dist/plot.boxplot-BTS6ZWCQ.js +142 -0
  202. package/dist/plot.brainImaging-GGUARYRT.js +51 -0
  203. package/dist/plot.disco-EP274JEW.js +98 -0
  204. package/dist/plot.ssgq-4VUH3ZWV.js +130 -0
  205. package/dist/plot.vaf2cov-2FPWA2FS.js +249 -0
  206. package/dist/polar2-7W5JRMB5.js +228 -0
  207. package/dist/profileForms-2IKL3SZU.js +937 -0
  208. package/dist/profilePlot-IURW2HQN.js +45 -0
  209. package/dist/proteinView-4ZRODQN3.js +1346 -0
  210. package/dist/proteomeCohortCompare-BK3FLW4Z.js +866 -0
  211. package/dist/pseudbulk.unit.spec-QGQCCHNF.js +82 -0
  212. package/dist/pseudobulk-7HEOBIFO.js +31 -0
  213. package/dist/qualitative-6HWIG5NU.js +34 -0
  214. package/dist/qualitative-WGEEUNH6.js +241 -0
  215. package/dist/radar2-VXP322F7.js +323 -0
  216. package/dist/radarFacility2-IJGJ3AJB.js +331 -0
  217. package/dist/render-MMCUV7QI.js +29 -0
  218. package/dist/report-F22EFD7C.js +213 -0
  219. package/dist/sampleView-3DVB2PQT.js +39 -0
  220. package/dist/samplelst-LNAI33IW.js +114 -0
  221. package/dist/samplematrix-RGXPBRW5.js +2188 -0
  222. package/dist/sc-UR66YB27.js +77 -0
  223. package/dist/scatter-3K6XBJIM.js +84 -0
  224. package/dist/scatter-IFP5NTZU.js +919 -0
  225. package/dist/selectGenomeWithTklst-LGBKEN3T.js +125 -0
  226. package/dist/singleCellCellType-ACQACM6W.js +29 -0
  227. package/dist/singleCellCellType.unit.spec-WLGTJKOM.js +150 -0
  228. package/dist/singleCellGeneExpression-M4RPITJW.js +29 -0
  229. package/dist/singleCellGeneExpression.unit.spec-N3VD6PUW.js +144 -0
  230. package/dist/singleCellNumericValue-W6F44FJN.js +29 -0
  231. package/dist/singleCellNumericValue.unit.spec-JZNMY77I.js +412 -0
  232. package/dist/singleCellPlot-CCG2KSCO.js +44 -0
  233. package/dist/singlecell-32P47E4I.js +1562 -0
  234. package/dist/singlecell-I6H3Z7FT.js +77 -0
  235. package/dist/snp-7X2BXRQP.js +29 -0
  236. package/dist/snp.unit.spec-BJGWNSVR.js +167 -0
  237. package/dist/snplocus-UOVS2GD6.js +200 -0
  238. package/dist/snplst-JFVP4NG2.js +36 -0
  239. package/dist/spliceevent.a53ss.diagram-ETXJX57W.js +142 -0
  240. package/dist/spliceevent.exonskip.diagram-C4JCEOXQ.js +274 -0
  241. package/dist/spliceevent.noeventdiagram-4DD3Z4OM.js +451 -0
  242. package/dist/ssGSEA-GOZOYROM.js +29 -0
  243. package/dist/ssGSEA.unit.spec-J4DPFU4D.js +79 -0
  244. package/dist/stattable-ICUZQHUF.js +112 -0
  245. package/dist/studyCatalog-PCFXVOI3.js +457 -0
  246. package/dist/summarizeCnvGeneexp-DK6HNUFE.js +154 -0
  247. package/dist/summarizeGeneexpSurvival-JLCR2VIX.js +101 -0
  248. package/dist/summarizeMutationCnv-CFAKT6IP.js +155 -0
  249. package/dist/summarizeMutationDiagnosis-5HMVSYMI.js +31 -0
  250. package/dist/summarizeMutationSurvival-GP2OQMUS.js +95 -0
  251. package/dist/summary-6K553VNS.js +40 -0
  252. package/dist/summary.integration.spec-MXERZOVY.js +405 -0
  253. package/dist/summaryInput-V2G6HFJS.js +238 -0
  254. package/dist/sunburst-6GKVNIRF.js +34 -0
  255. package/dist/sunburst-YOVKC5G2.js +274 -0
  256. package/dist/survival-GHTV2ZPX.js +1248 -0
  257. package/dist/survival-KF2QUWSM.js +49 -0
  258. package/dist/survival.integration.spec-GVSQL4VB.js +609 -0
  259. package/dist/svgraph-WN3JLEOC.js +1377 -0
  260. package/dist/svmr-ZZKBQFQK.js +3834 -0
  261. package/dist/swimmer-XHORJEVI.js +993 -0
  262. package/dist/table-XQCTNHSZ.js +192 -0
  263. package/dist/termCollection-DXZQT7YT.js +29 -0
  264. package/dist/termCollection-HRM2NHLA.js +247 -0
  265. package/dist/termCollection.unit.spec-BGULSLH6.js +295 -0
  266. package/dist/termCollectionFractionSelection-TPNNP2ER.js +38 -0
  267. package/dist/termCollectionFractionSelection.unit.spec-VONXAGZH.js +184 -0
  268. package/dist/tk-KPD6HTHR.js +1193 -0
  269. package/dist/tk-RCTQPQH7.js +37 -0
  270. package/dist/tp.ui-MVNQLMAD.js +1453 -0
  271. package/dist/tvs.categorical-4TKKU6HO.js +28 -0
  272. package/dist/tvs.condition-SARY3O5Y.js +160 -0
  273. package/dist/tvs.dt-XJ2MW2AP.js +34 -0
  274. package/dist/tvs.dtcnv.categorical-H7FKTXH4.js +31 -0
  275. package/dist/tvs.dtcnv.continuous-JQ62ZHER.js +72 -0
  276. package/dist/tvs.dtfusion-GC3DZ2BO.js +31 -0
  277. package/dist/tvs.dtitd-3SHGIDIB.js +31 -0
  278. package/dist/tvs.dtsnvindel-BEDWZ4A2.js +31 -0
  279. package/dist/tvs.dtsv-HRIMULVD.js +31 -0
  280. package/dist/tvs.multivalue-5VC7BLSZ.js +84 -0
  281. package/dist/tvs.numeric-TGEC7G6A.js +32 -0
  282. package/dist/tvs.samplelst-Q6EYAUQZ.js +95 -0
  283. package/dist/tvs.survival-NJ3DTZIG.js +110 -0
  284. package/dist/tvs.termCollection-TVVLPSTG.js +118 -0
  285. package/dist/vocabulary-A7ZBBU65.js +32 -0
  286. package/dist/wsi.direct-JJGIAH6A.js +11514 -0
  287. package/package.json +2 -2
  288. package/dist/2dmaf-7YU3SNKL.js +0 -1362
  289. package/dist/AggMatrixInput-73CDR5FS.js +0 -402
  290. package/dist/AggregateMatrix-NNULVFBM.js +0 -37
  291. package/dist/AppHeader-EZDDLLXU.js +0 -826
  292. package/dist/BoxPlot-463E7CRY.js +0 -1229
  293. package/dist/CorrelationVolcano-LHIIMBPP.js +0 -613
  294. package/dist/Cuminc-UL2TCIKV.js +0 -1217
  295. package/dist/DE-VRFSKFDW.js +0 -85
  296. package/dist/DEinput-FZTQRWVC.js +0 -479
  297. package/dist/DM-PO7CQZNT.js +0 -86
  298. package/dist/DifferentialAnalysis-WK6HE3YH.js +0 -236
  299. package/dist/Disco-YBNQJQFG.js +0 -3384
  300. package/dist/Disco.UI-HC5XYBFV.js +0 -239
  301. package/dist/DmrPlot-7VJ5C66D.js +0 -361
  302. package/dist/GB-VPFQRDRO.js +0 -1388
  303. package/dist/GSEA-ZEJB3QZQ.js +0 -870
  304. package/dist/GeneExpInput-SBDDIY6G.js +0 -38
  305. package/dist/Geomap-23AHGP2V.js +0 -80
  306. package/dist/HicApp-7AQQE4CM.js +0 -2240
  307. package/dist/IDCViewer-NO5Q6VOB.js +0 -10808
  308. package/dist/NumBinaryEditor-DSRP4OOU.js +0 -274
  309. package/dist/NumBinaryEditor.unit.spec-TT666YL4.js +0 -308
  310. package/dist/NumContEditor-6CURFOCH.js +0 -100
  311. package/dist/NumContEditor.unit.spec-MNVCFCMP.js +0 -160
  312. package/dist/NumCustomBinEditor-SQRR5EFL.js +0 -29
  313. package/dist/NumCustomBinEditor.unit.spec-F7BZWGGT.js +0 -393
  314. package/dist/NumDiscreteEditor-U7Z2QNYP.js +0 -165
  315. package/dist/NumDiscreteEditor.unit.spec-EIEBUZCX.js +0 -229
  316. package/dist/NumRegularBinEditor-CVZSWN6Y.js +0 -29
  317. package/dist/NumRegularBinEditor.unit.spec-ZMAJOIHL.js +0 -274
  318. package/dist/NumSplineEditor-U43D5NBJ.js +0 -205
  319. package/dist/NumSplineEditor.unit.spec-C52AADTS.js +0 -220
  320. package/dist/NumericDensity-PUKDZOVI.js +0 -29
  321. package/dist/NumericDensity.unit.spec-2347S76D.js +0 -414
  322. package/dist/NumericHandler-3RT32PTR.js +0 -30
  323. package/dist/NumericHandler.unit.spec-4PADL4KZ.js +0 -225
  324. package/dist/ProteomeInput-NFV4FW4U.js +0 -610
  325. package/dist/Regression-N7M7N6G4.js +0 -1412
  326. package/dist/RunChart2-UPQ7C6QE.js +0 -744
  327. package/dist/SC-KBW2NHUV.js +0 -1290
  328. package/dist/Violin-GWCOP3ZF.js +0 -1092
  329. package/dist/Volcano-X3HT32GQ.js +0 -2661
  330. package/dist/Wsi-NXAEOYIS.js +0 -636
  331. package/dist/aboutSunburst-5EKXZV2A.js +0 -86
  332. package/dist/aboutSunburst-5EKXZV2A.js.map +0 -7
  333. package/dist/adSandbox-RPEWEEW7.js +0 -29
  334. package/dist/animatedBubbleChart-ILDMZRBX.js +0 -542
  335. package/dist/app-LOUC4J47.js +0 -28
  336. package/dist/app-MRKXZ6AZ.js +0 -38
  337. package/dist/bam-SQWPHCZZ.js +0 -872
  338. package/dist/barchart-CJR37234.js +0 -38
  339. package/dist/barchart2-QQYLTHWR.js +0 -305
  340. package/dist/block-GLF6QNKY.js +0 -6203
  341. package/dist/block.init-YJQTJIDO.js +0 -29
  342. package/dist/block.mds.expressionrank-GBMEI5KQ.js +0 -350
  343. package/dist/block.mds.geneboxplot-XWE3E5IW.js +0 -819
  344. package/dist/block.mds.junction-QLEHFVPE.js +0 -1534
  345. package/dist/block.mds.svcnv-53DTOPBC.js +0 -6413
  346. package/dist/block.svg-57T37ABS.js +0 -155
  347. package/dist/block.tk.aicheck-6DXJTS3H.js +0 -274
  348. package/dist/block.tk.bam-CJFFQDNX.js +0 -1906
  349. package/dist/block.tk.bigwig.ui-OYIVXE2L.js +0 -202
  350. package/dist/block.tk.hicstraw-UKTGEBWT.js +0 -814
  351. package/dist/block.tk.junction-ZU5KPFQ3.js +0 -2353
  352. package/dist/block.tk.junction.textmatrixui-P4WXTAZR.js +0 -190
  353. package/dist/block.tk.ld-3PQ4O2AE.js +0 -90
  354. package/dist/block.tk.menu-LLITB6UA.js +0 -1050
  355. package/dist/block.tk.pgv-Y3FBXUO3.js +0 -934
  356. package/dist/brainImaging-4B3WXLNP.js +0 -550
  357. package/dist/brainRegions-7VLONUWN.js +0 -213
  358. package/dist/bubbleHeatmap-DI6GJRR6.js +0 -374
  359. package/dist/cellTypeBubbleHeatmap-HJY53DB2.js +0 -274
  360. package/dist/chunk-226MNBZ2.js +0 -240
  361. package/dist/chunk-2CDFU4MQ.js +0 -536
  362. package/dist/chunk-2CDFU4MQ.js.map +0 -7
  363. package/dist/chunk-2CNFGVHU.js +0 -257
  364. package/dist/chunk-2MC3RNKA.js +0 -2685
  365. package/dist/chunk-2SL4QWUS.js +0 -50
  366. package/dist/chunk-3KGBC5MK.js +0 -692
  367. package/dist/chunk-3PCRAPUV.js +0 -56
  368. package/dist/chunk-4DBOMSKP.js +0 -102
  369. package/dist/chunk-57BS6KNI.js +0 -466
  370. package/dist/chunk-5AXS5G4A.js +0 -2334
  371. package/dist/chunk-5HJG6ECV.js +0 -237
  372. package/dist/chunk-5ZYANHGX.js +0 -550
  373. package/dist/chunk-75MRUW2K.js +0 -103
  374. package/dist/chunk-7J3W3KCN.js +0 -255
  375. package/dist/chunk-AIZYAKIE.js +0 -182
  376. package/dist/chunk-AJNFI6GA.js +0 -2008
  377. package/dist/chunk-BJAWDZBL.js +0 -2799
  378. package/dist/chunk-C6PVZVIH.js +0 -379
  379. package/dist/chunk-C77X5ZUV.js +0 -176
  380. package/dist/chunk-CUCP2GMT.js +0 -102
  381. package/dist/chunk-DTGAMBRJ.js +0 -134
  382. package/dist/chunk-DXT7GDHY.js +0 -55
  383. package/dist/chunk-ENPMWVWG.js +0 -5214
  384. package/dist/chunk-FPMJJBLV.js +0 -4389
  385. package/dist/chunk-H7F6DMJA.js +0 -70
  386. package/dist/chunk-HH3NUAR2.js +0 -96
  387. package/dist/chunk-HRTPGNOG.js +0 -159
  388. package/dist/chunk-IFPRYTS7.js +0 -848
  389. package/dist/chunk-IJSFSUI4.js +0 -302
  390. package/dist/chunk-IJSFSUI4.js.map +0 -7
  391. package/dist/chunk-IRQKX6DL.js +0 -263
  392. package/dist/chunk-JNZL7HKB.js +0 -1219
  393. package/dist/chunk-K3G56J5R.js +0 -299
  394. package/dist/chunk-KKUCG2QE.js +0 -516
  395. package/dist/chunk-KPXCXBNU.js +0 -626
  396. package/dist/chunk-LF5WBI27.js +0 -418
  397. package/dist/chunk-MSTYU3QO.js +0 -14
  398. package/dist/chunk-MWARRQT4.js +0 -141
  399. package/dist/chunk-MXKYPTZ7.js +0 -203
  400. package/dist/chunk-PRTLCJYF.js +0 -2941
  401. package/dist/chunk-QNCE6EOK.js +0 -82
  402. package/dist/chunk-RV335DF2.js +0 -266
  403. package/dist/chunk-SFPZUBPM.js +0 -2102
  404. package/dist/chunk-THAUD62Q.js +0 -1253
  405. package/dist/chunk-VBTBUXXX.js +0 -6375
  406. package/dist/chunk-VHWJK2MP.js +0 -56
  407. package/dist/chunk-VMK4RHV5.js +0 -54
  408. package/dist/chunk-WD7FZ5EE.js +0 -26536
  409. package/dist/chunk-WD7FZ5EE.js.map +0 -7
  410. package/dist/chunk-WKT7RF3C.js +0 -468
  411. package/dist/chunk-WXSMUSU7.js +0 -184
  412. package/dist/chunk-WXSX5OQJ.js +0 -296
  413. package/dist/chunk-WY3IORKG.js +0 -194
  414. package/dist/chunk-WYSOOKFJ.js +0 -480
  415. package/dist/chunk-XBBFFOLS.js +0 -123
  416. package/dist/chunk-XSRQGX5H.js +0 -340
  417. package/dist/chunk-YLL6CTBL.js +0 -54
  418. package/dist/chunk-YPBY37KD.js +0 -1339
  419. package/dist/chunk-YUNJBIK4.js +0 -243
  420. package/dist/chunk-ZAC34BZQ.js +0 -35
  421. package/dist/cohort-5WL6UJOS.js +0 -66
  422. package/dist/cohortSunburst-R3Z5KJQL.js +0 -402
  423. package/dist/condition-2IILUMVB.js +0 -323
  424. package/dist/controls-G3JITZF5.js +0 -30
  425. package/dist/controls.config-BO7KPPET.js +0 -30
  426. package/dist/correlation-CZILLVEM.js +0 -91
  427. package/dist/customdata.inputui-BXFQAMTR.js +0 -280
  428. package/dist/dataDownload-QTWR4IW7.js +0 -326
  429. package/dist/databrowser.ui-V2NJQF3U.js +0 -421
  430. package/dist/dictionary-OVAQX6R3.js +0 -109
  431. package/dist/dnaMethylation-DHPFRXB2.js +0 -29
  432. package/dist/dnaMethylation.integration.spec-PJLIRGN5.js +0 -194
  433. package/dist/e2pca-O7SNMJGB.js +0 -340
  434. package/dist/ep-NIVLKG4S.js +0 -1247
  435. package/dist/expclust.gdc.spec-LVCD6C43.js +0 -298
  436. package/dist/facet-LB4SCXE4.js +0 -556
  437. package/dist/gb-3IJ4NCPO.js +0 -77
  438. package/dist/geneExpClustering-SIAC7CMA.js +0 -240
  439. package/dist/geneExpression-P2TTZXN2.js +0 -29
  440. package/dist/geneExpression.unit.spec-Q5D6XHUF.js +0 -151
  441. package/dist/geneORA-PKUIJKTL.js +0 -269
  442. package/dist/geneRanking-ZGT5MHBV.js +0 -544
  443. package/dist/geneVariant-24YNANTT.js +0 -289
  444. package/dist/geneVariant-CDGENHWQ.js +0 -32
  445. package/dist/geneVariant.integration.spec-7QW4C2WO.js +0 -672
  446. package/dist/genefusion.ui-NVXGSBXD.js +0 -299
  447. package/dist/geneset-7STL6UDD.js +0 -199
  448. package/dist/genomeBrowser.spec-OE2CIP7I.js +0 -272
  449. package/dist/grin2-2HXUIY5O.js +0 -66
  450. package/dist/grin2-32IIJR5E.js +0 -945
  451. package/dist/hierCluster-MDZEI2KB.js +0 -51
  452. package/dist/hierCluster-T3PZUGBI.js +0 -55
  453. package/dist/hierCluster.config-7UN6AYGB.js +0 -32
  454. package/dist/hierCluster.integration.spec-DWOYVK6T.js +0 -479
  455. package/dist/hierCluster.interactivity-5OM6XNFG.js +0 -45
  456. package/dist/imagePlot-KBRXDV5G.js +0 -152
  457. package/dist/importPlot-DJMIC22L.js +0 -8
  458. package/dist/isoformExpression-SWDWADRC.js +0 -31
  459. package/dist/isoformExpression.unit.spec-2U5KCYBP.js +0 -233
  460. package/dist/junction-NMXVVGRG.js +0 -32
  461. package/dist/junction.unit.spec-JTGBPPN7.js +0 -178
  462. package/dist/launch.adhoc-YB5SKMNY.js +0 -33
  463. package/dist/leftlabel.sample-QKXIODCS.js +0 -253
  464. package/dist/lollipop-TSZ62PBH.js +0 -162
  465. package/dist/maf-4L5YN4CG.js +0 -451
  466. package/dist/maftimeline-VOYB3NY3.js +0 -583
  467. package/dist/matrix-IWJECVTF.js +0 -55
  468. package/dist/matrix-MMJAJZA7.js +0 -50
  469. package/dist/matrix.config-DZGOZWJS.js +0 -33
  470. package/dist/matrix.integration.spec-2N237E7T.js +0 -3156
  471. package/dist/matrix.interactivity-FL33UUKR.js +0 -33
  472. package/dist/matrix.layout-7SYHV3KJ.js +0 -35
  473. package/dist/matrix.renderers-3SIBT2RP.js +0 -30
  474. package/dist/matrix.sort.unit.spec-L3H44T6I.js +0 -464
  475. package/dist/matrix.sorterUi.unit.spec-2NRU5UFH.js +0 -334
  476. package/dist/matrix.unit.spec-HRZIJB6T.js +0 -146
  477. package/dist/mavb-ZVRQSDPS.js +0 -726
  478. package/dist/mds.fimo-ZKETTET7.js +0 -509
  479. package/dist/mds.samplescatterplot-ZV3UNRLP.js +0 -1545
  480. package/dist/mds.survivalplot-OVXZRTU4.js +0 -472
  481. package/dist/multivalue-6BE5IA4F.js +0 -79
  482. package/dist/oncomatrix-XK62NEOO.js +0 -286
  483. package/dist/oncomatrix.spec-YVTCHOPS.js +0 -439
  484. package/dist/plot.2dvaf-NUOBWMNX.js +0 -368
  485. package/dist/plot.app-G6IQWXTV.js +0 -32
  486. package/dist/plot.barplot-6QJ6HEJR.js +0 -93
  487. package/dist/plot.boxplot-XKQJSW2O.js +0 -142
  488. package/dist/plot.brainImaging-UTHFJFXU.js +0 -51
  489. package/dist/plot.disco-3MSCX7TM.js +0 -98
  490. package/dist/plot.ssgq-4KBVHF42.js +0 -130
  491. package/dist/plot.vaf2cov-OGUQSSDS.js +0 -249
  492. package/dist/polar2-V7M56GTZ.js +0 -228
  493. package/dist/profileForms-TS3BJLHH.js +0 -937
  494. package/dist/profilePlot-DP5272HR.js +0 -45
  495. package/dist/proteinView-K4K4SP3L.js +0 -1346
  496. package/dist/proteomeCohortCompare-SFWVGLFK.js +0 -866
  497. package/dist/pseudbulk.unit.spec-NFOA7J2C.js +0 -82
  498. package/dist/pseudobulk-XKZQEZ4I.js +0 -31
  499. package/dist/qualitative-7OSFNVI5.js +0 -241
  500. package/dist/qualitative-OIIN6E4Y.js +0 -34
  501. package/dist/radar2-AHZJKX7S.js +0 -323
  502. package/dist/radarFacility2-OUW6D5E7.js +0 -331
  503. package/dist/render-7UZSGX3Q.js +0 -29
  504. package/dist/report-J7HKTXZ2.js +0 -213
  505. package/dist/sampleView-6547OUIM.js +0 -39
  506. package/dist/samplelst-UHF23UEB.js +0 -114
  507. package/dist/samplematrix-OOKS3TMR.js +0 -2188
  508. package/dist/sc-WF2BLGNG.js +0 -77
  509. package/dist/scatter-ABCVFGRV.js +0 -84
  510. package/dist/scatter-WF7XM3IA.js +0 -919
  511. package/dist/selectGenomeWithTklst-67HU5KRB.js +0 -125
  512. package/dist/singleCellCellType-3FZPJ25V.js +0 -29
  513. package/dist/singleCellCellType.unit.spec-TOMREHWK.js +0 -150
  514. package/dist/singleCellGeneExpression-NQTJ5KJQ.js +0 -29
  515. package/dist/singleCellGeneExpression.unit.spec-ZWUQTU2N.js +0 -144
  516. package/dist/singleCellNumericValue-VI7H722L.js +0 -29
  517. package/dist/singleCellNumericValue.unit.spec-QGLHES7H.js +0 -412
  518. package/dist/singleCellPlot-RU5T6SJK.js +0 -44
  519. package/dist/singlecell-C3CJVNXP.js +0 -1562
  520. package/dist/singlecell-NRQZ7KC6.js +0 -77
  521. package/dist/snp-X6XY65VS.js +0 -29
  522. package/dist/snp.unit.spec-6EENK7GQ.js +0 -167
  523. package/dist/snplocus-R4JA6TFT.js +0 -200
  524. package/dist/snplst-SOWVHSXH.js +0 -36
  525. package/dist/spliceevent.a53ss.diagram-IRLCCVQZ.js +0 -142
  526. package/dist/spliceevent.exonskip.diagram-4KG7LE5D.js +0 -274
  527. package/dist/spliceevent.noeventdiagram-OWXAJJX7.js +0 -451
  528. package/dist/ssGSEA-EMOKPLMP.js +0 -29
  529. package/dist/ssGSEA.unit.spec-KXQ7R5WH.js +0 -79
  530. package/dist/stattable-H2G7MOZG.js +0 -112
  531. package/dist/studyCatalog-3ITQXWFL.js +0 -457
  532. package/dist/summarizeCnvGeneexp-ZIPU6YDY.js +0 -154
  533. package/dist/summarizeGeneexpSurvival-3RYU226R.js +0 -101
  534. package/dist/summarizeMutationCnv-RGDBUB22.js +0 -155
  535. package/dist/summarizeMutationDiagnosis-Z4MZE6Y4.js +0 -31
  536. package/dist/summarizeMutationSurvival-Z5CNRH7E.js +0 -95
  537. package/dist/summary-6QQCNX3B.js +0 -40
  538. package/dist/summary.integration.spec-3ULXTZUP.js +0 -405
  539. package/dist/summaryInput-4QKR34QB.js +0 -238
  540. package/dist/sunburst-KB3BWC72.js +0 -34
  541. package/dist/sunburst-XTFBHZNH.js +0 -274
  542. package/dist/survival-7O6ZK63E.js +0 -49
  543. package/dist/survival-NNCY4K6C.js +0 -1248
  544. package/dist/survival.integration.spec-ZYZHZAXA.js +0 -609
  545. package/dist/svgraph-ZLSFFEAC.js +0 -1377
  546. package/dist/svmr-REBBDEYM.js +0 -3834
  547. package/dist/swimmer-NUBRIWLI.js +0 -993
  548. package/dist/table-CWIQQESJ.js +0 -192
  549. package/dist/termCollection-7TYJSQ45.js +0 -29
  550. package/dist/termCollection-7Z55QNL7.js +0 -247
  551. package/dist/termCollection.unit.spec-LQ5MIBDH.js +0 -295
  552. package/dist/termCollectionFractionSelection-24DZYVDU.js +0 -38
  553. package/dist/termCollectionFractionSelection.unit.spec-DCV2CFS5.js +0 -184
  554. package/dist/tk-2WZFPRCP.js +0 -37
  555. package/dist/tk-QTLEYIP7.js +0 -1193
  556. package/dist/tp.ui-HXQX2UH4.js +0 -1453
  557. package/dist/tvs.categorical-4D3JI2ER.js +0 -28
  558. package/dist/tvs.condition-62FXFHZ5.js +0 -160
  559. package/dist/tvs.dt-FZSVMJOO.js +0 -34
  560. package/dist/tvs.dtcnv.categorical-PPFQIC42.js +0 -31
  561. package/dist/tvs.dtcnv.continuous-TV2IGHY4.js +0 -72
  562. package/dist/tvs.dtfusion-ON4BA4XJ.js +0 -31
  563. package/dist/tvs.dtitd-VFNROOWQ.js +0 -31
  564. package/dist/tvs.dtsnvindel-ZXOP37T5.js +0 -31
  565. package/dist/tvs.dtsv-EUHPTW7J.js +0 -31
  566. package/dist/tvs.multivalue-NHVXZNDI.js +0 -84
  567. package/dist/tvs.numeric-FPWDPO3J.js +0 -32
  568. package/dist/tvs.samplelst-ZZHRNUP4.js +0 -95
  569. package/dist/tvs.survival-F3KSG3U6.js +0 -110
  570. package/dist/tvs.termCollection-B37DZLDY.js +0 -118
  571. package/dist/vocabulary-XNE5FFDK.js +0 -32
  572. package/dist/wsi.direct-3YH3QGQD.js +0 -11514
  573. /package/dist/{2dmaf-7YU3SNKL.js.map → 2dmaf-QFXSYOYN.js.map} +0 -0
  574. /package/dist/{AggMatrixInput-73CDR5FS.js.map → AggMatrixInput-7D4ZUYJK.js.map} +0 -0
  575. /package/dist/{AggregateMatrix-NNULVFBM.js.map → AggregateMatrix-NVSFZEW3.js.map} +0 -0
  576. /package/dist/{AppHeader-EZDDLLXU.js.map → AppHeader-5YJWBQP6.js.map} +0 -0
  577. /package/dist/{BoxPlot-463E7CRY.js.map → BoxPlot-52WWBGKN.js.map} +0 -0
  578. /package/dist/{CorrelationVolcano-LHIIMBPP.js.map → CorrelationVolcano-WS23O2JT.js.map} +0 -0
  579. /package/dist/{Cuminc-UL2TCIKV.js.map → Cuminc-5LJQYFEE.js.map} +0 -0
  580. /package/dist/{DE-VRFSKFDW.js.map → DE-Z5GBDXDU.js.map} +0 -0
  581. /package/dist/{DEinput-FZTQRWVC.js.map → DEinput-3EAIVG5U.js.map} +0 -0
  582. /package/dist/{DM-PO7CQZNT.js.map → DM-24NZPPS6.js.map} +0 -0
  583. /package/dist/{DifferentialAnalysis-WK6HE3YH.js.map → DifferentialAnalysis-LRAPDIXB.js.map} +0 -0
  584. /package/dist/{Disco-YBNQJQFG.js.map → Disco-IDOTCKSD.js.map} +0 -0
  585. /package/dist/{Disco.UI-HC5XYBFV.js.map → Disco.UI-SLJKAA6N.js.map} +0 -0
  586. /package/dist/{DmrPlot-7VJ5C66D.js.map → DmrPlot-5CRGQNM3.js.map} +0 -0
  587. /package/dist/{GB-VPFQRDRO.js.map → GB-YCDIORF3.js.map} +0 -0
  588. /package/dist/{GSEA-ZEJB3QZQ.js.map → GSEA-IGWX3AG7.js.map} +0 -0
  589. /package/dist/{GeneExpInput-SBDDIY6G.js.map → GeneExpInput-PPOTCILZ.js.map} +0 -0
  590. /package/dist/{Geomap-23AHGP2V.js.map → Geomap-D5JPCJ5L.js.map} +0 -0
  591. /package/dist/{HicApp-7AQQE4CM.js.map → HicApp-BNMMISAR.js.map} +0 -0
  592. /package/dist/{IDCViewer-NO5Q6VOB.js.map → IDCViewer-IUPPLC5B.js.map} +0 -0
  593. /package/dist/{NumBinaryEditor-DSRP4OOU.js.map → NumBinaryEditor-45I5YNHI.js.map} +0 -0
  594. /package/dist/{NumBinaryEditor.unit.spec-TT666YL4.js.map → NumBinaryEditor.unit.spec-5CJPIDH4.js.map} +0 -0
  595. /package/dist/{NumContEditor-6CURFOCH.js.map → NumContEditor-VMCE5LUM.js.map} +0 -0
  596. /package/dist/{NumContEditor.unit.spec-MNVCFCMP.js.map → NumContEditor.unit.spec-DKNXTVXT.js.map} +0 -0
  597. /package/dist/{NumCustomBinEditor-SQRR5EFL.js.map → NumCustomBinEditor-3EESV7PW.js.map} +0 -0
  598. /package/dist/{NumCustomBinEditor.unit.spec-F7BZWGGT.js.map → NumCustomBinEditor.unit.spec-JPOK7BWZ.js.map} +0 -0
  599. /package/dist/{NumDiscreteEditor-U7Z2QNYP.js.map → NumDiscreteEditor-YZ3Q4J4M.js.map} +0 -0
  600. /package/dist/{NumDiscreteEditor.unit.spec-EIEBUZCX.js.map → NumDiscreteEditor.unit.spec-V6NSX72E.js.map} +0 -0
  601. /package/dist/{NumRegularBinEditor-CVZSWN6Y.js.map → NumRegularBinEditor-6GI63X5V.js.map} +0 -0
  602. /package/dist/{NumRegularBinEditor.unit.spec-ZMAJOIHL.js.map → NumRegularBinEditor.unit.spec-KCGZLQ6T.js.map} +0 -0
  603. /package/dist/{NumSplineEditor-U43D5NBJ.js.map → NumSplineEditor-OMJUFDSC.js.map} +0 -0
  604. /package/dist/{NumSplineEditor.unit.spec-C52AADTS.js.map → NumSplineEditor.unit.spec-KUB2OITH.js.map} +0 -0
  605. /package/dist/{NumericDensity-PUKDZOVI.js.map → NumericDensity-M4BIVIB3.js.map} +0 -0
  606. /package/dist/{NumericDensity.unit.spec-2347S76D.js.map → NumericDensity.unit.spec-G3GJMO4S.js.map} +0 -0
  607. /package/dist/{NumericHandler-3RT32PTR.js.map → NumericHandler-AMV4BETD.js.map} +0 -0
  608. /package/dist/{NumericHandler.unit.spec-4PADL4KZ.js.map → NumericHandler.unit.spec-OJDMQQHX.js.map} +0 -0
  609. /package/dist/{ProteomeInput-NFV4FW4U.js.map → ProteomeInput-KB7YRARQ.js.map} +0 -0
  610. /package/dist/{Regression-N7M7N6G4.js.map → Regression-5KSKHUEJ.js.map} +0 -0
  611. /package/dist/{RunChart2-UPQ7C6QE.js.map → RunChart2-JJ4GQF44.js.map} +0 -0
  612. /package/dist/{SC-KBW2NHUV.js.map → SC-LKCBWZQX.js.map} +0 -0
  613. /package/dist/{Violin-GWCOP3ZF.js.map → Violin-JRP7R53K.js.map} +0 -0
  614. /package/dist/{Volcano-X3HT32GQ.js.map → Volcano-BDD3PZ4T.js.map} +0 -0
  615. /package/dist/{Wsi-NXAEOYIS.js.map → Wsi-3C3ERYSG.js.map} +0 -0
  616. /package/dist/{adSandbox-RPEWEEW7.js.map → adSandbox-GFF6ZCRM.js.map} +0 -0
  617. /package/dist/{animatedBubbleChart-ILDMZRBX.js.map → animatedBubbleChart-PUPXCFJW.js.map} +0 -0
  618. /package/dist/{app-LOUC4J47.js.map → app-EICBB32X.js.map} +0 -0
  619. /package/dist/{app-MRKXZ6AZ.js.map → app-Z7M3CFWA.js.map} +0 -0
  620. /package/dist/{bam-SQWPHCZZ.js.map → bam-KQ5F34X5.js.map} +0 -0
  621. /package/dist/{barchart-CJR37234.js.map → barchart-WRAEMD7B.js.map} +0 -0
  622. /package/dist/{barchart2-QQYLTHWR.js.map → barchart2-5CX3CO4K.js.map} +0 -0
  623. /package/dist/{block-GLF6QNKY.js.map → block-53QIZEH3.js.map} +0 -0
  624. /package/dist/{block.init-YJQTJIDO.js.map → block.init-4V3SIUNX.js.map} +0 -0
  625. /package/dist/{block.mds.expressionrank-GBMEI5KQ.js.map → block.mds.expressionrank-5YNTX35V.js.map} +0 -0
  626. /package/dist/{block.mds.geneboxplot-XWE3E5IW.js.map → block.mds.geneboxplot-X5OHLSWT.js.map} +0 -0
  627. /package/dist/{block.mds.junction-QLEHFVPE.js.map → block.mds.junction-QBJF6MFG.js.map} +0 -0
  628. /package/dist/{block.mds.svcnv-53DTOPBC.js.map → block.mds.svcnv-BNCMHJJB.js.map} +0 -0
  629. /package/dist/{block.svg-57T37ABS.js.map → block.svg-KQELYSEO.js.map} +0 -0
  630. /package/dist/{block.tk.aicheck-6DXJTS3H.js.map → block.tk.aicheck-5EDNNXGL.js.map} +0 -0
  631. /package/dist/{block.tk.bam-CJFFQDNX.js.map → block.tk.bam-FRPCGSAE.js.map} +0 -0
  632. /package/dist/{block.tk.bigwig.ui-OYIVXE2L.js.map → block.tk.bigwig.ui-XUJPSA6D.js.map} +0 -0
  633. /package/dist/{block.tk.hicstraw-UKTGEBWT.js.map → block.tk.hicstraw-MVLZALFC.js.map} +0 -0
  634. /package/dist/{block.tk.junction-ZU5KPFQ3.js.map → block.tk.junction-DLZNHWSA.js.map} +0 -0
  635. /package/dist/{block.tk.junction.textmatrixui-P4WXTAZR.js.map → block.tk.junction.textmatrixui-J3EODITY.js.map} +0 -0
  636. /package/dist/{block.tk.ld-3PQ4O2AE.js.map → block.tk.ld-4GEJ2Y2K.js.map} +0 -0
  637. /package/dist/{block.tk.menu-LLITB6UA.js.map → block.tk.menu-NM7KA5GZ.js.map} +0 -0
  638. /package/dist/{block.tk.pgv-Y3FBXUO3.js.map → block.tk.pgv-XFOJACVC.js.map} +0 -0
  639. /package/dist/{brainImaging-4B3WXLNP.js.map → brainImaging-WFRZQANN.js.map} +0 -0
  640. /package/dist/{brainRegions-7VLONUWN.js.map → brainRegions-66KWCUF2.js.map} +0 -0
  641. /package/dist/{bubbleHeatmap-DI6GJRR6.js.map → bubbleHeatmap-VKLIJOMM.js.map} +0 -0
  642. /package/dist/{cellTypeBubbleHeatmap-HJY53DB2.js.map → cellTypeBubbleHeatmap-ZPCXC52I.js.map} +0 -0
  643. /package/dist/{chunk-DTGAMBRJ.js.map → chunk-2NDFMFNM.js.map} +0 -0
  644. /package/dist/{chunk-MXKYPTZ7.js.map → chunk-34AGCF72.js.map} +0 -0
  645. /package/dist/{chunk-HH3NUAR2.js.map → chunk-3KKI63GB.js.map} +0 -0
  646. /package/dist/{chunk-MSTYU3QO.js.map → chunk-3LUHZYIN.js.map} +0 -0
  647. /package/dist/{chunk-5HJG6ECV.js.map → chunk-5XXYEKE2.js.map} +0 -0
  648. /package/dist/{chunk-IFPRYTS7.js.map → chunk-6C3USAU5.js.map} +0 -0
  649. /package/dist/{chunk-ZAC34BZQ.js.map → chunk-7F2FBQRP.js.map} +0 -0
  650. /package/dist/{chunk-MWARRQT4.js.map → chunk-7TRD7A2U.js.map} +0 -0
  651. /package/dist/{chunk-2CNFGVHU.js.map → chunk-AG2PISH4.js.map} +0 -0
  652. /package/dist/{chunk-BJAWDZBL.js.map → chunk-BGYZJXYZ.js.map} +0 -0
  653. /package/dist/{chunk-SFPZUBPM.js.map → chunk-BVSVFCKB.js.map} +0 -0
  654. /package/dist/{chunk-ENPMWVWG.js.map → chunk-BY5CLUY5.js.map} +0 -0
  655. /package/dist/{chunk-YLL6CTBL.js.map → chunk-C6PMNLN4.js.map} +0 -0
  656. /package/dist/{chunk-LF5WBI27.js.map → chunk-CSYXTB7F.js.map} +0 -0
  657. /package/dist/{chunk-DXT7GDHY.js.map → chunk-DFKTWNCC.js.map} +0 -0
  658. /package/dist/{chunk-3KGBC5MK.js.map → chunk-FQHE7CLH.js.map} +0 -0
  659. /package/dist/{chunk-K3G56J5R.js.map → chunk-FRLAPBYW.js.map} +0 -0
  660. /package/dist/{chunk-RV335DF2.js.map → chunk-HKYUCYOQ.js.map} +0 -0
  661. /package/dist/{chunk-7J3W3KCN.js.map → chunk-IQO3VZCP.js.map} +0 -0
  662. /package/dist/{chunk-WKT7RF3C.js.map → chunk-J5XV35LN.js.map} +0 -0
  663. /package/dist/{chunk-VHWJK2MP.js.map → chunk-JMWCL3QQ.js.map} +0 -0
  664. /package/dist/{chunk-CUCP2GMT.js.map → chunk-K3Q3KTBT.js.map} +0 -0
  665. /package/dist/{chunk-5ZYANHGX.js.map → chunk-LHM4UVYZ.js.map} +0 -0
  666. /package/dist/{chunk-KPXCXBNU.js.map → chunk-LMVYPBT4.js.map} +0 -0
  667. /package/dist/{chunk-3PCRAPUV.js.map → chunk-LUGZE4FR.js.map} +0 -0
  668. /package/dist/{chunk-5AXS5G4A.js.map → chunk-LXSBSJUL.js.map} +0 -0
  669. /package/dist/{chunk-C6PVZVIH.js.map → chunk-MOAHKBYO.js.map} +0 -0
  670. /package/dist/{chunk-JNZL7HKB.js.map → chunk-MU7GTJYA.js.map} +0 -0
  671. /package/dist/{chunk-AIZYAKIE.js.map → chunk-MXZYJ7WN.js.map} +0 -0
  672. /package/dist/{chunk-C77X5ZUV.js.map → chunk-NZB6RZK2.js.map} +0 -0
  673. /package/dist/{chunk-WXSMUSU7.js.map → chunk-OF6FDDKV.js.map} +0 -0
  674. /package/dist/{chunk-2SL4QWUS.js.map → chunk-OPMEDR4F.js.map} +0 -0
  675. /package/dist/{chunk-FPMJJBLV.js.map → chunk-ORYAOIVF.js.map} +0 -0
  676. /package/dist/{chunk-IRQKX6DL.js.map → chunk-PHKA5BP7.js.map} +0 -0
  677. /package/dist/{chunk-PRTLCJYF.js.map → chunk-QI4EZK7S.js.map} +0 -0
  678. /package/dist/{chunk-H7F6DMJA.js.map → chunk-QNSB6O4W.js.map} +0 -0
  679. /package/dist/{chunk-226MNBZ2.js.map → chunk-QPRSVLI7.js.map} +0 -0
  680. /package/dist/{chunk-XSRQGX5H.js.map → chunk-RSMASA5S.js.map} +0 -0
  681. /package/dist/{chunk-VMK4RHV5.js.map → chunk-S2BMWHFY.js.map} +0 -0
  682. /package/dist/{chunk-57BS6KNI.js.map → chunk-SKL52OWF.js.map} +0 -0
  683. /package/dist/{chunk-4DBOMSKP.js.map → chunk-TRWUXFVB.js.map} +0 -0
  684. /package/dist/{chunk-AJNFI6GA.js.map → chunk-URCFNXAK.js.map} +0 -0
  685. /package/dist/{chunk-WY3IORKG.js.map → chunk-V2D7DA2M.js.map} +0 -0
  686. /package/dist/{chunk-WYSOOKFJ.js.map → chunk-V2ZVMDBY.js.map} +0 -0
  687. /package/dist/{chunk-YUNJBIK4.js.map → chunk-VIFY62YA.js.map} +0 -0
  688. /package/dist/{chunk-WXSX5OQJ.js.map → chunk-VZ2JWFSX.js.map} +0 -0
  689. /package/dist/{chunk-HRTPGNOG.js.map → chunk-W5GR42L2.js.map} +0 -0
  690. /package/dist/{chunk-YPBY37KD.js.map → chunk-WDOX6A6T.js.map} +0 -0
  691. /package/dist/{chunk-VBTBUXXX.js.map → chunk-XPL54FXR.js.map} +0 -0
  692. /package/dist/{chunk-75MRUW2K.js.map → chunk-XV3KWMG3.js.map} +0 -0
  693. /package/dist/{chunk-XBBFFOLS.js.map → chunk-YFFQ7JTJ.js.map} +0 -0
  694. /package/dist/{chunk-THAUD62Q.js.map → chunk-ZD6AIFTS.js.map} +0 -0
  695. /package/dist/{chunk-KKUCG2QE.js.map → chunk-ZDVYAOWC.js.map} +0 -0
  696. /package/dist/{chunk-2MC3RNKA.js.map → chunk-ZKIC65KR.js.map} +0 -0
  697. /package/dist/{chunk-QNCE6EOK.js.map → chunk-ZPRI5XCE.js.map} +0 -0
  698. /package/dist/{cohort-5WL6UJOS.js.map → cohort-CI22KICX.js.map} +0 -0
  699. /package/dist/{cohortSunburst-R3Z5KJQL.js.map → cohortSunburst-Z5DANXVS.js.map} +0 -0
  700. /package/dist/{condition-2IILUMVB.js.map → condition-GZOA7BZJ.js.map} +0 -0
  701. /package/dist/{controls-G3JITZF5.js.map → controls-OWC25VQN.js.map} +0 -0
  702. /package/dist/{controls.config-BO7KPPET.js.map → controls.config-UVC4Q7BS.js.map} +0 -0
  703. /package/dist/{correlation-CZILLVEM.js.map → correlation-EBA5YVXA.js.map} +0 -0
  704. /package/dist/{customdata.inputui-BXFQAMTR.js.map → customdata.inputui-FZRZCPS3.js.map} +0 -0
  705. /package/dist/{dataDownload-QTWR4IW7.js.map → dataDownload-WIPQU33P.js.map} +0 -0
  706. /package/dist/{databrowser.ui-V2NJQF3U.js.map → databrowser.ui-6L6Q72W4.js.map} +0 -0
  707. /package/dist/{dictionary-OVAQX6R3.js.map → dictionary-4VZEPGW5.js.map} +0 -0
  708. /package/dist/{dnaMethylation-DHPFRXB2.js.map → dnaMethylation-LN6THRNZ.js.map} +0 -0
  709. /package/dist/{dnaMethylation.integration.spec-PJLIRGN5.js.map → dnaMethylation.integration.spec-BXC6EPUV.js.map} +0 -0
  710. /package/dist/{e2pca-O7SNMJGB.js.map → e2pca-EXFI4Q2Y.js.map} +0 -0
  711. /package/dist/{ep-NIVLKG4S.js.map → ep-T7EZ34XV.js.map} +0 -0
  712. /package/dist/{expclust.gdc.spec-LVCD6C43.js.map → expclust.gdc.spec-NAN4M75R.js.map} +0 -0
  713. /package/dist/{facet-LB4SCXE4.js.map → facet-BJFUIWHK.js.map} +0 -0
  714. /package/dist/{gb-3IJ4NCPO.js.map → gb-CBC3PDKZ.js.map} +0 -0
  715. /package/dist/{geneExpClustering-SIAC7CMA.js.map → geneExpClustering-7JFY7TQT.js.map} +0 -0
  716. /package/dist/{geneExpression-P2TTZXN2.js.map → geneExpression-FOQOKD34.js.map} +0 -0
  717. /package/dist/{geneExpression.unit.spec-Q5D6XHUF.js.map → geneExpression.unit.spec-XSFC5ZJP.js.map} +0 -0
  718. /package/dist/{geneORA-PKUIJKTL.js.map → geneORA-KYPN66QU.js.map} +0 -0
  719. /package/dist/{geneRanking-ZGT5MHBV.js.map → geneRanking-VEHFMRFL.js.map} +0 -0
  720. /package/dist/{geneVariant-24YNANTT.js.map → geneVariant-77V6FNJX.js.map} +0 -0
  721. /package/dist/{geneVariant-CDGENHWQ.js.map → geneVariant-BS3XZFYM.js.map} +0 -0
  722. /package/dist/{geneVariant.integration.spec-7QW4C2WO.js.map → geneVariant.integration.spec-US4OY3S5.js.map} +0 -0
  723. /package/dist/{genefusion.ui-NVXGSBXD.js.map → genefusion.ui-YNVTTLDE.js.map} +0 -0
  724. /package/dist/{geneset-7STL6UDD.js.map → geneset-BH5MWNJQ.js.map} +0 -0
  725. /package/dist/{genomeBrowser.spec-OE2CIP7I.js.map → genomeBrowser.spec-BFTGLRHG.js.map} +0 -0
  726. /package/dist/{grin2-2HXUIY5O.js.map → grin2-4AXUYJIL.js.map} +0 -0
  727. /package/dist/{grin2-32IIJR5E.js.map → grin2-5T557HKM.js.map} +0 -0
  728. /package/dist/{hierCluster-MDZEI2KB.js.map → hierCluster-IJHBVO2N.js.map} +0 -0
  729. /package/dist/{hierCluster-T3PZUGBI.js.map → hierCluster-POJBHBN6.js.map} +0 -0
  730. /package/dist/{hierCluster.config-7UN6AYGB.js.map → hierCluster.config-UUQEFTIG.js.map} +0 -0
  731. /package/dist/{hierCluster.integration.spec-DWOYVK6T.js.map → hierCluster.integration.spec-PZFUAOHX.js.map} +0 -0
  732. /package/dist/{hierCluster.interactivity-5OM6XNFG.js.map → hierCluster.interactivity-6CN5PNFR.js.map} +0 -0
  733. /package/dist/{imagePlot-KBRXDV5G.js.map → imagePlot-HKPPACFV.js.map} +0 -0
  734. /package/dist/{importPlot-DJMIC22L.js.map → importPlot-EMI6BVPR.js.map} +0 -0
  735. /package/dist/{isoformExpression-SWDWADRC.js.map → isoformExpression-SFBA3SY7.js.map} +0 -0
  736. /package/dist/{isoformExpression.unit.spec-2U5KCYBP.js.map → isoformExpression.unit.spec-JKYWHGRN.js.map} +0 -0
  737. /package/dist/{junction-NMXVVGRG.js.map → junction-PJPOCKK7.js.map} +0 -0
  738. /package/dist/{junction.unit.spec-JTGBPPN7.js.map → junction.unit.spec-CVYLAHZF.js.map} +0 -0
  739. /package/dist/{launch.adhoc-YB5SKMNY.js.map → launch.adhoc-R7SYX6GF.js.map} +0 -0
  740. /package/dist/{leftlabel.sample-QKXIODCS.js.map → leftlabel.sample-XJUDFAKS.js.map} +0 -0
  741. /package/dist/{lollipop-TSZ62PBH.js.map → lollipop-V43BWGBT.js.map} +0 -0
  742. /package/dist/{maf-4L5YN4CG.js.map → maf-KU44HXN3.js.map} +0 -0
  743. /package/dist/{maftimeline-VOYB3NY3.js.map → maftimeline-JPHVYTTU.js.map} +0 -0
  744. /package/dist/{matrix-IWJECVTF.js.map → matrix-EABQEAMC.js.map} +0 -0
  745. /package/dist/{matrix-MMJAJZA7.js.map → matrix-HMLF5MDD.js.map} +0 -0
  746. /package/dist/{matrix.config-DZGOZWJS.js.map → matrix.config-RX5GWHTM.js.map} +0 -0
  747. /package/dist/{matrix.integration.spec-2N237E7T.js.map → matrix.integration.spec-MZPSYXTF.js.map} +0 -0
  748. /package/dist/{matrix.interactivity-FL33UUKR.js.map → matrix.interactivity-6AJ5BGEP.js.map} +0 -0
  749. /package/dist/{matrix.layout-7SYHV3KJ.js.map → matrix.layout-CTHRQE7U.js.map} +0 -0
  750. /package/dist/{matrix.renderers-3SIBT2RP.js.map → matrix.renderers-UGQXONTG.js.map} +0 -0
  751. /package/dist/{matrix.sort.unit.spec-L3H44T6I.js.map → matrix.sort.unit.spec-FJKIBDTU.js.map} +0 -0
  752. /package/dist/{matrix.sorterUi.unit.spec-2NRU5UFH.js.map → matrix.sorterUi.unit.spec-6DQ6KGXT.js.map} +0 -0
  753. /package/dist/{matrix.unit.spec-HRZIJB6T.js.map → matrix.unit.spec-7Y3BKFNQ.js.map} +0 -0
  754. /package/dist/{mavb-ZVRQSDPS.js.map → mavb-ADD57P2Q.js.map} +0 -0
  755. /package/dist/{mds.fimo-ZKETTET7.js.map → mds.fimo-7WH5GVFZ.js.map} +0 -0
  756. /package/dist/{mds.samplescatterplot-ZV3UNRLP.js.map → mds.samplescatterplot-JYFOORUG.js.map} +0 -0
  757. /package/dist/{mds.survivalplot-OVXZRTU4.js.map → mds.survivalplot-2V4H3YZY.js.map} +0 -0
  758. /package/dist/{multivalue-6BE5IA4F.js.map → multivalue-GLS3RPQ5.js.map} +0 -0
  759. /package/dist/{oncomatrix-XK62NEOO.js.map → oncomatrix-QA267TP2.js.map} +0 -0
  760. /package/dist/{oncomatrix.spec-YVTCHOPS.js.map → oncomatrix.spec-H6AAIP7H.js.map} +0 -0
  761. /package/dist/{plot.2dvaf-NUOBWMNX.js.map → plot.2dvaf-JW3Z25M3.js.map} +0 -0
  762. /package/dist/{plot.app-G6IQWXTV.js.map → plot.app-CUCDOVC5.js.map} +0 -0
  763. /package/dist/{plot.barplot-6QJ6HEJR.js.map → plot.barplot-KBVYKICH.js.map} +0 -0
  764. /package/dist/{plot.boxplot-XKQJSW2O.js.map → plot.boxplot-BTS6ZWCQ.js.map} +0 -0
  765. /package/dist/{plot.brainImaging-UTHFJFXU.js.map → plot.brainImaging-GGUARYRT.js.map} +0 -0
  766. /package/dist/{plot.disco-3MSCX7TM.js.map → plot.disco-EP274JEW.js.map} +0 -0
  767. /package/dist/{plot.ssgq-4KBVHF42.js.map → plot.ssgq-4VUH3ZWV.js.map} +0 -0
  768. /package/dist/{plot.vaf2cov-OGUQSSDS.js.map → plot.vaf2cov-2FPWA2FS.js.map} +0 -0
  769. /package/dist/{polar2-V7M56GTZ.js.map → polar2-7W5JRMB5.js.map} +0 -0
  770. /package/dist/{profileForms-TS3BJLHH.js.map → profileForms-2IKL3SZU.js.map} +0 -0
  771. /package/dist/{profilePlot-DP5272HR.js.map → profilePlot-IURW2HQN.js.map} +0 -0
  772. /package/dist/{proteinView-K4K4SP3L.js.map → proteinView-4ZRODQN3.js.map} +0 -0
  773. /package/dist/{proteomeCohortCompare-SFWVGLFK.js.map → proteomeCohortCompare-BK3FLW4Z.js.map} +0 -0
  774. /package/dist/{pseudbulk.unit.spec-NFOA7J2C.js.map → pseudbulk.unit.spec-QGQCCHNF.js.map} +0 -0
  775. /package/dist/{pseudobulk-XKZQEZ4I.js.map → pseudobulk-7HEOBIFO.js.map} +0 -0
  776. /package/dist/{qualitative-OIIN6E4Y.js.map → qualitative-6HWIG5NU.js.map} +0 -0
  777. /package/dist/{qualitative-7OSFNVI5.js.map → qualitative-WGEEUNH6.js.map} +0 -0
  778. /package/dist/{radar2-AHZJKX7S.js.map → radar2-VXP322F7.js.map} +0 -0
  779. /package/dist/{radarFacility2-OUW6D5E7.js.map → radarFacility2-IJGJ3AJB.js.map} +0 -0
  780. /package/dist/{render-7UZSGX3Q.js.map → render-MMCUV7QI.js.map} +0 -0
  781. /package/dist/{report-J7HKTXZ2.js.map → report-F22EFD7C.js.map} +0 -0
  782. /package/dist/{sampleView-6547OUIM.js.map → sampleView-3DVB2PQT.js.map} +0 -0
  783. /package/dist/{samplelst-UHF23UEB.js.map → samplelst-LNAI33IW.js.map} +0 -0
  784. /package/dist/{samplematrix-OOKS3TMR.js.map → samplematrix-RGXPBRW5.js.map} +0 -0
  785. /package/dist/{sc-WF2BLGNG.js.map → sc-UR66YB27.js.map} +0 -0
  786. /package/dist/{scatter-ABCVFGRV.js.map → scatter-3K6XBJIM.js.map} +0 -0
  787. /package/dist/{scatter-WF7XM3IA.js.map → scatter-IFP5NTZU.js.map} +0 -0
  788. /package/dist/{selectGenomeWithTklst-67HU5KRB.js.map → selectGenomeWithTklst-LGBKEN3T.js.map} +0 -0
  789. /package/dist/{singleCellCellType-3FZPJ25V.js.map → singleCellCellType-ACQACM6W.js.map} +0 -0
  790. /package/dist/{singleCellCellType.unit.spec-TOMREHWK.js.map → singleCellCellType.unit.spec-WLGTJKOM.js.map} +0 -0
  791. /package/dist/{singleCellGeneExpression-NQTJ5KJQ.js.map → singleCellGeneExpression-M4RPITJW.js.map} +0 -0
  792. /package/dist/{singleCellGeneExpression.unit.spec-ZWUQTU2N.js.map → singleCellGeneExpression.unit.spec-N3VD6PUW.js.map} +0 -0
  793. /package/dist/{singleCellNumericValue-VI7H722L.js.map → singleCellNumericValue-W6F44FJN.js.map} +0 -0
  794. /package/dist/{singleCellNumericValue.unit.spec-QGLHES7H.js.map → singleCellNumericValue.unit.spec-JZNMY77I.js.map} +0 -0
  795. /package/dist/{singleCellPlot-RU5T6SJK.js.map → singleCellPlot-CCG2KSCO.js.map} +0 -0
  796. /package/dist/{singlecell-C3CJVNXP.js.map → singlecell-32P47E4I.js.map} +0 -0
  797. /package/dist/{singlecell-NRQZ7KC6.js.map → singlecell-I6H3Z7FT.js.map} +0 -0
  798. /package/dist/{snp-X6XY65VS.js.map → snp-7X2BXRQP.js.map} +0 -0
  799. /package/dist/{snp.unit.spec-6EENK7GQ.js.map → snp.unit.spec-BJGWNSVR.js.map} +0 -0
  800. /package/dist/{snplocus-R4JA6TFT.js.map → snplocus-UOVS2GD6.js.map} +0 -0
  801. /package/dist/{snplst-SOWVHSXH.js.map → snplst-JFVP4NG2.js.map} +0 -0
  802. /package/dist/{spliceevent.a53ss.diagram-IRLCCVQZ.js.map → spliceevent.a53ss.diagram-ETXJX57W.js.map} +0 -0
  803. /package/dist/{spliceevent.exonskip.diagram-4KG7LE5D.js.map → spliceevent.exonskip.diagram-C4JCEOXQ.js.map} +0 -0
  804. /package/dist/{spliceevent.noeventdiagram-OWXAJJX7.js.map → spliceevent.noeventdiagram-4DD3Z4OM.js.map} +0 -0
  805. /package/dist/{ssGSEA-EMOKPLMP.js.map → ssGSEA-GOZOYROM.js.map} +0 -0
  806. /package/dist/{ssGSEA.unit.spec-KXQ7R5WH.js.map → ssGSEA.unit.spec-J4DPFU4D.js.map} +0 -0
  807. /package/dist/{stattable-H2G7MOZG.js.map → stattable-ICUZQHUF.js.map} +0 -0
  808. /package/dist/{studyCatalog-3ITQXWFL.js.map → studyCatalog-PCFXVOI3.js.map} +0 -0
  809. /package/dist/{summarizeCnvGeneexp-ZIPU6YDY.js.map → summarizeCnvGeneexp-DK6HNUFE.js.map} +0 -0
  810. /package/dist/{summarizeGeneexpSurvival-3RYU226R.js.map → summarizeGeneexpSurvival-JLCR2VIX.js.map} +0 -0
  811. /package/dist/{summarizeMutationCnv-RGDBUB22.js.map → summarizeMutationCnv-CFAKT6IP.js.map} +0 -0
  812. /package/dist/{summarizeMutationDiagnosis-Z4MZE6Y4.js.map → summarizeMutationDiagnosis-5HMVSYMI.js.map} +0 -0
  813. /package/dist/{summarizeMutationSurvival-Z5CNRH7E.js.map → summarizeMutationSurvival-GP2OQMUS.js.map} +0 -0
  814. /package/dist/{summary-6QQCNX3B.js.map → summary-6K553VNS.js.map} +0 -0
  815. /package/dist/{summary.integration.spec-3ULXTZUP.js.map → summary.integration.spec-MXERZOVY.js.map} +0 -0
  816. /package/dist/{summaryInput-4QKR34QB.js.map → summaryInput-V2G6HFJS.js.map} +0 -0
  817. /package/dist/{sunburst-KB3BWC72.js.map → sunburst-6GKVNIRF.js.map} +0 -0
  818. /package/dist/{sunburst-XTFBHZNH.js.map → sunburst-YOVKC5G2.js.map} +0 -0
  819. /package/dist/{survival-NNCY4K6C.js.map → survival-GHTV2ZPX.js.map} +0 -0
  820. /package/dist/{survival-7O6ZK63E.js.map → survival-KF2QUWSM.js.map} +0 -0
  821. /package/dist/{survival.integration.spec-ZYZHZAXA.js.map → survival.integration.spec-GVSQL4VB.js.map} +0 -0
  822. /package/dist/{svgraph-ZLSFFEAC.js.map → svgraph-WN3JLEOC.js.map} +0 -0
  823. /package/dist/{svmr-REBBDEYM.js.map → svmr-ZZKBQFQK.js.map} +0 -0
  824. /package/dist/{swimmer-NUBRIWLI.js.map → swimmer-XHORJEVI.js.map} +0 -0
  825. /package/dist/{table-CWIQQESJ.js.map → table-XQCTNHSZ.js.map} +0 -0
  826. /package/dist/{termCollection-7TYJSQ45.js.map → termCollection-DXZQT7YT.js.map} +0 -0
  827. /package/dist/{termCollection-7Z55QNL7.js.map → termCollection-HRM2NHLA.js.map} +0 -0
  828. /package/dist/{termCollection.unit.spec-LQ5MIBDH.js.map → termCollection.unit.spec-BGULSLH6.js.map} +0 -0
  829. /package/dist/{termCollectionFractionSelection-24DZYVDU.js.map → termCollectionFractionSelection-TPNNP2ER.js.map} +0 -0
  830. /package/dist/{termCollectionFractionSelection.unit.spec-DCV2CFS5.js.map → termCollectionFractionSelection.unit.spec-VONXAGZH.js.map} +0 -0
  831. /package/dist/{tk-QTLEYIP7.js.map → tk-KPD6HTHR.js.map} +0 -0
  832. /package/dist/{tk-2WZFPRCP.js.map → tk-RCTQPQH7.js.map} +0 -0
  833. /package/dist/{tp.ui-HXQX2UH4.js.map → tp.ui-MVNQLMAD.js.map} +0 -0
  834. /package/dist/{tvs.categorical-4D3JI2ER.js.map → tvs.categorical-4TKKU6HO.js.map} +0 -0
  835. /package/dist/{tvs.condition-62FXFHZ5.js.map → tvs.condition-SARY3O5Y.js.map} +0 -0
  836. /package/dist/{tvs.dt-FZSVMJOO.js.map → tvs.dt-XJ2MW2AP.js.map} +0 -0
  837. /package/dist/{tvs.dtcnv.categorical-PPFQIC42.js.map → tvs.dtcnv.categorical-H7FKTXH4.js.map} +0 -0
  838. /package/dist/{tvs.dtcnv.continuous-TV2IGHY4.js.map → tvs.dtcnv.continuous-JQ62ZHER.js.map} +0 -0
  839. /package/dist/{tvs.dtfusion-ON4BA4XJ.js.map → tvs.dtfusion-GC3DZ2BO.js.map} +0 -0
  840. /package/dist/{tvs.dtitd-VFNROOWQ.js.map → tvs.dtitd-3SHGIDIB.js.map} +0 -0
  841. /package/dist/{tvs.dtsnvindel-ZXOP37T5.js.map → tvs.dtsnvindel-BEDWZ4A2.js.map} +0 -0
  842. /package/dist/{tvs.dtsv-EUHPTW7J.js.map → tvs.dtsv-HRIMULVD.js.map} +0 -0
  843. /package/dist/{tvs.multivalue-NHVXZNDI.js.map → tvs.multivalue-5VC7BLSZ.js.map} +0 -0
  844. /package/dist/{tvs.numeric-FPWDPO3J.js.map → tvs.numeric-TGEC7G6A.js.map} +0 -0
  845. /package/dist/{tvs.samplelst-ZZHRNUP4.js.map → tvs.samplelst-Q6EYAUQZ.js.map} +0 -0
  846. /package/dist/{tvs.survival-F3KSG3U6.js.map → tvs.survival-NJ3DTZIG.js.map} +0 -0
  847. /package/dist/{tvs.termCollection-B37DZLDY.js.map → tvs.termCollection-TVVLPSTG.js.map} +0 -0
  848. /package/dist/{vocabulary-XNE5FFDK.js.map → vocabulary-A7ZBBU65.js.map} +0 -0
  849. /package/dist/{wsi.direct-3YH3QGQD.js.map → wsi.direct-JJGIAH6A.js.map} +0 -0
@@ -0,0 +1,3384 @@
1
+ import {
2
+ InvalidDataUI,
3
+ PlotBase,
4
+ configUiInit,
5
+ fillbar,
6
+ getMaxLabelWidth,
7
+ getNormalRoot,
8
+ renderTable,
9
+ svgLegend,
10
+ table2col
11
+ } from "./chunk-4ASBDE27.js";
12
+ import "./chunk-HJ6L54YS.js";
13
+ import "./chunk-OF6FDDKV.js";
14
+ import {
15
+ Menu
16
+ } from "./chunk-CNFTQSNE.js";
17
+ import "./chunk-RIHO7ZD5.js";
18
+ import "./chunk-TVJOSRCH.js";
19
+ import {
20
+ topBarInit
21
+ } from "./chunk-3CIL7KH7.js";
22
+ import "./chunk-T4XPCSLP.js";
23
+ import {
24
+ dofetch3
25
+ } from "./chunk-4TJO2DGU.js";
26
+ import "./chunk-W5J3LTYS.js";
27
+ import "./chunk-MHWYRNGA.js";
28
+ import "./chunk-JHLF2ZC2.js";
29
+ import {
30
+ arc_default,
31
+ bplen,
32
+ dtcnv,
33
+ dtfusionrna,
34
+ dtitd,
35
+ dtloh,
36
+ dtsnvindel,
37
+ dtsv,
38
+ line_default,
39
+ mclass,
40
+ mclassitd,
41
+ pie_default,
42
+ ribbon_default
43
+ } from "./chunk-WJLRU5OF.js";
44
+ import {
45
+ copyMerge,
46
+ getCompInit,
47
+ multiInit
48
+ } from "./chunk-HBNB5TRH.js";
49
+ import "./chunk-PF4DSFDR.js";
50
+ import {
51
+ linear,
52
+ ticks
53
+ } from "./chunk-4OLM3KSB.js";
54
+ import "./chunk-PWYMHUXY.js";
55
+ import "./chunk-TLT4YIG3.js";
56
+ import "./chunk-5R63Q5KH.js";
57
+ import {
58
+ pointer_default,
59
+ select_default
60
+ } from "./chunk-I6Y4O3RR.js";
61
+ import "./chunk-Q5RDQNIT.js";
62
+ import "./chunk-HS5PO5ZQ.js";
63
+
64
+ // plots/disco/arc/FullArcRenderer.ts
65
+ var FullArcRenderer = class {
66
+ constructor(radius, width, color) {
67
+ this.radius = radius;
68
+ this.width = width;
69
+ this.color = color;
70
+ }
71
+ render(holder) {
72
+ const donutGenerator = arc_default();
73
+ const arc = {
74
+ startAngle: 0,
75
+ endAngle: Math.PI * 2,
76
+ innerRadius: this.radius,
77
+ outerRadius: this.radius + this.width,
78
+ color: this.color,
79
+ text: "No label"
80
+ };
81
+ const array = [];
82
+ array.push(arc);
83
+ const donutArc = holder.append("g");
84
+ donutArc.selectAll("path").data(array).enter().append("path").attr("d", (d) => donutGenerator(d)).attr("fill", (d) => d.color);
85
+ }
86
+ };
87
+
88
+ // plots/disco/menu/MenuProvider.ts
89
+ var MenuProvider = class {
90
+ static create() {
91
+ const menu = new Menu({ padding: 5 });
92
+ menu.d.style("border", "1px solid #FFF").style("position", "absolute").style("z-index", 1001);
93
+ return menu;
94
+ }
95
+ };
96
+
97
+ // plots/disco/fusion/FusionColorProvider.ts
98
+ var FusionColorProvider = class {
99
+ static getColor(chrA, chrB) {
100
+ if (chrA != chrB) {
101
+ return "#6A3D9A" /* Interchromosomal */.valueOf();
102
+ } else {
103
+ return "#1B9E77" /* Intrachromosomal */.valueOf();
104
+ }
105
+ }
106
+ };
107
+
108
+ // plots/disco/fusion/FusionRenderer.ts
109
+ var FusionRenderer = class {
110
+ constructor(genome) {
111
+ this.genome = genome;
112
+ }
113
+ render(holder, fusions, opacity = 1) {
114
+ let radius = 0;
115
+ const fusionsWithTarget = fusions.filter((f) => f.target);
116
+ if (fusionsWithTarget.length > 0) {
117
+ radius = fusionsWithTarget[0].target.radius;
118
+ const fullArcRenderer = new FullArcRenderer(radius, 2, "#6464641A");
119
+ fullArcRenderer.render(holder);
120
+ } else return;
121
+ const ribbon = ribbon_default().radius(radius);
122
+ const ribbons = holder.selectAll(".chord").data(fusions);
123
+ const menu = MenuProvider.create();
124
+ const createTooltip = this.createTooltip.bind(this);
125
+ const genome = this.genome;
126
+ ribbons.enter().append("path").attr("class", "chord").attr("d", ribbon).attr("fill", (fusion) => {
127
+ return FusionColorProvider.getColor(
128
+ fusion.source.positionInChromosome.chromosome,
129
+ fusion.target.positionInChromosome.chromosome
130
+ );
131
+ }).style("opacity", opacity).each(function(d) {
132
+ const path = select_default(this);
133
+ const tip = MenuProvider.create();
134
+ path.on("click", async function(event) {
135
+ tip.clear().show(event.x, event.y);
136
+ const div = tip.d.append("div");
137
+ await makeSvgraph(d, div, genome);
138
+ });
139
+ }).on("mouseover", async function(mouseEvent, fusion) {
140
+ const table = table2col({ holder: menu.d });
141
+ createTooltip(table, fusion);
142
+ menu.show(mouseEvent.x, mouseEvent.y);
143
+ }).on("mouseout", () => {
144
+ menu.clear();
145
+ menu.hide();
146
+ });
147
+ }
148
+ createTooltip(table, fusion) {
149
+ {
150
+ const [td1, td2] = table.addRow();
151
+ td1.text("Data type");
152
+ td2.append("span").style("margin-left", "5px").text("Fusion transcript");
153
+ }
154
+ {
155
+ const positionInChromosomeSource = fusion.source.positionInChromosome;
156
+ const positionInChromosomeTarget = fusion.target.positionInChromosome;
157
+ const [td1, td2] = table.addRow();
158
+ td1.text("Position");
159
+ td2.append("span").style("margin-left", "5px").text(
160
+ ` ${fusion.source.gene || ""} ${positionInChromosomeSource.chromosome}:${positionInChromosomeSource.position} ${fusion.source.strand === "+" ? "forward" : "reverse"} > ${fusion.target.gene || ""} ${positionInChromosomeTarget.chromosome}:${positionInChromosomeTarget.position} ${fusion.target.strand === "+" ? "forward" : "reverse"} `
161
+ );
162
+ }
163
+ }
164
+ };
165
+ async function makeSvgraph(fusion, div, genome) {
166
+ const wait = div.append("div").text("Loading...");
167
+ const svpair = {
168
+ a: {
169
+ chr: fusion.source.positionInChromosome.chromosome,
170
+ position: fusion.source.positionInChromosome.position,
171
+ strand: fusion.source.strand
172
+ },
173
+ b: {
174
+ chr: fusion.target.positionInChromosome.chromosome,
175
+ position: fusion.target.positionInChromosome.position,
176
+ strand: fusion.target.strand
177
+ }
178
+ };
179
+ await getGm(svpair.a, genome.name, fusion.source.gene);
180
+ await getGm(svpair.b, genome.name, fusion.target.gene);
181
+ wait.remove();
182
+ const _ = await import("./svgraph-WN3JLEOC.js");
183
+ _.default({
184
+ pairlst: [svpair],
185
+ genome,
186
+ holder: div
187
+ });
188
+ }
189
+ async function getGm(p, genome, name) {
190
+ const d = await dofetch3("isoformbycoord", {
191
+ body: { genome, chr: p.chr, pos: p.position }
192
+ });
193
+ if (d.error) throw d.error;
194
+ const u = d.lst.find((i) => i.isdefault && name === i.name) || d.lst[0];
195
+ if (u) {
196
+ p.name = u.name;
197
+ p.gm = { isoform: u.isoform };
198
+ }
199
+ }
200
+
201
+ // plots/disco/DiscoRenderer.ts
202
+ var DiscoRenderer = class {
203
+ constructor(renders, legendRenderer, genome) {
204
+ this.renders = renders;
205
+ this.legendRenderer = legendRenderer;
206
+ this.fusionRenderer = new FusionRenderer(genome);
207
+ }
208
+ render(holder, viewModel, onCnvSourceSelect) {
209
+ const svgDiv = holder.append("div").style("display", "inline-block").style("font-family", "Arial");
210
+ 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);
211
+ const mainG = svg.append("g").attr("class", "mainG").attr(
212
+ "transform",
213
+ `translate(${viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 100},${viewModel.height / 2})`
214
+ );
215
+ for (const [ringType, renderer] of this.renders) {
216
+ const elements = viewModel.getElements(ringType);
217
+ const collisions = viewModel.getCollisions(ringType);
218
+ renderer.render(mainG, elements, collisions);
219
+ }
220
+ this.fusionRenderer.render(mainG, viewModel.fusions, viewModel.settings.Disco.fusionOpacity);
221
+ if (viewModel.settings.Disco.centerText) {
222
+ const chrRingBbox = mainG.select('[data-testid="sjpp_chromosomes_arc_group"]').node().getBBox();
223
+ const text = viewModel.settings.Disco.centerText.length > 20 ? viewModel.settings.Disco.centerText.slice(0, 20) + "..." : viewModel.settings.Disco.centerText;
224
+ const textElem = mainG.append("text").attr("class", "sjpp-disco-center-text").text(text);
225
+ const textBbox = textElem.node().getBBox();
226
+ textElem.attr("transform", `translate(${chrRingBbox.x + chrRingBbox.width / 2 - textBbox.width / 2},0)`);
227
+ }
228
+ this.legendRenderer.render(
229
+ mainG,
230
+ viewModel.legend,
231
+ -1 * (viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 75),
232
+ viewModel.width,
233
+ viewModel.height / 2,
234
+ viewModel,
235
+ onCnvSourceSelect
236
+ );
237
+ }
238
+ };
239
+
240
+ // plots/disco/interactions/DiscoInteractions.ts
241
+ var DiscoInteractions = class {
242
+ constructor(discoApp) {
243
+ this.discoApp = discoApp;
244
+ this.downloadClickListener = (svg) => {
245
+ const downloadImgName = this.discoApp.state.settings.downloadImgName || "disco.plot";
246
+ const a = document.createElement("a");
247
+ document.body.appendChild(a);
248
+ a.addEventListener(
249
+ "click",
250
+ () => {
251
+ const serializer = new XMLSerializer();
252
+ const svg_blob = new Blob([serializer.serializeToString(svg)], {
253
+ type: "image/svg+xml"
254
+ });
255
+ a.download = downloadImgName + ".svg";
256
+ a.href = URL.createObjectURL(svg_blob);
257
+ document.body.removeChild(a);
258
+ },
259
+ false
260
+ );
261
+ a.click();
262
+ };
263
+ this.geneClickListener = async (gene, mnames) => {
264
+ const { filter, filter0 } = this.discoApp.app.getState().termfilter;
265
+ const arg = {
266
+ holder: this.discoApp.app.opts.holder,
267
+ genome: this.discoApp.app.opts.state.args.genome,
268
+ nobox: true,
269
+ query: gene,
270
+ tklst: [
271
+ {
272
+ type: "mds3",
273
+ dslabel: this.discoApp.app.opts.state.vocab.dslabel,
274
+ hlaachange: mnames.join(","),
275
+ filter0,
276
+ filterObj: getNormalRoot(filter)
277
+ // must not pass filter as frozen. pass unfrozen, normalized copy so mds3 code will work
278
+ }
279
+ ]
280
+ };
281
+ const _ = await import("./block.init-4V3SIUNX.js");
282
+ await _.default(arg);
283
+ };
284
+ this.colorScaleNumericInputsCallback = async (obj) => {
285
+ const callAppDispatch = (settings) => {
286
+ this.discoApp.app.dispatch({
287
+ type: "plot_edit",
288
+ id: this.discoApp.id,
289
+ config: { settings: { Disco: Object.assign({ cnvCutoffMode: obj.cutoffMode }, settings) } }
290
+ });
291
+ };
292
+ if (obj.cutoffMode == "auto") {
293
+ if (obj.min == null || obj.max == null)
294
+ throw new Error('Color scale must return min and max if cutoffMode "auto"');
295
+ callAppDispatch({
296
+ cnvCapping: this.discoApp.state.settings.cnv.capping,
297
+ cnvPercentile: this.discoApp.state.settings.cnv.percentile
298
+ });
299
+ } else if (obj.cutoffMode == "fixed") {
300
+ if (obj.min == null || obj.max == null)
301
+ throw new Error('Color scale must return min and max if cutoffMode "fixed"');
302
+ const diffValue = obj.max !== this.discoApp.state.settings.cnv.capping ? obj.max : Math.abs(obj.min);
303
+ callAppDispatch({
304
+ cnvCapping: diffValue
305
+ });
306
+ } else if (obj.cutoffMode == "percentile") callAppDispatch({ cnvPercentile: obj.percentile });
307
+ else throw new Error("Unknown cutoff mode returned from dom/ColorScale");
308
+ };
309
+ this.onMutationWaterfallColorChange = (color) => {
310
+ this.discoApp.app.dispatch({
311
+ type: "plot_edit",
312
+ id: this.discoApp.id,
313
+ config: { settings: { Disco: { mutationWaterfallColor: color } } }
314
+ });
315
+ };
316
+ }
317
+ };
318
+
319
+ // plots/disco/chromosome/Reference.ts
320
+ var Reference = class {
321
+ /**
322
+ * Creates a Reference object that contains information about chromosomes.
323
+ * @param settings State settings
324
+ * @param chromosomes Chromosome order. This function formats into an obj with `chr` removed.
325
+ * @param chromosomeOverride Obj of chromsome keys and sizes. Filtered to remove hidden chromosomes in settings.
326
+ */
327
+ constructor(settings, chromosomes, chromosomeOverride) {
328
+ this.chromosomes = [];
329
+ this.chromosomesOrder = [];
330
+ this.keysArray = [];
331
+ this.totalSizeArray = [];
332
+ this.chrSizesArray = [];
333
+ const chrSizes = chromosomeOverride || chromosomes;
334
+ this.settings = settings;
335
+ this.chromosomesOrder = [];
336
+ let totalSize = 0;
337
+ this.totalPadAngle = Object.keys(chrSizes).length * this.settings.padAngle;
338
+ this.totalChromosomesAngle = 2 * Math.PI - this.totalPadAngle;
339
+ for (const chr in chrSizes) {
340
+ const key = chr.slice(0, 3) === "chr" ? chr.slice(3) : chr;
341
+ this.chromosomesOrder.push(chr);
342
+ this.keysArray.push(key);
343
+ this.totalSizeArray.push(totalSize);
344
+ this.chrSizesArray.push(chrSizes[chr]);
345
+ totalSize += chrSizes[chr];
346
+ }
347
+ this.totalSize = totalSize;
348
+ let lastAngle = 0;
349
+ for (let i = 0; i < this.keysArray.length; i++) {
350
+ const chromosomeAngle = this.totalChromosomesAngle * (this.chrSizesArray[i] / totalSize);
351
+ const startAngle = i == 0 ? this.settings.padAngle / 2 : lastAngle + this.settings.padAngle;
352
+ const endAngle = i == 0 ? this.settings.padAngle / 2 + chromosomeAngle : lastAngle + this.settings.padAngle + chromosomeAngle;
353
+ const chromosome = {
354
+ start: this.totalSizeArray[i],
355
+ size: this.chrSizesArray[i],
356
+ factor: 1,
357
+ startAngle,
358
+ endAngle,
359
+ angle: (startAngle + endAngle) / 2,
360
+ innerRadius: this.settings.rings.chromosomeInnerRadius,
361
+ outerRadius: this.settings.rings.chromosomeInnerRadius + this.settings.rings.chromosomeWidth,
362
+ color: "#AAA",
363
+ text: this.keysArray[i]
364
+ };
365
+ this.chromosomes.push(chromosome);
366
+ if (chromosome.endAngle != null) {
367
+ lastAngle = chromosome.endAngle;
368
+ }
369
+ }
370
+ }
371
+ };
372
+
373
+ // plots/disco/data/DataObjectMapper.ts
374
+ var DataObjectMapper = class {
375
+ constructor(sampleName, prioritizedGenes) {
376
+ this.sampleName = sampleName;
377
+ this.prioritizedGenes = prioritizedGenes;
378
+ }
379
+ map(dObject) {
380
+ return {
381
+ dt: dObject.dt,
382
+ mname: dObject.mname,
383
+ mClass: dObject.class,
384
+ gene: dObject.gene,
385
+ chr: dObject.chr,
386
+ ref: dObject.ref,
387
+ alt: dObject.alt,
388
+ vafs: dObject.vafs,
389
+ position: dObject.pos ? dObject.pos : dObject.position,
390
+ poschr: dObject.poschr,
391
+ posbins: dObject.posbins,
392
+ poslabel: dObject.poslabel,
393
+ sampleName: this.sampleName,
394
+ ssm_id: dObject.ssm_id,
395
+ start: dObject.start,
396
+ stop: dObject.stop,
397
+ value: dObject.value,
398
+ segmean: dObject.segmean,
399
+ isPrioritized: this.prioritizedGenes.some((cancerGene) => cancerGene == dObject.gene),
400
+ chrA: dObject.chrA,
401
+ chrB: dObject.chrB,
402
+ geneA: dObject.geneA,
403
+ geneB: dObject.geneB,
404
+ posA: dObject.posA,
405
+ posB: dObject.posB,
406
+ strandA: dObject.strandA,
407
+ strandB: dObject.strandB
408
+ };
409
+ }
410
+ };
411
+
412
+ // plots/disco/data/PercentileMapper.ts
413
+ var PercentileMapper = class {
414
+ map(data, percentile) {
415
+ return this.calculatePercentileForPositivesAndNegatives(data, percentile);
416
+ }
417
+ calculatePercentileForPositivesAndNegatives(data, percentile) {
418
+ const positives = data.filter((x) => x > 0);
419
+ const negatives = data.filter((x) => x < 0).map((x) => -1 * x);
420
+ let positive = NaN;
421
+ let negative = NaN;
422
+ if (positives.length > 0) {
423
+ positive = this.calculatePercentile(positives, percentile);
424
+ }
425
+ if (negatives.length > 0) {
426
+ negative = -1 * this.calculatePercentile(negatives, percentile);
427
+ }
428
+ return { positive, negative };
429
+ }
430
+ calculatePercentile(data, percentile) {
431
+ if (data.length === 0) {
432
+ throw new Error("Array must contain at least one element.");
433
+ }
434
+ const sortedValues = data.sort((a, b) => a - b);
435
+ const index = percentile / 100 * (sortedValues.length - 1);
436
+ const lowerIndex = Math.floor(index);
437
+ const upperIndex = Math.ceil(index);
438
+ const fraction = index - lowerIndex;
439
+ if (lowerIndex === upperIndex) {
440
+ return sortedValues[lowerIndex];
441
+ }
442
+ return sortedValues[lowerIndex] + fraction * (sortedValues[upperIndex] - sortedValues[lowerIndex]);
443
+ }
444
+ };
445
+
446
+ // plots/disco/snv/vafTooltip.ts
447
+ function getIntegerCount(v) {
448
+ if (Number.isInteger(v)) return v;
449
+ if (typeof v == "string" && /^-?\d+$/.test(v)) {
450
+ const n = Number(v);
451
+ if (Number.isInteger(n)) return n;
452
+ }
453
+ return null;
454
+ }
455
+ function getReadCounts(refCountValue, altCountValue, totalCountValue) {
456
+ const altCount = getIntegerCount(altCountValue);
457
+ if (altCount == null || altCount < 0) return null;
458
+ const totalCount = getIntegerCount(totalCountValue);
459
+ if (totalCount != null) {
460
+ if (totalCount <= 0 || totalCount < altCount) return null;
461
+ return { altCount, refCount: totalCount - altCount, totalCount };
462
+ }
463
+ const refCount = getIntegerCount(refCountValue);
464
+ if (refCount == null || refCount < 0 || refCount + altCount <= 0) return null;
465
+ return { altCount, refCount, totalCount: refCount + altCount };
466
+ }
467
+ function hasValidReadCounts(refCountValue, altCountValue, totalCountValue) {
468
+ return getReadCounts(refCountValue, altCountValue, totalCountValue) != null;
469
+ }
470
+ function getVafEntries(vafs) {
471
+ const entries = [];
472
+ if (Array.isArray(vafs)) {
473
+ for (const vaf of vafs) {
474
+ const label = vaf?.id || vaf?.name;
475
+ const refCount = vaf?.refCount;
476
+ const totalCount = vaf?.totalCount;
477
+ const altCount = vaf?.altCount;
478
+ if (!label || altCount == null || refCount == null && totalCount == null) continue;
479
+ const entry = { label, altCount };
480
+ if (refCount != null) entry.refCount = refCount;
481
+ if (totalCount != null) entry.totalCount = totalCount;
482
+ entries.push(entry);
483
+ }
484
+ }
485
+ return entries;
486
+ }
487
+ function getNumericFraction(v) {
488
+ if (typeof v != "number" && typeof v != "string") return null;
489
+ const n = Number(v);
490
+ return Number.isFinite(n) && n >= 0 && n <= 1 ? n : null;
491
+ }
492
+ function getMutationFractions(vafs) {
493
+ const fractions = [];
494
+ if (!Array.isArray(vafs)) return fractions;
495
+ for (const vaf of vafs) {
496
+ const explicitFraction = getNumericFraction(vaf?.fraction ?? vaf?.mutationFraction);
497
+ if (explicitFraction != null) {
498
+ fractions.push(explicitFraction);
499
+ continue;
500
+ }
501
+ const counts = getReadCounts(vaf?.refCount, vaf?.altCount, vaf?.totalCount);
502
+ if (!counts) continue;
503
+ fractions.push(counts.altCount / counts.totalCount);
504
+ }
505
+ return fractions;
506
+ }
507
+ function getMaxMutationFraction(vafs) {
508
+ const fractions = getMutationFractions(vafs);
509
+ return fractions.length ? Math.max(...fractions) : null;
510
+ }
511
+ function hasAnyValidVafEntry(vafs) {
512
+ return getVafEntries(vafs).some((vaf) => hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount));
513
+ }
514
+ function appendVafBar(td2, refCountValue, altCountValue, label = "VAF", totalCountValue) {
515
+ const counts = getReadCounts(refCountValue, altCountValue, totalCountValue);
516
+ if (!counts) return;
517
+ const fraction = counts.altCount / counts.totalCount;
518
+ const div = td2.append("div").style("margin-left", "5px").style("margin-top", "4px").style("display", "flex").style("align-items", "center").style("gap", "6px");
519
+ div.append("span").style("font-size", "0.8em").style("color", "#555").text(label);
520
+ fillbar(div, { f: fraction, v1: counts.altCount, v2: counts.totalCount });
521
+ }
522
+ function appendVafBars(td2, vafs) {
523
+ for (const vaf of getVafEntries(vafs)) {
524
+ if (!hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount)) continue;
525
+ appendVafBar(td2, vaf.refCount, vaf.altCount, vaf.label, vaf.totalCount);
526
+ }
527
+ }
528
+
529
+ // plots/disco/data/DataMapper.ts
530
+ var DataMapper = class _DataMapper {
531
+ constructor(settings, reference, sample, prioritizedGenes = []) {
532
+ // remove fields and extract filters to seperate classes
533
+ this.labelData = [];
534
+ this.nonExonicSnvData = [];
535
+ this.nonExonicInnerRadius = 0;
536
+ this.snvRingDataMap = /* @__PURE__ */ new Map();
537
+ this.snvInnerRadius = 0;
538
+ this.snvData = [];
539
+ this.bpx = 0;
540
+ this.onePxArcAngle = 0;
541
+ this.filteredSnvData = [];
542
+ this.filteredSnvCountByChr = /* @__PURE__ */ new Map();
543
+ this.lohData = [];
544
+ this.lohInnerRadius = 0;
545
+ this.cnvData = [];
546
+ this.cnvInnerRadius = 0;
547
+ this.fusionData = [];
548
+ this.fusionRadius = 0;
549
+ this.hasPrioritizedGenes = false;
550
+ this.hasWaterfallEligibleChromosome = false;
551
+ this.invalidEntries = [];
552
+ this.cnvLossMaxValue = 0;
553
+ this.cnvGainMaxValue = 0;
554
+ this.percentilePositive = 0;
555
+ this.percentileNegative = 0;
556
+ this.cnvMaxPercentileAbs = 0;
557
+ this.mutationWaterfallData = [];
558
+ this.hasMutationFractionData = false;
559
+ this.mutationWaterfallInnerRadius = 0;
560
+ this.mutationWaterfallRangeMin = Infinity;
561
+ this.mutationWaterfallRangeMax = -Infinity;
562
+ this.lohMaxValue = void 0;
563
+ this.lohMinValue = void 0;
564
+ this.snvFilter = (data) => data.dt == dtsnvindel;
565
+ this.fusionFilter = (data) => data.dt == dtfusionrna || data.dt == dtsv;
566
+ this.cnvFilter = (data) => data.dt == dtcnv || data.dt == dtitd;
567
+ this.lohFilter = (data) => data.dt == dtloh;
568
+ this.compareData = (a, b) => {
569
+ const chrDiff = this.reference.chromosomesOrder.indexOf(a.chr) - this.reference.chromosomesOrder.indexOf(b.chr);
570
+ if (chrDiff != 0) {
571
+ return chrDiff;
572
+ }
573
+ const aPos = a.pos ? a.pos : a.start;
574
+ const bPos = b.pos ? b.pos : b.start;
575
+ return aPos - bPos;
576
+ };
577
+ this.settings = settings;
578
+ this.reference = reference;
579
+ this.sample = sample;
580
+ this.excludedChromosomes = this.settings.Disco.hiddenChromosomes;
581
+ this.lastInnerRadious = this.settings.rings.chromosomeInnerRadius;
582
+ this.gainCapped = this.settings.Disco.cnvCapping;
583
+ this.lossCapped = -1 * this.settings.Disco.cnvCapping;
584
+ this.nonExonicFilter = (data) => {
585
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
586
+ return prioritizedGenes.includes(data.gene) && settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
587
+ } else {
588
+ return settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
589
+ }
590
+ };
591
+ this.snvRingFilter = (data) => {
592
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
593
+ return prioritizedGenes.includes(data.gene) && settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
594
+ } else {
595
+ return settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
596
+ }
597
+ };
598
+ this.dataObjectMapper = new DataObjectMapper(sample, prioritizedGenes);
599
+ }
600
+ map(data) {
601
+ const dataArray = [];
602
+ this.filteredSnvCountByChr.clear();
603
+ this.hasWaterfallEligibleChromosome = false;
604
+ this.mutationWaterfallData = [];
605
+ this.mutationWaterfallInnerRadius = 0;
606
+ this.mutationWaterfallRangeMin = Infinity;
607
+ this.mutationWaterfallRangeMax = -Infinity;
608
+ this.hasMutationFractionData = false;
609
+ data.forEach((dObject) => {
610
+ if (dObject.dt == dtsnvindel && getMaxMutationFraction(dObject.vafs) != null) {
611
+ this.hasMutationFractionData = true;
612
+ }
613
+ const index = this.reference.chromosomesOrder.indexOf(dObject.chr);
614
+ const indexA = this.reference.chromosomesOrder.indexOf(dObject.chrA);
615
+ const indexB = this.reference.chromosomesOrder.indexOf(dObject.chrB);
616
+ if (dObject.dt == dtsnvindel) {
617
+ if (index != -1 && this.snvData.length < this.settings.snv.maxMutationCount) {
618
+ const pos = dObject.pos ?? dObject.position;
619
+ const chrSize = this.reference.chromosomes[index].size;
620
+ if (Number.isFinite(pos) && pos >= 0 && pos <= chrSize) {
621
+ this.addData(dObject, dataArray);
622
+ } else {
623
+ this.invalidEntries.push({ dataType: "SNV", reason: `Position ${pos} outside of ${dObject.chr}` });
624
+ }
625
+ } else if (index == -1) {
626
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
627
+ this.invalidEntries.push({ dataType: "SNV", reason: `Unknown chr ${dObject.chr}` });
628
+ }
629
+ }
630
+ } else if (dObject.dt == dtfusionrna || dObject.dt == dtsv) {
631
+ if (indexA != -1 && indexB != -1) {
632
+ const posA = dObject.posA;
633
+ const posB = dObject.posB;
634
+ const chrSizeA = this.reference.chromosomes[indexA].size;
635
+ const chrSizeB = this.reference.chromosomes[indexB].size;
636
+ if (Number.isFinite(posA) && Number.isFinite(posB) && posA >= 0 && posA <= chrSizeA && posB >= 0 && posB <= chrSizeB) {
637
+ this.addData(dObject, dataArray);
638
+ } else {
639
+ const reasonParts = [];
640
+ if (!(Number.isFinite(posA) && posA >= 0 && posA <= chrSizeA))
641
+ reasonParts.push(`Position ${posA} outside of ${dObject.chrA}`);
642
+ if (!(Number.isFinite(posB) && posB >= 0 && posB <= chrSizeB))
643
+ reasonParts.push(`Position ${posB} outside of ${dObject.chrB}`);
644
+ this.invalidEntries.push({ dataType: "Fusion", reason: reasonParts.join("; ") });
645
+ }
646
+ } else {
647
+ const missing = [];
648
+ if (indexA == -1 && !this.excludedChromosomes.includes(dObject.chrA)) missing.push(dObject.chrA);
649
+ if (indexB == -1 && !this.excludedChromosomes.includes(dObject.chrB)) missing.push(dObject.chrB);
650
+ if (missing.length) this.invalidEntries.push({ dataType: "Fusion", reason: "Unknown chr in fusion" });
651
+ }
652
+ } else if ([dtcnv, dtloh, dtitd].includes(Number(dObject.dt))) {
653
+ const idx = this.reference.chromosomesOrder.indexOf(dObject.chr);
654
+ const dataType = dObject.dt == dtcnv ? "CNV" : dObject.dt == dtloh ? "LOH" : "ITD";
655
+ if (dObject.chr && idx != -1) {
656
+ const chrSize = this.reference.chromosomes[idx].size;
657
+ const start = dObject.start;
658
+ const stop = dObject.stop;
659
+ if (Number.isFinite(start) && Number.isFinite(stop) && start >= 0 && stop <= chrSize && start <= stop) {
660
+ this.addData(dObject, dataArray);
661
+ } else {
662
+ this.invalidEntries.push({
663
+ dataType,
664
+ reason: `Position ${start}-${stop} outside of ${dObject.chr}`
665
+ });
666
+ }
667
+ } else {
668
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
669
+ this.invalidEntries.push({
670
+ dataType,
671
+ reason: `Unknown chr ${dObject.chr}`
672
+ });
673
+ }
674
+ }
675
+ } else {
676
+ throw Error("Unknown mutation type!");
677
+ }
678
+ });
679
+ const sortedData = dataArray.sort(this.compareData);
680
+ if (this.settings.rings.nonExonicRingEnabled) {
681
+ sortedData.forEach((data2) => {
682
+ this.filterNonExonicSnvData(data2);
683
+ });
684
+ }
685
+ if (this.nonExonicSnvData.length > 0) {
686
+ this.nonExonicInnerRadius = this.lastInnerRadious - this.settings.rings.nonExonicRingWidth;
687
+ this.lastInnerRadious = this.nonExonicInnerRadius;
688
+ }
689
+ sortedData.forEach((data2) => {
690
+ this.filterSnvs(data2);
691
+ });
692
+ this.hasWaterfallEligibleChromosome = Array.from(this.filteredSnvCountByChr.values()).some((count) => count >= 2);
693
+ if (this.settings.Disco.mutationWaterfallPlot && this.hasWaterfallEligibleChromosome) {
694
+ this.prepareMutationWaterfallData();
695
+ }
696
+ sortedData.forEach((data2) => {
697
+ this.filterLohs(data2);
698
+ });
699
+ if (this.lohData.length > 0) {
700
+ this.lohInnerRadius = this.lastInnerRadious - this.settings.rings.lohRingWidth;
701
+ this.lastInnerRadious = this.lohInnerRadius;
702
+ }
703
+ sortedData.forEach((data2) => {
704
+ this.filterCnvs(data2);
705
+ });
706
+ if (this.cnvData.length > 0) {
707
+ this.cnvInnerRadius = this.lastInnerRadious - this.settings.rings.cnvRingWidth;
708
+ this.lastInnerRadious = this.cnvInnerRadius;
709
+ this.cappedCnvMaxAbsValue = Math.min(
710
+ this.settings.Disco.cnvCapping,
711
+ Math.max(
712
+ Math.abs(_DataMapper.capMaxValue(this.cnvLossMaxValue, this.gainCapped, this.lossCapped)),
713
+ Math.abs(_DataMapper.capMaxValue(this.cnvGainMaxValue, this.gainCapped, this.lossCapped))
714
+ )
715
+ );
716
+ const cnvValues = this.cnvData.filter((data2) => data2.dt == dtcnv).map((data2) => data2.value);
717
+ if (cnvValues.length) {
718
+ const percentilePair = new PercentileMapper().map(cnvValues, this.settings.Disco.cnvPercentile);
719
+ this.percentilePositive = _DataMapper.capMaxValue(percentilePair.positive, this.gainCapped, this.lossCapped);
720
+ this.percentileNegative = _DataMapper.capMaxValue(percentilePair.negative, this.gainCapped, this.lossCapped);
721
+ this.cnvMaxPercentileAbs = Math.min(
722
+ this.settings.Disco.cnvCapping,
723
+ Math.max(this.percentilePositive, Math.abs(this.percentileNegative))
724
+ );
725
+ }
726
+ }
727
+ sortedData.forEach((data2) => {
728
+ this.filterFusion(data2);
729
+ });
730
+ if (this.fusionData.length > 0) {
731
+ this.fusionRadius = this.lastInnerRadious;
732
+ }
733
+ const dataHolder = {
734
+ labelData: this.labelData,
735
+ nonExonicSnvData: this.nonExonicSnvData,
736
+ nonExonicInnerRadius: this.nonExonicInnerRadius,
737
+ snvRingDataMap: this.snvRingDataMap,
738
+ snvInnerRadius: this.snvInnerRadius,
739
+ snvData: this.snvData,
740
+ bpx: this.bpx,
741
+ onePxArcAngle: this.onePxArcAngle,
742
+ filteredSnvData: this.filteredSnvData,
743
+ lohData: this.lohData,
744
+ lohInnerRadius: this.lohInnerRadius,
745
+ cnvData: this.cnvData,
746
+ cnvInnerRadius: this.cnvInnerRadius,
747
+ fusionData: this.fusionData,
748
+ fusionRadius: this.fusionRadius,
749
+ hasPrioritizedGenes: this.hasPrioritizedGenes,
750
+ hasWaterfallEligibleChromosome: this.hasWaterfallEligibleChromosome,
751
+ cnvGainMaxValue: this.cnvGainMaxValue,
752
+ cnvLossMaxValue: this.cnvLossMaxValue,
753
+ cappedCnvMaxAbsValue: this.cappedCnvMaxAbsValue,
754
+ percentilePositive: this.percentilePositive,
755
+ percentileNegative: this.percentileNegative,
756
+ cnvMaxPercentileAbs: this.cnvMaxPercentileAbs,
757
+ lohMaxValue: this.lohMaxValue,
758
+ lohMinValue: this.lohMinValue,
759
+ hasMutationFractionData: this.hasMutationFractionData,
760
+ mutationWaterfallData: this.mutationWaterfallData,
761
+ mutationWaterfallInnerRadius: this.mutationWaterfallInnerRadius,
762
+ mutationWaterfallLogRange: this.mutationWaterfallData.length ? { min: this.mutationWaterfallRangeMin, max: this.mutationWaterfallRangeMax } : void 0,
763
+ invalidDataInfo: {
764
+ entries: this.invalidEntries,
765
+ errorMsg: `Entries listed above were skipped due to invalid or unsupported chromosome information.`
766
+ }
767
+ };
768
+ return dataHolder;
769
+ }
770
+ addData(dObject, dataArray) {
771
+ const instance = this.dataObjectMapper.map(dObject);
772
+ if (instance.isPrioritized) {
773
+ this.hasPrioritizedGenes = true;
774
+ }
775
+ dataArray.push(instance);
776
+ }
777
+ filterNonExonicSnvData(data) {
778
+ if (this.snvFilter(data) && this.passesMutationFractionFilter(data)) {
779
+ if (this.settings.rings.nonExonicRingEnabled && this.nonExonicFilter(data)) {
780
+ this.nonExonicSnvData.push(data);
781
+ }
782
+ }
783
+ }
784
+ filterSnvs(data) {
785
+ if (this.snvFilter(data)) {
786
+ this.snvData.push(data);
787
+ if (this.passesMutationFractionFilter(data) && this.snvRingFilter(data)) {
788
+ if (this.snvInnerRadius == 0) {
789
+ this.snvInnerRadius = this.lastInnerRadious - this.settings.rings.snvRingWidth;
790
+ this.lastInnerRadious = this.snvInnerRadius;
791
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * this.snvInnerRadius));
792
+ this.onePxArcAngle = 1 / this.snvInnerRadius;
793
+ }
794
+ this.filteredSnvData.push(data);
795
+ this.labelData.push(data);
796
+ const currentCount = this.filteredSnvCountByChr.get(data.chr) || 0;
797
+ this.filteredSnvCountByChr.set(data.chr, currentCount + 1);
798
+ const arcAngle = this.calculateArcAngle(data);
799
+ let dataArray = this.snvRingDataMap.get(arcAngle);
800
+ if (!dataArray) {
801
+ dataArray = new Array();
802
+ }
803
+ dataArray.push(data);
804
+ this.snvRingDataMap.set(arcAngle, dataArray);
805
+ }
806
+ }
807
+ }
808
+ passesMutationFractionFilter(data) {
809
+ if (!this.hasMutationFractionData) return true;
810
+ const minMutationFraction = this.settings.Disco.minMutationFraction || 0;
811
+ if (minMutationFraction <= 0) return true;
812
+ const fraction = getMaxMutationFraction(data.vafs);
813
+ return fraction != null && fraction >= minMutationFraction;
814
+ }
815
+ filterFusion(data) {
816
+ if (this.fusionFilter(data)) {
817
+ data.isPrioritized = true;
818
+ this.fusionData.push(data);
819
+ this.labelData.push(data);
820
+ }
821
+ }
822
+ filterLohs(data) {
823
+ if (this.lohFilter(data)) {
824
+ if (this.lohMaxValue == void 0 || this.lohMaxValue < data.value) {
825
+ this.lohMaxValue = data.segmean;
826
+ }
827
+ if (this.lohMinValue == void 0 || this.lohMinValue > data.value) {
828
+ this.lohMinValue = data.segmean;
829
+ }
830
+ this.lohData.push(data);
831
+ }
832
+ }
833
+ filterCnvs(data) {
834
+ if (this.cnvFilter(data)) {
835
+ if (!data.chr || this.reference.chromosomesOrder.indexOf(data.chr) == -1) {
836
+ return;
837
+ }
838
+ if (data.dt == dtcnv) {
839
+ if (this.cnvGainMaxValue == void 0 || this.cnvGainMaxValue < data.value) {
840
+ this.cnvGainMaxValue = data.value;
841
+ }
842
+ if (this.cnvLossMaxValue == void 0 || this.cnvLossMaxValue > data.value) {
843
+ this.cnvLossMaxValue = data.value;
844
+ }
845
+ }
846
+ this.cnvData.push(data);
847
+ }
848
+ }
849
+ prepareMutationWaterfallData() {
850
+ this.mutationWaterfallInnerRadius = this.lastInnerRadious - this.settings.rings.mutationWaterfallRingWidth;
851
+ this.lastInnerRadious = this.mutationWaterfallInnerRadius;
852
+ const groupedSnvs = /* @__PURE__ */ new Map();
853
+ const firstMutationByChr = [];
854
+ for (const snv of this.filteredSnvData) {
855
+ const list = groupedSnvs.get(snv.chr) || [];
856
+ list.push(snv);
857
+ groupedSnvs.set(snv.chr, list);
858
+ }
859
+ for (const [, snvs] of groupedSnvs) {
860
+ if (snvs.length < 2) continue;
861
+ snvs.sort((a, b) => a.position - b.position);
862
+ firstMutationByChr.push({
863
+ chr: snvs[0].chr,
864
+ position: snvs[0].position,
865
+ logDistance: 0
866
+ // placeholder updated after range computed
867
+ });
868
+ for (let i = 1; i < snvs.length; i++) {
869
+ const prev = snvs[i - 1];
870
+ const curr = snvs[i];
871
+ const distance = Math.max(1, Math.abs(curr.position - prev.position));
872
+ const logDistance = Math.log10(distance);
873
+ this.mutationWaterfallData.push({
874
+ chr: curr.chr,
875
+ position: curr.position,
876
+ logDistance
877
+ });
878
+ if (logDistance < this.mutationWaterfallRangeMin) {
879
+ this.mutationWaterfallRangeMin = logDistance;
880
+ }
881
+ if (logDistance > this.mutationWaterfallRangeMax) {
882
+ this.mutationWaterfallRangeMax = logDistance;
883
+ }
884
+ }
885
+ }
886
+ if (!this.mutationWaterfallData.length) {
887
+ this.mutationWaterfallRangeMin = 0;
888
+ this.mutationWaterfallRangeMax = 0;
889
+ }
890
+ const topLogDistance = this.mutationWaterfallRangeMax;
891
+ for (const first of firstMutationByChr) {
892
+ this.mutationWaterfallData.push({
893
+ ...first,
894
+ logDistance: topLogDistance
895
+ });
896
+ }
897
+ }
898
+ calculateArcAngle(data) {
899
+ const currentChromosome = this.reference.chromosomes[this.reference.chromosomesOrder.findIndex((chromosomeOrder) => data.chr == chromosomeOrder)];
900
+ const dataAnglePos = Math.floor(data.position / this.bpx);
901
+ return currentChromosome.startAngle + dataAnglePos * this.onePxArcAngle;
902
+ }
903
+ static capMaxValue(value, gainCapped, lossCapped) {
904
+ if (value && Math.sign(value) == 1) {
905
+ return value > gainCapped ? gainCapped : value;
906
+ }
907
+ if (Math.sign(value) == -1) {
908
+ return value < lossCapped ? lossCapped : value;
909
+ }
910
+ return 0;
911
+ }
912
+ static capMinValue(value, capMinValue = 1) {
913
+ if (Math.sign(value) == 1) {
914
+ return value > capMinValue ? value : capMinValue;
915
+ }
916
+ if (Math.sign(value) == -1) {
917
+ return value < -1 * capMinValue ? value : -1 * capMinValue;
918
+ }
919
+ return 1;
920
+ }
921
+ };
922
+
923
+ // plots/disco/legend/Legend.ts
924
+ var Legend = class {
925
+ constructor(snvTitle, cnvTitle, lohTitle, fusionTitle, cnvPercentile, cnvCutoffmode, snvClassMap, cnvClassMap, cnvRenderingType, fusionLegend, discoInteractions, lohLegend, mutationWaterfallLegend, fusionLegendCounts = { interchromosomal: 0, intrachromosomal: 0 }, cnvCount = 0) {
926
+ this.snvTitle = snvTitle;
927
+ this.cnvTitle = cnvTitle;
928
+ this.lohTitle = lohTitle;
929
+ this.fusionTitle = fusionTitle;
930
+ this.cnvPercentile = cnvPercentile;
931
+ this.cnvCutoffMode = cnvCutoffmode;
932
+ this.cnvCount = cnvCount;
933
+ this.snvClassMap = snvClassMap;
934
+ this.cnvClassMap = cnvClassMap;
935
+ this.cnvRenderingType = cnvRenderingType;
936
+ this.lohLegend = lohLegend;
937
+ this.fusionLegend = fusionLegend;
938
+ this.fusionLegendCounts = fusionLegendCounts;
939
+ this.discoInteractions = discoInteractions;
940
+ this.mutationWaterfallLegend = mutationWaterfallLegend;
941
+ }
942
+ legendCount() {
943
+ const hasItd = this.cnvClassMap.has(4 /* ITD */);
944
+ 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);
945
+ }
946
+ };
947
+
948
+ // plots/disco/fusion/Fusion.ts
949
+ var Fusion = class {
950
+ constructor(source, target, genes, count, endpts) {
951
+ this.source = source;
952
+ this.target = target;
953
+ this.genes = genes;
954
+ this.count = count;
955
+ this.endpts = endpts;
956
+ }
957
+ };
958
+
959
+ // plots/disco/fusion/FusionSubgroup.ts
960
+ var FusionSubgroup = class {
961
+ constructor(startAngle, endAngle, radius, gene, value, genes, positionInChromosome, strand) {
962
+ this.startAngle = startAngle;
963
+ this.endAngle = endAngle;
964
+ this.radius = radius;
965
+ this.gene = gene;
966
+ this.value = value;
967
+ this.genes = genes;
968
+ this.positionInChromosome = positionInChromosome;
969
+ this.strand = strand;
970
+ }
971
+ };
972
+
973
+ // plots/disco/fusion/FusionMapper.ts
974
+ var FusionMapper = class {
975
+ constructor(radius, sampleName, reference) {
976
+ this.radius = radius;
977
+ this.sampleName = sampleName;
978
+ this.reference = reference;
979
+ }
980
+ map(fusionData) {
981
+ const fusions = [];
982
+ fusionData.forEach((data) => {
983
+ const genes = /* @__PURE__ */ new Set();
984
+ genes.add(data.geneA);
985
+ genes.add(data.geneB);
986
+ const startAngle = this.calculateStartAngle(data.chrA, data.posA);
987
+ const endAngle = this.calculateEndAngle(data.chrA, data.posA);
988
+ if (startAngle === null || endAngle === null) return;
989
+ const source = new FusionSubgroup(
990
+ startAngle,
991
+ endAngle,
992
+ this.radius,
993
+ data.geneA,
994
+ data.value,
995
+ genes,
996
+ {
997
+ chromosome: data.chrA,
998
+ position: data.posA
999
+ },
1000
+ data.strandA
1001
+ );
1002
+ let target;
1003
+ if (data.chrB && data.posB) {
1004
+ const startAngle2 = this.calculateStartAngle(data.chrB, data.posB);
1005
+ const endAngle2 = this.calculateEndAngle(data.chrB, data.posB);
1006
+ if (startAngle2 === null || endAngle2 === null) return;
1007
+ target = new FusionSubgroup(
1008
+ startAngle2,
1009
+ endAngle2,
1010
+ this.radius,
1011
+ data.geneB,
1012
+ data.value,
1013
+ genes,
1014
+ {
1015
+ chromosome: data.chrB,
1016
+ position: data.posB
1017
+ },
1018
+ data.strandB
1019
+ );
1020
+ }
1021
+ const fusion = new Fusion(source, target, "genes", -1, "Endpoints");
1022
+ fusions.push(fusion);
1023
+ });
1024
+ return fusions;
1025
+ }
1026
+ calculateStartAngle(chr, pos) {
1027
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1028
+ if (index === -1) return null;
1029
+ const chromosome = this.reference.chromosomes[index];
1030
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size) - 0.01;
1031
+ }
1032
+ calculateEndAngle(chr, pos) {
1033
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1034
+ if (index === -1) return null;
1035
+ const chromosome = this.reference.chromosomes[index];
1036
+ return 0.01 + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size);
1037
+ }
1038
+ };
1039
+
1040
+ // plots/disco/loh/LohLegend.ts
1041
+ var LohLegend = class {
1042
+ constructor(count) {
1043
+ this.count = count;
1044
+ }
1045
+ };
1046
+
1047
+ // plots/disco/viewmodel/ViewModel.ts
1048
+ var ViewModel = class {
1049
+ constructor(settings, rings, legend, fusions, dataHolder, genesetName, snvDataLengthAll) {
1050
+ this.settings = settings;
1051
+ this.rings = rings;
1052
+ this.legend = legend;
1053
+ this.fusions = fusions;
1054
+ this.genesetName = genesetName;
1055
+ const tempHolder = select_default("body").append("div").style("position", "absolute").style("visibility", "hidden");
1056
+ const tempSvg = tempHolder.append("svg");
1057
+ const labels = rings.labelsRing?.elementsToDisplay?.map((l) => l.text) || [];
1058
+ const maxLabelSpace = getMaxLabelWidth(tempSvg, labels);
1059
+ tempHolder.remove();
1060
+ this.width = 2 * (this.settings.horizontalPadding + this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + maxLabelSpace);
1061
+ this.height = 2 * (this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + this.settings.verticalPadding + this.settings.label.fontSize * 2 + maxLabelSpace);
1062
+ this.legendHeight = this.calculateLegendHeight(legend);
1063
+ this.snvDataLength = dataHolder.snvData.length;
1064
+ this.filteredSnvDataLength = dataHolder.filteredSnvData.length;
1065
+ this.snvDataLengthAll = snvDataLengthAll;
1066
+ this.cnvMaxValue = dataHolder.cnvGainMaxValue;
1067
+ this.cnvMinValue = dataHolder.cnvLossMaxValue;
1068
+ this.cappedCnvMaxAbsValue = dataHolder.cappedCnvMaxAbsValue;
1069
+ this.negativePercentile = dataHolder.percentileNegative;
1070
+ this.positivePercentile = dataHolder.percentilePositive;
1071
+ this.invalidDataInfo = dataHolder.invalidDataInfo;
1072
+ this.canShowMutationWaterfallPlot = dataHolder.hasWaterfallEligibleChromosome;
1073
+ this.hasMutationFractionData = dataHolder.hasMutationFractionData;
1074
+ }
1075
+ getElements(ringType) {
1076
+ switch (ringType) {
1077
+ case 0 /* CHROMOSOME */:
1078
+ return this.rings.chromosomesRing ? this.rings.chromosomesRing.elements : [];
1079
+ case 1 /* LABEL */:
1080
+ return this.rings.labelsRing.elementsToDisplay;
1081
+ case 2 /* NONEXONICSNV */:
1082
+ return this.rings.nonExonicArcRing ? this.rings.nonExonicArcRing.elements : [];
1083
+ case 3 /* SNV */:
1084
+ return this.rings.snvArcRing ? this.rings.snvArcRing.elements : [];
1085
+ case 5 /* CNV */:
1086
+ return this.rings.cnvArcRing ? this.rings.cnvArcRing.elements : [];
1087
+ case 6 /* LOH */:
1088
+ return this.rings.lohArcRing ? this.rings.lohArcRing.elements : [];
1089
+ case 4 /* MUTATION_WATERFALL */:
1090
+ return this.rings.mutationWaterfallRing ? this.rings.mutationWaterfallRing.elements : [];
1091
+ default:
1092
+ throw new Error(`ringType ${ringType} not defined`);
1093
+ }
1094
+ }
1095
+ getCollisions(ringType) {
1096
+ if (ringType == 1 /* LABEL */) {
1097
+ return this.rings.labelsRing.collisions;
1098
+ } else {
1099
+ return void 0;
1100
+ }
1101
+ }
1102
+ calculateLegendHeight(legend) {
1103
+ const rawHeight = this.settings.legend.rowHeight;
1104
+ return rawHeight * legend.legendCount();
1105
+ }
1106
+ };
1107
+
1108
+ // plots/disco/ring/Ring.ts
1109
+ var Ring = class {
1110
+ constructor(innerRadius, width, elements) {
1111
+ this.innerRadius = innerRadius;
1112
+ this.outerRadius = innerRadius + width;
1113
+ this.width = width;
1114
+ this.elements = elements;
1115
+ }
1116
+ };
1117
+
1118
+ // plots/disco/label/MLabel.ts
1119
+ var MLabel = class _MLabel {
1120
+ /**
1121
+ * The Singleton's constructor should always be private to prevent direct
1122
+ * construction calls with the `new` operator.
1123
+ */
1124
+ constructor() {
1125
+ const mlabel = {};
1126
+ for (const key in mclass) {
1127
+ mlabel[mclass[key].label] = mclass[key];
1128
+ mlabel[key] = mclass[key];
1129
+ }
1130
+ this.mlabel = mlabel;
1131
+ }
1132
+ /**
1133
+ * The static method that controls the access to the singleton instance.
1134
+ *
1135
+ * This implementation let you subclass the Singleton class while keeping
1136
+ * just one instance of each subclass around.
1137
+ */
1138
+ static getInstance() {
1139
+ if (!_MLabel.instance) {
1140
+ _MLabel.instance = new _MLabel();
1141
+ }
1142
+ return _MLabel.instance;
1143
+ }
1144
+ };
1145
+
1146
+ // plots/disco/snv/SnvLegendElement.ts
1147
+ var SnvLegendElement = class {
1148
+ constructor(snvType, color, count) {
1149
+ this.snvType = snvType;
1150
+ this.color = color;
1151
+ this.count = count;
1152
+ }
1153
+ };
1154
+
1155
+ // plots/disco/snv/SnvArcsMapper.ts
1156
+ var SnvArcsMapper = class {
1157
+ constructor(svnInnerRadius, svnWidth, sampleName, reference) {
1158
+ this.snvClassMap = /* @__PURE__ */ new Map();
1159
+ this.svnInnerRadius = svnInnerRadius;
1160
+ this.svnWidth = svnWidth;
1161
+ this.sampleName = sampleName;
1162
+ this.reference = reference;
1163
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * svnInnerRadius));
1164
+ this.onePxArcAngle = 1 / svnInnerRadius;
1165
+ }
1166
+ map(exonicSnvDataMap) {
1167
+ const snvArray = [];
1168
+ for (const angle of exonicSnvDataMap.keys()) {
1169
+ const array = exonicSnvDataMap.get(angle);
1170
+ if (array) {
1171
+ const arraySize = array.length;
1172
+ for (let i = 0; i < array.length; i++) {
1173
+ const data = array[i];
1174
+ const snvLegendElement = this.snvClassMap.get(data.mClass);
1175
+ if (snvLegendElement) {
1176
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, ++snvLegendElement.count));
1177
+ } else {
1178
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, 1));
1179
+ }
1180
+ const startAngle = angle;
1181
+ const endAngle = angle + this.onePxArcAngle;
1182
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1183
+ const arc = {
1184
+ startAngle,
1185
+ endAngle,
1186
+ innerRadius: this.svnInnerRadius + i * this.svnWidth / arraySize,
1187
+ outerRadius: this.svnInnerRadius + (i + 1) * this.svnWidth / arraySize,
1188
+ color: mLabel.color,
1189
+ text: data.gene,
1190
+ dataClass: mLabel.label,
1191
+ mname: data.mname,
1192
+ chr: data.chr,
1193
+ pos: data.position,
1194
+ vafs: data.vafs,
1195
+ sampleName: [data.sampleName]
1196
+ };
1197
+ snvArray.push(arc);
1198
+ }
1199
+ }
1200
+ }
1201
+ return snvArray;
1202
+ }
1203
+ createSnvLegend(dataClass, count) {
1204
+ const mClass = MLabel.getInstance().mlabel[dataClass];
1205
+ return new SnvLegendElement(mClass.label, mClass.color, count);
1206
+ }
1207
+ };
1208
+
1209
+ // plots/disco/cnv/CnvLegend.ts
1210
+ var CnvLegend = class {
1211
+ constructor(text, cnvType, color, value) {
1212
+ this.text = text;
1213
+ this.cnvType = cnvType;
1214
+ this.color = color;
1215
+ this.value = value;
1216
+ }
1217
+ };
1218
+
1219
+ // plots/disco/cnv/CnvColorProvider.ts
1220
+ var CnvColorProvider = class {
1221
+ static getColor(value, settings, cnvMaxPercentileAbs = 0) {
1222
+ const cnv = settings.cnv;
1223
+ const gainCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? settings.Disco.cnvCapping : cnvMaxPercentileAbs;
1224
+ const lossCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? -1 * settings.Disco.cnvCapping : -1 * cnvMaxPercentileAbs;
1225
+ if (value < lossCapped) {
1226
+ return cnv.cappedLossColor;
1227
+ } else if (value >= lossCapped && value <= 0) {
1228
+ return cnv.lossColor;
1229
+ } else if (value > 0 && value <= gainCapped) {
1230
+ return cnv.ampColor;
1231
+ } else {
1232
+ return cnv.cappedAmpColor;
1233
+ }
1234
+ }
1235
+ };
1236
+
1237
+ // plots/disco/cnv/CnvArcsMapper.ts
1238
+ var CnvArcsMapper = class {
1239
+ constructor(cnvInnerRadius, cnvWidth, settings, sampleName, reference, cnvMaxValue = 0, cnvMinValue = 0, cnvMaxAbsValue = 0, cnvAbsPercentile = 0, cnvUnit = "", cnvRenderingType) {
1240
+ this.cnvClassMap = /* @__PURE__ */ new Map();
1241
+ this.cnvInnerRadius = cnvInnerRadius;
1242
+ this.cnvWidth = cnvWidth;
1243
+ this.settings = settings;
1244
+ this.sampleName = sampleName;
1245
+ this.reference = reference;
1246
+ this.cnvMaxValue = cnvMaxValue;
1247
+ this.cnvMinValue = cnvMinValue;
1248
+ this.cnvMaxAbsValue = cnvMaxAbsValue;
1249
+ this.cnvAbsPercentile = cnvAbsPercentile;
1250
+ this.cnvUnit = cnvUnit;
1251
+ this.cnvRenderingType = cnvRenderingType;
1252
+ this.gainCapped = Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1253
+ this.lossCapped = -1 * Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1254
+ this.lossOnly = cnvMaxValue <= 0;
1255
+ this.gainOnly = cnvMinValue >= 0;
1256
+ this.onePxArcAngle = 1 / this.cnvInnerRadius;
1257
+ const gain = new CnvLegend(
1258
+ "Max",
1259
+ cnvMaxValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1260
+ this.getColor(cnvMaxValue),
1261
+ cnvMaxValue
1262
+ );
1263
+ const loss = new CnvLegend(
1264
+ "Min",
1265
+ cnvMinValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1266
+ this.getColor(cnvMinValue),
1267
+ cnvMinValue
1268
+ );
1269
+ const cap = new CnvLegend(
1270
+ "Capping",
1271
+ 0 /* Loss */,
1272
+ this.getColor(cnvMinValue > 0 ? cnvMinValue : cnvMaxValue),
1273
+ this.settings.Disco.cnvCapping
1274
+ );
1275
+ this.cnvClassMap.set(1 /* Gain */, gain);
1276
+ this.cnvClassMap.set(0 /* Loss */, loss);
1277
+ this.cnvClassMap.set(2 /* Cap */, cap);
1278
+ }
1279
+ map(arcData) {
1280
+ const arcs = [];
1281
+ let itdCount = 0;
1282
+ arcData.forEach((data) => {
1283
+ let startAngle = this.calculateStartAngle(data);
1284
+ let endAngle = this.calculateEndAngle(data);
1285
+ if (startAngle === null || endAngle === null) return;
1286
+ if (endAngle - startAngle < this.onePxArcAngle) {
1287
+ const restAngle = this.onePxArcAngle - (endAngle - startAngle);
1288
+ startAngle = startAngle - restAngle / 2;
1289
+ endAngle = endAngle + restAngle / 2;
1290
+ }
1291
+ const isItd = data.dt == dtitd;
1292
+ if (isItd) itdCount++;
1293
+ const color = isItd ? mclass[mclassitd].color : this.getColor(data.value);
1294
+ const innerRadius = isItd ? this.cnvInnerRadius : this.calculateInnerRadius(data);
1295
+ const outerRadius = isItd ? this.cnvInnerRadius + this.cnvWidth : this.calculateOuterRadius(data);
1296
+ const arc = {
1297
+ startAngle,
1298
+ endAngle,
1299
+ innerRadius,
1300
+ outerRadius,
1301
+ color,
1302
+ dt: data.dt,
1303
+ dataClass: data.mClass,
1304
+ text: data.gene,
1305
+ chr: data.chr,
1306
+ start: data.start,
1307
+ stop: data.stop,
1308
+ value: data.value,
1309
+ unit: this.cnvUnit,
1310
+ sampleName: [this.sampleName]
1311
+ };
1312
+ arcs.push(arc);
1313
+ });
1314
+ if (itdCount) {
1315
+ this.cnvClassMap.set(4 /* ITD */, new CnvLegend("ITD", 4 /* ITD */, mclass[mclassitd].color, itdCount));
1316
+ }
1317
+ return arcs;
1318
+ }
1319
+ calculateStartAngle(data) {
1320
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1321
+ if (index == -1) return null;
1322
+ const chromosome = this.reference.chromosomes[index];
1323
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1324
+ }
1325
+ calculateEndAngle(data) {
1326
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1327
+ const chromosome = this.reference.chromosomes[index];
1328
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1329
+ }
1330
+ getColor(value) {
1331
+ return CnvColorProvider.getColor(value, this.settings, this.cnvAbsPercentile);
1332
+ }
1333
+ calculateInnerRadius(data) {
1334
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1335
+ return this.cnvInnerRadius;
1336
+ }
1337
+ if (this.gainOnly) {
1338
+ return this.cnvInnerRadius;
1339
+ }
1340
+ if (this.lossOnly) {
1341
+ const outerRadius = this.cnvInnerRadius + this.cnvWidth;
1342
+ return outerRadius + DataMapper.capMinValue(
1343
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1344
+ );
1345
+ }
1346
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1347
+ if (Math.sign(data.value) == 1) {
1348
+ return centerRadius;
1349
+ }
1350
+ if (Math.sign(data.value) == -1) {
1351
+ return centerRadius + DataMapper.capMinValue(
1352
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile * (this.cnvWidth / 2)
1353
+ );
1354
+ }
1355
+ return 1;
1356
+ }
1357
+ calculateOuterRadius(data) {
1358
+ const maxOuterRadius = this.cnvInnerRadius + this.cnvWidth;
1359
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1360
+ return maxOuterRadius;
1361
+ }
1362
+ if (this.gainOnly) {
1363
+ return this.cnvInnerRadius + DataMapper.capMinValue(
1364
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1365
+ );
1366
+ }
1367
+ if (this.lossOnly) {
1368
+ return maxOuterRadius;
1369
+ }
1370
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1371
+ if (Math.sign(data.value) == 1) {
1372
+ return centerRadius + DataMapper.capMinValue(
1373
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvMaxAbsValue * (this.cnvWidth / 2)
1374
+ );
1375
+ }
1376
+ if (Math.sign(data.value) == -1) {
1377
+ return centerRadius;
1378
+ }
1379
+ return 1;
1380
+ }
1381
+ };
1382
+
1383
+ // plots/disco/label/Line.ts
1384
+ var Line = class {
1385
+ constructor(points, color) {
1386
+ this.points = new Array();
1387
+ this.points = points;
1388
+ this.color = color;
1389
+ }
1390
+ };
1391
+
1392
+ // plots/disco/label/LabelFactory.ts
1393
+ var LabelFactory = class {
1394
+ static createLabel(startAngle, endAngle, innerRadius, outerRadius, value, gene, color, dataClass, chr, position, isPrioritized = false, labelsToLinesGap, mutationTooltip, fusionTooltip) {
1395
+ const angle = (startAngle + endAngle) / 2;
1396
+ const ccAngle = angle - Math.PI / 2;
1397
+ const transform = `rotate(${angle * 180 / Math.PI - 90}) translate(${outerRadius})${angle > Math.PI ? "rotate(180)" : ""}`;
1398
+ const textAnchor = angle > Math.PI ? "end" : "";
1399
+ const r0 = innerRadius;
1400
+ const r1 = outerRadius - labelsToLinesGap;
1401
+ const points = [];
1402
+ const point0 = {
1403
+ x: r0 * Math.cos(ccAngle),
1404
+ y: r0 * Math.sin(ccAngle)
1405
+ };
1406
+ const point1 = {
1407
+ x: r1 * Math.cos(ccAngle),
1408
+ y: r1 * Math.sin(ccAngle)
1409
+ };
1410
+ points.push(point0);
1411
+ points.push(point1);
1412
+ const line = new Line(points, color);
1413
+ const label = {
1414
+ startAngle,
1415
+ endAngle,
1416
+ innerRadius,
1417
+ outerRadius,
1418
+ angle,
1419
+ value,
1420
+ text: gene,
1421
+ color,
1422
+ transform,
1423
+ textAnchor,
1424
+ ccAngle,
1425
+ line,
1426
+ isPrioritized,
1427
+ start: position,
1428
+ stop: position,
1429
+ chr,
1430
+ mutationsTooltip: mutationTooltip ? [mutationTooltip] : void 0,
1431
+ fusionTooltip: fusionTooltip ? [fusionTooltip] : void 0
1432
+ };
1433
+ return label;
1434
+ }
1435
+ static createMovedLabel(element, overlap) {
1436
+ const startAngle = element.startAngle + overlap;
1437
+ const endAngle = element.endAngle + overlap;
1438
+ const angle = (startAngle + endAngle) / 2;
1439
+ const ccAngle = angle - Math.PI / 2;
1440
+ const r0 = element.innerRadius;
1441
+ const r1 = element.outerRadius - 2;
1442
+ const dr = (r1 - r0) / 3;
1443
+ const cos0 = Math.cos(element.ccAngle);
1444
+ const sin0 = Math.sin(element.ccAngle);
1445
+ const cos1 = Math.cos(element.ccAngle + overlap);
1446
+ const sin1 = Math.sin(element.ccAngle + overlap);
1447
+ const points = [];
1448
+ const point0 = {
1449
+ x: r0 * cos0,
1450
+ y: r0 * sin0
1451
+ };
1452
+ const point1 = {
1453
+ x: (r0 + dr) * cos0,
1454
+ y: (r0 + dr) * sin0
1455
+ };
1456
+ const point2 = {
1457
+ x: (r0 + 2 * dr) * cos1,
1458
+ y: (r0 + 2 * dr) * sin1
1459
+ };
1460
+ const point3 = {
1461
+ x: (r0 + 3 * dr) * cos1,
1462
+ y: (r0 + 3 * dr) * sin1
1463
+ };
1464
+ points.push(point0);
1465
+ points.push(point1);
1466
+ points.push(point2);
1467
+ points.push(point3);
1468
+ const line = new Line(points, element.color);
1469
+ const transform = "rotate(" + (angle * 180 / Math.PI - 90) + ")translate(" + element.outerRadius + ")" + (angle > Math.PI ? "rotate(180)" : "");
1470
+ const textAnchor = angle > Math.PI ? "end" : "";
1471
+ const color = element.mutationsTooltip ? element.mutationsTooltip[0].color : element.fusionTooltip ? element.fusionTooltip[0].color : void 0;
1472
+ const label = {
1473
+ startAngle,
1474
+ endAngle,
1475
+ innerRadius: element.innerRadius,
1476
+ outerRadius: element.outerRadius,
1477
+ angle,
1478
+ value: element.value,
1479
+ text: element.text,
1480
+ transform,
1481
+ textAnchor,
1482
+ ccAngle,
1483
+ color,
1484
+ line,
1485
+ isPrioritized: element.isPrioritized,
1486
+ start: element.start,
1487
+ stop: element.stop,
1488
+ chr: element.chr,
1489
+ mutationsTooltip: element.mutationsTooltip,
1490
+ fusionTooltip: element.fusionTooltip,
1491
+ cnvTooltip: element.cnvTooltip
1492
+ };
1493
+ return label;
1494
+ }
1495
+ };
1496
+
1497
+ // plots/disco/label/LabelsMapper.ts
1498
+ var LabelsMapper = class {
1499
+ constructor(settings, sampleName, reference, cnvMaxPercentileAbs = 0) {
1500
+ this.labelMap = /* @__PURE__ */ new Map();
1501
+ this.settings = settings;
1502
+ this.sampleName = sampleName;
1503
+ this.reference = reference;
1504
+ this.cnvMaxPercentileAbs = cnvMaxPercentileAbs;
1505
+ }
1506
+ map(data, cnvData = []) {
1507
+ const innerRadius = this.settings.rings.labelLinesInnerRadius;
1508
+ const outerRadius = innerRadius + this.settings.rings.labelsToLinesDistance;
1509
+ data.forEach((data2) => {
1510
+ if (data2.dt == dtsnvindel) {
1511
+ const startAngle = this.calculateStartAngle(data2.chr, data2.position);
1512
+ const endAngle = this.calculateEndAngle(data2.chr, data2.position);
1513
+ if (startAngle === null || endAngle === null) return;
1514
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data2.mClass] : void 0;
1515
+ this.addLabelOrMutation(
1516
+ data2,
1517
+ data2.gene,
1518
+ data2.mname,
1519
+ startAngle,
1520
+ endAngle,
1521
+ innerRadius,
1522
+ outerRadius,
1523
+ mLabel.color,
1524
+ mLabel.label
1525
+ );
1526
+ }
1527
+ if (data2.dt == dtfusionrna) {
1528
+ const color = FusionColorProvider.getColor(data2.chrA, data2.chrB);
1529
+ if (data2.geneA) {
1530
+ const startAngleSource = this.calculateStartAngle(data2.chrA, data2.posA);
1531
+ const endAngleSource = this.calculateEndAngle(data2.chrA, data2.posA);
1532
+ if (startAngleSource === null || endAngleSource === null) return;
1533
+ this.addLabelOrFusion(
1534
+ data2,
1535
+ data2.geneA,
1536
+ data2.posA,
1537
+ data2.chrA,
1538
+ startAngleSource,
1539
+ endAngleSource,
1540
+ innerRadius,
1541
+ outerRadius,
1542
+ color
1543
+ );
1544
+ }
1545
+ if (data2.geneB && data2.geneA != data2.geneB) {
1546
+ const startAngleTarget = this.calculateStartAngle(data2.chrB, data2.posB);
1547
+ const endAngleTarget = this.calculateEndAngle(data2.chrB, data2.posB);
1548
+ if (startAngleTarget == null || endAngleTarget == null) return;
1549
+ this.addLabelOrFusion(
1550
+ data2,
1551
+ data2.geneB,
1552
+ data2.posB,
1553
+ data2.chrB,
1554
+ startAngleTarget,
1555
+ endAngleTarget,
1556
+ innerRadius,
1557
+ outerRadius,
1558
+ color
1559
+ );
1560
+ }
1561
+ }
1562
+ });
1563
+ const labelsArray = Array.from(this.labelMap.values());
1564
+ labelsArray.forEach((label) => {
1565
+ cnvData.forEach((cnv) => {
1566
+ if ((cnv.dt == dtcnv || cnv.dt == dtitd) && label.chr == cnv.chr && label.stop >= cnv.start && cnv.stop >= label.start) {
1567
+ const mutation = {
1568
+ dt: cnv.dt,
1569
+ value: cnv.value,
1570
+ color: cnv.dt == dtitd ? mclass[mclassitd].color : CnvColorProvider.getColor(cnv.value, this.settings, this.cnvMaxPercentileAbs),
1571
+ chr: cnv.chr,
1572
+ start: cnv.start,
1573
+ stop: cnv.stop
1574
+ };
1575
+ if (label.cnvTooltip) {
1576
+ label.cnvTooltip.push(mutation);
1577
+ } else {
1578
+ label.cnvTooltip = [];
1579
+ label.cnvTooltip.push(mutation);
1580
+ }
1581
+ }
1582
+ });
1583
+ });
1584
+ return Array.from(this.labelMap.values());
1585
+ }
1586
+ addLabelOrMutation(data, gene, mname, startAngle, endAngle, innerRadius, outerRadius, color, dataClass) {
1587
+ const label = this.labelMap.get(gene);
1588
+ const mutation = {
1589
+ mname,
1590
+ color,
1591
+ dataClass,
1592
+ chr: data.chr,
1593
+ position: data.position,
1594
+ vafs: data.vafs
1595
+ };
1596
+ if (!label) {
1597
+ this.labelMap.set(
1598
+ gene,
1599
+ LabelFactory.createLabel(
1600
+ startAngle,
1601
+ endAngle,
1602
+ innerRadius,
1603
+ outerRadius,
1604
+ data.value,
1605
+ gene,
1606
+ color,
1607
+ dataClass,
1608
+ data.chr,
1609
+ data.position,
1610
+ data.isPrioritized,
1611
+ this.settings.rings.labelsToLinesGap,
1612
+ mutation
1613
+ )
1614
+ );
1615
+ } else {
1616
+ if (label.mutationsTooltip) {
1617
+ label.start = Math.min(label.start, data.position);
1618
+ label.stop = Math.max(label.stop, data.position);
1619
+ label.mutationsTooltip.push(mutation);
1620
+ } else {
1621
+ label.mutationsTooltip = [];
1622
+ label.start = Math.min(label.start, data.position);
1623
+ label.stop = Math.max(label.stop, data.position);
1624
+ label.mutationsTooltip.push(mutation);
1625
+ }
1626
+ }
1627
+ }
1628
+ addLabelOrFusion(data, gene, position, chr, startAngle, endAngle, innerRadius, outerRadius, color) {
1629
+ const label = this.labelMap.get(gene);
1630
+ const fusionTooltip = {
1631
+ color,
1632
+ chrA: data.chrA,
1633
+ chrB: data.chrB,
1634
+ posA: data.posA,
1635
+ posB: data.posB,
1636
+ geneA: data.geneA,
1637
+ geneB: data.geneB,
1638
+ strandA: data.strandA,
1639
+ strandB: data.strandB
1640
+ };
1641
+ if (!label) {
1642
+ this.labelMap.set(
1643
+ gene,
1644
+ LabelFactory.createLabel(
1645
+ startAngle,
1646
+ endAngle,
1647
+ innerRadius,
1648
+ outerRadius,
1649
+ data.value,
1650
+ gene,
1651
+ color,
1652
+ "Fusion transcript",
1653
+ chr,
1654
+ position,
1655
+ data.isPrioritized,
1656
+ this.settings.rings.labelsToLinesGap,
1657
+ void 0,
1658
+ fusionTooltip
1659
+ )
1660
+ );
1661
+ } else {
1662
+ if (label.fusionTooltip) {
1663
+ label.start = Math.min(label.start, position);
1664
+ label.stop = Math.max(label.stop, position);
1665
+ label.fusionTooltip.push(fusionTooltip);
1666
+ } else {
1667
+ label.fusionTooltip = [];
1668
+ label.start = Math.min(label.start, position);
1669
+ label.stop = Math.max(label.stop, position);
1670
+ label.fusionTooltip.push(fusionTooltip);
1671
+ }
1672
+ }
1673
+ }
1674
+ calculateStartAngle(chr, position) {
1675
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1676
+ if (index === -1) return null;
1677
+ const chromosome = this.reference.chromosomes[index];
1678
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1679
+ }
1680
+ calculateEndAngle(chr, position) {
1681
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1682
+ if (index === -1) return null;
1683
+ const chromosome = this.reference.chromosomes[index];
1684
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1685
+ }
1686
+ };
1687
+
1688
+ // plots/disco/label/Labels.ts
1689
+ var Labels = class extends Ring {
1690
+ constructor(settings, elements, hasPrioritizedGenes) {
1691
+ super(
1692
+ settings.rings.labelLinesInnerRadius,
1693
+ settings.rings.labelsToLinesDistance,
1694
+ elements.sort((a, b) => {
1695
+ return a.startAngle < b.startAngle ? -1 : a.startAngle > b.startAngle ? 1 : 0;
1696
+ })
1697
+ );
1698
+ this.elementsToDisplay = [];
1699
+ this.settings = settings;
1700
+ this.hasPrioritizedGenes = hasPrioritizedGenes;
1701
+ const circumference = 2 * Math.PI * (settings.rings.labelLinesInnerRadius + settings.rings.labelsToLinesDistance);
1702
+ this.overlapAngle = this.settings.label.overlapAngleFactor * this.settings.label.fontSize / circumference;
1703
+ this.calculateCollisions();
1704
+ }
1705
+ calculateCollisions() {
1706
+ this.collisions = [];
1707
+ let hasPrioritizedGenesList = [];
1708
+ hasPrioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1709
+ if (this.settings.label.prioritizeGeneLabelsByGeneSets) {
1710
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(hasPrioritizedGenesList);
1711
+ } else if (this.hasPrioritizedGenes) {
1712
+ const prioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1713
+ const filteredPrioritizedGenesList = this.getLabelsWithPrioritizedGenes(prioritizedGenesList);
1714
+ const withoutPrioritizedGenesList = this.elements.filter((label) => !label.isPrioritized);
1715
+ const combinedAndSortedList = [...withoutPrioritizedGenesList, ...filteredPrioritizedGenesList].sort(
1716
+ (a, b) => a.startAngle - b.startAngle
1717
+ );
1718
+ this.elementsToDisplay = this.getAllLabels(combinedAndSortedList);
1719
+ } else {
1720
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(this.elements);
1721
+ }
1722
+ }
1723
+ getLabelsWithPrioritizedGenes(elemenets) {
1724
+ const filteredList = [];
1725
+ let prev = { endAngle: 0 };
1726
+ elemenets.forEach((element, index) => {
1727
+ if (index == 0) {
1728
+ filteredList.push(element);
1729
+ prev = element;
1730
+ } else {
1731
+ const overlap = prev.endAngle - element.startAngle + this.overlapAngle;
1732
+ if (overlap > 0 && overlap < this.settings.label.maxDeltaAngle) {
1733
+ const labelCopy = LabelFactory.createMovedLabel(element, overlap);
1734
+ filteredList?.push(labelCopy);
1735
+ prev = labelCopy;
1736
+ }
1737
+ if (overlap <= 0) {
1738
+ filteredList.push(element);
1739
+ prev = element;
1740
+ }
1741
+ }
1742
+ });
1743
+ return filteredList;
1744
+ }
1745
+ getAllLabels(elemenets) {
1746
+ const filteredList = [];
1747
+ let prev = { endAngle: 0 };
1748
+ const elemenetsLength = elemenets.length;
1749
+ let lastCancerGeneLabelIndex = -1;
1750
+ for (let index = 0; index < elemenets.length; index++) {
1751
+ const element = elemenets[index];
1752
+ if (element.isPrioritized) {
1753
+ filteredList.push(element);
1754
+ lastCancerGeneLabelIndex = index;
1755
+ prev = element;
1756
+ continue;
1757
+ }
1758
+ if (index == 0) {
1759
+ if (elemenetsLength > 1) {
1760
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1761
+ continue;
1762
+ }
1763
+ filteredList.push(element);
1764
+ prev = element;
1765
+ }
1766
+ continue;
1767
+ }
1768
+ const prevOverlap = prev.endAngle - element.startAngle + this.overlapAngle;
1769
+ if (prevOverlap > 0 && prevOverlap < this.settings.label.maxDeltaAngle) {
1770
+ if (index == length - 1) {
1771
+ filteredList.push(element);
1772
+ continue;
1773
+ }
1774
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap)) {
1775
+ continue;
1776
+ }
1777
+ const labelCopy = LabelFactory.createMovedLabel(element, prevOverlap);
1778
+ this.collisions?.push(labelCopy);
1779
+ filteredList.push(element);
1780
+ prev = labelCopy;
1781
+ }
1782
+ if (prevOverlap <= 0) {
1783
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1784
+ continue;
1785
+ }
1786
+ filteredList.push(element);
1787
+ prev = element;
1788
+ }
1789
+ }
1790
+ return filteredList;
1791
+ }
1792
+ isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap) {
1793
+ const nextLabelWithCancerGene = this.getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex);
1794
+ if (nextLabelWithCancerGene) {
1795
+ const nextOverlap = element.endAngle + prevOverlap - nextLabelWithCancerGene.startAngle + this.overlapAngle;
1796
+ if (nextOverlap > 0) {
1797
+ return true;
1798
+ }
1799
+ }
1800
+ return false;
1801
+ }
1802
+ getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex) {
1803
+ return elemenets.find((label, index) => label.isPrioritized && index > lastCancerGeneLabelIndex);
1804
+ }
1805
+ };
1806
+
1807
+ // plots/disco/snv/NonExonicSnvArcsMapper.ts
1808
+ var NonExonicSnvArcsMapper = class {
1809
+ constructor(nonExonicInnerRadius, nonExonicWidht, sampleName, reference) {
1810
+ this.nonExonicInnerRadius = nonExonicInnerRadius;
1811
+ this.nonExonicWidht = nonExonicWidht;
1812
+ this.sampleName = sampleName;
1813
+ this.reference = reference;
1814
+ this.onePxArcAngle = 1 / nonExonicInnerRadius;
1815
+ }
1816
+ map(arcData) {
1817
+ const innerRadius = this.nonExonicInnerRadius;
1818
+ const outerRadius = innerRadius + this.nonExonicWidht;
1819
+ const arcs = [];
1820
+ arcData.forEach((data) => {
1821
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1822
+ const startAngle = this.calculateStartAngle(data);
1823
+ const endAngle = this.calculateEndAngle(data);
1824
+ if (startAngle === null || endAngle === null) return;
1825
+ const arc = {
1826
+ startAngle,
1827
+ endAngle,
1828
+ innerRadius,
1829
+ outerRadius,
1830
+ color: mLabel.color,
1831
+ text: data.gene,
1832
+ dataClass: mLabel.label,
1833
+ mname: data.mname,
1834
+ chr: data.chr,
1835
+ pos: data.position,
1836
+ vafs: data.vafs,
1837
+ sampleName: [data.sampleName]
1838
+ };
1839
+ arcs.push(arc);
1840
+ });
1841
+ return arcs;
1842
+ }
1843
+ calculateStartAngle(data) {
1844
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1845
+ if (index === -1) return null;
1846
+ const chromosome = this.reference.chromosomes[index];
1847
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size) - this.onePxArcAngle;
1848
+ }
1849
+ calculateEndAngle(data) {
1850
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1851
+ const chromosome = this.reference.chromosomes[index];
1852
+ return this.onePxArcAngle + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size);
1853
+ }
1854
+ };
1855
+
1856
+ // plots/disco/loh/GradientColorProvider.ts
1857
+ var GradientColorProvider = class {
1858
+ static provide(value) {
1859
+ const clampedValue = Math.min(Math.max(value, 0), 1);
1860
+ const colorValue = Math.round(clampedValue * 255);
1861
+ return `rgb(${colorValue}, ${colorValue}, ${colorValue})`;
1862
+ }
1863
+ };
1864
+
1865
+ // plots/disco/loh/LohArcMapper.ts
1866
+ var LohArcMapper = class {
1867
+ constructor(lohInnerRadius, lohWidth, sampleName, reference) {
1868
+ this.lohInnerRadius = lohInnerRadius;
1869
+ this.lohWidth = lohWidth;
1870
+ this.sampleName = sampleName;
1871
+ this.reference = reference;
1872
+ }
1873
+ map(arcData) {
1874
+ const arcs = [];
1875
+ arcData.forEach((data) => {
1876
+ const startAngle = this.calculateStartAngle(data);
1877
+ const endAngle = this.calculateEndAngle(data);
1878
+ if (startAngle === null || endAngle === null) return;
1879
+ const innerRadius = this.lohInnerRadius;
1880
+ const outerRadius = innerRadius + this.lohWidth;
1881
+ const color = GradientColorProvider.provide(data.segmean);
1882
+ const arc = {
1883
+ startAngle,
1884
+ endAngle,
1885
+ innerRadius,
1886
+ outerRadius,
1887
+ color,
1888
+ text: data.gene,
1889
+ chr: data.chr,
1890
+ start: data.start,
1891
+ stop: data.stop,
1892
+ value: data.segmean
1893
+ };
1894
+ arcs.push(arc);
1895
+ });
1896
+ return arcs;
1897
+ }
1898
+ calculateStartAngle(data) {
1899
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1900
+ if (index === -1) return null;
1901
+ const chromosome = this.reference.chromosomes[index];
1902
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1903
+ }
1904
+ calculateEndAngle(data) {
1905
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1906
+ const chromosome = this.reference.chromosomes[index];
1907
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1908
+ }
1909
+ };
1910
+
1911
+ // plots/disco/ring/Rings.ts
1912
+ var Rings = class {
1913
+ constructor(labelsRing, chromosomesRing, nonExonicArcRing, snvArcRing, cnvArcRing, lohArcRing, mutationWaterfallRing) {
1914
+ this.labelsRing = labelsRing;
1915
+ this.chromosomesRing = chromosomesRing;
1916
+ this.nonExonicArcRing = nonExonicArcRing;
1917
+ this.snvArcRing = snvArcRing;
1918
+ this.cnvArcRing = cnvArcRing;
1919
+ this.lohArcRing = lohArcRing;
1920
+ this.mutationWaterfallRing = mutationWaterfallRing;
1921
+ }
1922
+ };
1923
+
1924
+ // plots/disco/waterfall/MutationWaterfallMapper.ts
1925
+ var MutationWaterfallMapper = class {
1926
+ constructor(innerRadius, ringWidth, reference, logRange, color = "#4d4d4d") {
1927
+ this.innerRadius = innerRadius;
1928
+ this.ringWidth = ringWidth;
1929
+ this.reference = reference;
1930
+ this.logRange = logRange;
1931
+ this.color = color;
1932
+ }
1933
+ map(data = []) {
1934
+ if (!data.length) return [];
1935
+ const min = this.logRange?.min ?? 0;
1936
+ const max = this.logRange?.max ?? min + 1;
1937
+ const span = max - min || 1;
1938
+ const points = [];
1939
+ for (const datum of data) {
1940
+ const chrIndex = this.reference.chromosomesOrder.indexOf(datum.chr);
1941
+ if (chrIndex === -1) continue;
1942
+ const chromosome = this.reference.chromosomes[chrIndex];
1943
+ const chrAngleSpan = chromosome.endAngle - chromosome.startAngle;
1944
+ const relPos = chromosome.size > 0 ? datum.position / chromosome.size : 0;
1945
+ const angle = chromosome.startAngle + chrAngleSpan * relPos;
1946
+ const normalized = Math.max(0, Math.min(1, (datum.logDistance - min) / span));
1947
+ const radius = this.innerRadius + this.ringWidth * normalized;
1948
+ points.push({
1949
+ startAngle: angle,
1950
+ endAngle: angle,
1951
+ innerRadius: radius,
1952
+ outerRadius: radius,
1953
+ text: chromosome.text,
1954
+ color: this.color,
1955
+ chr: datum.chr,
1956
+ position: datum.position,
1957
+ logDistance: datum.logDistance,
1958
+ ringInnerRadius: this.innerRadius,
1959
+ ringWidth: this.ringWidth,
1960
+ rangeMin: min,
1961
+ rangeMax: max
1962
+ });
1963
+ }
1964
+ return points;
1965
+ }
1966
+ };
1967
+
1968
+ // plots/disco/viewmodel/ViewModelProvider.ts
1969
+ var ViewModelProvider = class {
1970
+ constructor(settings, dataMapper, reference, sampleName, genesetName, discoInteractions) {
1971
+ this.nonExonicArcRing = void 0;
1972
+ this.settings = settings;
1973
+ this.dataMapper = dataMapper;
1974
+ this.reference = reference;
1975
+ this.sampleName = sampleName;
1976
+ this.genesetName = genesetName;
1977
+ this.discoInteractions = discoInteractions;
1978
+ }
1979
+ map(data) {
1980
+ const dataHolder = this.dataMapper.map(data);
1981
+ let labelsRing;
1982
+ if (this.settings.Disco.showGeneNames) {
1983
+ const labelsMapper = new LabelsMapper(
1984
+ this.settings,
1985
+ this.sampleName,
1986
+ this.reference,
1987
+ dataHolder.cnvMaxPercentileAbs
1988
+ );
1989
+ const labelsData = labelsMapper.map(dataHolder.labelData, dataHolder.cnvData);
1990
+ labelsRing = new Labels(this.settings, labelsData, dataHolder.hasPrioritizedGenes);
1991
+ } else {
1992
+ labelsRing = new Labels(this.settings, [], false);
1993
+ }
1994
+ const chromosomesRing = new Ring(
1995
+ this.settings.rings.chromosomeInnerRadius,
1996
+ this.settings.rings.chromosomeWidth,
1997
+ this.reference.chromosomes
1998
+ );
1999
+ const nonExonicSnvArcsMapper = new NonExonicSnvArcsMapper(
2000
+ dataHolder.nonExonicInnerRadius,
2001
+ this.settings.rings.nonExonicRingWidth,
2002
+ this.sampleName,
2003
+ this.reference
2004
+ );
2005
+ const nonExonicData = nonExonicSnvArcsMapper.map(dataHolder.nonExonicSnvData);
2006
+ if (nonExonicData.length > 0) {
2007
+ this.nonExonicArcRing = new Ring(
2008
+ dataHolder.nonExonicInnerRadius,
2009
+ this.settings.rings.nonExonicRingWidth,
2010
+ nonExonicData
2011
+ );
2012
+ }
2013
+ this.snvArcsMapper = new SnvArcsMapper(
2014
+ dataHolder.snvInnerRadius,
2015
+ this.settings.rings.snvRingWidth,
2016
+ this.sampleName,
2017
+ this.reference
2018
+ );
2019
+ const snvData = this.snvArcsMapper.map(dataHolder.snvRingDataMap);
2020
+ if (snvData.length > 0) {
2021
+ this.snvArcRing = new Ring(dataHolder.snvInnerRadius, this.settings.rings.snvRingWidth, snvData);
2022
+ }
2023
+ const lohMapper = new LohArcMapper(
2024
+ dataHolder.lohInnerRadius,
2025
+ this.settings.rings.lohRingWidth,
2026
+ this.sampleName,
2027
+ this.reference
2028
+ );
2029
+ const lohData = lohMapper.map(dataHolder.lohData);
2030
+ if (lohData.length > 0) {
2031
+ this.lohArcRing = new Ring(dataHolder.lohInnerRadius, this.settings.rings.lohRingWidth, lohData);
2032
+ }
2033
+ this.cnvArcsMapper = new CnvArcsMapper(
2034
+ dataHolder.cnvInnerRadius,
2035
+ this.settings.rings.cnvRingWidth,
2036
+ this.settings,
2037
+ this.sampleName,
2038
+ this.reference,
2039
+ dataHolder.percentilePositive,
2040
+ dataHolder.percentileNegative,
2041
+ dataHolder.cappedCnvMaxAbsValue,
2042
+ dataHolder.cnvMaxPercentileAbs,
2043
+ this.settings.cnv.unit,
2044
+ this.settings.Disco.cnvRenderingType
2045
+ );
2046
+ const cnvData = this.cnvArcsMapper.map(dataHolder.cnvData);
2047
+ if (cnvData.length > 0) {
2048
+ this.cnvArcRing = new Ring(dataHolder.cnvInnerRadius, this.settings.rings.cnvRingWidth, cnvData);
2049
+ }
2050
+ if (this.settings.Disco.mutationWaterfallPlot && dataHolder.mutationWaterfallData?.length && dataHolder.mutationWaterfallInnerRadius !== void 0 && //Added this check to prevent TypeScript error "mutationWaterfallInnerRadius might be undefined"
2051
+ (dataHolder.mutationWaterfallInnerRadius ?? 0) > 0 && dataHolder.mutationWaterfallLogRange) {
2052
+ const mutationWaterfallMapper = new MutationWaterfallMapper(
2053
+ dataHolder.mutationWaterfallInnerRadius,
2054
+ this.settings.rings.mutationWaterfallRingWidth,
2055
+ this.reference,
2056
+ dataHolder.mutationWaterfallLogRange,
2057
+ this.settings.Disco.mutationWaterfallColor || "#4d4d4d"
2058
+ );
2059
+ const waterfallData = mutationWaterfallMapper.map(dataHolder.mutationWaterfallData);
2060
+ if (waterfallData.length > 0) {
2061
+ this.mutationWaterfallRing = new Ring(
2062
+ dataHolder.mutationWaterfallInnerRadius,
2063
+ this.settings.rings.mutationWaterfallRingWidth,
2064
+ waterfallData
2065
+ );
2066
+ }
2067
+ }
2068
+ const fusionMapper = new FusionMapper(dataHolder.fusionRadius, this.sampleName, this.reference);
2069
+ const fusions = fusionMapper.map(dataHolder.fusionData);
2070
+ let lohLegend;
2071
+ if (this.settings.legend.lohLegendEnabled && dataHolder.lohData.length) {
2072
+ lohLegend = new LohLegend(dataHolder.lohData.length);
2073
+ }
2074
+ const fusionLegendCounts = fusions.reduce(
2075
+ (counts, fusion) => {
2076
+ if (fusion.target && fusion.source.positionInChromosome.chromosome == fusion.target.positionInChromosome.chromosome)
2077
+ counts.intrachromosomal++;
2078
+ else counts.interchromosomal++;
2079
+ return counts;
2080
+ },
2081
+ { interchromosomal: 0, intrachromosomal: 0 }
2082
+ );
2083
+ const legend = new Legend(
2084
+ this.settings.legend.snvTitle,
2085
+ this.settings.legend.cnvTitle,
2086
+ this.settings.legend.lohTitle,
2087
+ this.settings.legend.fusionTitle,
2088
+ this.settings.Disco.cnvPercentile,
2089
+ this.settings.Disco.cnvCutoffMode,
2090
+ this.snvArcsMapper ? this.snvArcsMapper.snvClassMap : /* @__PURE__ */ new Map(),
2091
+ this.cnvArcsMapper ? this.cnvArcsMapper.cnvClassMap : /* @__PURE__ */ new Map(),
2092
+ this.settings.Disco.cnvRenderingType,
2093
+ fusions.length > 0,
2094
+ this.discoInteractions,
2095
+ lohLegend,
2096
+ this.settings.Disco.mutationWaterfallPlot && this.mutationWaterfallRing ? {
2097
+ color: this.settings.Disco.mutationWaterfallColor || "#4d4d4d",
2098
+ onColorChange: this.discoInteractions.onMutationWaterfallColorChange
2099
+ } : void 0,
2100
+ fusionLegendCounts,
2101
+ dataHolder.cnvData.filter((event) => event.dt == dtcnv).length
2102
+ );
2103
+ const rings = new Rings(
2104
+ labelsRing,
2105
+ chromosomesRing,
2106
+ this.nonExonicArcRing,
2107
+ this.snvArcRing,
2108
+ this.cnvArcRing,
2109
+ this.lohArcRing,
2110
+ this.mutationWaterfallRing
2111
+ );
2112
+ return new ViewModel(
2113
+ this.settings,
2114
+ rings,
2115
+ legend,
2116
+ fusions,
2117
+ dataHolder,
2118
+ this.genesetName,
2119
+ data.filter((i) => i.dt == dtsnvindel).length
2120
+ );
2121
+ }
2122
+ };
2123
+
2124
+ // plots/disco/viewmodel/ViewModelMapper.ts
2125
+ var ViewModelMapper = class _ViewModelMapper {
2126
+ static {
2127
+ this.snvClassLayer = {
2128
+ M: "exonic",
2129
+ E: "exonic",
2130
+ F: "exonic",
2131
+ N: "exonic",
2132
+ S: "exonic",
2133
+ D: "exonic",
2134
+ I: "exonic",
2135
+ P: "exonic",
2136
+ L: "exonic",
2137
+ Utr3: "exonic",
2138
+ Utr5: "exonic",
2139
+ ProteinAltering: "exonic",
2140
+ mnv: "non-exonic",
2141
+ ITD: "non-exonic",
2142
+ insertion: "non-exonic",
2143
+ deletion: "non-exonic",
2144
+ Intron: "non-exonic",
2145
+ X: "non-exonic",
2146
+ noncoding: "non-exonic"
2147
+ };
2148
+ }
2149
+ constructor(settings, discoInteractions) {
2150
+ this.settings = JSON.parse(JSON.stringify(settings));
2151
+ this.discoInteractions = discoInteractions;
2152
+ }
2153
+ applyRadius() {
2154
+ const radius = this.settings.Disco.radius;
2155
+ if (!radius) return;
2156
+ const scale = radius / this.settings.rings.labelLinesInnerRadius;
2157
+ this.settings.rings.labelLinesInnerRadius *= scale;
2158
+ this.settings.rings.labelsToLinesDistance *= scale;
2159
+ this.settings.rings.chromosomeInnerRadius *= scale;
2160
+ }
2161
+ static computeDynamicRadius(data) {
2162
+ let ringCount = 0;
2163
+ if (data.some((d) => d.dt == dtsnvindel)) ringCount++;
2164
+ if (data.some((d) => d.dt == dtcnv || d.dt == dtitd)) ringCount++;
2165
+ if (data.some((d) => d.dt == dtloh)) ringCount++;
2166
+ if (ringCount <= 1) return 200;
2167
+ if (ringCount == 2) return 250;
2168
+ return 300;
2169
+ }
2170
+ map(opts) {
2171
+ const chrSizes = opts.args.genome.majorchr;
2172
+ const chromosomesOverride = {};
2173
+ for (const chr of Object.keys(chrSizes)) {
2174
+ if (!this.settings.Disco.hiddenChromosomes.includes(chr)) {
2175
+ chromosomesOverride[chr] = chrSizes[chr];
2176
+ }
2177
+ }
2178
+ const sampleName = opts.args.sampleName;
2179
+ const genome = opts.args.genome;
2180
+ const prioritizedGenes = genome?.geneset?.[0] ? genome.geneset[0].lst : [];
2181
+ const genesetName = genome?.geneset?.[0] ? genome.geneset[0].name : "";
2182
+ const data = opts.args.data;
2183
+ if (this.settings.Disco.autoRadius) {
2184
+ this.settings.Disco.radius = _ViewModelMapper.computeDynamicRadius(data);
2185
+ }
2186
+ this.applyRadius();
2187
+ const reference = new Reference(this.settings, chrSizes, chromosomesOverride);
2188
+ const dataMapper = new DataMapper(this.settings, reference, sampleName, prioritizedGenes);
2189
+ return new ViewModelProvider(
2190
+ this.settings,
2191
+ dataMapper,
2192
+ reference,
2193
+ sampleName,
2194
+ genesetName,
2195
+ this.discoInteractions
2196
+ ).map(data);
2197
+ }
2198
+ };
2199
+
2200
+ // plots/disco/legend/LegendJSONMapper.ts
2201
+ var LegendJSONMapper = class {
2202
+ constructor(cappedCnvMaxAbsValue) {
2203
+ this.cappedCnvMaxAbsValue = cappedCnvMaxAbsValue;
2204
+ }
2205
+ map(legend) {
2206
+ const legendJSON = [];
2207
+ let order = 0;
2208
+ if (legend.snvClassMap) {
2209
+ this.mapSnv(legend, legendJSON, order++);
2210
+ }
2211
+ if (legend.cnvCount > 0 && legend.cnvRenderingType == "heatmap" /* heatmap */) {
2212
+ this.mapCnvHeatmap(legend, legendJSON, order++);
2213
+ } else if (legend.cnvCount > 0 && legend.cnvRenderingType == "bar" /* bar */) {
2214
+ if (legend.cnvClassMap) {
2215
+ this.mapCnvBar(legend, legendJSON, order++);
2216
+ }
2217
+ }
2218
+ if (legend.cnvClassMap.has(4 /* ITD */)) {
2219
+ this.mapItd(legend, legendJSON, order++);
2220
+ }
2221
+ if (legend.lohLegend) {
2222
+ this.mapLoh(legend, legendJSON, order++);
2223
+ }
2224
+ if (legend.fusionLegend) {
2225
+ this.mapFusion(legend, legendJSON, order++);
2226
+ }
2227
+ if (legend.mutationWaterfallLegend) {
2228
+ this.mapMutationWaterfall(legend, legendJSON, order++);
2229
+ }
2230
+ return legendJSON;
2231
+ }
2232
+ mapSnv(legend, legendJSON, order) {
2233
+ const snvItems = [];
2234
+ let snvOrder = 0;
2235
+ for (const [snvKey, snvLegendElement] of legend.snvClassMap) {
2236
+ snvItems.push({
2237
+ termid: legend.snvTitle,
2238
+ key: snvKey,
2239
+ text: `${snvLegendElement.snvType} (${snvLegendElement.count})`,
2240
+ color: snvLegendElement.color,
2241
+ order: snvOrder++
2242
+ });
2243
+ }
2244
+ legendJSON.push({
2245
+ name: legend.snvTitle,
2246
+ order,
2247
+ items: snvItems
2248
+ });
2249
+ }
2250
+ mapCnvBar(legend, legendJSON, order) {
2251
+ if (!legend.cnvClassMap) return;
2252
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2253
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2254
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2255
+ if (gain && loss && cap) {
2256
+ let cnvOrder = 0;
2257
+ const cnvItems = [];
2258
+ if (gain.value > 0) {
2259
+ cnvItems.push({
2260
+ termid: legend.cnvTitle,
2261
+ key: 1 /* Gain */,
2262
+ text: `Max: ${gain.value}`,
2263
+ color: gain.color,
2264
+ order: cnvOrder++
2265
+ });
2266
+ }
2267
+ if (loss.value < 0) {
2268
+ cnvItems.push({
2269
+ termid: legend.cnvTitle,
2270
+ key: 0 /* Loss */,
2271
+ text: `Min: ${loss.value}`,
2272
+ color: loss.color,
2273
+ order: cnvOrder++
2274
+ });
2275
+ }
2276
+ cnvItems.push({
2277
+ termid: legend.cnvTitle,
2278
+ key: 2 /* Cap */,
2279
+ text: `Capping: ${cap.value}`,
2280
+ color: cap.color,
2281
+ order: cnvOrder++
2282
+ // ,
2283
+ // onClickCallback: this.onClickCallback
2284
+ });
2285
+ legendJSON.push({
2286
+ name: legend.cnvTitle,
2287
+ id: "sjpp-disco-cnv-legend",
2288
+ order,
2289
+ items: cnvItems
2290
+ });
2291
+ }
2292
+ }
2293
+ mapCnvHeatmap(legend, legendJSON, order) {
2294
+ if (!legend.cnvClassMap) return;
2295
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2296
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2297
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2298
+ if (gain && loss && cap) {
2299
+ let cnvOrder = 0;
2300
+ const cnvItems = [];
2301
+ const base = {
2302
+ termid: legend.cnvTitle,
2303
+ width: 100,
2304
+ order: cnvOrder++,
2305
+ isLegendItem: true,
2306
+ dt: 4
2307
+ };
2308
+ if (gain.value > 0 && loss.value < 0) {
2309
+ const maxValue = Math.max(Math.abs(loss.value), gain.value);
2310
+ const domain = [-maxValue, 0, maxValue];
2311
+ cnvItems.push(
2312
+ Object.assign(
2313
+ {
2314
+ key: 3 /* LossGain */,
2315
+ domain,
2316
+ scale: linear([-1, 0, 1], [loss.color, "white", gain.color]),
2317
+ labels: { left: "Loss", right: "Gain" },
2318
+ numericInputs: {
2319
+ cutoffMode: legend.cnvCutoffMode,
2320
+ defaultPercentile: legend.cnvPercentile,
2321
+ callback: (obj) => legend.discoInteractions.colorScaleNumericInputsCallback(obj)
2322
+ }
2323
+ },
2324
+ base
2325
+ )
2326
+ );
2327
+ } else {
2328
+ if (gain.value > 0) {
2329
+ cnvItems.push(
2330
+ Object.assign(
2331
+ {
2332
+ key: 1 /* Gain */,
2333
+ text: "Copy number gain",
2334
+ domain: [0, gain.value],
2335
+ scale: linear([0, 1], ["white", gain.color])
2336
+ },
2337
+ base
2338
+ )
2339
+ );
2340
+ }
2341
+ if (loss.value < 0) {
2342
+ cnvItems.push(
2343
+ Object.assign(
2344
+ {
2345
+ key: 0 /* Loss */,
2346
+ text: "Copy number loss",
2347
+ domain: [loss.value, 0],
2348
+ scale: linear([0, 1], [loss.color, "white"])
2349
+ },
2350
+ base
2351
+ )
2352
+ );
2353
+ }
2354
+ }
2355
+ legendJSON.push({
2356
+ name: legend.cnvTitle,
2357
+ order,
2358
+ id: "sjpp-disco-cnv-legend",
2359
+ items: cnvItems
2360
+ });
2361
+ }
2362
+ }
2363
+ mapItd(legend, legendJSON, order) {
2364
+ const itd = legend.cnvClassMap.get(4 /* ITD */);
2365
+ if (!itd) return;
2366
+ legendJSON.push({
2367
+ name: "ITD",
2368
+ order,
2369
+ items: [
2370
+ {
2371
+ termid: "ITD",
2372
+ key: 4 /* ITD */,
2373
+ text: `ITD (${itd.value})`,
2374
+ color: itd.color,
2375
+ order: 0
2376
+ }
2377
+ ]
2378
+ });
2379
+ }
2380
+ mapLoh(legend, legendJSON, order) {
2381
+ if (!legend.lohLegend) return;
2382
+ legendJSON.push({
2383
+ name: legend.lohTitle,
2384
+ order,
2385
+ items: [
2386
+ {
2387
+ termid: legend.lohTitle,
2388
+ key: "count",
2389
+ text: `LOH (${legend.lohLegend.count})`,
2390
+ skipIcon: true,
2391
+ order: 0
2392
+ }
2393
+ ]
2394
+ });
2395
+ }
2396
+ mapFusion(legend, legendJSON, order) {
2397
+ const fusionItems = [];
2398
+ fusionItems.push({
2399
+ termid: legend.fusionTitle,
2400
+ key: "#6A3D9A" /* Interchromosomal */,
2401
+ text: `Interchromosomal (${legend.fusionLegendCounts.interchromosomal})`,
2402
+ color: "#6A3D9A" /* Interchromosomal */.valueOf(),
2403
+ order: 0
2404
+ });
2405
+ fusionItems.push({
2406
+ termid: legend.fusionTitle,
2407
+ key: "#1B9E77" /* Intrachromosomal */,
2408
+ text: `Intrachromosomal (${legend.fusionLegendCounts.intrachromosomal})`,
2409
+ color: "#1B9E77" /* Intrachromosomal */.valueOf(),
2410
+ order: 1
2411
+ });
2412
+ legendJSON.push({
2413
+ name: legend.fusionTitle,
2414
+ order,
2415
+ items: fusionItems
2416
+ });
2417
+ }
2418
+ mapMutationWaterfall(legend, legendJSON, order) {
2419
+ if (!legend.mutationWaterfallLegend) return;
2420
+ const waterfallItems = [];
2421
+ waterfallItems.push({
2422
+ termid: "Mutation Waterfall Plot",
2423
+ key: "mutation-waterfall-color",
2424
+ text: "Dot color",
2425
+ color: legend.mutationWaterfallLegend.color,
2426
+ order: 0,
2427
+ colorPicker: true,
2428
+ inputWidth: 28,
2429
+ width: 0,
2430
+ onColorChange: legend.mutationWaterfallLegend.onColorChange
2431
+ });
2432
+ waterfallItems.push({
2433
+ termid: "Mutation Waterfall Plot",
2434
+ key: "mutation-waterfall-axis",
2435
+ text: "Axis: log10 intermutation distance",
2436
+ order: 1,
2437
+ skipIcon: true,
2438
+ width: 0
2439
+ });
2440
+ legendJSON.push({
2441
+ name: "Mutation Waterfall Plot",
2442
+ order,
2443
+ items: waterfallItems
2444
+ });
2445
+ }
2446
+ };
2447
+
2448
+ // plots/disco/cnv/renderCnvSourceLegend.ts
2449
+ function parseSetLabel(set, index) {
2450
+ let text = set.name || `Set ${index + 1}`;
2451
+ let href;
2452
+ let target = "_blank";
2453
+ if (set.nameHtml) {
2454
+ const parser = new DOMParser();
2455
+ const doc = parser.parseFromString(set.nameHtml, "text/html");
2456
+ const anchor = doc.querySelector("a");
2457
+ if (anchor) {
2458
+ href = anchor.getAttribute("href") || void 0;
2459
+ target = anchor.getAttribute("target") || "_blank";
2460
+ text = anchor.textContent?.trim() || text;
2461
+ } else {
2462
+ text = doc.body.textContent?.trim() || text;
2463
+ }
2464
+ }
2465
+ return { text, href, target };
2466
+ }
2467
+ function renderCnvSourceLegend(legendG, datasets, fontSize, onChange) {
2468
+ if (!legendG || legendG.empty()) throw new Error("legendG is required");
2469
+ if (!datasets || datasets.length === 0) throw new Error("at least one dataset is required");
2470
+ legendG.select("g.sjpp-cnv-source").remove();
2471
+ const gBBox = legendG.node().getBBox();
2472
+ const cnvSrcWrapper = legendG.append("g").attr("class", "sjpp-cnv-source").attr("transform", `translate(${gBBox.width},${gBBox.y + fontSize})`);
2473
+ const btnPaddingX = Math.round(fontSize * 0.8);
2474
+ const btnHgt = Math.round(fontSize * 1.8);
2475
+ const btnWrapper = cnvSrcWrapper.append("g").attr("transform", `translate(${fontSize},${-btnHgt / 2})`).style("cursor", "pointer").on("click", function(event) {
2476
+ event.stopPropagation();
2477
+ showCnvMenu(this);
2478
+ });
2479
+ 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());
2480
+ const textW = btnText.node() ? Math.ceil(btnText.node().getBBox().width) : 0;
2481
+ const btnWdt = textW + btnPaddingX * 2;
2482
+ btnWrapper.insert("rect", ":first-child").attr("width", btnWdt).attr("height", btnHgt).attr("rx", 10).attr("ry", 10).style("fill", "#f2f2f2");
2483
+ btnText.attr("x", btnWdt / 2).attr("text-anchor", "middle");
2484
+ const cnvMenu = new Menu({
2485
+ onHide: () => {
2486
+ btnText.text("Select source \u25B2".toUpperCase());
2487
+ }
2488
+ });
2489
+ function showCnvMenu(dom) {
2490
+ btnText.text("Select source \u25BC".toUpperCase());
2491
+ cnvMenu.clear().showunder(dom);
2492
+ cnvMenu.d.append("div").text("Choose data source for CNV:").style("margin", "5px 5px 0 5px");
2493
+ const tableHolder = cnvMenu.d.append("div").style("padding", "5px");
2494
+ const { columns, rows } = buildTableData(datasets);
2495
+ const [, activeIndex] = getActiveDataset(datasets);
2496
+ renderTable({
2497
+ columns,
2498
+ rows,
2499
+ div: tableHolder,
2500
+ singleMode: true,
2501
+ maxWidth: "70vw",
2502
+ maxHeight: "60vh",
2503
+ selectedRows: [activeIndex],
2504
+ header: { allowSort: false },
2505
+ noButtonCallback: (rowIndex, node) => {
2506
+ const inputIndex = Number(node?.value);
2507
+ const selectedIndex = Number.isNaN(inputIndex) ? rowIndex : inputIndex;
2508
+ if (!Number.isNaN(selectedIndex)) onChange(selectedIndex);
2509
+ cnvMenu.hide();
2510
+ }
2511
+ });
2512
+ }
2513
+ }
2514
+ function getActiveDataset(datasets) {
2515
+ let currentIndex = datasets.findIndex((d) => d.inuse);
2516
+ if (currentIndex == -1) currentIndex = 0;
2517
+ return [datasets[currentIndex], currentIndex];
2518
+ }
2519
+ function buildTableData(datasets) {
2520
+ const attrKeys = [];
2521
+ for (const set of datasets) {
2522
+ if (!set.attrs) continue;
2523
+ for (const key of Object.keys(set.attrs)) {
2524
+ if (!attrKeys.includes(key)) attrKeys.push(key);
2525
+ }
2526
+ }
2527
+ const columns = [{ label: "Source" }];
2528
+ for (const key of attrKeys) columns.push({ label: key });
2529
+ const rows = datasets.map((set, index) => {
2530
+ const sourceInfo = parseSetLabel(set, index);
2531
+ const cells = [];
2532
+ if (set.nameHtml) cells.push({ html: set.nameHtml });
2533
+ else if (sourceInfo.href) cells.push({ value: sourceInfo.text, url: sourceInfo.href });
2534
+ else cells.push({ value: sourceInfo.text });
2535
+ for (const key of attrKeys) {
2536
+ const value = set.attrs?.[key];
2537
+ cells.push({ value: value ?? "" });
2538
+ }
2539
+ return cells;
2540
+ });
2541
+ return { columns, rows };
2542
+ }
2543
+
2544
+ // plots/disco/legend/LegendRenderer.ts
2545
+ var LegendRenderer = class {
2546
+ constructor(cappedCnvMaxAbsValue = 0, fontSize) {
2547
+ this.fontSize = fontSize;
2548
+ this.legendJSONMapper = new LegendJSONMapper(cappedCnvMaxAbsValue);
2549
+ }
2550
+ render(holder, legend, xOffset, svgw, svgh, viewModel, onCnvSourceSelect) {
2551
+ const svgLegendRenderer = svgLegend({
2552
+ holder: holder.append("g").attr("data-testid", "sjpp_disco_plot_legend"),
2553
+ rectFillFxn: (d2) => d2.color,
2554
+ iconStroke: "#aaa"
2555
+ });
2556
+ const data = this.legendJSONMapper.map(legend);
2557
+ const legendTitles = data.map((d2) => d2.name.trim());
2558
+ const maxLabelWidth = getMaxLabelWidth(holder, legendTitles);
2559
+ const d = {
2560
+ xOffset: maxLabelWidth + xOffset
2561
+ };
2562
+ svgLegendRenderer(data, {
2563
+ settings: Object.assign(
2564
+ {},
2565
+ {
2566
+ svgw,
2567
+ svgh,
2568
+ dimensions: d,
2569
+ fontsize: this.fontSize
2570
+ }
2571
+ )
2572
+ });
2573
+ const altCnv = viewModel.appState.args.alternativeDataByDt?.[dtcnv];
2574
+ if (altCnv && altCnv.length > 0) {
2575
+ const legendG = holder.select('g[data-testid="sjpp_disco_plot_legend"]');
2576
+ const cnvLegendG = legendG.select("#sjpp-disco-cnv-legend");
2577
+ if (!legendG.empty()) {
2578
+ const add2G = cnvLegendG.empty() ? legendG : cnvLegendG;
2579
+ renderCnvSourceLegend(add2G, altCnv, this.fontSize, onCnvSourceSelect);
2580
+ }
2581
+ }
2582
+ }
2583
+ };
2584
+
2585
+ // plots/disco/chromosome/ChromosomesRenderer.ts
2586
+ var ChromosomesRenderer = class {
2587
+ constructor(padAngle, innerRadius, outerRadius, fontSize) {
2588
+ this.padAngle = padAngle;
2589
+ this.innerRadius = innerRadius;
2590
+ this.outerRadius = outerRadius;
2591
+ this.fontSize = fontSize;
2592
+ }
2593
+ render(holder, elements) {
2594
+ const pie = pie_default().padAngle(this.padAngle).value((d) => d.size).sort(null);
2595
+ const arcData = pie(elements);
2596
+ const arc = arc_default().innerRadius(this.innerRadius).outerRadius(this.outerRadius);
2597
+ const arcs = holder.append("g").attr("data-testid", "sjpp_chromosomes_arc_group");
2598
+ const menu = MenuProvider.create();
2599
+ arcs.selectAll("path").data(arcData).enter().append("path").attr("d", arc).attr("fill", "black").on("mousemove", (event, d) => {
2600
+ const [x, y] = pointer_default(event, arcs.node());
2601
+ let angle = Math.atan2(y, x) + Math.PI / 2;
2602
+ if (angle < 0) angle += 2 * Math.PI;
2603
+ const frac = Math.max(0, Math.min(1, (angle - d.data.startAngle) / (d.data.endAngle - d.data.startAngle)));
2604
+ const pos = Math.round(frac * d.data.size);
2605
+ menu.d.html(`<span style="font-size:.8em">chr${d.data.text}</span> ${bplen(pos)}`).style("padding", "5px");
2606
+ menu.show(event.x, event.y);
2607
+ }).on("mouseenter", (event) => {
2608
+ select_default(event.currentTarget).attr("stroke", "orange").attr("stroke-width", 1);
2609
+ }).on("mouseleave", (event) => {
2610
+ select_default(event.currentTarget).attr("stroke", null).attr("stroke-width", null);
2611
+ menu.hide();
2612
+ });
2613
+ arcs.selectAll("text").data(arcData).enter().append("text").attr("transform", (d) => {
2614
+ return `translate(${arc.centroid(d)}) rotate(${d.data.angle * 180 / Math.PI - 90})${d.data.angle > Math.PI ? "rotate(180)" : ""}`;
2615
+ }).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");
2616
+ }
2617
+ };
2618
+
2619
+ // plots/disco/label/LabelsRenderer.ts
2620
+ var LabelsRenderer = class {
2621
+ constructor(animationDuration, fontSize, geneClickListener, genomeName, intervalEvents = [], geneLookup = async (gene, genome) => await dofetch3("genelookup", { body: { deep: 1, input: gene, genome } })) {
2622
+ this.geneCoordinatesCache = /* @__PURE__ */ new Map();
2623
+ this.hoverRequestId = 0;
2624
+ this.animationDuration = animationDuration;
2625
+ this.fontSize = fontSize;
2626
+ this.geneClickListener = geneClickListener;
2627
+ this.genomeName = genomeName;
2628
+ this.intervalEvents = intervalEvents;
2629
+ this.geneLookup = geneLookup;
2630
+ }
2631
+ render(holder, elements, collisions) {
2632
+ const labelsG = holder.append("g");
2633
+ const lineFunction = line_default().x((point) => point.x).y((point) => point.y);
2634
+ const menu = MenuProvider.create();
2635
+ labelsG.selectAll(".group").data(elements).enter().append("g").attr("class", "group").each((label, i, nodes) => {
2636
+ const g = select_default(nodes[i]);
2637
+ 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", () => {
2638
+ if (label.mutationsTooltip) {
2639
+ this.geneClickListener(
2640
+ label.text,
2641
+ label.mutationsTooltip.map((value) => value.mname)
2642
+ );
2643
+ }
2644
+ }).on("mouseover", async (mouseEvent) => {
2645
+ const requestId = ++this.hoverRequestId;
2646
+ this.renderTooltip(menu, label);
2647
+ menu.show(mouseEvent.x, mouseEvent.y);
2648
+ const coordinates = await this.getGeneCoordinates(label);
2649
+ if (requestId != this.hoverRequestId || !coordinates) return;
2650
+ const overlappingEvents = this.intervalEvents.filter(
2651
+ (event) => this.sameChromosome(event.chr, coordinates.chr) && coordinates.stop >= event.start && event.stop >= coordinates.start
2652
+ );
2653
+ this.renderTooltip(menu, label, overlappingEvents);
2654
+ }).on("mouseout", () => {
2655
+ this.hoverRequestId++;
2656
+ menu.clear();
2657
+ menu.hide();
2658
+ });
2659
+ g.append("path").attr("class", "chord-tick").datum(label.line.points).style("stroke", label.color).style("fill", "none").attr("d", lineFunction);
2660
+ });
2661
+ labelsG.selectAll(".group").each((label, i, nodes) => {
2662
+ const collision = collisions ? collisions.find((l) => l.text === label.text) : void 0;
2663
+ if (collision) {
2664
+ const g = select_default(nodes[i]);
2665
+ g.selectAll(".chord-text").datum(collision).transition().duration(this.animationDuration).attr("transform", collision.transform).style("text-anchor", collision.textAnchor);
2666
+ g.selectAll(".chord-tick").datum(collision.line.points).transition().duration(this.animationDuration).style("fill", "none").attr("d", lineFunction);
2667
+ }
2668
+ });
2669
+ }
2670
+ renderTooltip(menu, label, intervalEvents = label.cnvTooltip) {
2671
+ menu.clear();
2672
+ const table = table2col({ holder: menu.d });
2673
+ this.createTooltip(table, label, intervalEvents);
2674
+ }
2675
+ async getGeneCoordinates(label) {
2676
+ if (!this.genomeName || !this.intervalEvents.length) return;
2677
+ const cacheKey = `${this.genomeName}:${label.text}:${label.chr}`;
2678
+ let lookup = this.geneCoordinatesCache.get(cacheKey);
2679
+ if (!lookup) {
2680
+ lookup = this.lookupGeneCoordinates(label);
2681
+ this.geneCoordinatesCache.set(cacheKey, lookup);
2682
+ }
2683
+ return await lookup;
2684
+ }
2685
+ async lookupGeneCoordinates(label) {
2686
+ try {
2687
+ const response = await this.geneLookup(label.text, this.genomeName);
2688
+ if (response?.error || !Array.isArray(response?.gmlst)) return;
2689
+ const models = response.gmlst.filter(
2690
+ (model) => this.sameChromosome(model.chr, label.chr) && Number.isFinite(model.start) && Number.isFinite(model.stop)
2691
+ );
2692
+ if (!models.length) return;
2693
+ return {
2694
+ chr: models[0].chr,
2695
+ start: Math.min(...models.map((model) => model.start)),
2696
+ stop: Math.max(...models.map((model) => model.stop))
2697
+ };
2698
+ } catch {
2699
+ return;
2700
+ }
2701
+ }
2702
+ sameChromosome(a, b) {
2703
+ return a?.replace(/^chr/i, "").toLowerCase() == b?.replace(/^chr/i, "").toLowerCase();
2704
+ }
2705
+ createTooltip(table, label, intervalEvents = label.cnvTooltip) {
2706
+ if (label.mutationsTooltip) {
2707
+ const [td1, td2] = table.addRow();
2708
+ td1.text("Gene");
2709
+ td2.append("span").style("margin-left", "5px").text(label.text);
2710
+ label.mutationsTooltip.forEach((mutation) => {
2711
+ {
2712
+ const [td12, td22] = table.addRow();
2713
+ td12.text("Mutation");
2714
+ 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}`);
2715
+ if (hasAnyValidVafEntry(mutation.vafs)) {
2716
+ appendVafBars(td22, mutation.vafs);
2717
+ }
2718
+ }
2719
+ });
2720
+ }
2721
+ if (label.fusionTooltip) {
2722
+ const [td1, td2] = table.addRow();
2723
+ td1.text("Data type");
2724
+ td2.append("span").text("Fusion transcript");
2725
+ label.fusionTooltip.forEach((fusionTooltip) => {
2726
+ const [td12, td22] = table.addRow();
2727
+ td12.text("Position");
2728
+ td22.append("span").text(
2729
+ ` ${fusionTooltip.geneA ? fusionTooltip.geneA : "?"} ${fusionTooltip.chrA}:${fusionTooltip.posA}
2730
+ ${fusionTooltip.strandA == "+" ? "forward" : "reverse"} > ${fusionTooltip.geneB ? fusionTooltip.geneB : "?"} ${fusionTooltip.chrB}:${fusionTooltip.posB} ${fusionTooltip.strandB == "+" ? "forward" : "reverse"} `
2731
+ );
2732
+ });
2733
+ }
2734
+ if (intervalEvents) {
2735
+ intervalEvents.forEach((cnv) => {
2736
+ const [td1, td2] = table.addRow();
2737
+ td1.text(cnv.dt == dtitd ? "ITD" : cnv.dt == dtloh ? "LOH" : "CNV");
2738
+ td2.append("span").style("margin-left", "5px").style("background-color", cnv.color).html("&nbsp;&nbsp;");
2739
+ if (cnv.dt != dtitd && cnv.dt != dtloh) td2.append("span").style("margin-left", "7.5px").text(cnv.value);
2740
+ td2.append("span").style("margin-left", "7.5px").style("font-size", "0.8em").text(`${cnv.chr}:${cnv.start}-${cnv.stop}`);
2741
+ });
2742
+ }
2743
+ }
2744
+ };
2745
+
2746
+ // plots/disco/defaults.ts
2747
+ function discoDefaults(overrides = {}, app) {
2748
+ const hiddenChromosomes = [];
2749
+ if (app?.vocabApi?.termdbConfig?.queries?.singleSampleMutation?.discoPlot?.skipChrM) {
2750
+ hiddenChromosomes.push("chrM");
2751
+ }
2752
+ const defaults = {
2753
+ downloadImgName: "disco.plot",
2754
+ Disco: {
2755
+ centerText: null,
2756
+ cnvCapping: 5,
2757
+ isOpen: false,
2758
+ prioritizeGeneLabelsByGeneSets: false,
2759
+ showPrioritizeGeneLabelsByGeneSets: false,
2760
+ showGeneNames: true,
2761
+ mutationWaterfallPlot: false,
2762
+ mutationWaterfallColor: "#4d4d4d",
2763
+ minMutationFraction: 0,
2764
+ cnvRenderingType: "heatmap" /* heatmap */,
2765
+ cnvPercentile: 90,
2766
+ // 90th percentile for removing outliers
2767
+ cnvCutoffMode: "percentile",
2768
+ autoRadius: true,
2769
+ radius: 300,
2770
+ fusionOpacity: 1,
2771
+ hiddenChromosomes
2772
+ },
2773
+ rings: {
2774
+ nonExonicRingWidth: 20,
2775
+ snvRingWidth: 20,
2776
+ lohRingWidth: 20,
2777
+ cnvRingWidth: 30,
2778
+ mutationWaterfallRingWidth: 35,
2779
+ snvRingFilters: ["exonic"],
2780
+ chromosomeInnerRadius: 190,
2781
+ chromosomeWidth: 20,
2782
+ labelLinesInnerRadius: 210,
2783
+ labelsToLinesDistance: 30,
2784
+ labelsToLinesGap: 2,
2785
+ nonExonicRingEnabled: true,
2786
+ nonExonicFilterValues: ["non-exonic"]
2787
+ },
2788
+ verticalPadding: 0,
2789
+ horizontalPadding: 50,
2790
+ layerScaler: 1,
2791
+ padAngle: 2e-3,
2792
+ //0.01, //0.04,
2793
+ label: {
2794
+ fontSize: 12,
2795
+ maxDeltaAngle: 0.05,
2796
+ animationDuration: 1e3,
2797
+ overlapAngleFactor: 5
2798
+ // 5 is set by testing, because label height is not known before rendering
2799
+ },
2800
+ cnv: {
2801
+ capping: 5,
2802
+ percentile: 80,
2803
+ ampColor: "#D6683C",
2804
+ lossColor: "#67a9cf",
2805
+ cappedAmpColor: "#8B0000",
2806
+ cappedLossColor: "#00008B",
2807
+ unit: "Unit"
2808
+ },
2809
+ snv: {
2810
+ maxMutationCount: 1e4
2811
+ },
2812
+ legend: {
2813
+ snvTitle: "Mutations",
2814
+ cnvTitle: "CNV",
2815
+ lohTitle: "LOH",
2816
+ fusionTitle: "SV",
2817
+ // Structural Variants (color by co-location)
2818
+ lohLegendEnabled: true,
2819
+ fontSize: 12,
2820
+ rowHeight: 48
2821
+ },
2822
+ menu: {
2823
+ padding: 5
2824
+ }
2825
+ };
2826
+ if (overrides?.Disco?.radius != null && (overrides.Disco.radius > 1e3 || overrides.Disco.radius < 200)) {
2827
+ console.log(`${overrides?.Disco?.radius} is greater or lower than the min and max for the radius`);
2828
+ }
2829
+ return copyMerge(defaults, overrides);
2830
+ }
2831
+
2832
+ // plots/disco/snv/NonExonicSnvRenderer.ts
2833
+ var NonExonicSnvRenderer = class {
2834
+ constructor(geneClickListener) {
2835
+ this.geneClickListener = geneClickListener;
2836
+ }
2837
+ render(holder, elements) {
2838
+ const arcGenerator = arc_default();
2839
+ const arcs = holder.append("g");
2840
+ const menu = MenuProvider.create();
2841
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2842
+ const table = table2col({ holder: menu.d });
2843
+ const snv = structuredClone(arc);
2844
+ snv.dt = dtsnvindel;
2845
+ snv.class = arc.dataClass;
2846
+ snv.gene = snv.text;
2847
+ {
2848
+ const [td1, td2] = table.addRow();
2849
+ td1.text("Consequence");
2850
+ td2.append("span").text(snv.mname);
2851
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2852
+ }
2853
+ {
2854
+ const [td1, td2] = table.addRow();
2855
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2856
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2857
+ }
2858
+ if (snv.gene) {
2859
+ const [td1, td2] = table.addRow();
2860
+ td1.text("Gene");
2861
+ td2.text(snv.gene);
2862
+ }
2863
+ if (snv.occurrence > 1) {
2864
+ const [td1, td2] = table.addRow();
2865
+ td1.text("Occurrence");
2866
+ td2.text(snv.occurrence);
2867
+ }
2868
+ if (hasAnyValidVafEntry(arc.vafs)) {
2869
+ const [td1, td2] = table.addRow();
2870
+ td1.text("Read count");
2871
+ appendVafBars(td2, arc.vafs);
2872
+ }
2873
+ menu.show(mouseEvent.x, mouseEvent.y);
2874
+ }).on("mouseout", () => {
2875
+ menu.clear();
2876
+ menu.hide();
2877
+ }).on("click", (mouseEvent, arc) => {
2878
+ this.geneClickListener(arc.text, [arc.mname]);
2879
+ });
2880
+ }
2881
+ };
2882
+
2883
+ // plots/disco/snv/SnvRenderer.ts
2884
+ var SnvRenderer = class {
2885
+ constructor(svnWidth, geneClickListener) {
2886
+ this.svnWidth = svnWidth;
2887
+ this.geneClickListener = geneClickListener;
2888
+ }
2889
+ render(holder, elements) {
2890
+ if (elements.length > 0) {
2891
+ const svnInnerRadius = elements[0].innerRadius;
2892
+ const fullArcRenderer = new FullArcRenderer(svnInnerRadius, this.svnWidth, "#6464641A");
2893
+ fullArcRenderer.render(holder);
2894
+ }
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/loh/LohRenderer.ts
2941
+ var LohRenderer = class {
2942
+ render(holder, elements) {
2943
+ const arcGenerator = arc_default();
2944
+ const arcs = holder.append("g");
2945
+ const menu = MenuProvider.create();
2946
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2947
+ const table = table2col({ holder: menu.d });
2948
+ const loh = structuredClone(arc);
2949
+ loh.dt = dtloh;
2950
+ loh.gene = loh.text;
2951
+ {
2952
+ const [td12, td22] = table.addRow();
2953
+ td12.text("Data type");
2954
+ td22.append("span").style("margin-left", "5px").text("Loss of Heterozygosity");
2955
+ }
2956
+ const [td1, td2] = table.addRow();
2957
+ td1.text("Position");
2958
+ td2.append("span").text(`${arc.chr}:${arc.start}-${arc.stop}`);
2959
+ menu.show(mouseEvent.x, mouseEvent.y);
2960
+ }).on("mouseout", () => {
2961
+ menu.clear();
2962
+ menu.hide();
2963
+ });
2964
+ }
2965
+ };
2966
+
2967
+ // plots/disco/cnv/CnvBarRenderer.ts
2968
+ var CnvBarRenderer = class {
2969
+ render(holder, elements) {
2970
+ const arcGenerator = arc_default();
2971
+ const arcs = holder.append("g");
2972
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
2973
+ const menu = MenuProvider.create();
2974
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2975
+ hoverOverlay.selectAll("*").remove();
2976
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
2977
+ const cnv = structuredClone(arc);
2978
+ cnv.dt = arc.dt;
2979
+ cnv.samples = [{ sample_id: arc.sampleName }];
2980
+ cnv.gene = cnv.text;
2981
+ const table = table2col({ holder: menu.d });
2982
+ if (arc.dt == dtcnv) {
2983
+ const [c1, c2] = table.addRow();
2984
+ c1.text("CNV");
2985
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span> ${cnv.value}`);
2986
+ }
2987
+ if (arc.dt == dtitd) {
2988
+ const [c1, c2] = table.addRow();
2989
+ c1.text("ITD");
2990
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span>`);
2991
+ }
2992
+ {
2993
+ const [c1, c2] = table.addRow();
2994
+ c1.text("Position");
2995
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
2996
+ }
2997
+ if (arc.dt == dtcnv) {
2998
+ const [c1, c2] = table.addRow();
2999
+ c1.text("Unit");
3000
+ c2.text(cnv.value);
3001
+ }
3002
+ menu.show(mouseEvent.x, mouseEvent.y);
3003
+ }).on("mouseout", () => {
3004
+ hoverOverlay.selectAll("*").remove();
3005
+ menu.clear();
3006
+ menu.hide();
3007
+ });
3008
+ }
3009
+ };
3010
+
3011
+ // plots/disco/cnv/CnvHeatmapRenderer.ts
3012
+ var CnvHeatmapRenderer = class {
3013
+ constructor(positivePercentile = 0, negativePercentile = 0) {
3014
+ this.positivePercentile = positivePercentile;
3015
+ this.negativePercentile = negativePercentile;
3016
+ }
3017
+ render(holder, elements) {
3018
+ const arcGenerator = arc_default();
3019
+ const arcs = holder.append("g");
3020
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
3021
+ const menu = MenuProvider.create();
3022
+ 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) => {
3023
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
3024
+ const table = table2col({ holder: menu.d });
3025
+ const cnv = structuredClone(arc);
3026
+ cnv.dt = arc.dt;
3027
+ cnv.samples = [{ sample_id: arc.sampleName }];
3028
+ cnv.gene = cnv.text;
3029
+ if (arc.dt == dtcnv) {
3030
+ const [c1, c2] = table.addRow();
3031
+ c1.text("CNV");
3032
+ c2.html(
3033
+ `<span style="background:${this.getColor(
3034
+ cnv.color,
3035
+ cnv.value,
3036
+ cnv.dt
3037
+ )}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span> ${cnv.value}`
3038
+ );
3039
+ }
3040
+ if (arc.dt == dtitd) {
3041
+ const [c1, c2] = table.addRow();
3042
+ c1.text("ITD");
3043
+ c2.html(`<span style="background:${cnv.color}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span>`);
3044
+ }
3045
+ {
3046
+ const [c1, c2] = table.addRow();
3047
+ c1.text("Position");
3048
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
3049
+ }
3050
+ menu.show(mouseEvent.x, mouseEvent.y);
3051
+ }).on("mouseleave", () => {
3052
+ hoverOverlay.selectAll("*").remove();
3053
+ menu.clear();
3054
+ menu.hide();
3055
+ });
3056
+ }
3057
+ // Computes fill color using linear scale between -P80, 0, and +P80
3058
+ getColor(color, value, dt = dtcnv) {
3059
+ if (dt == dtitd) return color;
3060
+ const maxValue = Math.max(this.positivePercentile, Math.abs(this.negativePercentile));
3061
+ return linear(
3062
+ [-maxValue, 0, maxValue],
3063
+ [color, "white", color]
3064
+ // transitions to white in the middle
3065
+ ).clamp(true)(value);
3066
+ }
3067
+ };
3068
+
3069
+ // plots/disco/waterfall/MutationWaterfallRenderer.ts
3070
+ var MutationWaterfallRenderer = class {
3071
+ constructor(dotRadius = 1.5) {
3072
+ this.dotRadius = dotRadius;
3073
+ }
3074
+ render(holder, elements) {
3075
+ if (!elements.length) return;
3076
+ const ringGroup = holder.append("g").attr("data-testid", "sjpp_mutation_waterfall_ring");
3077
+ const menu = MenuProvider.create();
3078
+ 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) => {
3079
+ const distance = Math.round(Math.pow(10, d.logDistance));
3080
+ menu.clear();
3081
+ const table = table2col({ holder: menu.d });
3082
+ {
3083
+ const [td1, td2] = table.addRow();
3084
+ td1.text("Intermutation distance");
3085
+ td2.text(`${bplen(distance)}`);
3086
+ }
3087
+ menu.show(event.x, event.y);
3088
+ }).on("mouseout", () => {
3089
+ menu.clear();
3090
+ menu.hide();
3091
+ });
3092
+ this.renderAxis(ringGroup, elements[0]);
3093
+ }
3094
+ renderAxis(holder, referencePoint) {
3095
+ const { ringInnerRadius, ringWidth, rangeMin, rangeMax } = referencePoint;
3096
+ const axisGroup = holder.append("g").attr("class", "sjpp-waterfall-axis");
3097
+ const topRadius = ringInnerRadius + ringWidth;
3098
+ axisGroup.append("line").attr("x1", 0).attr("y1", -topRadius).attr("x2", 0).attr("y2", -ringInnerRadius).attr("stroke", "#6e6e6e").attr("stroke-width", 1);
3099
+ const span = rangeMax - rangeMin || 1;
3100
+ const tickValues = rangeMax === rangeMin ? [rangeMin] : ticks(rangeMin, rangeMax, 4);
3101
+ tickValues.forEach((value) => {
3102
+ const ratio = (value - rangeMin) / span;
3103
+ const radius = ringInnerRadius + ringWidth * ratio;
3104
+ const y = -radius;
3105
+ axisGroup.append("line").attr("x1", -4).attr("x2", 4).attr("y1", y).attr("y2", y).attr("stroke", "#6e6e6e");
3106
+ const exponent = Math.round(value * 10) / 10;
3107
+ const formatted = Number.isInteger(exponent) ? `${exponent}` : exponent.toFixed(1);
3108
+ axisGroup.append("text").attr("x", 6).attr("y", y + 3).style("font-size", "10px").style("fill", "#4d4d4d").text(`10^${formatted} bp`);
3109
+ });
3110
+ }
3111
+ };
3112
+
3113
+ // plots/disco/Disco.ts
3114
+ var Disco = class _Disco extends PlotBase {
3115
+ constructor(opts, api) {
3116
+ super(opts, api);
3117
+ this.recreateViewModel = false;
3118
+ this.onCnvSourceSelect = (index) => {
3119
+ const state = this.app.getState();
3120
+ const args = state.args;
3121
+ const alt = args.alternativeDataByDt?.[dtcnv];
3122
+ if (!alt) return;
3123
+ const altClone = structuredClone(args.alternativeDataByDt);
3124
+ altClone[dtcnv].forEach((d, i) => d.inuse = i === index);
3125
+ const selected = altClone[dtcnv][index];
3126
+ selected.mlst.forEach((d) => d.position = d.pos);
3127
+ const baseData = args.data.filter((d) => d.dt != dtcnv && d.dt != dtloh);
3128
+ const newData = baseData.concat(selected.mlst);
3129
+ this.app.dispatch({
3130
+ type: "app_refresh",
3131
+ state: { args: { ...args, data: newData, alternativeDataByDt: altClone } }
3132
+ });
3133
+ };
3134
+ this.type = _Disco.type;
3135
+ this.dom.errdiv = opts.holder.append("div").attr("class", "sja_errorbar").style("display", "none");
3136
+ this.isOpen = false;
3137
+ this.discoInteractions = new DiscoInteractions(this);
3138
+ }
3139
+ static {
3140
+ this.type = "Disco";
3141
+ }
3142
+ async init() {
3143
+ const state = this.app.getState();
3144
+ const settings = state.plots.find((p) => p.id === this.id).settings;
3145
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3146
+ this.viewModel = this.stateViewModelMapper.map(state);
3147
+ const holder = this.opts.holder;
3148
+ const controlsHolder = holder.append("div").style("display", "inline-block").style("vertical-align", "top");
3149
+ const mainDiv = holder.append("div").style("display", "inline-block");
3150
+ const topbar = controlsHolder.append("div");
3151
+ const config_div = controlsHolder.append("div");
3152
+ const configInputsOptions = this.getConfigInputsOptions(this.viewModel);
3153
+ this.features = await multiInit({
3154
+ topbar: topBarInit({
3155
+ app: this.app,
3156
+ id: this.id,
3157
+ // TODO change the way svg is selected
3158
+ downloadHandler: () => this.discoInteractions.downloadClickListener(holder.select('svg[id="sjpp_disco_plot"]').node()),
3159
+ callback: () => this.toggleVisibility(this.isOpen),
3160
+ isOpen: () => this.isOpen,
3161
+ holder: topbar
3162
+ }),
3163
+ config: configUiInit({
3164
+ app: this.app,
3165
+ id: this.id,
3166
+ holder: config_div,
3167
+ isOpen: () => this.isOpen,
3168
+ inputs: configInputsOptions
3169
+ })
3170
+ });
3171
+ this.errorDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-errorDiv");
3172
+ this.svgDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-svgDiv");
3173
+ }
3174
+ getConfigInputsOptions(viewModel) {
3175
+ const configInputsOptions = [];
3176
+ if (viewModel.settings.Disco.showPrioritizeGeneLabelsByGeneSets) {
3177
+ const filterMutationsGenesCheckbox = [
3178
+ {
3179
+ boxLabel: viewModel.genesetName,
3180
+ label: `Filter mutations`,
3181
+ type: "checkbox",
3182
+ chartType: "Disco",
3183
+ settingsKey: "prioritizeGeneLabelsByGeneSets",
3184
+ title: `Only show mutations for ${viewModel.genesetName} genes`
3185
+ }
3186
+ ];
3187
+ configInputsOptions.push(...filterMutationsGenesCheckbox);
3188
+ }
3189
+ if (viewModel.cnvMaxValue !== 0 || viewModel.cnvMinValue !== 0) {
3190
+ const cnvConfigInputOptions = [
3191
+ {
3192
+ boxLabel: "",
3193
+ label: "CNV rendering type",
3194
+ type: "radio",
3195
+ chartType: "Disco",
3196
+ settingsKey: "cnvRenderingType",
3197
+ title: "CNV rendering type",
3198
+ options: [
3199
+ { label: "Heatmap", value: "heatmap" /* heatmap */ },
3200
+ { label: "Bar", value: "bar" /* bar */ }
3201
+ ]
3202
+ }
3203
+ ];
3204
+ configInputsOptions.push(...cnvConfigInputOptions);
3205
+ }
3206
+ if (viewModel.hasMutationFractionData) {
3207
+ configInputsOptions.push({
3208
+ boxLabel: "",
3209
+ label: "Minimum mutation fraction",
3210
+ type: "number",
3211
+ chartType: "Disco",
3212
+ settingsKey: "minMutationFraction",
3213
+ title: "Only show SNV/indel mutations with at least one DNA/RNA mutation fraction at or above this value.",
3214
+ step: 0.01,
3215
+ min: 0,
3216
+ max: 1,
3217
+ debounceInterval: 500
3218
+ });
3219
+ }
3220
+ configInputsOptions.push({
3221
+ boxLabel: "",
3222
+ label: "Show gene names",
3223
+ type: "checkbox",
3224
+ chartType: "Disco",
3225
+ settingsKey: "showGeneNames",
3226
+ title: "Show gene name labels on the outside of the plot"
3227
+ });
3228
+ const genomeChr = this.app.opts.state.args.genome.majorchr;
3229
+ const chromosomeConfigOption = {
3230
+ label: "Chromosomes",
3231
+ title: "Chromosomes shown in the plot",
3232
+ type: "multiCheckbox",
3233
+ chartType: "Disco",
3234
+ settingsKey: "hiddenChromosomes",
3235
+ style: {
3236
+ colNum: 4
3237
+ },
3238
+ options: Object.keys(genomeChr).map((c) => ({ label: c, value: c })),
3239
+ processInput: (values = []) => {
3240
+ const reverse = Object.keys(genomeChr).filter((c) => !values.includes(c));
3241
+ return reverse;
3242
+ }
3243
+ };
3244
+ configInputsOptions.push(chromosomeConfigOption);
3245
+ configInputsOptions.push({
3246
+ boxLabel: "",
3247
+ label: "Auto radius",
3248
+ type: "checkbox",
3249
+ chartType: "Disco",
3250
+ settingsKey: "autoRadius",
3251
+ title: "Automatically set the radius based on the number of data rings"
3252
+ });
3253
+ const dimensionOptions = [
3254
+ {
3255
+ label: "Radius",
3256
+ title: "Set the radius of the entire plot, between 200 and 1000 pixels.",
3257
+ type: "number",
3258
+ chartType: "Disco",
3259
+ settingsKey: "radius",
3260
+ debounceInterval: 500,
3261
+ step: 25,
3262
+ min: 200,
3263
+ max: 1e3,
3264
+ getDisplayStyle: (plot) => plot.settings.Disco.autoRadius ? "none" : "table-row"
3265
+ },
3266
+ {
3267
+ label: "Fusion opacity",
3268
+ title: "Adjust opacity of fusion arcs, between 0 and 1",
3269
+ type: "number",
3270
+ chartType: "Disco",
3271
+ settingsKey: "fusionOpacity",
3272
+ step: 0.01,
3273
+ min: 0,
3274
+ max: 1,
3275
+ debounceInterval: 500
3276
+ }
3277
+ ];
3278
+ configInputsOptions.push(...dimensionOptions);
3279
+ if (viewModel.canShowMutationWaterfallPlot && viewModel.snvDataLength > 0) {
3280
+ configInputsOptions.push({
3281
+ boxLabel: "",
3282
+ label: "Mutation Waterfall Plot",
3283
+ type: "checkbox",
3284
+ chartType: "Disco",
3285
+ settingsKey: "mutationWaterfallPlot",
3286
+ title: "Render log10 intermutation distance ring for SNV/indel data"
3287
+ });
3288
+ }
3289
+ return configInputsOptions;
3290
+ }
3291
+ async main() {
3292
+ const settings = this.state.settings;
3293
+ this.isOpen = settings.Disco.isOpen;
3294
+ if (this.recreateViewModel) {
3295
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3296
+ this.viewModel = this.stateViewModelMapper.map(this.app.getState());
3297
+ }
3298
+ this.recreateViewModel = true;
3299
+ if (this.viewModel) {
3300
+ this.svgDiv.selectAll("*").remove();
3301
+ const appState = this.app.getState();
3302
+ this.viewModel.svgDiv = this.svgDiv;
3303
+ this.viewModel.appState = appState;
3304
+ for (const name in this.features) {
3305
+ this.features[name].update({ state: this.state, appState });
3306
+ }
3307
+ const legendRenderer = new LegendRenderer(this.viewModel.cappedCnvMaxAbsValue, settings.label.fontSize);
3308
+ const discoRenderer = new DiscoRenderer(
3309
+ this.getRingRenderers(this.viewModel.settings, this.viewModel, this.discoInteractions.geneClickListener),
3310
+ legendRenderer,
3311
+ this.app.opts.state.args.genome
3312
+ );
3313
+ discoRenderer.render(this.svgDiv, this.viewModel, this.onCnvSourceSelect);
3314
+ if (this.viewModel.invalidDataInfo?.entries?.length) {
3315
+ InvalidDataUI.render(this.errorDiv, this.viewModel.invalidDataInfo);
3316
+ }
3317
+ }
3318
+ }
3319
+ getState(appState) {
3320
+ const config = appState.plots.find((p) => p.id === this.id);
3321
+ if (!config) return config;
3322
+ return { ...config, mlst: appState.args.data };
3323
+ }
3324
+ getRingRenderers(settings, viewModel, geneClickListener) {
3325
+ const chromosomesRenderer = new ChromosomesRenderer(
3326
+ settings.padAngle,
3327
+ settings.rings.chromosomeInnerRadius,
3328
+ settings.rings.chromosomeInnerRadius + settings.rings.chromosomeWidth,
3329
+ settings.label.fontSize
3330
+ );
3331
+ const labelsRenderer = new LabelsRenderer(
3332
+ settings.label.animationDuration,
3333
+ settings.label.fontSize,
3334
+ geneClickListener,
3335
+ this.app.opts.state.args.genome.name,
3336
+ [
3337
+ ...viewModel.rings.cnvArcRing?.elements || [],
3338
+ ...(viewModel.rings.lohArcRing?.elements || []).map((event) => ({ ...event, dt: dtloh }))
3339
+ ]
3340
+ );
3341
+ const nonExonicSnvRenderer = new NonExonicSnvRenderer(geneClickListener);
3342
+ const snvRenderer = new SnvRenderer(settings.rings.snvRingWidth, geneClickListener);
3343
+ const cnvRenderer = settings.Disco.cnvRenderingType === "heatmap" /* heatmap */ ? new CnvHeatmapRenderer(viewModel.positivePercentile, viewModel.negativePercentile) : new CnvBarRenderer();
3344
+ const lohRenderer = new LohRenderer();
3345
+ const mutationWaterfallRenderer = new MutationWaterfallRenderer();
3346
+ const renderersMap = /* @__PURE__ */ new Map();
3347
+ renderersMap.set(0 /* CHROMOSOME */, chromosomesRenderer);
3348
+ renderersMap.set(1 /* LABEL */, labelsRenderer);
3349
+ renderersMap.set(2 /* NONEXONICSNV */, nonExonicSnvRenderer);
3350
+ renderersMap.set(3 /* SNV */, snvRenderer);
3351
+ renderersMap.set(4 /* MUTATION_WATERFALL */, mutationWaterfallRenderer);
3352
+ renderersMap.set(5 /* CNV */, cnvRenderer);
3353
+ renderersMap.set(6 /* LOH */, lohRenderer);
3354
+ return renderersMap;
3355
+ }
3356
+ toggleVisibility(isOpen) {
3357
+ this.app.dispatch({
3358
+ type: "plot_edit",
3359
+ id: this.opts.id,
3360
+ config: {
3361
+ settings: {
3362
+ Disco: { isOpen: !isOpen }
3363
+ }
3364
+ }
3365
+ });
3366
+ }
3367
+ };
3368
+ var discoInit = getCompInit(Disco);
3369
+ var componentInit = discoInit;
3370
+ async function getPlotConfig(opts, app) {
3371
+ return {
3372
+ chartType: "Disco",
3373
+ subfolder: "disco",
3374
+ extension: "ts",
3375
+ settings: discoDefaults(opts.overrides, app)
3376
+ };
3377
+ }
3378
+ export {
3379
+ componentInit,
3380
+ Disco as default,
3381
+ discoInit,
3382
+ getPlotConfig
3383
+ };
3384
+ //# sourceMappingURL=Disco-IDOTCKSD.js.map