@sjcrh/proteinpaint-client 2.191.4 → 2.192.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 (957) hide show
  1. package/dist/2dmaf-BNMEUJVM.js +1373 -0
  2. package/dist/AIProjectAdmin-AEXQY5LY.js +958 -0
  3. package/dist/AIProjectAdmin-AEXQY5LY.js.map +7 -0
  4. package/dist/AppHeader-RXDJBHXZ.js +835 -0
  5. package/dist/BoxPlot-HDP3SIGU.js +1217 -0
  6. package/dist/BoxPlot-HDP3SIGU.js.map +7 -0
  7. package/dist/CorrelationVolcano-V2E566XL.js +619 -0
  8. package/dist/DE-7YUZSW4E.js +95 -0
  9. package/dist/DEinput-P2HOQC4Z.js +301 -0
  10. package/dist/DifferentialAnalysis-2Z6BHS7A.js +245 -0
  11. package/dist/Disco-ZLC54X7T.js +3297 -0
  12. package/dist/Disco-ZLC54X7T.js.map +7 -0
  13. package/dist/Disco.UI-LXJJYQVV.js +249 -0
  14. package/dist/Disco.UI-LXJJYQVV.js.map +7 -0
  15. package/dist/DmrPlot-OEJRGNI3.js +642 -0
  16. package/dist/GB-2GHDD3MW.js +1130 -0
  17. package/dist/GeneExpInput-PWLPDLYT.js +367 -0
  18. package/dist/GeneExpInput-PWLPDLYT.js.map +7 -0
  19. package/dist/HicApp-CAYC4DPO.js +2250 -0
  20. package/dist/NumBinaryEditor-EUOYSGPM.js +271 -0
  21. package/dist/NumBinaryEditor.unit.spec-5B3W4B4F.js +286 -0
  22. package/dist/NumContEditor-7KK6CIB3.js +109 -0
  23. package/dist/NumContEditor.unit.spec-IMKGVYFZ.js +169 -0
  24. package/dist/NumCustomBinEditor-PDAF6I7B.js +38 -0
  25. package/dist/NumCustomBinEditor.unit.spec-IU3DPECJ.js +284 -0
  26. package/dist/NumDiscreteEditor-YTKUHG6Z.js +179 -0
  27. package/dist/NumDiscreteEditor.unit.spec-FUBS7Z7Z.js +202 -0
  28. package/dist/NumRegularBinEditor-LU3KLBLY.js +38 -0
  29. package/dist/NumRegularBinEditor.unit.spec-2BKOHI7L.js +227 -0
  30. package/dist/NumSplineEditor-56RJ2HT2.js +198 -0
  31. package/dist/NumSplineEditor.unit.spec-PW6VUUBZ.js +199 -0
  32. package/dist/NumericDensity-EB4H54EF.js +38 -0
  33. package/dist/NumericDensity.unit.spec-LSEM4OEY.js +221 -0
  34. package/dist/NumericHandler-VGPDXP35.js +39 -0
  35. package/dist/NumericHandler.unit.spec-NR3F7XHV.js +219 -0
  36. package/dist/ProteomeInput-AUXWUIWK.js +396 -0
  37. package/dist/RunChart2-SQ6TFOHD.js +758 -0
  38. package/dist/SC-OWJ6LYIW.js +1124 -0
  39. package/dist/SC-OWJ6LYIW.js.map +7 -0
  40. package/dist/Volcano-XHDH6UN7.js +1379 -0
  41. package/dist/WSIViewer-WT2QV747.js +48562 -0
  42. package/dist/WSIViewer-WT2QV747.js.map +7 -0
  43. package/dist/WsiSamplesPlot-YUOAWG2A.js +165 -0
  44. package/dist/adSandbox-VMMAL22L.js +38 -0
  45. package/dist/animatedBubbleChart-Q6Z5W2UL.js +555 -0
  46. package/dist/animatedBubbleChart-Q6Z5W2UL.js.map +7 -0
  47. package/dist/app-FX3KZ67X.js +37 -0
  48. package/dist/app-X7ZYEOZN.js +49 -0
  49. package/dist/app.js +20 -20
  50. package/dist/bam-ZYLH4U5R.js +860 -0
  51. package/dist/barchart-MXSPTKV4.js +47 -0
  52. package/dist/barchart.data-ZWF6EVJH.js +22 -0
  53. package/dist/barchart.events-XON2ANOC.js +47 -0
  54. package/dist/barchart.integration.spec-PJIENJGT.js +1980 -0
  55. package/dist/barchart2-HIKBGSSE.js +314 -0
  56. package/dist/barchart2-HIKBGSSE.js.map +7 -0
  57. package/dist/bars.renderer-57KSYAAT.js +12 -0
  58. package/dist/block-EGPYVWNP.js +6226 -0
  59. package/dist/block-EGPYVWNP.js.map +7 -0
  60. package/dist/block.init-IJBRPZNM.js +38 -0
  61. package/dist/block.mds.expressionrank-3DANCP7E.js +359 -0
  62. package/dist/block.mds.geneboxplot-CRGSCZMG.js +828 -0
  63. package/dist/block.mds.junction-4UIH2ZYN.js +1545 -0
  64. package/dist/block.mds.svcnv-NF4UIRR2.js +6801 -0
  65. package/dist/block.svg-AIZ47JCQ.js +164 -0
  66. package/dist/block.tk.aicheck-7HZFGE63.js +283 -0
  67. package/dist/block.tk.ase-U3VNPZEA.js +365 -0
  68. package/dist/block.tk.bam-4TQ7P2OX.js +1906 -0
  69. package/dist/block.tk.bedgraphdot-MYHKKO6K.js +384 -0
  70. package/dist/block.tk.bigwig.ui-E3YVGIDN.js +212 -0
  71. package/dist/block.tk.hicstraw-Y4XOMG7T.js +823 -0
  72. package/dist/block.tk.junction-T5C7LK6F.js +2364 -0
  73. package/dist/block.tk.junction.textmatrixui-Z3ACCVXH.js +199 -0
  74. package/dist/block.tk.ld-Y5KDA5AU.js +99 -0
  75. package/dist/block.tk.menu-EWRRISDY.js +1029 -0
  76. package/dist/block.tk.pgv-3JYGOZVQ.js +944 -0
  77. package/dist/brainImaging-P3AF3C5N.js +423 -0
  78. package/dist/brainRegions-YA2H2QOI.js +221 -0
  79. package/dist/brainRegions-YA2H2QOI.js.map +7 -0
  80. package/dist/chunk-2JR7RPB6.js +1825 -0
  81. package/dist/chunk-2U2CP2Y2.js +317 -0
  82. package/dist/chunk-2U2CP2Y2.js.map +7 -0
  83. package/dist/chunk-3BBK6A4X.js +176 -0
  84. package/dist/chunk-3BBK6A4X.js.map +7 -0
  85. package/dist/chunk-3FVIDQOX.js +54 -0
  86. package/dist/chunk-3K2O2NIH.js +446 -0
  87. package/dist/chunk-3RSJU6YM.js +2681 -0
  88. package/dist/chunk-3ZKD6C5S.js +34 -0
  89. package/dist/chunk-46AEH34Z.js +95 -0
  90. package/dist/chunk-4CQVC6XL.js +182 -0
  91. package/dist/chunk-5FXNI724.js +216 -0
  92. package/dist/chunk-634MOGE3.js +314 -0
  93. package/dist/chunk-634MOGE3.js.map +7 -0
  94. package/dist/chunk-6JHIX4RA.js +4269 -0
  95. package/dist/chunk-6JHIX4RA.js.map +7 -0
  96. package/dist/chunk-7PFRBGMN.js +129 -0
  97. package/dist/chunk-7R63MAPC.js +448 -0
  98. package/dist/chunk-7R63MAPC.js.map +7 -0
  99. package/dist/chunk-A4Z3CI24.js +276 -0
  100. package/dist/chunk-AI2LUQS6.js +119 -0
  101. package/dist/chunk-AJYJW4LX.js +6364 -0
  102. package/dist/chunk-BKPDYW5T.js +177 -0
  103. package/dist/chunk-BMS32SNA.js +37 -0
  104. package/dist/chunk-C4BCMAIK.js +188 -0
  105. package/dist/chunk-C4BCMAIK.js.map +7 -0
  106. package/dist/chunk-CJPGYPI3.js +291 -0
  107. package/dist/chunk-CTQH7LQ6.js +31 -0
  108. package/dist/chunk-D5CVYITI.js +203 -0
  109. package/dist/chunk-DMSX5PSO.js +477 -0
  110. package/dist/chunk-E3JRW3T3.js +1102 -0
  111. package/dist/chunk-E574SMCX.js +283 -0
  112. package/dist/chunk-E76O5Z42.js +98 -0
  113. package/dist/chunk-EEW443GL.js +14 -0
  114. package/dist/chunk-EVNMW7BS.js +833 -0
  115. package/dist/chunk-EVNMW7BS.js.map +7 -0
  116. package/dist/chunk-F2WPS7VY.js +1943 -0
  117. package/dist/chunk-FDPWWODM.js +2832 -0
  118. package/dist/chunk-FDPWWODM.js.map +7 -0
  119. package/dist/chunk-FVHUROIJ.js +446 -0
  120. package/dist/chunk-FVHUROIJ.js.map +7 -0
  121. package/dist/chunk-FYFX42YD.js +222 -0
  122. package/dist/chunk-G6RZYGWY.js +386 -0
  123. package/dist/chunk-GTZV2UZV.js +736 -0
  124. package/dist/chunk-H34LAFGH.js +142 -0
  125. package/dist/chunk-I2R5O2XX.js +263 -0
  126. package/dist/chunk-IEYDMN3H.js +26 -0
  127. package/dist/chunk-JWBP4ZZB.js +148 -0
  128. package/dist/chunk-KUZPTJJO.js +20874 -0
  129. package/dist/chunk-KUZPTJJO.js.map +7 -0
  130. package/dist/chunk-KVIH5JPC.js +1275 -0
  131. package/dist/chunk-L5HCOTRF.js +302 -0
  132. package/dist/chunk-LHKDLWG5.js +194 -0
  133. package/dist/chunk-LQJMCE7G.js +467 -0
  134. package/dist/chunk-M7UKOCJA.js +234 -0
  135. package/dist/chunk-M7UKOCJA.js.map +7 -0
  136. package/dist/chunk-MHFH66I3.js +1289 -0
  137. package/dist/chunk-MHFH66I3.js.map +7 -0
  138. package/dist/chunk-MNIBZTQE.js +146 -0
  139. package/dist/chunk-MP3DN6JK.js +117 -0
  140. package/dist/chunk-N5OVBS5L.js +2786 -0
  141. package/dist/chunk-NEKAGDTL.js +58 -0
  142. package/dist/chunk-NPCNDM6Y.js +54 -0
  143. package/dist/chunk-NYN2WQN3.js +100 -0
  144. package/dist/chunk-O6WL7USJ.js +343 -0
  145. package/dist/chunk-OH5I6I2D.js +368 -0
  146. package/dist/chunk-PDFCQ7AU.js +5054 -0
  147. package/dist/chunk-PDFCQ7AU.js.map +7 -0
  148. package/dist/chunk-PSJVMAWA.js +294 -0
  149. package/dist/chunk-PSJVMAWA.js.map +7 -0
  150. package/dist/chunk-PTQ774XH.js +514 -0
  151. package/dist/chunk-PXOH4ZN2.js +399 -0
  152. package/dist/chunk-QG4BJUM7.js +102 -0
  153. package/dist/chunk-R7AV73BV.js +617 -0
  154. package/dist/chunk-R7AV73BV.js.map +7 -0
  155. package/dist/chunk-RITTG5WN.js +158 -0
  156. package/dist/chunk-SMSFTTEO.js +272 -0
  157. package/dist/chunk-SOTB4FRE.js +2098 -0
  158. package/dist/chunk-SOTB4FRE.js.map +7 -0
  159. package/dist/chunk-TBZKVKR4.js +50 -0
  160. package/dist/chunk-TJYRBEBK.js +2878 -0
  161. package/dist/chunk-TLTS33EY.js +287 -0
  162. package/dist/chunk-TMM7BWW7.js +381 -0
  163. package/dist/chunk-TTC4MNEM.js +2327 -0
  164. package/dist/chunk-UN3O2MNB.js +375 -0
  165. package/dist/chunk-UN3O2MNB.js.map +7 -0
  166. package/dist/chunk-UQ5CDHYF.js +1218 -0
  167. package/dist/chunk-UQ5CDHYF.js.map +7 -0
  168. package/dist/chunk-UXIZYI3X.js +226 -0
  169. package/dist/chunk-VIUATDO2.js +170 -0
  170. package/dist/chunk-VIUDFDN4.js +102 -0
  171. package/dist/chunk-VQZ2Z5YU.js +587 -0
  172. package/dist/chunk-VQZ2Z5YU.js.map +7 -0
  173. package/dist/chunk-W5OEFZCR.js +254 -0
  174. package/dist/chunk-WXSRK3XR.js +534 -0
  175. package/dist/chunk-XHGMDBTS.js +230 -0
  176. package/dist/chunk-XQ2OBL6R.js +1205 -0
  177. package/dist/chunk-XQ2OBL6R.js.map +7 -0
  178. package/dist/chunk-XVGS3QXS.js +55 -0
  179. package/dist/chunk-XYNYQMLH.js +482 -0
  180. package/dist/chunk-Y4JJMUWG.js +217 -0
  181. package/dist/chunk-Z457XQSX.js +815 -0
  182. package/dist/chunk-ZF6HNVYD.js +1444 -0
  183. package/dist/chunk-ZF6HNVYD.js.map +7 -0
  184. package/dist/condition-QXTOTGZX.js +332 -0
  185. package/dist/controls-7TDB75LK.js +41 -0
  186. package/dist/controls.config-IBF5ILFP.js +39 -0
  187. package/dist/correlation-M2T5R7CM.js +102 -0
  188. package/dist/correlation-M2T5R7CM.js.map +7 -0
  189. package/dist/cuminc-CAHPKW7W.js +1149 -0
  190. package/dist/cuminc.integration.spec-NNSQGBRI.js +678 -0
  191. package/dist/customdata.inputui-RRTQK7OK.js +289 -0
  192. package/dist/dataDownload-SOUCBKXM.js +330 -0
  193. package/dist/dataDownload.integration.spec-C6TLWSSO.js +193 -0
  194. package/dist/databrowser.ui-KLFEU5QA.js +433 -0
  195. package/dist/dictionary-RUT5VXDD.js +118 -0
  196. package/dist/dictionary-RUT5VXDD.js.map +7 -0
  197. package/dist/dnaMethylation-WOKGG33W.js +38 -0
  198. package/dist/dnaMethylation.integration.spec-YUPP42UK.js +203 -0
  199. package/dist/dofetch-V7PLLWSO.js +51 -0
  200. package/dist/e2pca-VT7EM4E3.js +350 -0
  201. package/dist/ep-X6B43UXE.js +1256 -0
  202. package/dist/expclust.gdc.spec-DTBFOXBC.js +307 -0
  203. package/dist/facet-T5ZX7ZGV.js +521 -0
  204. package/dist/forms2-S5OGBFKL.js +539 -0
  205. package/dist/forms2-S5OGBFKL.js.map +7 -0
  206. package/dist/gb-TWXREZIP.js +88 -0
  207. package/dist/geneExpClustering-2G6YDCIN.js +249 -0
  208. package/dist/geneExpression-2A4ZPT7K.js +38 -0
  209. package/dist/geneExpression-ZHQH6SNA.js +313 -0
  210. package/dist/geneExpression.unit.spec-2M223S4P.js +102 -0
  211. package/dist/geneORA-YLIRUMCZ.js +278 -0
  212. package/dist/geneRanking-JDJXNGEC.js +551 -0
  213. package/dist/geneVariant-5ZIOT5BT.js +39 -0
  214. package/dist/geneVariant-GIXIMJ2I.js +41 -0
  215. package/dist/geneVariant.integration.spec-QCROW73S.js +198 -0
  216. package/dist/genefusion.ui-56UQLUKJ.js +309 -0
  217. package/dist/geneset-ACRMGBJO.js +208 -0
  218. package/dist/genomeBrowser.spec-EDILOQON.js +281 -0
  219. package/dist/grin2-5P7CYUT7.js +1560 -0
  220. package/dist/grin2-GNB35CMF.js +871 -0
  221. package/dist/grin2-GNB35CMF.js.map +7 -0
  222. package/dist/gsea-2PQ5HNNT.js +47 -0
  223. package/dist/hierCluster-H5HB7FPW.js +63 -0
  224. package/dist/hierCluster-L3LCP2II.js +59 -0
  225. package/dist/hierCluster.config-6UIJWCND.js +40 -0
  226. package/dist/hierCluster.integration.spec-EVAPT2VF.js +395 -0
  227. package/dist/hierCluster.interactivity-7MW6ZT6O.js +54 -0
  228. package/dist/hierCluster.renderers-F34EVY5J.js +21 -0
  229. package/dist/imagePlot-RSFZ2OKD.js +163 -0
  230. package/dist/importPlot-DQFWY5A7.js +8 -0
  231. package/dist/isoformExpression-2KANPCBH.js +40 -0
  232. package/dist/isoformExpression.unit.spec-6FSMHT4K.js +208 -0
  233. package/dist/launch.adhoc-ZYTIRVIC.js +42 -0
  234. package/dist/leftlabel.sample-66U6MHPN.js +260 -0
  235. package/dist/legacyDataset-TNIIJABK.js +119 -0
  236. package/dist/lollipop-PJDUFWEY.js +171 -0
  237. package/dist/maf-DLJHCKHJ.js +452 -0
  238. package/dist/maftimeline-NK5QYJMJ.js +593 -0
  239. package/dist/matrix-7BFYR6QL.js +63 -0
  240. package/dist/matrix-USAB2CHO.js +58 -0
  241. package/dist/matrix.cells-OTAXAJ4N.js +28 -0
  242. package/dist/matrix.config-AL4WSFZ7.js +41 -0
  243. package/dist/matrix.data-BDHCSN2G.js +25 -0
  244. package/dist/matrix.groups-MV2D2636.js +27 -0
  245. package/dist/matrix.integration.spec-DESORC2Y.js +3072 -0
  246. package/dist/matrix.interactivity-H7EJW3P2.js +42 -0
  247. package/dist/matrix.layout-7CAS2IBO.js +44 -0
  248. package/dist/matrix.legend-JDVG2JDF.js +22 -0
  249. package/dist/matrix.renderers-PDR5FIBC.js +38 -0
  250. package/dist/matrix.serieses-QVDS5HKK.js +21 -0
  251. package/dist/matrix.sort-HCK4CSTJ.js +27 -0
  252. package/dist/matrix.sort.unit.spec-2GC4E26N.js +472 -0
  253. package/dist/matrix.sorterUi-XGBQOPG4.js +18 -0
  254. package/dist/matrix.sorterUi.unit.spec-BJQKDU2F.js +342 -0
  255. package/dist/mavb-6E6Z4LPK.js +732 -0
  256. package/dist/mds.fimo-5P2TK5U4.js +518 -0
  257. package/dist/mds.samplescatterplot-KLKOD4AS.js +1550 -0
  258. package/dist/mds.survivalplot-SWQCOFIU.js +483 -0
  259. package/dist/numericDictTermCluster-WIVO33AV.js +72 -0
  260. package/dist/oncomatrix-SDUUQZCK.js +295 -0
  261. package/dist/oncomatrix.spec-YGQYIUDT.js +448 -0
  262. package/dist/plot.2dvaf-K53KTP5W.js +377 -0
  263. package/dist/plot.app-FNJVWLPQ.js +41 -0
  264. package/dist/plot.barplot-VTC3N6BR.js +102 -0
  265. package/dist/plot.boxplot-RJFGQSLA.js +152 -0
  266. package/dist/plot.brainImaging-6KVNPPMT.js +51 -0
  267. package/dist/plot.disco-ZFH5RK6B.js +102 -0
  268. package/dist/plot.dzi-IA2SOFUD.js +33 -0
  269. package/dist/plot.ssgq-QARGQVKB.js +139 -0
  270. package/dist/plot.vaf2cov-2JUXYCPG.js +259 -0
  271. package/dist/plot.wsi-C2DULA7U.js +36 -0
  272. package/dist/polar2-3HS3QBU6.js +231 -0
  273. package/dist/polar2-3HS3QBU6.js.map +7 -0
  274. package/dist/profileForms-Y6ZBMZWQ.js +446 -0
  275. package/dist/profileForms-Y6ZBMZWQ.js.map +7 -0
  276. package/dist/profilePlot-SVI3QKMD.js +54 -0
  277. package/dist/proteinView-YPFJSBL7.js +1556 -0
  278. package/dist/proteinView-YPFJSBL7.js.map +7 -0
  279. package/dist/qualitative-AQFKAZID.js +43 -0
  280. package/dist/radar2-TTQZLARY.js +326 -0
  281. package/dist/radar2-TTQZLARY.js.map +7 -0
  282. package/dist/radarFacility2-YGS56QUA.js +334 -0
  283. package/dist/radarFacility2-YGS56QUA.js.map +7 -0
  284. package/dist/regression-DLPBCDZT.js +56 -0
  285. package/dist/regression.inputs-42LY4MEZ.js +48 -0
  286. package/dist/regression.inputs.term-TTUFFPG6.js +48 -0
  287. package/dist/regression.inputs.values.table-CJAPTSMS.js +45 -0
  288. package/dist/regression.integration.spec-UDA26OGS.js +784 -0
  289. package/dist/regression.results-IA3C7SHR.js +40 -0
  290. package/dist/regression.spec-HEXCL3QV.js +708 -0
  291. package/dist/report-4CFOWNPJ.js +222 -0
  292. package/dist/sampleScatter.spec-N6V4BQ5Q.js +202 -0
  293. package/dist/sampleView-CZF7U23I.js +48 -0
  294. package/dist/samplelst-XUGDS5TU.js +111 -0
  295. package/dist/samplematrix-R5PZLZDE.js +2198 -0
  296. package/dist/sc-WTZZA5J5.js +86 -0
  297. package/dist/scatter-EY7HQVCO.js +851 -0
  298. package/dist/scatter-EY7HQVCO.js.map +7 -0
  299. package/dist/scatter.integration.spec-CRMLFO4J.js +1206 -0
  300. package/dist/scatter.integration.spec-CRMLFO4J.js.map +7 -0
  301. package/dist/selectGenomeWithTklst-2S2MXVCI.js +134 -0
  302. package/dist/singleCellCellType-LJWFG7MY.js +38 -0
  303. package/dist/singleCellCellType.unit.spec-RGN2XVUR.js +160 -0
  304. package/dist/singleCellGeneExpression-IW2QXTTU.js +38 -0
  305. package/dist/singleCellGeneExpression.unit.spec-4PO3Q7TM.js +153 -0
  306. package/dist/singleCellPlot-6EZ6JXCM.js +54 -0
  307. package/dist/singlecell-3LFPQ6KO.js +86 -0
  308. package/dist/singlecell-NTTAVVMR.js +1572 -0
  309. package/dist/snp-XB4IBG4Z.js +38 -0
  310. package/dist/snp.unit.spec-HAJPM53L.js +176 -0
  311. package/dist/snplocus-HE6TITSX.js +208 -0
  312. package/dist/spliceevent.a53ss.diagram-TCZMBMD7.js +151 -0
  313. package/dist/spliceevent.exonskip.diagram-VESOF6UC.js +277 -0
  314. package/dist/spliceevent.noeventdiagram-4K7FMO4F.js +460 -0
  315. package/dist/ssGSEA-2XYMX36P.js +38 -0
  316. package/dist/ssGSEA.unit.spec-J36KM2HO.js +88 -0
  317. package/dist/summarizeCnvGeneexp-LYVDZXXD.js +163 -0
  318. package/dist/summarizeGeneexpSurvival-Y52TGAHF.js +108 -0
  319. package/dist/summarizeMutationCnv-6EEJT3PV.js +164 -0
  320. package/dist/summarizeMutationDiagnosis-HZKXHOOQ.js +40 -0
  321. package/dist/summarizeMutationSurvival-TU7TQYFQ.js +99 -0
  322. package/dist/summary-4QQZUAMU.js +49 -0
  323. package/dist/summary.integration.spec-SLIIM4HN.js +414 -0
  324. package/dist/summaryInput-6HROPKCE.js +235 -0
  325. package/dist/sunburst-MBJJPERL.js +284 -0
  326. package/dist/survival-CXLMQSV2.js +58 -0
  327. package/dist/survival-QSL2KDKD.js +46 -0
  328. package/dist/survival.integration.spec-EUAAALVW.js +821 -0
  329. package/dist/svgraph-JM5MHQDX.js +1387 -0
  330. package/dist/svmr-MCMST2FL.js +3842 -0
  331. package/dist/table-MVX3IMAL.js +200 -0
  332. package/dist/termCollection-FZ2SCVA7.js +38 -0
  333. package/dist/termCollection-IGC7REFK.js +179 -0
  334. package/dist/termCollection.unit.spec-VY2EZZIP.js +208 -0
  335. package/dist/tk-5F3TWZ2G.js +46 -0
  336. package/dist/tp.ui-IURWTMAS.js +1459 -0
  337. package/dist/tvs.dt-BPZCFPYK.js +39 -0
  338. package/dist/tvs.dtcnv.categorical-UFS62DTR.js +40 -0
  339. package/dist/tvs.dtcnv.continuous-R6YXNNLA.js +72 -0
  340. package/dist/tvs.dtfusion-FGXXS4XX.js +40 -0
  341. package/dist/tvs.dtsnvindel-DR43K7X3.js +40 -0
  342. package/dist/tvs.dtsv-NO34GIOL.js +40 -0
  343. package/dist/tvs.numeric-KYAU5OV3.js +21 -0
  344. package/dist/tvs.samplelst-2QP7IV2Y.js +104 -0
  345. package/dist/tvs.termCollection-UEJDG22G.js +159 -0
  346. package/dist/violin-NBZTGGYF.js +46 -0
  347. package/dist/violin.integration.spec-5CLYJSAR.js +1425 -0
  348. package/dist/violin.interactivity-KXVKTT22.js +38 -0
  349. package/dist/violin.renderer-37OF6K7Q.js +40 -0
  350. package/dist/vocabulary-GR6J3VKW.js +41 -0
  351. package/package.json +3 -3
  352. package/dist/2dmaf-Z3D2M3FB.js +0 -1373
  353. package/dist/AIProjectAdmin-2OQOQXH4.js +0 -956
  354. package/dist/AIProjectAdmin-2OQOQXH4.js.map +0 -7
  355. package/dist/AppHeader-PXLGVCVS.js +0 -835
  356. package/dist/BoxPlot-PUZKHACO.js +0 -1211
  357. package/dist/BoxPlot-PUZKHACO.js.map +0 -7
  358. package/dist/CorrelationVolcano-RO6CFLZA.js +0 -619
  359. package/dist/DE-CCA5SBJG.js +0 -95
  360. package/dist/DEinput-MRUQW6X6.js +0 -301
  361. package/dist/DifferentialAnalysis-5YQQLJKR.js +0 -245
  362. package/dist/Disco-4FTOJBLG.js +0 -3237
  363. package/dist/Disco-4FTOJBLG.js.map +0 -7
  364. package/dist/Disco.UI-IWVSK3RN.js +0 -245
  365. package/dist/Disco.UI-IWVSK3RN.js.map +0 -7
  366. package/dist/DmrPlot-FPJJHTM5.js +0 -642
  367. package/dist/GB-H6JETPRC.js +0 -1130
  368. package/dist/GeneExpInput-Q42COANS.js +0 -366
  369. package/dist/GeneExpInput-Q42COANS.js.map +0 -7
  370. package/dist/HicApp-BBD2YOMT.js +0 -2250
  371. package/dist/NumBinaryEditor-WMSF7HIO.js +0 -271
  372. package/dist/NumBinaryEditor.unit.spec-QQATLHF7.js +0 -286
  373. package/dist/NumContEditor-4CSTHVRX.js +0 -109
  374. package/dist/NumContEditor.unit.spec-2YF3OS3A.js +0 -169
  375. package/dist/NumCustomBinEditor-KFAYUWYV.js +0 -38
  376. package/dist/NumCustomBinEditor.unit.spec-YHAUSGPN.js +0 -284
  377. package/dist/NumDiscreteEditor-F46H5CME.js +0 -179
  378. package/dist/NumDiscreteEditor.unit.spec-5BIAWAVN.js +0 -202
  379. package/dist/NumRegularBinEditor-G7KOA7NR.js +0 -38
  380. package/dist/NumRegularBinEditor.unit.spec-Y6CBCWLN.js +0 -227
  381. package/dist/NumSplineEditor-JP2V2L4Y.js +0 -198
  382. package/dist/NumSplineEditor.unit.spec-N34QBZN3.js +0 -199
  383. package/dist/NumericDensity-JOPHLURB.js +0 -38
  384. package/dist/NumericDensity.unit.spec-N45PCLOT.js +0 -221
  385. package/dist/NumericHandler-SIM4E2Z5.js +0 -39
  386. package/dist/NumericHandler.unit.spec-NKLYDVTG.js +0 -219
  387. package/dist/ProteomeInput-5KMNE3PZ.js +0 -396
  388. package/dist/RunChart2-N7AZVQXJ.js +0 -758
  389. package/dist/SC-M6RGALZM.js +0 -936
  390. package/dist/SC-M6RGALZM.js.map +0 -7
  391. package/dist/Volcano-YH4RJTT5.js +0 -1379
  392. package/dist/WSIViewer-7LOVM3AU.js +0 -48508
  393. package/dist/WSIViewer-7LOVM3AU.js.map +0 -7
  394. package/dist/WsiSamplesPlot-QPPB7OOD.js +0 -165
  395. package/dist/adSandbox-R2QP74P7.js +0 -38
  396. package/dist/app-AIIN4WDE.js +0 -37
  397. package/dist/app-FJT5VXMF.js +0 -49
  398. package/dist/bam-QBO22VQB.js +0 -860
  399. package/dist/barchart-VDOP6FQU.js +0 -47
  400. package/dist/barchart.data-Z2E72EET.js +0 -22
  401. package/dist/barchart.events-NUYQBI5S.js +0 -47
  402. package/dist/barchart.integration.spec-COVZPXMH.js +0 -1980
  403. package/dist/barchart2-KMSU4ROO.js +0 -311
  404. package/dist/barchart2-KMSU4ROO.js.map +0 -7
  405. package/dist/bars.renderer-JHCZDSM6.js +0 -12
  406. package/dist/block-TTN2IQAH.js +0 -6202
  407. package/dist/block-TTN2IQAH.js.map +0 -7
  408. package/dist/block.init-RRHHCNSR.js +0 -38
  409. package/dist/block.mds.expressionrank-7NWBRUII.js +0 -359
  410. package/dist/block.mds.geneboxplot-4BAJJWCC.js +0 -828
  411. package/dist/block.mds.junction-XRUIHAF5.js +0 -1545
  412. package/dist/block.mds.svcnv-YZ7PL733.js +0 -6801
  413. package/dist/block.svg-FUMP2J7A.js +0 -164
  414. package/dist/block.tk.aicheck-AIZEND45.js +0 -283
  415. package/dist/block.tk.ase-H26PKO5U.js +0 -365
  416. package/dist/block.tk.bam-XNZFHSDQ.js +0 -1906
  417. package/dist/block.tk.bedgraphdot-QTDBLBO2.js +0 -384
  418. package/dist/block.tk.bigwig.ui-OSRCPTQC.js +0 -212
  419. package/dist/block.tk.hicstraw-7GH6LVIH.js +0 -823
  420. package/dist/block.tk.junction-AJYML4AW.js +0 -2364
  421. package/dist/block.tk.junction.textmatrixui-4RIH3EZI.js +0 -199
  422. package/dist/block.tk.ld-AJYQ4C6T.js +0 -99
  423. package/dist/block.tk.menu-57OP5UW5.js +0 -1029
  424. package/dist/block.tk.pgv-XO7HP5MM.js +0 -944
  425. package/dist/brainImaging-65QDNR4D.js +0 -423
  426. package/dist/chunk-2XCUERHJ.js +0 -102
  427. package/dist/chunk-322QC6R4.js +0 -222
  428. package/dist/chunk-35SCELN4.js +0 -217
  429. package/dist/chunk-36EHIPV4.js +0 -514
  430. package/dist/chunk-3SZ6GKLB.js +0 -14
  431. package/dist/chunk-3ZLJDFJU.js +0 -368
  432. package/dist/chunk-4DXZGZOB.js +0 -54
  433. package/dist/chunk-4UWS5Y3N.js +0 -1438
  434. package/dist/chunk-4UWS5Y3N.js.map +0 -7
  435. package/dist/chunk-54EMVNPW.js +0 -102
  436. package/dist/chunk-57RBC6IZ.js +0 -302
  437. package/dist/chunk-5OUTR67M.js +0 -37
  438. package/dist/chunk-67DBIM6H.js +0 -293
  439. package/dist/chunk-67DBIM6H.js.map +0 -7
  440. package/dist/chunk-6A3IPDE2.js +0 -1943
  441. package/dist/chunk-6GN7X6LU.js +0 -2681
  442. package/dist/chunk-72X7LSBN.js +0 -54
  443. package/dist/chunk-74ZU4BT6.js +0 -2824
  444. package/dist/chunk-74ZU4BT6.js.map +0 -7
  445. package/dist/chunk-7EMWHCVW.js +0 -1825
  446. package/dist/chunk-7FACFCZK.js +0 -226
  447. package/dist/chunk-7XFGYYRV.js +0 -371
  448. package/dist/chunk-7XFGYYRV.js.map +0 -7
  449. package/dist/chunk-B6CSYKZJ.js +0 -1275
  450. package/dist/chunk-BDIKFVWZ.js +0 -443
  451. package/dist/chunk-BDIKFVWZ.js.map +0 -7
  452. package/dist/chunk-BWGU5NJS.js +0 -291
  453. package/dist/chunk-C5ZMAQXQ.js +0 -1173
  454. package/dist/chunk-C5ZMAQXQ.js.map +0 -7
  455. package/dist/chunk-CC3GFVV6.js +0 -117
  456. package/dist/chunk-CXQ6KS3Z.js +0 -1348
  457. package/dist/chunk-CXQ6KS3Z.js.map +0 -7
  458. package/dist/chunk-DCH54HC5.js +0 -824
  459. package/dist/chunk-DCH54HC5.js.map +0 -7
  460. package/dist/chunk-DD4R5P6W.js +0 -177
  461. package/dist/chunk-DKVUOBIE.js +0 -203
  462. package/dist/chunk-DR6H3QAA.js +0 -399
  463. package/dist/chunk-EH4NQ7C4.js +0 -170
  464. package/dist/chunk-EVN6KWPN.js +0 -50
  465. package/dist/chunk-FFEIP5CT.js +0 -458
  466. package/dist/chunk-FFEIP5CT.js.map +0 -7
  467. package/dist/chunk-FJP77STI.js +0 -158
  468. package/dist/chunk-FJP77STI.js.map +0 -7
  469. package/dist/chunk-G6O3URDN.js +0 -467
  470. package/dist/chunk-GNIK4JYM.js +0 -534
  471. package/dist/chunk-HKSNADSX.js +0 -477
  472. package/dist/chunk-I5RAQKKJ.js +0 -129
  473. package/dist/chunk-IW57W7EQ.js +0 -1210
  474. package/dist/chunk-IW57W7EQ.js.map +0 -7
  475. package/dist/chunk-J4SOF2ZH.js +0 -263
  476. package/dist/chunk-KPJZBCVI.js +0 -272
  477. package/dist/chunk-KSGA62R2.js +0 -2878
  478. package/dist/chunk-LTOBEUM2.js +0 -98
  479. package/dist/chunk-MYF2BWKC.js +0 -205
  480. package/dist/chunk-MYF2BWKC.js.map +0 -7
  481. package/dist/chunk-N2SKTCDK.js +0 -148
  482. package/dist/chunk-NGM3ZLIP.js +0 -230
  483. package/dist/chunk-NOEAT6CX.js +0 -317
  484. package/dist/chunk-NOEAT6CX.js.map +0 -7
  485. package/dist/chunk-NSXZPWRP.js +0 -482
  486. package/dist/chunk-O3JB4PIX.js +0 -31
  487. package/dist/chunk-OAWQ6LOO.js +0 -2063
  488. package/dist/chunk-OAWQ6LOO.js.map +0 -7
  489. package/dist/chunk-ODG6RD7P.js +0 -254
  490. package/dist/chunk-OEDZHPBJ.js +0 -58
  491. package/dist/chunk-ORL44TIK.js +0 -386
  492. package/dist/chunk-P3IENRWJ.js +0 -613
  493. package/dist/chunk-P3IENRWJ.js.map +0 -7
  494. package/dist/chunk-PCZNTK74.js +0 -26
  495. package/dist/chunk-QH6W3NVF.js +0 -287
  496. package/dist/chunk-QNETLNPB.js +0 -343
  497. package/dist/chunk-QQZ3SBF3.js +0 -216
  498. package/dist/chunk-R2MMURGK.js +0 -2786
  499. package/dist/chunk-SA7APTJR.js +0 -20792
  500. package/dist/chunk-SA7APTJR.js.map +0 -7
  501. package/dist/chunk-SHWLROJG.js +0 -283
  502. package/dist/chunk-SKREEF3H.js +0 -184
  503. package/dist/chunk-SKREEF3H.js.map +0 -7
  504. package/dist/chunk-TOU7EVFQ.js +0 -396
  505. package/dist/chunk-TOU7EVFQ.js.map +0 -7
  506. package/dist/chunk-UGVNZMLU.js +0 -4274
  507. package/dist/chunk-UGVNZMLU.js.map +0 -7
  508. package/dist/chunk-UI7OCM2A.js +0 -815
  509. package/dist/chunk-UJKW42DI.js +0 -6364
  510. package/dist/chunk-ULPMYS5B.js +0 -100
  511. package/dist/chunk-UOVALHAJ.js +0 -182
  512. package/dist/chunk-VGJSASRT.js +0 -446
  513. package/dist/chunk-VGYTAYFK.js +0 -276
  514. package/dist/chunk-VHOEJBFP.js +0 -736
  515. package/dist/chunk-VOUMS6IP.js +0 -1102
  516. package/dist/chunk-VV36JRUF.js +0 -381
  517. package/dist/chunk-W55XSG6K.js +0 -142
  518. package/dist/chunk-W6ME65LV.js +0 -34
  519. package/dist/chunk-WHI6466S.js +0 -146
  520. package/dist/chunk-WSDUD52Y.js +0 -55
  521. package/dist/chunk-XAVNZNXQ.js +0 -95
  522. package/dist/chunk-XMLURPEP.js +0 -194
  523. package/dist/chunk-YKXUK7HJ.js +0 -5041
  524. package/dist/chunk-YKXUK7HJ.js.map +0 -7
  525. package/dist/chunk-YZK37YCC.js +0 -119
  526. package/dist/chunk-ZTYNN6G5.js +0 -2327
  527. package/dist/chunk-ZXTHADSC.js +0 -158
  528. package/dist/condition-HDVYPJJD.js +0 -332
  529. package/dist/controls-YEEW46C6.js +0 -41
  530. package/dist/controls.config-C535H5DL.js +0 -39
  531. package/dist/correlation-AOSSSSL3.js +0 -99
  532. package/dist/correlation-AOSSSSL3.js.map +0 -7
  533. package/dist/cuminc-II7NFIFP.js +0 -1149
  534. package/dist/cuminc.integration.spec-B4N6OMBJ.js +0 -678
  535. package/dist/customdata.inputui-AI4ZBIEP.js +0 -289
  536. package/dist/dataDownload-ZQYLXN6D.js +0 -330
  537. package/dist/dataDownload.integration.spec-2PKYZ2AY.js +0 -193
  538. package/dist/databrowser.ui-WGD7D3XV.js +0 -433
  539. package/dist/dictionary-RYM4WP2W.js +0 -111
  540. package/dist/dictionary-RYM4WP2W.js.map +0 -7
  541. package/dist/dnaMethylation-WGJMJL5B.js +0 -38
  542. package/dist/dnaMethylation.integration.spec-DO3PV4MO.js +0 -203
  543. package/dist/dofetch-RADX3AFU.js +0 -51
  544. package/dist/e2pca-KOAAU2JX.js +0 -350
  545. package/dist/ep-CXCATXYH.js +0 -1256
  546. package/dist/expclust.gdc.spec-UJO2R3CW.js +0 -307
  547. package/dist/facet-2FBUAD7P.js +0 -521
  548. package/dist/forms2-ZBT5BZW3.js +0 -534
  549. package/dist/forms2-ZBT5BZW3.js.map +0 -7
  550. package/dist/gb-VCJFV63W.js +0 -88
  551. package/dist/geneExpClustering-FUNS6D2P.js +0 -249
  552. package/dist/geneExpression-2BWWGYL4.js +0 -38
  553. package/dist/geneExpression-2OPFWV2K.js +0 -313
  554. package/dist/geneExpression.unit.spec-G7BSHJQT.js +0 -102
  555. package/dist/geneORA-S3KQMBYL.js +0 -278
  556. package/dist/geneRanking-UZ36XAL7.js +0 -551
  557. package/dist/geneVariant-OOZ2SBXO.js +0 -41
  558. package/dist/geneVariant-ZHNVEKQ6.js +0 -39
  559. package/dist/geneVariant.integration.spec-2C7EWKEV.js +0 -198
  560. package/dist/genefusion.ui-ASICJNII.js +0 -309
  561. package/dist/geneset-SNM4M6UM.js +0 -208
  562. package/dist/genomeBrowser.spec-DJIRW2X7.js +0 -281
  563. package/dist/grin2-7AOJP5QJ.js +0 -1560
  564. package/dist/grin2-RKJXYWJ5.js +0 -821
  565. package/dist/grin2-RKJXYWJ5.js.map +0 -7
  566. package/dist/gsea-SPTQJW67.js +0 -47
  567. package/dist/hierCluster-KDE5SMYP.js +0 -63
  568. package/dist/hierCluster-XG4YLVL3.js +0 -59
  569. package/dist/hierCluster.config-VNEEJCKJ.js +0 -40
  570. package/dist/hierCluster.integration.spec-SSDN7LSH.js +0 -395
  571. package/dist/hierCluster.interactivity-DKBSJ644.js +0 -54
  572. package/dist/hierCluster.renderers-OG6LZAT7.js +0 -21
  573. package/dist/imagePlot-M5JSHEY4.js +0 -163
  574. package/dist/importPlot-YH7ZY6RJ.js +0 -8
  575. package/dist/isoformExpression-EV27MKYZ.js +0 -40
  576. package/dist/isoformExpression.unit.spec-7T2GOHH3.js +0 -208
  577. package/dist/launch.adhoc-NOISOX5E.js +0 -42
  578. package/dist/leftlabel.sample-42AX4KTV.js +0 -260
  579. package/dist/legacyDataset-SWJCAWIR.js +0 -119
  580. package/dist/lollipop-LQCQBTSX.js +0 -171
  581. package/dist/maf-U237OWZ3.js +0 -452
  582. package/dist/maftimeline-NLZLMHT2.js +0 -593
  583. package/dist/matrix-DZJXYRYN.js +0 -63
  584. package/dist/matrix-Y5345QQG.js +0 -58
  585. package/dist/matrix.cells-PT7S74QP.js +0 -28
  586. package/dist/matrix.config-2ORCUWKX.js +0 -41
  587. package/dist/matrix.data-C6VPQJJ4.js +0 -25
  588. package/dist/matrix.groups-CEOCG2CT.js +0 -27
  589. package/dist/matrix.integration.spec-U4B3JB6N.js +0 -3072
  590. package/dist/matrix.interactivity-GFLIFIER.js +0 -42
  591. package/dist/matrix.layout-DOVDHTDX.js +0 -44
  592. package/dist/matrix.legend-JE4ZSLP7.js +0 -22
  593. package/dist/matrix.renderers-GPUJQ7KF.js +0 -38
  594. package/dist/matrix.serieses-REE4DCSR.js +0 -21
  595. package/dist/matrix.sort-VD5URUWY.js +0 -27
  596. package/dist/matrix.sort.unit.spec-4IOFVHJN.js +0 -472
  597. package/dist/matrix.sorterUi-VQYY6KBK.js +0 -18
  598. package/dist/matrix.sorterUi.unit.spec-V5O2EJBX.js +0 -342
  599. package/dist/mavb-SQDA3B2B.js +0 -732
  600. package/dist/mds.fimo-ZJSEPLD7.js +0 -518
  601. package/dist/mds.samplescatterplot-Y5V73GOY.js +0 -1550
  602. package/dist/mds.survivalplot-CZBRMHYN.js +0 -483
  603. package/dist/numericDictTermCluster-TFXBBUVI.js +0 -72
  604. package/dist/oncomatrix-ZILACPPI.js +0 -295
  605. package/dist/oncomatrix.spec-RLIVVVD6.js +0 -448
  606. package/dist/plot.2dvaf-BNRZPIKU.js +0 -377
  607. package/dist/plot.app-NRUARQCN.js +0 -41
  608. package/dist/plot.barplot-342AYQC7.js +0 -102
  609. package/dist/plot.boxplot-OHEJDPTW.js +0 -152
  610. package/dist/plot.brainImaging-KV72PAON.js +0 -51
  611. package/dist/plot.disco-OUE4RFHL.js +0 -102
  612. package/dist/plot.dzi-T3GPUH36.js +0 -33
  613. package/dist/plot.ssgq-WJHGMXW5.js +0 -139
  614. package/dist/plot.vaf2cov-NGD5PCV4.js +0 -259
  615. package/dist/plot.wsi-2MU5BDG3.js +0 -36
  616. package/dist/polar2-YCWPBPFU.js +0 -226
  617. package/dist/polar2-YCWPBPFU.js.map +0 -7
  618. package/dist/profileForms-OV3I6RK7.js +0 -441
  619. package/dist/profileForms-OV3I6RK7.js.map +0 -7
  620. package/dist/profilePlot-OMVO3K4H.js +0 -54
  621. package/dist/proteinView-OAR2RC6U.js +0 -1320
  622. package/dist/proteinView-OAR2RC6U.js.map +0 -7
  623. package/dist/qualitative-MEYBRUC6.js +0 -43
  624. package/dist/radar2-KREAMGVV.js +0 -321
  625. package/dist/radar2-KREAMGVV.js.map +0 -7
  626. package/dist/radarFacility2-DBPEV7VC.js +0 -329
  627. package/dist/radarFacility2-DBPEV7VC.js.map +0 -7
  628. package/dist/regression-ZPDPLI6G.js +0 -56
  629. package/dist/regression.inputs-QOSBAGL6.js +0 -48
  630. package/dist/regression.inputs.term-HMUMPY7X.js +0 -48
  631. package/dist/regression.inputs.values.table-VMCTZHLG.js +0 -45
  632. package/dist/regression.integration.spec-RP74JTAA.js +0 -784
  633. package/dist/regression.results-5XC6M67C.js +0 -40
  634. package/dist/regression.spec-EZYM24J7.js +0 -708
  635. package/dist/report-ZOVQCOGQ.js +0 -222
  636. package/dist/sampleScatter.spec-CD52FEOC.js +0 -202
  637. package/dist/sampleView-SVTLSWRG.js +0 -48
  638. package/dist/samplelst-HXF5POJD.js +0 -111
  639. package/dist/samplematrix-NYDAH74I.js +0 -2198
  640. package/dist/sc-JIDT4W4K.js +0 -86
  641. package/dist/scatter-WNRTPSEE.js +0 -849
  642. package/dist/scatter-WNRTPSEE.js.map +0 -7
  643. package/dist/scatter.integration.spec-3EYTPY5B.js +0 -1197
  644. package/dist/scatter.integration.spec-3EYTPY5B.js.map +0 -7
  645. package/dist/selectGenomeWithTklst-OSB7B6L3.js +0 -134
  646. package/dist/singleCellCellType-3BH7LWQ6.js +0 -38
  647. package/dist/singleCellCellType.unit.spec-RU4RJXFF.js +0 -160
  648. package/dist/singleCellGeneExpression-3UA4YER7.js +0 -38
  649. package/dist/singleCellGeneExpression.unit.spec-4ZTBG37H.js +0 -153
  650. package/dist/singleCellPlot-ZUAWK5RE.js +0 -54
  651. package/dist/singlecell-BGJZB7MF.js +0 -86
  652. package/dist/singlecell-RO3BL5OO.js +0 -1572
  653. package/dist/snp-HD7VQKBR.js +0 -38
  654. package/dist/snp.unit.spec-ISXCLMWW.js +0 -176
  655. package/dist/snplocus-IL5Z4XWV.js +0 -208
  656. package/dist/spliceevent.a53ss.diagram-LLJSPV7M.js +0 -151
  657. package/dist/spliceevent.exonskip.diagram-LAOIOIST.js +0 -277
  658. package/dist/spliceevent.noeventdiagram-MVA7Q3HT.js +0 -460
  659. package/dist/ssGSEA-7T6S3DSE.js +0 -38
  660. package/dist/ssGSEA.unit.spec-XJ3W4NWX.js +0 -88
  661. package/dist/summarizeCnvGeneexp-RRP6JUV6.js +0 -163
  662. package/dist/summarizeGeneexpSurvival-AFLHDD6Q.js +0 -108
  663. package/dist/summarizeMutationCnv-NABUYHMX.js +0 -164
  664. package/dist/summarizeMutationDiagnosis-2LQ7JU3K.js +0 -40
  665. package/dist/summarizeMutationSurvival-3WBT5TXG.js +0 -99
  666. package/dist/summary-FRDKOFXW.js +0 -49
  667. package/dist/summary.integration.spec-ZLRIA7G2.js +0 -414
  668. package/dist/summaryInput-4JO6MHP4.js +0 -235
  669. package/dist/sunburst-DRCVSC2X.js +0 -284
  670. package/dist/survival-AK75COPY.js +0 -58
  671. package/dist/survival-IF5NI3A6.js +0 -46
  672. package/dist/survival.integration.spec-7IWBTPJG.js +0 -821
  673. package/dist/svgraph-QBDF2SLB.js +0 -1387
  674. package/dist/svmr-O4GJJUT2.js +0 -3842
  675. package/dist/table-FQAIXKLE.js +0 -200
  676. package/dist/termCollection-GMDDL3L7.js +0 -179
  677. package/dist/termCollection-ZO5PZ7E3.js +0 -38
  678. package/dist/termCollection.unit.spec-5JBCTXHX.js +0 -208
  679. package/dist/tk-GJX23IV7.js +0 -46
  680. package/dist/tp.ui-T7FVMTGQ.js +0 -1459
  681. package/dist/tvs.dt-X7L7NSU6.js +0 -39
  682. package/dist/tvs.dtcnv.categorical-73G2V6CH.js +0 -40
  683. package/dist/tvs.dtcnv.continuous-DWFJL3X7.js +0 -72
  684. package/dist/tvs.dtfusion-HQADHCSV.js +0 -40
  685. package/dist/tvs.dtsnvindel-PY5OBMGW.js +0 -40
  686. package/dist/tvs.dtsv-OTBEEWSW.js +0 -40
  687. package/dist/tvs.numeric-WGDHEBJV.js +0 -21
  688. package/dist/tvs.samplelst-LCXSU5MG.js +0 -104
  689. package/dist/tvs.termCollection-L527XN4X.js +0 -159
  690. package/dist/violin-6VKRUQV3.js +0 -46
  691. package/dist/violin.integration.spec-RJATDLQH.js +0 -1425
  692. package/dist/violin.interactivity-SKF5H7MN.js +0 -38
  693. package/dist/violin.renderer-GB4TPX3B.js +0 -40
  694. package/dist/vocabulary-D3W44IWE.js +0 -41
  695. /package/dist/{2dmaf-Z3D2M3FB.js.map → 2dmaf-BNMEUJVM.js.map} +0 -0
  696. /package/dist/{AppHeader-PXLGVCVS.js.map → AppHeader-RXDJBHXZ.js.map} +0 -0
  697. /package/dist/{CorrelationVolcano-RO6CFLZA.js.map → CorrelationVolcano-V2E566XL.js.map} +0 -0
  698. /package/dist/{DE-CCA5SBJG.js.map → DE-7YUZSW4E.js.map} +0 -0
  699. /package/dist/{DEinput-MRUQW6X6.js.map → DEinput-P2HOQC4Z.js.map} +0 -0
  700. /package/dist/{DifferentialAnalysis-5YQQLJKR.js.map → DifferentialAnalysis-2Z6BHS7A.js.map} +0 -0
  701. /package/dist/{DmrPlot-FPJJHTM5.js.map → DmrPlot-OEJRGNI3.js.map} +0 -0
  702. /package/dist/{GB-H6JETPRC.js.map → GB-2GHDD3MW.js.map} +0 -0
  703. /package/dist/{HicApp-BBD2YOMT.js.map → HicApp-CAYC4DPO.js.map} +0 -0
  704. /package/dist/{NumBinaryEditor-WMSF7HIO.js.map → NumBinaryEditor-EUOYSGPM.js.map} +0 -0
  705. /package/dist/{NumBinaryEditor.unit.spec-QQATLHF7.js.map → NumBinaryEditor.unit.spec-5B3W4B4F.js.map} +0 -0
  706. /package/dist/{NumContEditor-4CSTHVRX.js.map → NumContEditor-7KK6CIB3.js.map} +0 -0
  707. /package/dist/{NumContEditor.unit.spec-2YF3OS3A.js.map → NumContEditor.unit.spec-IMKGVYFZ.js.map} +0 -0
  708. /package/dist/{NumCustomBinEditor-KFAYUWYV.js.map → NumCustomBinEditor-PDAF6I7B.js.map} +0 -0
  709. /package/dist/{NumCustomBinEditor.unit.spec-YHAUSGPN.js.map → NumCustomBinEditor.unit.spec-IU3DPECJ.js.map} +0 -0
  710. /package/dist/{NumDiscreteEditor-F46H5CME.js.map → NumDiscreteEditor-YTKUHG6Z.js.map} +0 -0
  711. /package/dist/{NumDiscreteEditor.unit.spec-5BIAWAVN.js.map → NumDiscreteEditor.unit.spec-FUBS7Z7Z.js.map} +0 -0
  712. /package/dist/{NumRegularBinEditor-G7KOA7NR.js.map → NumRegularBinEditor-LU3KLBLY.js.map} +0 -0
  713. /package/dist/{NumRegularBinEditor.unit.spec-Y6CBCWLN.js.map → NumRegularBinEditor.unit.spec-2BKOHI7L.js.map} +0 -0
  714. /package/dist/{NumSplineEditor-JP2V2L4Y.js.map → NumSplineEditor-56RJ2HT2.js.map} +0 -0
  715. /package/dist/{NumSplineEditor.unit.spec-N34QBZN3.js.map → NumSplineEditor.unit.spec-PW6VUUBZ.js.map} +0 -0
  716. /package/dist/{NumericDensity-JOPHLURB.js.map → NumericDensity-EB4H54EF.js.map} +0 -0
  717. /package/dist/{NumericDensity.unit.spec-N45PCLOT.js.map → NumericDensity.unit.spec-LSEM4OEY.js.map} +0 -0
  718. /package/dist/{NumericHandler-SIM4E2Z5.js.map → NumericHandler-VGPDXP35.js.map} +0 -0
  719. /package/dist/{NumericHandler.unit.spec-NKLYDVTG.js.map → NumericHandler.unit.spec-NR3F7XHV.js.map} +0 -0
  720. /package/dist/{ProteomeInput-5KMNE3PZ.js.map → ProteomeInput-AUXWUIWK.js.map} +0 -0
  721. /package/dist/{RunChart2-N7AZVQXJ.js.map → RunChart2-SQ6TFOHD.js.map} +0 -0
  722. /package/dist/{Volcano-YH4RJTT5.js.map → Volcano-XHDH6UN7.js.map} +0 -0
  723. /package/dist/{WsiSamplesPlot-QPPB7OOD.js.map → WsiSamplesPlot-YUOAWG2A.js.map} +0 -0
  724. /package/dist/{adSandbox-R2QP74P7.js.map → adSandbox-VMMAL22L.js.map} +0 -0
  725. /package/dist/{app-AIIN4WDE.js.map → app-FX3KZ67X.js.map} +0 -0
  726. /package/dist/{app-FJT5VXMF.js.map → app-X7ZYEOZN.js.map} +0 -0
  727. /package/dist/{bam-QBO22VQB.js.map → bam-ZYLH4U5R.js.map} +0 -0
  728. /package/dist/{barchart-VDOP6FQU.js.map → barchart-MXSPTKV4.js.map} +0 -0
  729. /package/dist/{barchart.data-Z2E72EET.js.map → barchart.data-ZWF6EVJH.js.map} +0 -0
  730. /package/dist/{barchart.events-NUYQBI5S.js.map → barchart.events-XON2ANOC.js.map} +0 -0
  731. /package/dist/{barchart.integration.spec-COVZPXMH.js.map → barchart.integration.spec-PJIENJGT.js.map} +0 -0
  732. /package/dist/{bars.renderer-JHCZDSM6.js.map → bars.renderer-57KSYAAT.js.map} +0 -0
  733. /package/dist/{block.init-RRHHCNSR.js.map → block.init-IJBRPZNM.js.map} +0 -0
  734. /package/dist/{block.mds.expressionrank-7NWBRUII.js.map → block.mds.expressionrank-3DANCP7E.js.map} +0 -0
  735. /package/dist/{block.mds.geneboxplot-4BAJJWCC.js.map → block.mds.geneboxplot-CRGSCZMG.js.map} +0 -0
  736. /package/dist/{block.mds.junction-XRUIHAF5.js.map → block.mds.junction-4UIH2ZYN.js.map} +0 -0
  737. /package/dist/{block.mds.svcnv-YZ7PL733.js.map → block.mds.svcnv-NF4UIRR2.js.map} +0 -0
  738. /package/dist/{block.svg-FUMP2J7A.js.map → block.svg-AIZ47JCQ.js.map} +0 -0
  739. /package/dist/{block.tk.aicheck-AIZEND45.js.map → block.tk.aicheck-7HZFGE63.js.map} +0 -0
  740. /package/dist/{block.tk.ase-H26PKO5U.js.map → block.tk.ase-U3VNPZEA.js.map} +0 -0
  741. /package/dist/{block.tk.bam-XNZFHSDQ.js.map → block.tk.bam-4TQ7P2OX.js.map} +0 -0
  742. /package/dist/{block.tk.bedgraphdot-QTDBLBO2.js.map → block.tk.bedgraphdot-MYHKKO6K.js.map} +0 -0
  743. /package/dist/{block.tk.bigwig.ui-OSRCPTQC.js.map → block.tk.bigwig.ui-E3YVGIDN.js.map} +0 -0
  744. /package/dist/{block.tk.hicstraw-7GH6LVIH.js.map → block.tk.hicstraw-Y4XOMG7T.js.map} +0 -0
  745. /package/dist/{block.tk.junction-AJYML4AW.js.map → block.tk.junction-T5C7LK6F.js.map} +0 -0
  746. /package/dist/{block.tk.junction.textmatrixui-4RIH3EZI.js.map → block.tk.junction.textmatrixui-Z3ACCVXH.js.map} +0 -0
  747. /package/dist/{block.tk.ld-AJYQ4C6T.js.map → block.tk.ld-Y5KDA5AU.js.map} +0 -0
  748. /package/dist/{block.tk.menu-57OP5UW5.js.map → block.tk.menu-EWRRISDY.js.map} +0 -0
  749. /package/dist/{block.tk.pgv-XO7HP5MM.js.map → block.tk.pgv-3JYGOZVQ.js.map} +0 -0
  750. /package/dist/{brainImaging-65QDNR4D.js.map → brainImaging-P3AF3C5N.js.map} +0 -0
  751. /package/dist/{chunk-7EMWHCVW.js.map → chunk-2JR7RPB6.js.map} +0 -0
  752. /package/dist/{chunk-72X7LSBN.js.map → chunk-3FVIDQOX.js.map} +0 -0
  753. /package/dist/{chunk-VGJSASRT.js.map → chunk-3K2O2NIH.js.map} +0 -0
  754. /package/dist/{chunk-6GN7X6LU.js.map → chunk-3RSJU6YM.js.map} +0 -0
  755. /package/dist/{chunk-W6ME65LV.js.map → chunk-3ZKD6C5S.js.map} +0 -0
  756. /package/dist/{chunk-XAVNZNXQ.js.map → chunk-46AEH34Z.js.map} +0 -0
  757. /package/dist/{chunk-UOVALHAJ.js.map → chunk-4CQVC6XL.js.map} +0 -0
  758. /package/dist/{chunk-QQZ3SBF3.js.map → chunk-5FXNI724.js.map} +0 -0
  759. /package/dist/{chunk-I5RAQKKJ.js.map → chunk-7PFRBGMN.js.map} +0 -0
  760. /package/dist/{chunk-VGYTAYFK.js.map → chunk-A4Z3CI24.js.map} +0 -0
  761. /package/dist/{chunk-YZK37YCC.js.map → chunk-AI2LUQS6.js.map} +0 -0
  762. /package/dist/{chunk-UJKW42DI.js.map → chunk-AJYJW4LX.js.map} +0 -0
  763. /package/dist/{chunk-DD4R5P6W.js.map → chunk-BKPDYW5T.js.map} +0 -0
  764. /package/dist/{chunk-5OUTR67M.js.map → chunk-BMS32SNA.js.map} +0 -0
  765. /package/dist/{chunk-BWGU5NJS.js.map → chunk-CJPGYPI3.js.map} +0 -0
  766. /package/dist/{chunk-O3JB4PIX.js.map → chunk-CTQH7LQ6.js.map} +0 -0
  767. /package/dist/{chunk-DKVUOBIE.js.map → chunk-D5CVYITI.js.map} +0 -0
  768. /package/dist/{chunk-HKSNADSX.js.map → chunk-DMSX5PSO.js.map} +0 -0
  769. /package/dist/{chunk-VOUMS6IP.js.map → chunk-E3JRW3T3.js.map} +0 -0
  770. /package/dist/{chunk-SHWLROJG.js.map → chunk-E574SMCX.js.map} +0 -0
  771. /package/dist/{chunk-LTOBEUM2.js.map → chunk-E76O5Z42.js.map} +0 -0
  772. /package/dist/{chunk-3SZ6GKLB.js.map → chunk-EEW443GL.js.map} +0 -0
  773. /package/dist/{chunk-6A3IPDE2.js.map → chunk-F2WPS7VY.js.map} +0 -0
  774. /package/dist/{chunk-322QC6R4.js.map → chunk-FYFX42YD.js.map} +0 -0
  775. /package/dist/{chunk-ORL44TIK.js.map → chunk-G6RZYGWY.js.map} +0 -0
  776. /package/dist/{chunk-VHOEJBFP.js.map → chunk-GTZV2UZV.js.map} +0 -0
  777. /package/dist/{chunk-W55XSG6K.js.map → chunk-H34LAFGH.js.map} +0 -0
  778. /package/dist/{chunk-J4SOF2ZH.js.map → chunk-I2R5O2XX.js.map} +0 -0
  779. /package/dist/{chunk-PCZNTK74.js.map → chunk-IEYDMN3H.js.map} +0 -0
  780. /package/dist/{chunk-N2SKTCDK.js.map → chunk-JWBP4ZZB.js.map} +0 -0
  781. /package/dist/{chunk-B6CSYKZJ.js.map → chunk-KVIH5JPC.js.map} +0 -0
  782. /package/dist/{chunk-57RBC6IZ.js.map → chunk-L5HCOTRF.js.map} +0 -0
  783. /package/dist/{chunk-XMLURPEP.js.map → chunk-LHKDLWG5.js.map} +0 -0
  784. /package/dist/{chunk-G6O3URDN.js.map → chunk-LQJMCE7G.js.map} +0 -0
  785. /package/dist/{chunk-WHI6466S.js.map → chunk-MNIBZTQE.js.map} +0 -0
  786. /package/dist/{chunk-CC3GFVV6.js.map → chunk-MP3DN6JK.js.map} +0 -0
  787. /package/dist/{chunk-R2MMURGK.js.map → chunk-N5OVBS5L.js.map} +0 -0
  788. /package/dist/{chunk-OEDZHPBJ.js.map → chunk-NEKAGDTL.js.map} +0 -0
  789. /package/dist/{chunk-4DXZGZOB.js.map → chunk-NPCNDM6Y.js.map} +0 -0
  790. /package/dist/{chunk-ULPMYS5B.js.map → chunk-NYN2WQN3.js.map} +0 -0
  791. /package/dist/{chunk-QNETLNPB.js.map → chunk-O6WL7USJ.js.map} +0 -0
  792. /package/dist/{chunk-3ZLJDFJU.js.map → chunk-OH5I6I2D.js.map} +0 -0
  793. /package/dist/{chunk-36EHIPV4.js.map → chunk-PTQ774XH.js.map} +0 -0
  794. /package/dist/{chunk-DR6H3QAA.js.map → chunk-PXOH4ZN2.js.map} +0 -0
  795. /package/dist/{chunk-54EMVNPW.js.map → chunk-QG4BJUM7.js.map} +0 -0
  796. /package/dist/{chunk-ZXTHADSC.js.map → chunk-RITTG5WN.js.map} +0 -0
  797. /package/dist/{chunk-KPJZBCVI.js.map → chunk-SMSFTTEO.js.map} +0 -0
  798. /package/dist/{chunk-EVN6KWPN.js.map → chunk-TBZKVKR4.js.map} +0 -0
  799. /package/dist/{chunk-KSGA62R2.js.map → chunk-TJYRBEBK.js.map} +0 -0
  800. /package/dist/{chunk-QH6W3NVF.js.map → chunk-TLTS33EY.js.map} +0 -0
  801. /package/dist/{chunk-VV36JRUF.js.map → chunk-TMM7BWW7.js.map} +0 -0
  802. /package/dist/{chunk-ZTYNN6G5.js.map → chunk-TTC4MNEM.js.map} +0 -0
  803. /package/dist/{chunk-7FACFCZK.js.map → chunk-UXIZYI3X.js.map} +0 -0
  804. /package/dist/{chunk-EH4NQ7C4.js.map → chunk-VIUATDO2.js.map} +0 -0
  805. /package/dist/{chunk-2XCUERHJ.js.map → chunk-VIUDFDN4.js.map} +0 -0
  806. /package/dist/{chunk-ODG6RD7P.js.map → chunk-W5OEFZCR.js.map} +0 -0
  807. /package/dist/{chunk-GNIK4JYM.js.map → chunk-WXSRK3XR.js.map} +0 -0
  808. /package/dist/{chunk-NGM3ZLIP.js.map → chunk-XHGMDBTS.js.map} +0 -0
  809. /package/dist/{chunk-WSDUD52Y.js.map → chunk-XVGS3QXS.js.map} +0 -0
  810. /package/dist/{chunk-NSXZPWRP.js.map → chunk-XYNYQMLH.js.map} +0 -0
  811. /package/dist/{chunk-35SCELN4.js.map → chunk-Y4JJMUWG.js.map} +0 -0
  812. /package/dist/{chunk-UI7OCM2A.js.map → chunk-Z457XQSX.js.map} +0 -0
  813. /package/dist/{condition-HDVYPJJD.js.map → condition-QXTOTGZX.js.map} +0 -0
  814. /package/dist/{controls-YEEW46C6.js.map → controls-7TDB75LK.js.map} +0 -0
  815. /package/dist/{controls.config-C535H5DL.js.map → controls.config-IBF5ILFP.js.map} +0 -0
  816. /package/dist/{cuminc-II7NFIFP.js.map → cuminc-CAHPKW7W.js.map} +0 -0
  817. /package/dist/{cuminc.integration.spec-B4N6OMBJ.js.map → cuminc.integration.spec-NNSQGBRI.js.map} +0 -0
  818. /package/dist/{customdata.inputui-AI4ZBIEP.js.map → customdata.inputui-RRTQK7OK.js.map} +0 -0
  819. /package/dist/{dataDownload-ZQYLXN6D.js.map → dataDownload-SOUCBKXM.js.map} +0 -0
  820. /package/dist/{dataDownload.integration.spec-2PKYZ2AY.js.map → dataDownload.integration.spec-C6TLWSSO.js.map} +0 -0
  821. /package/dist/{databrowser.ui-WGD7D3XV.js.map → databrowser.ui-KLFEU5QA.js.map} +0 -0
  822. /package/dist/{dnaMethylation-WGJMJL5B.js.map → dnaMethylation-WOKGG33W.js.map} +0 -0
  823. /package/dist/{dnaMethylation.integration.spec-DO3PV4MO.js.map → dnaMethylation.integration.spec-YUPP42UK.js.map} +0 -0
  824. /package/dist/{dofetch-RADX3AFU.js.map → dofetch-V7PLLWSO.js.map} +0 -0
  825. /package/dist/{e2pca-KOAAU2JX.js.map → e2pca-VT7EM4E3.js.map} +0 -0
  826. /package/dist/{ep-CXCATXYH.js.map → ep-X6B43UXE.js.map} +0 -0
  827. /package/dist/{expclust.gdc.spec-UJO2R3CW.js.map → expclust.gdc.spec-DTBFOXBC.js.map} +0 -0
  828. /package/dist/{facet-2FBUAD7P.js.map → facet-T5ZX7ZGV.js.map} +0 -0
  829. /package/dist/{gb-VCJFV63W.js.map → gb-TWXREZIP.js.map} +0 -0
  830. /package/dist/{geneExpClustering-FUNS6D2P.js.map → geneExpClustering-2G6YDCIN.js.map} +0 -0
  831. /package/dist/{geneExpression-2BWWGYL4.js.map → geneExpression-2A4ZPT7K.js.map} +0 -0
  832. /package/dist/{geneExpression-2OPFWV2K.js.map → geneExpression-ZHQH6SNA.js.map} +0 -0
  833. /package/dist/{geneExpression.unit.spec-G7BSHJQT.js.map → geneExpression.unit.spec-2M223S4P.js.map} +0 -0
  834. /package/dist/{geneORA-S3KQMBYL.js.map → geneORA-YLIRUMCZ.js.map} +0 -0
  835. /package/dist/{geneRanking-UZ36XAL7.js.map → geneRanking-JDJXNGEC.js.map} +0 -0
  836. /package/dist/{geneVariant-OOZ2SBXO.js.map → geneVariant-5ZIOT5BT.js.map} +0 -0
  837. /package/dist/{geneVariant-ZHNVEKQ6.js.map → geneVariant-GIXIMJ2I.js.map} +0 -0
  838. /package/dist/{geneVariant.integration.spec-2C7EWKEV.js.map → geneVariant.integration.spec-QCROW73S.js.map} +0 -0
  839. /package/dist/{genefusion.ui-ASICJNII.js.map → genefusion.ui-56UQLUKJ.js.map} +0 -0
  840. /package/dist/{geneset-SNM4M6UM.js.map → geneset-ACRMGBJO.js.map} +0 -0
  841. /package/dist/{genomeBrowser.spec-DJIRW2X7.js.map → genomeBrowser.spec-EDILOQON.js.map} +0 -0
  842. /package/dist/{grin2-7AOJP5QJ.js.map → grin2-5P7CYUT7.js.map} +0 -0
  843. /package/dist/{gsea-SPTQJW67.js.map → gsea-2PQ5HNNT.js.map} +0 -0
  844. /package/dist/{hierCluster-KDE5SMYP.js.map → hierCluster-H5HB7FPW.js.map} +0 -0
  845. /package/dist/{hierCluster-XG4YLVL3.js.map → hierCluster-L3LCP2II.js.map} +0 -0
  846. /package/dist/{hierCluster.config-VNEEJCKJ.js.map → hierCluster.config-6UIJWCND.js.map} +0 -0
  847. /package/dist/{hierCluster.integration.spec-SSDN7LSH.js.map → hierCluster.integration.spec-EVAPT2VF.js.map} +0 -0
  848. /package/dist/{hierCluster.interactivity-DKBSJ644.js.map → hierCluster.interactivity-7MW6ZT6O.js.map} +0 -0
  849. /package/dist/{hierCluster.renderers-OG6LZAT7.js.map → hierCluster.renderers-F34EVY5J.js.map} +0 -0
  850. /package/dist/{imagePlot-M5JSHEY4.js.map → imagePlot-RSFZ2OKD.js.map} +0 -0
  851. /package/dist/{importPlot-YH7ZY6RJ.js.map → importPlot-DQFWY5A7.js.map} +0 -0
  852. /package/dist/{isoformExpression-EV27MKYZ.js.map → isoformExpression-2KANPCBH.js.map} +0 -0
  853. /package/dist/{isoformExpression.unit.spec-7T2GOHH3.js.map → isoformExpression.unit.spec-6FSMHT4K.js.map} +0 -0
  854. /package/dist/{launch.adhoc-NOISOX5E.js.map → launch.adhoc-ZYTIRVIC.js.map} +0 -0
  855. /package/dist/{leftlabel.sample-42AX4KTV.js.map → leftlabel.sample-66U6MHPN.js.map} +0 -0
  856. /package/dist/{legacyDataset-SWJCAWIR.js.map → legacyDataset-TNIIJABK.js.map} +0 -0
  857. /package/dist/{lollipop-LQCQBTSX.js.map → lollipop-PJDUFWEY.js.map} +0 -0
  858. /package/dist/{maf-U237OWZ3.js.map → maf-DLJHCKHJ.js.map} +0 -0
  859. /package/dist/{maftimeline-NLZLMHT2.js.map → maftimeline-NK5QYJMJ.js.map} +0 -0
  860. /package/dist/{matrix-DZJXYRYN.js.map → matrix-7BFYR6QL.js.map} +0 -0
  861. /package/dist/{matrix-Y5345QQG.js.map → matrix-USAB2CHO.js.map} +0 -0
  862. /package/dist/{matrix.cells-PT7S74QP.js.map → matrix.cells-OTAXAJ4N.js.map} +0 -0
  863. /package/dist/{matrix.config-2ORCUWKX.js.map → matrix.config-AL4WSFZ7.js.map} +0 -0
  864. /package/dist/{matrix.data-C6VPQJJ4.js.map → matrix.data-BDHCSN2G.js.map} +0 -0
  865. /package/dist/{matrix.groups-CEOCG2CT.js.map → matrix.groups-MV2D2636.js.map} +0 -0
  866. /package/dist/{matrix.integration.spec-U4B3JB6N.js.map → matrix.integration.spec-DESORC2Y.js.map} +0 -0
  867. /package/dist/{matrix.interactivity-GFLIFIER.js.map → matrix.interactivity-H7EJW3P2.js.map} +0 -0
  868. /package/dist/{matrix.layout-DOVDHTDX.js.map → matrix.layout-7CAS2IBO.js.map} +0 -0
  869. /package/dist/{matrix.legend-JE4ZSLP7.js.map → matrix.legend-JDVG2JDF.js.map} +0 -0
  870. /package/dist/{matrix.renderers-GPUJQ7KF.js.map → matrix.renderers-PDR5FIBC.js.map} +0 -0
  871. /package/dist/{matrix.serieses-REE4DCSR.js.map → matrix.serieses-QVDS5HKK.js.map} +0 -0
  872. /package/dist/{matrix.sort-VD5URUWY.js.map → matrix.sort-HCK4CSTJ.js.map} +0 -0
  873. /package/dist/{matrix.sort.unit.spec-4IOFVHJN.js.map → matrix.sort.unit.spec-2GC4E26N.js.map} +0 -0
  874. /package/dist/{matrix.sorterUi-VQYY6KBK.js.map → matrix.sorterUi-XGBQOPG4.js.map} +0 -0
  875. /package/dist/{matrix.sorterUi.unit.spec-V5O2EJBX.js.map → matrix.sorterUi.unit.spec-BJQKDU2F.js.map} +0 -0
  876. /package/dist/{mavb-SQDA3B2B.js.map → mavb-6E6Z4LPK.js.map} +0 -0
  877. /package/dist/{mds.fimo-ZJSEPLD7.js.map → mds.fimo-5P2TK5U4.js.map} +0 -0
  878. /package/dist/{mds.samplescatterplot-Y5V73GOY.js.map → mds.samplescatterplot-KLKOD4AS.js.map} +0 -0
  879. /package/dist/{mds.survivalplot-CZBRMHYN.js.map → mds.survivalplot-SWQCOFIU.js.map} +0 -0
  880. /package/dist/{numericDictTermCluster-TFXBBUVI.js.map → numericDictTermCluster-WIVO33AV.js.map} +0 -0
  881. /package/dist/{oncomatrix-ZILACPPI.js.map → oncomatrix-SDUUQZCK.js.map} +0 -0
  882. /package/dist/{oncomatrix.spec-RLIVVVD6.js.map → oncomatrix.spec-YGQYIUDT.js.map} +0 -0
  883. /package/dist/{plot.2dvaf-BNRZPIKU.js.map → plot.2dvaf-K53KTP5W.js.map} +0 -0
  884. /package/dist/{plot.app-NRUARQCN.js.map → plot.app-FNJVWLPQ.js.map} +0 -0
  885. /package/dist/{plot.barplot-342AYQC7.js.map → plot.barplot-VTC3N6BR.js.map} +0 -0
  886. /package/dist/{plot.boxplot-OHEJDPTW.js.map → plot.boxplot-RJFGQSLA.js.map} +0 -0
  887. /package/dist/{plot.brainImaging-KV72PAON.js.map → plot.brainImaging-6KVNPPMT.js.map} +0 -0
  888. /package/dist/{plot.disco-OUE4RFHL.js.map → plot.disco-ZFH5RK6B.js.map} +0 -0
  889. /package/dist/{plot.dzi-T3GPUH36.js.map → plot.dzi-IA2SOFUD.js.map} +0 -0
  890. /package/dist/{plot.ssgq-WJHGMXW5.js.map → plot.ssgq-QARGQVKB.js.map} +0 -0
  891. /package/dist/{plot.vaf2cov-NGD5PCV4.js.map → plot.vaf2cov-2JUXYCPG.js.map} +0 -0
  892. /package/dist/{plot.wsi-2MU5BDG3.js.map → plot.wsi-C2DULA7U.js.map} +0 -0
  893. /package/dist/{profilePlot-OMVO3K4H.js.map → profilePlot-SVI3QKMD.js.map} +0 -0
  894. /package/dist/{qualitative-MEYBRUC6.js.map → qualitative-AQFKAZID.js.map} +0 -0
  895. /package/dist/{regression-ZPDPLI6G.js.map → regression-DLPBCDZT.js.map} +0 -0
  896. /package/dist/{regression.inputs-QOSBAGL6.js.map → regression.inputs-42LY4MEZ.js.map} +0 -0
  897. /package/dist/{regression.inputs.term-HMUMPY7X.js.map → regression.inputs.term-TTUFFPG6.js.map} +0 -0
  898. /package/dist/{regression.inputs.values.table-VMCTZHLG.js.map → regression.inputs.values.table-CJAPTSMS.js.map} +0 -0
  899. /package/dist/{regression.integration.spec-RP74JTAA.js.map → regression.integration.spec-UDA26OGS.js.map} +0 -0
  900. /package/dist/{regression.results-5XC6M67C.js.map → regression.results-IA3C7SHR.js.map} +0 -0
  901. /package/dist/{regression.spec-EZYM24J7.js.map → regression.spec-HEXCL3QV.js.map} +0 -0
  902. /package/dist/{report-ZOVQCOGQ.js.map → report-4CFOWNPJ.js.map} +0 -0
  903. /package/dist/{sampleScatter.spec-CD52FEOC.js.map → sampleScatter.spec-N6V4BQ5Q.js.map} +0 -0
  904. /package/dist/{sampleView-SVTLSWRG.js.map → sampleView-CZF7U23I.js.map} +0 -0
  905. /package/dist/{samplelst-HXF5POJD.js.map → samplelst-XUGDS5TU.js.map} +0 -0
  906. /package/dist/{samplematrix-NYDAH74I.js.map → samplematrix-R5PZLZDE.js.map} +0 -0
  907. /package/dist/{sc-JIDT4W4K.js.map → sc-WTZZA5J5.js.map} +0 -0
  908. /package/dist/{selectGenomeWithTklst-OSB7B6L3.js.map → selectGenomeWithTklst-2S2MXVCI.js.map} +0 -0
  909. /package/dist/{singleCellCellType-3BH7LWQ6.js.map → singleCellCellType-LJWFG7MY.js.map} +0 -0
  910. /package/dist/{singleCellCellType.unit.spec-RU4RJXFF.js.map → singleCellCellType.unit.spec-RGN2XVUR.js.map} +0 -0
  911. /package/dist/{singleCellGeneExpression-3UA4YER7.js.map → singleCellGeneExpression-IW2QXTTU.js.map} +0 -0
  912. /package/dist/{singleCellGeneExpression.unit.spec-4ZTBG37H.js.map → singleCellGeneExpression.unit.spec-4PO3Q7TM.js.map} +0 -0
  913. /package/dist/{singleCellPlot-ZUAWK5RE.js.map → singleCellPlot-6EZ6JXCM.js.map} +0 -0
  914. /package/dist/{singlecell-BGJZB7MF.js.map → singlecell-3LFPQ6KO.js.map} +0 -0
  915. /package/dist/{singlecell-RO3BL5OO.js.map → singlecell-NTTAVVMR.js.map} +0 -0
  916. /package/dist/{snp-HD7VQKBR.js.map → snp-XB4IBG4Z.js.map} +0 -0
  917. /package/dist/{snp.unit.spec-ISXCLMWW.js.map → snp.unit.spec-HAJPM53L.js.map} +0 -0
  918. /package/dist/{snplocus-IL5Z4XWV.js.map → snplocus-HE6TITSX.js.map} +0 -0
  919. /package/dist/{spliceevent.a53ss.diagram-LLJSPV7M.js.map → spliceevent.a53ss.diagram-TCZMBMD7.js.map} +0 -0
  920. /package/dist/{spliceevent.exonskip.diagram-LAOIOIST.js.map → spliceevent.exonskip.diagram-VESOF6UC.js.map} +0 -0
  921. /package/dist/{spliceevent.noeventdiagram-MVA7Q3HT.js.map → spliceevent.noeventdiagram-4K7FMO4F.js.map} +0 -0
  922. /package/dist/{ssGSEA-7T6S3DSE.js.map → ssGSEA-2XYMX36P.js.map} +0 -0
  923. /package/dist/{ssGSEA.unit.spec-XJ3W4NWX.js.map → ssGSEA.unit.spec-J36KM2HO.js.map} +0 -0
  924. /package/dist/{summarizeCnvGeneexp-RRP6JUV6.js.map → summarizeCnvGeneexp-LYVDZXXD.js.map} +0 -0
  925. /package/dist/{summarizeGeneexpSurvival-AFLHDD6Q.js.map → summarizeGeneexpSurvival-Y52TGAHF.js.map} +0 -0
  926. /package/dist/{summarizeMutationCnv-NABUYHMX.js.map → summarizeMutationCnv-6EEJT3PV.js.map} +0 -0
  927. /package/dist/{summarizeMutationDiagnosis-2LQ7JU3K.js.map → summarizeMutationDiagnosis-HZKXHOOQ.js.map} +0 -0
  928. /package/dist/{summarizeMutationSurvival-3WBT5TXG.js.map → summarizeMutationSurvival-TU7TQYFQ.js.map} +0 -0
  929. /package/dist/{summary-FRDKOFXW.js.map → summary-4QQZUAMU.js.map} +0 -0
  930. /package/dist/{summary.integration.spec-ZLRIA7G2.js.map → summary.integration.spec-SLIIM4HN.js.map} +0 -0
  931. /package/dist/{summaryInput-4JO6MHP4.js.map → summaryInput-6HROPKCE.js.map} +0 -0
  932. /package/dist/{sunburst-DRCVSC2X.js.map → sunburst-MBJJPERL.js.map} +0 -0
  933. /package/dist/{survival-AK75COPY.js.map → survival-CXLMQSV2.js.map} +0 -0
  934. /package/dist/{survival-IF5NI3A6.js.map → survival-QSL2KDKD.js.map} +0 -0
  935. /package/dist/{survival.integration.spec-7IWBTPJG.js.map → survival.integration.spec-EUAAALVW.js.map} +0 -0
  936. /package/dist/{svgraph-QBDF2SLB.js.map → svgraph-JM5MHQDX.js.map} +0 -0
  937. /package/dist/{svmr-O4GJJUT2.js.map → svmr-MCMST2FL.js.map} +0 -0
  938. /package/dist/{table-FQAIXKLE.js.map → table-MVX3IMAL.js.map} +0 -0
  939. /package/dist/{termCollection-ZO5PZ7E3.js.map → termCollection-FZ2SCVA7.js.map} +0 -0
  940. /package/dist/{termCollection-GMDDL3L7.js.map → termCollection-IGC7REFK.js.map} +0 -0
  941. /package/dist/{termCollection.unit.spec-5JBCTXHX.js.map → termCollection.unit.spec-VY2EZZIP.js.map} +0 -0
  942. /package/dist/{tk-GJX23IV7.js.map → tk-5F3TWZ2G.js.map} +0 -0
  943. /package/dist/{tp.ui-T7FVMTGQ.js.map → tp.ui-IURWTMAS.js.map} +0 -0
  944. /package/dist/{tvs.dt-X7L7NSU6.js.map → tvs.dt-BPZCFPYK.js.map} +0 -0
  945. /package/dist/{tvs.dtcnv.categorical-73G2V6CH.js.map → tvs.dtcnv.categorical-UFS62DTR.js.map} +0 -0
  946. /package/dist/{tvs.dtcnv.continuous-DWFJL3X7.js.map → tvs.dtcnv.continuous-R6YXNNLA.js.map} +0 -0
  947. /package/dist/{tvs.dtfusion-HQADHCSV.js.map → tvs.dtfusion-FGXXS4XX.js.map} +0 -0
  948. /package/dist/{tvs.dtsnvindel-PY5OBMGW.js.map → tvs.dtsnvindel-DR43K7X3.js.map} +0 -0
  949. /package/dist/{tvs.dtsv-OTBEEWSW.js.map → tvs.dtsv-NO34GIOL.js.map} +0 -0
  950. /package/dist/{tvs.numeric-WGDHEBJV.js.map → tvs.numeric-KYAU5OV3.js.map} +0 -0
  951. /package/dist/{tvs.samplelst-LCXSU5MG.js.map → tvs.samplelst-2QP7IV2Y.js.map} +0 -0
  952. /package/dist/{tvs.termCollection-L527XN4X.js.map → tvs.termCollection-UEJDG22G.js.map} +0 -0
  953. /package/dist/{violin-6VKRUQV3.js.map → violin-NBZTGGYF.js.map} +0 -0
  954. /package/dist/{violin.integration.spec-RJATDLQH.js.map → violin.integration.spec-5CLYJSAR.js.map} +0 -0
  955. /package/dist/{violin.interactivity-SKF5H7MN.js.map → violin.interactivity-KXVKTT22.js.map} +0 -0
  956. /package/dist/{violin.renderer-GB4TPX3B.js.map → violin.renderer-37OF6K7Q.js.map} +0 -0
  957. /package/dist/{vocabulary-D3W44IWE.js.map → vocabulary-GR6J3VKW.js.map} +0 -0
@@ -0,0 +1,3297 @@
1
+ import {
2
+ InvalidDataUI,
3
+ configUiInit,
4
+ fillbar,
5
+ getMaxLabelWidth,
6
+ getNormalRoot,
7
+ renderTable,
8
+ svgLegend,
9
+ table2col
10
+ } from "./chunk-KUZPTJJO.js";
11
+ import "./chunk-HJ6L54YS.js";
12
+ import "./chunk-LSEFWW72.js";
13
+ import "./chunk-C4BCMAIK.js";
14
+ import {
15
+ Menu
16
+ } from "./chunk-HYOEWQ5P.js";
17
+ import "./chunk-HBW42TDT.js";
18
+ import "./chunk-LQJMCE7G.js";
19
+ import "./chunk-FN5XPUPH.js";
20
+ import {
21
+ topBarInit
22
+ } from "./chunk-IIT367QZ.js";
23
+ import "./chunk-RZGEKL77.js";
24
+ import "./chunk-Z457XQSX.js";
25
+ import "./chunk-AI2LUQS6.js";
26
+ import {
27
+ dofetch3
28
+ } from "./chunk-2JR7RPB6.js";
29
+ import "./chunk-7IYJZZQI.js";
30
+ import {
31
+ copyMerge,
32
+ getCompInit,
33
+ multiInit
34
+ } from "./chunk-M3J4MINX.js";
35
+ import "./chunk-PF4DSFDR.js";
36
+ import "./chunk-TLTS33EY.js";
37
+ import "./chunk-2U2CP2Y2.js";
38
+ import {
39
+ bplen,
40
+ dtcnv,
41
+ dtfusionrna,
42
+ dtloh,
43
+ dtsnvindel,
44
+ dtsv,
45
+ mclass
46
+ } from "./chunk-ZF6HNVYD.js";
47
+ import "./chunk-BKPDYW5T.js";
48
+ import "./chunk-JNITUVXP.js";
49
+ import {
50
+ arc_default,
51
+ line_default,
52
+ pie_default,
53
+ ribbon_default
54
+ } from "./chunk-TJYRBEBK.js";
55
+ import "./chunk-LOZEKOES.js";
56
+ import "./chunk-VQZ2Z5YU.js";
57
+ import {
58
+ linear,
59
+ ticks
60
+ } from "./chunk-SOTB4FRE.js";
61
+ import "./chunk-TLT4YIG3.js";
62
+ import "./chunk-KYBIQBXE.js";
63
+ import {
64
+ pointer_default,
65
+ select_default
66
+ } from "./chunk-I6Y4O3RR.js";
67
+ import "./chunk-OMR2DT66.js";
68
+ import "./chunk-DQC5FFGV.js";
69
+ import "./chunk-HFNDKYVF.js";
70
+
71
+ // plots/disco/arc/FullArcRenderer.ts
72
+ var FullArcRenderer = class {
73
+ constructor(radius, width, color) {
74
+ this.radius = radius;
75
+ this.width = width;
76
+ this.color = color;
77
+ }
78
+ render(holder) {
79
+ const donutGenerator = arc_default();
80
+ const arc = {
81
+ startAngle: 0,
82
+ endAngle: Math.PI * 2,
83
+ innerRadius: this.radius,
84
+ outerRadius: this.radius + this.width,
85
+ color: this.color,
86
+ text: "No label"
87
+ };
88
+ const array = [];
89
+ array.push(arc);
90
+ const donutArc = holder.append("g");
91
+ donutArc.selectAll("path").data(array).enter().append("path").attr("d", (d) => donutGenerator(d)).attr("fill", (d) => d.color);
92
+ }
93
+ };
94
+
95
+ // plots/disco/menu/MenuProvider.ts
96
+ var MenuProvider = class {
97
+ static create() {
98
+ const menu = new Menu({ padding: 5 });
99
+ menu.d.style("border", "1px solid #FFF").style("position", "absolute").style("z-index", 1001);
100
+ return menu;
101
+ }
102
+ };
103
+
104
+ // plots/disco/fusion/FusionColorProvider.ts
105
+ var FusionColorProvider = class {
106
+ static getColor(chrA, chrB) {
107
+ if (chrA != chrB) {
108
+ return "#6A3D9A" /* Interchromosomal */.valueOf();
109
+ } else {
110
+ return "#1B9E77" /* Intrachromosomal */.valueOf();
111
+ }
112
+ }
113
+ };
114
+
115
+ // plots/disco/fusion/FusionRenderer.ts
116
+ var FusionRenderer = class {
117
+ constructor(genome) {
118
+ this.genome = genome;
119
+ }
120
+ render(holder, fusions, opacity = 1) {
121
+ let radius = 0;
122
+ const fusionsWithTarget = fusions.filter((f) => f.target);
123
+ if (fusionsWithTarget.length > 0) {
124
+ radius = fusionsWithTarget[0].target.radius;
125
+ const fullArcRenderer = new FullArcRenderer(radius, 2, "#6464641A");
126
+ fullArcRenderer.render(holder);
127
+ } else return;
128
+ const ribbon = ribbon_default().radius(radius);
129
+ const ribbons = holder.selectAll(".chord").data(fusions);
130
+ const menu = MenuProvider.create();
131
+ const createTooltip = this.createTooltip.bind(this);
132
+ const genome = this.genome;
133
+ ribbons.enter().append("path").attr("class", "chord").attr("d", ribbon).attr("fill", (fusion) => {
134
+ return FusionColorProvider.getColor(
135
+ fusion.source.positionInChromosome.chromosome,
136
+ fusion.target.positionInChromosome.chromosome
137
+ );
138
+ }).style("opacity", opacity).each(function(d) {
139
+ const path = select_default(this);
140
+ const tip = MenuProvider.create();
141
+ path.on("click", async function(event) {
142
+ tip.clear().show(event.x, event.y);
143
+ const div = tip.d.append("div");
144
+ await makeSvgraph(d, div, genome);
145
+ });
146
+ }).on("mouseover", async function(mouseEvent, fusion) {
147
+ const table = table2col({ holder: menu.d });
148
+ createTooltip(table, fusion);
149
+ menu.show(mouseEvent.x, mouseEvent.y);
150
+ }).on("mouseout", () => {
151
+ menu.clear();
152
+ menu.hide();
153
+ });
154
+ }
155
+ createTooltip(table, fusion) {
156
+ {
157
+ const [td1, td2] = table.addRow();
158
+ td1.text("Data type");
159
+ td2.append("span").style("margin-left", "5px").text("Fusion transcript");
160
+ }
161
+ {
162
+ const positionInChromosomeSource = fusion.source.positionInChromosome;
163
+ const positionInChromosomeTarget = fusion.target.positionInChromosome;
164
+ const [td1, td2] = table.addRow();
165
+ td1.text("Position");
166
+ td2.append("span").style("margin-left", "5px").text(
167
+ ` ${fusion.source.gene || ""} ${positionInChromosomeSource.chromosome}:${positionInChromosomeSource.position} ${fusion.source.strand === "+" ? "forward" : "reverse"} > ${fusion.target.gene || ""} ${positionInChromosomeTarget.chromosome}:${positionInChromosomeTarget.position} ${fusion.target.strand === "+" ? "forward" : "reverse"} `
168
+ );
169
+ }
170
+ }
171
+ };
172
+ async function makeSvgraph(fusion, div, genome) {
173
+ const wait = div.append("div").text("Loading...");
174
+ const svpair = {
175
+ a: {
176
+ chr: fusion.source.positionInChromosome.chromosome,
177
+ position: fusion.source.positionInChromosome.position,
178
+ strand: fusion.source.strand
179
+ },
180
+ b: {
181
+ chr: fusion.target.positionInChromosome.chromosome,
182
+ position: fusion.target.positionInChromosome.position,
183
+ strand: fusion.target.strand
184
+ }
185
+ };
186
+ await getGm(svpair.a, genome.name, fusion.source.gene);
187
+ await getGm(svpair.b, genome.name, fusion.target.gene);
188
+ wait.remove();
189
+ const _ = await import("./svgraph-JM5MHQDX.js");
190
+ _.default({
191
+ pairlst: [svpair],
192
+ genome,
193
+ holder: div
194
+ });
195
+ }
196
+ async function getGm(p, genome, name) {
197
+ const d = await dofetch3("isoformbycoord", {
198
+ body: { genome, chr: p.chr, pos: p.position }
199
+ });
200
+ if (d.error) throw d.error;
201
+ const u = d.lst.find((i) => i.isdefault && name === i.name) || d.lst[0];
202
+ if (u) {
203
+ p.name = u.name;
204
+ p.gm = { isoform: u.isoform };
205
+ }
206
+ }
207
+
208
+ // plots/disco/DiscoRenderer.ts
209
+ var DiscoRenderer = class {
210
+ constructor(renders, legendRenderer, genome) {
211
+ this.renders = renders;
212
+ this.legendRenderer = legendRenderer;
213
+ this.fusionRenderer = new FusionRenderer(genome);
214
+ }
215
+ render(holder, viewModel, onCnvSourceSelect) {
216
+ const svgDiv = holder.append("div").style("display", "inline-block").style("font-family", "Arial");
217
+ 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);
218
+ const mainG = svg.append("g").attr("class", "mainG").attr(
219
+ "transform",
220
+ `translate(${viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 100},${viewModel.height / 2})`
221
+ );
222
+ for (const [ringType, renderer] of this.renders) {
223
+ const elements = viewModel.getElements(ringType);
224
+ const collisions = viewModel.getCollisions(ringType);
225
+ renderer.render(mainG, elements, collisions);
226
+ }
227
+ this.fusionRenderer.render(mainG, viewModel.fusions, viewModel.settings.Disco.fusionOpacity);
228
+ if (viewModel.settings.Disco.centerText) {
229
+ const chrRingBbox = mainG.select('[data-testid="sjpp_chromosomes_arc_group"]').node().getBBox();
230
+ const text = viewModel.settings.Disco.centerText.length > 20 ? viewModel.settings.Disco.centerText.slice(0, 20) + "..." : viewModel.settings.Disco.centerText;
231
+ const textElem = mainG.append("text").attr("class", "sjpp-disco-center-text").text(text);
232
+ const textBbox = textElem.node().getBBox();
233
+ textElem.attr("transform", `translate(${chrRingBbox.x + chrRingBbox.width / 2 - textBbox.width / 2},0)`);
234
+ }
235
+ this.legendRenderer.render(
236
+ mainG,
237
+ viewModel.legend,
238
+ -1 * (viewModel.settings.rings.labelLinesInnerRadius + viewModel.settings.rings.labelsToLinesDistance + 75),
239
+ viewModel.width,
240
+ viewModel.height / 2,
241
+ viewModel,
242
+ onCnvSourceSelect
243
+ );
244
+ }
245
+ };
246
+
247
+ // plots/disco/interactions/DiscoInteractions.ts
248
+ var DiscoInteractions = class {
249
+ constructor(discoApp) {
250
+ this.discoApp = discoApp;
251
+ this.downloadClickListener = (svg) => {
252
+ const downloadImgName = this.discoApp.state.settings.downloadImgName || "disco.plot";
253
+ const a = document.createElement("a");
254
+ document.body.appendChild(a);
255
+ a.addEventListener(
256
+ "click",
257
+ () => {
258
+ const serializer = new XMLSerializer();
259
+ const svg_blob = new Blob([serializer.serializeToString(svg)], {
260
+ type: "image/svg+xml"
261
+ });
262
+ a.download = downloadImgName + ".svg";
263
+ a.href = URL.createObjectURL(svg_blob);
264
+ document.body.removeChild(a);
265
+ },
266
+ false
267
+ );
268
+ a.click();
269
+ };
270
+ this.geneClickListener = async (gene, mnames) => {
271
+ const { filter, filter0 } = this.discoApp.app.getState().termfilter;
272
+ const arg = {
273
+ holder: this.discoApp.app.opts.holder,
274
+ genome: this.discoApp.app.opts.state.args.genome,
275
+ nobox: true,
276
+ query: gene,
277
+ tklst: [
278
+ {
279
+ type: "mds3",
280
+ dslabel: this.discoApp.app.opts.state.vocab.dslabel,
281
+ hlaachange: mnames.join(","),
282
+ filter0,
283
+ filterObj: getNormalRoot(filter)
284
+ // must not pass filter as frozen. pass unfrozen, normalized copy so mds3 code will work
285
+ }
286
+ ]
287
+ };
288
+ const _ = await import("./block.init-IJBRPZNM.js");
289
+ await _.default(arg);
290
+ };
291
+ this.colorScaleNumericInputsCallback = async (obj) => {
292
+ const callAppDispatch = (settings) => {
293
+ this.discoApp.app.dispatch({
294
+ type: "plot_edit",
295
+ id: this.discoApp.id,
296
+ config: { settings: { Disco: Object.assign({ cnvCutoffMode: obj.cutoffMode }, settings) } }
297
+ });
298
+ };
299
+ if (obj.cutoffMode == "auto") {
300
+ if (obj.min == null || obj.max == null)
301
+ throw new Error('Color scale must return min and max if cutoffMode "auto"');
302
+ callAppDispatch({
303
+ cnvCapping: this.discoApp.state.settings.cnv.capping,
304
+ cnvPercentile: this.discoApp.state.settings.cnv.percentile
305
+ });
306
+ } else if (obj.cutoffMode == "fixed") {
307
+ if (obj.min == null || obj.max == null)
308
+ throw new Error('Color scale must return min and max if cutoffMode "fixed"');
309
+ const diffValue = obj.max !== this.discoApp.state.settings.cnv.capping ? obj.max : Math.abs(obj.min);
310
+ callAppDispatch({
311
+ cnvCapping: diffValue
312
+ });
313
+ } else if (obj.cutoffMode == "percentile") callAppDispatch({ cnvPercentile: obj.percentile });
314
+ else throw new Error("Unknown cutoff mode returned from dom/ColorScale");
315
+ };
316
+ this.onMutationWaterfallColorChange = (color) => {
317
+ this.discoApp.app.dispatch({
318
+ type: "plot_edit",
319
+ id: this.discoApp.id,
320
+ config: { settings: { Disco: { mutationWaterfallColor: color } } }
321
+ });
322
+ };
323
+ }
324
+ };
325
+
326
+ // plots/disco/chromosome/Reference.ts
327
+ var Reference = class {
328
+ /**
329
+ * Creates a Reference object that contains information about chromosomes.
330
+ * @param settings State settings
331
+ * @param chromosomes Chromosome order. This function formats into an obj with `chr` removed.
332
+ * @param chromosomeOverride Obj of chromsome keys and sizes. Filtered to remove hidden chromosomes in settings.
333
+ */
334
+ constructor(settings, chromosomes, chromosomeOverride) {
335
+ this.chromosomes = [];
336
+ this.chromosomesOrder = [];
337
+ this.keysArray = [];
338
+ this.totalSizeArray = [];
339
+ this.chrSizesArray = [];
340
+ const chrSizes = chromosomeOverride || chromosomes;
341
+ this.settings = settings;
342
+ this.chromosomesOrder = [];
343
+ let totalSize = 0;
344
+ this.totalPadAngle = Object.keys(chrSizes).length * this.settings.padAngle;
345
+ this.totalChromosomesAngle = 2 * Math.PI - this.totalPadAngle;
346
+ for (const chr in chrSizes) {
347
+ const key = chr.slice(0, 3) === "chr" ? chr.slice(3) : chr;
348
+ this.chromosomesOrder.push(chr);
349
+ this.keysArray.push(key);
350
+ this.totalSizeArray.push(totalSize);
351
+ this.chrSizesArray.push(chrSizes[chr]);
352
+ totalSize += chrSizes[chr];
353
+ }
354
+ this.totalSize = totalSize;
355
+ let lastAngle = 0;
356
+ for (let i = 0; i < this.keysArray.length; i++) {
357
+ const chromosomeAngle = this.totalChromosomesAngle * (this.chrSizesArray[i] / totalSize);
358
+ const startAngle = i == 0 ? this.settings.padAngle / 2 : lastAngle + this.settings.padAngle;
359
+ const endAngle = i == 0 ? this.settings.padAngle / 2 + chromosomeAngle : lastAngle + this.settings.padAngle + chromosomeAngle;
360
+ const chromosome = {
361
+ start: this.totalSizeArray[i],
362
+ size: this.chrSizesArray[i],
363
+ factor: 1,
364
+ startAngle,
365
+ endAngle,
366
+ angle: (startAngle + endAngle) / 2,
367
+ innerRadius: this.settings.rings.chromosomeInnerRadius,
368
+ outerRadius: this.settings.rings.chromosomeInnerRadius + this.settings.rings.chromosomeWidth,
369
+ color: "#AAA",
370
+ text: this.keysArray[i]
371
+ };
372
+ this.chromosomes.push(chromosome);
373
+ if (chromosome.endAngle != null) {
374
+ lastAngle = chromosome.endAngle;
375
+ }
376
+ }
377
+ }
378
+ };
379
+
380
+ // plots/disco/data/DataObjectMapper.ts
381
+ var DataObjectMapper = class {
382
+ constructor(sampleName, prioritizedGenes) {
383
+ this.sampleName = sampleName;
384
+ this.prioritizedGenes = prioritizedGenes;
385
+ }
386
+ map(dObject) {
387
+ return {
388
+ dt: dObject.dt,
389
+ mname: dObject.mname,
390
+ mClass: dObject.class,
391
+ gene: dObject.gene,
392
+ chr: dObject.chr,
393
+ ref: dObject.ref,
394
+ alt: dObject.alt,
395
+ vafs: dObject.vafs,
396
+ position: dObject.pos ? dObject.pos : dObject.position,
397
+ poschr: dObject.poschr,
398
+ posbins: dObject.posbins,
399
+ poslabel: dObject.poslabel,
400
+ sampleName: this.sampleName,
401
+ ssm_id: dObject.ssm_id,
402
+ start: dObject.start,
403
+ stop: dObject.stop,
404
+ value: dObject.value,
405
+ segmean: dObject.segmean,
406
+ isPrioritized: this.prioritizedGenes.some((cancerGene) => cancerGene == dObject.gene),
407
+ chrA: dObject.chrA,
408
+ chrB: dObject.chrB,
409
+ geneA: dObject.geneA,
410
+ geneB: dObject.geneB,
411
+ posA: dObject.posA,
412
+ posB: dObject.posB,
413
+ strandA: dObject.strandA,
414
+ strandB: dObject.strandB
415
+ };
416
+ }
417
+ };
418
+
419
+ // plots/disco/data/PercentileMapper.ts
420
+ var PercentileMapper = class {
421
+ map(data, percentile) {
422
+ return this.calculatePercentileForPositivesAndNegatives(data, percentile);
423
+ }
424
+ calculatePercentileForPositivesAndNegatives(data, percentile) {
425
+ const positives = data.filter((x) => x > 0);
426
+ const negatives = data.filter((x) => x < 0).map((x) => -1 * x);
427
+ let positive = NaN;
428
+ let negative = NaN;
429
+ if (positives.length > 0) {
430
+ positive = this.calculatePercentile(positives, percentile);
431
+ }
432
+ if (negatives.length > 0) {
433
+ negative = -1 * this.calculatePercentile(negatives, percentile);
434
+ }
435
+ return { positive, negative };
436
+ }
437
+ calculatePercentile(data, percentile) {
438
+ if (data.length === 0) {
439
+ throw new Error("Array must contain at least one element.");
440
+ }
441
+ const sortedValues = data.sort((a, b) => a - b);
442
+ const index = percentile / 100 * (sortedValues.length - 1);
443
+ const lowerIndex = Math.floor(index);
444
+ const upperIndex = Math.ceil(index);
445
+ const fraction = index - lowerIndex;
446
+ if (lowerIndex === upperIndex) {
447
+ return sortedValues[lowerIndex];
448
+ }
449
+ return sortedValues[lowerIndex] + fraction * (sortedValues[upperIndex] - sortedValues[lowerIndex]);
450
+ }
451
+ };
452
+
453
+ // plots/disco/snv/vafTooltip.ts
454
+ function getIntegerCount(v) {
455
+ if (Number.isInteger(v)) return v;
456
+ if (typeof v == "string" && /^-?\d+$/.test(v)) {
457
+ const n = Number(v);
458
+ if (Number.isInteger(n)) return n;
459
+ }
460
+ return null;
461
+ }
462
+ function getReadCounts(refCountValue, altCountValue, totalCountValue) {
463
+ const altCount = getIntegerCount(altCountValue);
464
+ if (altCount == null || altCount < 0) return null;
465
+ const totalCount = getIntegerCount(totalCountValue);
466
+ if (totalCount != null) {
467
+ if (totalCount <= 0 || totalCount < altCount) return null;
468
+ return { altCount, refCount: totalCount - altCount, totalCount };
469
+ }
470
+ const refCount = getIntegerCount(refCountValue);
471
+ if (refCount == null || refCount < 0 || refCount + altCount <= 0) return null;
472
+ return { altCount, refCount, totalCount: refCount + altCount };
473
+ }
474
+ function hasValidReadCounts(refCountValue, altCountValue, totalCountValue) {
475
+ return getReadCounts(refCountValue, altCountValue, totalCountValue) != null;
476
+ }
477
+ function getVafEntries(vafs) {
478
+ const entries = [];
479
+ if (Array.isArray(vafs)) {
480
+ for (const vaf of vafs) {
481
+ const label = vaf?.id || vaf?.name;
482
+ const refCount = vaf?.refCount;
483
+ const totalCount = vaf?.totalCount;
484
+ const altCount = vaf?.altCount;
485
+ if (!label || altCount == null || refCount == null && totalCount == null) continue;
486
+ const entry = { label, altCount };
487
+ if (refCount != null) entry.refCount = refCount;
488
+ if (totalCount != null) entry.totalCount = totalCount;
489
+ entries.push(entry);
490
+ }
491
+ }
492
+ return entries;
493
+ }
494
+ function getNumericFraction(v) {
495
+ if (typeof v != "number" && typeof v != "string") return null;
496
+ const n = Number(v);
497
+ return Number.isFinite(n) && n >= 0 && n <= 1 ? n : null;
498
+ }
499
+ function getMutationFractions(vafs) {
500
+ const fractions = [];
501
+ if (!Array.isArray(vafs)) return fractions;
502
+ for (const vaf of vafs) {
503
+ const explicitFraction = getNumericFraction(vaf?.fraction ?? vaf?.mutationFraction);
504
+ if (explicitFraction != null) {
505
+ fractions.push(explicitFraction);
506
+ continue;
507
+ }
508
+ const counts = getReadCounts(vaf?.refCount, vaf?.altCount, vaf?.totalCount);
509
+ if (!counts) continue;
510
+ fractions.push(counts.altCount / counts.totalCount);
511
+ }
512
+ return fractions;
513
+ }
514
+ function getMaxMutationFraction(vafs) {
515
+ const fractions = getMutationFractions(vafs);
516
+ return fractions.length ? Math.max(...fractions) : null;
517
+ }
518
+ function hasAnyValidVafEntry(vafs) {
519
+ return getVafEntries(vafs).some((vaf) => hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount));
520
+ }
521
+ function appendVafBar(td2, refCountValue, altCountValue, label = "VAF", totalCountValue) {
522
+ const counts = getReadCounts(refCountValue, altCountValue, totalCountValue);
523
+ if (!counts) return;
524
+ const fraction = counts.altCount / counts.totalCount;
525
+ const div = td2.append("div").style("margin-left", "5px").style("margin-top", "4px").style("display", "flex").style("align-items", "center").style("gap", "6px");
526
+ div.append("span").style("font-size", "0.8em").style("color", "#555").text(label);
527
+ fillbar(div, { f: fraction, v1: counts.altCount, v2: counts.totalCount });
528
+ }
529
+ function appendVafBars(td2, vafs) {
530
+ for (const vaf of getVafEntries(vafs)) {
531
+ if (!hasValidReadCounts(vaf.refCount, vaf.altCount, vaf.totalCount)) continue;
532
+ appendVafBar(td2, vaf.refCount, vaf.altCount, vaf.label, vaf.totalCount);
533
+ }
534
+ }
535
+
536
+ // plots/disco/data/DataMapper.ts
537
+ var DataMapper = class _DataMapper {
538
+ constructor(settings, reference, sample, prioritizedGenes = []) {
539
+ // remove fields and extract filters to seperate classes
540
+ this.labelData = [];
541
+ this.nonExonicSnvData = [];
542
+ this.nonExonicInnerRadius = 0;
543
+ this.snvRingDataMap = /* @__PURE__ */ new Map();
544
+ this.snvInnerRadius = 0;
545
+ this.snvData = [];
546
+ this.bpx = 0;
547
+ this.onePxArcAngle = 0;
548
+ this.filteredSnvData = [];
549
+ this.filteredSnvCountByChr = /* @__PURE__ */ new Map();
550
+ this.lohData = [];
551
+ this.lohInnerRadius = 0;
552
+ this.cnvData = [];
553
+ this.cnvInnerRadius = 0;
554
+ this.fusionData = [];
555
+ this.fusionRadius = 0;
556
+ this.hasPrioritizedGenes = false;
557
+ this.hasWaterfallEligibleChromosome = false;
558
+ this.invalidEntries = [];
559
+ this.cnvLossMaxValue = 0;
560
+ this.cnvGainMaxValue = 0;
561
+ this.percentilePositive = 0;
562
+ this.percentileNegative = 0;
563
+ this.cnvMaxPercentileAbs = 0;
564
+ this.mutationWaterfallData = [];
565
+ this.hasMutationFractionData = false;
566
+ this.mutationWaterfallInnerRadius = 0;
567
+ this.mutationWaterfallRangeMin = Infinity;
568
+ this.mutationWaterfallRangeMax = -Infinity;
569
+ this.lohMaxValue = void 0;
570
+ this.lohMinValue = void 0;
571
+ this.snvFilter = (data) => data.dt == dtsnvindel;
572
+ this.fusionFilter = (data) => data.dt == dtfusionrna || data.dt == dtsv;
573
+ this.cnvFilter = (data) => data.dt == dtcnv;
574
+ this.lohFilter = (data) => data.dt == dtloh;
575
+ this.compareData = (a, b) => {
576
+ const chrDiff = this.reference.chromosomesOrder.indexOf(a.chr) - this.reference.chromosomesOrder.indexOf(b.chr);
577
+ if (chrDiff != 0) {
578
+ return chrDiff;
579
+ }
580
+ const aPos = a.pos ? a.pos : a.start;
581
+ const bPos = b.pos ? b.pos : b.start;
582
+ return aPos - bPos;
583
+ };
584
+ this.settings = settings;
585
+ this.reference = reference;
586
+ this.sample = sample;
587
+ this.excludedChromosomes = this.settings.Disco.hiddenChromosomes;
588
+ this.lastInnerRadious = this.settings.rings.chromosomeInnerRadius;
589
+ this.gainCapped = this.settings.Disco.cnvCapping;
590
+ this.lossCapped = -1 * this.settings.Disco.cnvCapping;
591
+ this.nonExonicFilter = (data) => {
592
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
593
+ return prioritizedGenes.includes(data.gene) && settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
594
+ } else {
595
+ return settings.rings.nonExonicFilterValues.includes(ViewModelMapper.snvClassLayer[data.mClass]);
596
+ }
597
+ };
598
+ this.snvRingFilter = (data) => {
599
+ if (prioritizedGenes.length > 0 && this.settings.Disco.prioritizeGeneLabelsByGeneSets) {
600
+ return prioritizedGenes.includes(data.gene) && settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
601
+ } else {
602
+ return settings.rings.snvRingFilters.includes(ViewModelMapper.snvClassLayer[data.mClass]);
603
+ }
604
+ };
605
+ this.dataObjectMapper = new DataObjectMapper(sample, prioritizedGenes);
606
+ }
607
+ map(data) {
608
+ const dataArray = [];
609
+ this.filteredSnvCountByChr.clear();
610
+ this.hasWaterfallEligibleChromosome = false;
611
+ this.mutationWaterfallData = [];
612
+ this.mutationWaterfallInnerRadius = 0;
613
+ this.mutationWaterfallRangeMin = Infinity;
614
+ this.mutationWaterfallRangeMax = -Infinity;
615
+ this.hasMutationFractionData = false;
616
+ data.forEach((dObject) => {
617
+ if (dObject.dt == dtsnvindel && getMaxMutationFraction(dObject.vafs) != null) {
618
+ this.hasMutationFractionData = true;
619
+ }
620
+ const index = this.reference.chromosomesOrder.indexOf(dObject.chr);
621
+ const indexA = this.reference.chromosomesOrder.indexOf(dObject.chrA);
622
+ const indexB = this.reference.chromosomesOrder.indexOf(dObject.chrB);
623
+ if (dObject.dt == dtsnvindel) {
624
+ if (index != -1 && this.snvData.length < this.settings.snv.maxMutationCount) {
625
+ const pos = dObject.pos ?? dObject.position;
626
+ const chrSize = this.reference.chromosomes[index].size;
627
+ if (Number.isFinite(pos) && pos >= 0 && pos <= chrSize) {
628
+ this.addData(dObject, dataArray);
629
+ } else {
630
+ this.invalidEntries.push({ dataType: "SNV", reason: `Position ${pos} outside of ${dObject.chr}` });
631
+ }
632
+ } else if (index == -1) {
633
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
634
+ this.invalidEntries.push({ dataType: "SNV", reason: `Unknown chr ${dObject.chr}` });
635
+ }
636
+ }
637
+ } else if (dObject.dt == dtfusionrna || dObject.dt == dtsv) {
638
+ if (indexA != -1 && indexB != -1) {
639
+ const posA = dObject.posA;
640
+ const posB = dObject.posB;
641
+ const chrSizeA = this.reference.chromosomes[indexA].size;
642
+ const chrSizeB = this.reference.chromosomes[indexB].size;
643
+ if (Number.isFinite(posA) && Number.isFinite(posB) && posA >= 0 && posA <= chrSizeA && posB >= 0 && posB <= chrSizeB) {
644
+ this.addData(dObject, dataArray);
645
+ } else {
646
+ const reasonParts = [];
647
+ if (!(Number.isFinite(posA) && posA >= 0 && posA <= chrSizeA))
648
+ reasonParts.push(`Position ${posA} outside of ${dObject.chrA}`);
649
+ if (!(Number.isFinite(posB) && posB >= 0 && posB <= chrSizeB))
650
+ reasonParts.push(`Position ${posB} outside of ${dObject.chrB}`);
651
+ this.invalidEntries.push({ dataType: "Fusion", reason: reasonParts.join("; ") });
652
+ }
653
+ } else {
654
+ const missing = [];
655
+ if (indexA == -1 && !this.excludedChromosomes.includes(dObject.chrA)) missing.push(dObject.chrA);
656
+ if (indexB == -1 && !this.excludedChromosomes.includes(dObject.chrB)) missing.push(dObject.chrB);
657
+ if (missing.length) this.invalidEntries.push({ dataType: "Fusion", reason: "Unknown chr in fusion" });
658
+ }
659
+ } else if ([dtcnv, dtloh].includes(Number(dObject.dt))) {
660
+ const idx = this.reference.chromosomesOrder.indexOf(dObject.chr);
661
+ if (dObject.chr && idx != -1) {
662
+ const chrSize = this.reference.chromosomes[idx].size;
663
+ const start = dObject.start;
664
+ const stop = dObject.stop;
665
+ if (Number.isFinite(start) && Number.isFinite(stop) && start >= 0 && stop <= chrSize && start <= stop) {
666
+ this.addData(dObject, dataArray);
667
+ } else {
668
+ this.invalidEntries.push({
669
+ dataType: dObject.dt == dtcnv ? "CNV" : "LOH",
670
+ reason: `Position ${start}-${stop} outside of ${dObject.chr}`
671
+ });
672
+ }
673
+ } else {
674
+ if (!this.excludedChromosomes.includes(dObject.chr)) {
675
+ this.invalidEntries.push({
676
+ dataType: dObject.dt == dtcnv ? "CNV" : "LOH",
677
+ reason: `Unknown chr ${dObject.chr}`
678
+ });
679
+ }
680
+ }
681
+ } else {
682
+ throw Error("Unknown mutation type!");
683
+ }
684
+ });
685
+ const sortedData = dataArray.sort(this.compareData);
686
+ if (this.settings.rings.nonExonicRingEnabled) {
687
+ sortedData.forEach((data2) => {
688
+ this.filterNonExonicSnvData(data2);
689
+ });
690
+ }
691
+ if (this.nonExonicSnvData.length > 0) {
692
+ this.nonExonicInnerRadius = this.lastInnerRadious - this.settings.rings.nonExonicRingWidth;
693
+ this.lastInnerRadious = this.nonExonicInnerRadius;
694
+ }
695
+ sortedData.forEach((data2) => {
696
+ this.filterSnvs(data2);
697
+ });
698
+ this.hasWaterfallEligibleChromosome = Array.from(this.filteredSnvCountByChr.values()).some((count) => count >= 2);
699
+ if (this.settings.Disco.mutationWaterfallPlot && this.hasWaterfallEligibleChromosome) {
700
+ this.prepareMutationWaterfallData();
701
+ }
702
+ sortedData.forEach((data2) => {
703
+ this.filterLohs(data2);
704
+ });
705
+ if (this.lohData.length > 0) {
706
+ this.lohInnerRadius = this.lastInnerRadious - this.settings.rings.lohRingWidth;
707
+ this.lastInnerRadious = this.lohInnerRadius;
708
+ }
709
+ sortedData.forEach((data2) => {
710
+ this.filterCnvs(data2);
711
+ });
712
+ if (this.cnvData.length > 0) {
713
+ this.cnvInnerRadius = this.lastInnerRadious - this.settings.rings.cnvRingWidth;
714
+ this.lastInnerRadious = this.cnvInnerRadius;
715
+ this.cappedCnvMaxAbsValue = Math.min(
716
+ this.settings.Disco.cnvCapping,
717
+ Math.max(
718
+ Math.abs(_DataMapper.capMaxValue(this.cnvLossMaxValue, this.gainCapped, this.lossCapped)),
719
+ Math.abs(_DataMapper.capMaxValue(this.cnvGainMaxValue, this.gainCapped, this.lossCapped))
720
+ )
721
+ );
722
+ const percentilePair = new PercentileMapper().map(
723
+ this.cnvData.map((data2) => data2.value),
724
+ this.settings.Disco.cnvPercentile
725
+ );
726
+ this.percentilePositive = _DataMapper.capMaxValue(percentilePair.positive, this.gainCapped, this.lossCapped);
727
+ this.percentileNegative = _DataMapper.capMaxValue(percentilePair.negative, this.gainCapped, this.lossCapped);
728
+ this.cnvMaxPercentileAbs = Math.min(
729
+ this.settings.Disco.cnvCapping,
730
+ Math.max(this.percentilePositive, Math.abs(this.percentileNegative))
731
+ );
732
+ }
733
+ sortedData.forEach((data2) => {
734
+ this.filterFusion(data2);
735
+ });
736
+ if (this.fusionData.length > 0) {
737
+ this.fusionRadius = this.lastInnerRadious;
738
+ }
739
+ const dataHolder = {
740
+ labelData: this.labelData,
741
+ nonExonicSnvData: this.nonExonicSnvData,
742
+ nonExonicInnerRadius: this.nonExonicInnerRadius,
743
+ snvRingDataMap: this.snvRingDataMap,
744
+ snvInnerRadius: this.snvInnerRadius,
745
+ snvData: this.snvData,
746
+ bpx: this.bpx,
747
+ onePxArcAngle: this.onePxArcAngle,
748
+ filteredSnvData: this.filteredSnvData,
749
+ lohData: this.lohData,
750
+ lohInnerRadius: this.lohInnerRadius,
751
+ cnvData: this.cnvData,
752
+ cnvInnerRadius: this.cnvInnerRadius,
753
+ fusionData: this.fusionData,
754
+ fusionRadius: this.fusionRadius,
755
+ hasPrioritizedGenes: this.hasPrioritizedGenes,
756
+ hasWaterfallEligibleChromosome: this.hasWaterfallEligibleChromosome,
757
+ cnvGainMaxValue: this.cnvGainMaxValue,
758
+ cnvLossMaxValue: this.cnvLossMaxValue,
759
+ cappedCnvMaxAbsValue: this.cappedCnvMaxAbsValue,
760
+ percentilePositive: this.percentilePositive,
761
+ percentileNegative: this.percentileNegative,
762
+ cnvMaxPercentileAbs: this.cnvMaxPercentileAbs,
763
+ lohMaxValue: this.lohMaxValue,
764
+ lohMinValue: this.lohMinValue,
765
+ hasMutationFractionData: this.hasMutationFractionData,
766
+ mutationWaterfallData: this.mutationWaterfallData,
767
+ mutationWaterfallInnerRadius: this.mutationWaterfallInnerRadius,
768
+ mutationWaterfallLogRange: this.mutationWaterfallData.length ? { min: this.mutationWaterfallRangeMin, max: this.mutationWaterfallRangeMax } : void 0,
769
+ invalidDataInfo: {
770
+ entries: this.invalidEntries,
771
+ errorMsg: `Entries listed above were skipped due to invalid or unsupported chromosome information.`
772
+ }
773
+ };
774
+ return dataHolder;
775
+ }
776
+ addData(dObject, dataArray) {
777
+ const instance = this.dataObjectMapper.map(dObject);
778
+ if (instance.isPrioritized) {
779
+ this.hasPrioritizedGenes = true;
780
+ }
781
+ dataArray.push(instance);
782
+ }
783
+ filterNonExonicSnvData(data) {
784
+ if (this.snvFilter(data) && this.passesMutationFractionFilter(data)) {
785
+ if (this.settings.rings.nonExonicRingEnabled && this.nonExonicFilter(data)) {
786
+ this.nonExonicSnvData.push(data);
787
+ }
788
+ }
789
+ }
790
+ filterSnvs(data) {
791
+ if (this.snvFilter(data)) {
792
+ this.snvData.push(data);
793
+ if (this.passesMutationFractionFilter(data) && this.snvRingFilter(data)) {
794
+ if (this.snvInnerRadius == 0) {
795
+ this.snvInnerRadius = this.lastInnerRadious - this.settings.rings.snvRingWidth;
796
+ this.lastInnerRadious = this.snvInnerRadius;
797
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * this.snvInnerRadius));
798
+ this.onePxArcAngle = 1 / this.snvInnerRadius;
799
+ }
800
+ this.filteredSnvData.push(data);
801
+ this.labelData.push(data);
802
+ const currentCount = this.filteredSnvCountByChr.get(data.chr) || 0;
803
+ this.filteredSnvCountByChr.set(data.chr, currentCount + 1);
804
+ const arcAngle = this.calculateArcAngle(data);
805
+ let dataArray = this.snvRingDataMap.get(arcAngle);
806
+ if (!dataArray) {
807
+ dataArray = new Array();
808
+ }
809
+ dataArray.push(data);
810
+ this.snvRingDataMap.set(arcAngle, dataArray);
811
+ }
812
+ }
813
+ }
814
+ passesMutationFractionFilter(data) {
815
+ if (!this.hasMutationFractionData) return true;
816
+ const minMutationFraction = this.settings.Disco.minMutationFraction || 0;
817
+ if (minMutationFraction <= 0) return true;
818
+ const fraction = getMaxMutationFraction(data.vafs);
819
+ return fraction != null && fraction >= minMutationFraction;
820
+ }
821
+ filterFusion(data) {
822
+ if (this.fusionFilter(data)) {
823
+ data.isPrioritized = true;
824
+ this.fusionData.push(data);
825
+ this.labelData.push(data);
826
+ }
827
+ }
828
+ filterLohs(data) {
829
+ if (this.lohFilter(data)) {
830
+ if (this.lohMaxValue == void 0 || this.lohMaxValue < data.value) {
831
+ this.lohMaxValue = data.segmean;
832
+ }
833
+ if (this.lohMinValue == void 0 || this.lohMinValue > data.value) {
834
+ this.lohMinValue = data.segmean;
835
+ }
836
+ this.lohData.push(data);
837
+ }
838
+ }
839
+ filterCnvs(data) {
840
+ if (this.cnvFilter(data)) {
841
+ if (!data.chr || this.reference.chromosomesOrder.indexOf(data.chr) == -1) {
842
+ return;
843
+ }
844
+ if (this.cnvGainMaxValue == void 0 || this.cnvGainMaxValue < data.value) {
845
+ this.cnvGainMaxValue = data.value;
846
+ }
847
+ if (this.cnvLossMaxValue == void 0 || this.cnvLossMaxValue > data.value) {
848
+ this.cnvLossMaxValue = data.value;
849
+ }
850
+ this.cnvData.push(data);
851
+ }
852
+ }
853
+ prepareMutationWaterfallData() {
854
+ this.mutationWaterfallInnerRadius = this.lastInnerRadious - this.settings.rings.mutationWaterfallRingWidth;
855
+ this.lastInnerRadious = this.mutationWaterfallInnerRadius;
856
+ const groupedSnvs = /* @__PURE__ */ new Map();
857
+ const firstMutationByChr = [];
858
+ for (const snv of this.filteredSnvData) {
859
+ const list = groupedSnvs.get(snv.chr) || [];
860
+ list.push(snv);
861
+ groupedSnvs.set(snv.chr, list);
862
+ }
863
+ for (const [, snvs] of groupedSnvs) {
864
+ if (snvs.length < 2) continue;
865
+ snvs.sort((a, b) => a.position - b.position);
866
+ firstMutationByChr.push({
867
+ chr: snvs[0].chr,
868
+ position: snvs[0].position,
869
+ logDistance: 0
870
+ // placeholder updated after range computed
871
+ });
872
+ for (let i = 1; i < snvs.length; i++) {
873
+ const prev = snvs[i - 1];
874
+ const curr = snvs[i];
875
+ const distance = Math.max(1, Math.abs(curr.position - prev.position));
876
+ const logDistance = Math.log10(distance);
877
+ this.mutationWaterfallData.push({
878
+ chr: curr.chr,
879
+ position: curr.position,
880
+ logDistance
881
+ });
882
+ if (logDistance < this.mutationWaterfallRangeMin) {
883
+ this.mutationWaterfallRangeMin = logDistance;
884
+ }
885
+ if (logDistance > this.mutationWaterfallRangeMax) {
886
+ this.mutationWaterfallRangeMax = logDistance;
887
+ }
888
+ }
889
+ }
890
+ if (!this.mutationWaterfallData.length) {
891
+ this.mutationWaterfallRangeMin = 0;
892
+ this.mutationWaterfallRangeMax = 0;
893
+ }
894
+ const topLogDistance = this.mutationWaterfallRangeMax;
895
+ for (const first of firstMutationByChr) {
896
+ this.mutationWaterfallData.push({
897
+ ...first,
898
+ logDistance: topLogDistance
899
+ });
900
+ }
901
+ }
902
+ calculateArcAngle(data) {
903
+ const currentChromosome = this.reference.chromosomes[this.reference.chromosomesOrder.findIndex((chromosomeOrder) => data.chr == chromosomeOrder)];
904
+ const dataAnglePos = Math.floor(data.position / this.bpx);
905
+ return currentChromosome.startAngle + dataAnglePos * this.onePxArcAngle;
906
+ }
907
+ static capMaxValue(value, gainCapped, lossCapped) {
908
+ if (value && Math.sign(value) == 1) {
909
+ return value > gainCapped ? gainCapped : value;
910
+ }
911
+ if (Math.sign(value) == -1) {
912
+ return value < lossCapped ? lossCapped : value;
913
+ }
914
+ return 0;
915
+ }
916
+ static capMinValue(value, capMinValue = 1) {
917
+ if (Math.sign(value) == 1) {
918
+ return value > capMinValue ? value : capMinValue;
919
+ }
920
+ if (Math.sign(value) == -1) {
921
+ return value < -1 * capMinValue ? value : -1 * capMinValue;
922
+ }
923
+ return 1;
924
+ }
925
+ };
926
+
927
+ // plots/disco/legend/Legend.ts
928
+ var Legend = class {
929
+ constructor(snvTitle, cnvTitle, lohTitle, fusionTitle, cnvPercentile, cnvCutoffmode, snvClassMap, cnvClassMap, cnvRenderingType, fusionLegend, discoInteractions, lohLegend, mutationWaterfallLegend, fusionLegendCounts = { interchromosomal: 0, intrachromosomal: 0 }) {
930
+ this.snvTitle = snvTitle;
931
+ this.cnvTitle = cnvTitle;
932
+ this.lohTitle = lohTitle;
933
+ this.fusionTitle = fusionTitle;
934
+ this.cnvPercentile = cnvPercentile;
935
+ this.cnvCutoffMode = cnvCutoffmode;
936
+ this.snvClassMap = snvClassMap;
937
+ this.cnvClassMap = cnvClassMap;
938
+ this.cnvRenderingType = cnvRenderingType;
939
+ this.lohLegend = lohLegend;
940
+ this.fusionLegend = fusionLegend;
941
+ this.fusionLegendCounts = fusionLegendCounts;
942
+ this.discoInteractions = discoInteractions;
943
+ this.mutationWaterfallLegend = mutationWaterfallLegend;
944
+ }
945
+ legendCount() {
946
+ return (this.snvClassMap.size > 0 ? 1 : 0) + (this.cnvClassMap.size > 0 ? 1 : 0) + (this.lohLegend ? 1 : 0) + (this.fusionLegend ? 1 : 0) + (this.mutationWaterfallLegend ? 1 : 0);
947
+ }
948
+ };
949
+
950
+ // plots/disco/fusion/Fusion.ts
951
+ var Fusion = class {
952
+ constructor(source, target, genes, count, endpts) {
953
+ this.source = source;
954
+ this.target = target;
955
+ this.genes = genes;
956
+ this.count = count;
957
+ this.endpts = endpts;
958
+ }
959
+ };
960
+
961
+ // plots/disco/fusion/FusionSubgroup.ts
962
+ var FusionSubgroup = class {
963
+ constructor(startAngle, endAngle, radius, gene, value, genes, positionInChromosome, strand) {
964
+ this.startAngle = startAngle;
965
+ this.endAngle = endAngle;
966
+ this.radius = radius;
967
+ this.gene = gene;
968
+ this.value = value;
969
+ this.genes = genes;
970
+ this.positionInChromosome = positionInChromosome;
971
+ this.strand = strand;
972
+ }
973
+ };
974
+
975
+ // plots/disco/fusion/FusionMapper.ts
976
+ var FusionMapper = class {
977
+ constructor(radius, sampleName, reference) {
978
+ this.radius = radius;
979
+ this.sampleName = sampleName;
980
+ this.reference = reference;
981
+ }
982
+ map(fusionData) {
983
+ const fusions = [];
984
+ fusionData.forEach((data) => {
985
+ const genes = /* @__PURE__ */ new Set();
986
+ genes.add(data.geneA);
987
+ genes.add(data.geneB);
988
+ const startAngle = this.calculateStartAngle(data.chrA, data.posA);
989
+ const endAngle = this.calculateEndAngle(data.chrA, data.posA);
990
+ if (startAngle === null || endAngle === null) return;
991
+ const source = new FusionSubgroup(
992
+ startAngle,
993
+ endAngle,
994
+ this.radius,
995
+ data.geneA,
996
+ data.value,
997
+ genes,
998
+ {
999
+ chromosome: data.chrA,
1000
+ position: data.posA
1001
+ },
1002
+ data.strandA
1003
+ );
1004
+ let target;
1005
+ if (data.chrB && data.posB) {
1006
+ const startAngle2 = this.calculateStartAngle(data.chrB, data.posB);
1007
+ const endAngle2 = this.calculateEndAngle(data.chrB, data.posB);
1008
+ if (startAngle2 === null || endAngle2 === null) return;
1009
+ target = new FusionSubgroup(
1010
+ startAngle2,
1011
+ endAngle2,
1012
+ this.radius,
1013
+ data.geneB,
1014
+ data.value,
1015
+ genes,
1016
+ {
1017
+ chromosome: data.chrB,
1018
+ position: data.posB
1019
+ },
1020
+ data.strandB
1021
+ );
1022
+ }
1023
+ const fusion = new Fusion(source, target, "genes", -1, "Endpoints");
1024
+ fusions.push(fusion);
1025
+ });
1026
+ return fusions;
1027
+ }
1028
+ calculateStartAngle(chr, pos) {
1029
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1030
+ if (index === -1) return null;
1031
+ const chromosome = this.reference.chromosomes[index];
1032
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size) - 0.01;
1033
+ }
1034
+ calculateEndAngle(chr, pos) {
1035
+ const index = this.reference.chromosomesOrder.indexOf(chr);
1036
+ if (index === -1) return null;
1037
+ const chromosome = this.reference.chromosomes[index];
1038
+ return 0.01 + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(pos) / chromosome.size);
1039
+ }
1040
+ };
1041
+
1042
+ // plots/disco/loh/GradientColorProvider.ts
1043
+ var GradientColorProvider = class {
1044
+ static provide(value) {
1045
+ const clampedValue = Math.min(Math.max(value, 0), 1);
1046
+ const colorValue = Math.round(clampedValue * 255);
1047
+ return `rgb(${colorValue}, ${colorValue}, ${colorValue})`;
1048
+ }
1049
+ };
1050
+
1051
+ // plots/disco/loh/LohLegend.ts
1052
+ var LohLegend = class {
1053
+ constructor(minValue, maxValue) {
1054
+ this.minValue = minValue;
1055
+ this.maxValue = maxValue;
1056
+ this.colorStartValue = GradientColorProvider.provide(minValue);
1057
+ this.colorEndValue = GradientColorProvider.provide(maxValue);
1058
+ }
1059
+ };
1060
+
1061
+ // plots/disco/viewmodel/ViewModel.ts
1062
+ var ViewModel = class {
1063
+ constructor(settings, rings, legend, fusions, dataHolder, genesetName, snvDataLengthAll) {
1064
+ this.settings = settings;
1065
+ this.rings = rings;
1066
+ this.legend = legend;
1067
+ this.fusions = fusions;
1068
+ this.genesetName = genesetName;
1069
+ const tempHolder = select_default("body").append("div").style("position", "absolute").style("visibility", "hidden");
1070
+ const tempSvg = tempHolder.append("svg");
1071
+ const labels = rings.labelsRing?.elementsToDisplay?.map((l) => l.text) || [];
1072
+ const maxLabelSpace = getMaxLabelWidth(tempSvg, labels);
1073
+ tempHolder.remove();
1074
+ this.width = 2 * (this.settings.horizontalPadding + this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + maxLabelSpace);
1075
+ this.height = 2 * (this.settings.rings.labelLinesInnerRadius + this.settings.rings.labelsToLinesDistance + this.settings.verticalPadding + this.settings.label.fontSize * 2 + maxLabelSpace);
1076
+ this.legendHeight = this.calculateLegendHeight(legend);
1077
+ this.snvDataLength = dataHolder.snvData.length;
1078
+ this.filteredSnvDataLength = dataHolder.filteredSnvData.length;
1079
+ this.snvDataLengthAll = snvDataLengthAll;
1080
+ this.cnvMaxValue = dataHolder.cnvGainMaxValue;
1081
+ this.cnvMinValue = dataHolder.cnvLossMaxValue;
1082
+ this.cappedCnvMaxAbsValue = dataHolder.cappedCnvMaxAbsValue;
1083
+ this.negativePercentile = dataHolder.percentileNegative;
1084
+ this.positivePercentile = dataHolder.percentilePositive;
1085
+ this.invalidDataInfo = dataHolder.invalidDataInfo;
1086
+ this.canShowMutationWaterfallPlot = dataHolder.hasWaterfallEligibleChromosome;
1087
+ this.hasMutationFractionData = dataHolder.hasMutationFractionData;
1088
+ }
1089
+ getElements(ringType) {
1090
+ switch (ringType) {
1091
+ case 0 /* CHROMOSOME */:
1092
+ return this.rings.chromosomesRing ? this.rings.chromosomesRing.elements : [];
1093
+ case 1 /* LABEL */:
1094
+ return this.rings.labelsRing.elementsToDisplay;
1095
+ case 2 /* NONEXONICSNV */:
1096
+ return this.rings.nonExonicArcRing ? this.rings.nonExonicArcRing.elements : [];
1097
+ case 3 /* SNV */:
1098
+ return this.rings.snvArcRing ? this.rings.snvArcRing.elements : [];
1099
+ case 5 /* CNV */:
1100
+ return this.rings.cnvArcRing ? this.rings.cnvArcRing.elements : [];
1101
+ case 6 /* LOH */:
1102
+ return this.rings.lohArcRing ? this.rings.lohArcRing.elements : [];
1103
+ case 4 /* MUTATION_WATERFALL */:
1104
+ return this.rings.mutationWaterfallRing ? this.rings.mutationWaterfallRing.elements : [];
1105
+ default:
1106
+ throw new Error(`ringType ${ringType} not defined`);
1107
+ }
1108
+ }
1109
+ getCollisions(ringType) {
1110
+ if (ringType == 1 /* LABEL */) {
1111
+ return this.rings.labelsRing.collisions;
1112
+ } else {
1113
+ return void 0;
1114
+ }
1115
+ }
1116
+ calculateLegendHeight(legend) {
1117
+ const rawHeight = this.settings.legend.rowHeight;
1118
+ return rawHeight * legend.legendCount();
1119
+ }
1120
+ };
1121
+
1122
+ // plots/disco/ring/Ring.ts
1123
+ var Ring = class {
1124
+ constructor(innerRadius, width, elements) {
1125
+ this.innerRadius = innerRadius;
1126
+ this.outerRadius = innerRadius + width;
1127
+ this.width = width;
1128
+ this.elements = elements;
1129
+ }
1130
+ };
1131
+
1132
+ // plots/disco/label/MLabel.ts
1133
+ var MLabel = class _MLabel {
1134
+ /**
1135
+ * The Singleton's constructor should always be private to prevent direct
1136
+ * construction calls with the `new` operator.
1137
+ */
1138
+ constructor() {
1139
+ const mlabel = {};
1140
+ for (const key in mclass) {
1141
+ mlabel[mclass[key].label] = mclass[key];
1142
+ mlabel[key] = mclass[key];
1143
+ }
1144
+ this.mlabel = mlabel;
1145
+ }
1146
+ /**
1147
+ * The static method that controls the access to the singleton instance.
1148
+ *
1149
+ * This implementation let you subclass the Singleton class while keeping
1150
+ * just one instance of each subclass around.
1151
+ */
1152
+ static getInstance() {
1153
+ if (!_MLabel.instance) {
1154
+ _MLabel.instance = new _MLabel();
1155
+ }
1156
+ return _MLabel.instance;
1157
+ }
1158
+ };
1159
+
1160
+ // plots/disco/snv/SnvLegendElement.ts
1161
+ var SnvLegendElement = class {
1162
+ constructor(snvType, color, count) {
1163
+ this.snvType = snvType;
1164
+ this.color = color;
1165
+ this.count = count;
1166
+ }
1167
+ };
1168
+
1169
+ // plots/disco/snv/SnvArcsMapper.ts
1170
+ var SnvArcsMapper = class {
1171
+ constructor(svnInnerRadius, svnWidth, sampleName, reference) {
1172
+ this.snvClassMap = /* @__PURE__ */ new Map();
1173
+ this.svnInnerRadius = svnInnerRadius;
1174
+ this.svnWidth = svnWidth;
1175
+ this.sampleName = sampleName;
1176
+ this.reference = reference;
1177
+ this.bpx = Math.floor(this.reference.totalSize / (this.reference.totalChromosomesAngle * svnInnerRadius));
1178
+ this.onePxArcAngle = 1 / svnInnerRadius;
1179
+ }
1180
+ map(exonicSnvDataMap) {
1181
+ const snvArray = [];
1182
+ for (const angle of exonicSnvDataMap.keys()) {
1183
+ const array = exonicSnvDataMap.get(angle);
1184
+ if (array) {
1185
+ const arraySize = array.length;
1186
+ for (let i = 0; i < array.length; i++) {
1187
+ const data = array[i];
1188
+ const snvLegendElement = this.snvClassMap.get(data.mClass);
1189
+ if (snvLegendElement) {
1190
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, ++snvLegendElement.count));
1191
+ } else {
1192
+ this.snvClassMap.set(data.mClass, this.createSnvLegend(data.mClass, 1));
1193
+ }
1194
+ const startAngle = angle;
1195
+ const endAngle = angle + this.onePxArcAngle;
1196
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1197
+ const arc = {
1198
+ startAngle,
1199
+ endAngle,
1200
+ innerRadius: this.svnInnerRadius + i * this.svnWidth / arraySize,
1201
+ outerRadius: this.svnInnerRadius + (i + 1) * this.svnWidth / arraySize,
1202
+ color: mLabel.color,
1203
+ text: data.gene,
1204
+ dataClass: mLabel.label,
1205
+ mname: data.mname,
1206
+ chr: data.chr,
1207
+ pos: data.position,
1208
+ vafs: data.vafs,
1209
+ sampleName: [data.sampleName]
1210
+ };
1211
+ snvArray.push(arc);
1212
+ }
1213
+ }
1214
+ }
1215
+ return snvArray;
1216
+ }
1217
+ createSnvLegend(dataClass, count) {
1218
+ const mClass = MLabel.getInstance().mlabel[dataClass];
1219
+ return new SnvLegendElement(mClass.label, mClass.color, count);
1220
+ }
1221
+ };
1222
+
1223
+ // plots/disco/cnv/CnvLegend.ts
1224
+ var CnvLegend = class {
1225
+ constructor(text, cnvType, color, value) {
1226
+ this.text = text;
1227
+ this.cnvType = cnvType;
1228
+ this.color = color;
1229
+ this.value = value;
1230
+ }
1231
+ };
1232
+
1233
+ // plots/disco/cnv/CnvColorProvider.ts
1234
+ var CnvColorProvider = class {
1235
+ static getColor(value, settings, cnvMaxPercentileAbs = 0) {
1236
+ const cnv = settings.cnv;
1237
+ const gainCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? settings.Disco.cnvCapping : cnvMaxPercentileAbs;
1238
+ const lossCapped = settings.Disco.cnvRenderingType == "heatmap" /* heatmap */ ? -1 * settings.Disco.cnvCapping : -1 * cnvMaxPercentileAbs;
1239
+ if (value < lossCapped) {
1240
+ return cnv.cappedLossColor;
1241
+ } else if (value >= lossCapped && value <= 0) {
1242
+ return cnv.lossColor;
1243
+ } else if (value > 0 && value <= gainCapped) {
1244
+ return cnv.ampColor;
1245
+ } else {
1246
+ return cnv.cappedAmpColor;
1247
+ }
1248
+ }
1249
+ };
1250
+
1251
+ // plots/disco/cnv/CnvArcsMapper.ts
1252
+ var CnvArcsMapper = class {
1253
+ constructor(cnvInnerRadius, cnvWidth, settings, sampleName, reference, cnvMaxValue = 0, cnvMinValue = 0, cnvMaxAbsValue = 0, cnvAbsPercentile = 0, cnvUnit = "", cnvRenderingType) {
1254
+ this.cnvClassMap = /* @__PURE__ */ new Map();
1255
+ this.cnvInnerRadius = cnvInnerRadius;
1256
+ this.cnvWidth = cnvWidth;
1257
+ this.settings = settings;
1258
+ this.sampleName = sampleName;
1259
+ this.reference = reference;
1260
+ this.cnvMaxValue = cnvMaxValue;
1261
+ this.cnvMinValue = cnvMinValue;
1262
+ this.cnvMaxAbsValue = cnvMaxAbsValue;
1263
+ this.cnvAbsPercentile = cnvAbsPercentile;
1264
+ this.cnvUnit = cnvUnit;
1265
+ this.cnvRenderingType = cnvRenderingType;
1266
+ this.gainCapped = Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1267
+ this.lossCapped = -1 * Math.min(cnvAbsPercentile, this.settings.Disco.cnvCapping);
1268
+ this.lossOnly = cnvMaxValue <= 0;
1269
+ this.gainOnly = cnvMinValue >= 0;
1270
+ this.onePxArcAngle = 1 / this.cnvInnerRadius;
1271
+ const gain = new CnvLegend(
1272
+ "Max",
1273
+ cnvMaxValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1274
+ this.getColor(cnvMaxValue),
1275
+ cnvMaxValue
1276
+ );
1277
+ const loss = new CnvLegend(
1278
+ "Min",
1279
+ cnvMinValue > 0 ? 1 /* Gain */ : 0 /* Loss */,
1280
+ this.getColor(cnvMinValue),
1281
+ cnvMinValue
1282
+ );
1283
+ const cap = new CnvLegend(
1284
+ "Capping",
1285
+ 0 /* Loss */,
1286
+ this.getColor(cnvMinValue > 0 ? cnvMinValue : cnvMaxValue),
1287
+ this.settings.Disco.cnvCapping
1288
+ );
1289
+ this.cnvClassMap.set(1 /* Gain */, gain);
1290
+ this.cnvClassMap.set(0 /* Loss */, loss);
1291
+ this.cnvClassMap.set(2 /* Cap */, cap);
1292
+ }
1293
+ map(arcData) {
1294
+ const arcs = [];
1295
+ arcData.forEach((data) => {
1296
+ let startAngle = this.calculateStartAngle(data);
1297
+ let endAngle = this.calculateEndAngle(data);
1298
+ if (startAngle === null || endAngle === null) return;
1299
+ if (endAngle - startAngle < this.onePxArcAngle) {
1300
+ const restAngle = this.onePxArcAngle - (endAngle - startAngle);
1301
+ startAngle = startAngle - restAngle / 2;
1302
+ endAngle = startAngle + restAngle / 2;
1303
+ }
1304
+ const innerRadius = this.calculateInnerRadius(data);
1305
+ const outerRadius = this.calculateOuterRadius(data);
1306
+ const color = this.getColor(data.value);
1307
+ const arc = {
1308
+ startAngle,
1309
+ endAngle,
1310
+ innerRadius,
1311
+ outerRadius,
1312
+ color,
1313
+ text: data.gene,
1314
+ chr: data.chr,
1315
+ start: data.start,
1316
+ stop: data.stop,
1317
+ value: data.value,
1318
+ unit: this.cnvUnit,
1319
+ sampleName: [this.sampleName]
1320
+ };
1321
+ arcs.push(arc);
1322
+ });
1323
+ return arcs;
1324
+ }
1325
+ calculateStartAngle(data) {
1326
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1327
+ if (index == -1) return null;
1328
+ const chromosome = this.reference.chromosomes[index];
1329
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1330
+ }
1331
+ calculateEndAngle(data) {
1332
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1333
+ const chromosome = this.reference.chromosomes[index];
1334
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1335
+ }
1336
+ getColor(value) {
1337
+ return CnvColorProvider.getColor(value, this.settings, this.cnvAbsPercentile);
1338
+ }
1339
+ calculateInnerRadius(data) {
1340
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1341
+ return this.cnvInnerRadius;
1342
+ }
1343
+ if (this.gainOnly) {
1344
+ return this.cnvInnerRadius;
1345
+ }
1346
+ if (this.lossOnly) {
1347
+ const outerRadius = this.cnvInnerRadius + this.cnvWidth;
1348
+ return outerRadius + DataMapper.capMinValue(
1349
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1350
+ );
1351
+ }
1352
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1353
+ if (Math.sign(data.value) == 1) {
1354
+ return centerRadius;
1355
+ }
1356
+ if (Math.sign(data.value) == -1) {
1357
+ return centerRadius + DataMapper.capMinValue(
1358
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile * (this.cnvWidth / 2)
1359
+ );
1360
+ }
1361
+ return 1;
1362
+ }
1363
+ calculateOuterRadius(data) {
1364
+ const maxOuterRadius = this.cnvInnerRadius + this.cnvWidth;
1365
+ if (this.cnvRenderingType == "heatmap" /* heatmap */) {
1366
+ return maxOuterRadius;
1367
+ }
1368
+ if (this.gainOnly) {
1369
+ return this.cnvInnerRadius + DataMapper.capMinValue(
1370
+ this.cnvWidth * DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvAbsPercentile
1371
+ );
1372
+ }
1373
+ if (this.lossOnly) {
1374
+ return maxOuterRadius;
1375
+ }
1376
+ const centerRadius = this.cnvInnerRadius + this.cnvWidth / 2;
1377
+ if (Math.sign(data.value) == 1) {
1378
+ return centerRadius + DataMapper.capMinValue(
1379
+ DataMapper.capMaxValue(data.value, this.gainCapped, this.lossCapped) / this.cnvMaxAbsValue * (this.cnvWidth / 2)
1380
+ );
1381
+ }
1382
+ if (Math.sign(data.value) == -1) {
1383
+ return centerRadius;
1384
+ }
1385
+ return 1;
1386
+ }
1387
+ };
1388
+
1389
+ // plots/disco/label/Line.ts
1390
+ var Line = class {
1391
+ constructor(points, color) {
1392
+ this.points = new Array();
1393
+ this.points = points;
1394
+ this.color = color;
1395
+ }
1396
+ };
1397
+
1398
+ // plots/disco/label/LabelFactory.ts
1399
+ var LabelFactory = class {
1400
+ static createLabel(startAngle, endAngle, innerRadius, outerRadius, value, gene, color, dataClass, chr, position, isPrioritized = false, labelsToLinesGap, mutationTooltip, fusionTooltip) {
1401
+ const angle = (startAngle + endAngle) / 2;
1402
+ const ccAngle = angle - Math.PI / 2;
1403
+ const transform = `rotate(${angle * 180 / Math.PI - 90}) translate(${outerRadius})${angle > Math.PI ? "rotate(180)" : ""}`;
1404
+ const textAnchor = angle > Math.PI ? "end" : "";
1405
+ const r0 = innerRadius;
1406
+ const r1 = outerRadius - labelsToLinesGap;
1407
+ const points = [];
1408
+ const point0 = {
1409
+ x: r0 * Math.cos(ccAngle),
1410
+ y: r0 * Math.sin(ccAngle)
1411
+ };
1412
+ const point1 = {
1413
+ x: r1 * Math.cos(ccAngle),
1414
+ y: r1 * Math.sin(ccAngle)
1415
+ };
1416
+ points.push(point0);
1417
+ points.push(point1);
1418
+ const line = new Line(points, color);
1419
+ const label = {
1420
+ startAngle,
1421
+ endAngle,
1422
+ innerRadius,
1423
+ outerRadius,
1424
+ angle,
1425
+ value,
1426
+ text: gene,
1427
+ color,
1428
+ transform,
1429
+ textAnchor,
1430
+ ccAngle,
1431
+ line,
1432
+ isPrioritized,
1433
+ start: position,
1434
+ stop: position,
1435
+ chr,
1436
+ mutationsTooltip: mutationTooltip ? [mutationTooltip] : void 0,
1437
+ fusionTooltip: fusionTooltip ? [fusionTooltip] : void 0
1438
+ };
1439
+ return label;
1440
+ }
1441
+ static createMovedLabel(element, overlap) {
1442
+ const startAngle = element.startAngle + overlap;
1443
+ const endAngle = element.endAngle + overlap;
1444
+ const angle = (startAngle + endAngle) / 2;
1445
+ const ccAngle = angle - Math.PI / 2;
1446
+ const r0 = element.innerRadius;
1447
+ const r1 = element.outerRadius - 2;
1448
+ const dr = (r1 - r0) / 3;
1449
+ const cos0 = Math.cos(element.ccAngle);
1450
+ const sin0 = Math.sin(element.ccAngle);
1451
+ const cos1 = Math.cos(element.ccAngle + overlap);
1452
+ const sin1 = Math.sin(element.ccAngle + overlap);
1453
+ const points = [];
1454
+ const point0 = {
1455
+ x: r0 * cos0,
1456
+ y: r0 * sin0
1457
+ };
1458
+ const point1 = {
1459
+ x: (r0 + dr) * cos0,
1460
+ y: (r0 + dr) * sin0
1461
+ };
1462
+ const point2 = {
1463
+ x: (r0 + 2 * dr) * cos1,
1464
+ y: (r0 + 2 * dr) * sin1
1465
+ };
1466
+ const point3 = {
1467
+ x: (r0 + 3 * dr) * cos1,
1468
+ y: (r0 + 3 * dr) * sin1
1469
+ };
1470
+ points.push(point0);
1471
+ points.push(point1);
1472
+ points.push(point2);
1473
+ points.push(point3);
1474
+ const line = new Line(points, element.color);
1475
+ const transform = "rotate(" + (angle * 180 / Math.PI - 90) + ")translate(" + element.outerRadius + ")" + (angle > Math.PI ? "rotate(180)" : "");
1476
+ const textAnchor = angle > Math.PI ? "end" : "";
1477
+ const color = element.mutationsTooltip ? element.mutationsTooltip[0].color : element.fusionTooltip ? element.fusionTooltip[0].color : void 0;
1478
+ const label = {
1479
+ startAngle,
1480
+ endAngle,
1481
+ innerRadius: element.innerRadius,
1482
+ outerRadius: element.outerRadius,
1483
+ angle,
1484
+ value: element.value,
1485
+ text: element.text,
1486
+ transform,
1487
+ textAnchor,
1488
+ ccAngle,
1489
+ color,
1490
+ line,
1491
+ isPrioritized: element.isPrioritized,
1492
+ start: element.start,
1493
+ stop: element.stop,
1494
+ chr: element.chr,
1495
+ mutationsTooltip: element.mutationsTooltip,
1496
+ fusionTooltip: element.fusionTooltip
1497
+ };
1498
+ return label;
1499
+ }
1500
+ };
1501
+
1502
+ // plots/disco/label/LabelsMapper.ts
1503
+ var LabelsMapper = class {
1504
+ constructor(settings, sampleName, reference, cnvMaxPercentileAbs = 0) {
1505
+ this.labelMap = /* @__PURE__ */ new Map();
1506
+ this.settings = settings;
1507
+ this.sampleName = sampleName;
1508
+ this.reference = reference;
1509
+ this.cnvMaxPercentileAbs = cnvMaxPercentileAbs;
1510
+ }
1511
+ map(data, cnvData = []) {
1512
+ const innerRadius = this.settings.rings.labelLinesInnerRadius;
1513
+ const outerRadius = innerRadius + this.settings.rings.labelsToLinesDistance;
1514
+ data.forEach((data2) => {
1515
+ if (data2.dt == dtsnvindel) {
1516
+ const startAngle = this.calculateStartAngle(data2.chr, data2.position);
1517
+ const endAngle = this.calculateEndAngle(data2.chr, data2.position);
1518
+ if (startAngle === null || endAngle === null) return;
1519
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data2.mClass] : void 0;
1520
+ this.addLabelOrMutation(
1521
+ data2,
1522
+ data2.gene,
1523
+ data2.mname,
1524
+ startAngle,
1525
+ endAngle,
1526
+ innerRadius,
1527
+ outerRadius,
1528
+ mLabel.color,
1529
+ mLabel.label
1530
+ );
1531
+ }
1532
+ if (data2.dt == dtfusionrna) {
1533
+ const color = FusionColorProvider.getColor(data2.chrA, data2.chrB);
1534
+ if (data2.geneA) {
1535
+ const startAngleSource = this.calculateStartAngle(data2.chrA, data2.posA);
1536
+ const endAngleSource = this.calculateEndAngle(data2.chrA, data2.posA);
1537
+ if (startAngleSource === null || endAngleSource === null) return;
1538
+ this.addLabelOrFusion(
1539
+ data2,
1540
+ data2.geneA,
1541
+ data2.posA,
1542
+ startAngleSource,
1543
+ endAngleSource,
1544
+ innerRadius,
1545
+ outerRadius,
1546
+ color
1547
+ );
1548
+ }
1549
+ if (data2.geneB && data2.geneA != data2.geneB) {
1550
+ const startAngleTarget = this.calculateStartAngle(data2.chrB, data2.posB);
1551
+ const endAngleTarget = this.calculateEndAngle(data2.chrB, data2.posB);
1552
+ if (startAngleTarget == null || endAngleTarget == null) return;
1553
+ this.addLabelOrFusion(
1554
+ data2,
1555
+ data2.geneB,
1556
+ data2.posB,
1557
+ startAngleTarget,
1558
+ endAngleTarget,
1559
+ innerRadius,
1560
+ outerRadius,
1561
+ color
1562
+ );
1563
+ }
1564
+ }
1565
+ });
1566
+ const labelsArray = Array.from(this.labelMap.values());
1567
+ labelsArray.forEach((label) => {
1568
+ cnvData.forEach((cnv) => {
1569
+ if (label.stop >= cnv.start && cnv.stop >= label.start && label.chr == cnv.chr) {
1570
+ const mutation = {
1571
+ value: cnv.value,
1572
+ color: CnvColorProvider.getColor(cnv.value, this.settings, this.cnvMaxPercentileAbs),
1573
+ chr: cnv.chr,
1574
+ start: cnv.start,
1575
+ stop: cnv.stop
1576
+ };
1577
+ if (label.cnvTooltip) {
1578
+ label.cnvTooltip.push(mutation);
1579
+ } else {
1580
+ label.cnvTooltip = [];
1581
+ label.cnvTooltip.push(mutation);
1582
+ }
1583
+ }
1584
+ });
1585
+ });
1586
+ return Array.from(this.labelMap.values());
1587
+ }
1588
+ addLabelOrMutation(data, gene, mname, startAngle, endAngle, innerRadius, outerRadius, color, dataClass) {
1589
+ const label = this.labelMap.get(gene);
1590
+ const mutation = {
1591
+ mname,
1592
+ color,
1593
+ dataClass,
1594
+ chr: data.chr,
1595
+ position: data.position,
1596
+ vafs: data.vafs
1597
+ };
1598
+ if (!label) {
1599
+ this.labelMap.set(
1600
+ gene,
1601
+ LabelFactory.createLabel(
1602
+ startAngle,
1603
+ endAngle,
1604
+ innerRadius,
1605
+ outerRadius,
1606
+ data.value,
1607
+ gene,
1608
+ color,
1609
+ dataClass,
1610
+ data.chr,
1611
+ data.position,
1612
+ data.isPrioritized,
1613
+ this.settings.rings.labelsToLinesGap,
1614
+ mutation
1615
+ )
1616
+ );
1617
+ } else {
1618
+ if (label.mutationsTooltip) {
1619
+ label.start = Math.min(label.start, data.position);
1620
+ label.stop = Math.max(label.stop, data.position);
1621
+ label.mutationsTooltip.push(mutation);
1622
+ } else {
1623
+ label.mutationsTooltip = [];
1624
+ label.start = Math.min(label.start, data.position);
1625
+ label.stop = Math.max(label.stop, data.position);
1626
+ label.mutationsTooltip.push(mutation);
1627
+ }
1628
+ }
1629
+ }
1630
+ addLabelOrFusion(data, gene, position, startAngle, endAngle, innerRadius, outerRadius, color) {
1631
+ const label = this.labelMap.get(gene);
1632
+ const fusionTooltip = {
1633
+ color,
1634
+ chrA: data.chrA,
1635
+ chrB: data.chrB,
1636
+ posA: data.posA,
1637
+ posB: data.posB,
1638
+ geneA: data.geneA,
1639
+ geneB: data.geneB,
1640
+ strandA: data.strandA,
1641
+ strandB: data.strandB
1642
+ };
1643
+ if (!label) {
1644
+ this.labelMap.set(
1645
+ gene,
1646
+ LabelFactory.createLabel(
1647
+ startAngle,
1648
+ endAngle,
1649
+ innerRadius,
1650
+ outerRadius,
1651
+ data.value,
1652
+ gene,
1653
+ color,
1654
+ "Fusion transcript",
1655
+ data.chr,
1656
+ data.position,
1657
+ data.isPrioritized,
1658
+ this.settings.rings.labelsToLinesGap,
1659
+ void 0,
1660
+ fusionTooltip
1661
+ )
1662
+ );
1663
+ } else {
1664
+ if (label.fusionTooltip) {
1665
+ label.start = Math.min(label.start, position);
1666
+ label.stop = Math.max(label.stop, position);
1667
+ label.fusionTooltip.push(fusionTooltip);
1668
+ } else {
1669
+ label.fusionTooltip = [];
1670
+ label.start = Math.min(label.start, position);
1671
+ label.stop = Math.max(label.stop, position);
1672
+ label.fusionTooltip.push(fusionTooltip);
1673
+ }
1674
+ }
1675
+ }
1676
+ calculateStartAngle(chr, position) {
1677
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1678
+ if (index === -1) return null;
1679
+ const chromosome = this.reference.chromosomes[index];
1680
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1681
+ }
1682
+ calculateEndAngle(chr, position) {
1683
+ const index = this.reference.chromosomesOrder.findIndex((element) => element == chr);
1684
+ if (index === -1) return null;
1685
+ const chromosome = this.reference.chromosomes[index];
1686
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(position) / chromosome.size);
1687
+ }
1688
+ };
1689
+
1690
+ // plots/disco/label/Labels.ts
1691
+ var Labels = class extends Ring {
1692
+ constructor(settings, elements, hasPrioritizedGenes) {
1693
+ super(
1694
+ settings.rings.labelLinesInnerRadius,
1695
+ settings.rings.labelsToLinesDistance,
1696
+ elements.sort((a, b) => {
1697
+ return a.startAngle < b.startAngle ? -1 : a.startAngle > b.startAngle ? 1 : 0;
1698
+ })
1699
+ );
1700
+ this.elementsToDisplay = [];
1701
+ this.settings = settings;
1702
+ this.hasPrioritizedGenes = hasPrioritizedGenes;
1703
+ const circumference = 2 * Math.PI * (settings.rings.labelLinesInnerRadius + settings.rings.labelsToLinesDistance);
1704
+ this.overlapAngle = this.settings.label.overlapAngleFactor * this.settings.label.fontSize / circumference;
1705
+ this.calculateCollisions();
1706
+ }
1707
+ calculateCollisions() {
1708
+ this.collisions = [];
1709
+ let hasPrioritizedGenesList = [];
1710
+ hasPrioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1711
+ if (this.settings.label.prioritizeGeneLabelsByGeneSets) {
1712
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(hasPrioritizedGenesList);
1713
+ } else if (this.hasPrioritizedGenes) {
1714
+ const prioritizedGenesList = this.elements.filter((label) => label.isPrioritized);
1715
+ const filteredPrioritizedGenesList = this.getLabelsWithPrioritizedGenes(prioritizedGenesList);
1716
+ const withoutPrioritizedGenesList = this.elements.filter((label) => !label.isPrioritized);
1717
+ const combinedAndSortedList = [...withoutPrioritizedGenesList, ...filteredPrioritizedGenesList].sort(
1718
+ (a, b) => a.startAngle - b.startAngle
1719
+ );
1720
+ this.elementsToDisplay = this.getAllLabels(combinedAndSortedList);
1721
+ } else {
1722
+ this.elementsToDisplay = this.getLabelsWithPrioritizedGenes(this.elements);
1723
+ }
1724
+ }
1725
+ getLabelsWithPrioritizedGenes(elemenets) {
1726
+ const filteredList = [];
1727
+ let prev = { endAngle: 0 };
1728
+ elemenets.forEach((element, index) => {
1729
+ if (index == 0) {
1730
+ filteredList.push(element);
1731
+ prev = element;
1732
+ } else {
1733
+ const overlap = prev.endAngle - element.startAngle + this.overlapAngle;
1734
+ if (overlap > 0 && overlap < this.settings.label.maxDeltaAngle) {
1735
+ const labelCopy = LabelFactory.createMovedLabel(element, overlap);
1736
+ filteredList?.push(labelCopy);
1737
+ prev = labelCopy;
1738
+ }
1739
+ if (overlap <= 0) {
1740
+ filteredList.push(element);
1741
+ prev = element;
1742
+ }
1743
+ }
1744
+ });
1745
+ return filteredList;
1746
+ }
1747
+ getAllLabels(elemenets) {
1748
+ const filteredList = [];
1749
+ let prev = { endAngle: 0 };
1750
+ const elemenetsLength = elemenets.length;
1751
+ let lastCancerGeneLabelIndex = -1;
1752
+ for (let index = 0; index < elemenets.length; index++) {
1753
+ const element = elemenets[index];
1754
+ if (element.isPrioritized) {
1755
+ filteredList.push(element);
1756
+ lastCancerGeneLabelIndex = index;
1757
+ prev = element;
1758
+ continue;
1759
+ }
1760
+ if (index == 0) {
1761
+ if (elemenetsLength > 1) {
1762
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1763
+ continue;
1764
+ }
1765
+ filteredList.push(element);
1766
+ prev = element;
1767
+ }
1768
+ continue;
1769
+ }
1770
+ const prevOverlap = prev.endAngle - element.startAngle + this.overlapAngle;
1771
+ if (prevOverlap > 0 && prevOverlap < this.settings.label.maxDeltaAngle) {
1772
+ if (index == length - 1) {
1773
+ filteredList.push(element);
1774
+ continue;
1775
+ }
1776
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap)) {
1777
+ continue;
1778
+ }
1779
+ const labelCopy = LabelFactory.createMovedLabel(element, prevOverlap);
1780
+ this.collisions?.push(labelCopy);
1781
+ filteredList.push(element);
1782
+ prev = labelCopy;
1783
+ }
1784
+ if (prevOverlap <= 0) {
1785
+ if (this.isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, 0)) {
1786
+ continue;
1787
+ }
1788
+ filteredList.push(element);
1789
+ prev = element;
1790
+ }
1791
+ }
1792
+ return filteredList;
1793
+ }
1794
+ isElementOverlappingNextCancerGene(elemenets, lastCancerGeneLabelIndex, element, prevOverlap) {
1795
+ const nextLabelWithCancerGene = this.getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex);
1796
+ if (nextLabelWithCancerGene) {
1797
+ const nextOverlap = element.endAngle + prevOverlap - nextLabelWithCancerGene.startAngle + this.overlapAngle;
1798
+ if (nextOverlap > 0) {
1799
+ return true;
1800
+ }
1801
+ }
1802
+ return false;
1803
+ }
1804
+ getNextLabelWithCancerGene(elemenets, lastCancerGeneLabelIndex) {
1805
+ return elemenets.find((label, index) => label.isPrioritized && index > lastCancerGeneLabelIndex);
1806
+ }
1807
+ };
1808
+
1809
+ // plots/disco/snv/NonExonicSnvArcsMapper.ts
1810
+ var NonExonicSnvArcsMapper = class {
1811
+ constructor(nonExonicInnerRadius, nonExonicWidht, sampleName, reference) {
1812
+ this.nonExonicInnerRadius = nonExonicInnerRadius;
1813
+ this.nonExonicWidht = nonExonicWidht;
1814
+ this.sampleName = sampleName;
1815
+ this.reference = reference;
1816
+ this.onePxArcAngle = 1 / nonExonicInnerRadius;
1817
+ }
1818
+ map(arcData) {
1819
+ const innerRadius = this.nonExonicInnerRadius;
1820
+ const outerRadius = innerRadius + this.nonExonicWidht;
1821
+ const arcs = [];
1822
+ arcData.forEach((data) => {
1823
+ const mLabel = MLabel.getInstance().mlabel ? MLabel.getInstance().mlabel[data.mClass] : void 0;
1824
+ const startAngle = this.calculateStartAngle(data);
1825
+ const endAngle = this.calculateEndAngle(data);
1826
+ if (startAngle === null || endAngle === null) return;
1827
+ const arc = {
1828
+ startAngle,
1829
+ endAngle,
1830
+ innerRadius,
1831
+ outerRadius,
1832
+ color: mLabel.color,
1833
+ text: data.gene,
1834
+ dataClass: mLabel.label,
1835
+ mname: data.mname,
1836
+ chr: data.chr,
1837
+ pos: data.position,
1838
+ vafs: data.vafs,
1839
+ sampleName: [data.sampleName]
1840
+ };
1841
+ arcs.push(arc);
1842
+ });
1843
+ return arcs;
1844
+ }
1845
+ calculateStartAngle(data) {
1846
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1847
+ if (index === -1) return null;
1848
+ const chromosome = this.reference.chromosomes[index];
1849
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size) - this.onePxArcAngle;
1850
+ }
1851
+ calculateEndAngle(data) {
1852
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1853
+ const chromosome = this.reference.chromosomes[index];
1854
+ return this.onePxArcAngle + chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.position) / chromosome.size);
1855
+ }
1856
+ };
1857
+
1858
+ // plots/disco/loh/LohArcMapper.ts
1859
+ var LohArcMapper = class {
1860
+ constructor(lohInnerRadius, lohWidth, sampleName, reference) {
1861
+ this.lohInnerRadius = lohInnerRadius;
1862
+ this.lohWidth = lohWidth;
1863
+ this.sampleName = sampleName;
1864
+ this.reference = reference;
1865
+ }
1866
+ map(arcData) {
1867
+ const arcs = [];
1868
+ arcData.forEach((data) => {
1869
+ const startAngle = this.calculateStartAngle(data);
1870
+ const endAngle = this.calculateEndAngle(data);
1871
+ if (startAngle === null || endAngle === null) return;
1872
+ const innerRadius = this.lohInnerRadius;
1873
+ const outerRadius = innerRadius + this.lohWidth;
1874
+ const color = GradientColorProvider.provide(data.segmean);
1875
+ const arc = {
1876
+ startAngle,
1877
+ endAngle,
1878
+ innerRadius,
1879
+ outerRadius,
1880
+ color,
1881
+ text: data.gene,
1882
+ chr: data.chr,
1883
+ start: data.start,
1884
+ stop: data.stop,
1885
+ value: data.segmean
1886
+ };
1887
+ arcs.push(arc);
1888
+ });
1889
+ return arcs;
1890
+ }
1891
+ calculateStartAngle(data) {
1892
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1893
+ if (index === -1) return null;
1894
+ const chromosome = this.reference.chromosomes[index];
1895
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.start) / chromosome.size);
1896
+ }
1897
+ calculateEndAngle(data) {
1898
+ const index = this.reference.chromosomesOrder.indexOf(data.chr);
1899
+ const chromosome = this.reference.chromosomes[index];
1900
+ return chromosome.startAngle + (chromosome.endAngle - chromosome.startAngle) * (Number(data.stop) / chromosome.size);
1901
+ }
1902
+ };
1903
+
1904
+ // plots/disco/ring/Rings.ts
1905
+ var Rings = class {
1906
+ constructor(labelsRing, chromosomesRing, nonExonicArcRing, snvArcRing, cnvArcRing, lohArcRing, mutationWaterfallRing) {
1907
+ this.labelsRing = labelsRing;
1908
+ this.chromosomesRing = chromosomesRing;
1909
+ this.nonExonicArcRing = nonExonicArcRing;
1910
+ this.snvArcRing = snvArcRing;
1911
+ this.cnvArcRing = cnvArcRing;
1912
+ this.lohArcRing = lohArcRing;
1913
+ this.mutationWaterfallRing = mutationWaterfallRing;
1914
+ }
1915
+ };
1916
+
1917
+ // plots/disco/waterfall/MutationWaterfallMapper.ts
1918
+ var MutationWaterfallMapper = class {
1919
+ constructor(innerRadius, ringWidth, reference, logRange, color = "#4d4d4d") {
1920
+ this.innerRadius = innerRadius;
1921
+ this.ringWidth = ringWidth;
1922
+ this.reference = reference;
1923
+ this.logRange = logRange;
1924
+ this.color = color;
1925
+ }
1926
+ map(data = []) {
1927
+ if (!data.length) return [];
1928
+ const min = this.logRange?.min ?? 0;
1929
+ const max = this.logRange?.max ?? min + 1;
1930
+ const span = max - min || 1;
1931
+ const points = [];
1932
+ for (const datum of data) {
1933
+ const chrIndex = this.reference.chromosomesOrder.indexOf(datum.chr);
1934
+ if (chrIndex === -1) continue;
1935
+ const chromosome = this.reference.chromosomes[chrIndex];
1936
+ const chrAngleSpan = chromosome.endAngle - chromosome.startAngle;
1937
+ const relPos = chromosome.size > 0 ? datum.position / chromosome.size : 0;
1938
+ const angle = chromosome.startAngle + chrAngleSpan * relPos;
1939
+ const normalized = Math.max(0, Math.min(1, (datum.logDistance - min) / span));
1940
+ const radius = this.innerRadius + this.ringWidth * normalized;
1941
+ points.push({
1942
+ startAngle: angle,
1943
+ endAngle: angle,
1944
+ innerRadius: radius,
1945
+ outerRadius: radius,
1946
+ text: chromosome.text,
1947
+ color: this.color,
1948
+ chr: datum.chr,
1949
+ position: datum.position,
1950
+ logDistance: datum.logDistance,
1951
+ ringInnerRadius: this.innerRadius,
1952
+ ringWidth: this.ringWidth,
1953
+ rangeMin: min,
1954
+ rangeMax: max
1955
+ });
1956
+ }
1957
+ return points;
1958
+ }
1959
+ };
1960
+
1961
+ // plots/disco/viewmodel/ViewModelProvider.ts
1962
+ var ViewModelProvider = class {
1963
+ constructor(settings, dataMapper, reference, sampleName, genesetName, discoInteractions) {
1964
+ this.nonExonicArcRing = void 0;
1965
+ this.settings = settings;
1966
+ this.dataMapper = dataMapper;
1967
+ this.reference = reference;
1968
+ this.sampleName = sampleName;
1969
+ this.genesetName = genesetName;
1970
+ this.discoInteractions = discoInteractions;
1971
+ }
1972
+ map(data) {
1973
+ const dataHolder = this.dataMapper.map(data);
1974
+ let labelsRing;
1975
+ if (this.settings.Disco.showGeneNames) {
1976
+ const labelsMapper = new LabelsMapper(
1977
+ this.settings,
1978
+ this.sampleName,
1979
+ this.reference,
1980
+ dataHolder.cnvMaxPercentileAbs
1981
+ );
1982
+ const labelsData = labelsMapper.map(dataHolder.labelData, dataHolder.cnvData);
1983
+ labelsRing = new Labels(this.settings, labelsData, dataHolder.hasPrioritizedGenes);
1984
+ } else {
1985
+ labelsRing = new Labels(this.settings, [], false);
1986
+ }
1987
+ const chromosomesRing = new Ring(
1988
+ this.settings.rings.chromosomeInnerRadius,
1989
+ this.settings.rings.chromosomeWidth,
1990
+ this.reference.chromosomes
1991
+ );
1992
+ const nonExonicSnvArcsMapper = new NonExonicSnvArcsMapper(
1993
+ dataHolder.nonExonicInnerRadius,
1994
+ this.settings.rings.nonExonicRingWidth,
1995
+ this.sampleName,
1996
+ this.reference
1997
+ );
1998
+ const nonExonicData = nonExonicSnvArcsMapper.map(dataHolder.nonExonicSnvData);
1999
+ if (nonExonicData.length > 0) {
2000
+ this.nonExonicArcRing = new Ring(
2001
+ dataHolder.nonExonicInnerRadius,
2002
+ this.settings.rings.nonExonicRingWidth,
2003
+ nonExonicData
2004
+ );
2005
+ }
2006
+ this.snvArcsMapper = new SnvArcsMapper(
2007
+ dataHolder.snvInnerRadius,
2008
+ this.settings.rings.snvRingWidth,
2009
+ this.sampleName,
2010
+ this.reference
2011
+ );
2012
+ const snvData = this.snvArcsMapper.map(dataHolder.snvRingDataMap);
2013
+ if (snvData.length > 0) {
2014
+ this.snvArcRing = new Ring(dataHolder.snvInnerRadius, this.settings.rings.snvRingWidth, snvData);
2015
+ }
2016
+ const lohMapper = new LohArcMapper(
2017
+ dataHolder.lohInnerRadius,
2018
+ this.settings.rings.lohRingWidth,
2019
+ this.sampleName,
2020
+ this.reference
2021
+ );
2022
+ const lohData = lohMapper.map(dataHolder.lohData);
2023
+ if (lohData.length > 0) {
2024
+ this.lohArcRing = new Ring(dataHolder.lohInnerRadius, this.settings.rings.lohRingWidth, lohData);
2025
+ }
2026
+ this.cnvArcsMapper = new CnvArcsMapper(
2027
+ dataHolder.cnvInnerRadius,
2028
+ this.settings.rings.cnvRingWidth,
2029
+ this.settings,
2030
+ this.sampleName,
2031
+ this.reference,
2032
+ dataHolder.percentilePositive,
2033
+ dataHolder.percentileNegative,
2034
+ dataHolder.cappedCnvMaxAbsValue,
2035
+ dataHolder.cnvMaxPercentileAbs,
2036
+ this.settings.cnv.unit,
2037
+ this.settings.Disco.cnvRenderingType
2038
+ );
2039
+ const cnvData = this.cnvArcsMapper.map(dataHolder.cnvData);
2040
+ if (cnvData.length > 0) {
2041
+ this.cnvArcRing = new Ring(dataHolder.cnvInnerRadius, this.settings.rings.cnvRingWidth, cnvData);
2042
+ }
2043
+ if (this.settings.Disco.mutationWaterfallPlot && dataHolder.mutationWaterfallData?.length && dataHolder.mutationWaterfallInnerRadius !== void 0 && //Added this check to prevent TypeScript error "mutationWaterfallInnerRadius might be undefined"
2044
+ (dataHolder.mutationWaterfallInnerRadius ?? 0) > 0 && dataHolder.mutationWaterfallLogRange) {
2045
+ const mutationWaterfallMapper = new MutationWaterfallMapper(
2046
+ dataHolder.mutationWaterfallInnerRadius,
2047
+ this.settings.rings.mutationWaterfallRingWidth,
2048
+ this.reference,
2049
+ dataHolder.mutationWaterfallLogRange,
2050
+ this.settings.Disco.mutationWaterfallColor || "#4d4d4d"
2051
+ );
2052
+ const waterfallData = mutationWaterfallMapper.map(dataHolder.mutationWaterfallData);
2053
+ if (waterfallData.length > 0) {
2054
+ this.mutationWaterfallRing = new Ring(
2055
+ dataHolder.mutationWaterfallInnerRadius,
2056
+ this.settings.rings.mutationWaterfallRingWidth,
2057
+ waterfallData
2058
+ );
2059
+ }
2060
+ }
2061
+ const fusionMapper = new FusionMapper(dataHolder.fusionRadius, this.sampleName, this.reference);
2062
+ const fusions = fusionMapper.map(dataHolder.fusionData);
2063
+ let lohLegend;
2064
+ if (this.settings.legend.lohLegendEnabled && dataHolder.lohMinValue && dataHolder.lohMaxValue) {
2065
+ lohLegend = new LohLegend(dataHolder.lohMinValue, dataHolder.lohMaxValue);
2066
+ }
2067
+ const fusionLegendCounts = fusions.reduce(
2068
+ (counts, fusion) => {
2069
+ if (fusion.target && fusion.source.positionInChromosome.chromosome == fusion.target.positionInChromosome.chromosome)
2070
+ counts.intrachromosomal++;
2071
+ else counts.interchromosomal++;
2072
+ return counts;
2073
+ },
2074
+ { interchromosomal: 0, intrachromosomal: 0 }
2075
+ );
2076
+ const legend = new Legend(
2077
+ this.settings.legend.snvTitle,
2078
+ this.settings.legend.cnvTitle,
2079
+ this.settings.legend.lohTitle,
2080
+ this.settings.legend.fusionTitle,
2081
+ this.settings.Disco.cnvPercentile,
2082
+ this.settings.Disco.cnvCutoffMode,
2083
+ this.snvArcsMapper ? this.snvArcsMapper.snvClassMap : /* @__PURE__ */ new Map(),
2084
+ this.cnvArcsMapper ? this.cnvArcsMapper.cnvClassMap : /* @__PURE__ */ new Map(),
2085
+ this.settings.Disco.cnvRenderingType,
2086
+ fusions.length > 0,
2087
+ this.discoInteractions,
2088
+ lohLegend,
2089
+ this.settings.Disco.mutationWaterfallPlot && this.mutationWaterfallRing ? {
2090
+ color: this.settings.Disco.mutationWaterfallColor || "#4d4d4d",
2091
+ onColorChange: this.discoInteractions.onMutationWaterfallColorChange
2092
+ } : void 0,
2093
+ fusionLegendCounts
2094
+ );
2095
+ const rings = new Rings(
2096
+ labelsRing,
2097
+ chromosomesRing,
2098
+ this.nonExonicArcRing,
2099
+ this.snvArcRing,
2100
+ this.cnvArcRing,
2101
+ this.lohArcRing,
2102
+ this.mutationWaterfallRing
2103
+ );
2104
+ return new ViewModel(
2105
+ this.settings,
2106
+ rings,
2107
+ legend,
2108
+ fusions,
2109
+ dataHolder,
2110
+ this.genesetName,
2111
+ data.filter((i) => i.dt == dtsnvindel).length
2112
+ );
2113
+ }
2114
+ };
2115
+
2116
+ // plots/disco/viewmodel/ViewModelMapper.ts
2117
+ var ViewModelMapper = class _ViewModelMapper {
2118
+ static {
2119
+ this.snvClassLayer = {
2120
+ M: "exonic",
2121
+ E: "exonic",
2122
+ F: "exonic",
2123
+ N: "exonic",
2124
+ S: "exonic",
2125
+ D: "exonic",
2126
+ I: "exonic",
2127
+ P: "exonic",
2128
+ L: "exonic",
2129
+ Utr3: "exonic",
2130
+ Utr5: "exonic",
2131
+ ProteinAltering: "exonic",
2132
+ mnv: "non-exonic",
2133
+ ITD: "non-exonic",
2134
+ insertion: "non-exonic",
2135
+ deletion: "non-exonic",
2136
+ Intron: "non-exonic",
2137
+ X: "non-exonic",
2138
+ noncoding: "non-exonic"
2139
+ };
2140
+ }
2141
+ constructor(settings, discoInteractions) {
2142
+ this.settings = JSON.parse(JSON.stringify(settings));
2143
+ this.discoInteractions = discoInteractions;
2144
+ }
2145
+ applyRadius() {
2146
+ const radius = this.settings.Disco.radius;
2147
+ if (!radius) return;
2148
+ const scale = radius / this.settings.rings.labelLinesInnerRadius;
2149
+ this.settings.rings.labelLinesInnerRadius *= scale;
2150
+ this.settings.rings.labelsToLinesDistance *= scale;
2151
+ this.settings.rings.chromosomeInnerRadius *= scale;
2152
+ }
2153
+ static computeDynamicRadius(data) {
2154
+ let ringCount = 0;
2155
+ if (data.some((d) => d.dt == dtsnvindel)) ringCount++;
2156
+ if (data.some((d) => d.dt == dtcnv)) ringCount++;
2157
+ if (data.some((d) => d.dt == dtloh)) ringCount++;
2158
+ if (ringCount <= 1) return 200;
2159
+ if (ringCount == 2) return 250;
2160
+ return 300;
2161
+ }
2162
+ map(opts) {
2163
+ const chrSizes = opts.args.genome.majorchr;
2164
+ const chromosomesOverride = {};
2165
+ for (const chr of Object.keys(chrSizes)) {
2166
+ if (!this.settings.Disco.hiddenChromosomes.includes(chr)) {
2167
+ chromosomesOverride[chr] = chrSizes[chr];
2168
+ }
2169
+ }
2170
+ const sampleName = opts.args.sampleName;
2171
+ const genome = opts.args.genome;
2172
+ const prioritizedGenes = genome?.geneset?.[0] ? genome.geneset[0].lst : [];
2173
+ const genesetName = genome?.geneset?.[0] ? genome.geneset[0].name : "";
2174
+ const data = opts.args.data;
2175
+ if (this.settings.Disco.autoRadius) {
2176
+ this.settings.Disco.radius = _ViewModelMapper.computeDynamicRadius(data);
2177
+ }
2178
+ this.applyRadius();
2179
+ const reference = new Reference(this.settings, chrSizes, chromosomesOverride);
2180
+ const dataMapper = new DataMapper(this.settings, reference, sampleName, prioritizedGenes);
2181
+ return new ViewModelProvider(
2182
+ this.settings,
2183
+ dataMapper,
2184
+ reference,
2185
+ sampleName,
2186
+ genesetName,
2187
+ this.discoInteractions
2188
+ ).map(data);
2189
+ }
2190
+ };
2191
+
2192
+ // plots/disco/legend/LegendJSONMapper.ts
2193
+ var LegendJSONMapper = class {
2194
+ constructor(cappedCnvMaxAbsValue) {
2195
+ this.cappedCnvMaxAbsValue = cappedCnvMaxAbsValue;
2196
+ }
2197
+ map(legend) {
2198
+ const legendJSON = [];
2199
+ let order = 0;
2200
+ if (legend.snvClassMap) {
2201
+ this.mapSnv(legend, legendJSON, order++);
2202
+ }
2203
+ if (legend.cnvRenderingType == "heatmap" /* heatmap */) {
2204
+ this.mapCnvHeatmap(legend, legendJSON, order++);
2205
+ } else if (legend.cnvRenderingType == "bar" /* bar */) {
2206
+ if (legend.cnvClassMap) {
2207
+ this.mapCnvBar(legend, legendJSON, order++);
2208
+ }
2209
+ }
2210
+ if (legend.lohLegend) {
2211
+ this.mapLoh(legend, legendJSON, order++);
2212
+ }
2213
+ if (legend.fusionLegend) {
2214
+ this.mapFusion(legend, legendJSON, order++);
2215
+ }
2216
+ if (legend.mutationWaterfallLegend) {
2217
+ this.mapMutationWaterfall(legend, legendJSON, order++);
2218
+ }
2219
+ return legendJSON;
2220
+ }
2221
+ mapSnv(legend, legendJSON, order) {
2222
+ const snvItems = [];
2223
+ let snvOrder = 0;
2224
+ for (const [snvKey, snvLegendElement] of legend.snvClassMap) {
2225
+ snvItems.push({
2226
+ termid: legend.snvTitle,
2227
+ key: snvKey,
2228
+ text: `${snvLegendElement.snvType} (${snvLegendElement.count})`,
2229
+ color: snvLegendElement.color,
2230
+ order: snvOrder++
2231
+ });
2232
+ }
2233
+ legendJSON.push({
2234
+ name: legend.snvTitle,
2235
+ order,
2236
+ items: snvItems
2237
+ });
2238
+ }
2239
+ mapCnvBar(legend, legendJSON, order) {
2240
+ if (!legend.cnvClassMap) return;
2241
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2242
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2243
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2244
+ if (gain && loss && cap) {
2245
+ let cnvOrder = 0;
2246
+ const cnvItems = [];
2247
+ if (gain.value > 0) {
2248
+ cnvItems.push({
2249
+ termid: legend.cnvTitle,
2250
+ key: 1 /* Gain */,
2251
+ text: `Max: ${gain.value}`,
2252
+ color: gain.color,
2253
+ order: cnvOrder++
2254
+ });
2255
+ }
2256
+ if (loss.value < 0) {
2257
+ cnvItems.push({
2258
+ termid: legend.cnvTitle,
2259
+ key: 0 /* Loss */,
2260
+ text: `Min: ${loss.value}`,
2261
+ color: loss.color,
2262
+ order: cnvOrder++
2263
+ });
2264
+ }
2265
+ cnvItems.push({
2266
+ termid: legend.cnvTitle,
2267
+ key: 2 /* Cap */,
2268
+ text: `Capping: ${cap.value}`,
2269
+ color: cap.color,
2270
+ order: cnvOrder++
2271
+ // ,
2272
+ // onClickCallback: this.onClickCallback
2273
+ });
2274
+ legendJSON.push({
2275
+ name: legend.cnvTitle,
2276
+ id: "sjpp-disco-cnv-legend",
2277
+ order,
2278
+ items: cnvItems
2279
+ });
2280
+ }
2281
+ }
2282
+ mapCnvHeatmap(legend, legendJSON, order) {
2283
+ if (!legend.cnvClassMap) return;
2284
+ const gain = legend.cnvClassMap.get(1 /* Gain */);
2285
+ const loss = legend.cnvClassMap.get(0 /* Loss */);
2286
+ const cap = legend.cnvClassMap.get(2 /* Cap */);
2287
+ if (gain && loss && cap) {
2288
+ let cnvOrder = 0;
2289
+ const cnvItems = [];
2290
+ const base = {
2291
+ termid: legend.cnvTitle,
2292
+ width: 100,
2293
+ order: cnvOrder++,
2294
+ isLegendItem: true,
2295
+ dt: 4
2296
+ };
2297
+ if (gain.value > 0 && loss.value < 0) {
2298
+ const maxValue = Math.max(Math.abs(loss.value), gain.value);
2299
+ const domain = [-maxValue, 0, maxValue];
2300
+ cnvItems.push(
2301
+ Object.assign(
2302
+ {
2303
+ key: 3 /* LossGain */,
2304
+ domain,
2305
+ scale: linear([-1, 0, 1], [loss.color, "white", gain.color]),
2306
+ labels: { left: "Loss", right: "Gain" },
2307
+ numericInputs: {
2308
+ cutoffMode: legend.cnvCutoffMode,
2309
+ defaultPercentile: legend.cnvPercentile,
2310
+ callback: (obj) => legend.discoInteractions.colorScaleNumericInputsCallback(obj)
2311
+ }
2312
+ },
2313
+ base
2314
+ )
2315
+ );
2316
+ } else {
2317
+ if (gain.value > 0) {
2318
+ cnvItems.push(
2319
+ Object.assign(
2320
+ {
2321
+ key: 1 /* Gain */,
2322
+ text: "Copy number gain",
2323
+ domain: [0, gain.value],
2324
+ scale: linear([0, 1], ["white", gain.color])
2325
+ },
2326
+ base
2327
+ )
2328
+ );
2329
+ }
2330
+ if (loss.value < 0) {
2331
+ cnvItems.push(
2332
+ Object.assign(
2333
+ {
2334
+ key: 0 /* Loss */,
2335
+ text: "Copy number loss",
2336
+ domain: [loss.value, 0],
2337
+ scale: linear([0, 1], [loss.color, "white"])
2338
+ },
2339
+ base
2340
+ )
2341
+ );
2342
+ }
2343
+ }
2344
+ legendJSON.push({
2345
+ name: legend.cnvTitle,
2346
+ order,
2347
+ id: "sjpp-disco-cnv-legend",
2348
+ items: cnvItems
2349
+ });
2350
+ }
2351
+ }
2352
+ mapLoh(legend, legendJSON, order) {
2353
+ if (!legend.lohLegend) return;
2354
+ const lohItems = [];
2355
+ lohItems.push({
2356
+ termid: legend.lohTitle,
2357
+ key: "min",
2358
+ text: "min",
2359
+ color: legend.lohLegend.colorStartValue,
2360
+ order: 0
2361
+ });
2362
+ lohItems.push({
2363
+ termid: legend.lohTitle,
2364
+ key: "max",
2365
+ text: "max",
2366
+ color: legend.lohLegend.colorEndValue,
2367
+ order: 1
2368
+ });
2369
+ legendJSON.push({
2370
+ name: legend.lohTitle,
2371
+ order,
2372
+ items: lohItems
2373
+ });
2374
+ }
2375
+ mapFusion(legend, legendJSON, order) {
2376
+ const fusionItems = [];
2377
+ fusionItems.push({
2378
+ termid: legend.fusionTitle,
2379
+ key: "#6A3D9A" /* Interchromosomal */,
2380
+ text: `Interchromosomal (${legend.fusionLegendCounts.interchromosomal})`,
2381
+ color: "#6A3D9A" /* Interchromosomal */.valueOf(),
2382
+ order: 0
2383
+ });
2384
+ fusionItems.push({
2385
+ termid: legend.fusionTitle,
2386
+ key: "#1B9E77" /* Intrachromosomal */,
2387
+ text: `Intrachromosomal (${legend.fusionLegendCounts.intrachromosomal})`,
2388
+ color: "#1B9E77" /* Intrachromosomal */.valueOf(),
2389
+ order: 1
2390
+ });
2391
+ legendJSON.push({
2392
+ name: legend.fusionTitle,
2393
+ order,
2394
+ items: fusionItems
2395
+ });
2396
+ }
2397
+ mapMutationWaterfall(legend, legendJSON, order) {
2398
+ if (!legend.mutationWaterfallLegend) return;
2399
+ const waterfallItems = [];
2400
+ waterfallItems.push({
2401
+ termid: "Mutation Waterfall Plot",
2402
+ key: "mutation-waterfall-color",
2403
+ text: "Dot color",
2404
+ color: legend.mutationWaterfallLegend.color,
2405
+ order: 0,
2406
+ colorPicker: true,
2407
+ inputWidth: 28,
2408
+ width: 0,
2409
+ onColorChange: legend.mutationWaterfallLegend.onColorChange
2410
+ });
2411
+ waterfallItems.push({
2412
+ termid: "Mutation Waterfall Plot",
2413
+ key: "mutation-waterfall-axis",
2414
+ text: "Axis: log10 intermutation distance",
2415
+ order: 1,
2416
+ skipIcon: true,
2417
+ width: 0
2418
+ });
2419
+ legendJSON.push({
2420
+ name: "Mutation Waterfall Plot",
2421
+ order,
2422
+ items: waterfallItems
2423
+ });
2424
+ }
2425
+ };
2426
+
2427
+ // plots/disco/cnv/renderCnvSourceLegend.ts
2428
+ function parseSetLabel(set, index) {
2429
+ let text = set.name || `Set ${index + 1}`;
2430
+ let href;
2431
+ let target = "_blank";
2432
+ if (set.nameHtml) {
2433
+ const parser = new DOMParser();
2434
+ const doc = parser.parseFromString(set.nameHtml, "text/html");
2435
+ const anchor = doc.querySelector("a");
2436
+ if (anchor) {
2437
+ href = anchor.getAttribute("href") || void 0;
2438
+ target = anchor.getAttribute("target") || "_blank";
2439
+ text = anchor.textContent?.trim() || text;
2440
+ } else {
2441
+ text = doc.body.textContent?.trim() || text;
2442
+ }
2443
+ }
2444
+ return { text, href, target };
2445
+ }
2446
+ function renderCnvSourceLegend(legendG, datasets, fontSize, onChange) {
2447
+ if (!legendG || legendG.empty()) throw new Error("legendG is required");
2448
+ if (!datasets || datasets.length === 0) throw new Error("at least one dataset is required");
2449
+ legendG.select("g.sjpp-cnv-source").remove();
2450
+ const gBBox = legendG.node().getBBox();
2451
+ const cnvSrcWrapper = legendG.append("g").attr("class", "sjpp-cnv-source").attr("transform", `translate(${gBBox.width},${gBBox.y + fontSize})`);
2452
+ const btnPaddingX = Math.round(fontSize * 0.8);
2453
+ const btnHgt = Math.round(fontSize * 1.8);
2454
+ const btnWrapper = cnvSrcWrapper.append("g").attr("transform", `translate(${fontSize},${-btnHgt / 2})`).style("cursor", "pointer").on("click", function(event) {
2455
+ event.stopPropagation();
2456
+ showCnvMenu(this);
2457
+ });
2458
+ 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());
2459
+ const textW = btnText.node() ? Math.ceil(btnText.node().getBBox().width) : 0;
2460
+ const btnWdt = textW + btnPaddingX * 2;
2461
+ btnWrapper.insert("rect", ":first-child").attr("width", btnWdt).attr("height", btnHgt).attr("rx", 10).attr("ry", 10).style("fill", "#f2f2f2");
2462
+ btnText.attr("x", btnWdt / 2).attr("text-anchor", "middle");
2463
+ const cnvMenu = new Menu({
2464
+ onHide: () => {
2465
+ btnText.text("Select source \u25B2".toUpperCase());
2466
+ }
2467
+ });
2468
+ function showCnvMenu(dom) {
2469
+ btnText.text("Select source \u25BC".toUpperCase());
2470
+ cnvMenu.clear().showunder(dom);
2471
+ cnvMenu.d.append("div").text("Choose data source for CNV:").style("margin", "5px 5px 0 5px");
2472
+ const tableHolder = cnvMenu.d.append("div").style("padding", "5px");
2473
+ const { columns, rows } = buildTableData(datasets);
2474
+ const [, activeIndex] = getActiveDataset(datasets);
2475
+ renderTable({
2476
+ columns,
2477
+ rows,
2478
+ div: tableHolder,
2479
+ singleMode: true,
2480
+ maxWidth: "70vw",
2481
+ maxHeight: "60vh",
2482
+ selectedRows: [activeIndex],
2483
+ header: { allowSort: false },
2484
+ noButtonCallback: (rowIndex, node) => {
2485
+ const inputIndex = Number(node?.value);
2486
+ const selectedIndex = Number.isNaN(inputIndex) ? rowIndex : inputIndex;
2487
+ if (!Number.isNaN(selectedIndex)) onChange(selectedIndex);
2488
+ cnvMenu.hide();
2489
+ }
2490
+ });
2491
+ }
2492
+ }
2493
+ function getActiveDataset(datasets) {
2494
+ let currentIndex = datasets.findIndex((d) => d.inuse);
2495
+ if (currentIndex == -1) currentIndex = 0;
2496
+ return [datasets[currentIndex], currentIndex];
2497
+ }
2498
+ function buildTableData(datasets) {
2499
+ const attrKeys = [];
2500
+ for (const set of datasets) {
2501
+ if (!set.attrs) continue;
2502
+ for (const key of Object.keys(set.attrs)) {
2503
+ if (!attrKeys.includes(key)) attrKeys.push(key);
2504
+ }
2505
+ }
2506
+ const columns = [{ label: "Source" }];
2507
+ for (const key of attrKeys) columns.push({ label: key });
2508
+ const rows = datasets.map((set, index) => {
2509
+ const sourceInfo = parseSetLabel(set, index);
2510
+ const cells = [];
2511
+ if (set.nameHtml) cells.push({ html: set.nameHtml });
2512
+ else if (sourceInfo.href) cells.push({ value: sourceInfo.text, url: sourceInfo.href });
2513
+ else cells.push({ value: sourceInfo.text });
2514
+ for (const key of attrKeys) {
2515
+ const value = set.attrs?.[key];
2516
+ cells.push({ value: value ?? "" });
2517
+ }
2518
+ return cells;
2519
+ });
2520
+ return { columns, rows };
2521
+ }
2522
+
2523
+ // plots/disco/legend/LegendRenderer.ts
2524
+ var LegendRenderer = class {
2525
+ constructor(cappedCnvMaxAbsValue = 0, fontSize) {
2526
+ this.fontSize = fontSize;
2527
+ this.legendJSONMapper = new LegendJSONMapper(cappedCnvMaxAbsValue);
2528
+ }
2529
+ render(holder, legend, xOffset, svgw, svgh, viewModel, onCnvSourceSelect) {
2530
+ const svgLegendRenderer = svgLegend({
2531
+ holder: holder.append("g").attr("data-testid", "sjpp_disco_plot_legend"),
2532
+ rectFillFxn: (d2) => d2.color,
2533
+ iconStroke: "#aaa"
2534
+ });
2535
+ const data = this.legendJSONMapper.map(legend);
2536
+ const legendTitles = data.map((d2) => d2.name.trim());
2537
+ const maxLabelWidth = getMaxLabelWidth(holder, legendTitles);
2538
+ const d = {
2539
+ xOffset: maxLabelWidth + xOffset
2540
+ };
2541
+ svgLegendRenderer(data, {
2542
+ settings: Object.assign(
2543
+ {},
2544
+ {
2545
+ svgw,
2546
+ svgh,
2547
+ dimensions: d,
2548
+ fontsize: this.fontSize
2549
+ }
2550
+ )
2551
+ });
2552
+ const altCnv = viewModel.appState.args.alternativeDataByDt?.[dtcnv];
2553
+ if (altCnv && altCnv.length > 0) {
2554
+ const legendG = holder.select('g[data-testid="sjpp_disco_plot_legend"]');
2555
+ const cnvLegendG = legendG.select("#sjpp-disco-cnv-legend");
2556
+ if (!legendG.empty()) {
2557
+ const add2G = cnvLegendG.empty() ? legendG : cnvLegendG;
2558
+ renderCnvSourceLegend(add2G, altCnv, this.fontSize, onCnvSourceSelect);
2559
+ }
2560
+ }
2561
+ }
2562
+ };
2563
+
2564
+ // plots/disco/chromosome/ChromosomesRenderer.ts
2565
+ var ChromosomesRenderer = class {
2566
+ constructor(padAngle, innerRadius, outerRadius, fontSize) {
2567
+ this.padAngle = padAngle;
2568
+ this.innerRadius = innerRadius;
2569
+ this.outerRadius = outerRadius;
2570
+ this.fontSize = fontSize;
2571
+ }
2572
+ render(holder, elements) {
2573
+ const pie = pie_default().padAngle(this.padAngle).value((d) => d.size).sort(null);
2574
+ const arcData = pie(elements);
2575
+ const arc = arc_default().innerRadius(this.innerRadius).outerRadius(this.outerRadius);
2576
+ const arcs = holder.append("g").attr("data-testid", "sjpp_chromosomes_arc_group");
2577
+ const menu = MenuProvider.create();
2578
+ arcs.selectAll("path").data(arcData).enter().append("path").attr("d", arc).attr("fill", "black").on("mousemove", (event, d) => {
2579
+ const [x, y] = pointer_default(event, arcs.node());
2580
+ let angle = Math.atan2(y, x) + Math.PI / 2;
2581
+ if (angle < 0) angle += 2 * Math.PI;
2582
+ const frac = Math.max(0, Math.min(1, (angle - d.data.startAngle) / (d.data.endAngle - d.data.startAngle)));
2583
+ const pos = Math.round(frac * d.data.size);
2584
+ menu.d.html(`<span style="font-size:.8em">chr${d.data.text}</span> ${bplen(pos)}`).style("padding", "5px");
2585
+ menu.show(event.x, event.y);
2586
+ }).on("mouseenter", (event) => {
2587
+ select_default(event.currentTarget).attr("stroke", "orange").attr("stroke-width", 1);
2588
+ }).on("mouseleave", (event) => {
2589
+ select_default(event.currentTarget).attr("stroke", null).attr("stroke-width", null);
2590
+ menu.hide();
2591
+ });
2592
+ arcs.selectAll("text").data(arcData).enter().append("text").attr("transform", (d) => {
2593
+ return `translate(${arc.centroid(d)}) rotate(${d.data.angle * 180 / Math.PI - 90})${d.data.angle > Math.PI ? "rotate(180)" : ""}`;
2594
+ }).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");
2595
+ }
2596
+ };
2597
+
2598
+ // plots/disco/label/LabelsRenderer.ts
2599
+ var LabelsRenderer = class {
2600
+ constructor(animationDuration, fontSize, geneClickListener) {
2601
+ this.animationDuration = animationDuration;
2602
+ this.fontSize = fontSize;
2603
+ this.geneClickListener = geneClickListener;
2604
+ }
2605
+ render(holder, elements, collisions) {
2606
+ const labelsG = holder.append("g");
2607
+ const lineFunction = line_default().x((point) => point.x).y((point) => point.y);
2608
+ const menu = MenuProvider.create();
2609
+ labelsG.selectAll(".group").data(elements).enter().append("g").attr("class", "group").each((label, i, nodes) => {
2610
+ const g = select_default(nodes[i]);
2611
+ g.append("text").attr("class", "chord-text").attr("dy", ".35em").attr("transform", label.transform).style("text-anchor", label.textAnchor).style("font-size", `${this.fontSize}px`).style("fill", label.color).style("cursor", "pointer").text(label.text).on("click", () => {
2612
+ if (label.mutationsTooltip) {
2613
+ this.geneClickListener(
2614
+ label.text,
2615
+ label.mutationsTooltip.map((value) => value.mname)
2616
+ );
2617
+ }
2618
+ }).on("mouseover", (mouseEvent) => {
2619
+ const table = table2col({ holder: menu.d });
2620
+ this.createTooltip(table, label);
2621
+ menu.show(mouseEvent.x, mouseEvent.y);
2622
+ }).on("mouseout", () => {
2623
+ menu.clear();
2624
+ menu.hide();
2625
+ });
2626
+ g.append("path").attr("class", "chord-tick").datum(label.line.points).style("stroke", label.color).style("fill", "none").attr("d", lineFunction);
2627
+ });
2628
+ labelsG.selectAll(".group").each((label, i, nodes) => {
2629
+ const collision = collisions ? collisions.find((l) => l.text === label.text) : void 0;
2630
+ if (collision) {
2631
+ const g = select_default(nodes[i]);
2632
+ g.selectAll(".chord-text").datum(collision).transition().duration(this.animationDuration).attr("transform", collision.transform).style("text-anchor", collision.textAnchor);
2633
+ g.selectAll(".chord-tick").datum(collision.line.points).transition().duration(this.animationDuration).style("fill", "none").attr("d", lineFunction);
2634
+ }
2635
+ });
2636
+ }
2637
+ createTooltip(table, label) {
2638
+ if (label.mutationsTooltip) {
2639
+ const [td1, td2] = table.addRow();
2640
+ td1.text("Gene");
2641
+ td2.append("span").style("margin-left", "5px").text(label.text);
2642
+ label.mutationsTooltip.forEach((mutation) => {
2643
+ {
2644
+ const [td12, td22] = table.addRow();
2645
+ td12.text("Mutation");
2646
+ 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}`);
2647
+ if (hasAnyValidVafEntry(mutation.vafs)) {
2648
+ appendVafBars(td22, mutation.vafs);
2649
+ }
2650
+ }
2651
+ });
2652
+ }
2653
+ if (label.fusionTooltip) {
2654
+ const [td1, td2] = table.addRow();
2655
+ td1.text("Data type");
2656
+ td2.append("span").text("Fusion transcript");
2657
+ label.fusionTooltip.forEach((fusionTooltip) => {
2658
+ const [td12, td22] = table.addRow();
2659
+ td12.text("Position");
2660
+ td22.append("span").text(
2661
+ ` ${fusionTooltip.geneA ? fusionTooltip.geneA : "?"} ${fusionTooltip.chrA}:${fusionTooltip.posA}
2662
+ ${fusionTooltip.strandA == "+" ? "forward" : "reverse"} > ${fusionTooltip.geneB ? fusionTooltip.geneB : "?"} ${fusionTooltip.chrB}:${fusionTooltip.posB} ${fusionTooltip.strandB == "+" ? "forward" : "reverse"} `
2663
+ );
2664
+ });
2665
+ }
2666
+ if (label.cnvTooltip) {
2667
+ label.cnvTooltip.forEach((cnv) => {
2668
+ const [td1, td2] = table.addRow();
2669
+ td1.text("CNV");
2670
+ td2.append("span").style("margin-left", "5px").style("background-color", cnv.color).html("&nbsp;&nbsp;");
2671
+ td2.append("span").style("margin-left", "7.5px").text(cnv.value).append("span").style("margin-left", "7.5px").style("font-size", "0.8em").text(`${cnv.chr}:${cnv.start}-${cnv.stop}`);
2672
+ });
2673
+ }
2674
+ }
2675
+ };
2676
+
2677
+ // plots/disco/defaults.ts
2678
+ function discoDefaults(overrides = {}, app) {
2679
+ const hiddenChromosomes = [];
2680
+ if (app?.vocabApi?.termdbConfig?.queries?.singleSampleMutation?.discoPlot?.skipChrM) {
2681
+ hiddenChromosomes.push("chrM");
2682
+ }
2683
+ const defaults = {
2684
+ downloadImgName: "disco.plot",
2685
+ Disco: {
2686
+ centerText: null,
2687
+ cnvCapping: 5,
2688
+ isOpen: false,
2689
+ prioritizeGeneLabelsByGeneSets: false,
2690
+ showPrioritizeGeneLabelsByGeneSets: false,
2691
+ showGeneNames: true,
2692
+ mutationWaterfallPlot: false,
2693
+ mutationWaterfallColor: "#4d4d4d",
2694
+ minMutationFraction: 0,
2695
+ cnvRenderingType: "heatmap" /* heatmap */,
2696
+ cnvPercentile: 90,
2697
+ // 90th percentile for removing outliers
2698
+ cnvCutoffMode: "percentile",
2699
+ autoRadius: true,
2700
+ radius: 300,
2701
+ fusionOpacity: 1,
2702
+ hiddenChromosomes
2703
+ },
2704
+ rings: {
2705
+ nonExonicRingWidth: 20,
2706
+ snvRingWidth: 20,
2707
+ lohRingWidth: 20,
2708
+ cnvRingWidth: 30,
2709
+ mutationWaterfallRingWidth: 35,
2710
+ snvRingFilters: ["exonic"],
2711
+ chromosomeInnerRadius: 190,
2712
+ chromosomeWidth: 20,
2713
+ labelLinesInnerRadius: 210,
2714
+ labelsToLinesDistance: 30,
2715
+ labelsToLinesGap: 2,
2716
+ nonExonicRingEnabled: true,
2717
+ nonExonicFilterValues: ["non-exonic"]
2718
+ },
2719
+ verticalPadding: 0,
2720
+ horizontalPadding: 50,
2721
+ layerScaler: 1,
2722
+ padAngle: 2e-3,
2723
+ //0.01, //0.04,
2724
+ label: {
2725
+ fontSize: 12,
2726
+ maxDeltaAngle: 0.05,
2727
+ animationDuration: 1e3,
2728
+ overlapAngleFactor: 5
2729
+ // 5 is set by testing, because label height is not known before rendering
2730
+ },
2731
+ cnv: {
2732
+ capping: 5,
2733
+ percentile: 80,
2734
+ ampColor: "#D6683C",
2735
+ lossColor: "#67a9cf",
2736
+ cappedAmpColor: "#8B0000",
2737
+ cappedLossColor: "#00008B",
2738
+ unit: "Unit"
2739
+ },
2740
+ snv: {
2741
+ maxMutationCount: 1e4
2742
+ },
2743
+ legend: {
2744
+ snvTitle: "Mutations",
2745
+ cnvTitle: "CNV",
2746
+ lohTitle: "LOH",
2747
+ fusionTitle: "SV",
2748
+ // Structural Variants (color by co-location)
2749
+ lohLegendEnabled: true,
2750
+ fontSize: 12,
2751
+ rowHeight: 48
2752
+ },
2753
+ menu: {
2754
+ padding: 5
2755
+ }
2756
+ };
2757
+ if (overrides?.Disco?.radius != null && (overrides.Disco.radius > 1e3 || overrides.Disco.radius < 200)) {
2758
+ console.log(`${overrides?.Disco?.radius} is greater or lower than the min and max for the radius`);
2759
+ }
2760
+ return copyMerge(defaults, overrides);
2761
+ }
2762
+
2763
+ // plots/disco/snv/NonExonicSnvRenderer.ts
2764
+ var NonExonicSnvRenderer = class {
2765
+ constructor(geneClickListener) {
2766
+ this.geneClickListener = geneClickListener;
2767
+ }
2768
+ render(holder, elements) {
2769
+ const arcGenerator = arc_default();
2770
+ const arcs = holder.append("g");
2771
+ const menu = MenuProvider.create();
2772
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2773
+ const table = table2col({ holder: menu.d });
2774
+ const snv = structuredClone(arc);
2775
+ snv.dt = dtsnvindel;
2776
+ snv.class = arc.dataClass;
2777
+ snv.gene = snv.text;
2778
+ {
2779
+ const [td1, td2] = table.addRow();
2780
+ td1.text("Consequence");
2781
+ td2.append("span").text(snv.mname);
2782
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2783
+ }
2784
+ {
2785
+ const [td1, td2] = table.addRow();
2786
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2787
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2788
+ }
2789
+ if (snv.gene) {
2790
+ const [td1, td2] = table.addRow();
2791
+ td1.text("Gene");
2792
+ td2.text(snv.gene);
2793
+ }
2794
+ if (snv.occurrence > 1) {
2795
+ const [td1, td2] = table.addRow();
2796
+ td1.text("Occurrence");
2797
+ td2.text(snv.occurrence);
2798
+ }
2799
+ if (hasAnyValidVafEntry(arc.vafs)) {
2800
+ const [td1, td2] = table.addRow();
2801
+ td1.text("Read count");
2802
+ appendVafBars(td2, arc.vafs);
2803
+ }
2804
+ menu.show(mouseEvent.x, mouseEvent.y);
2805
+ }).on("mouseout", () => {
2806
+ menu.clear();
2807
+ menu.hide();
2808
+ }).on("click", (mouseEvent, arc) => {
2809
+ this.geneClickListener(arc.text, [arc.mname]);
2810
+ });
2811
+ }
2812
+ };
2813
+
2814
+ // plots/disco/snv/SnvRenderer.ts
2815
+ var SnvRenderer = class {
2816
+ constructor(svnWidth, geneClickListener) {
2817
+ this.svnWidth = svnWidth;
2818
+ this.geneClickListener = geneClickListener;
2819
+ }
2820
+ render(holder, elements) {
2821
+ if (elements.length > 0) {
2822
+ const svnInnerRadius = elements[0].innerRadius;
2823
+ const fullArcRenderer = new FullArcRenderer(svnInnerRadius, this.svnWidth, "#6464641A");
2824
+ fullArcRenderer.render(holder);
2825
+ }
2826
+ const arcGenerator = arc_default();
2827
+ const arcs = holder.append("g");
2828
+ const menu = MenuProvider.create();
2829
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2830
+ const table = table2col({ holder: menu.d });
2831
+ const snv = structuredClone(arc);
2832
+ snv.dt = dtsnvindel;
2833
+ snv.class = arc.dataClass;
2834
+ snv.gene = snv.text;
2835
+ {
2836
+ const [td1, td2] = table.addRow();
2837
+ td1.text("Consequence");
2838
+ td2.append("span").text(snv.mname);
2839
+ td2.append("span").style("margin-left", "5px").style("color", snv.color).style("font-size", ".8em").text(snv.dataClass);
2840
+ }
2841
+ {
2842
+ const [td1, td2] = table.addRow();
2843
+ td1.text(snv.ref && snv.alt ? "Mutation" : "Position");
2844
+ td2.append("span").text(`${snv.chr}:${snv.pos + 1} ${snv.ref && snv.alt ? snv.ref + ">" + snv.alt : ""}`);
2845
+ }
2846
+ if (snv.gene) {
2847
+ const [td1, td2] = table.addRow();
2848
+ td1.text("Gene");
2849
+ td2.text(snv.gene);
2850
+ }
2851
+ if (snv.occurrence > 1) {
2852
+ const [td1, td2] = table.addRow();
2853
+ td1.text("Occurrence");
2854
+ td2.text(snv.occurrence);
2855
+ }
2856
+ if (hasAnyValidVafEntry(arc.vafs)) {
2857
+ const [td1, td2] = table.addRow();
2858
+ td1.text("Read count");
2859
+ appendVafBars(td2, arc.vafs);
2860
+ }
2861
+ menu.show(mouseEvent.x, mouseEvent.y);
2862
+ }).on("mouseout", () => {
2863
+ menu.clear();
2864
+ menu.hide();
2865
+ }).on("click", (mouseEvent, arc) => {
2866
+ this.geneClickListener(arc.text, [arc.mname]);
2867
+ });
2868
+ }
2869
+ };
2870
+
2871
+ // plots/disco/loh/LohRenderer.ts
2872
+ var LohRenderer = class {
2873
+ render(holder, elements) {
2874
+ const arcGenerator = arc_default();
2875
+ const arcs = holder.append("g");
2876
+ const menu = MenuProvider.create();
2877
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2878
+ const table = table2col({ holder: menu.d });
2879
+ const loh = structuredClone(arc);
2880
+ loh.dt = dtloh;
2881
+ loh.gene = loh.text;
2882
+ {
2883
+ const [td12, td22] = table.addRow();
2884
+ td12.text("Data type");
2885
+ td22.append("span").style("margin-left", "5px").text("Loss of Heterozygosity");
2886
+ }
2887
+ const [td1, td2] = table.addRow();
2888
+ td1.text("Position");
2889
+ td2.append("span").text(`${arc.chr}:${arc.start}-${arc.stop}`);
2890
+ menu.show(mouseEvent.x, mouseEvent.y);
2891
+ }).on("mouseout", () => {
2892
+ menu.clear();
2893
+ menu.hide();
2894
+ });
2895
+ }
2896
+ };
2897
+
2898
+ // plots/disco/cnv/CnvBarRenderer.ts
2899
+ var CnvBarRenderer = class {
2900
+ render(holder, elements) {
2901
+ const arcGenerator = arc_default();
2902
+ const arcs = holder.append("g");
2903
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
2904
+ const menu = MenuProvider.create();
2905
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => d.color).on("mouseover", (mouseEvent, arc) => {
2906
+ hoverOverlay.selectAll("*").remove();
2907
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
2908
+ const cnv = structuredClone(arc);
2909
+ cnv.dt = dtcnv;
2910
+ cnv.samples = [{ sample_id: arc.sampleName }];
2911
+ cnv.gene = cnv.text;
2912
+ const table = table2col({ holder: menu.d });
2913
+ {
2914
+ const [c1, c2] = table.addRow();
2915
+ c1.text("CNV");
2916
+ c2.html(`<span style="background:${cnv.color}">&nbsp;&nbsp;</span> ${cnv.value}`);
2917
+ }
2918
+ {
2919
+ const [c1, c2] = table.addRow();
2920
+ c1.text("Position");
2921
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
2922
+ }
2923
+ {
2924
+ const [c1, c2] = table.addRow();
2925
+ c1.text("Unit");
2926
+ c2.text(cnv.value);
2927
+ }
2928
+ menu.show(mouseEvent.x, mouseEvent.y);
2929
+ }).on("mouseout", () => {
2930
+ hoverOverlay.selectAll("*").remove();
2931
+ menu.clear();
2932
+ menu.hide();
2933
+ });
2934
+ }
2935
+ };
2936
+
2937
+ // plots/disco/cnv/CnvHeatmapRenderer.ts
2938
+ var CnvHeatmapRenderer = class {
2939
+ constructor(positivePercentile = 0, negativePercentile = 0) {
2940
+ this.positivePercentile = positivePercentile;
2941
+ this.negativePercentile = negativePercentile;
2942
+ }
2943
+ render(holder, elements) {
2944
+ const arcGenerator = arc_default();
2945
+ const arcs = holder.append("g");
2946
+ const hoverOverlay = holder.append("g").attr("class", "hover-overlay").style("pointer-events", "none");
2947
+ const menu = MenuProvider.create();
2948
+ arcs.selectAll("path").data(elements).enter().append("path").attr("d", (d) => arcGenerator(d)).attr("fill", (d) => this.getColor(d.color, d.value)).on("mouseenter", (mouseEvent, arc) => {
2949
+ hoverOverlay.append("path").datum(arc).attr("d", arcGenerator(arc)).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1);
2950
+ const table = table2col({ holder: menu.d });
2951
+ const cnv = structuredClone(arc);
2952
+ cnv.dt = dtcnv;
2953
+ cnv.samples = [{ sample_id: arc.sampleName }];
2954
+ cnv.gene = cnv.text;
2955
+ {
2956
+ const [c1, c2] = table.addRow();
2957
+ c1.text("CNV");
2958
+ c2.html(
2959
+ `<span style="background:${this.getColor(
2960
+ cnv.color,
2961
+ cnv.value
2962
+ )}; border:solid lightgrey 0.1px;">&nbsp;&nbsp;</span> ${cnv.value}`
2963
+ );
2964
+ }
2965
+ {
2966
+ const [c1, c2] = table.addRow();
2967
+ c1.text("Position");
2968
+ c2.text(cnv.chr + ":" + cnv.start + "-" + cnv.stop);
2969
+ }
2970
+ menu.show(mouseEvent.x, mouseEvent.y);
2971
+ }).on("mouseleave", () => {
2972
+ hoverOverlay.selectAll("*").remove();
2973
+ menu.clear();
2974
+ menu.hide();
2975
+ });
2976
+ }
2977
+ // Computes fill color using linear scale between -P80, 0, and +P80
2978
+ getColor(color, value) {
2979
+ const maxValue = Math.max(this.positivePercentile, Math.abs(this.negativePercentile));
2980
+ return linear(
2981
+ [-maxValue, 0, maxValue],
2982
+ [color, "white", color]
2983
+ // transitions to white in the middle
2984
+ ).clamp(true)(value);
2985
+ }
2986
+ };
2987
+
2988
+ // plots/disco/waterfall/MutationWaterfallRenderer.ts
2989
+ var MutationWaterfallRenderer = class {
2990
+ constructor(dotRadius = 1.5) {
2991
+ this.dotRadius = dotRadius;
2992
+ }
2993
+ render(holder, elements) {
2994
+ if (!elements.length) return;
2995
+ const ringGroup = holder.append("g").attr("data-testid", "sjpp_mutation_waterfall_ring");
2996
+ const menu = MenuProvider.create();
2997
+ 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) => {
2998
+ const distance = Math.round(Math.pow(10, d.logDistance));
2999
+ menu.clear();
3000
+ const table = table2col({ holder: menu.d });
3001
+ {
3002
+ const [td1, td2] = table.addRow();
3003
+ td1.text("Intermutation distance");
3004
+ td2.text(`${bplen(distance)}`);
3005
+ }
3006
+ menu.show(event.x, event.y);
3007
+ }).on("mouseout", () => {
3008
+ menu.clear();
3009
+ menu.hide();
3010
+ });
3011
+ this.renderAxis(ringGroup, elements[0]);
3012
+ }
3013
+ renderAxis(holder, referencePoint) {
3014
+ const { ringInnerRadius, ringWidth, rangeMin, rangeMax } = referencePoint;
3015
+ const axisGroup = holder.append("g").attr("class", "sjpp-waterfall-axis");
3016
+ const topRadius = ringInnerRadius + ringWidth;
3017
+ axisGroup.append("line").attr("x1", 0).attr("y1", -topRadius).attr("x2", 0).attr("y2", -ringInnerRadius).attr("stroke", "#6e6e6e").attr("stroke-width", 1);
3018
+ const span = rangeMax - rangeMin || 1;
3019
+ const tickValues = rangeMax === rangeMin ? [rangeMin] : ticks(rangeMin, rangeMax, 4);
3020
+ tickValues.forEach((value) => {
3021
+ const ratio = (value - rangeMin) / span;
3022
+ const radius = ringInnerRadius + ringWidth * ratio;
3023
+ const y = -radius;
3024
+ axisGroup.append("line").attr("x1", -4).attr("x2", 4).attr("y1", y).attr("y2", y).attr("stroke", "#6e6e6e");
3025
+ const exponent = Math.round(value * 10) / 10;
3026
+ const formatted = Number.isInteger(exponent) ? `${exponent}` : exponent.toFixed(1);
3027
+ axisGroup.append("text").attr("x", 6).attr("y", y + 3).style("font-size", "10px").style("fill", "#4d4d4d").text(`10^${formatted} bp`);
3028
+ });
3029
+ }
3030
+ };
3031
+
3032
+ // plots/disco/Disco.ts
3033
+ var Disco = class {
3034
+ constructor(opts) {
3035
+ this.recreateViewModel = false;
3036
+ this.onCnvSourceSelect = (index) => {
3037
+ const state = this.app.getState();
3038
+ const args = state.args;
3039
+ const alt = args.alternativeDataByDt?.[dtcnv];
3040
+ if (!alt) return;
3041
+ const altClone = structuredClone(args.alternativeDataByDt);
3042
+ altClone[dtcnv].forEach((d, i) => d.inuse = i === index);
3043
+ const selected = altClone[dtcnv][index];
3044
+ selected.mlst.forEach((d) => d.position = d.pos);
3045
+ const baseData = args.data.filter((d) => d.dt != dtcnv && d.dt != dtloh);
3046
+ const newData = baseData.concat(selected.mlst);
3047
+ this.app.dispatch({
3048
+ type: "app_refresh",
3049
+ state: { args: { ...args, data: newData, alternativeDataByDt: altClone } }
3050
+ });
3051
+ };
3052
+ this.type = "Disco";
3053
+ this.opts = opts;
3054
+ this.isOpen = false;
3055
+ this.discoInteractions = new DiscoInteractions(this);
3056
+ }
3057
+ static {
3058
+ this.type = "Disco";
3059
+ }
3060
+ async init() {
3061
+ const state = this.app.getState();
3062
+ const settings = state.plots.find((p) => p.id === this.id).settings;
3063
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3064
+ this.viewModel = this.stateViewModelMapper.map(state);
3065
+ const holder = this.opts.holder;
3066
+ const controlsHolder = holder.append("div").style("display", "inline-block").style("vertical-align", "top");
3067
+ const mainDiv = holder.append("div").style("display", "inline-block");
3068
+ const topbar = controlsHolder.append("div");
3069
+ const config_div = controlsHolder.append("div");
3070
+ const configInputsOptions = this.getConfigInputsOptions(this.viewModel);
3071
+ this.features = await multiInit({
3072
+ topbar: topBarInit({
3073
+ app: this.app,
3074
+ id: this.id,
3075
+ // TODO change the way svg is selected
3076
+ downloadHandler: () => this.discoInteractions.downloadClickListener(holder.select('svg[id="sjpp_disco_plot"]').node()),
3077
+ callback: () => this.toggleVisibility(this.isOpen),
3078
+ isOpen: () => this.isOpen,
3079
+ holder: topbar
3080
+ }),
3081
+ config: configUiInit({
3082
+ app: this.app,
3083
+ id: this.id,
3084
+ holder: config_div,
3085
+ isOpen: () => this.isOpen,
3086
+ inputs: configInputsOptions
3087
+ })
3088
+ });
3089
+ this.errorDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-errorDiv");
3090
+ this.svgDiv = mainDiv.append("div").attr("data-testid", "sjpp-disco-svgDiv");
3091
+ }
3092
+ getConfigInputsOptions(viewModel) {
3093
+ const configInputsOptions = [];
3094
+ if (viewModel.settings.Disco.showPrioritizeGeneLabelsByGeneSets) {
3095
+ const filterMutationsGenesCheckbox = [
3096
+ {
3097
+ boxLabel: viewModel.genesetName,
3098
+ label: `Filter mutations`,
3099
+ type: "checkbox",
3100
+ chartType: "Disco",
3101
+ settingsKey: "prioritizeGeneLabelsByGeneSets",
3102
+ title: `Only show mutations for ${viewModel.genesetName} genes`
3103
+ }
3104
+ ];
3105
+ configInputsOptions.push(...filterMutationsGenesCheckbox);
3106
+ }
3107
+ if (viewModel.cnvMaxValue !== 0 || viewModel.cnvMinValue !== 0) {
3108
+ const cnvConfigInputOptions = [
3109
+ {
3110
+ boxLabel: "",
3111
+ label: "CNV rendering type",
3112
+ type: "radio",
3113
+ chartType: "Disco",
3114
+ settingsKey: "cnvRenderingType",
3115
+ title: "CNV rendering type",
3116
+ options: [
3117
+ { label: "Heatmap", value: "heatmap" /* heatmap */ },
3118
+ { label: "Bar", value: "bar" /* bar */ }
3119
+ ]
3120
+ }
3121
+ ];
3122
+ configInputsOptions.push(...cnvConfigInputOptions);
3123
+ }
3124
+ if (viewModel.hasMutationFractionData) {
3125
+ configInputsOptions.push({
3126
+ boxLabel: "",
3127
+ label: "Minimum mutation fraction",
3128
+ type: "number",
3129
+ chartType: "Disco",
3130
+ settingsKey: "minMutationFraction",
3131
+ title: "Only show SNV/indel mutations with at least one DNA/RNA mutation fraction at or above this value.",
3132
+ step: 0.01,
3133
+ min: 0,
3134
+ max: 1,
3135
+ debounceInterval: 500
3136
+ });
3137
+ }
3138
+ configInputsOptions.push({
3139
+ boxLabel: "",
3140
+ label: "Show gene names",
3141
+ type: "checkbox",
3142
+ chartType: "Disco",
3143
+ settingsKey: "showGeneNames",
3144
+ title: "Show gene name labels on the outside of the plot"
3145
+ });
3146
+ const genomeChr = this.app.opts.state.args.genome.majorchr;
3147
+ const chromosomeConfigOption = {
3148
+ label: "Chromosomes",
3149
+ title: "Chromosomes shown in the plot",
3150
+ type: "multiCheckbox",
3151
+ chartType: "Disco",
3152
+ settingsKey: "hiddenChromosomes",
3153
+ style: {
3154
+ colNum: 4
3155
+ },
3156
+ options: Object.keys(genomeChr).map((c) => ({ label: c, value: c })),
3157
+ processInput: (values = []) => {
3158
+ const reverse = Object.keys(genomeChr).filter((c) => !values.includes(c));
3159
+ return reverse;
3160
+ }
3161
+ };
3162
+ configInputsOptions.push(chromosomeConfigOption);
3163
+ configInputsOptions.push({
3164
+ boxLabel: "",
3165
+ label: "Auto radius",
3166
+ type: "checkbox",
3167
+ chartType: "Disco",
3168
+ settingsKey: "autoRadius",
3169
+ title: "Automatically set the radius based on the number of data rings"
3170
+ });
3171
+ const dimensionOptions = [
3172
+ {
3173
+ label: "Radius",
3174
+ title: "Set the radius of the entire plot, between 200 and 1000 pixels.",
3175
+ type: "number",
3176
+ chartType: "Disco",
3177
+ settingsKey: "radius",
3178
+ debounceInterval: 500,
3179
+ step: 25,
3180
+ min: 200,
3181
+ max: 1e3,
3182
+ getDisplayStyle: (plot) => plot.settings.Disco.autoRadius ? "none" : "table-row"
3183
+ },
3184
+ {
3185
+ label: "Fusion opacity",
3186
+ title: "Adjust opacity of fusion arcs, between 0 and 1",
3187
+ type: "number",
3188
+ chartType: "Disco",
3189
+ settingsKey: "fusionOpacity",
3190
+ step: 0.01,
3191
+ min: 0,
3192
+ max: 1,
3193
+ debounceInterval: 500
3194
+ }
3195
+ ];
3196
+ configInputsOptions.push(...dimensionOptions);
3197
+ if (viewModel.canShowMutationWaterfallPlot && viewModel.snvDataLength > 0) {
3198
+ configInputsOptions.push({
3199
+ boxLabel: "",
3200
+ label: "Mutation Waterfall Plot",
3201
+ type: "checkbox",
3202
+ chartType: "Disco",
3203
+ settingsKey: "mutationWaterfallPlot",
3204
+ title: "Render log10 intermutation distance ring for SNV/indel data"
3205
+ });
3206
+ }
3207
+ return configInputsOptions;
3208
+ }
3209
+ async main() {
3210
+ const settings = this.state.settings;
3211
+ this.isOpen = settings.Disco.isOpen;
3212
+ if (this.recreateViewModel) {
3213
+ this.stateViewModelMapper = new ViewModelMapper(settings, this.discoInteractions);
3214
+ this.viewModel = this.stateViewModelMapper.map(this.app.getState());
3215
+ }
3216
+ this.recreateViewModel = true;
3217
+ if (this.viewModel) {
3218
+ this.svgDiv.selectAll("*").remove();
3219
+ const appState = this.app.getState();
3220
+ this.viewModel.svgDiv = this.svgDiv;
3221
+ this.viewModel.appState = appState;
3222
+ for (const name in this.features) {
3223
+ this.features[name].update({ state: this.state, appState });
3224
+ }
3225
+ const legendRenderer = new LegendRenderer(this.viewModel.cappedCnvMaxAbsValue, settings.label.fontSize);
3226
+ const discoRenderer = new DiscoRenderer(
3227
+ this.getRingRenderers(this.viewModel.settings, this.viewModel, this.discoInteractions.geneClickListener),
3228
+ legendRenderer,
3229
+ this.app.opts.state.args.genome
3230
+ );
3231
+ discoRenderer.render(this.svgDiv, this.viewModel, this.onCnvSourceSelect);
3232
+ if (this.viewModel.invalidDataInfo?.entries?.length) {
3233
+ InvalidDataUI.render(this.errorDiv, this.viewModel.invalidDataInfo);
3234
+ }
3235
+ }
3236
+ }
3237
+ getState(appState) {
3238
+ const config = appState.plots.find((p) => p.id === this.id);
3239
+ if (!config) return config;
3240
+ return { ...config, mlst: appState.args.data };
3241
+ }
3242
+ getRingRenderers(settings, viewModel, geneClickListener) {
3243
+ const chromosomesRenderer = new ChromosomesRenderer(
3244
+ settings.padAngle,
3245
+ settings.rings.chromosomeInnerRadius,
3246
+ settings.rings.chromosomeInnerRadius + settings.rings.chromosomeWidth,
3247
+ settings.label.fontSize
3248
+ );
3249
+ const labelsRenderer = new LabelsRenderer(
3250
+ settings.label.animationDuration,
3251
+ settings.label.fontSize,
3252
+ geneClickListener
3253
+ );
3254
+ const nonExonicSnvRenderer = new NonExonicSnvRenderer(geneClickListener);
3255
+ const snvRenderer = new SnvRenderer(settings.rings.snvRingWidth, geneClickListener);
3256
+ const cnvRenderer = settings.Disco.cnvRenderingType === "heatmap" /* heatmap */ ? new CnvHeatmapRenderer(viewModel.positivePercentile, viewModel.negativePercentile) : new CnvBarRenderer();
3257
+ const lohRenderer = new LohRenderer();
3258
+ const mutationWaterfallRenderer = new MutationWaterfallRenderer();
3259
+ const renderersMap = /* @__PURE__ */ new Map();
3260
+ renderersMap.set(0 /* CHROMOSOME */, chromosomesRenderer);
3261
+ renderersMap.set(1 /* LABEL */, labelsRenderer);
3262
+ renderersMap.set(2 /* NONEXONICSNV */, nonExonicSnvRenderer);
3263
+ renderersMap.set(3 /* SNV */, snvRenderer);
3264
+ renderersMap.set(4 /* MUTATION_WATERFALL */, mutationWaterfallRenderer);
3265
+ renderersMap.set(5 /* CNV */, cnvRenderer);
3266
+ renderersMap.set(6 /* LOH */, lohRenderer);
3267
+ return renderersMap;
3268
+ }
3269
+ toggleVisibility(isOpen) {
3270
+ this.app.dispatch({
3271
+ type: "plot_edit",
3272
+ id: this.opts.id,
3273
+ config: {
3274
+ settings: {
3275
+ Disco: { isOpen: !isOpen }
3276
+ }
3277
+ }
3278
+ });
3279
+ }
3280
+ };
3281
+ var discoInit = getCompInit(Disco);
3282
+ var componentInit = discoInit;
3283
+ async function getPlotConfig(opts, app) {
3284
+ return {
3285
+ chartType: "Disco",
3286
+ subfolder: "disco",
3287
+ extension: "ts",
3288
+ settings: discoDefaults(opts.overrides, app)
3289
+ };
3290
+ }
3291
+ export {
3292
+ componentInit,
3293
+ Disco as default,
3294
+ discoInit,
3295
+ getPlotConfig
3296
+ };
3297
+ //# sourceMappingURL=Disco-ZLC54X7T.js.map