@sjcrh/proteinpaint-client 2.203.0 → 2.203.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (884) hide show
  1. package/dist/2dmaf-6CEBP4SA.js +1366 -0
  2. package/dist/AIProjectAdmin-2CKKFC3A.js +951 -0
  3. package/dist/AggregateMatrix-5TBUMFE5.js +665 -0
  4. package/dist/AppHeader-5YBPWF44.js +829 -0
  5. package/dist/BoxPlot-UOJS5SJV.js +1210 -0
  6. package/dist/CorrelationVolcano-KX6JPZMT.js +613 -0
  7. package/dist/Cuminc-TLOOLZWR.js +1208 -0
  8. package/dist/DE-HUQLQ2Z3.js +87 -0
  9. package/dist/DEinput-WWUISAF2.js +404 -0
  10. package/dist/DifferentialAnalysis-6DTAGCEY.js +237 -0
  11. package/dist/Disco-P6ZLPYLF.js +3388 -0
  12. package/dist/Disco.UI-WGTMAFK2.js +242 -0
  13. package/dist/DmrPlot-3FRU5KUK.js +636 -0
  14. package/dist/GB-NWOBARL3.js +1390 -0
  15. package/dist/GSEA-DEEUAAMI.js +850 -0
  16. package/dist/GeneExpInput-6QWGEAFV.js +361 -0
  17. package/dist/Geomap-6HT2B7RH.js +83 -0
  18. package/dist/HicApp-PCNOUULF.js +2244 -0
  19. package/dist/IDCViewer-H3QPXVM3.js +10811 -0
  20. package/dist/NumBinaryEditor-IU6OLMKN.js +278 -0
  21. package/dist/NumBinaryEditor.unit.spec-YUPUILIV.js +311 -0
  22. package/dist/NumContEditor-KFDA76QN.js +104 -0
  23. package/dist/NumContEditor.unit.spec-QBOT5QHU.js +163 -0
  24. package/dist/NumCustomBinEditor-EOSTEXLB.js +32 -0
  25. package/dist/NumCustomBinEditor.unit.spec-B46XWFYH.js +396 -0
  26. package/dist/NumDiscreteEditor-Y4EAADXC.js +169 -0
  27. package/dist/NumDiscreteEditor.unit.spec-SJGHLWSM.js +232 -0
  28. package/dist/NumRegularBinEditor-3BNG7DIN.js +32 -0
  29. package/dist/NumRegularBinEditor.unit.spec-KM45QXXG.js +277 -0
  30. package/dist/NumSplineEditor-K4KPDC4S.js +209 -0
  31. package/dist/NumSplineEditor.unit.spec-TKQP5XTS.js +223 -0
  32. package/dist/NumericDensity-Z6JFVN3D.js +32 -0
  33. package/dist/NumericDensity.unit.spec-YEYBVLEP.js +417 -0
  34. package/dist/NumericHandler-ITT6HMPN.js +33 -0
  35. package/dist/NumericHandler.unit.spec-QVONMXY4.js +213 -0
  36. package/dist/ProteomeInput-PRS3DEMZ.js +387 -0
  37. package/dist/Regression-LJJJBBT6.js +1413 -0
  38. package/dist/Regression-LJJJBBT6.js.map +7 -0
  39. package/dist/RunChart2-AMM2JFF5.js +749 -0
  40. package/dist/SC-F7IE66VZ.js +1106 -0
  41. package/dist/Violin-RJ6OJZ4F.js +1073 -0
  42. package/dist/Volcano-BJA5HN5Y.js +1414 -0
  43. package/dist/WSIViewer-RJZGRUIR.js +26194 -0
  44. package/dist/Wsi-DXP6KOQA.js +232 -0
  45. package/dist/WsiSamplesPlot-2IAWV2B6.js +159 -0
  46. package/dist/adSandbox-RGWOIV3W.js +32 -0
  47. package/dist/animatedBubbleChart-J4Q2NAEW.js +546 -0
  48. package/dist/app-3QXNR4VG.js +31 -0
  49. package/dist/app-B4B7YNP3.js +41 -0
  50. package/dist/app.js +12 -12
  51. package/dist/bam-LRUMN45P.js +875 -0
  52. package/dist/barchart-L2G6GEHK.js +41 -0
  53. package/dist/barchart2-DWNVAZAJ.js +308 -0
  54. package/dist/block-TVEVAXNP.js +6248 -0
  55. package/dist/block.init-YOHAKPRI.js +32 -0
  56. package/dist/block.mds.expressionrank-PU6JH4W5.js +353 -0
  57. package/dist/block.mds.geneboxplot-WYYFDNE3.js +822 -0
  58. package/dist/block.mds.junction-4WCTL7Y4.js +1538 -0
  59. package/dist/block.mds.svcnv-MR3VCYUW.js +6795 -0
  60. package/dist/block.svg-LR3Y4ZO7.js +158 -0
  61. package/dist/block.tk.aicheck-A5AWKJZI.js +277 -0
  62. package/dist/block.tk.ase-AQBBAQEH.js +359 -0
  63. package/dist/block.tk.bam-QBTA2O3V.js +1900 -0
  64. package/dist/block.tk.bedgraphdot-4ALZG2MY.js +378 -0
  65. package/dist/block.tk.bigwig.ui-32W6XW37.js +205 -0
  66. package/dist/block.tk.hicstraw-PKBHBAG2.js +817 -0
  67. package/dist/block.tk.junction-AO5CXUCU.js +2357 -0
  68. package/dist/block.tk.junction.textmatrixui-RORVUIPI.js +193 -0
  69. package/dist/block.tk.ld-TNBSR4FT.js +93 -0
  70. package/dist/block.tk.menu-QDJO54J5.js +1023 -0
  71. package/dist/block.tk.pgv-6222WWYR.js +937 -0
  72. package/dist/brainImaging-2TPE7MXB.js +426 -0
  73. package/dist/brainImaging-2TPE7MXB.js.map +7 -0
  74. package/dist/brainRegions-KTFH6DE2.js +215 -0
  75. package/dist/bubbleHeatmap-LNXZLFY6.js +377 -0
  76. package/dist/cellTypeBubbleHeatmap-SRHUNX3S.js +277 -0
  77. package/dist/chunk-3TXVDBGN.js +626 -0
  78. package/dist/chunk-4HLHKBHP.js +274 -0
  79. package/dist/chunk-5GG7Q2ZG.js +397 -0
  80. package/dist/chunk-5HVAVJKW.js +518 -0
  81. package/dist/chunk-5HVAVJKW.js.map +7 -0
  82. package/dist/chunk-5PMFCQKC.js +98 -0
  83. package/dist/chunk-67URJYN7.js +84 -0
  84. package/dist/chunk-67URJYN7.js.map +7 -0
  85. package/dist/chunk-6AKSOLBX.js +5071 -0
  86. package/dist/chunk-6AKSOLBX.js.map +7 -0
  87. package/dist/chunk-6X7PP7A4.js +2126 -0
  88. package/dist/chunk-A3EDLRUN.js +54 -0
  89. package/dist/chunk-ACXFPMJP.js +14 -0
  90. package/dist/chunk-ASRW3UJ5.js +102 -0
  91. package/dist/chunk-BBILSUDX.js +176 -0
  92. package/dist/chunk-BOWI37X2.js +100 -0
  93. package/dist/chunk-BVA26EFK.js +368 -0
  94. package/dist/chunk-D5J57ENI.js +797 -0
  95. package/dist/chunk-D5PX2UDG.js +23878 -0
  96. package/dist/chunk-D5PX2UDG.js.map +7 -0
  97. package/dist/chunk-DAGONMWK.js +261 -0
  98. package/dist/chunk-DAGONMWK.js.map +7 -0
  99. package/dist/chunk-DXLO4OAB.js +357 -0
  100. package/dist/chunk-DXLO4OAB.js.map +7 -0
  101. package/dist/chunk-E5BFGDLA.js +292 -0
  102. package/dist/chunk-ECISCOPF.js +134 -0
  103. package/dist/chunk-ECLUUJVE.js +158 -0
  104. package/dist/chunk-EGDQ5I54.js +272 -0
  105. package/dist/chunk-ELNVTA7O.js +56 -0
  106. package/dist/chunk-EO6M3LY3.js +339 -0
  107. package/dist/chunk-EO6M3LY3.js.map +7 -0
  108. package/dist/chunk-F4PMOAQK.js +494 -0
  109. package/dist/chunk-FISQTHD4.js +2327 -0
  110. package/dist/chunk-FXT2XM4E.js +1337 -0
  111. package/dist/chunk-FXT2XM4E.js.map +7 -0
  112. package/dist/chunk-HIWTGMTE.js +1721 -0
  113. package/dist/chunk-HIWTGMTE.js.map +7 -0
  114. package/dist/chunk-HL6GJIOH.js +1254 -0
  115. package/dist/chunk-IGZAOCTU.js +55 -0
  116. package/dist/chunk-JMDJI7KM.js +6360 -0
  117. package/dist/chunk-JQVA264Z.js +49 -0
  118. package/dist/chunk-JRF7SRLB.js +2784 -0
  119. package/dist/chunk-KLWSW6CC.js +203 -0
  120. package/dist/chunk-KNNSOOTG.js +194 -0
  121. package/dist/chunk-KTPXQH2N.js +170 -0
  122. package/dist/chunk-LGKXSWY4.js +276 -0
  123. package/dist/chunk-LP2GIXVK.js +4274 -0
  124. package/dist/chunk-M2ZZL5EV.js +2669 -0
  125. package/dist/chunk-M2ZZL5EV.js.map +7 -0
  126. package/dist/chunk-MBHERRJR.js +302 -0
  127. package/dist/chunk-MLYQDJUQ.js +480 -0
  128. package/dist/chunk-NBGDLLMX.js +446 -0
  129. package/dist/chunk-OPMMU6DQ.js +183 -0
  130. package/dist/chunk-OPMMU6DQ.js.map +7 -0
  131. package/dist/chunk-P3JEXVBT.js +50 -0
  132. package/dist/chunk-PZPPJY4K.js +34 -0
  133. package/dist/chunk-Q6JF4ZLT.js +141 -0
  134. package/dist/chunk-QF5IH7PC.js +263 -0
  135. package/dist/chunk-QJ6SO7CF.js +465 -0
  136. package/dist/chunk-QQUOVIOM.js +2899 -0
  137. package/dist/chunk-R3OBOAOF.js +240 -0
  138. package/dist/chunk-SNCZRDS5.js +557 -0
  139. package/dist/chunk-SNCZRDS5.js.map +7 -0
  140. package/dist/chunk-SPDNUC76.js +70 -0
  141. package/dist/chunk-T3663ZQL.js +37 -0
  142. package/dist/chunk-TSK4ZTFK.js +340 -0
  143. package/dist/chunk-USW6WRDZ.js +217 -0
  144. package/dist/chunk-WBMYHNKH.js +299 -0
  145. package/dist/chunk-X46LAU4Q.js +187 -0
  146. package/dist/chunk-XE6E526E.js +129 -0
  147. package/dist/chunk-XWCWBHLB.js +123 -0
  148. package/dist/chunk-YCECQV3T.js +160 -0
  149. package/dist/chunk-YROOKO3Q.js +1954 -0
  150. package/dist/chunk-YROOKO3Q.js.map +7 -0
  151. package/dist/chunk-Z4NADGZX.js +243 -0
  152. package/dist/chunk-Z53KOPRJ.js +102 -0
  153. package/dist/cohort-U7M6Q2UX.js +69 -0
  154. package/dist/condition-EGAV2PMJ.js +326 -0
  155. package/dist/controls-PTMYWUZV.js +33 -0
  156. package/dist/controls.config-DOA6PTP2.js +33 -0
  157. package/dist/correlation-Y3EL6GB7.js +94 -0
  158. package/dist/customdata.inputui-4NDDG6FL.js +283 -0
  159. package/dist/dataDownload-EQGUAOK2.js +328 -0
  160. package/dist/databrowser.ui-ABGOJUWQ.js +424 -0
  161. package/dist/dictionary-YOLLEDE5.js +112 -0
  162. package/dist/dnaMethylation-JZT63UHO.js +32 -0
  163. package/dist/dnaMethylation.integration.spec-EATCABJW.js +197 -0
  164. package/dist/dofetch-YNBIUFV5.js +48 -0
  165. package/dist/e2pca-RD6COCRL.js +343 -0
  166. package/dist/ep-BAI7WUET.js +1248 -0
  167. package/dist/expclust.gdc.spec-LKV2CQA5.js +301 -0
  168. package/dist/facet-X3SXQIAC.js +518 -0
  169. package/dist/gb-K324K7XB.js +80 -0
  170. package/dist/geneExpClustering-BJD5U3KG.js +243 -0
  171. package/dist/geneExpression-2TK3XLZ5.js +310 -0
  172. package/dist/geneExpression-F6NRTHZ4.js +32 -0
  173. package/dist/geneExpression.unit.spec-IFZN3J6A.js +96 -0
  174. package/dist/geneORA-DUEP735U.js +272 -0
  175. package/dist/geneRanking-LURDNT7L.js +547 -0
  176. package/dist/geneVariant-EAVCWQAZ.js +35 -0
  177. package/dist/geneVariant-IZTFYAG6.js +284 -0
  178. package/dist/geneVariant-IZTFYAG6.js.map +7 -0
  179. package/dist/geneVariant.integration.spec-LHL4ERFO.js +192 -0
  180. package/dist/genefusion.ui-4T5R7DT7.js +302 -0
  181. package/dist/geneset-3PWXPBG2.js +202 -0
  182. package/dist/genomeBrowser.spec-5SEN7R2P.js +275 -0
  183. package/dist/grin2-EXBG7TMS.js +1136 -0
  184. package/dist/grin2-XIXVFVWO.js +69 -0
  185. package/dist/hierCluster-5XQIWXAY.js +57 -0
  186. package/dist/hierCluster-I4TAQWPF.js +53 -0
  187. package/dist/hierCluster.config-T7HVAWES.js +34 -0
  188. package/dist/hierCluster.integration.spec-XWX43K4D.js +482 -0
  189. package/dist/hierCluster.interactivity-MYIDHFSL.js +48 -0
  190. package/dist/hierCluster.renderers-YRXA5ZUK.js +19 -0
  191. package/dist/imagePlot-4JQB6JUG.js +155 -0
  192. package/dist/importPlot-D3MXCCLN.js +8 -0
  193. package/dist/isoformExpression-WNGGUVIZ.js +34 -0
  194. package/dist/isoformExpression.unit.spec-NVJ5TIKM.js +236 -0
  195. package/dist/junction-O7N57JE3.js +35 -0
  196. package/dist/junction.unit.spec-Z63DRTRR.js +181 -0
  197. package/dist/launch.adhoc-MBDRXD3B.js +36 -0
  198. package/dist/leftlabel.sample-IG6FOQ26.js +257 -0
  199. package/dist/lollipop-ZUYBLPGN.js +165 -0
  200. package/dist/maf-QOS5LURG.js +454 -0
  201. package/dist/maftimeline-FEHP2J55.js +586 -0
  202. package/dist/matrix-BG4J4RXA.js +57 -0
  203. package/dist/matrix-PX4LWTGN.js +52 -0
  204. package/dist/matrix.cells-PTIDQVCI.js +26 -0
  205. package/dist/matrix.config-NHW7BLIE.js +35 -0
  206. package/dist/matrix.data-FMIQRXOA.js +23 -0
  207. package/dist/matrix.dom-4S2UYJOU.js +11 -0
  208. package/dist/matrix.groups-QMID5XAO.js +25 -0
  209. package/dist/matrix.integration.spec-H6T7KP5R.js +3066 -0
  210. package/dist/matrix.interactivity-WQUO25HB.js +36 -0
  211. package/dist/matrix.layout-CTPVZZ34.js +38 -0
  212. package/dist/matrix.legend-K6EYUN6L.js +20 -0
  213. package/dist/matrix.renderers-5DIAUY6R.js +32 -0
  214. package/dist/matrix.serieses-LRMN2J52.js +19 -0
  215. package/dist/matrix.sort-RGAGEA6Z.js +25 -0
  216. package/dist/matrix.sort.unit.spec-RGICZZJL.js +466 -0
  217. package/dist/matrix.sorterUi.unit.spec-45QPEGWE.js +336 -0
  218. package/dist/matrix.unit.spec-TMRZM5DU.js +148 -0
  219. package/dist/matrix.unit.spec-TMRZM5DU.js.map +7 -0
  220. package/dist/mavb-VEIVB62L.js +726 -0
  221. package/dist/mds.fimo-BG4LTWFB.js +512 -0
  222. package/dist/mds.samplescatterplot-PWADJZ2J.js +1544 -0
  223. package/dist/mds.survivalplot-BX4HZ23K.js +476 -0
  224. package/dist/multivalue-OZALSBFW.js +82 -0
  225. package/dist/numericDictTermCluster-7PGJ7KV4.js +63 -0
  226. package/dist/oncomatrix-Q2EQZPLS.js +289 -0
  227. package/dist/oncomatrix.spec-YEQOQRPW.js +442 -0
  228. package/dist/plot.2dvaf-NJSB3HNH.js +371 -0
  229. package/dist/plot.app-AEUR6XGI.js +35 -0
  230. package/dist/plot.barplot-OXN2P5KL.js +96 -0
  231. package/dist/plot.boxplot-2KHEVVFE.js +145 -0
  232. package/dist/plot.brainImaging-JWDX4BZG.js +51 -0
  233. package/dist/plot.disco-LUFC5GGC.js +99 -0
  234. package/dist/plot.ssgq-FMM3IRNA.js +133 -0
  235. package/dist/plot.vaf2cov-K5TAQUC5.js +252 -0
  236. package/dist/plot.wsi-CNQCNZ4Z.js +36 -0
  237. package/dist/polar2-AB6SVYRS.js +231 -0
  238. package/dist/profileForms-AIEHZ4GC.js +933 -0
  239. package/dist/profilePlot-PZDFGXKZ.js +48 -0
  240. package/dist/proteinView-7GWHQYXC.js +1561 -0
  241. package/dist/proteomeCohortCompare-BTN4HHFL.js +779 -0
  242. package/dist/proteomeCohortCompare-BTN4HHFL.js.map +7 -0
  243. package/dist/pseudbulk.unit.spec-NFT4VNTI.js +85 -0
  244. package/dist/pseudobulk-WDGWTXW4.js +34 -0
  245. package/dist/qualitative-PZYJENE7.js +37 -0
  246. package/dist/radar2-QHRGH3YS.js +326 -0
  247. package/dist/radarFacility2-2JD26FL6.js +334 -0
  248. package/dist/render-YA4Z56LT.js +32 -0
  249. package/dist/report-2NUKFJTF.js +216 -0
  250. package/dist/sampleView-2XVPJTVR.js +42 -0
  251. package/dist/samplelst-DMILFDT5.js +105 -0
  252. package/dist/samplematrix-LYA5XTUM.js +2192 -0
  253. package/dist/sc-CM2C34MN.js +80 -0
  254. package/dist/scatter-C3CH3HTF.js +879 -0
  255. package/dist/scatter-GO6LV6NY.js +87 -0
  256. package/dist/selectGenomeWithTklst-5C7UBTGZ.js +128 -0
  257. package/dist/singleCellCellType-EZYESBVZ.js +32 -0
  258. package/dist/singleCellCellType.unit.spec-DB6FM4XR.js +153 -0
  259. package/dist/singleCellGeneExpression-DZLEFPW4.js +32 -0
  260. package/dist/singleCellGeneExpression.unit.spec-ZTBK3V43.js +147 -0
  261. package/dist/singleCellPlot-VF4TZ4FT.js +48 -0
  262. package/dist/singlecell-2MHROPBN.js +1565 -0
  263. package/dist/singlecell-GPAFNOUZ.js +80 -0
  264. package/dist/snp-K4EAEVW4.js +32 -0
  265. package/dist/snp.unit.spec-BUVQLVOY.js +170 -0
  266. package/dist/snplocus-GEVISN6Z.js +202 -0
  267. package/dist/spliceevent.a53ss.diagram-5UPWNAZF.js +145 -0
  268. package/dist/spliceevent.exonskip.diagram-7TKAQURC.js +277 -0
  269. package/dist/spliceevent.noeventdiagram-CDXZLR3Z.js +454 -0
  270. package/dist/ssGSEA-NMCJUQXT.js +32 -0
  271. package/dist/ssGSEA.unit.spec-3FQALTPQ.js +82 -0
  272. package/dist/stattable-2RXQPWKK.js +116 -0
  273. package/dist/studyCatalog-WWFCTTX7.js +377 -0
  274. package/dist/studyCatalog-WWFCTTX7.js.map +7 -0
  275. package/dist/summarizeCnvGeneexp-4BQS5AFM.js +157 -0
  276. package/dist/summarizeGeneexpSurvival-HTBZQFB5.js +104 -0
  277. package/dist/summarizeMutationCnv-XUWZGPCM.js +158 -0
  278. package/dist/summarizeMutationDiagnosis-QUJX42TO.js +34 -0
  279. package/dist/summarizeMutationSurvival-3R47TTR6.js +93 -0
  280. package/dist/summary-6UUB63QR.js +41 -0
  281. package/dist/summary.integration.spec-JJDE6SRV.js +408 -0
  282. package/dist/summaryInput-JG4AW6FW.js +225 -0
  283. package/dist/sunburst-YKB42RZX.js +277 -0
  284. package/dist/survival-3IFFTDQA.js +52 -0
  285. package/dist/survival-HOFNJENX.js +1236 -0
  286. package/dist/survival.integration.spec-7YZYKEUW.js +612 -0
  287. package/dist/survival.integration.spec-7YZYKEUW.js.map +7 -0
  288. package/dist/svgraph-WFEY4ZIZ.js +1381 -0
  289. package/dist/svmr-44EIX7YD.js +3836 -0
  290. package/dist/table-6MKVJUNC.js +196 -0
  291. package/dist/termCollection-6JBVQL6Y.js +251 -0
  292. package/dist/termCollection-TTELZVC5.js +32 -0
  293. package/dist/termCollection.unit.spec-6Z7X646L.js +298 -0
  294. package/dist/termCollectionFractionSelection-5DVIJBM5.js +41 -0
  295. package/dist/termCollectionFractionSelection.unit.spec-3HIM5BIF.js +187 -0
  296. package/dist/tk-HSYWJCGQ.js +40 -0
  297. package/dist/tk-PNOVG2XS.js +1120 -0
  298. package/dist/tp.ui-COBBSUPB.js +1453 -0
  299. package/dist/tvs.dt-35AKURFI.js +33 -0
  300. package/dist/tvs.dtcnv.categorical-3EHXYROL.js +34 -0
  301. package/dist/tvs.dtcnv.continuous-AXQ2GU6S.js +66 -0
  302. package/dist/tvs.dtfusion-PLJIMPNX.js +34 -0
  303. package/dist/tvs.dtitd-JS6RFBV5.js +34 -0
  304. package/dist/tvs.dtsnvindel-MDEM5MPT.js +34 -0
  305. package/dist/tvs.dtsv-OU756YLO.js +34 -0
  306. package/dist/tvs.samplelst-5NDICES4.js +98 -0
  307. package/dist/tvs.termCollection-5URPDPH6.js +123 -0
  308. package/dist/vocabulary-CHCVMPK5.js +35 -0
  309. package/dist/wsi.direct-JSKV4H4X.js +75 -0
  310. package/package.json +4 -4
  311. package/dist/2dmaf-I4HBWRNQ.js +0 -1366
  312. package/dist/AIProjectAdmin-SZYSG7HR.js +0 -951
  313. package/dist/AggregateMatrix-U7HHALFR.js +0 -665
  314. package/dist/AppHeader-O4RBZQZF.js +0 -829
  315. package/dist/BoxPlot-NOXWAGX6.js +0 -1210
  316. package/dist/CorrelationVolcano-IJ5UT6N5.js +0 -613
  317. package/dist/Cuminc-NGUDAOAD.js +0 -1208
  318. package/dist/DE-MIAHOI5J.js +0 -87
  319. package/dist/DEinput-FYBSL2ER.js +0 -404
  320. package/dist/DifferentialAnalysis-I6S5YQXY.js +0 -237
  321. package/dist/Disco-VLUBOZDC.js +0 -3388
  322. package/dist/Disco.UI-QQYWQEW7.js +0 -242
  323. package/dist/DmrPlot-DFOBEN7A.js +0 -636
  324. package/dist/GB-5FSXJMEZ.js +0 -1390
  325. package/dist/GSEA-JISHQOVY.js +0 -850
  326. package/dist/GeneExpInput-5YEX22VD.js +0 -361
  327. package/dist/Geomap-YVF6YBK5.js +0 -83
  328. package/dist/HicApp-ZCMOOKTY.js +0 -2244
  329. package/dist/IDCViewer-5ZNTAEUG.js +0 -10811
  330. package/dist/NumBinaryEditor-BEF5YCKI.js +0 -278
  331. package/dist/NumBinaryEditor.unit.spec-GCYZGHB2.js +0 -311
  332. package/dist/NumContEditor-TUXPB6YJ.js +0 -104
  333. package/dist/NumContEditor.unit.spec-5CMHHWIP.js +0 -163
  334. package/dist/NumCustomBinEditor-HS7RSGFV.js +0 -32
  335. package/dist/NumCustomBinEditor.unit.spec-MM3JJXT4.js +0 -396
  336. package/dist/NumDiscreteEditor-ZL7PP6ZT.js +0 -169
  337. package/dist/NumDiscreteEditor.unit.spec-OEWX2KJC.js +0 -232
  338. package/dist/NumRegularBinEditor-YBXK7YV6.js +0 -32
  339. package/dist/NumRegularBinEditor.unit.spec-FVHN4J5L.js +0 -277
  340. package/dist/NumSplineEditor-VN4XBTTI.js +0 -209
  341. package/dist/NumSplineEditor.unit.spec-AI642DWP.js +0 -223
  342. package/dist/NumericDensity-2KTY7DGH.js +0 -32
  343. package/dist/NumericDensity.unit.spec-6EA72A24.js +0 -417
  344. package/dist/NumericHandler-62EN6AD3.js +0 -33
  345. package/dist/NumericHandler.unit.spec-FXOJ2L2L.js +0 -213
  346. package/dist/ProteomeInput-MBBDXO2Z.js +0 -387
  347. package/dist/Regression-OQETMZPL.js +0 -1408
  348. package/dist/Regression-OQETMZPL.js.map +0 -7
  349. package/dist/RunChart2-RHZFHH4M.js +0 -749
  350. package/dist/SC-FAQXOHO4.js +0 -1106
  351. package/dist/Violin-2A3ICNBP.js +0 -1073
  352. package/dist/Volcano-X5KGHLHZ.js +0 -1414
  353. package/dist/WSIViewer-F2SD6LLP.js +0 -26194
  354. package/dist/Wsi-KAFAC3Q5.js +0 -232
  355. package/dist/WsiSamplesPlot-VKPMLDZI.js +0 -159
  356. package/dist/adSandbox-QKG5EA23.js +0 -32
  357. package/dist/animatedBubbleChart-ES62XWMN.js +0 -546
  358. package/dist/app-2HLLOBTD.js +0 -41
  359. package/dist/app-GJL6K6V4.js +0 -31
  360. package/dist/bam-DCPAAVPX.js +0 -875
  361. package/dist/barchart-DCVGCEZO.js +0 -41
  362. package/dist/barchart2-5X57VSIN.js +0 -308
  363. package/dist/block-XYSUTBXJ.js +0 -6248
  364. package/dist/block.init-5B27QKPU.js +0 -32
  365. package/dist/block.mds.expressionrank-Z7BGGPZ7.js +0 -353
  366. package/dist/block.mds.geneboxplot-4U4UZH2J.js +0 -822
  367. package/dist/block.mds.junction-ZPCUEQZJ.js +0 -1538
  368. package/dist/block.mds.svcnv-OGGPBOL2.js +0 -6795
  369. package/dist/block.svg-BWGAMNDS.js +0 -158
  370. package/dist/block.tk.aicheck-XHHW7WST.js +0 -277
  371. package/dist/block.tk.ase-BZ2IL3CQ.js +0 -359
  372. package/dist/block.tk.bam-WRHOOWXN.js +0 -1900
  373. package/dist/block.tk.bedgraphdot-B536STRA.js +0 -378
  374. package/dist/block.tk.bigwig.ui-K5X3BSQC.js +0 -205
  375. package/dist/block.tk.hicstraw-OYOKZ45W.js +0 -817
  376. package/dist/block.tk.junction-S5JMMMR6.js +0 -2357
  377. package/dist/block.tk.junction.textmatrixui-OLZY5BYR.js +0 -193
  378. package/dist/block.tk.ld-KINDO5UU.js +0 -93
  379. package/dist/block.tk.menu-3FNBVZ7J.js +0 -1023
  380. package/dist/block.tk.pgv-UHDY3T4G.js +0 -937
  381. package/dist/brainImaging-KWFRX3XB.js +0 -422
  382. package/dist/brainImaging-KWFRX3XB.js.map +0 -7
  383. package/dist/brainRegions-YI7K4OVE.js +0 -215
  384. package/dist/bubbleHeatmap-EQ44CSG5.js +0 -377
  385. package/dist/cellTypeBubbleHeatmap-O3KL2YBF.js +0 -277
  386. package/dist/chunk-254KEDDH.js +0 -129
  387. package/dist/chunk-25RPYQRT.js +0 -203
  388. package/dist/chunk-2OEMKKLP.js +0 -272
  389. package/dist/chunk-34AV6DED.js +0 -299
  390. package/dist/chunk-3UOSDVFJ.js +0 -1710
  391. package/dist/chunk-3UOSDVFJ.js.map +0 -7
  392. package/dist/chunk-4GN3CSDT.js +0 -98
  393. package/dist/chunk-4KUGV44F.js +0 -397
  394. package/dist/chunk-4WF3XDQP.js +0 -220
  395. package/dist/chunk-4WF3XDQP.js.map +0 -7
  396. package/dist/chunk-55PGOBTR.js +0 -123
  397. package/dist/chunk-5RHE36DQ.js +0 -37
  398. package/dist/chunk-6456HESK.js +0 -160
  399. package/dist/chunk-6THPWBBU.js +0 -102
  400. package/dist/chunk-6ZLCBVJA.js +0 -54
  401. package/dist/chunk-7AYGTMED.js +0 -182
  402. package/dist/chunk-7AYGTMED.js.map +0 -7
  403. package/dist/chunk-7ROMS7YT.js +0 -626
  404. package/dist/chunk-7UFK4GVI.js +0 -263
  405. package/dist/chunk-7UFK4GVI.js.map +0 -7
  406. package/dist/chunk-ALXSSRGI.js +0 -263
  407. package/dist/chunk-AT7HWXMW.js +0 -302
  408. package/dist/chunk-AVR4LFOO.js +0 -194
  409. package/dist/chunk-BY5B5BM5.js +0 -170
  410. package/dist/chunk-BZ36NJHA.js +0 -797
  411. package/dist/chunk-BZKHE26Z.js +0 -340
  412. package/dist/chunk-CBRZIMNF.js +0 -217
  413. package/dist/chunk-CTO247UZ.js +0 -5069
  414. package/dist/chunk-CTO247UZ.js.map +0 -7
  415. package/dist/chunk-D27C6HZW.js +0 -50
  416. package/dist/chunk-D73PJ4WC.js +0 -512
  417. package/dist/chunk-D73PJ4WC.js.map +0 -7
  418. package/dist/chunk-DLXMO6EK.js +0 -494
  419. package/dist/chunk-EK7CQC3P.js +0 -100
  420. package/dist/chunk-FCMHDCMO.js +0 -56
  421. package/dist/chunk-GJFG2MML.js +0 -1254
  422. package/dist/chunk-GQQ4R6BI.js +0 -24060
  423. package/dist/chunk-GQQ4R6BI.js.map +0 -7
  424. package/dist/chunk-HENLCRVM.js +0 -2126
  425. package/dist/chunk-I56CSICA.js +0 -292
  426. package/dist/chunk-I5KBI5PC.js +0 -274
  427. package/dist/chunk-IHDVUZFC.js +0 -1947
  428. package/dist/chunk-IHDVUZFC.js.map +0 -7
  429. package/dist/chunk-IUA3PSTK.js +0 -6360
  430. package/dist/chunk-J3TIXBCS.js +0 -276
  431. package/dist/chunk-JJHMFHRC.js +0 -257
  432. package/dist/chunk-JJHMFHRC.js.map +0 -7
  433. package/dist/chunk-JPQSDB2H.js +0 -102
  434. package/dist/chunk-LIMDUEVX.js +0 -1336
  435. package/dist/chunk-LIMDUEVX.js.map +0 -7
  436. package/dist/chunk-MECQLU4J.js +0 -243
  437. package/dist/chunk-MEJMWIBD.js +0 -187
  438. package/dist/chunk-MT5MHYL3.js +0 -480
  439. package/dist/chunk-NVH5I6EP.js +0 -176
  440. package/dist/chunk-OGQMELRU.js +0 -14
  441. package/dist/chunk-PBRW6QLS.js +0 -4274
  442. package/dist/chunk-PPJMCBVT.js +0 -82
  443. package/dist/chunk-PPJMCBVT.js.map +0 -7
  444. package/dist/chunk-RRI3RX4A.js +0 -2669
  445. package/dist/chunk-RRI3RX4A.js.map +0 -7
  446. package/dist/chunk-S2D6GH6D.js +0 -465
  447. package/dist/chunk-SACNULB3.js +0 -368
  448. package/dist/chunk-SEJGXC2L.js +0 -141
  449. package/dist/chunk-TMZZ4Z7L.js +0 -34
  450. package/dist/chunk-TRWFL52W.js +0 -446
  451. package/dist/chunk-VP2FPPLA.js +0 -70
  452. package/dist/chunk-VTYMSJGY.js +0 -49
  453. package/dist/chunk-WEF6INPI.js +0 -2784
  454. package/dist/chunk-WO4CL5JL.js +0 -240
  455. package/dist/chunk-WVVH56ZU.js +0 -2327
  456. package/dist/chunk-WZTZJNSG.js +0 -2899
  457. package/dist/chunk-XPSUKXMF.js +0 -556
  458. package/dist/chunk-XPSUKXMF.js.map +0 -7
  459. package/dist/chunk-XXITHNR2.js +0 -134
  460. package/dist/chunk-YCLNEB4L.js +0 -158
  461. package/dist/chunk-ZPFN3CYR.js +0 -55
  462. package/dist/cohort-JCMVMOBQ.js +0 -69
  463. package/dist/condition-SHRWEMG7.js +0 -326
  464. package/dist/controls-EKIHLQS6.js +0 -33
  465. package/dist/controls.config-WSVX6UC6.js +0 -33
  466. package/dist/correlation-ALFFZLKD.js +0 -94
  467. package/dist/customdata.inputui-L2UAIU6I.js +0 -283
  468. package/dist/dataDownload-73N5364T.js +0 -328
  469. package/dist/databrowser.ui-NTOGXDYE.js +0 -424
  470. package/dist/dictionary-CUAU2X6Q.js +0 -112
  471. package/dist/dnaMethylation-AGWAGXVD.js +0 -32
  472. package/dist/dnaMethylation.integration.spec-K22XXOU4.js +0 -197
  473. package/dist/dofetch-BVJ77SP7.js +0 -48
  474. package/dist/e2pca-4HIJWLSC.js +0 -343
  475. package/dist/ep-U4RGH62P.js +0 -1248
  476. package/dist/expclust.gdc.spec-JJGGQDQK.js +0 -301
  477. package/dist/facet-NNUPVXCG.js +0 -518
  478. package/dist/gb-2MYXJEMY.js +0 -80
  479. package/dist/geneExpClustering-6ORRRH43.js +0 -243
  480. package/dist/geneExpression-4JVWKJWP.js +0 -310
  481. package/dist/geneExpression-MARWAIHW.js +0 -32
  482. package/dist/geneExpression.unit.spec-3CQTUSDK.js +0 -96
  483. package/dist/geneORA-M2L2YEX3.js +0 -272
  484. package/dist/geneRanking-S2B3LSTU.js +0 -547
  485. package/dist/geneVariant-D2ANGINP.js +0 -35
  486. package/dist/geneVariant-T4NG72OL.js +0 -33
  487. package/dist/geneVariant.integration.spec-62NJS7GD.js +0 -192
  488. package/dist/genefusion.ui-4ZZNKANU.js +0 -302
  489. package/dist/geneset-QCLFANPD.js +0 -202
  490. package/dist/genomeBrowser.spec-BV5M6JFN.js +0 -275
  491. package/dist/grin2-J4VDS2JT.js +0 -1136
  492. package/dist/grin2-K5G3N5XP.js +0 -69
  493. package/dist/hierCluster-FMK524WF.js +0 -57
  494. package/dist/hierCluster-XF7ZWVKD.js +0 -53
  495. package/dist/hierCluster.config-LYAQCO3L.js +0 -34
  496. package/dist/hierCluster.integration.spec-NSLTJBL4.js +0 -482
  497. package/dist/hierCluster.interactivity-VKAOR2DR.js +0 -48
  498. package/dist/hierCluster.renderers-6C5F7LRL.js +0 -19
  499. package/dist/imagePlot-IPTIFVLT.js +0 -155
  500. package/dist/importPlot-V3P6DCUR.js +0 -8
  501. package/dist/isoformExpression-6IIPJI4M.js +0 -34
  502. package/dist/isoformExpression.unit.spec-IYZWSLO5.js +0 -236
  503. package/dist/junction-E6FB2OP4.js +0 -35
  504. package/dist/junction.unit.spec-M4EN7KPG.js +0 -181
  505. package/dist/launch.adhoc-SU5L2YXN.js +0 -36
  506. package/dist/leftlabel.sample-5WTK5NBD.js +0 -257
  507. package/dist/lollipop-L64ZTEEX.js +0 -165
  508. package/dist/maf-QLNFANWO.js +0 -454
  509. package/dist/maftimeline-U7FMTMTV.js +0 -586
  510. package/dist/matrix-GFVK3PEB.js +0 -57
  511. package/dist/matrix-HFJQGPJJ.js +0 -52
  512. package/dist/matrix.cells-5JKTBI3X.js +0 -26
  513. package/dist/matrix.config-QPTQ22RR.js +0 -35
  514. package/dist/matrix.data-MXIUMSRR.js +0 -23
  515. package/dist/matrix.dom-ENBFB4CW.js +0 -11
  516. package/dist/matrix.groups-6DYTBVGR.js +0 -25
  517. package/dist/matrix.integration.spec-X4HM67TN.js +0 -3066
  518. package/dist/matrix.interactivity-QTB56LXE.js +0 -36
  519. package/dist/matrix.layout-VQAORIIH.js +0 -38
  520. package/dist/matrix.legend-SDJXYNHE.js +0 -20
  521. package/dist/matrix.renderers-6PMYIP2S.js +0 -32
  522. package/dist/matrix.serieses-WWY7474U.js +0 -19
  523. package/dist/matrix.sort-V46C2MAZ.js +0 -25
  524. package/dist/matrix.sort.unit.spec-3RM7V6CS.js +0 -466
  525. package/dist/matrix.sorterUi.unit.spec-YOV6FBRT.js +0 -336
  526. package/dist/mavb-PJA76T7F.js +0 -726
  527. package/dist/mds.fimo-GW7XPJGQ.js +0 -512
  528. package/dist/mds.samplescatterplot-ZAIEWPO4.js +0 -1544
  529. package/dist/mds.survivalplot-ETLLFDWR.js +0 -476
  530. package/dist/multivalue-AZPAQJQD.js +0 -82
  531. package/dist/numericDictTermCluster-KOJODGZT.js +0 -63
  532. package/dist/oncomatrix-2TRXETOJ.js +0 -289
  533. package/dist/oncomatrix.spec-DOVKLS24.js +0 -442
  534. package/dist/plot.2dvaf-RQN6QADW.js +0 -371
  535. package/dist/plot.app-MOIVGIS6.js +0 -35
  536. package/dist/plot.barplot-46QRWJOX.js +0 -96
  537. package/dist/plot.boxplot-54J4UWQX.js +0 -145
  538. package/dist/plot.brainImaging-Y32KQFLS.js +0 -51
  539. package/dist/plot.disco-4R5J7Z5S.js +0 -99
  540. package/dist/plot.ssgq-6LCKYRYD.js +0 -133
  541. package/dist/plot.vaf2cov-UCBH4NSC.js +0 -252
  542. package/dist/plot.wsi-DAC7NUQE.js +0 -36
  543. package/dist/polar2-JKV74QV5.js +0 -231
  544. package/dist/profileForms-VDYCFH4M.js +0 -933
  545. package/dist/profilePlot-PR3LVRYU.js +0 -48
  546. package/dist/proteinView-A3EM6OR5.js +0 -1561
  547. package/dist/proteomeCohortCompare-QGFEJTDQ.js +0 -793
  548. package/dist/proteomeCohortCompare-QGFEJTDQ.js.map +0 -7
  549. package/dist/pseudbulk.unit.spec-CUMTLAH7.js +0 -85
  550. package/dist/pseudobulk-5E5MSMU3.js +0 -34
  551. package/dist/qualitative-WPXUBISK.js +0 -37
  552. package/dist/radar2-A5OYMORS.js +0 -326
  553. package/dist/radarFacility2-4TPJB6M4.js +0 -334
  554. package/dist/render-XQBWWS33.js +0 -32
  555. package/dist/report-NCJOTYIC.js +0 -216
  556. package/dist/sampleView-2PUSMG4W.js +0 -42
  557. package/dist/samplelst-FV7BAUN5.js +0 -105
  558. package/dist/samplematrix-DFD3PNI4.js +0 -2192
  559. package/dist/sc-GIMTDVLG.js +0 -80
  560. package/dist/scatter-4GJ5HKUY.js +0 -879
  561. package/dist/scatter-P3ISZB3R.js +0 -87
  562. package/dist/selectGenomeWithTklst-ZZ4CEHDU.js +0 -128
  563. package/dist/singleCellCellType-CEERCVTR.js +0 -32
  564. package/dist/singleCellCellType.unit.spec-JNEIICK5.js +0 -153
  565. package/dist/singleCellGeneExpression-G5B7DDES.js +0 -32
  566. package/dist/singleCellGeneExpression.unit.spec-CGRZGY66.js +0 -147
  567. package/dist/singleCellPlot-US5KTHS4.js +0 -48
  568. package/dist/singlecell-IPTSIKNA.js +0 -1565
  569. package/dist/singlecell-VB4KLPJF.js +0 -80
  570. package/dist/snp-6V2SCCRN.js +0 -32
  571. package/dist/snp.unit.spec-Q537NGVG.js +0 -170
  572. package/dist/snplocus-BV6WJTVP.js +0 -202
  573. package/dist/spliceevent.a53ss.diagram-3BUQVK4Q.js +0 -145
  574. package/dist/spliceevent.exonskip.diagram-CQZ2DFQ5.js +0 -277
  575. package/dist/spliceevent.noeventdiagram-QAEPR6LD.js +0 -454
  576. package/dist/ssGSEA-XNI5S7AC.js +0 -32
  577. package/dist/ssGSEA.unit.spec-A337IMC7.js +0 -82
  578. package/dist/stattable-J4ZQKJFM.js +0 -116
  579. package/dist/studyCatalog-BJTJJGBC.js +0 -352
  580. package/dist/studyCatalog-BJTJJGBC.js.map +0 -7
  581. package/dist/summarizeCnvGeneexp-76UJXLA4.js +0 -157
  582. package/dist/summarizeGeneexpSurvival-ZUEHXA2R.js +0 -104
  583. package/dist/summarizeMutationCnv-EBCBVMG6.js +0 -158
  584. package/dist/summarizeMutationDiagnosis-VLFI2ZIZ.js +0 -34
  585. package/dist/summarizeMutationSurvival-QRFMJLLO.js +0 -93
  586. package/dist/summary-U3YKEMZC.js +0 -41
  587. package/dist/summary.integration.spec-52WP6SNY.js +0 -408
  588. package/dist/summaryInput-WUJNHCGH.js +0 -225
  589. package/dist/sunburst-IJ3ZG2BC.js +0 -277
  590. package/dist/survival-F2B5JKOO.js +0 -1236
  591. package/dist/survival-SQRYWGWZ.js +0 -52
  592. package/dist/survival.integration.spec-YGRZJ2OL.js +0 -967
  593. package/dist/survival.integration.spec-YGRZJ2OL.js.map +0 -7
  594. package/dist/svgraph-HVCMF6KI.js +0 -1381
  595. package/dist/svmr-PROHTMTP.js +0 -3836
  596. package/dist/table-3E64OJNV.js +0 -196
  597. package/dist/termCollection-MUH7P6B5.js +0 -32
  598. package/dist/termCollection-WKT6ESMI.js +0 -251
  599. package/dist/termCollection.unit.spec-XMOCMVER.js +0 -298
  600. package/dist/termCollectionFractionSelection-P5G6WIJJ.js +0 -41
  601. package/dist/termCollectionFractionSelection.unit.spec-MG7E3EIZ.js +0 -187
  602. package/dist/tk-HWUPUGOS.js +0 -1120
  603. package/dist/tk-SBM2GN3S.js +0 -40
  604. package/dist/tp.ui-RRB5MJRD.js +0 -1453
  605. package/dist/tvs.dt-I2ECKHQ2.js +0 -33
  606. package/dist/tvs.dtcnv.categorical-7RJPQKMX.js +0 -34
  607. package/dist/tvs.dtcnv.continuous-FW4ZXIYY.js +0 -66
  608. package/dist/tvs.dtfusion-3GDWW3ML.js +0 -34
  609. package/dist/tvs.dtitd-FER4H4UO.js +0 -34
  610. package/dist/tvs.dtsnvindel-ISEOJ5UA.js +0 -34
  611. package/dist/tvs.dtsv-JDML7EWE.js +0 -34
  612. package/dist/tvs.samplelst-MJTM6GSV.js +0 -98
  613. package/dist/tvs.termCollection-GMOXBJWF.js +0 -123
  614. package/dist/vocabulary-5EJMLXI2.js +0 -35
  615. package/dist/vocabulary-5EJMLXI2.js.map +0 -7
  616. package/dist/wsi.direct-IVPACPNT.js +0 -75
  617. /package/dist/{2dmaf-I4HBWRNQ.js.map → 2dmaf-6CEBP4SA.js.map} +0 -0
  618. /package/dist/{AIProjectAdmin-SZYSG7HR.js.map → AIProjectAdmin-2CKKFC3A.js.map} +0 -0
  619. /package/dist/{AggregateMatrix-U7HHALFR.js.map → AggregateMatrix-5TBUMFE5.js.map} +0 -0
  620. /package/dist/{AppHeader-O4RBZQZF.js.map → AppHeader-5YBPWF44.js.map} +0 -0
  621. /package/dist/{BoxPlot-NOXWAGX6.js.map → BoxPlot-UOJS5SJV.js.map} +0 -0
  622. /package/dist/{CorrelationVolcano-IJ5UT6N5.js.map → CorrelationVolcano-KX6JPZMT.js.map} +0 -0
  623. /package/dist/{Cuminc-NGUDAOAD.js.map → Cuminc-TLOOLZWR.js.map} +0 -0
  624. /package/dist/{DE-MIAHOI5J.js.map → DE-HUQLQ2Z3.js.map} +0 -0
  625. /package/dist/{DEinput-FYBSL2ER.js.map → DEinput-WWUISAF2.js.map} +0 -0
  626. /package/dist/{DifferentialAnalysis-I6S5YQXY.js.map → DifferentialAnalysis-6DTAGCEY.js.map} +0 -0
  627. /package/dist/{Disco-VLUBOZDC.js.map → Disco-P6ZLPYLF.js.map} +0 -0
  628. /package/dist/{Disco.UI-QQYWQEW7.js.map → Disco.UI-WGTMAFK2.js.map} +0 -0
  629. /package/dist/{DmrPlot-DFOBEN7A.js.map → DmrPlot-3FRU5KUK.js.map} +0 -0
  630. /package/dist/{GB-5FSXJMEZ.js.map → GB-NWOBARL3.js.map} +0 -0
  631. /package/dist/{GSEA-JISHQOVY.js.map → GSEA-DEEUAAMI.js.map} +0 -0
  632. /package/dist/{GeneExpInput-5YEX22VD.js.map → GeneExpInput-6QWGEAFV.js.map} +0 -0
  633. /package/dist/{Geomap-YVF6YBK5.js.map → Geomap-6HT2B7RH.js.map} +0 -0
  634. /package/dist/{HicApp-ZCMOOKTY.js.map → HicApp-PCNOUULF.js.map} +0 -0
  635. /package/dist/{IDCViewer-5ZNTAEUG.js.map → IDCViewer-H3QPXVM3.js.map} +0 -0
  636. /package/dist/{NumBinaryEditor-BEF5YCKI.js.map → NumBinaryEditor-IU6OLMKN.js.map} +0 -0
  637. /package/dist/{NumBinaryEditor.unit.spec-GCYZGHB2.js.map → NumBinaryEditor.unit.spec-YUPUILIV.js.map} +0 -0
  638. /package/dist/{NumContEditor-TUXPB6YJ.js.map → NumContEditor-KFDA76QN.js.map} +0 -0
  639. /package/dist/{NumContEditor.unit.spec-5CMHHWIP.js.map → NumContEditor.unit.spec-QBOT5QHU.js.map} +0 -0
  640. /package/dist/{NumCustomBinEditor-HS7RSGFV.js.map → NumCustomBinEditor-EOSTEXLB.js.map} +0 -0
  641. /package/dist/{NumCustomBinEditor.unit.spec-MM3JJXT4.js.map → NumCustomBinEditor.unit.spec-B46XWFYH.js.map} +0 -0
  642. /package/dist/{NumDiscreteEditor-ZL7PP6ZT.js.map → NumDiscreteEditor-Y4EAADXC.js.map} +0 -0
  643. /package/dist/{NumDiscreteEditor.unit.spec-OEWX2KJC.js.map → NumDiscreteEditor.unit.spec-SJGHLWSM.js.map} +0 -0
  644. /package/dist/{NumRegularBinEditor-YBXK7YV6.js.map → NumRegularBinEditor-3BNG7DIN.js.map} +0 -0
  645. /package/dist/{NumRegularBinEditor.unit.spec-FVHN4J5L.js.map → NumRegularBinEditor.unit.spec-KM45QXXG.js.map} +0 -0
  646. /package/dist/{NumSplineEditor-VN4XBTTI.js.map → NumSplineEditor-K4KPDC4S.js.map} +0 -0
  647. /package/dist/{NumSplineEditor.unit.spec-AI642DWP.js.map → NumSplineEditor.unit.spec-TKQP5XTS.js.map} +0 -0
  648. /package/dist/{NumericDensity-2KTY7DGH.js.map → NumericDensity-Z6JFVN3D.js.map} +0 -0
  649. /package/dist/{NumericDensity.unit.spec-6EA72A24.js.map → NumericDensity.unit.spec-YEYBVLEP.js.map} +0 -0
  650. /package/dist/{NumericHandler-62EN6AD3.js.map → NumericHandler-ITT6HMPN.js.map} +0 -0
  651. /package/dist/{NumericHandler.unit.spec-FXOJ2L2L.js.map → NumericHandler.unit.spec-QVONMXY4.js.map} +0 -0
  652. /package/dist/{ProteomeInput-MBBDXO2Z.js.map → ProteomeInput-PRS3DEMZ.js.map} +0 -0
  653. /package/dist/{RunChart2-RHZFHH4M.js.map → RunChart2-AMM2JFF5.js.map} +0 -0
  654. /package/dist/{SC-FAQXOHO4.js.map → SC-F7IE66VZ.js.map} +0 -0
  655. /package/dist/{Violin-2A3ICNBP.js.map → Violin-RJ6OJZ4F.js.map} +0 -0
  656. /package/dist/{Volcano-X5KGHLHZ.js.map → Volcano-BJA5HN5Y.js.map} +0 -0
  657. /package/dist/{WSIViewer-F2SD6LLP.js.map → WSIViewer-RJZGRUIR.js.map} +0 -0
  658. /package/dist/{Wsi-KAFAC3Q5.js.map → Wsi-DXP6KOQA.js.map} +0 -0
  659. /package/dist/{WsiSamplesPlot-VKPMLDZI.js.map → WsiSamplesPlot-2IAWV2B6.js.map} +0 -0
  660. /package/dist/{adSandbox-QKG5EA23.js.map → adSandbox-RGWOIV3W.js.map} +0 -0
  661. /package/dist/{animatedBubbleChart-ES62XWMN.js.map → animatedBubbleChart-J4Q2NAEW.js.map} +0 -0
  662. /package/dist/{app-2HLLOBTD.js.map → app-3QXNR4VG.js.map} +0 -0
  663. /package/dist/{app-GJL6K6V4.js.map → app-B4B7YNP3.js.map} +0 -0
  664. /package/dist/{bam-DCPAAVPX.js.map → bam-LRUMN45P.js.map} +0 -0
  665. /package/dist/{barchart-DCVGCEZO.js.map → barchart-L2G6GEHK.js.map} +0 -0
  666. /package/dist/{barchart2-5X57VSIN.js.map → barchart2-DWNVAZAJ.js.map} +0 -0
  667. /package/dist/{block-XYSUTBXJ.js.map → block-TVEVAXNP.js.map} +0 -0
  668. /package/dist/{block.init-5B27QKPU.js.map → block.init-YOHAKPRI.js.map} +0 -0
  669. /package/dist/{block.mds.expressionrank-Z7BGGPZ7.js.map → block.mds.expressionrank-PU6JH4W5.js.map} +0 -0
  670. /package/dist/{block.mds.geneboxplot-4U4UZH2J.js.map → block.mds.geneboxplot-WYYFDNE3.js.map} +0 -0
  671. /package/dist/{block.mds.junction-ZPCUEQZJ.js.map → block.mds.junction-4WCTL7Y4.js.map} +0 -0
  672. /package/dist/{block.mds.svcnv-OGGPBOL2.js.map → block.mds.svcnv-MR3VCYUW.js.map} +0 -0
  673. /package/dist/{block.svg-BWGAMNDS.js.map → block.svg-LR3Y4ZO7.js.map} +0 -0
  674. /package/dist/{block.tk.aicheck-XHHW7WST.js.map → block.tk.aicheck-A5AWKJZI.js.map} +0 -0
  675. /package/dist/{block.tk.ase-BZ2IL3CQ.js.map → block.tk.ase-AQBBAQEH.js.map} +0 -0
  676. /package/dist/{block.tk.bam-WRHOOWXN.js.map → block.tk.bam-QBTA2O3V.js.map} +0 -0
  677. /package/dist/{block.tk.bedgraphdot-B536STRA.js.map → block.tk.bedgraphdot-4ALZG2MY.js.map} +0 -0
  678. /package/dist/{block.tk.bigwig.ui-K5X3BSQC.js.map → block.tk.bigwig.ui-32W6XW37.js.map} +0 -0
  679. /package/dist/{block.tk.hicstraw-OYOKZ45W.js.map → block.tk.hicstraw-PKBHBAG2.js.map} +0 -0
  680. /package/dist/{block.tk.junction-S5JMMMR6.js.map → block.tk.junction-AO5CXUCU.js.map} +0 -0
  681. /package/dist/{block.tk.junction.textmatrixui-OLZY5BYR.js.map → block.tk.junction.textmatrixui-RORVUIPI.js.map} +0 -0
  682. /package/dist/{block.tk.ld-KINDO5UU.js.map → block.tk.ld-TNBSR4FT.js.map} +0 -0
  683. /package/dist/{block.tk.menu-3FNBVZ7J.js.map → block.tk.menu-QDJO54J5.js.map} +0 -0
  684. /package/dist/{block.tk.pgv-UHDY3T4G.js.map → block.tk.pgv-6222WWYR.js.map} +0 -0
  685. /package/dist/{brainRegions-YI7K4OVE.js.map → brainRegions-KTFH6DE2.js.map} +0 -0
  686. /package/dist/{bubbleHeatmap-EQ44CSG5.js.map → bubbleHeatmap-LNXZLFY6.js.map} +0 -0
  687. /package/dist/{cellTypeBubbleHeatmap-O3KL2YBF.js.map → cellTypeBubbleHeatmap-SRHUNX3S.js.map} +0 -0
  688. /package/dist/{chunk-7ROMS7YT.js.map → chunk-3TXVDBGN.js.map} +0 -0
  689. /package/dist/{chunk-I5KBI5PC.js.map → chunk-4HLHKBHP.js.map} +0 -0
  690. /package/dist/{chunk-4KUGV44F.js.map → chunk-5GG7Q2ZG.js.map} +0 -0
  691. /package/dist/{chunk-4GN3CSDT.js.map → chunk-5PMFCQKC.js.map} +0 -0
  692. /package/dist/{chunk-HENLCRVM.js.map → chunk-6X7PP7A4.js.map} +0 -0
  693. /package/dist/{chunk-6ZLCBVJA.js.map → chunk-A3EDLRUN.js.map} +0 -0
  694. /package/dist/{chunk-OGQMELRU.js.map → chunk-ACXFPMJP.js.map} +0 -0
  695. /package/dist/{chunk-JPQSDB2H.js.map → chunk-ASRW3UJ5.js.map} +0 -0
  696. /package/dist/{chunk-NVH5I6EP.js.map → chunk-BBILSUDX.js.map} +0 -0
  697. /package/dist/{chunk-EK7CQC3P.js.map → chunk-BOWI37X2.js.map} +0 -0
  698. /package/dist/{chunk-SACNULB3.js.map → chunk-BVA26EFK.js.map} +0 -0
  699. /package/dist/{chunk-BZ36NJHA.js.map → chunk-D5J57ENI.js.map} +0 -0
  700. /package/dist/{chunk-I56CSICA.js.map → chunk-E5BFGDLA.js.map} +0 -0
  701. /package/dist/{chunk-XXITHNR2.js.map → chunk-ECISCOPF.js.map} +0 -0
  702. /package/dist/{chunk-YCLNEB4L.js.map → chunk-ECLUUJVE.js.map} +0 -0
  703. /package/dist/{chunk-2OEMKKLP.js.map → chunk-EGDQ5I54.js.map} +0 -0
  704. /package/dist/{chunk-FCMHDCMO.js.map → chunk-ELNVTA7O.js.map} +0 -0
  705. /package/dist/{chunk-DLXMO6EK.js.map → chunk-F4PMOAQK.js.map} +0 -0
  706. /package/dist/{chunk-WVVH56ZU.js.map → chunk-FISQTHD4.js.map} +0 -0
  707. /package/dist/{chunk-GJFG2MML.js.map → chunk-HL6GJIOH.js.map} +0 -0
  708. /package/dist/{chunk-ZPFN3CYR.js.map → chunk-IGZAOCTU.js.map} +0 -0
  709. /package/dist/{chunk-IUA3PSTK.js.map → chunk-JMDJI7KM.js.map} +0 -0
  710. /package/dist/{chunk-VTYMSJGY.js.map → chunk-JQVA264Z.js.map} +0 -0
  711. /package/dist/{chunk-WEF6INPI.js.map → chunk-JRF7SRLB.js.map} +0 -0
  712. /package/dist/{chunk-25RPYQRT.js.map → chunk-KLWSW6CC.js.map} +0 -0
  713. /package/dist/{chunk-AVR4LFOO.js.map → chunk-KNNSOOTG.js.map} +0 -0
  714. /package/dist/{chunk-BY5B5BM5.js.map → chunk-KTPXQH2N.js.map} +0 -0
  715. /package/dist/{chunk-J3TIXBCS.js.map → chunk-LGKXSWY4.js.map} +0 -0
  716. /package/dist/{chunk-PBRW6QLS.js.map → chunk-LP2GIXVK.js.map} +0 -0
  717. /package/dist/{chunk-AT7HWXMW.js.map → chunk-MBHERRJR.js.map} +0 -0
  718. /package/dist/{chunk-MT5MHYL3.js.map → chunk-MLYQDJUQ.js.map} +0 -0
  719. /package/dist/{chunk-TRWFL52W.js.map → chunk-NBGDLLMX.js.map} +0 -0
  720. /package/dist/{chunk-D27C6HZW.js.map → chunk-P3JEXVBT.js.map} +0 -0
  721. /package/dist/{chunk-TMZZ4Z7L.js.map → chunk-PZPPJY4K.js.map} +0 -0
  722. /package/dist/{chunk-SEJGXC2L.js.map → chunk-Q6JF4ZLT.js.map} +0 -0
  723. /package/dist/{chunk-ALXSSRGI.js.map → chunk-QF5IH7PC.js.map} +0 -0
  724. /package/dist/{chunk-S2D6GH6D.js.map → chunk-QJ6SO7CF.js.map} +0 -0
  725. /package/dist/{chunk-WZTZJNSG.js.map → chunk-QQUOVIOM.js.map} +0 -0
  726. /package/dist/{chunk-WO4CL5JL.js.map → chunk-R3OBOAOF.js.map} +0 -0
  727. /package/dist/{chunk-VP2FPPLA.js.map → chunk-SPDNUC76.js.map} +0 -0
  728. /package/dist/{chunk-5RHE36DQ.js.map → chunk-T3663ZQL.js.map} +0 -0
  729. /package/dist/{chunk-BZKHE26Z.js.map → chunk-TSK4ZTFK.js.map} +0 -0
  730. /package/dist/{chunk-CBRZIMNF.js.map → chunk-USW6WRDZ.js.map} +0 -0
  731. /package/dist/{chunk-34AV6DED.js.map → chunk-WBMYHNKH.js.map} +0 -0
  732. /package/dist/{chunk-MEJMWIBD.js.map → chunk-X46LAU4Q.js.map} +0 -0
  733. /package/dist/{chunk-254KEDDH.js.map → chunk-XE6E526E.js.map} +0 -0
  734. /package/dist/{chunk-55PGOBTR.js.map → chunk-XWCWBHLB.js.map} +0 -0
  735. /package/dist/{chunk-6456HESK.js.map → chunk-YCECQV3T.js.map} +0 -0
  736. /package/dist/{chunk-MECQLU4J.js.map → chunk-Z4NADGZX.js.map} +0 -0
  737. /package/dist/{chunk-6THPWBBU.js.map → chunk-Z53KOPRJ.js.map} +0 -0
  738. /package/dist/{cohort-JCMVMOBQ.js.map → cohort-U7M6Q2UX.js.map} +0 -0
  739. /package/dist/{condition-SHRWEMG7.js.map → condition-EGAV2PMJ.js.map} +0 -0
  740. /package/dist/{controls-EKIHLQS6.js.map → controls-PTMYWUZV.js.map} +0 -0
  741. /package/dist/{controls.config-WSVX6UC6.js.map → controls.config-DOA6PTP2.js.map} +0 -0
  742. /package/dist/{correlation-ALFFZLKD.js.map → correlation-Y3EL6GB7.js.map} +0 -0
  743. /package/dist/{customdata.inputui-L2UAIU6I.js.map → customdata.inputui-4NDDG6FL.js.map} +0 -0
  744. /package/dist/{dataDownload-73N5364T.js.map → dataDownload-EQGUAOK2.js.map} +0 -0
  745. /package/dist/{databrowser.ui-NTOGXDYE.js.map → databrowser.ui-ABGOJUWQ.js.map} +0 -0
  746. /package/dist/{dictionary-CUAU2X6Q.js.map → dictionary-YOLLEDE5.js.map} +0 -0
  747. /package/dist/{dnaMethylation-AGWAGXVD.js.map → dnaMethylation-JZT63UHO.js.map} +0 -0
  748. /package/dist/{dnaMethylation.integration.spec-K22XXOU4.js.map → dnaMethylation.integration.spec-EATCABJW.js.map} +0 -0
  749. /package/dist/{dofetch-BVJ77SP7.js.map → dofetch-YNBIUFV5.js.map} +0 -0
  750. /package/dist/{e2pca-4HIJWLSC.js.map → e2pca-RD6COCRL.js.map} +0 -0
  751. /package/dist/{ep-U4RGH62P.js.map → ep-BAI7WUET.js.map} +0 -0
  752. /package/dist/{expclust.gdc.spec-JJGGQDQK.js.map → expclust.gdc.spec-LKV2CQA5.js.map} +0 -0
  753. /package/dist/{facet-NNUPVXCG.js.map → facet-X3SXQIAC.js.map} +0 -0
  754. /package/dist/{gb-2MYXJEMY.js.map → gb-K324K7XB.js.map} +0 -0
  755. /package/dist/{geneExpClustering-6ORRRH43.js.map → geneExpClustering-BJD5U3KG.js.map} +0 -0
  756. /package/dist/{geneExpression-4JVWKJWP.js.map → geneExpression-2TK3XLZ5.js.map} +0 -0
  757. /package/dist/{geneExpression-MARWAIHW.js.map → geneExpression-F6NRTHZ4.js.map} +0 -0
  758. /package/dist/{geneExpression.unit.spec-3CQTUSDK.js.map → geneExpression.unit.spec-IFZN3J6A.js.map} +0 -0
  759. /package/dist/{geneORA-M2L2YEX3.js.map → geneORA-DUEP735U.js.map} +0 -0
  760. /package/dist/{geneRanking-S2B3LSTU.js.map → geneRanking-LURDNT7L.js.map} +0 -0
  761. /package/dist/{geneVariant-D2ANGINP.js.map → geneVariant-EAVCWQAZ.js.map} +0 -0
  762. /package/dist/{geneVariant.integration.spec-62NJS7GD.js.map → geneVariant.integration.spec-LHL4ERFO.js.map} +0 -0
  763. /package/dist/{genefusion.ui-4ZZNKANU.js.map → genefusion.ui-4T5R7DT7.js.map} +0 -0
  764. /package/dist/{geneset-QCLFANPD.js.map → geneset-3PWXPBG2.js.map} +0 -0
  765. /package/dist/{genomeBrowser.spec-BV5M6JFN.js.map → genomeBrowser.spec-5SEN7R2P.js.map} +0 -0
  766. /package/dist/{grin2-J4VDS2JT.js.map → grin2-EXBG7TMS.js.map} +0 -0
  767. /package/dist/{grin2-K5G3N5XP.js.map → grin2-XIXVFVWO.js.map} +0 -0
  768. /package/dist/{geneVariant-T4NG72OL.js.map → hierCluster-5XQIWXAY.js.map} +0 -0
  769. /package/dist/{hierCluster-FMK524WF.js.map → hierCluster-I4TAQWPF.js.map} +0 -0
  770. /package/dist/{hierCluster-XF7ZWVKD.js.map → hierCluster.config-T7HVAWES.js.map} +0 -0
  771. /package/dist/{hierCluster.integration.spec-NSLTJBL4.js.map → hierCluster.integration.spec-XWX43K4D.js.map} +0 -0
  772. /package/dist/{hierCluster.config-LYAQCO3L.js.map → hierCluster.interactivity-MYIDHFSL.js.map} +0 -0
  773. /package/dist/{hierCluster.interactivity-VKAOR2DR.js.map → hierCluster.renderers-YRXA5ZUK.js.map} +0 -0
  774. /package/dist/{imagePlot-IPTIFVLT.js.map → imagePlot-4JQB6JUG.js.map} +0 -0
  775. /package/dist/{hierCluster.renderers-6C5F7LRL.js.map → importPlot-D3MXCCLN.js.map} +0 -0
  776. /package/dist/{importPlot-V3P6DCUR.js.map → isoformExpression-WNGGUVIZ.js.map} +0 -0
  777. /package/dist/{isoformExpression.unit.spec-IYZWSLO5.js.map → isoformExpression.unit.spec-NVJ5TIKM.js.map} +0 -0
  778. /package/dist/{isoformExpression-6IIPJI4M.js.map → junction-O7N57JE3.js.map} +0 -0
  779. /package/dist/{junction.unit.spec-M4EN7KPG.js.map → junction.unit.spec-Z63DRTRR.js.map} +0 -0
  780. /package/dist/{junction-E6FB2OP4.js.map → launch.adhoc-MBDRXD3B.js.map} +0 -0
  781. /package/dist/{leftlabel.sample-5WTK5NBD.js.map → leftlabel.sample-IG6FOQ26.js.map} +0 -0
  782. /package/dist/{lollipop-L64ZTEEX.js.map → lollipop-ZUYBLPGN.js.map} +0 -0
  783. /package/dist/{maf-QLNFANWO.js.map → maf-QOS5LURG.js.map} +0 -0
  784. /package/dist/{maftimeline-U7FMTMTV.js.map → maftimeline-FEHP2J55.js.map} +0 -0
  785. /package/dist/{launch.adhoc-SU5L2YXN.js.map → matrix-BG4J4RXA.js.map} +0 -0
  786. /package/dist/{matrix-GFVK3PEB.js.map → matrix-PX4LWTGN.js.map} +0 -0
  787. /package/dist/{matrix-HFJQGPJJ.js.map → matrix.cells-PTIDQVCI.js.map} +0 -0
  788. /package/dist/{matrix.cells-5JKTBI3X.js.map → matrix.config-NHW7BLIE.js.map} +0 -0
  789. /package/dist/{matrix.config-QPTQ22RR.js.map → matrix.data-FMIQRXOA.js.map} +0 -0
  790. /package/dist/{matrix.data-MXIUMSRR.js.map → matrix.dom-4S2UYJOU.js.map} +0 -0
  791. /package/dist/{matrix.dom-ENBFB4CW.js.map → matrix.groups-QMID5XAO.js.map} +0 -0
  792. /package/dist/{matrix.integration.spec-X4HM67TN.js.map → matrix.integration.spec-H6T7KP5R.js.map} +0 -0
  793. /package/dist/{matrix.groups-6DYTBVGR.js.map → matrix.interactivity-WQUO25HB.js.map} +0 -0
  794. /package/dist/{matrix.interactivity-QTB56LXE.js.map → matrix.layout-CTPVZZ34.js.map} +0 -0
  795. /package/dist/{matrix.layout-VQAORIIH.js.map → matrix.legend-K6EYUN6L.js.map} +0 -0
  796. /package/dist/{matrix.legend-SDJXYNHE.js.map → matrix.renderers-5DIAUY6R.js.map} +0 -0
  797. /package/dist/{matrix.renderers-6PMYIP2S.js.map → matrix.serieses-LRMN2J52.js.map} +0 -0
  798. /package/dist/{matrix.serieses-WWY7474U.js.map → matrix.sort-RGAGEA6Z.js.map} +0 -0
  799. /package/dist/{matrix.sort.unit.spec-3RM7V6CS.js.map → matrix.sort.unit.spec-RGICZZJL.js.map} +0 -0
  800. /package/dist/{matrix.sorterUi.unit.spec-YOV6FBRT.js.map → matrix.sorterUi.unit.spec-45QPEGWE.js.map} +0 -0
  801. /package/dist/{mavb-PJA76T7F.js.map → mavb-VEIVB62L.js.map} +0 -0
  802. /package/dist/{mds.fimo-GW7XPJGQ.js.map → mds.fimo-BG4LTWFB.js.map} +0 -0
  803. /package/dist/{mds.samplescatterplot-ZAIEWPO4.js.map → mds.samplescatterplot-PWADJZ2J.js.map} +0 -0
  804. /package/dist/{mds.survivalplot-ETLLFDWR.js.map → mds.survivalplot-BX4HZ23K.js.map} +0 -0
  805. /package/dist/{multivalue-AZPAQJQD.js.map → multivalue-OZALSBFW.js.map} +0 -0
  806. /package/dist/{numericDictTermCluster-KOJODGZT.js.map → numericDictTermCluster-7PGJ7KV4.js.map} +0 -0
  807. /package/dist/{oncomatrix-2TRXETOJ.js.map → oncomatrix-Q2EQZPLS.js.map} +0 -0
  808. /package/dist/{oncomatrix.spec-DOVKLS24.js.map → oncomatrix.spec-YEQOQRPW.js.map} +0 -0
  809. /package/dist/{plot.2dvaf-RQN6QADW.js.map → plot.2dvaf-NJSB3HNH.js.map} +0 -0
  810. /package/dist/{matrix.sort-V46C2MAZ.js.map → plot.app-AEUR6XGI.js.map} +0 -0
  811. /package/dist/{plot.barplot-46QRWJOX.js.map → plot.barplot-OXN2P5KL.js.map} +0 -0
  812. /package/dist/{plot.boxplot-54J4UWQX.js.map → plot.boxplot-2KHEVVFE.js.map} +0 -0
  813. /package/dist/{plot.brainImaging-Y32KQFLS.js.map → plot.brainImaging-JWDX4BZG.js.map} +0 -0
  814. /package/dist/{plot.disco-4R5J7Z5S.js.map → plot.disco-LUFC5GGC.js.map} +0 -0
  815. /package/dist/{plot.ssgq-6LCKYRYD.js.map → plot.ssgq-FMM3IRNA.js.map} +0 -0
  816. /package/dist/{plot.vaf2cov-UCBH4NSC.js.map → plot.vaf2cov-K5TAQUC5.js.map} +0 -0
  817. /package/dist/{plot.wsi-DAC7NUQE.js.map → plot.wsi-CNQCNZ4Z.js.map} +0 -0
  818. /package/dist/{polar2-JKV74QV5.js.map → polar2-AB6SVYRS.js.map} +0 -0
  819. /package/dist/{profileForms-VDYCFH4M.js.map → profileForms-AIEHZ4GC.js.map} +0 -0
  820. /package/dist/{plot.app-MOIVGIS6.js.map → profilePlot-PZDFGXKZ.js.map} +0 -0
  821. /package/dist/{proteinView-A3EM6OR5.js.map → proteinView-7GWHQYXC.js.map} +0 -0
  822. /package/dist/{pseudbulk.unit.spec-CUMTLAH7.js.map → pseudbulk.unit.spec-NFT4VNTI.js.map} +0 -0
  823. /package/dist/{profilePlot-PR3LVRYU.js.map → pseudobulk-WDGWTXW4.js.map} +0 -0
  824. /package/dist/{pseudobulk-5E5MSMU3.js.map → qualitative-PZYJENE7.js.map} +0 -0
  825. /package/dist/{radar2-A5OYMORS.js.map → radar2-QHRGH3YS.js.map} +0 -0
  826. /package/dist/{radarFacility2-4TPJB6M4.js.map → radarFacility2-2JD26FL6.js.map} +0 -0
  827. /package/dist/{qualitative-WPXUBISK.js.map → render-YA4Z56LT.js.map} +0 -0
  828. /package/dist/{report-NCJOTYIC.js.map → report-2NUKFJTF.js.map} +0 -0
  829. /package/dist/{render-XQBWWS33.js.map → sampleView-2XVPJTVR.js.map} +0 -0
  830. /package/dist/{samplelst-FV7BAUN5.js.map → samplelst-DMILFDT5.js.map} +0 -0
  831. /package/dist/{samplematrix-DFD3PNI4.js.map → samplematrix-LYA5XTUM.js.map} +0 -0
  832. /package/dist/{sc-GIMTDVLG.js.map → sc-CM2C34MN.js.map} +0 -0
  833. /package/dist/{scatter-4GJ5HKUY.js.map → scatter-C3CH3HTF.js.map} +0 -0
  834. /package/dist/{scatter-P3ISZB3R.js.map → scatter-GO6LV6NY.js.map} +0 -0
  835. /package/dist/{selectGenomeWithTklst-ZZ4CEHDU.js.map → selectGenomeWithTklst-5C7UBTGZ.js.map} +0 -0
  836. /package/dist/{sampleView-2PUSMG4W.js.map → singleCellCellType-EZYESBVZ.js.map} +0 -0
  837. /package/dist/{singleCellCellType.unit.spec-JNEIICK5.js.map → singleCellCellType.unit.spec-DB6FM4XR.js.map} +0 -0
  838. /package/dist/{singleCellCellType-CEERCVTR.js.map → singleCellGeneExpression-DZLEFPW4.js.map} +0 -0
  839. /package/dist/{singleCellGeneExpression.unit.spec-CGRZGY66.js.map → singleCellGeneExpression.unit.spec-ZTBK3V43.js.map} +0 -0
  840. /package/dist/{singleCellGeneExpression-G5B7DDES.js.map → singleCellPlot-VF4TZ4FT.js.map} +0 -0
  841. /package/dist/{singlecell-IPTSIKNA.js.map → singlecell-2MHROPBN.js.map} +0 -0
  842. /package/dist/{singlecell-VB4KLPJF.js.map → singlecell-GPAFNOUZ.js.map} +0 -0
  843. /package/dist/{singleCellPlot-US5KTHS4.js.map → snp-K4EAEVW4.js.map} +0 -0
  844. /package/dist/{snp.unit.spec-Q537NGVG.js.map → snp.unit.spec-BUVQLVOY.js.map} +0 -0
  845. /package/dist/{snplocus-BV6WJTVP.js.map → snplocus-GEVISN6Z.js.map} +0 -0
  846. /package/dist/{spliceevent.a53ss.diagram-3BUQVK4Q.js.map → spliceevent.a53ss.diagram-5UPWNAZF.js.map} +0 -0
  847. /package/dist/{spliceevent.exonskip.diagram-CQZ2DFQ5.js.map → spliceevent.exonskip.diagram-7TKAQURC.js.map} +0 -0
  848. /package/dist/{spliceevent.noeventdiagram-QAEPR6LD.js.map → spliceevent.noeventdiagram-CDXZLR3Z.js.map} +0 -0
  849. /package/dist/{snp-6V2SCCRN.js.map → ssGSEA-NMCJUQXT.js.map} +0 -0
  850. /package/dist/{ssGSEA.unit.spec-A337IMC7.js.map → ssGSEA.unit.spec-3FQALTPQ.js.map} +0 -0
  851. /package/dist/{stattable-J4ZQKJFM.js.map → stattable-2RXQPWKK.js.map} +0 -0
  852. /package/dist/{summarizeCnvGeneexp-76UJXLA4.js.map → summarizeCnvGeneexp-4BQS5AFM.js.map} +0 -0
  853. /package/dist/{summarizeGeneexpSurvival-ZUEHXA2R.js.map → summarizeGeneexpSurvival-HTBZQFB5.js.map} +0 -0
  854. /package/dist/{summarizeMutationCnv-EBCBVMG6.js.map → summarizeMutationCnv-XUWZGPCM.js.map} +0 -0
  855. /package/dist/{ssGSEA-XNI5S7AC.js.map → summarizeMutationDiagnosis-QUJX42TO.js.map} +0 -0
  856. /package/dist/{summarizeMutationSurvival-QRFMJLLO.js.map → summarizeMutationSurvival-3R47TTR6.js.map} +0 -0
  857. /package/dist/{summarizeMutationDiagnosis-VLFI2ZIZ.js.map → summary-6UUB63QR.js.map} +0 -0
  858. /package/dist/{summary.integration.spec-52WP6SNY.js.map → summary.integration.spec-JJDE6SRV.js.map} +0 -0
  859. /package/dist/{summaryInput-WUJNHCGH.js.map → summaryInput-JG4AW6FW.js.map} +0 -0
  860. /package/dist/{sunburst-IJ3ZG2BC.js.map → sunburst-YKB42RZX.js.map} +0 -0
  861. /package/dist/{survival-SQRYWGWZ.js.map → survival-3IFFTDQA.js.map} +0 -0
  862. /package/dist/{survival-F2B5JKOO.js.map → survival-HOFNJENX.js.map} +0 -0
  863. /package/dist/{svgraph-HVCMF6KI.js.map → svgraph-WFEY4ZIZ.js.map} +0 -0
  864. /package/dist/{svmr-PROHTMTP.js.map → svmr-44EIX7YD.js.map} +0 -0
  865. /package/dist/{table-3E64OJNV.js.map → table-6MKVJUNC.js.map} +0 -0
  866. /package/dist/{termCollection-WKT6ESMI.js.map → termCollection-6JBVQL6Y.js.map} +0 -0
  867. /package/dist/{summary-U3YKEMZC.js.map → termCollection-TTELZVC5.js.map} +0 -0
  868. /package/dist/{termCollection.unit.spec-XMOCMVER.js.map → termCollection.unit.spec-6Z7X646L.js.map} +0 -0
  869. /package/dist/{termCollection-MUH7P6B5.js.map → termCollectionFractionSelection-5DVIJBM5.js.map} +0 -0
  870. /package/dist/{termCollectionFractionSelection.unit.spec-MG7E3EIZ.js.map → termCollectionFractionSelection.unit.spec-3HIM5BIF.js.map} +0 -0
  871. /package/dist/{termCollectionFractionSelection-P5G6WIJJ.js.map → tk-HSYWJCGQ.js.map} +0 -0
  872. /package/dist/{tk-HWUPUGOS.js.map → tk-PNOVG2XS.js.map} +0 -0
  873. /package/dist/{tp.ui-RRB5MJRD.js.map → tp.ui-COBBSUPB.js.map} +0 -0
  874. /package/dist/{tk-SBM2GN3S.js.map → tvs.dt-35AKURFI.js.map} +0 -0
  875. /package/dist/{tvs.dtcnv.categorical-7RJPQKMX.js.map → tvs.dtcnv.categorical-3EHXYROL.js.map} +0 -0
  876. /package/dist/{tvs.dtcnv.continuous-FW4ZXIYY.js.map → tvs.dtcnv.continuous-AXQ2GU6S.js.map} +0 -0
  877. /package/dist/{tvs.dtfusion-3GDWW3ML.js.map → tvs.dtfusion-PLJIMPNX.js.map} +0 -0
  878. /package/dist/{tvs.dtitd-FER4H4UO.js.map → tvs.dtitd-JS6RFBV5.js.map} +0 -0
  879. /package/dist/{tvs.dtsnvindel-ISEOJ5UA.js.map → tvs.dtsnvindel-MDEM5MPT.js.map} +0 -0
  880. /package/dist/{tvs.dtsv-JDML7EWE.js.map → tvs.dtsv-OU756YLO.js.map} +0 -0
  881. /package/dist/{tvs.samplelst-MJTM6GSV.js.map → tvs.samplelst-5NDICES4.js.map} +0 -0
  882. /package/dist/{tvs.termCollection-GMOXBJWF.js.map → tvs.termCollection-5URPDPH6.js.map} +0 -0
  883. /package/dist/{tvs.dt-I2ECKHQ2.js.map → vocabulary-CHCVMPK5.js.map} +0 -0
  884. /package/dist/{wsi.direct-IVPACPNT.js.map → wsi.direct-JSKV4H4X.js.map} +0 -0
@@ -0,0 +1,3836 @@
1
+ import {
2
+ appear2 as appear,
3
+ axisstyle,
4
+ bulk_badline,
5
+ colorbgleft,
6
+ colorbgright,
7
+ colorctx,
8
+ colorinframe,
9
+ coloroutframe,
10
+ disappear2 as disappear,
11
+ export_data,
12
+ font,
13
+ make_table_2col,
14
+ newpane,
15
+ sayerror
16
+ } from "./chunk-D5PX2UDG.js";
17
+ import {
18
+ genomic2gm
19
+ } from "./chunk-HJ6L54YS.js";
20
+ import "./chunk-XFAL46LZ.js";
21
+ import "./chunk-OPMMU6DQ.js";
22
+ import {
23
+ Menu
24
+ } from "./chunk-ELJX3QIQ.js";
25
+ import "./chunk-7BLXK3GI.js";
26
+ import "./chunk-VSSZJHOR.js";
27
+ import "./chunk-5RUVBYLK.js";
28
+ import "./chunk-6X7PP7A4.js";
29
+ import "./chunk-EO6M3LY3.js";
30
+ import "./chunk-DXLO4OAB.js";
31
+ import {
32
+ bplen,
33
+ dtcloss,
34
+ dtfusionrna,
35
+ dtitd,
36
+ dtnloss,
37
+ mclasscloss,
38
+ mclassfusionrna,
39
+ mclassitd,
40
+ mclassnloss
41
+ } from "./chunk-4QBRVM4V.js";
42
+ import "./chunk-H6INPPUC.js";
43
+ import "./chunk-PF4DSFDR.js";
44
+ import "./chunk-IMYSFDE5.js";
45
+ import "./chunk-W5J3LTYS.js";
46
+ import {
47
+ axisTop
48
+ } from "./chunk-4ZL6IBXM.js";
49
+ import {
50
+ linear
51
+ } from "./chunk-OZVWP4ZR.js";
52
+ import "./chunk-FXQXCOII.js";
53
+ import "./chunk-TLT4YIG3.js";
54
+ import "./chunk-5R63Q5KH.js";
55
+ import {
56
+ select_default
57
+ } from "./chunk-I6Y4O3RR.js";
58
+ import "./chunk-Q5RDQNIT.js";
59
+ import "./chunk-DQC5FFGV.js";
60
+ import "./chunk-HFNDKYVF.js";
61
+
62
+ // src/svmr.unload.js
63
+ function svmr_export_json(svmr, hqonly) {
64
+ var rows = [];
65
+ for (const sample of svmr.samples) {
66
+ for (const egg of sample.egglst) {
67
+ for (const eg of egg.lst) {
68
+ if (eg.ismsg) {
69
+ const lst = eg.lst.map((evt) => evt.lst[0]);
70
+ if (hqonly) {
71
+ let hashq = false;
72
+ for (const i of lst) {
73
+ if (i.rating == "Major") hashq = true;
74
+ }
75
+ if (hashq) {
76
+ rows.push(lst);
77
+ }
78
+ } else {
79
+ rows.push(lst);
80
+ }
81
+ } else {
82
+ for (const evt of eg.lst) {
83
+ for (const p of evt.lst) {
84
+ if (hqonly) {
85
+ if (p.rating == "Major") rows.push([p]);
86
+ } else {
87
+ rows.push([p]);
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ const lines = [], e_itd = [], e_nloss = [], e_closs = [];
96
+ for (const row of rows) {
97
+ if (row.length == 1 && row[0].usepair) {
98
+ const p = row[0];
99
+ if (p.isitd) {
100
+ const u = p.usepair;
101
+ const gm = svmr.genome.isoformmatch(u.a.isoform, p.chrA, p.posA);
102
+ if (!gm) {
103
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): no gene model found for " + u.a.isoform);
104
+ continue;
105
+ }
106
+ const exonbp1 = genomic2gm(p.posA, gm).rnapos;
107
+ const exonbp2 = genomic2gm(p.posB, gm).rnapos;
108
+ if (exonbp1 <= exonbp2) {
109
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): negative duplication length");
110
+ continue;
111
+ }
112
+ const itd = {
113
+ typecode: dtitd,
114
+ gene: p.geneA,
115
+ isoform: u.a.isoform,
116
+ rating: p.rating,
117
+ score: p.score,
118
+ functioneffect: p.functioneffect,
119
+ rnaposition: exonbp2,
120
+ rnaduplength: exonbp1 - exonbp2 + 1,
121
+ a: {
122
+ chr: p.chrA,
123
+ position: p.posA,
124
+ strand: p.ortA,
125
+ ratio: p.ratioA,
126
+ chimericreads: p.readsA,
127
+ totalreads: p.totalreadsA,
128
+ match: p.matchA,
129
+ repeat: p.repeatA
130
+ },
131
+ b: {
132
+ chr: p.chrB,
133
+ position: p.posB,
134
+ strand: p.ortB,
135
+ ratio: p.ratioB,
136
+ chimericreads: p.readsB,
137
+ totalreads: p.totalreadsB,
138
+ match: p.matchB,
139
+ repeat: p.repeatB
140
+ }
141
+ };
142
+ let aalen = 0, bplen2 = 0;
143
+ if (u.a.contigaa && u.b.contigaa) {
144
+ aalen = u.b.contigaa - u.a.contigaa - 1;
145
+ }
146
+ if (u.a.contigbp && u.b.contigbp) {
147
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
148
+ }
149
+ if (aalen > 0) {
150
+ itd.interstitial = { aalen };
151
+ }
152
+ if (bplen2 > 0) {
153
+ if (!itd.interstitial) itd.interstitial = {};
154
+ itd.interstitial.bplen = bplen2;
155
+ }
156
+ lines.push([p.sample, p.geneA, p.usepair.a.isoform, JSON.stringify(itd)]);
157
+ continue;
158
+ }
159
+ if (p.isnloss) {
160
+ const p2 = p.usepair.b;
161
+ if (!p2.isoform) {
162
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no isoform");
163
+ continue;
164
+ }
165
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrB, p.posB);
166
+ if (!gm) {
167
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no gene model found for " + p2.isoform);
168
+ continue;
169
+ }
170
+ const exonbp = genomic2gm(p.posB, gm).rnapos;
171
+ const pp = {
172
+ typecode: dtnloss,
173
+ gene: p.geneB,
174
+ isoform: p2.isoform,
175
+ rating: p.rating,
176
+ score: p.score,
177
+ functioneffect: p.functioneffect,
178
+ rnaposition: exonbp,
179
+ chr: p.chrB,
180
+ position: p.posB,
181
+ strand: p.ortB,
182
+ ratio: p.ratioB,
183
+ chimericreads: p.readsB,
184
+ match: p.matchB,
185
+ repeat: p.repeatB,
186
+ partner: {
187
+ chr: p.chrA,
188
+ position: p.posA,
189
+ strand: p.ortA,
190
+ ratio: p.ratioA,
191
+ chimericreads: p.readsA,
192
+ match: p.matchA,
193
+ repeat: p.repeatA
194
+ }
195
+ };
196
+ if (p.geneA) {
197
+ pp.partner.gene = p.geneA;
198
+ }
199
+ if (p.usepair.a.isoform) {
200
+ pp.partner.isoform = p.usepair.a.isoform;
201
+ }
202
+ lines.push([p.sample, p.geneB, p2.isoform, JSON.stringify(pp)]);
203
+ continue;
204
+ }
205
+ if (p.iscloss) {
206
+ const p2 = p.usepair.a;
207
+ if (!p2.isoform) {
208
+ e_nloss.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no isoform");
209
+ continue;
210
+ }
211
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrA, p.posA);
212
+ if (!gm) {
213
+ e_nloss.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no gene model found by " + p2.isoform);
214
+ continue;
215
+ }
216
+ const exonbp = genomic2gm(p.posA, gm).rnapos;
217
+ const pp = {
218
+ typecode: dtcloss,
219
+ gene: p.geneA,
220
+ isoform: p2.isoform,
221
+ rating: p.rating,
222
+ score: p.score,
223
+ functioneffect: p.functioneffect,
224
+ rnaposition: exonbp,
225
+ chr: p.chrA,
226
+ position: p.posA,
227
+ strand: p.ortA,
228
+ ratio: p.ratioA,
229
+ chimericreads: p.readsA,
230
+ match: p.matchA,
231
+ repeat: p.repeatA,
232
+ partner: {
233
+ chr: p.chrB,
234
+ position: p.posB,
235
+ strand: p.ortB,
236
+ ratio: p.ratioB,
237
+ chimericreads: p.readsB,
238
+ match: p.matchB,
239
+ repeat: p.repeatB
240
+ }
241
+ };
242
+ if (p.geneB) {
243
+ pp.partner.gene = p.geneB;
244
+ }
245
+ if (p.usepair.b.isoform) {
246
+ pp.partner.isoform = p.usepair.b.isoform;
247
+ }
248
+ lines.push([p.sample, p.geneA, p2.isoform, JSON.stringify(pp)]);
249
+ continue;
250
+ }
251
+ }
252
+ const genes = /* @__PURE__ */ new Set(), isoforms = /* @__PURE__ */ new Set(), cleanup = [];
253
+ for (const p of row) {
254
+ if (p.geneA) genes.add(p.geneA);
255
+ if (p.geneB) genes.add(p.geneB);
256
+ if (p.usepair) {
257
+ if (p.usepair.a.isoform) isoforms.add(p.usepair.a.isoform);
258
+ if (p.usepair.b.isoform) isoforms.add(p.usepair.b.isoform);
259
+ }
260
+ const clean = {
261
+ type: p.type,
262
+ type2: p.type2,
263
+ rating: p.rating,
264
+ score: p.score,
265
+ functioneffect: p.functioneffect,
266
+ a: {
267
+ name: p.geneA,
268
+ chr: p.chrA,
269
+ position: p.posA,
270
+ strand: p.ortA,
271
+ ratio: p.ratioA,
272
+ feature: p.featureA,
273
+ chimericreads: p.readsA,
274
+ contiglen: p.matchA,
275
+ repeatscore: p.repeatA
276
+ },
277
+ b: {
278
+ name: p.geneB,
279
+ chr: p.chrB,
280
+ position: p.posB,
281
+ strand: p.ortB,
282
+ ratio: p.ratioB,
283
+ feature: p.featureB,
284
+ chimericreads: p.readsB,
285
+ contiglen: p.matchB,
286
+ repeatscore: p.repeatB
287
+ }
288
+ };
289
+ if (p.usepair) {
290
+ const u = p.usepair;
291
+ clean.frame = u.frame;
292
+ if (u.a.isoform) {
293
+ clean.a.isoform = u.a.isoform;
294
+ }
295
+ if (u.b.isoform) {
296
+ clean.b.isoform = u.b.isoform;
297
+ }
298
+ let aalen = 0, bplen2 = 0;
299
+ if (u.a.contigaa && u.b.contigaa) {
300
+ aalen = u.b.contigaa - u.a.contigaa - 1;
301
+ }
302
+ if (u.a.contigbp && u.b.contigbp) {
303
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
304
+ }
305
+ if (aalen > 0) {
306
+ clean.interstitial = { aalen };
307
+ }
308
+ if (bplen2 > 0) {
309
+ if (!clean.interstitial) clean.interstitial = {};
310
+ clean.interstitial.bplen = bplen2;
311
+ }
312
+ }
313
+ cleanup.push(clean);
314
+ }
315
+ const genenames = [...genes];
316
+ const isoformnames = [...isoforms];
317
+ lines.push([
318
+ row[0].sample,
319
+ genenames.length ? genenames.join(",") : "none",
320
+ isoformnames.length ? isoformnames.join(",") : "none",
321
+ JSON.stringify(cleanup)
322
+ ]);
323
+ }
324
+ if (e_itd.length) {
325
+ svmr.err(e_itd.join("<br>"));
326
+ }
327
+ if (e_nloss.length) {
328
+ svmr.err(e_nloss.join("<br>"));
329
+ }
330
+ if (e_closs.length) {
331
+ svmr.err(e_closs.join("<br>"));
332
+ }
333
+ export_data("Fusion data from " + svmr.filename, [{ text: lines.map((i) => i.join(" ")).join("\n") }]);
334
+ }
335
+ function svmr_2pp(svmr, hqonly) {
336
+ const rows = [];
337
+ for (const sample of svmr.samples) {
338
+ for (const egg of sample.egglst) {
339
+ for (const eg of egg.lst) {
340
+ if (eg.ismsg) {
341
+ const lst = eg.lst.map((evt) => evt.lst[0]);
342
+ if (hqonly) {
343
+ let hashq = false;
344
+ for (const i of lst) {
345
+ if (i.rating == "Major") hashq = true;
346
+ }
347
+ if (hashq) {
348
+ rows.push(lst);
349
+ }
350
+ } else {
351
+ rows.push(lst);
352
+ }
353
+ } else {
354
+ for (const evt of eg.lst) {
355
+ for (const p of evt.lst) {
356
+ if (hqonly) {
357
+ if (p.rating == "Major") rows.push([p]);
358
+ } else {
359
+ rows.push([p]);
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ }
367
+ const genes = {}, e_itd = [], e_nloss = [], e_closs = [];
368
+ for (const row of rows) {
369
+ if (row.length == 1 && row[0].usepair) {
370
+ const p = row[0];
371
+ if (p.isitd) {
372
+ if (!p.geneA) {
373
+ e_itd.push(p.sample + " ITD (" + p.rating + "): no gene name??");
374
+ continue;
375
+ }
376
+ const u = p.usepair;
377
+ const gm = svmr.genome.isoformmatch(u.a.isoform, p.chrA, p.posA);
378
+ if (!gm) {
379
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): no gene model found for " + u.a.isoform);
380
+ continue;
381
+ }
382
+ const exonbp1 = genomic2gm(p.posA, gm).rnapos;
383
+ const exonbp2 = genomic2gm(p.posB, gm).rnapos;
384
+ if (exonbp1 <= exonbp2) {
385
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): negative duplication length");
386
+ continue;
387
+ }
388
+ const itd = {
389
+ dt: dtitd,
390
+ class: mclassitd,
391
+ mname: "ITD",
392
+ gene: p.geneA,
393
+ sample: p.sample,
394
+ isoform: u.a.isoform,
395
+ rating: p.rating,
396
+ score: p.score,
397
+ functioneffect: p.functioneffect,
398
+ rnaposition: exonbp2,
399
+ rnaduplength: exonbp1 - exonbp2 + 1,
400
+ a: {
401
+ chr: p.chrA,
402
+ position: p.posA,
403
+ strand: p.ortA,
404
+ ratio: p.ratioA,
405
+ chimericreads: p.readsA,
406
+ totalreads: p.totalreadsA,
407
+ match: p.matchA,
408
+ repeat: p.repeatA
409
+ },
410
+ b: {
411
+ chr: p.chrB,
412
+ position: p.posB,
413
+ strand: p.ortB,
414
+ ratio: p.ratioB,
415
+ chimericreads: p.readsB,
416
+ totalreads: p.totalreadsB,
417
+ match: p.matchB,
418
+ repeat: p.repeatB
419
+ }
420
+ };
421
+ let aalen = 0, bplen2 = 0;
422
+ if (u.a.contigaa && u.b.contigaa) {
423
+ aalen = u.b.contigaa - u.a.contigaa - 1;
424
+ }
425
+ if (u.a.contigbp && u.b.contigbp) {
426
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
427
+ }
428
+ if (aalen > 0) {
429
+ itd.interstitial = { aalen };
430
+ }
431
+ if (bplen2 > 0) {
432
+ if (!itd.interstitial) itd.interstitial = {};
433
+ itd.interstitial.bplen = bplen2;
434
+ }
435
+ if (!(p.geneA in genes)) {
436
+ genes[p.geneA] = [];
437
+ }
438
+ genes[p.geneA].push(itd);
439
+ continue;
440
+ }
441
+ if (p.isnloss) {
442
+ if (!p.geneB) {
443
+ e_nloss.push(p.sample + " NLoss (" + p.rating + "): no geneB");
444
+ continue;
445
+ }
446
+ const p2 = p.usepair.b;
447
+ if (!p2.isoform) {
448
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no isoform");
449
+ continue;
450
+ }
451
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrB, p.posB);
452
+ if (!gm) {
453
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no gene model found for " + p2.isoform);
454
+ continue;
455
+ }
456
+ const exonbp = genomic2gm(p.posB, gm).rnapos;
457
+ const pp = {
458
+ dt: dtnloss,
459
+ class: mclassnloss,
460
+ mname: "N-loss",
461
+ gene: p.geneB,
462
+ sample: p.sample,
463
+ isoform: p2.isoform,
464
+ rating: p.rating,
465
+ score: p.score,
466
+ functioneffect: p.functioneffect,
467
+ rnaposition: exonbp,
468
+ chr: p.chrB,
469
+ position: p.posB,
470
+ strand: p.ortB,
471
+ ratio: p.ratioB,
472
+ chimericreads: p.readsB,
473
+ match: p.matchB,
474
+ repeat: p.repeatB,
475
+ partner: {
476
+ chr: p.chrA,
477
+ position: p.posA,
478
+ strand: p.ortA,
479
+ ratio: p.ratioA,
480
+ chimericreads: p.readsA,
481
+ match: p.matchA,
482
+ repeat: p.repeatA
483
+ }
484
+ };
485
+ if (p.geneA) {
486
+ pp.partner.gene = p.geneA;
487
+ }
488
+ if (p.usepair.a.isoform) {
489
+ pp.partner.isoform = p.usepair.a.isoform;
490
+ }
491
+ if (!(p.geneB in genes)) {
492
+ genes[p.geneB] = [];
493
+ }
494
+ genes[p.geneB].push(pp);
495
+ continue;
496
+ }
497
+ if (p.iscloss) {
498
+ if (!p.geneA) {
499
+ e_closs.push(p.sample + " CLoss (" + p.rating + "): no geneA");
500
+ continue;
501
+ }
502
+ const p2 = p.usepair.a;
503
+ if (!p2.isoform) {
504
+ e_closs.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no isoform");
505
+ continue;
506
+ }
507
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrA, p.posA);
508
+ if (!gm) {
509
+ e_closs.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no gene model found by " + p2.isoform);
510
+ continue;
511
+ }
512
+ const exonbp = genomic2gm(p.posA, gm).rnapos;
513
+ const pp = {
514
+ dt: dtcloss,
515
+ class: mclasscloss,
516
+ mname: "C-loss",
517
+ gene: p.geneA,
518
+ sample: p.sample,
519
+ isoform: p2.isoform,
520
+ rating: p.rating,
521
+ score: p.score,
522
+ functioneffect: p.functioneffect,
523
+ rnaposition: exonbp,
524
+ chr: p.chrA,
525
+ position: p.posA,
526
+ strand: p.ortA,
527
+ ratio: p.ratioA,
528
+ chimericreads: p.readsA,
529
+ match: p.matchA,
530
+ repeat: p.repeatA,
531
+ partner: {
532
+ chr: p.chrB,
533
+ position: p.posB,
534
+ strand: p.ortB,
535
+ ratio: p.ratioB,
536
+ chimericreads: p.readsB,
537
+ match: p.matchB,
538
+ repeat: p.repeatB
539
+ }
540
+ };
541
+ if (p.geneB) {
542
+ pp.partner.gene = p.geneB;
543
+ }
544
+ if (p.usepair.b.isoform) {
545
+ pp.partner.isoform = p.usepair.b.isoform;
546
+ }
547
+ if (!(p.geneA in genes)) {
548
+ genes[p.geneA] = [];
549
+ }
550
+ genes[p.geneA].push(pp);
551
+ continue;
552
+ }
553
+ }
554
+ const gene2isoform = /* @__PURE__ */ new Map();
555
+ const cleanup = [];
556
+ for (const p of row) {
557
+ if (p.geneA) {
558
+ if (!gene2isoform.has(p.geneA)) gene2isoform.set(p.geneA, /* @__PURE__ */ new Set());
559
+ if (p.usepair) {
560
+ if (p.usepair.a.isoform) gene2isoform.get(p.geneA).add(p.usepair.a.isoform);
561
+ }
562
+ }
563
+ if (p.geneB) {
564
+ if (!gene2isoform.has(p.geneB)) gene2isoform.set(p.geneB, /* @__PURE__ */ new Set());
565
+ if (p.usepair) {
566
+ if (p.usepair.b.isoform) gene2isoform.get(p.geneB).add(p.usepair.b.isoform);
567
+ }
568
+ }
569
+ const clean = {
570
+ type: p.type,
571
+ type2: p.type2,
572
+ rating: p.rating,
573
+ score: p.score,
574
+ functioneffect: p.functioneffect,
575
+ a: {
576
+ name: p.geneA,
577
+ chr: p.chrA,
578
+ position: p.posA,
579
+ strand: p.ortA,
580
+ ratio: p.ratioA,
581
+ feature: p.featureA,
582
+ chimericreads: p.readsA,
583
+ contiglen: p.matchA,
584
+ repeatscore: p.repeatA
585
+ },
586
+ b: {
587
+ name: p.geneB,
588
+ chr: p.chrB,
589
+ position: p.posB,
590
+ strand: p.ortB,
591
+ ratio: p.ratioB,
592
+ feature: p.featureB,
593
+ chimericreads: p.readsB,
594
+ contiglen: p.matchB,
595
+ repeatscore: p.repeatB
596
+ }
597
+ };
598
+ if (p.usepair) {
599
+ const u = p.usepair;
600
+ clean.frame = u.frame;
601
+ if (u.a.isoform) {
602
+ clean.a.isoform = u.a.isoform;
603
+ }
604
+ if (u.b.isoform) {
605
+ clean.b.isoform = u.b.isoform;
606
+ }
607
+ let aalen = 0, bplen2 = 0;
608
+ if (u.a.contigaa && u.b.contigaa) {
609
+ aalen = u.b.contigaa - u.a.contigaa - 1;
610
+ }
611
+ if (u.a.contigbp && u.b.contigbp) {
612
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
613
+ }
614
+ if (aalen > 0) {
615
+ clean.interstitial = { aalen };
616
+ }
617
+ if (bplen2 > 0) {
618
+ if (!clean.interstitial) clean.interstitial = {};
619
+ clean.interstitial.bplen = bplen2;
620
+ }
621
+ }
622
+ cleanup.push(clean);
623
+ }
624
+ for (const [genename, iset] of gene2isoform) {
625
+ for (const isoform of iset) {
626
+ if (!(genename in genes)) {
627
+ genes[genename] = [];
628
+ }
629
+ const pp = {
630
+ dt: dtfusionrna,
631
+ class: mclassfusionrna,
632
+ sample: row[0].sample,
633
+ isoform,
634
+ pairlst: duplicate(cleanup)
635
+ };
636
+ for (const i of cleanup) {
637
+ if (i.functioneffect) {
638
+ pp.functioneffect = i.functioneffect;
639
+ }
640
+ }
641
+ genes[genename].push(pp);
642
+ }
643
+ }
644
+ }
645
+ if (e_itd.length) {
646
+ svmr.err(e_itd.join("<br>"));
647
+ }
648
+ if (e_nloss.length) {
649
+ svmr.err(e_nloss.join("<br>"));
650
+ }
651
+ if (e_closs.length) {
652
+ svmr.err(e_closs.join("<br>"));
653
+ }
654
+ let genecount = 0, genesup = {};
655
+ for (const k in genes) {
656
+ genecount++;
657
+ genesup[k.toUpperCase()] = genes[k];
658
+ }
659
+ if (genecount == 0) {
660
+ alert("No data can be added.");
661
+ return;
662
+ }
663
+ let ds = null;
664
+ for (const n in svmr.genome.datasets) {
665
+ if (svmr.genome.datasets[n].svmrid == svmr.id) {
666
+ ds = svmr.genome.datasets[n];
667
+ break;
668
+ }
669
+ }
670
+ if (ds) {
671
+ ds.bulkdata = genesup;
672
+ } else {
673
+ ds = {
674
+ label: svmr.filename,
675
+ svmrid: svmr.id,
676
+ bulkdata: genesup
677
+ };
678
+ svmr.genome.datasets[svmr.filename] = ds;
679
+ }
680
+ if (svmr.cohort) {
681
+ svmr.cohortpane.pane.remove();
682
+ } else {
683
+ svmr.cohort = {
684
+ name: svmr.filename,
685
+ genome: svmr.genome,
686
+ show_genetable: 1,
687
+ jwt: svmr.jwt,
688
+ dsset: {}
689
+ };
690
+ svmr.cohort.dsset[svmr.filename] = ds;
691
+ }
692
+ const pane = newpane({ x: 200, y: 200 });
693
+ import("./tp.ui-COBBSUPB.js").then((p) => {
694
+ p.default(svmr.cohort, pane.body, svmr.hostURL);
695
+ svmr.cohortpane = pane;
696
+ });
697
+ }
698
+ function svmr_export_text(svmr, hqonly) {
699
+ const rows = [];
700
+ const headerlst = svmr.atlst.map((i) => i.label);
701
+ headerlst.push("transcript_nbr");
702
+ headerlst.push("breakpoint_nbr");
703
+ headerlst.push("functionalClass");
704
+ for (const sample of svmr.samples) {
705
+ const whole = [];
706
+ for (const egg of sample.egglst) {
707
+ for (const eg of egg.lst) {
708
+ if (eg.ismsg) {
709
+ const lst = eg.lst.map((evt) => evt.lst[0]);
710
+ if (hqonly) {
711
+ let hashq = false;
712
+ for (const i of lst) {
713
+ if (i.rating == "Major") hashq = true;
714
+ }
715
+ if (hashq) {
716
+ whole.push(lst);
717
+ }
718
+ } else {
719
+ whole.push(lst);
720
+ }
721
+ } else {
722
+ for (const evt of eg.lst) {
723
+ for (const p of evt.lst) {
724
+ if (hqonly) {
725
+ if (p.rating == "Major") whole.push([p]);
726
+ } else {
727
+ whole.push([p]);
728
+ }
729
+ }
730
+ }
731
+ }
732
+ }
733
+ }
734
+ for (let gid = 0; gid < whole.length; gid++) {
735
+ for (let prodid = 0; prodid < whole[gid].length; prodid++) {
736
+ let prod = whole[gid][prodid];
737
+ const frame = [], a_isoform = [], a_codon = [], a_exon = [], a_anchor = [], a_contigaa = [], a_contigbp = [], b_isoform = [], b_codon = [], b_exon = [], b_anchor = [], b_contigaa = [], b_contigbp = [];
738
+ for (const p of prod.pairs) {
739
+ frame.push(p.frame);
740
+ a_isoform.push(p.a.isoform);
741
+ b_isoform.push(p.b.isoform);
742
+ let v = p.a.codon;
743
+ a_codon.push(Number.isNaN(v) ? "" : v);
744
+ v = p.b.codon;
745
+ b_codon.push(Number.isNaN(v) ? "" : v);
746
+ v = p.a.exon;
747
+ a_exon.push(Number.isNaN(v) ? "" : v);
748
+ v = p.b.exon;
749
+ b_exon.push(Number.isNaN(v) ? "" : v);
750
+ a_anchor.push(p.a.anchor ? p.a.anchor : "");
751
+ b_anchor.push(p.b.anchor ? p.b.anchor : "");
752
+ v = p.a.contigaa;
753
+ a_contigaa.push(v == void 0 ? "" : v);
754
+ v = p.b.contigaa;
755
+ b_contigaa.push(v == void 0 ? "" : v);
756
+ v = p.a.contigbp;
757
+ a_contigbp.push(v == void 0 ? "" : v);
758
+ v = p.b.contigbp;
759
+ b_contigbp.push(v == void 0 ? "" : v);
760
+ }
761
+ const row = [];
762
+ for (const i of svmr.atlst) {
763
+ switch (i.key) {
764
+ case "lstframe":
765
+ row.push(frame.join(","));
766
+ break;
767
+ // A
768
+ case "lstisoforma":
769
+ row.push(a_isoform.join(","));
770
+ break;
771
+ case "lstisoformacodon":
772
+ row.push(a_codon.join(","));
773
+ break;
774
+ case "lstisoformaexon":
775
+ row.push(a_exon.join(","));
776
+ break;
777
+ case "lstisoformaanchor":
778
+ row.push(a_anchor.join(","));
779
+ break;
780
+ case "lstcontigaaA":
781
+ row.push(a_contigaa.join(","));
782
+ break;
783
+ case "lstcontigbpA":
784
+ row.push(a_contigbp.join(","));
785
+ break;
786
+ // B
787
+ case "lstisoformb":
788
+ row.push(b_isoform.join(","));
789
+ break;
790
+ case "lstisoformbcodon":
791
+ row.push(b_codon.join(","));
792
+ break;
793
+ case "lstisoformbexon":
794
+ row.push(b_exon.join(","));
795
+ break;
796
+ case "lstisoformbanchor":
797
+ row.push(b_anchor.join(","));
798
+ break;
799
+ case "lstcontigaaB":
800
+ row.push(b_contigaa.join(","));
801
+ break;
802
+ case "lstcontigbpB":
803
+ row.push(b_contigbp.join(","));
804
+ break;
805
+ default:
806
+ row.push(prod[i.key]);
807
+ }
808
+ }
809
+ row.push(gid + 1);
810
+ row.push(prodid + 1);
811
+ row.push(prod.functioneffect ? prod.functioneffect : "");
812
+ rows.push(row);
813
+ }
814
+ }
815
+ }
816
+ export_data("Fusion data from " + svmr.filename, [{ text: headerlst.join(" ") + "\n" + rows.join("\n") }]);
817
+ }
818
+ function duplicate(i) {
819
+ const lst = [];
820
+ for (const j of i) {
821
+ const k = {};
822
+ for (const n in j) k[n] = j[n];
823
+ k.a = {};
824
+ for (const n in j.a) k.a[n] = j.a[n];
825
+ k.b = {};
826
+ for (const n in j.b) k.b[n] = j.b[n];
827
+ if (j.interstitial) {
828
+ k.interstitial = {};
829
+ for (const n in j.interstitial) k.interstitial[n] = j.interstitial[n];
830
+ }
831
+ lst.push(k);
832
+ }
833
+ return lst;
834
+ }
835
+
836
+ // src/svmr.c.js
837
+ var genomelimit = 1e4;
838
+ var knownprod_c = "#A702C4";
839
+ var tip = new Menu();
840
+ var svmr_c_default = class {
841
+ constructor(genome, atlst, items, filename, holder, hostURL, jwt) {
842
+ window.svmr = this;
843
+ this.hostURL = hostURL;
844
+ this.jwt = jwt;
845
+ this.id = Math.random();
846
+ this.items = items;
847
+ this.genome = genome;
848
+ this.filename = filename;
849
+ this.atlst = atlst;
850
+ this.cf_repeat = 0.7, this.cf_reads = 2;
851
+ this.cf_match = 40;
852
+ this.cf_ratio = 0.01;
853
+ this.expression = {};
854
+ this.samples = [];
855
+ this.genelst = [];
856
+ this.elab2sample = {};
857
+ if (!holder) {
858
+ const pane = newpane({ x: 100, y: 100, toshrink: true });
859
+ pane.header.append("span").style("color", "#858585").style("font-size", ".7em").html("Fusion Editor&nbsp;");
860
+ pane.header.append("span").text(filename);
861
+ holder = pane.body;
862
+ }
863
+ this.holder = holder;
864
+ this.errdiv = holder.append("div").style("width", "500px").style("margin", "10px");
865
+ const butrow = holder.append("div").style("margin", "20px").style("padding", "0px");
866
+ this.buttgene = butrow.append("button").text("Loading genes").on("click", () => {
867
+ if (genediv.style("display") == "none") {
868
+ appear(genediv);
869
+ } else {
870
+ disappear(genediv);
871
+ }
872
+ });
873
+ this.buttsample = butrow.append("button").text("Loading samples").on("click", () => {
874
+ if (this.ul.style("display") == "none") {
875
+ appear(this.ul);
876
+ } else {
877
+ disappear(this.ul);
878
+ }
879
+ });
880
+ butrow.append("button").text("Gene expression").on("click", () => {
881
+ if (this.expression.div.style("display") == "none") {
882
+ appear(this.expression.div);
883
+ } else {
884
+ disappear(this.expression.div);
885
+ }
886
+ });
887
+ butrow.append("button").text("Parameter cutoff").on("click", () => {
888
+ if (cutoffdiv.style("display") == "none") {
889
+ appear(cutoffdiv);
890
+ } else {
891
+ disappear(cutoffdiv);
892
+ }
893
+ });
894
+ butrow.append("button").text("Legend").on("click", () => {
895
+ if (legenddiv.style("display") == "none") {
896
+ appear(legenddiv);
897
+ } else {
898
+ disappear(legenddiv);
899
+ }
900
+ });
901
+ butrow.append("button").style("margin-right", "20px").text("Export data").on("click", (event) => {
902
+ let single_hq = 0, multi_hq = 0, single_nhq = 0, multi_nhq = 0, itd_hq = 0, itd_nhq = 0, trunc_hq = 0, trunc_nhq = 0;
903
+ for (const sample of this.samples) {
904
+ for (const egg of sample.egglst) {
905
+ for (const eg of egg.lst) {
906
+ if (eg.ismsg) {
907
+ let hashq = false;
908
+ for (const i of eg.lst) {
909
+ if (i.rating == "Major") hashq = true;
910
+ }
911
+ if (hashq) multi_hq++;
912
+ else multi_nhq++;
913
+ } else {
914
+ for (const evt of eg.lst) {
915
+ for (const p of evt.lst) {
916
+ if (p.rating == "Major") {
917
+ if (p.isitd) itd_hq++;
918
+ else if (p.iscloss || p.isnloss) trunc_hq++;
919
+ else single_hq++;
920
+ } else {
921
+ if (p.isitd) itd_nhq++;
922
+ else if (p.iscloss || p.isnloss) trunc_nhq++;
923
+ else single_nhq++;
924
+ }
925
+ }
926
+ }
927
+ }
928
+ }
929
+ }
930
+ }
931
+ const d02 = tip.clear().showunder(event.target).d.append("div");
932
+ const table = d02.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
933
+ let tr = table.append("tr").style("color", "#858585");
934
+ tr.append("td");
935
+ tr.append("td").text("2-gene fusion");
936
+ tr.append("td").text("Multi-gene fusion");
937
+ tr.append("td").text("ITD");
938
+ tr.append("td").text("Truncation");
939
+ tr = table.append("tr");
940
+ tr.append("td").text("Major").style("color", "#858585").style("text-align", "right");
941
+ tr.append("td").text(single_hq);
942
+ tr.append("td").text(multi_hq);
943
+ tr.append("td").text(itd_hq);
944
+ tr.append("td").text(trunc_hq);
945
+ tr = table.append("tr");
946
+ tr.append("td").text("not Major").style("color", "#858585").style("text-align", "right");
947
+ tr.append("td").text(single_nhq);
948
+ tr.append("td").text(multi_nhq);
949
+ tr.append("td").text(itd_nhq);
950
+ tr.append("td").text(trunc_nhq);
951
+ let dd = d02.append("div").style("margin", "10px").text('Export fusions labeled as "Major"');
952
+ dd.append("button").style("margin", "10px").text("Tabular format").on("click", () => svmr_export_text(this, true));
953
+ dd.append("button").style("margin", "10px").text("JSON format").on("click", () => svmr_export_json(this, true));
954
+ dd.append("button").style("margin", "10px").text("View in ProteinPaint").on("click", () => svmr_2pp(this, true));
955
+ dd = d02.append("div").style("margin", "10px").text("Export all fusions");
956
+ dd.append("button").style("margin", "10px").text("Tabular format").on("click", () => svmr_export_text(this, false));
957
+ dd.append("button").style("margin", "10px").text("JSON format").on("click", () => svmr_export_json(this, false));
958
+ dd.append("button").style("margin", "10px").text("View in ProteinPaint").on("click", () => svmr_2pp(this, false));
959
+ });
960
+ butrow.append("a").attr("target", "_blank").attr("href", "https://docs.google.com/document/d/1DRVzE_WenG490eRYB7VGFOygtSqtF5L97rhK0HOUCNY/edit?usp=sharing").text("Help");
961
+ this.expression.div = holder.append("div").style("display", "none").style("margin", "20px").style("padding", "20px").style("border", "dashed 1px #bbb");
962
+ this.expression.prediv = this.expression.div.append("div");
963
+ this.expression.prediv.append("div").style("margin", "5px").text("Load a file that includes gene expression data for current samples.");
964
+ this.expression.prediv.append("div").style("margin", "5px 5px 10px 5px").style("font-size", "80%").text("The first 3 columns of the file should be: 1) gene name, 2) expression value, 3) sample name");
965
+ this.expression.input = this.expression.prediv.append("input").attr("type", "file").on("change", (event) => {
966
+ loadexpression(this, event.target.files[0]);
967
+ });
968
+ this.expression.presays = this.expression.prediv.append("span").style("padding-left", "20px");
969
+ this.expression.afterdiv = this.expression.div.append("div").style("display", "none");
970
+ const genediv = holder.append("div").style("display", "none").style("margin", "20px");
971
+ let d0 = genediv.append("div").style("display", "inline-block").style("border", "dashed 1px #bbb");
972
+ this.genefilter = d0.append("div").style("background-color", "#ededed").style("padding", "10px 20px");
973
+ let d01 = d0.append("div").style("padding", "10px 20px").style("overflow-y", "scroll").style("resize", "vertical").style("height", "300px");
974
+ d01.append("div").style("margin", "10px").style("font-size", "70%").text("Not included: read-through and intergenic events (including one or both sides).");
975
+ this.genetable = d01.append("table");
976
+ const cutoffdiv = holder.append("div").style("display", "none").style("margin", "20px");
977
+ d0 = cutoffdiv.append("div").style("display", "inline-block").style("padding", "20px").style("border", "solid 1px #ededed");
978
+ d0.append("span").style("padding", "0px 10px").text("Alert if:");
979
+ d01 = d0.append("span").style("padding", "0px 10px");
980
+ d01.append("span").html("chimeric reads &le;&nbsp;");
981
+ d01.append("input").attr("size", 3).property("value", this.cf_reads).on("change", (event) => {
982
+ const v = Number.parseInt(event.target.value);
983
+ if (Number.isNaN(v)) {
984
+ return;
985
+ }
986
+ this.cf_reads = v;
987
+ });
988
+ d01 = d0.append("span").style("padding", "0px 10px");
989
+ d01.append("span").html("repeat score &ge;&nbsp;");
990
+ d01.append("input").attr("size", 3).property("value", this.cf_repeat).on("change", (event) => {
991
+ const v = Number.parseFloat(event.target.value);
992
+ if (Number.isNaN(v)) {
993
+ return;
994
+ }
995
+ this.cf_repeat = v;
996
+ });
997
+ d01 = d0.append("span").style("padding", "0px 10px");
998
+ d01.append("span").html("contig bp length &le;&nbsp;");
999
+ d01.append("input").attr("size", 3).property("value", this.cf_match).on("change", (event) => {
1000
+ const v = Number.parseInt(event.target.value);
1001
+ if (Number.isNaN(v)) {
1002
+ return;
1003
+ }
1004
+ this.cf_match = v;
1005
+ });
1006
+ d01 = d0.append("span").style("padding", "0px 10px");
1007
+ d01.append("span").html("ratio &le;&nbsp;");
1008
+ d01.append("input").attr("size", 3).property("value", this.cf_ratio).on("change", (event) => {
1009
+ const v = Number.parseFloat(event.target.value);
1010
+ if (Number.isNaN(v)) {
1011
+ return;
1012
+ }
1013
+ this.cf_ratio = v;
1014
+ });
1015
+ const legenddiv = holder.append("div").style("display", "none").style("margin", "20px");
1016
+ var h = 16;
1017
+ legenddiv.append("div").style("display", "inline-block").style("padding", "10px").style("border", "solid 1px #ededed").html(
1018
+ '<table style="margin:20px"><tr><td><div style="display:inline-block;font-size:80%;color:white;background-color:' + colorinframe + ';padding:2px 5px">IN</div></td><td>In-frame fusion</td></tr><tr><td><div style="display:inline-block;font-size:80%;color:white;background-color:' + coloroutframe + ';padding:2px 5px">O</div></td><td>Out-of-frame fusion</td></tr><tr><td><div style="display:inline-block;font-size:80%;color:black;border:solid 1px black;padding:1px 3px">?</div></td><td>Intergenic fusion, or gene isoform not specified</td></tr></table><table style="margin:20px"><tr><td>chr5 <span style="border:solid 1px black;padding:0px 10px;"></span>-<span style="border:solid 1px black;padding:0px 10px;"></span> chr5</td><td>Intra-chromosomal breakpoints</td></tr><tr><td><span style="color:red">chr5</span> <span style="border:solid 1px black;padding:0px 10px;"></span>-<span style="border:solid 1px black;padding:0px 10px;"></span> <span style="color:red">chr10</span></td><td>Inter-chromosomal breakpoints</td></tr></tr></table><table style="margin:20px"><tr><td><div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%">geneA</div>-<div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%">geneB</div></td><td>Neither geneA nor geneB is known fusion partner</td></tr><tr><td><div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%;font-weight:bold;">geneA</div>-<div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%">geneB</div></td><td>GeneA is a known fusion partner</td></tr><tr><td><div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%;font-weight:bold;">geneA</div>-<div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%;font-weight:bold;">geneB</div></td><td>Both genes are known fusion partners, but they do not make a known fusion product.</td></tr><tr><td><div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%;font-weight:bold;color:' + knownprod_c + '">geneA</div>-<div style="display:inline-block;border:solid 1px black;padding:2px 10px;font-size:70%;font-weight:bold;color:' + knownprod_c + '">geneB</div></td><td>A known fusion product</td></tr></table><table style="margin:20px"><tr><td><div style="width:40px;height:16px;position:relative;"><div style="position:absolute;right:0px;top:0px;width:20px;height:16px;background-color:' + colorbgleft + '"></div><div style="position:absolute;border:solid 1px black;width:100%;height:15px"></div></div></td><td>ratioA: for geneA, the ratio of chimeric reads over total reads</td></tr><tr><td><div style="width:40px;height:16px;position:relative;"><div style="position:absolute;left:0px;top:0px;width:20px;height:16px;background-color:' + colorbgright + '"></div><div style="position:absolute;border:solid 1px black;width:100%;height:15px"></div></div></td><td>ratioB: for geneB, the ratio of chimeric reads over total reads</td></tr><tr><td><div style="width:40px;height:16px;border:solid 1px red;"></div></td><td>Antisense (reported strand is on the opposite of gene strand)</td></tr></table>'
1019
+ );
1020
+ this.ul = holder.append("ul");
1021
+ this.step_isoform(items);
1022
+ }
1023
+ // end of constructor
1024
+ err(m) {
1025
+ sayerror(this.errdiv, m);
1026
+ }
1027
+ step_isoform(items) {
1028
+ const newset = /* @__PURE__ */ new Set();
1029
+ for (const item of items) {
1030
+ for (const i of item.pairs) {
1031
+ let n = i.a.isoform;
1032
+ if (n && !this.genome.isoformcache.has(n.toUpperCase())) {
1033
+ newset.add(n);
1034
+ }
1035
+ n = i.b.isoform;
1036
+ if (n && !this.genome.isoformcache.has(n.toUpperCase())) {
1037
+ newset.add(n);
1038
+ }
1039
+ }
1040
+ }
1041
+ if (newset.size == 0) {
1042
+ this.step_eat(items);
1043
+ return;
1044
+ }
1045
+ const newisoform = [];
1046
+ for (const n of newset) {
1047
+ newisoform.push(n);
1048
+ }
1049
+ const wait = this.holder.append("div").style("margin", "20px").text("Loading " + newset.size + " isoforms ...");
1050
+ fetch(
1051
+ new Request(this.hostURL + "/isoformlst", {
1052
+ method: "POST",
1053
+ body: JSON.stringify({ genome: this.genome.name, lst: newisoform, jwt: this.jwt })
1054
+ })
1055
+ ).then((data) => {
1056
+ return data.json();
1057
+ }).then((data) => {
1058
+ if (data.error) throw { message: "Cannot load isoforms: " + data.error };
1059
+ wait.remove();
1060
+ for (const ilst of data.lst) {
1061
+ if (ilst[0]) {
1062
+ this.genome.isoformcache.set(ilst[0].isoform, ilst);
1063
+ }
1064
+ }
1065
+ const isoformErr = [];
1066
+ for (const k of newset) {
1067
+ if (!this.genome.isoformcache.has(k.toUpperCase())) {
1068
+ isoformErr.push(k);
1069
+ }
1070
+ }
1071
+ if (isoformErr.length) {
1072
+ this.err(
1073
+ isoformErr.length + " invalid isoform" + (isoformErr.length > 1 ? "s" : "") + ": " + isoformErr.join(", ")
1074
+ );
1075
+ }
1076
+ this.step_eat(items);
1077
+ }).catch((err) => {
1078
+ this.err(err.message);
1079
+ if (err.stack) console.log(err.stack);
1080
+ });
1081
+ }
1082
+ step_eat(items) {
1083
+ for (const prod of items) {
1084
+ prod.hook = {};
1085
+ let use = null;
1086
+ for (const p of prod.pairs) {
1087
+ let gm = this.genome.isoformmatch(p.a.isoform, prod.chrA, prod.posA);
1088
+ if (gm) {
1089
+ prod.geneA = gm.name;
1090
+ p.a.isdefault = gm.isdefault;
1091
+ if (Number.isNaN(p.a.codon) || p.a.codon < 0) {
1092
+ p.a.codon = void 0;
1093
+ const a = genomic2gm(prod.posA, gm);
1094
+ if (a.atupstream) {
1095
+ p.a.atupstream = a.atupstream;
1096
+ } else if (a.atdownstream) {
1097
+ p.a.atdownstream = a.atdownstream;
1098
+ } else if (a.atutr3) {
1099
+ p.a.atutr3 = a.atutr3;
1100
+ } else if (a.atutr5) {
1101
+ p.a.atutr5 = a.atutr5;
1102
+ } else {
1103
+ p.a.codon = a.codon;
1104
+ }
1105
+ }
1106
+ }
1107
+ gm = this.genome.isoformmatch(p.b.isoform, prod.chrB, prod.posB);
1108
+ if (gm) {
1109
+ prod.geneB = gm.name;
1110
+ p.b.isdefault = gm.isdefault;
1111
+ if (Number.isNaN(p.b.codon) || p.b.codon < 0) {
1112
+ p.b.codon = void 0;
1113
+ const a = genomic2gm(prod.posB, gm);
1114
+ if (a.atupstream) {
1115
+ p.b.atupstream = a.atupstream;
1116
+ } else if (a.atdownstream) {
1117
+ p.b.atdownstream = a.atdownstream;
1118
+ } else if (a.atutr3) {
1119
+ p.b.atutr3 = a.atutr3;
1120
+ } else if (a.atutr5) {
1121
+ p.b.atutr5 = a.atutr5;
1122
+ } else {
1123
+ p.b.codon = a.codon;
1124
+ }
1125
+ }
1126
+ }
1127
+ if (p.a.isdefault && p.b.isdefault) {
1128
+ if (!use) {
1129
+ use = p;
1130
+ }
1131
+ if (p.inframe) {
1132
+ use = p;
1133
+ }
1134
+ }
1135
+ }
1136
+ if (use) {
1137
+ prod.usepair = use;
1138
+ } else {
1139
+ prod.notes.push("No preferred isoform pair");
1140
+ prod.usepair = prod.pairs[0];
1141
+ }
1142
+ if (prod.usepair) {
1143
+ prod.usepair.inuse = true;
1144
+ }
1145
+ prod.eventlabel = (prod.geneA ? prod.geneA : prod.chrA) + "-" + (prod.geneB ? prod.geneB : prod.chrB);
1146
+ }
1147
+ const tmp = {};
1148
+ const sampleless = {};
1149
+ let hassampleless = false;
1150
+ for (const prod of items) {
1151
+ let n = prod.sample;
1152
+ if (n) {
1153
+ if (!(n in tmp)) {
1154
+ tmp[n] = {};
1155
+ }
1156
+ if (!(prod.eventlabel in tmp[n])) {
1157
+ tmp[n][prod.eventlabel] = [];
1158
+ }
1159
+ tmp[n][prod.eventlabel].push(prod);
1160
+ } else {
1161
+ hassampleless = true;
1162
+ if (!(prod.eventlabel in sampleless)) {
1163
+ sampleless[prod.eventlabel] = [];
1164
+ }
1165
+ sampleless[prod.eventlabel].push(prod);
1166
+ }
1167
+ }
1168
+ for (const sn in tmp) {
1169
+ this.samples.push({
1170
+ name: sn,
1171
+ events: tmp[sn]
1172
+ });
1173
+ }
1174
+ if (hassampleless) {
1175
+ this.samples.push({
1176
+ name: "No name",
1177
+ events: sampleless
1178
+ });
1179
+ }
1180
+ this.buttsample.text(this.samples.length + " sample" + (this.samples.length > 1 ? "s" : ""));
1181
+ for (const sample of this.samples) {
1182
+ for (const elab in sample.events) {
1183
+ if (!(elab in this.elab2sample)) {
1184
+ this.elab2sample[elab] = [];
1185
+ }
1186
+ this.elab2sample[elab].push(sample);
1187
+ }
1188
+ }
1189
+ for (const sample of this.samples) {
1190
+ sample.gene2events = {};
1191
+ for (const elab in sample.events) {
1192
+ for (const prod of sample.events[elab]) {
1193
+ const a = prod.geneA;
1194
+ if (a) {
1195
+ if (!(a in sample.gene2events)) {
1196
+ sample.gene2events[a] = {};
1197
+ }
1198
+ sample.gene2events[a][elab] = 1;
1199
+ }
1200
+ const b = prod.geneB;
1201
+ if (b) {
1202
+ if (!(b in sample.gene2events)) {
1203
+ sample.gene2events[b] = {};
1204
+ }
1205
+ sample.gene2events[b][elab] = 1;
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+ for (const sample of this.samples) {
1211
+ const newholder = [];
1212
+ for (const elab in sample.events) {
1213
+ for (const prod of sample.events[elab]) {
1214
+ if (prod.rating == "HQ") msjoin(prod, newholder);
1215
+ }
1216
+ }
1217
+ for (const elab in sample.events) {
1218
+ for (const prod of sample.events[elab]) {
1219
+ if (prod.rating == "LQ") msjoin(prod, newholder);
1220
+ }
1221
+ }
1222
+ for (const elab in sample.events) {
1223
+ for (const prod of sample.events[elab]) {
1224
+ if (prod.rating == "RT") msjoin(prod, newholder);
1225
+ }
1226
+ }
1227
+ for (const elab in sample.events) {
1228
+ for (const prod of sample.events[elab]) {
1229
+ if (prod.rating == "bad") msjoin(prod, newholder);
1230
+ }
1231
+ }
1232
+ let msgid = 0;
1233
+ const msglst = [];
1234
+ for (const lst of newholder) {
1235
+ if (lst.length > 1) {
1236
+ for (const prod of lst) {
1237
+ prod.msgid = msgid;
1238
+ }
1239
+ msgid++;
1240
+ msglst.push(lst);
1241
+ }
1242
+ }
1243
+ const hqin = [], hqt = [], hqo = [], lqin = [], lqt = [], lqo = [], rtin = [], rtt = [], rto = [], badin = [], badt = [], bado = [];
1244
+ for (const msg of msglst) {
1245
+ const thisset = [];
1246
+ let hqin3 = false, hqt3 = false, hqo3 = false, lqin3 = false, lqt3 = false, lqo3 = false, rtin3 = false, rtt3 = false, rto3 = false, badin3 = false, badt3 = false, bado3 = false;
1247
+ for (const prod of msg) {
1248
+ thisset.push({ label: prod.eventlabel, lst: [prod] });
1249
+ const pair2 = prod.usepair;
1250
+ if (prod.rating == "HQ") {
1251
+ if (pair2) {
1252
+ if (pair2.inframe) hqin3 = true;
1253
+ else hqt3 = true;
1254
+ } else if (prod.isnloss || prod.iscloss) {
1255
+ hqt3 = true;
1256
+ } else {
1257
+ hqo3 = true;
1258
+ }
1259
+ } else if (prod.rating == "LQ") {
1260
+ if (pair2) {
1261
+ if (pair2.inframe) lqin3 = true;
1262
+ else lqt3 = true;
1263
+ } else if (prod.isnloss || prod.iscloss) {
1264
+ lqt3 = true;
1265
+ } else {
1266
+ lqo3 = true;
1267
+ }
1268
+ } else if (prod.rating == "RT") {
1269
+ if (pair2) {
1270
+ if (pair2.inframe) rtin3 = true;
1271
+ else rtt3 = true;
1272
+ } else if (prod.isnloss || prod.iscloss) {
1273
+ rtt3 = true;
1274
+ } else {
1275
+ rto3 = true;
1276
+ }
1277
+ } else {
1278
+ if (pair2) {
1279
+ if (pair2.inframe) badin3 = true;
1280
+ else badt3 = true;
1281
+ } else if (prod.isnloss || prod.iscloss) {
1282
+ badt3 = true;
1283
+ } else {
1284
+ bado3 = true;
1285
+ }
1286
+ }
1287
+ }
1288
+ if (hqin3) {
1289
+ hqin.push({ label: "", lst: thisset, ismsg: true });
1290
+ } else if (hqt3) {
1291
+ hqt.push({ label: "", lst: thisset, ismsg: true });
1292
+ } else if (hqo3) {
1293
+ hqo.push({ label: "", lst: thisset, ismsg: true });
1294
+ } else if (lqin3) {
1295
+ lqin.push({ label: "", lst: thisset, ismsg: true });
1296
+ } else if (lqt3) {
1297
+ lqt.push({ label: "", lst: thisset, ismsg: true });
1298
+ } else if (lqo3) {
1299
+ lqo.push({ label: "", lst: thisset, ismsg: true });
1300
+ } else if (rtin3) {
1301
+ rtin.push({ label: "", lst: thisset, ismsg: true });
1302
+ } else if (rtt3) {
1303
+ rtt.push({ label: "", lst: thisset, ismsg: true });
1304
+ } else if (rto3) {
1305
+ rto.push({ label: "", lst: thisset, ismsg: true });
1306
+ } else if (badin3) {
1307
+ badin.push({ label: "", lst: thisset, ismsg: true });
1308
+ } else if (badt3) {
1309
+ badt.push({ label: "", lst: thisset, ismsg: true });
1310
+ } else if (bado3) {
1311
+ bado.push({ label: "", lst: thisset, ismsg: true });
1312
+ } else {
1313
+ console.log("multi-seg group unclassfied? " + key);
1314
+ }
1315
+ }
1316
+ const genepairs = {};
1317
+ for (const elab in sample.events) {
1318
+ const hqin2 = [], hqt2 = [], hqo2 = [], lqin2 = [], lqt2 = [], lqo2 = [], rtin2 = [], rtt2 = [], rto2 = [], badin2 = [], badt2 = [], bado2 = [];
1319
+ for (const prod of sample.events[elab]) {
1320
+ if (prod.msgid != void 0) {
1321
+ continue;
1322
+ }
1323
+ if (prod.geneA && prod.geneB) {
1324
+ const key2 = prod.geneA + "-" + prod.geneB;
1325
+ let hash = genepairs[key2];
1326
+ if (!hash) {
1327
+ const key22 = prod.geneB + "-" + prod.geneA;
1328
+ hash = genepairs[key22];
1329
+ }
1330
+ if (hash) {
1331
+ if (!(key2 in hash)) {
1332
+ hash[key2] = [];
1333
+ }
1334
+ hash[key2].push(prod);
1335
+ } else {
1336
+ genepairs[key2] = {};
1337
+ genepairs[key2][key2] = [prod];
1338
+ }
1339
+ continue;
1340
+ }
1341
+ var pair = prod.usepair;
1342
+ if (prod.rating == "HQ") {
1343
+ if (pair) {
1344
+ if (pair.inframe) hqin2.push(prod);
1345
+ else hqt2.push(prod);
1346
+ } else if (prod.isnloss || prod.iscloss) {
1347
+ hqt2.push(prod);
1348
+ } else {
1349
+ hqo2.push(prod);
1350
+ }
1351
+ } else if (prod.rating == "LQ") {
1352
+ if (pair) {
1353
+ if (pair.inframe) lqin2.push(prod);
1354
+ else lqt2.push(prod);
1355
+ } else if (prod.isnloss || prod.iscloss) {
1356
+ lqt2.push(prod);
1357
+ } else {
1358
+ lqo2.push(prod);
1359
+ }
1360
+ } else if (prod.rating == "RT") {
1361
+ if (pair) {
1362
+ if (pair.inframe) rtin2.push(prod);
1363
+ else rtt2.push(prod);
1364
+ } else if (prod.isnloss || prod.iscloss) {
1365
+ rtt2.push(prod);
1366
+ } else {
1367
+ rto2.push(prod);
1368
+ }
1369
+ } else {
1370
+ if (pair) {
1371
+ if (pair.inframe) badin2.push(prod);
1372
+ else badt2.push(prod);
1373
+ } else if (prod.isnloss || prod.iscloss) {
1374
+ badt2.push(prod);
1375
+ } else {
1376
+ bado2.push(prod);
1377
+ }
1378
+ }
1379
+ }
1380
+ if (hqin2.length > 0) {
1381
+ hqin.push({ label: elab, lst: [{ label: elab, lst: hqin2 }] });
1382
+ } else if (hqt2.length > 0) {
1383
+ hqt.push({ label: elab, lst: [{ label: elab, lst: hqt2 }] });
1384
+ } else if (hqo2.length > 0) {
1385
+ hqo.push({ label: elab, lst: [{ label: elab, lst: hqo2 }] });
1386
+ } else if (lqin2.length > 0) {
1387
+ lqin.push({ label: elab, lst: [{ label: elab, lst: lqin2 }] });
1388
+ } else if (lqt2.length > 0) {
1389
+ lqt.push({ label: elab, lst: [{ label: elab, lst: lqt2 }] });
1390
+ } else if (lqo2.length > 0) {
1391
+ lqo.push({ label: elab, lst: [{ label: elab, lst: lqo2 }] });
1392
+ } else if (rtin2.length > 0) {
1393
+ rtin.push({ label: elab, lst: [{ label: elab, lst: rtin2 }] });
1394
+ } else if (rtt2.length > 0) {
1395
+ rtt.push({ label: elab, lst: [{ label: elab, lst: rtt2 }] });
1396
+ } else if (rto2.length > 0) {
1397
+ rto.push({ label: elab, lst: [{ label: elab, lst: rto2 }] });
1398
+ } else if (badin2.length > 0) {
1399
+ badin.push({ label: elab, lst: [{ label: elab, lst: badin2 }] });
1400
+ } else if (badt2.length > 0) {
1401
+ badt.push({ label: elab, lst: [{ label: elab, lst: badt2 }] });
1402
+ } else if (bado2.length > 0) {
1403
+ bado.push({ label: elab, lst: [{ label: elab, lst: bado2 }] });
1404
+ }
1405
+ }
1406
+ for (const key2 in genepairs) {
1407
+ let hqin3 = false, hqt3 = false, hqo3 = false, lqin3 = false, lqt3 = false, lqo3 = false, rtin3 = false, rtt3 = false, rto3 = false, badin3 = false, badt3 = false, bado3 = false;
1408
+ const thisset = [];
1409
+ for (const elab in genepairs[key2]) {
1410
+ const prodlst = genepairs[key2][elab];
1411
+ if (prodlst.length == 1) {
1412
+ if (prodlst[0].msgid != void 0) {
1413
+ continue;
1414
+ }
1415
+ }
1416
+ thisset.push({ label: elab, lst: prodlst });
1417
+ for (const prod of prodlst) {
1418
+ const pair2 = prod.usepair;
1419
+ if (prod.rating == "HQ") {
1420
+ if (pair2) {
1421
+ if (pair2.inframe) hqin3 = true;
1422
+ else hqt3 = true;
1423
+ } else if (prod.isnloss || prod.iscloss) {
1424
+ hqt3 = true;
1425
+ } else {
1426
+ hqo3 = true;
1427
+ }
1428
+ } else if (prod.rating == "LQ") {
1429
+ if (pair2) {
1430
+ if (pair2.inframe) lqin3 = true;
1431
+ else lqt3 = true;
1432
+ } else if (prod.isnloss || prod.iscloss) {
1433
+ lqt3 = true;
1434
+ } else {
1435
+ lqo3 = true;
1436
+ }
1437
+ } else if (prod.rating == "RT") {
1438
+ if (pair2) {
1439
+ if (pair2.inframe) rtin3 = true;
1440
+ else rtt3 = true;
1441
+ } else if (prod.isnloss || prod.iscloss) {
1442
+ rtt3 = true;
1443
+ } else {
1444
+ rto3 = true;
1445
+ }
1446
+ } else {
1447
+ if (pair2) {
1448
+ if (pair2.inframe) badin3 = true;
1449
+ else badt3 = true;
1450
+ } else if (prod.isnloss || prod.iscloss) {
1451
+ badt3 = true;
1452
+ } else {
1453
+ bado3 = true;
1454
+ }
1455
+ }
1456
+ }
1457
+ }
1458
+ if (hqin3) {
1459
+ hqin.push({ label: key2, lst: thisset });
1460
+ } else if (hqt3) {
1461
+ hqt.push({ label: key2, lst: thisset });
1462
+ } else if (hqo3) {
1463
+ hqo.push({ label: key2, lst: thisset });
1464
+ } else if (lqin3) {
1465
+ lqin.push({ label: key2, lst: thisset });
1466
+ } else if (lqt3) {
1467
+ lqt.push({ label: key2, lst: thisset });
1468
+ } else if (lqo3) {
1469
+ lqo.push({ label: key2, lst: thisset });
1470
+ } else if (rtin3) {
1471
+ rtin.push({ label: key2, lst: thisset });
1472
+ } else if (rtt3) {
1473
+ rtt.push({ label: key2, lst: thisset });
1474
+ } else if (rto3) {
1475
+ rto.push({ label: key2, lst: thisset });
1476
+ } else if (badin3) {
1477
+ badin.push({ label: key2, lst: thisset });
1478
+ } else if (badt3) {
1479
+ badt.push({ label: key2, lst: thisset });
1480
+ } else if (bado3) {
1481
+ bado.push({ label: key2, lst: thisset });
1482
+ }
1483
+ }
1484
+ sample.egglst = [];
1485
+ sample.hqincount = 0;
1486
+ sample.lqincount = 0;
1487
+ if (hqin.length) {
1488
+ sample.egglst.push({
1489
+ htmlab: 'HQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:' + colorinframe + ';color:white;padding:1px 3px;font-size:80%;">in-frame&nbsp;&nbsp;</span>',
1490
+ lst: hqin
1491
+ });
1492
+ sample.hqincount = hqin.reduce((i, j) => i + j.lst.length, 0);
1493
+ }
1494
+ if (hqt.length) {
1495
+ sample.egglst.push({
1496
+ htmlab: 'HQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:#E3C3C8;padding:1px 3px;font-size:80%;">truncation</span>',
1497
+ lst: hqt
1498
+ });
1499
+ }
1500
+ if (hqo.length) {
1501
+ sample.egglst.push({
1502
+ htmlab: 'HQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:#ccc;padding:1px 3px;font-size:80%;">others&nbsp;&nbsp;&nbsp;&nbsp;</span>',
1503
+ lst: hqo
1504
+ });
1505
+ }
1506
+ if (lqin.length) {
1507
+ sample.egglst.push({
1508
+ htmlab: 'LQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:' + colorinframe + ';color:white;padding:1px 3px;font-size:80%;">in-frame&nbsp;&nbsp;</span>',
1509
+ lst: lqin
1510
+ });
1511
+ sample.lqincount = lqin.reduce((i, j) => i + j, 0);
1512
+ }
1513
+ if (lqt.length) {
1514
+ sample.egglst.push({
1515
+ htmlab: 'LQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:#E3C3C8;padding:1px 3px;font-size:80%;">truncation</span>',
1516
+ lst: lqt
1517
+ });
1518
+ }
1519
+ if (lqo.length) {
1520
+ sample.egglst.push({
1521
+ htmlab: 'LQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:#ccc;padding:1px 3px;font-size:80%;">others&nbsp;&nbsp;&nbsp;&nbsp;</span>',
1522
+ lst: lqo
1523
+ });
1524
+ }
1525
+ if (rtin.length) {
1526
+ sample.egglst.push({
1527
+ htmlab: 'Read-through <span style="background-color:' + colorinframe + ';color:white;padding:1px 3px;font-size:80%;">in-frame&nbsp;&nbsp;</span>',
1528
+ lst: rtin
1529
+ });
1530
+ }
1531
+ if (rtt.length) {
1532
+ sample.egglst.push({
1533
+ htmlab: 'Read-through <span style="background-color:#E3C3C8;padding:1px 3px;font-size:80%;">truncation</span>',
1534
+ lst: rtt
1535
+ });
1536
+ }
1537
+ if (rto.length) {
1538
+ sample.egglst.push({
1539
+ htmlab: 'Read-through <span style="background-color:#ccc;padding:1px 3px;font-size:80%;">others&nbsp;&nbsp;&nbsp;&nbsp;</span>',
1540
+ lst: rto
1541
+ });
1542
+ }
1543
+ if (badin.length) {
1544
+ sample.egglst.push({
1545
+ htmlab: 'Bad&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:' + colorinframe + ';color:white;padding:1px 3px;font-size:80%;">in-frame</span>',
1546
+ lst: badin
1547
+ });
1548
+ }
1549
+ if (badt.length) {
1550
+ sample.egglst.push({
1551
+ htmlab: 'Bad&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:#E3C3C8;padding:1px 3px;font-size:80%;">truncation</span>',
1552
+ lst: badt
1553
+ });
1554
+ }
1555
+ if (bado.length) {
1556
+ sample.egglst.push({
1557
+ htmlab: 'Bad&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color:#ccc;padding:1px 3px;font-size:80%;">others&nbsp;&nbsp;&nbsp;&nbsp;</span>',
1558
+ lst: bado
1559
+ });
1560
+ }
1561
+ }
1562
+ this.samples.sort((a, b) => {
1563
+ if (a.hqincount == b.hqincount) {
1564
+ return b.lqincount - a.lqincount;
1565
+ }
1566
+ return b.hqincount - a.hqincount;
1567
+ });
1568
+ for (const sample of this.samples) {
1569
+ for (const egg of sample.egglst) {
1570
+ for (const eg of egg.lst) {
1571
+ for (const evt of eg.lst) {
1572
+ evt.lst.sort((a, b) => {
1573
+ const pa = a.usepair, pb = b.usepair;
1574
+ if (pa) {
1575
+ if (pb) {
1576
+ if (pa.inframe) {
1577
+ if (!pb.inframe) {
1578
+ return -1;
1579
+ }
1580
+ } else {
1581
+ if (pb.inframe) {
1582
+ return 1;
1583
+ }
1584
+ }
1585
+ } else {
1586
+ return -1;
1587
+ }
1588
+ } else {
1589
+ if (pb) {
1590
+ return 1;
1591
+ }
1592
+ }
1593
+ return b.score - a.score;
1594
+ });
1595
+ }
1596
+ }
1597
+ egg.lst.sort((a, b) => {
1598
+ if (a.lst.length != b.lst.length) {
1599
+ return b.lst.length - a.lst.length;
1600
+ }
1601
+ let scorea = 0;
1602
+ for (const evta of a.lst) {
1603
+ for (const prod of evta.lst) {
1604
+ scorea = Math.max(scorea, prod.score);
1605
+ }
1606
+ }
1607
+ let scoreb = 0;
1608
+ for (const evtb of b.lst) {
1609
+ for (const prod of evtb.lst) {
1610
+ scoreb = Math.max(scoreb, prod.score);
1611
+ }
1612
+ }
1613
+ return scoreb - scorea;
1614
+ });
1615
+ }
1616
+ let prodid = 1;
1617
+ for (const egg of sample.egglst) {
1618
+ for (const eg of egg.lst) {
1619
+ for (const evt of eg.lst) {
1620
+ for (const prod of evt.lst) {
1621
+ prod.prodid = prodid++;
1622
+ }
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ this.step_gene();
1628
+ this.step_table();
1629
+ }
1630
+ dogenefilter() {
1631
+ let va = this.gui.inputa.property("value");
1632
+ let vb = this.gui.inputb.property("value");
1633
+ if (va.length + vb.length == 0) {
1634
+ this.gui.says.text(
1635
+ "Showing " + (this.genelst.length > 100 ? 100 : "all") + " of " + this.genelst.length + " pairs"
1636
+ );
1637
+ this.geneshow(this.genelst.length > 100 ? this.genelst.slice(0, 100) : this.genelst);
1638
+ return;
1639
+ }
1640
+ va = va.length == 0 ? null : va.toLowerCase();
1641
+ vb = vb.length == 0 ? null : vb.toLowerCase();
1642
+ const uselst = [];
1643
+ for (const g of this.genelst) {
1644
+ if (va) {
1645
+ if (!g.a) continue;
1646
+ if (g.a.toLowerCase().indexOf(va) == -1) continue;
1647
+ }
1648
+ if (vb) {
1649
+ if (!g.b) continue;
1650
+ if (g.b.toLowerCase().indexOf(vb) == -1) continue;
1651
+ }
1652
+ uselst.push(g);
1653
+ }
1654
+ this.gui.says.text("Showing " + Math.min(100, uselst.length) + " of " + this.genelst.length + " pairs");
1655
+ this.geneshow(uselst.length > 100 ? uselst.slice(0, 100) : uselst);
1656
+ }
1657
+ geneshow(lst) {
1658
+ this.genetable.selectAll("*").remove();
1659
+ const tr = this.genetable.append("tr").style("background-color", "#ededed").style("font-size", ".8em");
1660
+ tr.append("td").text("gene A");
1661
+ tr.append("td").text("gene B");
1662
+ tr.append("td").text("# sample");
1663
+ tr.append("td").text("rating");
1664
+ for (const evt of lst) {
1665
+ let color1 = "black", color2 = "black", weight1, weight2;
1666
+ if (evt.ainter) {
1667
+ color1 = "#aaa";
1668
+ weight1 = "normal";
1669
+ } else {
1670
+ const a = evt.samples[0].prodlst[0].hlgene;
1671
+ if (a == 1 || a == 3 || a == 4) weight1 = "bold";
1672
+ if (a == 4) color1 = knownprod_c;
1673
+ }
1674
+ if (evt.binter) {
1675
+ color2 = "#aaa";
1676
+ weight2 = "normal";
1677
+ } else {
1678
+ const a = evt.samples[0].prodlst[0].hlgene;
1679
+ if (a == 2 || a == 3 || a == 4) weight2 = "bold";
1680
+ if (a == 4) color2 = knownprod_c;
1681
+ }
1682
+ const tr2 = this.genetable.append("tr").attr("class", "sja_clb");
1683
+ tr2.append("td").text(evt.a).style("color", color1).style("font-weight", weight1);
1684
+ tr2.append("td").text(evt.b).style("color", color2).style("font-weight", weight2);
1685
+ const td = tr2.append("td").text(evt.samples.length);
1686
+ tr2.on("click", () => {
1687
+ const p = tr2.node().getBoundingClientRect();
1688
+ const pane2 = newpane({ x: p.left + p.width + 10, y: p.top });
1689
+ pane2.header.text(evt.a + " - " + evt.b);
1690
+ const table = pane2.body.append("table");
1691
+ for (const sample of evt.samples) {
1692
+ const tr3 = table.append("tr");
1693
+ tr3.append("td").style("vertical-align", "top").style("padding-top", "5px").text(sample.name);
1694
+ const td2 = tr3.append("td");
1695
+ for (const prod of sample.prodlst) {
1696
+ const logo = this.eventlogo([prod], td2);
1697
+ logo.style("position", "relative");
1698
+ logo.append("div").style("position", "absolute").style("width", "100%").style("height", "100%").style("top", "0px").style("left", "0px").on("mouseover", (event) => {
1699
+ const p2 = event.target.getBoundingClientRect();
1700
+ tip.clear().show(p2.left + p2.width - 2, p2.top - 30);
1701
+ this.showsvpairs({
1702
+ prodlst: [prod],
1703
+ holder: tip.d.append("div"),
1704
+ nodetail: true,
1705
+ sample,
1706
+ eglst: null,
1707
+ showothersample: false
1708
+ });
1709
+ }).on("click", (event) => {
1710
+ const p2 = event.target.getBoundingClientRect();
1711
+ const pane = newpane({ x: p2.left + p2.width + 40, y: p2.top - 60 });
1712
+ pane.header.text(sample.name);
1713
+ this.showsvpairs({
1714
+ prodlst: [prod],
1715
+ holder: pane.body
1716
+ });
1717
+ });
1718
+ }
1719
+ }
1720
+ });
1721
+ const hash = {};
1722
+ for (const smp of evt.samples) {
1723
+ const hash2 = {};
1724
+ for (const p of smp.prodlst) {
1725
+ hash2[p.rating] = 1;
1726
+ }
1727
+ for (var n in hash2) {
1728
+ if (!(n in hash)) {
1729
+ hash[n] = 0;
1730
+ }
1731
+ hash[n]++;
1732
+ }
1733
+ }
1734
+ const lst2 = [];
1735
+ for (const smp of ["HQ", "LQ", "RT", "bad"]) {
1736
+ if (hash[smp]) {
1737
+ lst2.push(
1738
+ '<span style="border-radius:6px;background-color:#ededed;padding:1px 6px;font-size:80%">' + smp + (hash[smp] > 1 ? ' <span style="font-size:80%">' + hash[smp] + "</span>" : "") + "</span>"
1739
+ );
1740
+ }
1741
+ }
1742
+ tr2.append("td").html(lst2.join(" "));
1743
+ }
1744
+ }
1745
+ step_gene() {
1746
+ this.gui = {};
1747
+ this.genefilter.append("span").text("Filter:");
1748
+ this.gui.inputa = this.genefilter.append("input").attr("size", 7).attr("placeholder", "gene A").style("margin-left", "10px").on("keyup", () => this.dogenefilter());
1749
+ this.gui.inputb = this.genefilter.append("input").attr("size", 7).attr("placeholder", "gene B").style("margin-left", "10px").on("keyup", () => this.dogenefilter());
1750
+ this.genefilter.append("button").style("margin-left", "10px").text("Reset").on("click", () => {
1751
+ this.gui.inputa.property("value", "");
1752
+ this.gui.inputb.property("value", "");
1753
+ this.dogenefilter();
1754
+ });
1755
+ this.gui.says = this.genefilter.append("span").style("padding-left", "20px");
1756
+ const events = {};
1757
+ const genes = /* @__PURE__ */ new Set();
1758
+ for (const sample of this.samples) {
1759
+ for (const k in sample.events) {
1760
+ for (const prod of sample.events[k]) {
1761
+ if (!prod.geneA || !prod.geneB) continue;
1762
+ if (prod.rating == "RT") continue;
1763
+ if (prod.geneA) {
1764
+ genes.add(prod.geneA);
1765
+ }
1766
+ if (prod.geneB) {
1767
+ genes.add(prod.geneB);
1768
+ }
1769
+ const n = (prod.geneA ? prod.geneA : "<" + prod.chrA) + " - " + (prod.geneB ? prod.geneB : "<" + prod.chrB);
1770
+ if (!(n in events)) {
1771
+ events[n] = {};
1772
+ }
1773
+ if (!(sample.name in events[n])) {
1774
+ events[n][sample.name] = [];
1775
+ }
1776
+ events[n][sample.name].push(prod);
1777
+ }
1778
+ }
1779
+ }
1780
+ this.buttgene.text(genes.size + " gene" + (genes.size > 1 ? "s" : ""));
1781
+ for (const k in events) {
1782
+ const tmp = k.split(" - ");
1783
+ const evt = { samples: [] };
1784
+ if (tmp[0][0] == "<") {
1785
+ evt.a = tmp[0].slice(1, tmp[0].length);
1786
+ evt.ainter = true;
1787
+ } else {
1788
+ evt.a = tmp[0];
1789
+ }
1790
+ if (tmp[1][0] == "<") {
1791
+ evt.b = tmp[1].slice(1, tmp[1].length);
1792
+ evt.binter = true;
1793
+ } else {
1794
+ evt.b = tmp[1];
1795
+ }
1796
+ for (const sn in events[k]) {
1797
+ evt.samples.push({ name: sn, prodlst: events[k][sn] });
1798
+ }
1799
+ this.genelst.push(evt);
1800
+ }
1801
+ this.genelst.sort((a, b) => {
1802
+ let ca = 0;
1803
+ for (const s of a.samples) {
1804
+ for (const p of s.prodlst) {
1805
+ if (p.rating == "HQ") ca++;
1806
+ }
1807
+ }
1808
+ let cb = 0;
1809
+ for (const s of b.samples) {
1810
+ for (const p of s.prodlst) {
1811
+ if (p.rating == "HQ") cb++;
1812
+ }
1813
+ }
1814
+ return cb - ca;
1815
+ });
1816
+ this.dogenefilter();
1817
+ }
1818
+ step_table() {
1819
+ this.eggbar = [];
1820
+ this.ul.selectAll("*").remove();
1821
+ for (const sample of this.samples) {
1822
+ this.ul.append("li").style("font-weight", "bold").style("color", "#545454").text(sample.name);
1823
+ sample.ul = this.ul.append("ul").style("margin-bottom", "10px");
1824
+ this.showsample(sample);
1825
+ }
1826
+ }
1827
+ showsample(sample) {
1828
+ sample.ul.selectAll("*").remove();
1829
+ for (const egg of sample.egglst) {
1830
+ const evtnum = egg.lst.reduce((i, j) => i + j.lst.length, 0);
1831
+ const li = sample.ul.append("li");
1832
+ const bar = li.append("div").attr("class", "sja_clb2").html(egg.htmlab + " " + evtnum);
1833
+ bar.on("click", () => {
1834
+ for (const bar0 of this.eggbar) {
1835
+ bar0.style("background-color", "");
1836
+ }
1837
+ bar.style("background-color", "yellow");
1838
+ const next = select_default(li.node().nextSibling);
1839
+ if (next.style("display") == "none") {
1840
+ appear(next);
1841
+ egg.isopen = true;
1842
+ } else {
1843
+ disappear(next);
1844
+ egg.isopen = false;
1845
+ }
1846
+ });
1847
+ this.eggbar.push(bar);
1848
+ const div = sample.ul.append("div").style("margin", "10px");
1849
+ this.showevents(sample, egg.lst, div);
1850
+ }
1851
+ }
1852
+ showevents(sample, eglst, holder) {
1853
+ const svg = holder.append("svg");
1854
+ let rowh = 22, rowh2 = 15, rows = 13, fontsize = rowh - 3, fontsizeframe = 14, fontsizefeature = 10, hpad0 = 20, hpad = 10, vpad = 10, gvpad = 10, chrAw = 60, chrBw = 60, s1 = 10, s2 = 10, s3 = 10, s4 = 10, s5 = 5, s6 = 15, s7 = 13, eventlogow = 0, etw = 25, genesp = 12, geneAw = 0, geneBw = 0, recurw = 0, graphheight = 0;
1855
+ for (const eg of eglst) {
1856
+ graphheight += rows;
1857
+ if (eg.lst.length == 1) {
1858
+ graphheight += rowh;
1859
+ } else {
1860
+ graphheight += vpad * 2 + (rowh + rows) * eg.lst.length + (rowh2 + rows) * (eg.lst.length - 1) + gvpad;
1861
+ }
1862
+ for (const evt of eg.lst) {
1863
+ evt.svg = {};
1864
+ const prodlst = evt.lst;
1865
+ const prod = prodlst[0];
1866
+ let labA, labB;
1867
+ if (prod.geneA) {
1868
+ const t = prod.geneA.split(",");
1869
+ if (t.length > 2) {
1870
+ labA = t[0] + "," + t[1] + "...";
1871
+ } else {
1872
+ labA = prod.geneA;
1873
+ }
1874
+ } else {
1875
+ labA = "";
1876
+ }
1877
+ if (prod.geneB) {
1878
+ const t = prod.geneB.split(",");
1879
+ if (t.length > 2) {
1880
+ labB = t[0] + "," + t[1] + "...";
1881
+ } else {
1882
+ labB = prod.geneB;
1883
+ }
1884
+ } else {
1885
+ labB = "";
1886
+ }
1887
+ svg.append("text").text(labA).attr("font-size", fontsize).attr("font-family", "Courier").each(function() {
1888
+ geneAw = Math.max(geneAw, this.getBBox().width);
1889
+ }).remove();
1890
+ svg.append("text").text(labB).attr("font-size", fontsize).attr("font-family", "Courier").each(function() {
1891
+ geneBw = Math.max(geneBw, this.getBBox().width);
1892
+ }).remove();
1893
+ svg.append("text").text(prod.rating).attr("font-size", fontsize).attr("font-family", "Courier").each(function() {
1894
+ evt.svg.ratingw = this.getBBox().width;
1895
+ }).remove();
1896
+ evt.svg.framew = 22;
1897
+ evt.svg.typew = 60;
1898
+ if (prod.usepair) {
1899
+ evt.svg.frameword = prod.usepair.inframe ? "IN" : "O";
1900
+ } else {
1901
+ evt.svg.frameword = "?";
1902
+ }
1903
+ svg.append("text").text(prod.featureA).attr("font-size", fontsizefeature).attr("font-family", font).each(function() {
1904
+ evt.svg.featurew = this.getBBox().width;
1905
+ }).remove();
1906
+ svg.append("text").text(prod.featureB).attr("font-size", fontsizefeature).attr("font-family", font).each(function() {
1907
+ evt.svg.featurew = Math.max(evt.svg.featurew, this.getBBox().width);
1908
+ }).remove();
1909
+ svg.append("text").text(Math.floor(prod.score)).attr("font-size", fontsize).attr("font-family", font).each(function() {
1910
+ evt.svg.scorew = this.getBBox().width;
1911
+ }).remove();
1912
+ evt.svg.logow = evt.svg.ratingw + evt.svg.framew + evt.svg.typew + evt.svg.featurew + evt.svg.scorew + s5 * 6;
1913
+ eventlogow = Math.max(eventlogow, evt.svg.logow + (prodlst.length > 1 ? s4 + etw : 0));
1914
+ if (prod.geneA && prod.geneB) {
1915
+ const slst = this.elab2sample[evt.label];
1916
+ if (!slst) {
1917
+ evt.svg.recurtext = "Recurrence check error";
1918
+ evt.svg.recurtextcolor = "red";
1919
+ } else if (slst.length == 1) {
1920
+ evt.svg.recurtext = "No recurrence";
1921
+ evt.svg.recurtextcolor = "#aaaaaa";
1922
+ } else {
1923
+ evt.svg.hasrecurrence = true;
1924
+ evt.svg.recurtext = "In " + slst.length + " samples";
1925
+ evt.svg.recurtextcolor = "black";
1926
+ }
1927
+ } else {
1928
+ evt.svg.recurtext = "Unknown recurrence";
1929
+ evt.svg.recurtextcolor = "#aaaaaa";
1930
+ }
1931
+ svg.append("text").text(evt.svg.recurtext).attr("font-size", fontsize - 4).attr("font-family", font).each(function() {
1932
+ evt.svg.recurw = this.getBBox().width;
1933
+ }).remove();
1934
+ recurw = Math.max(recurw, evt.svg.recurw);
1935
+ }
1936
+ }
1937
+ geneAw += 10;
1938
+ geneBw += 10;
1939
+ graphheight += rows;
1940
+ let ghandlew = 100;
1941
+ let roww = chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1 + chrBw + s3 + eventlogow + s6 + recurw;
1942
+ svg.attr("width", hpad0 * 2 + hpad * 2 + roww + ghandlew).attr("height", graphheight);
1943
+ const g = svg.append("g").attr("transform", "translate(" + hpad0 + ",0)");
1944
+ let y = 0;
1945
+ for (const eg of eglst) {
1946
+ y += rows;
1947
+ const g_eg = g.append("g").attr("transform", "translate(0," + y + ")");
1948
+ const groupheight = (rowh + rows) * eg.lst.length - rows + (eg.lst.length > 1 ? vpad * 2 : 0) + (eg.lst.length > 1 ? (rowh2 + rows) * (eg.lst.length - 1) : 0);
1949
+ if (eg.lst.length > 1) {
1950
+ g_eg.append("rect").attr("stroke", "black").attr("stroke-dasharray", eg.ismsg ? "none" : "2,3").attr("fill", "none").attr("width", roww + hpad * 2).attr("height", groupheight).attr("shape-rendering", "crispEdges");
1951
+ if (eg.ismsg) {
1952
+ const g2 = g_eg.append("g").attr("transform", "translate(" + (roww + hpad * 2) + ",0)");
1953
+ g2.append("rect").attr("width", ghandlew).attr("height", rowh).attr("fill", "#858585").attr("shape-rendering", "crispEdges");
1954
+ g2.append("text").text("multi-seg").attr("x", 10).attr("y", rowh / 2).attr("font-size", rowh - 6).attr("font-family", font).attr("fill", "white").attr("dominant-baseline", "middle");
1955
+ g2.append("rect").attr("width", ghandlew).attr("height", rowh).attr("fill", "white").attr("fill-opacity", 0).on("click", (event) => {
1956
+ const joinlst = [];
1957
+ const idlst = [];
1958
+ for (const evt of eg.lst) {
1959
+ const prod = evt.lst[0];
1960
+ idlst.push(prod.prodid);
1961
+ const p2 = {
1962
+ a: {
1963
+ chr: prod.chrA,
1964
+ position: prod.posA,
1965
+ strand: prod.ortA,
1966
+ name: prod.geneA ? prod.geneA : prod.chrA,
1967
+ ratio: prod.ratioA.toFixed(2),
1968
+ feature: prod.featureA,
1969
+ contiglen: prod.matchA,
1970
+ chimericreads: prod.readsA,
1971
+ repeatscore: prod.repeatA
1972
+ },
1973
+ b: {
1974
+ chr: prod.chrB,
1975
+ position: prod.posB,
1976
+ strand: prod.ortB,
1977
+ name: prod.geneB ? prod.geneB : prod.chrB,
1978
+ ratio: prod.ratioB.toFixed(2),
1979
+ feature: prod.featureB,
1980
+ contiglen: prod.matchB,
1981
+ chimericreads: prod.readsB,
1982
+ repeatscore: prod.repeatB
1983
+ },
1984
+ rating: prod.rating,
1985
+ score: Math.ceil(prod.score)
1986
+ };
1987
+ if (prod.usepair) {
1988
+ p2.inframe = prod.usepair.inframe;
1989
+ const x = prod.usepair.a;
1990
+ p2.a.gm = this.genome.isoformmatch(x.isoform, p2.a.chr, p2.a.position);
1991
+ p2.a.codon = x.codon;
1992
+ p2.a.exon = x.exon;
1993
+ p2.a.atupstream = x.atupstream;
1994
+ p2.a.atdownstream = x.atdownstream;
1995
+ p2.a.atutr5 = x.atutr5;
1996
+ p2.a.atutr3 = x.atutr3;
1997
+ const y2 = prod.usepair.b;
1998
+ p2.b.gm = this.genome.isoformmatch(y2.isoform, p2.b.chr, p2.b.position);
1999
+ p2.b.codon = y2.codon;
2000
+ p2.b.exon = y2.exon;
2001
+ p2.b.atupstream = y2.atupstream;
2002
+ p2.b.atdownstream = y2.atdownstream;
2003
+ p2.b.atutr5 = y2.atutr5;
2004
+ p2.b.atutr3 = y2.atutr3;
2005
+ let aalen = 0, bplen2 = 0;
2006
+ if (x.contigaa && y2.contigaa) {
2007
+ aalen = y2.contigaa - x.contigaa - 1;
2008
+ }
2009
+ if (x.contigbp && y2.contigbp) {
2010
+ bplen2 = y2.contigbp - x.contigbp - 1;
2011
+ }
2012
+ if (aalen) {
2013
+ p2.interstitial = { aalen };
2014
+ }
2015
+ if (bplen2) {
2016
+ if (!p2.interstitial) p2.interstitial = {};
2017
+ p2.interstitial.bplen = bplen2;
2018
+ }
2019
+ }
2020
+ joinlst.push(p2);
2021
+ }
2022
+ const p = event.target.getBoundingClientRect();
2023
+ const pane = newpane({ x: p.left + 10, y: p.top + p.height + 10 });
2024
+ const div = pane.body.append("div").style("margin", "10px");
2025
+ div.append("span").style("padding-right", "20px").text("Product id: " + idlst.join(", "));
2026
+ div.append("button").style("margin-right", "10px").text("Break").on("click", () => {
2027
+ const eg2id = eg.lst.map((j) => j.lst[0].prodid);
2028
+ let idx = 0;
2029
+ for (; idx < eglst.length; idx++) {
2030
+ const eg2 = eglst[idx];
2031
+ if (eg2.ismsg) {
2032
+ const eg22id = eg2.lst.map((j) => j.lst[0].prodid);
2033
+ if (eg22id.join(",") == eg2id.join(",")) {
2034
+ break;
2035
+ }
2036
+ }
2037
+ }
2038
+ delete eg.ismsg;
2039
+ const oldlst = eg.lst;
2040
+ eg.lst = [eg.lst[0]];
2041
+ for (let j = 1; j < oldlst.length; j++) {
2042
+ eglst.splice(idx, 0, {
2043
+ label: "",
2044
+ lst: [oldlst[j]]
2045
+ });
2046
+ }
2047
+ svg.remove();
2048
+ this.showevents(sample, eglst, holder);
2049
+ pane.pane.remove();
2050
+ });
2051
+ div.append("button").text("Edit").on("click", (event2) => {
2052
+ const inputdom = document.createElement("input");
2053
+ div.node().insertBefore(inputdom, event2.target);
2054
+ const buttdom = document.createElement("button");
2055
+ div.node().insertBefore(buttdom, event2.target);
2056
+ div.node().removeChild(event2.target);
2057
+ inputdom.focus();
2058
+ const input = select_default(inputdom);
2059
+ const butt = select_default(buttdom);
2060
+ input.attr("size", 10).style("margin", "0px 10px").property("value", idlst.join(","));
2061
+ butt.text("Apply").on("click", () => {
2062
+ const lst0 = inputdom.value.trim().split(",");
2063
+ const goodid = [];
2064
+ for (const s of lst0) {
2065
+ if (!s) continue;
2066
+ const j = Number.parseInt(s);
2067
+ if (Number.isNaN(j)) return alert("invalid id: " + s);
2068
+ if (this.prodidisinvalid(j, sample)) return alert("invalid id " + j);
2069
+ goodid.push(j);
2070
+ }
2071
+ if (goodid.length <= 1) return alert("must be at least 2 products");
2072
+ const newevtlst = [];
2073
+ for (const id of goodid) {
2074
+ const lookprod = this.extractprod(id, sample);
2075
+ if (lookprod) {
2076
+ newevtlst.push({ label: lookprod.eventlabel, lst: [lookprod] });
2077
+ } else {
2078
+ return alert("unknown product id " + id);
2079
+ }
2080
+ }
2081
+ if (newevtlst.length <= 1) return alert("less than 2 products cannot make a group");
2082
+ eglst.unshift({ lst: newevtlst, ismsg: true });
2083
+ this.showsample(sample);
2084
+ pane.pane.remove();
2085
+ });
2086
+ });
2087
+ svtable({
2088
+ samplelst: [
2089
+ {
2090
+ pairlst: joinlst
2091
+ }
2092
+ ],
2093
+ nosample: true,
2094
+ holder: pane.body
2095
+ });
2096
+ const par = {
2097
+ pairlst: joinlst,
2098
+ genome: this.genome,
2099
+ holder: pane.body,
2100
+ hostURL: this.hostURL,
2101
+ jwt: this.jwt
2102
+ };
2103
+ import("./svgraph-WFEY4ZIZ.js").then((p2) => {
2104
+ p2.default(par);
2105
+ });
2106
+ });
2107
+ }
2108
+ }
2109
+ const g_rows = g_eg.append("g").attr("transform", "translate(" + hpad + "," + (eg.lst.length > 1 ? vpad : 0) + ")");
2110
+ let y1 = 0;
2111
+ let evtid = 0;
2112
+ const bgcolor = "#ededed";
2113
+ const elabhash = {};
2114
+ for (const e of eg.lst) {
2115
+ elabhash[e.label] = 1;
2116
+ }
2117
+ const showngenenotip = {};
2118
+ for (const evt of eg.lst) {
2119
+ const prodlst = evt.lst;
2120
+ const prod = prodlst[0];
2121
+ const thispair = prod.usepair;
2122
+ if (eg.lst.length > 1 && evtid > 0) {
2123
+ const g_row2 = g_rows.append("g").attr("transform", "translate(" + (chrAw + s1 + rowh + s7 + geneAw + genesp + s2 / 2) + "," + y1 + ")");
2124
+ const text2 = g_row2.append("text").attr("fill", "#858585").attr("font-size", rowh2).attr("text-anchor", "middle").attr("font-family", font).attr("y", rowh2 / 2).attr("dominant-baseline", "middle");
2125
+ if (eg.ismsg) {
2126
+ text2.text(prod.mswhat ? prod.mswhat : "No connection detail");
2127
+ } else {
2128
+ text2.text("Reciprocal");
2129
+ }
2130
+ y1 += rowh2 + rows;
2131
+ }
2132
+ const textcolor = prod.chrA == prod.chrB ? "black" : colorctx;
2133
+ const g_row = g_rows.append("g").attr("transform", "translate(0," + y1 + ")");
2134
+ g_row.append("text").text(prod.chrA).attr("x", chrAw).attr("y", rowh / 2).attr("font-size", fontsize - 4).attr("text-anchor", "end").attr("dominant-baseline", "middle").attr("fill", textcolor);
2135
+ const extevt = { a: null, b: null };
2136
+ if (prod.geneA) {
2137
+ if (prod.geneA in showngenenotip) {
2138
+ showngenenotip[prod.geneA] = 1;
2139
+ } else {
2140
+ const lst = [];
2141
+ for (const elab in sample.gene2events[prod.geneA]) {
2142
+ if (!(elab in elabhash)) {
2143
+ lst.push(elab);
2144
+ }
2145
+ }
2146
+ if (lst.length > 0) {
2147
+ extevt.a = { lst };
2148
+ extevt.a.circle = g_row.append("circle").attr("fill", "white").attr("stroke", "black").attr("cx", chrAw + s1 + rowh / 2).attr("cy", rowh / 2).attr("r", rowh / 2);
2149
+ if (lst.length > 1) {
2150
+ extevt.a.text = g_row.append("text").text(lst.length).attr("x", chrAw + s1 + rowh / 2).attr("y", rowh / 2).attr("text-anchor", "middle").attr("font-size", rowh2).attr("dominant-baseline", "middle").attr("fill", "black");
2151
+ }
2152
+ g_row.append("line").attr("x1", chrAw + s1 + rowh).attr("x2", chrAw + s1 + rowh + s7).attr("y1", rowh / 2).attr("y2", rowh / 2).attr("stroke", "black").attr("shape-rendering", "crispEdges");
2153
+ }
2154
+ }
2155
+ }
2156
+ g_row.append("rect").attr("fill", colorbgleft).attr("x", chrAw + s1 + rowh + s7 + (geneAw + genesp) * (1 - prod.ratioA)).attr("width", (geneAw + genesp) * prod.ratioA).attr("height", rowh).attr("shape-rendering", "crispEdges");
2157
+ let antisense = false;
2158
+ if (thispair) {
2159
+ const thisn = thispair.a.isoform;
2160
+ if (thisn) {
2161
+ const _gm = this.genome.isoformmatch(thisn, prod.chrA, prod.posA);
2162
+ if (_gm && _gm.strand != prod.ortA) {
2163
+ antisense = true;
2164
+ }
2165
+ }
2166
+ }
2167
+ const boxa = g_row.append("rect").attr("fill", "none").attr("stroke", antisense ? "red" : "black").attr("shape-rendering", "crispEdges").attr("x", chrAw + s1 + rowh + s7).attr("width", geneAw + genesp).attr("height", rowh);
2168
+ let labA;
2169
+ if (prod.geneA) {
2170
+ const t = prod.geneA.split(",");
2171
+ if (t.length > 2) {
2172
+ labA = t[0] + "," + t[1] + "...";
2173
+ } else {
2174
+ labA = prod.geneA;
2175
+ }
2176
+ } else {
2177
+ labA = "";
2178
+ }
2179
+ g_row.append("text").text(labA).attr("x", chrAw + s1 + rowh + s7 + geneAw).attr("y", rowh / 2).attr("font-size", fontsize).attr("font-family", "Courier").attr(
2180
+ "font-weight",
2181
+ prod.hlgene ? prod.hlgene == 1 || prod.hlgene == 3 || prod.hlgene == 4 ? "bold" : "normal" : "normal"
2182
+ ).attr("fill", prod.hlgene ? prod.hlgene == 4 ? knownprod_c : "#545454" : "#545454").attr("text-anchor", "end").attr("dominant-baseline", "central");
2183
+ g_row.append("line").attr("x1", chrAw + s1 + rowh + s7 + geneAw + genesp).attr("x2", chrAw + s1 + rowh + s7 + geneAw + genesp + s2).attr("y1", rowh / 2).attr("y2", rowh / 2).attr("shape-rendering", "crispEdges").attr("stroke", "black");
2184
+ g_row.append("rect").attr("fill", colorbgright).attr("x", chrAw + s1 + rowh + s7 + geneAw + genesp + s2).attr("width", (genesp + geneBw) * prod.ratioB).attr("height", rowh).attr("shape-rendering", "crispEdges");
2185
+ antisense = false;
2186
+ if (thispair) {
2187
+ const thisn = thispair.b.isoform;
2188
+ if (thisn) {
2189
+ const _gm = this.genome.isoformmatch(thisn, prod.chrB, prod.posB);
2190
+ if (_gm && _gm.strand != prod.ortB) {
2191
+ antisense = true;
2192
+ }
2193
+ }
2194
+ }
2195
+ const boxb = g_row.append("rect").attr("fill", "none").attr("stroke", antisense ? "red" : "black").attr("shape-rendering", "crispEdges").attr("x", chrAw + s1 + rowh + s7 + geneAw + genesp + s2).attr("width", geneBw + genesp).attr("height", rowh);
2196
+ let labB;
2197
+ if (prod.geneB) {
2198
+ let t = prod.geneB.split(",");
2199
+ if (t.length > 2) {
2200
+ labB = t[0] + "," + t[1] + "...";
2201
+ } else {
2202
+ labB = prod.geneB;
2203
+ }
2204
+ } else {
2205
+ labB = "";
2206
+ }
2207
+ g_row.append("text").text(labB).attr("x", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp).attr("y", rowh / 2).attr("font-size", fontsize).attr("font-family", "Courier").attr(
2208
+ "font-weight",
2209
+ prod.hlgene ? prod.hlgene == 2 || prod.hlgene == 3 || prod.hlgene == 4 ? "bold" : "normal" : "normal"
2210
+ ).attr("fill", prod.hlgene ? prod.hlgene == 4 ? knownprod_c : "#545454" : "#545454").attr("dominant-baseline", "central");
2211
+ if (prod.geneB) {
2212
+ if (prod.geneB in showngenenotip) {
2213
+ } else {
2214
+ showngenenotip[prod.geneB] = 1;
2215
+ const lst = [];
2216
+ for (const elab in sample.gene2events[prod.geneB]) {
2217
+ if (!(elab in elabhash)) {
2218
+ lst.push(elab);
2219
+ }
2220
+ }
2221
+ if (lst.length > 0) {
2222
+ extevt.b = { lst };
2223
+ extevt.b.circle = g_row.append("circle").attr("fill", "white").attr("stroke", "black").attr("cx", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh / 2).attr("cy", rowh / 2).attr("r", rowh / 2);
2224
+ if (lst.length > 1) {
2225
+ extevt.b.text = g_row.append("text").text(lst.length).attr("x", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh / 2).attr("y", rowh / 2).attr("text-anchor", "middle").attr("font-size", rowh2).attr("dominant-baseline", "middle").attr("fill", "black");
2226
+ }
2227
+ g_row.append("line").attr("x1", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw).attr("x2", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7).attr("y1", rowh / 2).attr("y2", rowh / 2).attr("stroke", "black").attr("shape-rendering", "crispEdges");
2228
+ }
2229
+ }
2230
+ }
2231
+ g_row.append("text").text(prod.chrB).attr("x", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1).attr("y", rowh / 2).attr("font-size", fontsize - 4).attr("dominant-baseline", "middle").attr("fill", textcolor);
2232
+ let x = chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1 + chrBw + s3;
2233
+ const x0 = x;
2234
+ const logobg = g_row.append("rect").attr("fill", "white").attr("stroke", "#858585").attr("x", x).attr("y", -1.5).attr("width", evt.svg.logow).attr("height", rowh + 2).attr("rx", 5).attr("ry", 5);
2235
+ x += s5;
2236
+ prod.hook.mainRating = g_row.append("text").text(prod.rating).attr("font-size", fontsize).attr("font-family", font).attr("fill", "#858585").attr("x", x).attr("y", rowh / 2).attr("dominant-baseline", "middle");
2237
+ x += evt.svg.ratingw + s5;
2238
+ prod.hook.mainFrame = {};
2239
+ prod.hook.mainFrame.bg = g_row.append("rect").attr("x", x + 1).attr("y", 3).attr("width", evt.svg.framew).attr("height", rowh - 7).attr("shape-rendering", "crispEdges");
2240
+ if (prod.usepair) {
2241
+ prod.hook.mainFrame.bg.attr("fill", prod.usepair.inframe ? colorinframe : coloroutframe);
2242
+ } else {
2243
+ prod.hook.mainFrame.bg.attr("fill", "none").attr("stroke", "black");
2244
+ }
2245
+ prod.hook.mainFrame.text = g_row.append("text").text(evt.svg.frameword).attr("font-size", fontsizeframe).attr("font-family", font).attr("fill", prod.usepair ? "white" : "black").attr("x", x + 1 + evt.svg.framew / 2).attr("text-anchor", "middle").attr("y", rowh / 2).attr("dominant-baseline", "middle");
2246
+ x += evt.svg.framew + s5;
2247
+ prod.hook.mainType = g_row.append("text").text(prod.type2).attr("font-size", fontsize).attr("font-family", font).attr("fill", "#858585").attr("x", x).attr("y", rowh / 2).attr("dominant-baseline", "middle");
2248
+ x += evt.svg.typew + s5;
2249
+ g_row.append("text").text(prod.featureA).attr("font-size", fontsizefeature).attr("font-family", font).attr("fill", "black").attr("x", x).attr("y", rowh / 4).attr("dominant-baseline", "middle");
2250
+ g_row.append("text").text(prod.featureB).attr("font-size", fontsizefeature).attr("font-family", font).attr("fill", "black").attr("x", x).attr("y", rowh * 3 / 4).attr("dominant-baseline", "middle");
2251
+ x += evt.svg.featurew + s5;
2252
+ g_row.append("text").text(Math.floor(prod.score)).attr("font-size", fontsize).attr("font-family", font).attr("fill", "#858585").attr("x", x).attr("y", rowh / 2).attr("dominant-baseline", "middle");
2253
+ x += evt.svg.scorew + s5 + s4;
2254
+ g_row.append("rect").attr("fill", "white").attr("fill-opacity", 0).attr("stroke", "none").attr("x", x0).attr("y", -1.5).attr("width", evt.svg.logow).attr("height", rowh + 2).on("mouseover", () => {
2255
+ logobg.attr("stroke-width", "2");
2256
+ const d = tip.clear().showunder(logobg.node()).d.append("div");
2257
+ this.prodstat(prod, d);
2258
+ }).on("mouseout", () => {
2259
+ logobg.attr("stroke-width", "1");
2260
+ tip.hide();
2261
+ });
2262
+ if (prodlst.length > 1) {
2263
+ const logobg2 = g_row.append("rect").attr("fill", "none").attr("stroke", "#858585").attr("x", x).attr("y", 3.5).attr("width", etw).attr("height", rowh - 4).attr("rx", 5).attr("ry", 5);
2264
+ g_row.append("text").text(prodlst.length - 1).attr("fill", "black").attr("font-size", fontsizefeature).attr("font-family", font).attr("x", x + etw / 2).attr("y", 3.5 + (rowh - 3.5) / 2).attr("text-anchor", "middle").attr("dominant-baseline", "middle");
2265
+ g_row.append("rect").attr("fill", "white").attr("fill-opacity", 0).attr("x", x).attr("y", 3.5).attr("width", etw).attr("height", rowh - 4).on("mouseover", (event) => {
2266
+ logobg2.attr("stroke-width", "2");
2267
+ const table = tip.clear().showunder(event.target).d.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2268
+ const tr1 = table.append("tr");
2269
+ const tr2 = table.append("tr");
2270
+ for (var k = 1; k < prodlst.length; k++) {
2271
+ this.eventlogo([prodlst[k]], tr1.append("td"));
2272
+ this.prodstat(prodlst[k], tr2.append("td"));
2273
+ }
2274
+ }).on("mouseout", () => {
2275
+ logobg2.attr("stroke-width", "1");
2276
+ tip.hide();
2277
+ });
2278
+ }
2279
+ x = chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1 + chrBw + s3 + eventlogow + s6;
2280
+ const text = g_row.append("text").text(evt.svg.recurtext).attr("font-size", fontsize - 4).attr("font-family", font).attr("fill", evt.svg.recurtextcolor).attr("x", x).attr("y", rowh / 2).attr("dominant-baseline", "middle");
2281
+ if (evt.svg.hasrecurrence) {
2282
+ text.attr("class", "sja_svgtext2").on("mouseover", (event) => {
2283
+ const p = event.target.getBoundingClientRect();
2284
+ tip.clear().show(p.left + p.width + 10, p.top - 15);
2285
+ const slst = this.elab2sample[evt.label];
2286
+ const dd = tip.d;
2287
+ dd.append("div").style("margin", "10px").style("color", "#aaa").text("This fusion is recurrent in other samples:");
2288
+ const table = dd.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2289
+ for (const s of slst) {
2290
+ if (s.name == sample.name) {
2291
+ continue;
2292
+ }
2293
+ const tr = table.append("tr");
2294
+ tr.append("td").style("font-weight", "bold").style("color", "#858585").text(s.name);
2295
+ this.eventlogo(s.events[evt.label], tr.append("td"));
2296
+ }
2297
+ }).on("mouseout", () => tip.hide());
2298
+ }
2299
+ g_row.append("rect").attr("x", chrAw + s1 + rowh + s7).attr("width", geneAw + genesp + s2 + genesp + geneBw).attr("height", rowh).attr("fill", "white").attr("fill-opacity", 0).on("mouseover", (event) => {
2300
+ boxa.attr("stroke-width", 2);
2301
+ boxb.attr("stroke-width", 2);
2302
+ const p = event.target.getBoundingClientRect();
2303
+ tip.clear().show(p.left + p.width + s7 / 2, p.top - 30);
2304
+ this.showsvpairs({
2305
+ prodlst: evt.lst,
2306
+ holder: tip.d,
2307
+ nodetail: true,
2308
+ sample,
2309
+ eglst,
2310
+ showothersample: true
2311
+ });
2312
+ }).on("mouseout", () => {
2313
+ tip.hide();
2314
+ boxa.attr("stroke-width", 1);
2315
+ boxb.attr("stroke-width", 1);
2316
+ }).on("click", (event) => {
2317
+ if (evt.inclick) {
2318
+ return;
2319
+ }
2320
+ evt.inclick = true;
2321
+ const p = event.target.getBoundingClientRect();
2322
+ const pane3 = newpane({
2323
+ x: p.left + p.width + s7 + rowh + s1 + chrBw + s3 + eventlogow + s6 + recurw + 5,
2324
+ y: p.top - 100,
2325
+ close: function() {
2326
+ evt.inclick = false;
2327
+ pane3.pane.remove();
2328
+ }
2329
+ });
2330
+ const prod2 = evt.lst[0];
2331
+ pane3.header.html(
2332
+ '<span style="padding:2px 4px;background-color:' + colorbgleft + ';">' + (prod2.geneA ? prod2.geneA : prod2.chrA) + '</span><span style="padding:2px 4px;background-color:' + colorbgright + ';">' + (prod2.geneB ? prod2.geneB : prod2.chrB) + "</span>"
2333
+ );
2334
+ this.showsvpairs({
2335
+ prodlst: evt.lst,
2336
+ holder: pane3.body
2337
+ });
2338
+ });
2339
+ if (extevt.a) {
2340
+ g_row.append("circle").attr("cx", chrAw + s1 + rowh / 2).attr("cy", rowh / 2).attr("r", rowh / 2).attr("fill", "white").attr("fill-opacity", 0).on("mouseover", (event) => this.extevt_mover(extevt.a, event.target, sample)).on("mouseout", () => {
2341
+ this.extevt_mo(extevt.a);
2342
+ tip.hide();
2343
+ }).on("click", (event) => {
2344
+ this.extevt_c(extevt.a, event.target, sample);
2345
+ });
2346
+ }
2347
+ if (extevt.b) {
2348
+ g_row.append("circle").attr("cx", chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh / 2).attr("cy", rowh / 2).attr("r", rowh / 2).attr("fill", "white").attr("fill-opacity", 0).on("mouseover", (event) => this.extevt_mover(extevt.b, event.target, sample)).on("mouseout", () => {
2349
+ this.extevt_mo(extevt.b);
2350
+ tip.hide();
2351
+ }).on("click", (event) => this.extevt_c(extevt.b, event.target, sample));
2352
+ }
2353
+ y1 += rowh + rows;
2354
+ evtid++;
2355
+ }
2356
+ y += groupheight + (eg.lst.length > 1 ? gvpad : 0);
2357
+ }
2358
+ holder.style("display", "none");
2359
+ }
2360
+ extevt_mover(ext, dom, sample) {
2361
+ ext.circle.attr("fill", "#858585");
2362
+ if (ext.text) {
2363
+ ext.text.attr("fill", "white");
2364
+ }
2365
+ tip.clear().showunder(dom);
2366
+ tip.d.append("div").style("margin", "10px").style("color", "#aaa").text("Associated fusions from this sample:");
2367
+ this.extevt_table(ext.lst, tip.d, sample);
2368
+ }
2369
+ extevt_mo(ext) {
2370
+ ext.circle.attr("fill", "white");
2371
+ if (ext.text) {
2372
+ ext.text.attr("fill", "black");
2373
+ }
2374
+ }
2375
+ extevt_c(ext, dom, sample) {
2376
+ const p = dom.getBoundingClientRect();
2377
+ const pane = newpane({ x: p.left, y: p.top + p.height + 10 });
2378
+ this.extevt_table(ext.lst, pane.body, sample);
2379
+ }
2380
+ extevt_table(lst, holder, sample) {
2381
+ const table = holder.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2382
+ for (const elab of lst) {
2383
+ const tr = table.append("tr");
2384
+ const prodlst = sample.events[elab];
2385
+ if (!prodlst) {
2386
+ tr.append('<td colspan=2 style="color:red">No products found for ' + elab + "</td>");
2387
+ continue;
2388
+ }
2389
+ const prod = prodlst[0];
2390
+ tr.append("td").style("text-align", "right").text(prod.geneA ? prod.geneA : prod.chrA);
2391
+ tr.append("td").text(prod.geneB ? prod.geneB : prod.chrB);
2392
+ this.eventlogo(prodlst, tr.append("td"));
2393
+ }
2394
+ }
2395
+ eventlogo(prodlst, holder) {
2396
+ const d = holder.append("div");
2397
+ if (!prodlst || prodlst.length == 0) {
2398
+ d.style("color", "red").text("No products");
2399
+ } else {
2400
+ const p = prodlst[0];
2401
+ d.append("div").style("display", "inline-block").style("padding", "2px 4px").style("border", "solid 1px #858585").style("border-radius", "5px").html(
2402
+ p.rating + '&nbsp;<span style="font-size:70%;vertical-align:2px;' + (p.usepair ? p.usepair.inframe ? "padding:2px 4px;background-color:" + colorinframe + ';color:white;">IN' : "padding:2px 4px;background-color:" + coloroutframe + ';color:white;">O' : 'padding:1px 3px;border:solid 1px black;background-color:white;color:black;">?') + '</span>&nbsp;<span style="color:#858585">' + p.type2 + '</span>&nbsp;<div style="display:inline-block;font-size:70%;line-height:.9">' + p.featureA + "<br>" + p.featureB + "</div>&nbsp;" + Math.floor(p.score)
2403
+ );
2404
+ if (prodlst.length > 1) {
2405
+ d.append("div").style("display", "inline-block").style("margin-left", "10px").style("padding", "2px 4px").style("font-size", ".7em").style("border", "solid 1px #858585").style("border-radius", 5).text(prodlst.length - 1);
2406
+ }
2407
+ }
2408
+ return d;
2409
+ }
2410
+ prodstat(prod, holder) {
2411
+ holder.append("p").text("Product id: " + prod.prodid);
2412
+ const alertcolor = "#FFb3b3", bg = "#f1f1f1";
2413
+ const table = holder.append("table").style("border-spacing", "8px").style("border-collapse", "separate");
2414
+ let tr = table.append("tr");
2415
+ tr.append("td");
2416
+ tr.append("td").style("background-color", bg).text(prod.geneA ? prod.geneA : prod.chrA);
2417
+ tr.append("td").style("background-color", bg).text(prod.geneB ? prod.geneB : prod.chrB);
2418
+ tr = table.append("tr");
2419
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("chimeric reads");
2420
+ tr.append("td").style("padding", "5px").style("background-color", prod.readsA <= this.cf_reads ? alertcolor : "").text(prod.readsA);
2421
+ tr.append("td").style("padding", "5px").style("background-color", prod.readsB <= this.cf_reads ? alertcolor : "").text(prod.readsB);
2422
+ tr = table.append("tr");
2423
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("ratio");
2424
+ tr.append("td").style("padding", "5px").style("background-color", prod.ratioA <= this.cf_ratio ? alertcolor : "").text(Math.ceil(prod.ratioA * 100) + "%");
2425
+ tr.append("td").style("padding", "5px").style("background-color", prod.ratioB <= this.cf_ratio ? alertcolor : "").text(Math.ceil(prod.ratioB * 100) + "%");
2426
+ tr = table.append("tr");
2427
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("contig length");
2428
+ tr.append("td").style("padding", "5px").style("background-color", prod.matchA <= this.cf_match ? alertcolor : "").text(prod.matchA + " bp");
2429
+ tr.append("td").style("padding", "5px").style("background-color", prod.matchB <= this.cf_match ? alertcolor : "").text(prod.matchB + " bp");
2430
+ tr = table.append("tr");
2431
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("repeat score");
2432
+ tr.append("td").style("padding", "5px").style("background-color", prod.repeatA >= this.cf_repeat ? alertcolor : "").text(prod.repeatA);
2433
+ tr.append("td").style("padding", "5px").style("background-color", prod.repeatB >= this.cf_repeat ? alertcolor : "").text(prod.repeatB);
2434
+ }
2435
+ showsvpairs(arg) {
2436
+ const table = arg.holder.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2437
+ const tr = table.append("tr");
2438
+ const _tr = table.append("tr");
2439
+ const expressiontd = _tr.append("td").attr("colspan", arg.prodlst.length);
2440
+ const tr2 = table.append("tr");
2441
+ const geneset = /* @__PURE__ */ new Set();
2442
+ for (const prod of arg.prodlst) {
2443
+ if (prod.geneA) {
2444
+ geneset.add(prod.geneA);
2445
+ }
2446
+ if (prod.geneB) {
2447
+ geneset.add(prod.geneB);
2448
+ }
2449
+ const td = tr.append("td").style("vertical-align", "top");
2450
+ if (arg.nodetail) {
2451
+ const div = td.append("div");
2452
+ div.append("span").style("padding-right", "20px").text("Product id: " + prod.prodid);
2453
+ const ratingsl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2454
+ const sl = event.target;
2455
+ const newv = sl.options[sl.selectedIndex].innerHTML;
2456
+ prod.rating = newv;
2457
+ if (prod.hook.mainRating) {
2458
+ prod.hook.mainRating.text(newv);
2459
+ }
2460
+ if (prod.hook.lessRating) {
2461
+ prod.hook.lessRating.text(newv);
2462
+ }
2463
+ });
2464
+ const framesl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2465
+ const sl = event.target;
2466
+ const inframe = sl.options[sl.selectedIndex].innerHTML == "in-frame";
2467
+ prod.usepair.inframe = inframe;
2468
+ if (prod.hook.mainFrame) {
2469
+ prod.hook.mainFrame.text.text(inframe ? "IN" : "O");
2470
+ prod.hook.mainFrame.bg.attr("fill", inframe ? colorinframe : coloroutframe);
2471
+ }
2472
+ if (prod.hook.lessFrame) {
2473
+ prod.hook.lessFrame.html(
2474
+ inframe ? '<span style="background-color:' + colorinframe + ';color:white;padding:2px 3px;font-size:80%;white-space:nowrap">In frame</span>' : '<span style="background-color:' + coloroutframe + ';color:white;padding:2px 3px;font-size:80%;white-space:nowrap">Out of frame</span>'
2475
+ );
2476
+ }
2477
+ });
2478
+ const typesl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2479
+ const sl = event.target;
2480
+ const i = sl.selectedIndex;
2481
+ const newv = sl.options[i].innerHTML;
2482
+ prod.type2 = newv;
2483
+ if (prod.hook.mainType) {
2484
+ prod.hook.mainType.text(newv);
2485
+ }
2486
+ prod.iscloss = i == 0;
2487
+ prod.isnloss = i == 1;
2488
+ prod.isfusion = i == 2;
2489
+ prod.isitd = i == 3;
2490
+ prod.isuptss = i == 4;
2491
+ prod.isother = i == 5;
2492
+ });
2493
+ const effectsl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2494
+ const sl = event.target;
2495
+ const newv = sl.options[sl.selectedIndex].innerHTML;
2496
+ prod.functioneffect = newv;
2497
+ });
2498
+ div.append("button").text("Create group").on("click", (event) => {
2499
+ let dnew = document.createElement("div");
2500
+ div.node().insertBefore(dnew, event.target);
2501
+ select_default(event.target).remove();
2502
+ dnew = select_default(dnew);
2503
+ dnew.style("display", "inline-block");
2504
+ if (!arg.eglst) {
2505
+ dnew.text("Cannot do it here: please go to sample " + arg.sample.name);
2506
+ return;
2507
+ }
2508
+ dnew.append("input").attr("size", 10).property("value", prod.prodid + ",");
2509
+ dnew.append("button").style("margin", "0px 10px").text("Apply").on("click", (event2) => {
2510
+ const lst0 = event2.target.previousSibling.value.trim().split(",");
2511
+ const goodid = [];
2512
+ for (const i of lst0) {
2513
+ const j = Number.parseInt(i);
2514
+ if (Number.isNaN(j)) return alert("invalid id " + i);
2515
+ if (this.prodidisinvalid(j, arg.sample)) return alert("invalid id " + j);
2516
+ goodid.push(j);
2517
+ }
2518
+ if (goodid.length <= 1) return alert("need at least 2 id");
2519
+ const newevtlst = [];
2520
+ for (const i of goodid) {
2521
+ const thisprod = this.extractprod(i, arg.sample);
2522
+ if (thisprod) {
2523
+ newevtlst.push({ label: thisprod.eventlabel, lst: [thisprod] });
2524
+ } else {
2525
+ return alert("invalid id " + i);
2526
+ }
2527
+ }
2528
+ if (newevtlst.length <= 1) return alert("less than 2 products cannot make a group");
2529
+ arg.eglst.unshift({ lst: newevtlst, ismsg: true });
2530
+ this.showsample(arg.sample);
2531
+ tip.hide();
2532
+ });
2533
+ });
2534
+ ratingsl.append("option").text("HQ");
2535
+ ratingsl.append("option").text("LQ");
2536
+ ratingsl.append("option").text("RT");
2537
+ ratingsl.append("option").text("bad");
2538
+ ratingsl.append("option").text("Major");
2539
+ switch (prod.rating) {
2540
+ case "HQ":
2541
+ ratingsl.property("selectedindex", 0);
2542
+ break;
2543
+ case "LQ":
2544
+ ratingsl.property("selectedIndex", 1);
2545
+ break;
2546
+ case "RT":
2547
+ ratingsl.property("selectedIndex", 2);
2548
+ break;
2549
+ case "bad":
2550
+ ratingsl.property("selectedIndex", 3);
2551
+ break;
2552
+ case "Major":
2553
+ ratingsl.property("selectedIndex", 4);
2554
+ break;
2555
+ default:
2556
+ alert("unknown rating: " + prod.rating);
2557
+ }
2558
+ framesl.append("option").text("in-frame");
2559
+ framesl.append("option").text("out-of-frame");
2560
+ if (!prod.usepair) {
2561
+ framesl.attr("disabled", 1);
2562
+ } else {
2563
+ framesl.property("selectedIndex", prod.usepair.inframe ? 0 : 1);
2564
+ }
2565
+ typesl.append("option").text("CLoss");
2566
+ typesl.append("option").text("NLoss");
2567
+ typesl.append("option").text("Fusion");
2568
+ typesl.append("option").text("ITD");
2569
+ typesl.append("option").text("upTSS");
2570
+ typesl.append("option").text("other");
2571
+ if (prod.iscloss) {
2572
+ typesl.property("selectedIndex", 0);
2573
+ } else if (prod.isnloss) {
2574
+ typesl.property("selectedIndex", 1);
2575
+ } else if (prod.isfusion) {
2576
+ typesl.property("selectedIndex", 2);
2577
+ } else if (prod.isitd) {
2578
+ typesl.property("selectedIndex", 3);
2579
+ } else if (prod.isuptss) {
2580
+ typesl.property("selectedIndex", 4);
2581
+ } else if (prod.isother) {
2582
+ typesl.property("selectedIndex", 5);
2583
+ } else {
2584
+ alert("unknown type2: " + prod.type2);
2585
+ }
2586
+ effectsl.append("option").text("unknown effect");
2587
+ effectsl.append("option").text("fusion gene");
2588
+ effectsl.append("option").text("truncation, activated oncogene");
2589
+ effectsl.append("option").text("truncation, loss-of-function");
2590
+ effectsl.append("option").text("truncation, no consequence");
2591
+ effectsl.append("option").text("ITD");
2592
+ switch (prod.functioneffect) {
2593
+ case void 0:
2594
+ effectsl.property("selectedIndex", 0);
2595
+ break;
2596
+ case "fusion gene":
2597
+ effectsl.property("selectedIndex", 1);
2598
+ break;
2599
+ case "truncation, activated oncogene":
2600
+ effectsl.property("selectedIndex", 2);
2601
+ break;
2602
+ case "truncation, loss-of-function":
2603
+ effectsl.property("selectedIndex", 3);
2604
+ break;
2605
+ case "truncation, no consequence":
2606
+ effectsl.property("selectedIndex", 4);
2607
+ break;
2608
+ case "ITD":
2609
+ effectsl.property("selectedIndex", 5);
2610
+ break;
2611
+ }
2612
+ }
2613
+ const p = {
2614
+ a: {
2615
+ chr: prod.chrA,
2616
+ position: prod.posA,
2617
+ strand: prod.ortA,
2618
+ name: prod.geneA ? prod.geneA : prod.chrA,
2619
+ ratio: prod.ratioA.toFixed(2),
2620
+ feature: prod.featureA,
2621
+ contiglen: prod.matchA,
2622
+ chimericreads: prod.readsA,
2623
+ repeatscore: prod.repeatA
2624
+ },
2625
+ b: {
2626
+ chr: prod.chrB,
2627
+ position: prod.posB,
2628
+ strand: prod.ortB,
2629
+ name: prod.geneB ? prod.geneB : prod.chrB,
2630
+ ratio: prod.ratioB.toFixed(2),
2631
+ feature: prod.featureB,
2632
+ contiglen: prod.matchB,
2633
+ chimericreads: prod.readsB,
2634
+ repeatscore: prod.repeatB
2635
+ },
2636
+ rating: prod.rating,
2637
+ score: Math.ceil(prod.score),
2638
+ originalprod: prod
2639
+ };
2640
+ if (prod.usepair) {
2641
+ p.inframe = prod.usepair.inframe;
2642
+ const x = prod.usepair.a;
2643
+ p.a.gm = this.genome.isoformmatch(x.isoform, prod.chrA, prod.posA);
2644
+ p.a.codon = x.codon;
2645
+ p.a.exon = x.exon;
2646
+ p.a.atupstream = x.atupstream;
2647
+ p.a.atdownstream = x.atdownstream;
2648
+ p.a.atutr5 = x.atutr5;
2649
+ p.a.atutr3 = x.atutr3;
2650
+ const y = prod.usepair.b;
2651
+ p.b.gm = this.genome.isoformmatch(y.isoform, prod.chrB, prod.posB);
2652
+ p.b.codon = y.codon;
2653
+ p.b.exon = y.exon;
2654
+ p.b.atupstream = y.atupstream;
2655
+ p.b.atdownstream = y.atdownstream;
2656
+ p.b.atutr5 = y.atutr5;
2657
+ p.b.atutr3 = y.atutr3;
2658
+ let aalen = 0, bplen2 = 0;
2659
+ if (x.contigaa && y.contigaa) {
2660
+ aalen = y.contigaa - x.contigaa - 1;
2661
+ }
2662
+ if (x.contigbp && y.contigbp) {
2663
+ bplen2 = y.contigbp - x.contigbp - 1;
2664
+ }
2665
+ if (aalen) {
2666
+ p.interstitial = { aalen };
2667
+ }
2668
+ if (bplen2) {
2669
+ if (!p.interstitial) p.interstitial = {};
2670
+ p.interstitial.bplen = bplen2;
2671
+ }
2672
+ }
2673
+ svtable({
2674
+ samplelst: [
2675
+ {
2676
+ pairlst: [p]
2677
+ }
2678
+ ],
2679
+ nosample: true,
2680
+ holder: td
2681
+ });
2682
+ const par = {
2683
+ pairlst: [p],
2684
+ genome: this.genome,
2685
+ holder: td,
2686
+ quiet: true,
2687
+ hostURL: this.hostURL,
2688
+ jwt: this.jwt
2689
+ };
2690
+ import("./svgraph-WFEY4ZIZ.js").then((p2) => {
2691
+ p2.default(par);
2692
+ });
2693
+ if (!arg.nodetail) {
2694
+ const td2 = tr2.append("td").style("font-size", ".8em").style("vertical-align", "top");
2695
+ const lst = [];
2696
+ for (const at of this.atlst) {
2697
+ if (!at.custom) continue;
2698
+ const v = prod[at.key];
2699
+ lst.push({
2700
+ k: at.label,
2701
+ v: v == void 0 ? "" : v
2702
+ });
2703
+ }
2704
+ make_table_2col(td2, lst, 25);
2705
+ prod.pairs.sort((a, b) => {
2706
+ if (a.inuse) return -1;
2707
+ if (b.inuse) return 1;
2708
+ return 0;
2709
+ });
2710
+ const table0 = td2.append("table");
2711
+ for (const pair of prod.pairs) {
2712
+ const tr3 = table0.append("tr");
2713
+ tr3.append("td").html(
2714
+ (pair.inframe ? "in-frame" : "out-of-frame") + '<div style="font-size:70%">frame code: ' + pair.frame + "</div>"
2715
+ );
2716
+ const td3 = tr3.append("td");
2717
+ const table2 = td3.append("table").style("margin-bottom", "20px").style("border", pair.inuse ? "solid 1px black" : "").style("border-spacing", "10px").style("border-collapse", "separate");
2718
+ let _tr2 = table2.append("tr").style("color", "#858585").style("font-size", ".7em");
2719
+ _tr2.append("td").text("gene");
2720
+ _tr2.append("td").text("isoform");
2721
+ _tr2.append("td").text("gene position");
2722
+ _tr2.append("td").text("exon");
2723
+ _tr2.append("td").text("anchor");
2724
+ _tr2.append("td").text("contig AA");
2725
+ _tr2.append("td").text("contig bp");
2726
+ const tr1 = table2.append("tr");
2727
+ const tr22 = table2.append("tr");
2728
+ tr1.append("td").text(prod.geneA ? prod.geneA : prod.chrA);
2729
+ tr22.append("td").text(prod.geneB ? prod.geneB : prod.chrB);
2730
+ tr1.append("td").text(pair.a.isoform ? pair.a.isoform : "");
2731
+ tr22.append("td").text(pair.b.isoform ? pair.b.isoform : "");
2732
+ tr1.append("td").text(
2733
+ pair.a.isoform ? pair.a.codon != void 0 ? "codon: " + pair.a.codon : pair.a.atutr5 ? "5' UTR" : pair.a.atutr3 ? "3' UTR" : pair.a.atupstream ? "upstream" : "downstream" : ""
2734
+ );
2735
+ tr22.append("td").text(
2736
+ pair.b.isoform ? pair.b.codon != void 0 ? "codon: " + pair.b.codon : pair.b.atutr5 ? "5' UTR" : pair.b.atutr3 ? "3' UTR" : pair.b.atupstream ? "upstream" : "downstream" : ""
2737
+ );
2738
+ tr1.append("td").text(pair.a.exon ? pair.a.exon : "");
2739
+ tr22.append("td").text(pair.b.exon ? pair.b.exon : "");
2740
+ tr1.append("td").text(pair.a.anchor ? pair.a.anchor : "");
2741
+ tr22.append("td").text(pair.b.anchor ? pair.b.anchor : "");
2742
+ tr1.append("td").html(pair.a.contigaa ? '<span style="color:#858585;font-size:70%">ends at</span> ' + pair.a.contigaa : "?");
2743
+ tr22.append("td").html(
2744
+ pair.b.contigaa ? '<span style="color:#858585;font-size:70%">starts at</span> ' + pair.b.contigaa : "?"
2745
+ );
2746
+ tr1.append("td").html(pair.a.contigbp ? '<span style="color:#858585;font-size:70%">ends at</span> ' + pair.a.contigbp : "?");
2747
+ tr22.append("td").html(
2748
+ pair.b.contigbp ? '<span style="color:#858585;font-size:70%">starts at</span> ' + pair.b.contigbp : "?"
2749
+ );
2750
+ }
2751
+ }
2752
+ }
2753
+ if (!arg.sample) {
2754
+ return;
2755
+ }
2756
+ const thislab = arg.prodlst[0].eventlabel;
2757
+ const samplelst = this.elab2sample[thislab];
2758
+ const othersample = [];
2759
+ if (samplelst) {
2760
+ for (const s of samplelst) {
2761
+ if (s.name != arg.sample.name) othersample.push(s);
2762
+ }
2763
+ }
2764
+ if (arg.showothersample && othersample.length > 0) {
2765
+ arg.holder.append("button").style("display", "block").style("margin", "20px").text("Show in " + othersample.length + " other sample" + (othersample.length > 1 ? "s" : "")).on("click", (event) => {
2766
+ select_default(event.target).remove();
2767
+ for (const sample of othersample) {
2768
+ const prodlst = sample.events[thislab];
2769
+ if (!prodlst) {
2770
+ arg.holder.append("div").style("margin", "20px").style("color", "red").text("Error: no products for this event in " + sample.name);
2771
+ continue;
2772
+ }
2773
+ const table2 = arg.holder.append("table").style("margin-top", "20px").style("border", "solid 1px #ccc");
2774
+ const tr3 = table2.append("tr");
2775
+ tr3.append("td").text(sample.name);
2776
+ const td = tr3.append("td");
2777
+ this.showsvpairs({
2778
+ prodlst,
2779
+ holder: td,
2780
+ nodetail: true,
2781
+ sample,
2782
+ // FIXME: eglst info is hidden somewhere in sample.egglst
2783
+ eglst: null
2784
+ });
2785
+ }
2786
+ });
2787
+ }
2788
+ if (this.expression.genes && geneset.size > 0) {
2789
+ const table2 = expressiontd.append("table");
2790
+ const tr3 = table2.append("tr");
2791
+ for (const gene of geneset) {
2792
+ const expd = this.expression.genes[gene];
2793
+ if (expd) {
2794
+ const div = tr3.append("td").style("vertical-align", "top").append("div").style("display", "inline-block").style("margin-right", "20px").style("border", "solid 1px #ccc");
2795
+ div.append("div").style("background-color", "#ededed").style("padding", "10px").text(gene);
2796
+ if (arg.sample) {
2797
+ for (const v of expd) {
2798
+ if (v.sample == arg.sample.name) {
2799
+ v.ishighlight = true;
2800
+ div.append("div").style("padding", "10px").style("font-size", "70%").html("Expression in " + arg.sample.name + ': <span style="font-size:150%">' + v.value + "</span>");
2801
+ } else {
2802
+ v.ishighlight = false;
2803
+ }
2804
+ }
2805
+ }
2806
+ showgenevalues({
2807
+ data: this.expression.genes[gene],
2808
+ holder: div.append("div").style("margin", "10px"),
2809
+ width: 200,
2810
+ height: 200,
2811
+ namename: "sample"
2812
+ });
2813
+ } else {
2814
+ tr3.append("td").style("vertical-align", "top").text("No expression data for " + gene + "</td>");
2815
+ }
2816
+ }
2817
+ }
2818
+ }
2819
+ prodidisinvalid(id, sample) {
2820
+ for (const egg of sample.egglst) {
2821
+ for (const eg of egg.lst) {
2822
+ for (const e of eg.lst) {
2823
+ for (const p of e.lst) {
2824
+ if (p.prodid == id) return false;
2825
+ }
2826
+ }
2827
+ }
2828
+ }
2829
+ return true;
2830
+ }
2831
+ extractprod(id, sample) {
2832
+ let prod = null;
2833
+ for (let n = 0; n < sample.egglst.length; n++) {
2834
+ const _egg = sample.egglst[n];
2835
+ for (let j = 0; j < _egg.lst.length; j++) {
2836
+ const _eg = _egg.lst[j];
2837
+ for (let k = 0; k < _eg.lst.length; k++) {
2838
+ const _evt = _eg.lst[k];
2839
+ for (let p = 0; p < _evt.lst.length; p++) {
2840
+ const p2 = _evt.lst[p];
2841
+ if (p2.prodid == id) {
2842
+ prod = p2;
2843
+ _evt.lst.splice(p, 1);
2844
+ break;
2845
+ }
2846
+ }
2847
+ if (prod) {
2848
+ if (_evt.lst.length == 0) {
2849
+ _eg.lst.splice(k, 1);
2850
+ }
2851
+ break;
2852
+ }
2853
+ }
2854
+ if (prod) {
2855
+ if (_eg.lst.length == 0) {
2856
+ _egg.lst.splice(j, 1);
2857
+ } else {
2858
+ if (_eg.ismsg && _eg.lst.length == 1) {
2859
+ delete _eg.ismsg;
2860
+ }
2861
+ }
2862
+ break;
2863
+ }
2864
+ }
2865
+ if (prod) {
2866
+ if (_egg.lst.length == 0) {
2867
+ sample.egglst.splice(n, 1);
2868
+ }
2869
+ break;
2870
+ }
2871
+ }
2872
+ return prod;
2873
+ }
2874
+ // end of class
2875
+ };
2876
+ function msjoin(prod, newholder) {
2877
+ if (prod.isitd) return;
2878
+ if (prod.sv_ort == "?") return;
2879
+ var single = true;
2880
+ var thispair = prod.usepair;
2881
+ for (var i = 0; i < newholder.length; i++) {
2882
+ var tmplst = newholder[i];
2883
+ var prod2 = tmplst[0];
2884
+ if (prod.chrB == prod2.chrA && prod.ortB == prod2.ortA) {
2885
+ if (testreadcount(prod, prod2)) {
2886
+ var thatpair = prod2.usepair;
2887
+ if (thispair && thatpair && thispair.b.isoform && thispair.b.isoform == thatpair.a.isoform) {
2888
+ var p1 = thispair.b;
2889
+ var p2 = thatpair.a;
2890
+ var ahead = false;
2891
+ if (p1.atutr5) {
2892
+ if (p2.codon != void 0) {
2893
+ ahead = true;
2894
+ prod2.mswhat = "5' UTR to coding region";
2895
+ } else if (p2.atutr3) {
2896
+ ahead = true;
2897
+ prod2.mswhat = "5' UTR to 3' UTR";
2898
+ } else if (p2.atutr5 && p1.atutr5.off < p2.atutr5.off) {
2899
+ ahead = true;
2900
+ prod2.mswhat = p2.atutr5.off - p1.atutr5.off + " bp apart in 5' UTR";
2901
+ }
2902
+ } else if (p1.atutr3) {
2903
+ if (p2.atutr3 && p1.atutr3.off < p2.atutr3.off) {
2904
+ ahead = true;
2905
+ prod2.mswhat = p2.atutr3.off - p1.atutr3.off + " bp apart in 3' UTR";
2906
+ }
2907
+ } else if (p1.codon != void 0) {
2908
+ if (p2.codon != void 0 && p2.codon > p1.codon) {
2909
+ ahead = true;
2910
+ prod2.mswhat = p2.codon - p1.codon + " aa apart in protein";
2911
+ } else if (p2.atutr3) {
2912
+ ahead = true;
2913
+ prod2.mswhat = "coding region to 3' UTR";
2914
+ }
2915
+ }
2916
+ if (ahead) {
2917
+ tmplst.unshift(prod);
2918
+ single = false;
2919
+ break;
2920
+ }
2921
+ }
2922
+ var dst = prod2.posA - prod.posB;
2923
+ if (prod.ortB == "+" && dst > 0 && dst < genomelimit || prod.ortB == "-" && dst < 0 && -dst < genomelimit) {
2924
+ prod2.mswhat = Math.abs(dst) + " bp apart on genome";
2925
+ tmplst.unshift(prod);
2926
+ single = false;
2927
+ break;
2928
+ }
2929
+ }
2930
+ }
2931
+ prod2 = tmplst[tmplst.length - 1];
2932
+ if (prod.chrA == prod2.chrB && prod.ortA == prod2.ortB) {
2933
+ if (testreadcount(prod2, prod)) {
2934
+ var thatpair = prod2.usepair;
2935
+ if (thispair && thatpair && thispair.a.isoform && thispair.a.isoform == thatpair.b.isoform) {
2936
+ var p1 = thatpair.b;
2937
+ var p2 = thispair.a;
2938
+ var behind = false;
2939
+ if (p1.atutr5) {
2940
+ if (p2.codon != void 0) {
2941
+ behind = true;
2942
+ prod.mswhat = "5' UTR to coding region";
2943
+ } else if (p2.atutr3) {
2944
+ behind = true;
2945
+ prod.mswhat = "5' UTR to 3' UTR";
2946
+ } else if (p2.atutr5 && p1.atutr5.off < p2.atutr5.off) {
2947
+ behind = true;
2948
+ prod.mswhat = p2.atutr5.off - p1.atutr5.off + " bp apart in 5' UTR";
2949
+ }
2950
+ } else if (p1.atutr3) {
2951
+ if (p2.atutr3 && p1.atutr3.off < p2.atutr3.off) {
2952
+ behind = true;
2953
+ prod.mswhat = p2.atutr3.off - p1.atutr3.off + " bp apart in 3' UTR";
2954
+ }
2955
+ } else if (p1.codon != void 0) {
2956
+ if (p2.codon != void 0 && p2.codon > p1.codon) {
2957
+ behind = true;
2958
+ prod.mswhat = p2.codon - p1.codon + " aa apart in protein";
2959
+ } else if (p2.atutr3) {
2960
+ behind = true;
2961
+ prod.mswhat = "coding region to 3' UTR";
2962
+ }
2963
+ }
2964
+ if (behind) {
2965
+ tmplst.push(prod);
2966
+ single = false;
2967
+ break;
2968
+ }
2969
+ }
2970
+ var dst = prod.posA - prod2.posB;
2971
+ if (prod.ortA == "+" && dst > 0 && dst < genomelimit && prod.ortA == "-" && dst < 0 && -dst < genomelimit) {
2972
+ prod.mswhat = Math.abs(dst) + " bp apart on genome";
2973
+ tmplst.push(prod);
2974
+ single = false;
2975
+ break;
2976
+ }
2977
+ }
2978
+ }
2979
+ }
2980
+ if (single) {
2981
+ newholder.push([prod]);
2982
+ }
2983
+ function testreadcount(p12, p22) {
2984
+ if (!p12.usepair || !p12.usepair.inframe) return false;
2985
+ if (!p22.usepair || !p22.usepair.inframe) return false;
2986
+ if (p12.readsB == 0 || p22.readsA == 0) return false;
2987
+ var fold = p12.readsB / p22.readsA;
2988
+ return fold >= 0.2 && fold <= 5;
2989
+ }
2990
+ }
2991
+ function svtable(arg) {
2992
+ const table = arg.holder.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2993
+ const htr = table.append("tr").style("font-size", "70%").style("color", "#858585");
2994
+ const fields = [
2995
+ { label: "Feature", hide: true, get: (a) => a.feature },
2996
+ { label: "Ratio", hide: true, get: (a) => Math.ceil(a.ratio * 100) + "%" },
2997
+ { label: "Chimeric<br>reads", hide: true, get: (a) => a.chimericreads },
2998
+ { label: "Contig<br>length", hide: true, get: (a) => a.contiglen },
2999
+ { label: "Repeat<br>score", hide: true, get: (a) => a.repeatscore },
3000
+ { label: "Cicero<br>score", hide: true, atpair: true, get: (a) => a.score },
3001
+ { label: "Cicero<br>rating", israting: true, hide: true, atpair: true, get: (a) => a.rating }
3002
+ ];
3003
+ for (const sample of arg.samplelst) {
3004
+ for (const p of sample.pairlst) {
3005
+ if (p.a.feature || p.b.feature) fields[0].hide = false;
3006
+ if (typeof p.a.ratio == "number" || typeof (p.b.ratio == "number")) fields[1].hide = false;
3007
+ if (typeof p.a.chimericreads == "number" || typeof p.b.chimericreads == "number") fields[2].hide = false;
3008
+ if (typeof p.a.contiglen == "number" || typeof p.b.contiglen == "number") fields[3].hide = false;
3009
+ if (typeof p.a.repeatscore == "number" || typeof p.b.repeatscore == "number") fields[4].hide = false;
3010
+ if (typeof p.score == "number") fields[5].hide = false;
3011
+ if (p.rating) fields[6].hide = false;
3012
+ }
3013
+ }
3014
+ if (!arg.nosample) {
3015
+ htr.append("td");
3016
+ }
3017
+ htr.append("td");
3018
+ htr.append("td");
3019
+ htr.append("td").html("Genomic<br>position");
3020
+ htr.append("td").html("Genomic<br>dist.");
3021
+ for (const f of fields) {
3022
+ if (f.hide) return;
3023
+ htr.append("td").html(f.label);
3024
+ }
3025
+ for (const sample of arg.samplelst) {
3026
+ let tr = table.append("tr");
3027
+ if (!arg.nosample) {
3028
+ const td = tr.append("td").text(sample.sample);
3029
+ if (sample.pairlst.length > 1) {
3030
+ td.attr("rowspan", sample.pairlst.length);
3031
+ }
3032
+ }
3033
+ for (let i = 0; i < sample.pairlst.length; i++) {
3034
+ if (i > 0) {
3035
+ tr = table.append("tr");
3036
+ }
3037
+ const pair = sample.pairlst[i];
3038
+ tr.append("td").style("text-align", "right").html(
3039
+ '<span style="background-color:' + colorbgleft + ';padding:2px 3px;font-size:80%">' + pair.a.name + '</span><span style="background-color:' + colorbgright + ';padding:2px 3px;font-size:80%">' + pair.b.name + "</span>"
3040
+ );
3041
+ const td = tr.append("td");
3042
+ if (pair.originalprod && pair.originalprod.hook.lessFrame) {
3043
+ pair.originalprod.hook.lessFrame = td;
3044
+ }
3045
+ if (pair.inframe) {
3046
+ td.html(
3047
+ '<span style="background-color:' + colorinframe + ';color:white;padding:2px 3px;font-size:80%;white-space:nowrap">In frame</span>'
3048
+ );
3049
+ } else {
3050
+ if (pair.a.gm || pair.b.gm) {
3051
+ td.html(
3052
+ '<span style="background-color:#858585;color:white;padding:2px 3px;font-size:80%;white-space:nowrap">Out of frame</span>'
3053
+ );
3054
+ } else {
3055
+ td.html(
3056
+ '<span style="border:solid 1px #858585;color:#858585;padding:1px 2px;font-size:80%;white-space:nowrap">no gene ?</span>'
3057
+ );
3058
+ }
3059
+ }
3060
+ tr.append("td").html(
3061
+ '<div style="background-color:' + colorbgleft + ';padding:1px 3px;font-size:70%;white-space:nowrap">' + pair.a.chr + ":" + pair.a.position + " " + pair.a.strand + '</div><div style="background-color:' + colorbgright + ';padding:1px 3px;font-size:70%;white-space:nowrap">' + pair.b.chr + ":" + pair.b.position + " " + pair.b.strand + "</div>"
3062
+ );
3063
+ tr.append("td").html(
3064
+ pair.a.chr == pair.b.chr ? bplen(Math.abs(pair.a.position - pair.b.position)) : '<span style="color:' + colorctx + '">CTX</span>'
3065
+ );
3066
+ for (const f of fields) {
3067
+ if (f.hide) continue;
3068
+ const td2 = tr.append("td");
3069
+ if (f.israting && pair.originalprod && pair.originalprod.hook.lessRating) {
3070
+ pair.originalprod.hook.lessRating = td2;
3071
+ }
3072
+ if (f.atpair) {
3073
+ td2.text(f.get(pair));
3074
+ } else {
3075
+ td2.html(
3076
+ '<span style="background-color:' + colorbgleft + ';padding:2px 3px;font-size:80%">' + f.get(pair.a) + '</span><span style="background-color:' + colorbgright + ';padding:2px 3px;font-size:80%">' + f.get(pair.b) + "</span>"
3077
+ );
3078
+ }
3079
+ }
3080
+ }
3081
+ }
3082
+ }
3083
+ function loadexpression(svmr, file) {
3084
+ const genes = {};
3085
+ const ep = svmr.expression;
3086
+ ep.genes = genes;
3087
+ const reader = new FileReader();
3088
+ const chunksize = 4096;
3089
+ let chunks = [];
3090
+ let offset = 0;
3091
+ reader.onloadend = (e) => {
3092
+ if (e.target.readyState != FileReader.DONE) return;
3093
+ const chunk = e.target.result;
3094
+ chunks.push(chunk);
3095
+ const isend = offset >= file.size;
3096
+ process(isend);
3097
+ if (isend) {
3098
+ done();
3099
+ } else {
3100
+ offset += chunksize;
3101
+ ep.presays.text("Reading file: " + Math.ceil(offset / file.size * 100) + "%");
3102
+ reader.readAsText(file.slice(offset, offset + chunksize));
3103
+ }
3104
+ };
3105
+ reader.readAsText(file.slice(0, chunksize));
3106
+ const hg = {}, hs = {};
3107
+ let good = 0, bad = 0;
3108
+ function process(isend) {
3109
+ const lines = chunks.join("").split("\n");
3110
+ for (let i = 0; i < lines.length - 1 - (isend ? 0 : 1); i++) {
3111
+ const l = lines[i].split(" ");
3112
+ if (l.length == 3) {
3113
+ const v = Number.parseFloat(l[1]);
3114
+ if (Number.isNaN(v)) {
3115
+ bad++;
3116
+ } else {
3117
+ good++;
3118
+ hg[l[0]] = 1;
3119
+ hs[l[2]] = 1;
3120
+ if (!(l[0] in genes)) {
3121
+ genes[l[0]] = [];
3122
+ }
3123
+ genes[l[0]].push({
3124
+ sample: l[2],
3125
+ value: v
3126
+ });
3127
+ }
3128
+ } else {
3129
+ bad++;
3130
+ }
3131
+ }
3132
+ if (!isend) {
3133
+ chunks = [lines[lines.length - 1]];
3134
+ }
3135
+ }
3136
+ function done() {
3137
+ let genec = 0;
3138
+ for (const n in hg) genec++;
3139
+ let samplec = 0;
3140
+ for (const n in hs) samplec++;
3141
+ disappear(ep.prediv);
3142
+ appear(ep.afterdiv);
3143
+ ep.afterdiv.selectAll("*").remove();
3144
+ ep.afterdiv.append("div").text(
3145
+ "Expression data loaded for " + genec + " genes, " + samplec + " samples, " + good + " data points" + (bad > 0 ? ", " + bad + " bad lines" : "")
3146
+ );
3147
+ ep.afterdiv.append("button").text("Delete").style("margin", "20px").on("click", () => {
3148
+ delete ep.genes;
3149
+ ep.prediv.node().removeChild(ep.input.node());
3150
+ ep.input = ep.prediv.append("input").attr("type", "file").on("change", (event) => {
3151
+ loadexpression(svmr, event.target.files[0]);
3152
+ });
3153
+ ep.presays.text("");
3154
+ disappear(ep.afterdiv);
3155
+ appear(ep.prediv);
3156
+ });
3157
+ }
3158
+ }
3159
+ function showgenevalues(arg) {
3160
+ const hlcolor = "red";
3161
+ arg.data.sort((a, b) => {
3162
+ return b.value - a.value;
3163
+ });
3164
+ let width = arg.width ? arg.width : 400, height = arg.height ? arg.height : 400;
3165
+ let maxv = 0;
3166
+ for (const v of arg.data) {
3167
+ maxv = Math.max(maxv, v.value);
3168
+ }
3169
+ let dotr;
3170
+ const xscale = linear().domain([0, maxv]);
3171
+ const svg = arg.holder.append("svg");
3172
+ const axisg = svg.append("g");
3173
+ const dotg = svg.append("g");
3174
+ const dotset = dotg.selectAll().data(arg.data).enter().append("g");
3175
+ const dotcir = dotset.append("circle").attr("fill", "white").attr("fill-opacity", 0).attr("stroke", (d) => d.ishighlight ? hlcolor : "black").attr("stroke-opacity", (d) => d.ishighlight ? 0.7 : 0.2).on("mouseover", (event, d) => {
3176
+ event.target.setAttribute("transform", "scale(1.5)");
3177
+ drag.text((d.sample ? d.sample : d.patient + " " + d.sampletype) + " " + d.value).attr("fill", d.ishighlight ? hlcolor : "black");
3178
+ }).on("mouseout", (event, d) => {
3179
+ event.target.setAttribute("transform", "scale(1)");
3180
+ drag.text("drag to resize").attr("fill", "black");
3181
+ });
3182
+ const drag = svg.append("text").text("drag to resize").attr("font-size", 12).attr("class", "sja_svgtext").attr("font-family", font).attr("text-anchor", "end").on("mousedown", (event) => {
3183
+ event.preventDefault();
3184
+ const x0 = event.clientX, y0 = event.clientY, width0 = width, height0 = height;
3185
+ const b = select_default(document.body);
3186
+ b.on("mousemove", () => {
3187
+ width = width0 + event.clientX - x0;
3188
+ height = height0 + event.clientY - y0;
3189
+ sizing();
3190
+ }).on("mouseup", () => {
3191
+ b.on("mousemove", null).on("mouseup", null);
3192
+ });
3193
+ });
3194
+ function sizing() {
3195
+ dotr = Math.max(5, Math.min(width, height) / 40);
3196
+ const fontsize = Math.min(18, Math.max(12, dotr * 2)), ticksize = 5, axish = fontsize + ticksize + 5, axispad = dotr + 5, width2 = dotr * 3;
3197
+ xscale.range([0, width]);
3198
+ svg.attr("width", dotr * 2 + width + width2).attr("height", axish + axispad + height + dotr * 2);
3199
+ axisstyle({
3200
+ axis: axisg.attr("transform", "translate(" + dotr * 2 + "," + axish + ")").call(
3201
+ axisTop().scale(xscale).ticks(Math.min(10, Math.ceil(width / 50)))
3202
+ ),
3203
+ fontsize,
3204
+ color: "black",
3205
+ showline: true
3206
+ });
3207
+ dotg.attr("transform", "translate(" + dotr * 2 + "," + (axish + axispad) + ")");
3208
+ dotset.attr("transform", (d, i) => {
3209
+ return "translate(" + xscale(d.value) + "," + height * i / arg.data.length + ")";
3210
+ });
3211
+ dotcir.attr("r", (d) => {
3212
+ return dotr * (d.ishighlight ? 1.5 : 1);
3213
+ });
3214
+ drag.attr("font-size", fontsize).attr("x", dotr * 2 + width + width2 - 5).attr("y", axish + axispad + height + dotr * 2 - 5);
3215
+ }
3216
+ sizing();
3217
+ return this;
3218
+ }
3219
+
3220
+ // src/svmr.js
3221
+ function svmrparseinput(arg, sayerror2, genome, holder, hostURL, jwt) {
3222
+ if (!arg.dataname) {
3223
+ arg.dataname = "Unnamed dataset";
3224
+ }
3225
+ if (arg.input) {
3226
+ const [e, header, items] = svmrparseraw(arg.input, genome);
3227
+ if (e) {
3228
+ sayerror2("Fusion Editor input error: " + e);
3229
+ return;
3230
+ }
3231
+ svmrlaunch(genome, header, items, arg.dataname, holder, hostURL, jwt);
3232
+ return;
3233
+ }
3234
+ if (!arg.urls) {
3235
+ sayerror2('neither .input:"" or .urls:[] is provided for Fusion Editor');
3236
+ return;
3237
+ }
3238
+ if (!Array.isArray(arg.urls)) {
3239
+ sayerror2("fusioneditor.urls[] should be an array of URL strings");
3240
+ return;
3241
+ }
3242
+ if (arg.urls.length == 0) {
3243
+ sayerror2("fusioneditor.urls[] is empty");
3244
+ return;
3245
+ }
3246
+ const wait = holder.append("div").style("margin", "20px").style("color", "#aaa").style("font-size", "1.5em").text("Loading fusion gene data ...");
3247
+ const tasks = [];
3248
+ arg.urls.forEach((url) => {
3249
+ tasks.push(
3250
+ fetch(
3251
+ new Request(hostURL + "/urltextfile", {
3252
+ method: "POST",
3253
+ body: JSON.stringify({ url, jwt })
3254
+ })
3255
+ ).then((data) => {
3256
+ return data.json();
3257
+ }).then((data) => {
3258
+ if (data.error) throw { message: "Error with " + url + ": " + data.error };
3259
+ return { data: data.text, url };
3260
+ })
3261
+ );
3262
+ });
3263
+ Promise.all(tasks).then((data) => {
3264
+ wait.remove();
3265
+ if (data.length == 0) {
3266
+ sayerror2("No data retrieved from fusioneditor.urls");
3267
+ return;
3268
+ }
3269
+ const [e, header, items] = svmrparseraw(data[0].data, genome);
3270
+ if (e) {
3271
+ sayerror2("Error parsing fusion gene data in file " + data[0].url);
3272
+ return;
3273
+ }
3274
+ for (let i = 1; i < data.length; i++) {
3275
+ const [e2, header2, items2] = svmrparseraw(data[i].data, genome);
3276
+ if (e2) {
3277
+ sayerror2("Error parsing fusion gene data in file " + data[i].url);
3278
+ return;
3279
+ }
3280
+ for (const j of items2) {
3281
+ items.push(j);
3282
+ }
3283
+ for (const h of header2) {
3284
+ let notfound = true;
3285
+ for (const h2 of header) {
3286
+ if (h2.key == h.key) {
3287
+ notfound = false;
3288
+ break;
3289
+ }
3290
+ }
3291
+ if (notfound) {
3292
+ header.push(h);
3293
+ }
3294
+ }
3295
+ }
3296
+ if (items.length == 0) {
3297
+ sayerror2("No fusion genes parsed from fusioneditor");
3298
+ return;
3299
+ }
3300
+ svmrlaunch(genome, header, items, arg.dataname, holder, hostURL, jwt);
3301
+ }).catch((err) => {
3302
+ wait.remove();
3303
+ sayerror2(err.message);
3304
+ if (err.stack) console.log(err.stack);
3305
+ });
3306
+ }
3307
+ function svmrui(dlst, genomes, hostURL, jwt) {
3308
+ const [pane, inputdiv, gselect, filediv, saydiv, visualdiv] = dlst;
3309
+ inputdiv.append("div").style("margin-top", "20px").html(
3310
+ "<p>Please upload CICERO output as a text file. See <a href=https://docs.google.com/document/d/1jkVYRPIJpkWvA9vqtahRlNn63Hk5DehjHbF_BH9k7Rs/edit?usp=sharing target=_blank>file format</a>.</p><p>See <a href=https://docs.google.com/document/d/1DRVzE_WenG490eRYB7VGFOygtSqtF5L97rhK0HOUCNY/edit?usp=sharing target=_blank>function usage</a>.</p>"
3311
+ );
3312
+ inputdiv.append("p").html("<a href=https://proteinpaint.stjude.org/ppdemo/hg19/fusion/cicero.output target=_blank>Example file</a>");
3313
+ function cmt(t, red) {
3314
+ saydiv.style("color", red ? "red" : "black").text(t);
3315
+ }
3316
+ const fileui = () => {
3317
+ filediv.selectAll("*").remove();
3318
+ const input = filediv.append("input").attr("type", "file").on("change", (event) => {
3319
+ const file = event.target.files[0];
3320
+ if (!file) {
3321
+ fileui();
3322
+ return;
3323
+ }
3324
+ if (!file.size) {
3325
+ cmt("Invalid file " + file.name);
3326
+ fileui();
3327
+ return;
3328
+ }
3329
+ const reader = new FileReader();
3330
+ reader.onload = (event2) => {
3331
+ const usegenome = gselect.options[gselect.selectedIndex].innerHTML;
3332
+ const genomeobj = genomes[usegenome];
3333
+ const [err, header, items] = svmrparseraw(event2.target.result, genomeobj);
3334
+ if (err) {
3335
+ cmt(err, 1);
3336
+ fileui();
3337
+ return;
3338
+ }
3339
+ svmrlaunch(genomeobj, header, items, file.name, visualdiv, hostURL, jwt);
3340
+ filediv.remove();
3341
+ inputdiv.remove();
3342
+ };
3343
+ reader.onerror = function() {
3344
+ cmt("Error reading file " + file.name, 1);
3345
+ fileui();
3346
+ return;
3347
+ };
3348
+ reader.readAsText(file, "utf8");
3349
+ });
3350
+ setTimeout(() => input.node().focus(), 1100);
3351
+ };
3352
+ fileui();
3353
+ }
3354
+ function svmrlaunch(genome, header, items, filename, holder, hostURL, jwt) {
3355
+ new svmr_c_default(genome, header, items, filename, holder, hostURL, jwt);
3356
+ }
3357
+ function svmrparseraw(raw, genome) {
3358
+ const lines = raw.trim().split("\n");
3359
+ const [err, header] = parseheader(lines[0]);
3360
+ if (err) {
3361
+ return ["File header error: " + err];
3362
+ }
3363
+ const skipword = lines[0].split(" ")[0];
3364
+ const items = [];
3365
+ const badlines = [];
3366
+ for (let i = 1; i < lines.length; i++) {
3367
+ const line = lines[i];
3368
+ if (line == "") continue;
3369
+ if (line[0] == "#") continue;
3370
+ const lst = line.trim().split(" ");
3371
+ if (lst[0] == skipword) continue;
3372
+ const m = {
3373
+ notes: []
3374
+ // collect notes
3375
+ };
3376
+ for (let j = 0; j < header.length; j++) {
3377
+ if (lst[j] !== void 0 && lst[j].includes('"'))
3378
+ return ['Input file has invalid character " e.g. "NM_001007565"'];
3379
+ m[header[j].key] = lst[j];
3380
+ }
3381
+ if (!m.rating) {
3382
+ badlines.push([i, "rating unspecified", lst]);
3383
+ continue;
3384
+ }
3385
+ let s = m.rating;
3386
+ if (s.toLowerCase() == "major") {
3387
+ m.rating = "HQ";
3388
+ s = "HQ";
3389
+ }
3390
+ if (s != "HQ" && s != "LQ" && s != "RT" && s != "bad") {
3391
+ badlines.push([i, "invalid rating: " + m.rating, lst]);
3392
+ continue;
3393
+ }
3394
+ if (!m.chrA) {
3395
+ badlines.push([i, "missing chrA", lst]);
3396
+ continue;
3397
+ }
3398
+ if (!genome.chrlookup[m.chrA.toUpperCase()]) {
3399
+ badlines.push([i, "invalid chrA: " + m.chrA, lst]);
3400
+ continue;
3401
+ }
3402
+ if (!m.chrB) {
3403
+ badlines.push([i, "missing chrB", lst]);
3404
+ continue;
3405
+ }
3406
+ if (!genome.chrlookup[m.chrB.toUpperCase()]) {
3407
+ badlines.push([i, "invalid chrB: " + m.chrB, lst]);
3408
+ continue;
3409
+ }
3410
+ s = m.posA;
3411
+ if (!s) {
3412
+ badlines.push([i, "missing posA", lst]);
3413
+ continue;
3414
+ }
3415
+ let v = Number.parseInt(s);
3416
+ if (Number.isNaN(v)) {
3417
+ badlines.push([i, "invalid posA: " + s, lst]);
3418
+ continue;
3419
+ }
3420
+ if (v < 0 || v >= genome.chrlookup[m.chrA.toUpperCase()]) {
3421
+ badlines.push([i, "invalid posA: " + s, lst]);
3422
+ continue;
3423
+ }
3424
+ m.posA = v;
3425
+ s = m.posB;
3426
+ if (!s) {
3427
+ badlines.push([i, "missing posB", lst]);
3428
+ continue;
3429
+ }
3430
+ v = Number.parseInt(s);
3431
+ if (isNaN(v)) {
3432
+ badlines.push([i, "invalid posB: " + s, lst]);
3433
+ continue;
3434
+ }
3435
+ if (v < 0 || v >= genome.chrlookup[m.chrB.toUpperCase()]) {
3436
+ badlines.push([i, "invalid posB: " + s, lst]);
3437
+ continue;
3438
+ }
3439
+ m.posB = v;
3440
+ if (!m.ratioA) {
3441
+ badlines.push([i, "missing ratioA", lst]);
3442
+ continue;
3443
+ }
3444
+ v = Number.parseFloat(m.ratioA);
3445
+ if (Number.isNaN(v)) {
3446
+ badlines.push([i, "invalid value for ratioA", lst]);
3447
+ continue;
3448
+ }
3449
+ if (v > 1) {
3450
+ badlines.push([i, "ratioA > 100%", lst]);
3451
+ v = 1;
3452
+ }
3453
+ m.ratioA = v;
3454
+ if (!m.ratioB) {
3455
+ badlines.push([i, "missing ratioB", lst]);
3456
+ continue;
3457
+ }
3458
+ v = Number.parseFloat(m.ratioB);
3459
+ if (Number.isNaN(v)) {
3460
+ badlines.push([i, "invalid value for ratioB", lst]);
3461
+ continue;
3462
+ }
3463
+ if (v > 1) {
3464
+ badlines.push([i, "ratioB > 100%", lst]);
3465
+ v = 1;
3466
+ }
3467
+ m.ratioB = v;
3468
+ if (!m.score) {
3469
+ badlines.push([i, "missing score", lst]);
3470
+ continue;
3471
+ }
3472
+ v = Number.parseFloat(m.score);
3473
+ if (Number.isNaN(v)) {
3474
+ badlines.push([i, "invalid value for score", lst]);
3475
+ continue;
3476
+ }
3477
+ m.score = v;
3478
+ if (!m.readsA) {
3479
+ badlines.push([i, "readsA missing", lst]);
3480
+ continue;
3481
+ }
3482
+ v = Number.parseInt(m.readsA);
3483
+ if (Number.isNaN(v)) {
3484
+ badlines.push([i, "invalid value for readsA", lst]);
3485
+ continue;
3486
+ }
3487
+ m.readsA = v;
3488
+ if (!m.readsB) {
3489
+ badlines.push([i, "readsB missing", lst]);
3490
+ continue;
3491
+ }
3492
+ v = Number.parseInt(m.readsB);
3493
+ if (Number.isNaN(v)) {
3494
+ badlines.push([i, "invalid value for readsB", lst]);
3495
+ continue;
3496
+ }
3497
+ m.readsB = v;
3498
+ if (!m.matchA) {
3499
+ badlines.push([i, "matchA missing", lst]);
3500
+ continue;
3501
+ }
3502
+ v = Number.parseInt(m.matchA);
3503
+ if (Number.isNaN(v)) {
3504
+ badlines.push([i, "invalid value for matchA", lst]);
3505
+ continue;
3506
+ }
3507
+ m.matchA = v;
3508
+ if (!m.matchB) {
3509
+ badlines.push([i, "matchB missing", lst]);
3510
+ continue;
3511
+ }
3512
+ v = Number.parseInt(m.matchB);
3513
+ if (Number.isNaN(v)) {
3514
+ badlines.push([i, "invalid value for matchB", lst]);
3515
+ continue;
3516
+ }
3517
+ m.matchB = v;
3518
+ if (!m.repeatA) {
3519
+ badlines.push([i, "repeatA missing", lst]);
3520
+ continue;
3521
+ }
3522
+ v = Number.parseFloat(m.repeatA);
3523
+ if (Number.isNaN(v)) {
3524
+ badlines.push([i, "invalid value for repeatA", lst]);
3525
+ continue;
3526
+ }
3527
+ m.repeatA = v;
3528
+ if (!m.repeatB) {
3529
+ badlines.push([i, "repeatB missing", lst]);
3530
+ continue;
3531
+ }
3532
+ v = Number.parseFloat(m.repeatB);
3533
+ if (Number.isNaN(v)) {
3534
+ badlines.push([i, "invalid value for repeatB", lst]);
3535
+ continue;
3536
+ }
3537
+ m.repeatB = v;
3538
+ if (m.type2) {
3539
+ switch (m.type2.toLowerCase()) {
3540
+ case "closs":
3541
+ m.iscloss = true;
3542
+ break;
3543
+ case "nloss":
3544
+ m.isnloss = true;
3545
+ break;
3546
+ case "fusion":
3547
+ m.isfusion = true;
3548
+ break;
3549
+ case "itd":
3550
+ m.isitd = true;
3551
+ break;
3552
+ case "other":
3553
+ m.isother = true;
3554
+ break;
3555
+ case "uptss":
3556
+ m.isuptss = true;
3557
+ break;
3558
+ default:
3559
+ badlines.push([i, "unknown type2: " + m.type2, lst]);
3560
+ continue;
3561
+ }
3562
+ }
3563
+ if (m.geneA == "" || m.geneA == "NA") {
3564
+ m.geneA = null;
3565
+ }
3566
+ if (m.geneB == "" || m.geneB == "NA") {
3567
+ m.geneB = null;
3568
+ }
3569
+ if (m.featureA == "intergenic") m.geneA = null;
3570
+ if (m.featureB == "intergenic") m.geneB = null;
3571
+ const isoforma = m.lstisoforma ? m.lstisoforma.toUpperCase().split(",") : [], isoformb = m.lstisoformb ? m.lstisoformb.toUpperCase().split(",") : [], codona = m.lstisoformacodon ? m.lstisoformacodon.split(",") : [], codonb = m.lstisoformbcodon ? m.lstisoformbcodon.split(",") : [], frame = m.lstframe ? m.lstframe.split(",") : [];
3572
+ let exona = null, exonb = null, anchora = null, anchorb = null, contigaaA = null, contigaaB = null, contigbpA = null, contigbpB = null;
3573
+ if (m.lstisoformaexon) exona = m.lstisoformaexon.split(",");
3574
+ if (m.lstisoformbexon) exonb = m.lstisoformbexon.split(",");
3575
+ if (m.lstisoformaanchor) anchora = m.lstisoformaanchor.split(",");
3576
+ if (m.lstisoformbanchor) anchorb = m.lstisoformbanchor.split(",");
3577
+ if (m.lstcontigaaA) contigaaA = m.lstcontigaaA.split(",");
3578
+ if (m.lstcontigaaB) contigaaB = m.lstcontigaaB.split(",");
3579
+ if (m.lstcontigbpA) contigbpA = m.lstcontigbpA.split(",");
3580
+ if (m.lstcontigbpB) contigbpB = m.lstcontigbpB.split(",");
3581
+ const paircount = Math.max(isoforma.length, isoformb.length, codona.length, codonb.length, frame.length);
3582
+ m.pairs = [];
3583
+ for (let j = 0; j < paircount; j++) {
3584
+ const pair = {
3585
+ a: {
3586
+ isoform: isoforma[j] && isoforma[j].length > 0 ? isoforma[j] : null,
3587
+ exon: exona ? Number.parseInt(exona[j]) : NaN,
3588
+ codon: codona[j] ? Number.parseInt(codona[j]) : NaN,
3589
+ anchor: anchora ? anchora[j] : void 0
3590
+ },
3591
+ b: {
3592
+ isoform: isoformb[j] && isoformb[j].length > 0 ? isoformb[j] : null,
3593
+ exon: exonb ? Number.parseInt(exonb[j]) : NaN,
3594
+ codon: codonb[j] ? Number.parseInt(codonb[j]) : NaN,
3595
+ anchor: anchorb ? anchorb[j] : void 0
3596
+ },
3597
+ frame: frame[j],
3598
+ inframe: frame[j] == "1" || frame[j] == "2"
3599
+ };
3600
+ if (m.isuptss) {
3601
+ pair.inframe = true;
3602
+ }
3603
+ let aaa = NaN, aab = NaN, bpa = NaN, bpb = NaN;
3604
+ if (contigaaA && contigaaA[j]) aaa = Number.parseInt(contigaaA[j]);
3605
+ if (contigaaB && contigaaB[j]) aab = Number.parseInt(contigaaB[j]);
3606
+ if (contigbpA && contigbpA[j]) bpa = Number.parseInt(contigbpA[j]);
3607
+ if (contigbpB && contigbpB[j]) bpb = Number.parseInt(contigbpB[j]);
3608
+ if (!Number.isNaN(aaa) && !Number.isNaN(aab)) {
3609
+ pair.a.contigaa = aaa;
3610
+ pair.b.contigaa = aab;
3611
+ }
3612
+ if (!Number.isNaN(bpa) && !Number.isNaN(bpb)) {
3613
+ pair.a.contigbp = bpa;
3614
+ pair.b.contigbp = bpb;
3615
+ }
3616
+ m.pairs.push(pair);
3617
+ }
3618
+ if (m.exception) {
3619
+ m.notes.push(m.exception);
3620
+ }
3621
+ if (m.hlgene) {
3622
+ const v2 = Number.parseInt(m.hlgene);
3623
+ if (Number.isNaN(v2) || v2 != 0 && v2 != 1 && v2 != 2 && v2 != 3 && v2 != 4) {
3624
+ badlines.push([i, "invalid value for highlight gene flag: " + m.hlgene, lst]);
3625
+ delete m.hlgene;
3626
+ } else {
3627
+ m.hlgene = v2;
3628
+ }
3629
+ }
3630
+ items.push(m);
3631
+ }
3632
+ if (badlines.length > 0) {
3633
+ const hlst = header.map((i) => i.key);
3634
+ bulk_badline(hlst, badlines);
3635
+ }
3636
+ if (items.length == 0) {
3637
+ return ["No data loaded"];
3638
+ }
3639
+ return [null, header, items];
3640
+ }
3641
+ function parseheader(line) {
3642
+ const original = line.trim().split(" ");
3643
+ if (original.length <= 1) return ["invalid file header"];
3644
+ const header = [];
3645
+ const lower = [];
3646
+ for (const i2 of original) {
3647
+ lower.push(i2.toLowerCase());
3648
+ header.push({
3649
+ label: i2,
3650
+ key: i2.toLowerCase(),
3651
+ custom: true
3652
+ });
3653
+ }
3654
+ const htry = (...arg) => {
3655
+ for (const s of arg) {
3656
+ const i2 = lower.indexOf(s);
3657
+ if (i2 != -1) return i2;
3658
+ }
3659
+ return -1;
3660
+ };
3661
+ let i = htry("genea");
3662
+ if (i == -1) return ["geneA missing"];
3663
+ header[i].key = "geneA";
3664
+ delete header[i].custom;
3665
+ i = htry("chra");
3666
+ if (i == -1) return ["chrA missing"];
3667
+ header[i].key = "chrA";
3668
+ delete header[i].custom;
3669
+ i = htry("posa");
3670
+ if (i == -1) return ["posA missing"];
3671
+ header[i].key = "posA";
3672
+ delete header[i].custom;
3673
+ i = htry("orta");
3674
+ if (i == -1) return ["ortA missing"];
3675
+ header[i].key = "ortA";
3676
+ delete header[i].custom;
3677
+ i = htry("featurea");
3678
+ if (i == -1) return ["featureA missing"];
3679
+ header[i].key = "featureA";
3680
+ delete header[i].custom;
3681
+ i = htry("ratioa");
3682
+ if (i == -1) return ["ratioA missing"];
3683
+ header[i].key = "ratioA";
3684
+ delete header[i].custom;
3685
+ i = htry("readsa");
3686
+ if (i == -1) return ["readsA missing"];
3687
+ header[i].key = "readsA";
3688
+ delete header[i].custom;
3689
+ i = htry("sv_refseqa_aa_index");
3690
+ if (i != -1) {
3691
+ header[i].key = "lstcontigaaA";
3692
+ delete header[i].custom;
3693
+ }
3694
+ i = htry("sv_refseqa_contig_index");
3695
+ if (i != -1) {
3696
+ header[i].key = "lstcontigbpA";
3697
+ delete header[i].custom;
3698
+ }
3699
+ i = htry("total_readsa");
3700
+ if (i != -1) {
3701
+ header[i].key = "totalreadsA";
3702
+ delete header[i].custom;
3703
+ }
3704
+ i = htry("geneb");
3705
+ if (i == -1) return ["geneB missing"];
3706
+ header[i].key = "geneB";
3707
+ delete header[i].custom;
3708
+ i = htry("chrb");
3709
+ if (i == -1) return ["chrB missing"];
3710
+ header[i].key = "chrB";
3711
+ delete header[i].custom;
3712
+ i = htry("posb");
3713
+ if (i == -1) return ["posB missing"];
3714
+ header[i].key = "posB";
3715
+ delete header[i].custom;
3716
+ i = htry("ortb");
3717
+ if (i == -1) return ["ortB missing"];
3718
+ header[i].key = "ortB";
3719
+ delete header[i].custom;
3720
+ i = htry("featureb");
3721
+ if (i == -1) return ["featureB missing"];
3722
+ header[i].key = "featureB";
3723
+ delete header[i].custom;
3724
+ i = htry("ratiob");
3725
+ if (i == -1) return ["ratioB missing"];
3726
+ header[i].key = "ratioB";
3727
+ delete header[i].custom;
3728
+ i = htry("readsb");
3729
+ if (i == -1) return ["readsB missing"];
3730
+ header[i].key = "readsB";
3731
+ delete header[i].custom;
3732
+ i = htry("sv_refseqb_aa_index");
3733
+ if (i != -1) {
3734
+ header[i].key = "lstcontigaaB";
3735
+ delete header[i].custom;
3736
+ }
3737
+ i = htry("sv_refseqb_contig_index");
3738
+ if (i != -1) {
3739
+ header[i].key = "lstcontigbpB";
3740
+ delete header[i].custom;
3741
+ }
3742
+ i = htry("total_readsb");
3743
+ if (i != -1) {
3744
+ header[i].key = "totalreadsB";
3745
+ delete header[i].custom;
3746
+ }
3747
+ i = htry("sv_inframe", "frame");
3748
+ if (i == -1) return ["sv_inframe missing"];
3749
+ header[i].key = "lstframe";
3750
+ delete header[i].custom;
3751
+ i = htry("sv_refseqa");
3752
+ if (i == -1) return ["sv_refseqA missing"];
3753
+ header[i].key = "lstisoforma";
3754
+ delete header[i].custom;
3755
+ i = htry("sv_refseqa_codon");
3756
+ if (i != -1) {
3757
+ header[i].key = "lstisoformacodon";
3758
+ }
3759
+ i = htry("sv_refseqb_codon");
3760
+ if (i != -1) {
3761
+ header[i].key = "lstisoformbcodon";
3762
+ }
3763
+ i = htry("score");
3764
+ if (i == -1) return ["score missing"];
3765
+ header[i].key = "score";
3766
+ delete header[i].custom;
3767
+ i = htry("sv_refseqb");
3768
+ if (i == -1) return ["sv_refseqB missing"];
3769
+ header[i].key = "lstisoformb";
3770
+ delete header[i].custom;
3771
+ i = htry("rating");
3772
+ if (i == -1) return ["rating missing"];
3773
+ header[i].key = "rating";
3774
+ delete header[i].custom;
3775
+ i = htry("matcha");
3776
+ if (i == -1) return ["matchA missing"];
3777
+ header[i].key = "matchA";
3778
+ delete header[i].custom;
3779
+ i = htry("matchb");
3780
+ if (i == -1) return ["matchB missing"];
3781
+ header[i].key = "matchB";
3782
+ delete header[i].custom;
3783
+ i = htry("repeata");
3784
+ if (i == -1) return ["repeatA missing"];
3785
+ header[i].key = "repeatA";
3786
+ delete header[i].custom;
3787
+ i = htry("repeatb");
3788
+ if (i == -1) return ["repeatB missing"];
3789
+ header[i].key = "repeatB";
3790
+ delete header[i].custom;
3791
+ i = htry("functional effect");
3792
+ if (i == -1) return ["functional effect missing"];
3793
+ header[i].key = "type2";
3794
+ delete header[i].custom;
3795
+ i = htry("sample");
3796
+ if (i != -1) {
3797
+ header[i].key = "sample";
3798
+ delete header[i].custom;
3799
+ }
3800
+ i = htry("sv_processing_exception");
3801
+ if (i != -1) {
3802
+ header[i].key = "exception";
3803
+ }
3804
+ i = htry("medal");
3805
+ if (i != -1) {
3806
+ header[i].key = "hlgene";
3807
+ }
3808
+ i = htry("sv_refseqa_exon");
3809
+ if (i != -1) {
3810
+ header[i].key = "lstisoformaexon";
3811
+ delete header[i].custom;
3812
+ }
3813
+ i = htry("sv_refseqb_exon");
3814
+ if (i != -1) {
3815
+ header[i].key = "lstisoformbexon";
3816
+ delete header[i].custom;
3817
+ }
3818
+ i = htry("sv_refseqa_anchor_type");
3819
+ if (i != -1) {
3820
+ header[i].key = "lstisoformaanchor";
3821
+ delete header[i].custom;
3822
+ }
3823
+ i = htry("sv_refseqb_anchor_type");
3824
+ if (i != -1) {
3825
+ header[i].key = "lstisoformbanchor";
3826
+ delete header[i].custom;
3827
+ }
3828
+ return [null, header];
3829
+ }
3830
+ export {
3831
+ svmrlaunch,
3832
+ svmrparseinput,
3833
+ svmrparseraw,
3834
+ svmrui
3835
+ };
3836
+ //# sourceMappingURL=svmr-44EIX7YD.js.map