@sjcrh/proteinpaint-client 2.225.0 → 2.227.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (951) hide show
  1. package/dist/2dmaf-B34EJADN.js +1362 -0
  2. package/dist/AggMatrixInput-USCXGZT2.js +402 -0
  3. package/dist/AggregateMatrix-VLCSBD65.js +37 -0
  4. package/dist/AppHeader-KE7QVEW5.js +826 -0
  5. package/dist/BoxPlot-3H5QKYRD.js +1247 -0
  6. package/dist/CorrelationVolcano-ACEJOJS6.js +613 -0
  7. package/dist/CorrelationVolcano-ACEJOJS6.js.map +7 -0
  8. package/dist/Cuminc-6LPS4LR7.js +1217 -0
  9. package/dist/DE-TTKEQYC7.js +85 -0
  10. package/dist/DEinput-W7WEO2NO.js +483 -0
  11. package/dist/DEinput-W7WEO2NO.js.map +7 -0
  12. package/dist/DM-2TUF6Q3C.js +86 -0
  13. package/dist/DifferentialAnalysis-3LP4RAWF.js +236 -0
  14. package/dist/Disco-UP5C7UWX.js +3445 -0
  15. package/dist/Disco.UI-V4I4LOMF.js +239 -0
  16. package/dist/DmrPlot-TZR2NGIH.js +366 -0
  17. package/dist/GB-4NRY4YMF.js +1388 -0
  18. package/dist/GB-4NRY4YMF.js.map +7 -0
  19. package/dist/GSEA-YGKBRJJO.js +870 -0
  20. package/dist/GeneExpInput-L3J2ECVQ.js +38 -0
  21. package/dist/Geomap-4MHU6F57.js +80 -0
  22. package/dist/HicApp-27VGP5F6.js +2240 -0
  23. package/dist/IDCViewer-37GJPPUY.js +10810 -0
  24. package/dist/NumBinaryEditor-SEC2NDGG.js +274 -0
  25. package/dist/NumBinaryEditor.unit.spec-UDYSUC4S.js +308 -0
  26. package/dist/NumContEditor-YPSYWU2A.js +100 -0
  27. package/dist/NumContEditor.unit.spec-NHFBMHQ5.js +160 -0
  28. package/dist/NumCustomBinEditor-N7US5Q64.js +29 -0
  29. package/dist/NumCustomBinEditor.unit.spec-2BMMUBYU.js +393 -0
  30. package/dist/NumDiscreteEditor-BLQ5DEB7.js +165 -0
  31. package/dist/NumDiscreteEditor.unit.spec-JOFPUFU5.js +229 -0
  32. package/dist/NumRegularBinEditor-7BFPBUW2.js +29 -0
  33. package/dist/NumRegularBinEditor.unit.spec-6GZMNRHA.js +274 -0
  34. package/dist/NumSplineEditor-LO3ZR3T3.js +205 -0
  35. package/dist/NumSplineEditor.unit.spec-MRA3DQSB.js +220 -0
  36. package/dist/NumericDensity-NUCVJZ74.js +29 -0
  37. package/dist/NumericDensity.unit.spec-TZLKWH4U.js +414 -0
  38. package/dist/NumericHandler-NH533VBN.js +30 -0
  39. package/dist/NumericHandler.unit.spec-V7MNEHML.js +225 -0
  40. package/dist/ProteomeInput-FEXWZOA2.js +610 -0
  41. package/dist/Regression-NJAPUGT7.js +1412 -0
  42. package/dist/RunChart2-QIJ6NUWY.js +744 -0
  43. package/dist/SC-5NWBVOEE.js +1290 -0
  44. package/dist/Violin-TMACI43Q.js +1105 -0
  45. package/dist/Volcano-BMLHQEXU.js +2745 -0
  46. package/dist/Volcano-BMLHQEXU.js.map +7 -0
  47. package/dist/Wsi-5TWAOBFG.js +650 -0
  48. package/dist/Wsi-5TWAOBFG.js.map +7 -0
  49. package/dist/aboutSunburst-53YAWTV5.js +93 -0
  50. package/dist/adSandbox-7VHXEI7W.js +29 -0
  51. package/dist/animatedBubbleChart-CTFGJIRR.js +542 -0
  52. package/dist/app-AQAQAPUN.js +38 -0
  53. package/dist/app-SZDIV5U4.js +28 -0
  54. package/dist/app.js +12 -12
  55. package/dist/bam-3U5R2KNC.js +872 -0
  56. package/dist/barchart-ZL5VSR7P.js +38 -0
  57. package/dist/barchart2-YELP2HI7.js +305 -0
  58. package/dist/block-AGX6Z4BR.js +6208 -0
  59. package/dist/block-AGX6Z4BR.js.map +7 -0
  60. package/dist/block.init-IBITFICI.js +29 -0
  61. package/dist/block.mds.expressionrank-4L76ILD4.js +350 -0
  62. package/dist/block.mds.geneboxplot-XA7DFHPV.js +819 -0
  63. package/dist/block.mds.junction-GTZD3HEN.js +1534 -0
  64. package/dist/block.mds.svcnv-HTXQ3LGR.js +6325 -0
  65. package/dist/block.svg-BM6OMVRF.js +155 -0
  66. package/dist/block.tk.aicheck-CV53ULEP.js +274 -0
  67. package/dist/block.tk.bam-KJYFNJCX.js +1906 -0
  68. package/dist/block.tk.bigwig.ui-A352D6PT.js +202 -0
  69. package/dist/block.tk.hicstraw-QAFTQESL.js +814 -0
  70. package/dist/block.tk.junction-XURB4RWZ.js +2353 -0
  71. package/dist/block.tk.junction.textmatrixui-RNRWWNGY.js +190 -0
  72. package/dist/block.tk.ld-GWJMVPX3.js +90 -0
  73. package/dist/block.tk.menu-BJZYFMQX.js +1050 -0
  74. package/dist/block.tk.pgv-7XNJTHEW.js +934 -0
  75. package/dist/brainImaging-37EDZLGN.js +550 -0
  76. package/dist/brainRegions-FEW52QUB.js +213 -0
  77. package/dist/bubbleHeatmap-YN34AA4H.js +374 -0
  78. package/dist/bubbleHeatmap-YN34AA4H.js.map +7 -0
  79. package/dist/cellTypeBubbleHeatmap-X4K63FOK.js +274 -0
  80. package/dist/cellTypeBubbleHeatmap-X4K63FOK.js.map +7 -0
  81. package/dist/chunk-24CVFDVW.js +1219 -0
  82. package/dist/chunk-24CVFDVW.js.map +7 -0
  83. package/dist/chunk-2B3CYHUF.js +30 -0
  84. package/dist/chunk-2IAELUCN.js +348 -0
  85. package/dist/chunk-2W6U53AG.js +195 -0
  86. package/dist/chunk-46GCGTHJ.js +1339 -0
  87. package/dist/chunk-4ZX5KHD7.js +96 -0
  88. package/dist/chunk-544DSOC3.js +466 -0
  89. package/dist/chunk-6CV3YVJD.js +194 -0
  90. package/dist/chunk-6UHSGC6G.js +276 -0
  91. package/dist/chunk-6ZZGFZV2.js +35 -0
  92. package/dist/chunk-72FUMSAN.js +6375 -0
  93. package/dist/chunk-7DC4PD5R.js +182 -0
  94. package/dist/chunk-7ISYXUJ7.js +243 -0
  95. package/dist/chunk-7NVFEGCE.js +30 -0
  96. package/dist/chunk-7PQ6MLKG.js +1253 -0
  97. package/dist/chunk-BGPRKPKH.js +56 -0
  98. package/dist/chunk-BILGOVOR.js +480 -0
  99. package/dist/chunk-BKJLRLQQ.js +2008 -0
  100. package/dist/chunk-BQYMKS7S.js +4521 -0
  101. package/dist/chunk-BQYMKS7S.js.map +7 -0
  102. package/dist/chunk-C4BKP67I.js +123 -0
  103. package/dist/chunk-CFYWQJ7F.js +472 -0
  104. package/dist/chunk-CFYWQJ7F.js.map +7 -0
  105. package/dist/chunk-CQNTAIM3.js +328 -0
  106. package/dist/chunk-CW3IVTRX.js +2685 -0
  107. package/dist/chunk-D7KZWYP5.js +516 -0
  108. package/dist/chunk-DFHERVYA.js +961 -0
  109. package/dist/chunk-DFHERVYA.js.map +7 -0
  110. package/dist/chunk-DNXOZATD.js +848 -0
  111. package/dist/chunk-DXF3YDRG.js +2334 -0
  112. package/dist/chunk-ECBVUPDE.js +626 -0
  113. package/dist/chunk-ES22B563.js +257 -0
  114. package/dist/chunk-FA2B6PKK.js +42 -0
  115. package/dist/chunk-FMHSDIVG.js +2932 -0
  116. package/dist/chunk-G5UFOMON.js +255 -0
  117. package/dist/chunk-GKA6USKV.js +550 -0
  118. package/dist/chunk-HGIPR72Y.js +299 -0
  119. package/dist/chunk-IBUDYN5E.js +468 -0
  120. package/dist/chunk-J37WYVIZ.js +418 -0
  121. package/dist/chunk-JG5CF5Q3.js +397 -0
  122. package/dist/chunk-JI632MAR.js +400 -0
  123. package/dist/chunk-JI632MAR.js.map +7 -0
  124. package/dist/chunk-JKPMBNRM.js +100 -0
  125. package/dist/chunk-JKPMBNRM.js.map +7 -0
  126. package/dist/chunk-JSQH233D.js +263 -0
  127. package/dist/chunk-JWWLSDVM.js +296 -0
  128. package/dist/chunk-KGK4JJ4L.js +830 -0
  129. package/dist/chunk-KGK4JJ4L.js.map +7 -0
  130. package/dist/chunk-KTJUDDVQ.js +340 -0
  131. package/dist/chunk-MY5MF4RI.js +55 -0
  132. package/dist/chunk-P4ZGUPGA.js +56 -0
  133. package/dist/chunk-PQDYA3ZQ.js +274 -0
  134. package/dist/chunk-PVJ6IIFA.js +176 -0
  135. package/dist/chunk-QGG5MTIL.js +161 -0
  136. package/dist/chunk-QGG5MTIL.js.map +7 -0
  137. package/dist/chunk-QKVKQD6S.js +184 -0
  138. package/dist/chunk-QNACCFOA.js +48 -0
  139. package/dist/chunk-QNACCFOA.js.map +7 -0
  140. package/dist/chunk-R6O3FLKW.js +141 -0
  141. package/dist/chunk-RFQQRF6Q.js +54 -0
  142. package/dist/chunk-RG27DDKN.js +267 -0
  143. package/dist/chunk-SB5DR4NL.js +562 -0
  144. package/dist/chunk-SF42FFDZ.js +2799 -0
  145. package/dist/chunk-SORR4JHU.js +14 -0
  146. package/dist/chunk-SZEBQMZW.js +50 -0
  147. package/dist/chunk-THDOHHDN.js +102 -0
  148. package/dist/chunk-TXDCZOPG.js +305 -0
  149. package/dist/chunk-U6GSEOBY.js +54 -0
  150. package/dist/chunk-UBTNM5RO.js +203 -0
  151. package/dist/chunk-UHZDDPUU.js +444 -0
  152. package/dist/chunk-UVES3USV.js +134 -0
  153. package/dist/chunk-UYA5LCAR.js +281 -0
  154. package/dist/chunk-VHEXNBCO.js +379 -0
  155. package/dist/chunk-VJJJFEOU.js +96 -0
  156. package/dist/chunk-VJJJFEOU.js.map +7 -0
  157. package/dist/chunk-VPRP24DY.js +2095 -0
  158. package/dist/chunk-VPRP24DY.js.map +7 -0
  159. package/dist/chunk-VVWZ4BOI.js +2349 -0
  160. package/dist/chunk-WENNRY5E.js +170 -0
  161. package/dist/chunk-WTLUZOBK.js +103 -0
  162. package/dist/chunk-YBXQBSFY.js +26888 -0
  163. package/dist/chunk-YBXQBSFY.js.map +7 -0
  164. package/dist/chunk-ZLEGHQOO.js +217 -0
  165. package/dist/chunk-ZO7KUAIF.js +5258 -0
  166. package/dist/chunk-ZO7KUAIF.js.map +7 -0
  167. package/dist/chunk-ZX7527EE.js +240 -0
  168. package/dist/cohort-NKRTCX5Z.js +66 -0
  169. package/dist/cohortSunburst-DFJW6WXU.js +402 -0
  170. package/dist/condition-PYFOEVX5.js +323 -0
  171. package/dist/controls-RVNIN66W.js +30 -0
  172. package/dist/controls.config-XVEYYBI4.js +30 -0
  173. package/dist/correlation-MNL4DGSW.js +91 -0
  174. package/dist/customdata.inputui-WFIIJATQ.js +280 -0
  175. package/dist/dataDownload-CMSP5FA4.js +326 -0
  176. package/dist/databrowser.ui-FYZPXXEJ.js +424 -0
  177. package/dist/dictionary-76BXY6WU.js +109 -0
  178. package/dist/dnaMethylation-WTIJVNIU.js +29 -0
  179. package/dist/dnaMethylation.integration.spec-YXQEFLC5.js +194 -0
  180. package/dist/dnaMethylation.unit.spec-22FLJWVB.js +95 -0
  181. package/dist/dnaMethylation.unit.spec-22FLJWVB.js.map +7 -0
  182. package/dist/dofetch-XID2XEJT.js +49 -0
  183. package/dist/e2pca-DD6DA7X3.js +340 -0
  184. package/dist/ep-S4PI4AUJ.js +1247 -0
  185. package/dist/expclust.gdc.spec-BDV4RJO6.js +298 -0
  186. package/dist/facet-EOXEW2LN.js +556 -0
  187. package/dist/gb-AKE7RDPB.js +77 -0
  188. package/dist/geneExpClustering-73ED7HIN.js +240 -0
  189. package/dist/geneExpression-AEJILDKJ.js +29 -0
  190. package/dist/geneExpression-NXDXXKEA.js +309 -0
  191. package/dist/geneExpression.unit.spec-VUJWR4TA.js +150 -0
  192. package/dist/geneExpression.unit.spec-VUJWR4TA.js.map +7 -0
  193. package/dist/geneORA-7KFQ4PW2.js +269 -0
  194. package/dist/geneRanking-RKJU4PM2.js +544 -0
  195. package/dist/geneVariant-2AGC3ECG.js +32 -0
  196. package/dist/geneVariant-PWMXP6H4.js +289 -0
  197. package/dist/geneVariant-PWMXP6H4.js.map +7 -0
  198. package/dist/geneVariant.integration.spec-UJXGQEZG.js +672 -0
  199. package/dist/genefusion.ui-KEBOA3TK.js +299 -0
  200. package/dist/geneset-BU6V3CB5.js +199 -0
  201. package/dist/genomeBrowser.spec-BGQHJZKH.js +272 -0
  202. package/dist/grin2-OUZN5LOU.js +66 -0
  203. package/dist/grin2-WRGQ7BDG.js +945 -0
  204. package/dist/hierCluster-3ERW47JJ.js +51 -0
  205. package/dist/hierCluster-JAFKBC6C.js +55 -0
  206. package/dist/hierCluster.config-QIJNY5OD.js +32 -0
  207. package/dist/hierCluster.integration.spec-XA4K3UU6.js +479 -0
  208. package/dist/hierCluster.interactivity-RDFPQOOP.js +45 -0
  209. package/dist/hierCluster.renderers-SU5IYI33.js +18 -0
  210. package/dist/imagePlot-J4PHG7V2.js +152 -0
  211. package/dist/importPlot-U67MZZXY.js +8 -0
  212. package/dist/isoformExpression-K5BCDJLL.js +31 -0
  213. package/dist/isoformExpression.unit.spec-35FHEO27.js +233 -0
  214. package/dist/junction-6GGWFF2J.js +32 -0
  215. package/dist/junction.unit.spec-7EJK4HML.js +224 -0
  216. package/dist/junction.unit.spec-7EJK4HML.js.map +7 -0
  217. package/dist/launch.adhoc-ONCSL65L.js +33 -0
  218. package/dist/leftlabel.sample-H5G3U7AA.js +260 -0
  219. package/dist/leftlabel.sample-H5G3U7AA.js.map +7 -0
  220. package/dist/lollipop-BWP4BG7Q.js +162 -0
  221. package/dist/maf-GV6JHWYK.js +451 -0
  222. package/dist/maftimeline-HE7XLJWG.js +583 -0
  223. package/dist/matrix-IAM6SA7K.js +50 -0
  224. package/dist/matrix-QF5MBV5Y.js +55 -0
  225. package/dist/matrix.cells-A5E63KDN.js +25 -0
  226. package/dist/matrix.config-VLRMO7J2.js +33 -0
  227. package/dist/matrix.data-R4FW2PQH.js +22 -0
  228. package/dist/matrix.groups-3UH2KOIY.js +25 -0
  229. package/dist/matrix.integration.spec-57YYARQU.js +3156 -0
  230. package/dist/matrix.interactivity-KNRJSSTQ.js +33 -0
  231. package/dist/matrix.layout-OMNDDITA.js +35 -0
  232. package/dist/matrix.legend-SE7SQTNN.js +19 -0
  233. package/dist/matrix.renderers-6MMW7XMU.js +30 -0
  234. package/dist/matrix.serieses-BEZCQDLJ.js +18 -0
  235. package/dist/matrix.sort-KRNS4VPF.js +25 -0
  236. package/dist/matrix.sort.unit.spec-UXTQPKVV.js +464 -0
  237. package/dist/matrix.sorterUi.unit.spec-LJJ7GCEB.js +334 -0
  238. package/dist/matrix.unit.spec-2OSFPN5T.js +146 -0
  239. package/dist/mavb-CZAZO6AO.js +726 -0
  240. package/dist/mds.samplescatterplot-ENSEO2VX.js +1545 -0
  241. package/dist/mds.survivalplot-QSKD6FSX.js +472 -0
  242. package/dist/multivalue-FZTFADA2.js +79 -0
  243. package/dist/numericDictTermCluster-IFIEM3E4.js +62 -0
  244. package/dist/oncomatrix-GZKCAMSR.js +286 -0
  245. package/dist/oncomatrix.spec-FTLMVGTH.js +439 -0
  246. package/dist/plot.2dvaf-PWO4XOFU.js +368 -0
  247. package/dist/plot.app-JYBZEBHK.js +32 -0
  248. package/dist/plot.barplot-PA2PDVOB.js +93 -0
  249. package/dist/plot.boxplot-IHIEWQWG.js +142 -0
  250. package/dist/plot.brainImaging-WQ2WWEW3.js +51 -0
  251. package/dist/plot.disco-QIURLAHA.js +100 -0
  252. package/dist/plot.ssgq-T27XDC4K.js +130 -0
  253. package/dist/plot.vaf2cov-Y2DJRQED.js +249 -0
  254. package/dist/polar2-3MFBRZ4G.js +228 -0
  255. package/dist/profileForms-J3O7XDHY.js +937 -0
  256. package/dist/profilePlot-C45ERAOZ.js +45 -0
  257. package/dist/proteinView-F2EVY7V5.js +1346 -0
  258. package/dist/proteinView-F2EVY7V5.js.map +7 -0
  259. package/dist/proteomeCohortCompare-2IS7GNJZ.js +866 -0
  260. package/dist/pseudbulk.unit.spec-SY3ATAPK.js +82 -0
  261. package/dist/pseudobulk-N6WNHKAC.js +31 -0
  262. package/dist/qualitative-SKUTWJLA.js +34 -0
  263. package/dist/qualitative-XWN5V3EE.js +241 -0
  264. package/dist/radar2-AHZME5CF.js +323 -0
  265. package/dist/radarFacility2-CVEVC4U5.js +331 -0
  266. package/dist/render-S47OJIIP.js +29 -0
  267. package/dist/report-IPX3PKSW.js +213 -0
  268. package/dist/sampleView-OZQUKPVV.js +39 -0
  269. package/dist/samplelst-7XXJTJ4J.js +114 -0
  270. package/dist/samplematrix-JN35HJBG.js +2188 -0
  271. package/dist/sc-6ZHDNPYP.js +77 -0
  272. package/dist/scatter-4MP6TG67.js +84 -0
  273. package/dist/scatter-TRMY47CC.js +919 -0
  274. package/dist/selectGenomeWithTklst-UDNTL544.js +125 -0
  275. package/dist/singleCellCellType-UXABRPQQ.js +29 -0
  276. package/dist/singleCellCellType.unit.spec-N22EQMZW.js +150 -0
  277. package/dist/singleCellGeneExpression-OBPVP6IU.js +29 -0
  278. package/dist/singleCellGeneExpression.unit.spec-NVCFU5B4.js +144 -0
  279. package/dist/singleCellNumericValue-Z2X3LLRB.js +29 -0
  280. package/dist/singleCellNumericValue.unit.spec-Q7DCQHEE.js +412 -0
  281. package/dist/singleCellPlot-S5N6ZEEA.js +44 -0
  282. package/dist/singlecell-OK2P4AS2.js +1562 -0
  283. package/dist/singlecell-RI6HA3NI.js +77 -0
  284. package/dist/snp-XRM2UAEJ.js +29 -0
  285. package/dist/snp.unit.spec-CDTYGH4K.js +167 -0
  286. package/dist/snplocus-CAUGDRZE.js +200 -0
  287. package/dist/snplst-DP533FL2.js +36 -0
  288. package/dist/spliceevent.a53ss.diagram-XWEN4UMO.js +142 -0
  289. package/dist/spliceevent.exonskip.diagram-HBXQOUT4.js +274 -0
  290. package/dist/spliceevent.noeventdiagram-ORQJ62ON.js +451 -0
  291. package/dist/ssGSEA-PLDZ2556.js +29 -0
  292. package/dist/ssGSEA.unit.spec-ORFJFZJY.js +79 -0
  293. package/dist/stattable-GVRVRO2Y.js +112 -0
  294. package/dist/studyCatalog-K46WJHC6.js +457 -0
  295. package/dist/summarizeCnvGeneexp-7WSJTWKH.js +154 -0
  296. package/dist/summarizeGeneexpSurvival-H3TW7I4I.js +101 -0
  297. package/dist/summarizeMutationCnv-JOYXEMFP.js +155 -0
  298. package/dist/summarizeMutationDiagnosis-GBIGXFY5.js +31 -0
  299. package/dist/summarizeMutationSurvival-3RULG3KW.js +95 -0
  300. package/dist/summary-VKLFTPC2.js +40 -0
  301. package/dist/summary.integration.spec-EK3MPFVD.js +405 -0
  302. package/dist/summaryInput-POI5KQSP.js +238 -0
  303. package/dist/sunburst-BIVYHF5R.js +274 -0
  304. package/dist/sunburst-SYHQOCGQ.js +34 -0
  305. package/dist/survival-CG2GQ4YY.js +1248 -0
  306. package/dist/survival-NEO3E2HS.js +49 -0
  307. package/dist/survival.integration.spec-PPK5KO4V.js +609 -0
  308. package/dist/svgraph-Q2U2HEMF.js +1377 -0
  309. package/dist/svmr-HKFHKGLI.js +3574 -0
  310. package/dist/svmr-HKFHKGLI.js.map +7 -0
  311. package/dist/swimmer-GA4C6YH7.js +993 -0
  312. package/dist/table-DJJIES6L.js +192 -0
  313. package/dist/termCollection-CHVUM5C6.js +247 -0
  314. package/dist/termCollection-R3LTBPJ4.js +29 -0
  315. package/dist/termCollection.unit.spec-B7KAAOFT.js +295 -0
  316. package/dist/termCollectionFractionSelection-A72QM36J.js +38 -0
  317. package/dist/termCollectionFractionSelection.unit.spec-JR77QEIG.js +184 -0
  318. package/dist/tk-GRGKFATN.js +38 -0
  319. package/dist/tk-WV2G2UPY.js +1224 -0
  320. package/dist/tk-WV2G2UPY.js.map +7 -0
  321. package/dist/tp.ui-NATRJ5EN.js +1453 -0
  322. package/dist/tvs.categorical-U2ZYLPSW.js +28 -0
  323. package/dist/tvs.condition-6EBZALR4.js +160 -0
  324. package/dist/tvs.dt-H626ESMQ.js +34 -0
  325. package/dist/tvs.dtcnv.categorical-6S7INDYC.js +31 -0
  326. package/dist/tvs.dtcnv.continuous-MLYNEMHI.js +72 -0
  327. package/dist/tvs.dtfusion-2OLY6X7G.js +31 -0
  328. package/dist/tvs.dtitd-Z6MEL5SH.js +31 -0
  329. package/dist/tvs.dtsnvindel-HPBQSCYV.js +31 -0
  330. package/dist/tvs.dtsv-BRRNX64J.js +31 -0
  331. package/dist/tvs.multivalue-H2G7WKAL.js +84 -0
  332. package/dist/tvs.numeric-OKYGMQSK.js +32 -0
  333. package/dist/tvs.samplelst-46FGACU7.js +95 -0
  334. package/dist/tvs.survival-QL4KC3SQ.js +110 -0
  335. package/dist/tvs.termCollection-22DFW3PF.js +118 -0
  336. package/dist/vocabulary-LJEERZJ6.js +32 -0
  337. package/dist/wsi.direct-3GGVEVQ4.js +11600 -0
  338. package/dist/wsi.direct-3GGVEVQ4.js.map +7 -0
  339. package/package.json +3 -3
  340. package/dist/2dmaf-4W2R2HXG.js +0 -1362
  341. package/dist/AggMatrixInput-3SQ7UW5L.js +0 -402
  342. package/dist/AggregateMatrix-QI55DXDU.js +0 -37
  343. package/dist/AppHeader-C26OHIUQ.js +0 -826
  344. package/dist/BoxPlot-27OYBGJ3.js +0 -1247
  345. package/dist/CorrelationVolcano-XIMXCSHG.js +0 -613
  346. package/dist/CorrelationVolcano-XIMXCSHG.js.map +0 -7
  347. package/dist/Cuminc-737O733E.js +0 -1217
  348. package/dist/DE-EDTGDY6L.js +0 -85
  349. package/dist/DEinput-ZN76I5M5.js +0 -479
  350. package/dist/DEinput-ZN76I5M5.js.map +0 -7
  351. package/dist/DM-25IRANGL.js +0 -86
  352. package/dist/DifferentialAnalysis-7HQYEA5T.js +0 -236
  353. package/dist/Disco-4YNXWGRX.js +0 -3445
  354. package/dist/Disco.UI-67HBGS4Y.js +0 -239
  355. package/dist/DmrPlot-KZVDVPUT.js +0 -366
  356. package/dist/GB-HT3B7Y7R.js +0 -1388
  357. package/dist/GB-HT3B7Y7R.js.map +0 -7
  358. package/dist/GSEA-CMFMNK5Y.js +0 -870
  359. package/dist/GeneExpInput-HMGV23E7.js +0 -38
  360. package/dist/Geomap-RB4SGVPC.js +0 -80
  361. package/dist/HicApp-YRP6YQFA.js +0 -2240
  362. package/dist/IDCViewer-OUSOZNSR.js +0 -10810
  363. package/dist/NumBinaryEditor-YFQDPBB6.js +0 -274
  364. package/dist/NumBinaryEditor.unit.spec-6YC5PCPK.js +0 -308
  365. package/dist/NumContEditor-EH6MA2RW.js +0 -100
  366. package/dist/NumContEditor.unit.spec-Q2JBVIRT.js +0 -160
  367. package/dist/NumCustomBinEditor-USQA3BC6.js +0 -29
  368. package/dist/NumCustomBinEditor.unit.spec-PE2HFRCK.js +0 -393
  369. package/dist/NumDiscreteEditor-VKE4WT24.js +0 -165
  370. package/dist/NumDiscreteEditor.unit.spec-JNG673LE.js +0 -229
  371. package/dist/NumRegularBinEditor-KCCPGJSX.js +0 -29
  372. package/dist/NumRegularBinEditor.unit.spec-4BLKQRZU.js +0 -274
  373. package/dist/NumSplineEditor-4YELHGUO.js +0 -205
  374. package/dist/NumSplineEditor.unit.spec-CKHHK6GH.js +0 -220
  375. package/dist/NumericDensity-LCFM7VSY.js +0 -29
  376. package/dist/NumericDensity.unit.spec-R4ARTJ5I.js +0 -414
  377. package/dist/NumericHandler-2OHRSY6Z.js +0 -30
  378. package/dist/NumericHandler.unit.spec-M3TRIFZW.js +0 -225
  379. package/dist/ProteomeInput-G2EP6QH2.js +0 -610
  380. package/dist/Regression-2HKE6C7F.js +0 -1412
  381. package/dist/RunChart2-WRVW63PB.js +0 -744
  382. package/dist/SC-37RDNFGH.js +0 -1290
  383. package/dist/Violin-KD6FPWC7.js +0 -1105
  384. package/dist/Volcano-U62TCDEL.js +0 -2748
  385. package/dist/Volcano-U62TCDEL.js.map +0 -7
  386. package/dist/Wsi-PB77PVAA.js +0 -637
  387. package/dist/Wsi-PB77PVAA.js.map +0 -7
  388. package/dist/aboutSunburst-5Z24ODIN.js +0 -93
  389. package/dist/adSandbox-AFORHU3V.js +0 -29
  390. package/dist/animatedBubbleChart-F75OBRZW.js +0 -542
  391. package/dist/app-4RZ76DZZ.js +0 -28
  392. package/dist/app-IHE3RNI5.js +0 -38
  393. package/dist/bam-IIRZX3IK.js +0 -872
  394. package/dist/barchart-UIHRIMOE.js +0 -38
  395. package/dist/barchart2-DG3S6FDJ.js +0 -305
  396. package/dist/block-COZKGPXY.js +0 -6203
  397. package/dist/block-COZKGPXY.js.map +0 -7
  398. package/dist/block.init-UBXYVTPQ.js +0 -29
  399. package/dist/block.mds.expressionrank-KSXPPPGR.js +0 -350
  400. package/dist/block.mds.geneboxplot-5RDFDVDE.js +0 -819
  401. package/dist/block.mds.junction-LMM24KXJ.js +0 -1534
  402. package/dist/block.mds.svcnv-4XRXZMPS.js +0 -6325
  403. package/dist/block.svg-VAKLMPMS.js +0 -155
  404. package/dist/block.tk.aicheck-6GHZK2YY.js +0 -274
  405. package/dist/block.tk.bam-7H3BSHR2.js +0 -1906
  406. package/dist/block.tk.bigwig.ui-KX2GACY5.js +0 -202
  407. package/dist/block.tk.hicstraw-OOWEWGMF.js +0 -814
  408. package/dist/block.tk.junction-U7W36OZA.js +0 -2353
  409. package/dist/block.tk.junction.textmatrixui-PAMSBYZT.js +0 -190
  410. package/dist/block.tk.ld-RFQPDG7Q.js +0 -90
  411. package/dist/block.tk.menu-JDJU2OGK.js +0 -1050
  412. package/dist/block.tk.pgv-G2UFCQUT.js +0 -934
  413. package/dist/brainImaging-ASAHWZJH.js +0 -550
  414. package/dist/brainRegions-XTJDLUU4.js +0 -213
  415. package/dist/bubbleHeatmap-UPUITTU6.js +0 -374
  416. package/dist/bubbleHeatmap-UPUITTU6.js.map +0 -7
  417. package/dist/cellTypeBubbleHeatmap-25SOXC2Q.js +0 -274
  418. package/dist/cellTypeBubbleHeatmap-25SOXC2Q.js.map +0 -7
  419. package/dist/chunk-2ZYAC3DC.js +0 -299
  420. package/dist/chunk-325X3T7G.js +0 -692
  421. package/dist/chunk-325X3T7G.js.map +0 -7
  422. package/dist/chunk-3UXHTSZJ.js +0 -159
  423. package/dist/chunk-3UXHTSZJ.js.map +0 -7
  424. package/dist/chunk-4DFKK46J.js +0 -96
  425. package/dist/chunk-54W2RWRB.js +0 -123
  426. package/dist/chunk-5QGC2624.js +0 -54
  427. package/dist/chunk-5YKXYWP3.js +0 -480
  428. package/dist/chunk-6B4AME6E.js +0 -4389
  429. package/dist/chunk-6B4AME6E.js.map +0 -7
  430. package/dist/chunk-6H4FFHFQ.js +0 -82
  431. package/dist/chunk-6H4FFHFQ.js.map +0 -7
  432. package/dist/chunk-72QBXULB.js +0 -102
  433. package/dist/chunk-7APH7QLC.js +0 -141
  434. package/dist/chunk-7HBAALWJ.js +0 -2685
  435. package/dist/chunk-7UK7CU4F.js +0 -398
  436. package/dist/chunk-7UK7CU4F.js.map +0 -7
  437. package/dist/chunk-7ZTUUKLX.js +0 -203
  438. package/dist/chunk-A7GCFL3R.js +0 -30
  439. package/dist/chunk-AGWIWLOP.js +0 -14
  440. package/dist/chunk-CHQ43UJQ.js +0 -397
  441. package/dist/chunk-CQWR4QZO.js +0 -70
  442. package/dist/chunk-CQWR4QZO.js.map +0 -7
  443. package/dist/chunk-D6TLBMIX.js +0 -1339
  444. package/dist/chunk-DDABG5BR.js +0 -328
  445. package/dist/chunk-DR5JLHTB.js +0 -35
  446. package/dist/chunk-E2Z4X6C2.js +0 -55
  447. package/dist/chunk-E4WAVMI5.js +0 -194
  448. package/dist/chunk-EM76Y3HQ.js +0 -1253
  449. package/dist/chunk-ES7XNERS.js +0 -468
  450. package/dist/chunk-F2RTD23W.js +0 -848
  451. package/dist/chunk-FEE2HAON.js +0 -418
  452. package/dist/chunk-G5BQJGRA.js +0 -2799
  453. package/dist/chunk-GAYYXHOG.js +0 -257
  454. package/dist/chunk-GDIKNIEA.js +0 -263
  455. package/dist/chunk-GIZTZCE5.js +0 -195
  456. package/dist/chunk-GONC3LVY.js +0 -626
  457. package/dist/chunk-HGC4EON3.js +0 -348
  458. package/dist/chunk-HM23KADV.js +0 -281
  459. package/dist/chunk-I7R6YROK.js +0 -267
  460. package/dist/chunk-JWX6GEWQ.js +0 -276
  461. package/dist/chunk-K4LZR3HU.js +0 -56
  462. package/dist/chunk-K55KOEI6.js +0 -6375
  463. package/dist/chunk-K7YJILBY.js +0 -5254
  464. package/dist/chunk-K7YJILBY.js.map +0 -7
  465. package/dist/chunk-KLJM7HE5.js +0 -2349
  466. package/dist/chunk-LFH5VSSF.js +0 -176
  467. package/dist/chunk-MBWG3QHI.js +0 -1219
  468. package/dist/chunk-MBWG3QHI.js.map +0 -7
  469. package/dist/chunk-MZTVOOR6.js +0 -56
  470. package/dist/chunk-N2JOZ3QD.js +0 -444
  471. package/dist/chunk-NG2U3VHX.js +0 -170
  472. package/dist/chunk-NUGYNLTL.js +0 -2334
  473. package/dist/chunk-OCOB7XJW.js +0 -2008
  474. package/dist/chunk-OGDBTL5C.js +0 -54
  475. package/dist/chunk-OOVVKQSD.js +0 -26747
  476. package/dist/chunk-OOVVKQSD.js.map +0 -7
  477. package/dist/chunk-PAF5KZCR.js +0 -2932
  478. package/dist/chunk-PPICALUF.js +0 -2102
  479. package/dist/chunk-PPICALUF.js.map +0 -7
  480. package/dist/chunk-QFOT5WAZ.js +0 -134
  481. package/dist/chunk-QFQJO7LD.js +0 -472
  482. package/dist/chunk-QFQJO7LD.js.map +0 -7
  483. package/dist/chunk-QGCB5AKN.js +0 -243
  484. package/dist/chunk-QRZRAMHA.js +0 -184
  485. package/dist/chunk-RGOZHZCN.js +0 -103
  486. package/dist/chunk-RJKY22D4.js +0 -240
  487. package/dist/chunk-RZ2HG7G3.js +0 -102
  488. package/dist/chunk-RZ2HG7G3.js.map +0 -7
  489. package/dist/chunk-SI2KSG6E.js +0 -379
  490. package/dist/chunk-U4PLKSSS.js +0 -50
  491. package/dist/chunk-U7G65D2G.js +0 -466
  492. package/dist/chunk-UU3FWU6D.js +0 -305
  493. package/dist/chunk-UXLT7W2N.js +0 -562
  494. package/dist/chunk-VHQDN3OA.js +0 -182
  495. package/dist/chunk-VTMNHAFC.js +0 -30
  496. package/dist/chunk-W3K7KLIR.js +0 -217
  497. package/dist/chunk-WSLS55SH.js +0 -296
  498. package/dist/chunk-XQIB27PB.js +0 -516
  499. package/dist/chunk-XSBGICK5.js +0 -652
  500. package/dist/chunk-XSBGICK5.js.map +0 -7
  501. package/dist/chunk-YHW2RAAG.js +0 -274
  502. package/dist/chunk-Z7CCL464.js +0 -550
  503. package/dist/chunk-ZBNPXXMK.js +0 -42
  504. package/dist/chunk-ZNHC46CT.js +0 -340
  505. package/dist/chunk-ZSTD6Y3K.js +0 -255
  506. package/dist/cohort-ZFGFEEBD.js +0 -66
  507. package/dist/cohortSunburst-EEPGV2RB.js +0 -402
  508. package/dist/condition-7EWFLQSO.js +0 -323
  509. package/dist/controls-QHDSDWKI.js +0 -30
  510. package/dist/controls.config-LBSCZ6GP.js +0 -30
  511. package/dist/correlation-IJQJPNNP.js +0 -91
  512. package/dist/customdata.inputui-TZGX2CUD.js +0 -280
  513. package/dist/dataDownload-33EWD3AD.js +0 -326
  514. package/dist/databrowser.ui-YNKDTAAN.js +0 -424
  515. package/dist/dictionary-OTR6Z5EZ.js +0 -109
  516. package/dist/dnaMethylation-LQTCTOOE.js +0 -29
  517. package/dist/dnaMethylation.integration.spec-U5VQYAK3.js +0 -194
  518. package/dist/dofetch-HLG7G7RX.js +0 -49
  519. package/dist/e2pca-AXDPYR7U.js +0 -340
  520. package/dist/ep-4WK46CH7.js +0 -1247
  521. package/dist/expclust.gdc.spec-CYGWGREQ.js +0 -298
  522. package/dist/facet-IZSSZDHK.js +0 -556
  523. package/dist/gb-AUZBUZFM.js +0 -77
  524. package/dist/geneExpClustering-AQBFLXLP.js +0 -240
  525. package/dist/geneExpression-HDJVPVPK.js +0 -309
  526. package/dist/geneExpression-V4JMTMLI.js +0 -29
  527. package/dist/geneExpression.unit.spec-KFMSDVMX.js +0 -151
  528. package/dist/geneExpression.unit.spec-KFMSDVMX.js.map +0 -7
  529. package/dist/geneORA-LDFFSEMQ.js +0 -269
  530. package/dist/geneRanking-IVKDSNDV.js +0 -544
  531. package/dist/geneVariant-7X7EEUDW.js +0 -289
  532. package/dist/geneVariant-7X7EEUDW.js.map +0 -7
  533. package/dist/geneVariant-TK3FJ22L.js +0 -32
  534. package/dist/geneVariant.integration.spec-ZHAFWQ2O.js +0 -672
  535. package/dist/genefusion.ui-U5YPVXAF.js +0 -299
  536. package/dist/geneset-NSHQ2NDR.js +0 -199
  537. package/dist/genomeBrowser.spec-HP4OQPCV.js +0 -272
  538. package/dist/grin2-5WKONQPG.js +0 -66
  539. package/dist/grin2-V2ZBOJBO.js +0 -945
  540. package/dist/hierCluster-7IOPNYFN.js +0 -55
  541. package/dist/hierCluster-IDBCUKHJ.js +0 -51
  542. package/dist/hierCluster.config-Z4NRL5P5.js +0 -32
  543. package/dist/hierCluster.integration.spec-PHEXOGPI.js +0 -479
  544. package/dist/hierCluster.interactivity-NHZ5EPBV.js +0 -45
  545. package/dist/hierCluster.renderers-WXJUMDFN.js +0 -18
  546. package/dist/imagePlot-NMNCAYS7.js +0 -152
  547. package/dist/importPlot-HZML5XMJ.js +0 -8
  548. package/dist/isoformExpression-4IU4AUQ2.js +0 -31
  549. package/dist/isoformExpression.unit.spec-KKMKU5Z2.js +0 -233
  550. package/dist/junction-EXA2WANI.js +0 -32
  551. package/dist/junction.unit.spec-H3FGTLEP.js +0 -178
  552. package/dist/junction.unit.spec-H3FGTLEP.js.map +0 -7
  553. package/dist/launch.adhoc-YA6FRHSC.js +0 -33
  554. package/dist/leftlabel.sample-N6M4OL2X.js +0 -254
  555. package/dist/leftlabel.sample-N6M4OL2X.js.map +0 -7
  556. package/dist/lollipop-EWLGYDIR.js +0 -162
  557. package/dist/maf-PXMHR3PY.js +0 -451
  558. package/dist/maftimeline-QFKT7PW2.js +0 -583
  559. package/dist/matrix-KASG3KIY.js +0 -55
  560. package/dist/matrix-VSX63V3L.js +0 -50
  561. package/dist/matrix.cells-7TTOQRWU.js +0 -25
  562. package/dist/matrix.config-U3I726EC.js +0 -33
  563. package/dist/matrix.data-Y4DXSR2P.js +0 -22
  564. package/dist/matrix.groups-C5CHYWQZ.js +0 -25
  565. package/dist/matrix.integration.spec-4KWLFXMY.js +0 -3156
  566. package/dist/matrix.interactivity-JK6URU6Z.js +0 -33
  567. package/dist/matrix.layout-KKOA7GGL.js +0 -35
  568. package/dist/matrix.legend-3FFHXTLX.js +0 -19
  569. package/dist/matrix.renderers-F7EWYQWL.js +0 -30
  570. package/dist/matrix.serieses-I4JWWONC.js +0 -18
  571. package/dist/matrix.sort-5JTCLBPB.js +0 -25
  572. package/dist/matrix.sort.unit.spec-EW53F5DT.js +0 -464
  573. package/dist/matrix.sorterUi.unit.spec-OGTYY6GC.js +0 -334
  574. package/dist/matrix.unit.spec-RXKKHRUN.js +0 -146
  575. package/dist/mavb-YI2WEGFI.js +0 -726
  576. package/dist/mds.samplescatterplot-GGJE67MF.js +0 -1545
  577. package/dist/mds.survivalplot-A6DS6FHO.js +0 -472
  578. package/dist/multivalue-3WCYDVL3.js +0 -79
  579. package/dist/numericDictTermCluster-AOTEPNEI.js +0 -62
  580. package/dist/oncomatrix-BB4SB5AJ.js +0 -286
  581. package/dist/oncomatrix.spec-M4ZC3KFC.js +0 -439
  582. package/dist/plot.2dvaf-QUD743E6.js +0 -368
  583. package/dist/plot.app-35I4DJXK.js +0 -32
  584. package/dist/plot.barplot-7OL4HWZB.js +0 -93
  585. package/dist/plot.boxplot-N2VSPDYA.js +0 -142
  586. package/dist/plot.brainImaging-4PIAFROV.js +0 -51
  587. package/dist/plot.disco-6CFYMWU3.js +0 -100
  588. package/dist/plot.ssgq-MGUBQNWE.js +0 -130
  589. package/dist/plot.vaf2cov-KVI2GMG4.js +0 -249
  590. package/dist/polar2-IGAOHGPE.js +0 -228
  591. package/dist/profileForms-MW7JQURG.js +0 -937
  592. package/dist/profilePlot-OVOSFR47.js +0 -45
  593. package/dist/proteinView-LFP5YYMK.js +0 -1346
  594. package/dist/proteinView-LFP5YYMK.js.map +0 -7
  595. package/dist/proteomeCohortCompare-ONYL2UN4.js +0 -866
  596. package/dist/pseudbulk.unit.spec-CGV4JTEK.js +0 -82
  597. package/dist/pseudobulk-WFCQX5KR.js +0 -31
  598. package/dist/qualitative-4SLUE6BW.js +0 -241
  599. package/dist/qualitative-6H674T7D.js +0 -34
  600. package/dist/radar2-QXHO2MQA.js +0 -323
  601. package/dist/radarFacility2-JCVOYMH4.js +0 -331
  602. package/dist/render-IIFS3Y2N.js +0 -29
  603. package/dist/report-NFBB3PUI.js +0 -213
  604. package/dist/sampleView-XQXKIPC7.js +0 -39
  605. package/dist/samplelst-RIC5E2W4.js +0 -114
  606. package/dist/samplematrix-WLCFCPBR.js +0 -2188
  607. package/dist/sc-TXRF7D6F.js +0 -77
  608. package/dist/scatter-JUGGPR4B.js +0 -919
  609. package/dist/scatter-YQ47446T.js +0 -84
  610. package/dist/selectGenomeWithTklst-2ELB6HQK.js +0 -125
  611. package/dist/singleCellCellType-DUTH4SZF.js +0 -29
  612. package/dist/singleCellCellType.unit.spec-PWP6I5PZ.js +0 -150
  613. package/dist/singleCellGeneExpression-3563T7GE.js +0 -29
  614. package/dist/singleCellGeneExpression.unit.spec-66IDCFJC.js +0 -144
  615. package/dist/singleCellNumericValue-XVQTKLTS.js +0 -29
  616. package/dist/singleCellNumericValue.unit.spec-LJSTGKNS.js +0 -412
  617. package/dist/singleCellPlot-MKYJJXSG.js +0 -44
  618. package/dist/singlecell-ANCWPAAO.js +0 -1562
  619. package/dist/singlecell-KMRVFOC5.js +0 -77
  620. package/dist/snp-B5UHGWVD.js +0 -29
  621. package/dist/snp.unit.spec-YAHITASM.js +0 -167
  622. package/dist/snplocus-MLGICRGT.js +0 -200
  623. package/dist/snplst-DZPIQEKI.js +0 -36
  624. package/dist/spliceevent.a53ss.diagram-4NYPSFC2.js +0 -142
  625. package/dist/spliceevent.exonskip.diagram-WLLTP7NP.js +0 -274
  626. package/dist/spliceevent.noeventdiagram-NOSO752Y.js +0 -451
  627. package/dist/ssGSEA-4DVY6Z5U.js +0 -29
  628. package/dist/ssGSEA.unit.spec-UDXV4Q7S.js +0 -79
  629. package/dist/stattable-T5X76Q32.js +0 -112
  630. package/dist/studyCatalog-O3EPBJPW.js +0 -457
  631. package/dist/summarizeCnvGeneexp-ST36TPEJ.js +0 -154
  632. package/dist/summarizeGeneexpSurvival-AZOFCBMT.js +0 -101
  633. package/dist/summarizeMutationCnv-HRCW6BYV.js +0 -155
  634. package/dist/summarizeMutationDiagnosis-RQQO2MOR.js +0 -31
  635. package/dist/summarizeMutationSurvival-UHSUJ7FU.js +0 -95
  636. package/dist/summary-ZMM5ET67.js +0 -40
  637. package/dist/summary.integration.spec-GW5UGDDU.js +0 -405
  638. package/dist/summaryInput-ZO5TPARQ.js +0 -238
  639. package/dist/sunburst-6VJS2SUY.js +0 -34
  640. package/dist/sunburst-LXRG2SFE.js +0 -274
  641. package/dist/survival-QXHY7JRR.js +0 -49
  642. package/dist/survival-U6J6KFN2.js +0 -1248
  643. package/dist/survival.integration.spec-HN3LL6IY.js +0 -609
  644. package/dist/svgraph-CVI27CTM.js +0 -1377
  645. package/dist/svmr-GZHAP5IV.js +0 -3834
  646. package/dist/svmr-GZHAP5IV.js.map +0 -7
  647. package/dist/swimmer-M4JGBO72.js +0 -993
  648. package/dist/table-QO22C2ER.js +0 -192
  649. package/dist/termCollection-EN73BZV5.js +0 -247
  650. package/dist/termCollection-KWNFLRWJ.js +0 -29
  651. package/dist/termCollection.unit.spec-Z27AZUE6.js +0 -295
  652. package/dist/termCollectionFractionSelection-Q7QFEPKA.js +0 -38
  653. package/dist/termCollectionFractionSelection.unit.spec-PYLIFZN5.js +0 -184
  654. package/dist/tk-BISILMKL.js +0 -1198
  655. package/dist/tk-BISILMKL.js.map +0 -7
  656. package/dist/tk-WVEDS5OU.js +0 -38
  657. package/dist/tp.ui-CG36YXBY.js +0 -1453
  658. package/dist/tvs.categorical-GCJISWBS.js +0 -28
  659. package/dist/tvs.condition-YTCVMB3I.js +0 -160
  660. package/dist/tvs.dt-UCSZ5S44.js +0 -34
  661. package/dist/tvs.dtcnv.categorical-KYB6XPL3.js +0 -31
  662. package/dist/tvs.dtcnv.continuous-MJWJNMKJ.js +0 -72
  663. package/dist/tvs.dtfusion-IZCEMTH5.js +0 -31
  664. package/dist/tvs.dtitd-DZ4WWGNO.js +0 -31
  665. package/dist/tvs.dtsnvindel-PMJCV4E7.js +0 -31
  666. package/dist/tvs.dtsv-5K2RNWDH.js +0 -31
  667. package/dist/tvs.multivalue-6NSC6JPR.js +0 -84
  668. package/dist/tvs.numeric-7U2NDY4A.js +0 -32
  669. package/dist/tvs.samplelst-3SIYTFWZ.js +0 -95
  670. package/dist/tvs.survival-Q3F5SLBW.js +0 -110
  671. package/dist/tvs.termCollection-OR73LBNX.js +0 -118
  672. package/dist/vocabulary-RWRAQ4VJ.js +0 -32
  673. package/dist/wsi.direct-HABLR3IF.js +0 -11515
  674. package/dist/wsi.direct-HABLR3IF.js.map +0 -7
  675. /package/dist/{2dmaf-4W2R2HXG.js.map → 2dmaf-B34EJADN.js.map} +0 -0
  676. /package/dist/{AggMatrixInput-3SQ7UW5L.js.map → AggMatrixInput-USCXGZT2.js.map} +0 -0
  677. /package/dist/{AggregateMatrix-QI55DXDU.js.map → AggregateMatrix-VLCSBD65.js.map} +0 -0
  678. /package/dist/{AppHeader-C26OHIUQ.js.map → AppHeader-KE7QVEW5.js.map} +0 -0
  679. /package/dist/{BoxPlot-27OYBGJ3.js.map → BoxPlot-3H5QKYRD.js.map} +0 -0
  680. /package/dist/{Cuminc-737O733E.js.map → Cuminc-6LPS4LR7.js.map} +0 -0
  681. /package/dist/{DE-EDTGDY6L.js.map → DE-TTKEQYC7.js.map} +0 -0
  682. /package/dist/{DM-25IRANGL.js.map → DM-2TUF6Q3C.js.map} +0 -0
  683. /package/dist/{DifferentialAnalysis-7HQYEA5T.js.map → DifferentialAnalysis-3LP4RAWF.js.map} +0 -0
  684. /package/dist/{Disco-4YNXWGRX.js.map → Disco-UP5C7UWX.js.map} +0 -0
  685. /package/dist/{Disco.UI-67HBGS4Y.js.map → Disco.UI-V4I4LOMF.js.map} +0 -0
  686. /package/dist/{DmrPlot-KZVDVPUT.js.map → DmrPlot-TZR2NGIH.js.map} +0 -0
  687. /package/dist/{GSEA-CMFMNK5Y.js.map → GSEA-YGKBRJJO.js.map} +0 -0
  688. /package/dist/{GeneExpInput-HMGV23E7.js.map → GeneExpInput-L3J2ECVQ.js.map} +0 -0
  689. /package/dist/{Geomap-RB4SGVPC.js.map → Geomap-4MHU6F57.js.map} +0 -0
  690. /package/dist/{HicApp-YRP6YQFA.js.map → HicApp-27VGP5F6.js.map} +0 -0
  691. /package/dist/{IDCViewer-OUSOZNSR.js.map → IDCViewer-37GJPPUY.js.map} +0 -0
  692. /package/dist/{NumBinaryEditor-YFQDPBB6.js.map → NumBinaryEditor-SEC2NDGG.js.map} +0 -0
  693. /package/dist/{NumBinaryEditor.unit.spec-6YC5PCPK.js.map → NumBinaryEditor.unit.spec-UDYSUC4S.js.map} +0 -0
  694. /package/dist/{NumContEditor-EH6MA2RW.js.map → NumContEditor-YPSYWU2A.js.map} +0 -0
  695. /package/dist/{NumContEditor.unit.spec-Q2JBVIRT.js.map → NumContEditor.unit.spec-NHFBMHQ5.js.map} +0 -0
  696. /package/dist/{NumCustomBinEditor-USQA3BC6.js.map → NumCustomBinEditor-N7US5Q64.js.map} +0 -0
  697. /package/dist/{NumCustomBinEditor.unit.spec-PE2HFRCK.js.map → NumCustomBinEditor.unit.spec-2BMMUBYU.js.map} +0 -0
  698. /package/dist/{NumDiscreteEditor-VKE4WT24.js.map → NumDiscreteEditor-BLQ5DEB7.js.map} +0 -0
  699. /package/dist/{NumDiscreteEditor.unit.spec-JNG673LE.js.map → NumDiscreteEditor.unit.spec-JOFPUFU5.js.map} +0 -0
  700. /package/dist/{NumRegularBinEditor-KCCPGJSX.js.map → NumRegularBinEditor-7BFPBUW2.js.map} +0 -0
  701. /package/dist/{NumRegularBinEditor.unit.spec-4BLKQRZU.js.map → NumRegularBinEditor.unit.spec-6GZMNRHA.js.map} +0 -0
  702. /package/dist/{NumSplineEditor-4YELHGUO.js.map → NumSplineEditor-LO3ZR3T3.js.map} +0 -0
  703. /package/dist/{NumSplineEditor.unit.spec-CKHHK6GH.js.map → NumSplineEditor.unit.spec-MRA3DQSB.js.map} +0 -0
  704. /package/dist/{NumericDensity-LCFM7VSY.js.map → NumericDensity-NUCVJZ74.js.map} +0 -0
  705. /package/dist/{NumericDensity.unit.spec-R4ARTJ5I.js.map → NumericDensity.unit.spec-TZLKWH4U.js.map} +0 -0
  706. /package/dist/{NumericHandler-2OHRSY6Z.js.map → NumericHandler-NH533VBN.js.map} +0 -0
  707. /package/dist/{NumericHandler.unit.spec-M3TRIFZW.js.map → NumericHandler.unit.spec-V7MNEHML.js.map} +0 -0
  708. /package/dist/{ProteomeInput-G2EP6QH2.js.map → ProteomeInput-FEXWZOA2.js.map} +0 -0
  709. /package/dist/{Regression-2HKE6C7F.js.map → Regression-NJAPUGT7.js.map} +0 -0
  710. /package/dist/{RunChart2-WRVW63PB.js.map → RunChart2-QIJ6NUWY.js.map} +0 -0
  711. /package/dist/{SC-37RDNFGH.js.map → SC-5NWBVOEE.js.map} +0 -0
  712. /package/dist/{Violin-KD6FPWC7.js.map → Violin-TMACI43Q.js.map} +0 -0
  713. /package/dist/{aboutSunburst-5Z24ODIN.js.map → aboutSunburst-53YAWTV5.js.map} +0 -0
  714. /package/dist/{adSandbox-AFORHU3V.js.map → adSandbox-7VHXEI7W.js.map} +0 -0
  715. /package/dist/{animatedBubbleChart-F75OBRZW.js.map → animatedBubbleChart-CTFGJIRR.js.map} +0 -0
  716. /package/dist/{app-4RZ76DZZ.js.map → app-AQAQAPUN.js.map} +0 -0
  717. /package/dist/{app-IHE3RNI5.js.map → app-SZDIV5U4.js.map} +0 -0
  718. /package/dist/{bam-IIRZX3IK.js.map → bam-3U5R2KNC.js.map} +0 -0
  719. /package/dist/{barchart-UIHRIMOE.js.map → barchart-ZL5VSR7P.js.map} +0 -0
  720. /package/dist/{barchart2-DG3S6FDJ.js.map → barchart2-YELP2HI7.js.map} +0 -0
  721. /package/dist/{block.init-UBXYVTPQ.js.map → block.init-IBITFICI.js.map} +0 -0
  722. /package/dist/{block.mds.expressionrank-KSXPPPGR.js.map → block.mds.expressionrank-4L76ILD4.js.map} +0 -0
  723. /package/dist/{block.mds.geneboxplot-5RDFDVDE.js.map → block.mds.geneboxplot-XA7DFHPV.js.map} +0 -0
  724. /package/dist/{block.mds.junction-LMM24KXJ.js.map → block.mds.junction-GTZD3HEN.js.map} +0 -0
  725. /package/dist/{block.mds.svcnv-4XRXZMPS.js.map → block.mds.svcnv-HTXQ3LGR.js.map} +0 -0
  726. /package/dist/{block.svg-VAKLMPMS.js.map → block.svg-BM6OMVRF.js.map} +0 -0
  727. /package/dist/{block.tk.aicheck-6GHZK2YY.js.map → block.tk.aicheck-CV53ULEP.js.map} +0 -0
  728. /package/dist/{block.tk.bam-7H3BSHR2.js.map → block.tk.bam-KJYFNJCX.js.map} +0 -0
  729. /package/dist/{block.tk.bigwig.ui-KX2GACY5.js.map → block.tk.bigwig.ui-A352D6PT.js.map} +0 -0
  730. /package/dist/{block.tk.hicstraw-OOWEWGMF.js.map → block.tk.hicstraw-QAFTQESL.js.map} +0 -0
  731. /package/dist/{block.tk.junction-U7W36OZA.js.map → block.tk.junction-XURB4RWZ.js.map} +0 -0
  732. /package/dist/{block.tk.junction.textmatrixui-PAMSBYZT.js.map → block.tk.junction.textmatrixui-RNRWWNGY.js.map} +0 -0
  733. /package/dist/{block.tk.ld-RFQPDG7Q.js.map → block.tk.ld-GWJMVPX3.js.map} +0 -0
  734. /package/dist/{block.tk.menu-JDJU2OGK.js.map → block.tk.menu-BJZYFMQX.js.map} +0 -0
  735. /package/dist/{block.tk.pgv-G2UFCQUT.js.map → block.tk.pgv-7XNJTHEW.js.map} +0 -0
  736. /package/dist/{brainImaging-ASAHWZJH.js.map → brainImaging-37EDZLGN.js.map} +0 -0
  737. /package/dist/{brainRegions-XTJDLUU4.js.map → brainRegions-FEW52QUB.js.map} +0 -0
  738. /package/dist/{chunk-A7GCFL3R.js.map → chunk-2B3CYHUF.js.map} +0 -0
  739. /package/dist/{chunk-HGC4EON3.js.map → chunk-2IAELUCN.js.map} +0 -0
  740. /package/dist/{chunk-GIZTZCE5.js.map → chunk-2W6U53AG.js.map} +0 -0
  741. /package/dist/{chunk-D6TLBMIX.js.map → chunk-46GCGTHJ.js.map} +0 -0
  742. /package/dist/{chunk-4DFKK46J.js.map → chunk-4ZX5KHD7.js.map} +0 -0
  743. /package/dist/{chunk-U7G65D2G.js.map → chunk-544DSOC3.js.map} +0 -0
  744. /package/dist/{chunk-E4WAVMI5.js.map → chunk-6CV3YVJD.js.map} +0 -0
  745. /package/dist/{chunk-JWX6GEWQ.js.map → chunk-6UHSGC6G.js.map} +0 -0
  746. /package/dist/{chunk-DR5JLHTB.js.map → chunk-6ZZGFZV2.js.map} +0 -0
  747. /package/dist/{chunk-K55KOEI6.js.map → chunk-72FUMSAN.js.map} +0 -0
  748. /package/dist/{chunk-VHQDN3OA.js.map → chunk-7DC4PD5R.js.map} +0 -0
  749. /package/dist/{chunk-QGCB5AKN.js.map → chunk-7ISYXUJ7.js.map} +0 -0
  750. /package/dist/{chunk-VTMNHAFC.js.map → chunk-7NVFEGCE.js.map} +0 -0
  751. /package/dist/{chunk-EM76Y3HQ.js.map → chunk-7PQ6MLKG.js.map} +0 -0
  752. /package/dist/{chunk-K4LZR3HU.js.map → chunk-BGPRKPKH.js.map} +0 -0
  753. /package/dist/{chunk-5YKXYWP3.js.map → chunk-BILGOVOR.js.map} +0 -0
  754. /package/dist/{chunk-OCOB7XJW.js.map → chunk-BKJLRLQQ.js.map} +0 -0
  755. /package/dist/{chunk-54W2RWRB.js.map → chunk-C4BKP67I.js.map} +0 -0
  756. /package/dist/{chunk-DDABG5BR.js.map → chunk-CQNTAIM3.js.map} +0 -0
  757. /package/dist/{chunk-7HBAALWJ.js.map → chunk-CW3IVTRX.js.map} +0 -0
  758. /package/dist/{chunk-XQIB27PB.js.map → chunk-D7KZWYP5.js.map} +0 -0
  759. /package/dist/{chunk-F2RTD23W.js.map → chunk-DNXOZATD.js.map} +0 -0
  760. /package/dist/{chunk-NUGYNLTL.js.map → chunk-DXF3YDRG.js.map} +0 -0
  761. /package/dist/{chunk-GONC3LVY.js.map → chunk-ECBVUPDE.js.map} +0 -0
  762. /package/dist/{chunk-GAYYXHOG.js.map → chunk-ES22B563.js.map} +0 -0
  763. /package/dist/{chunk-ZBNPXXMK.js.map → chunk-FA2B6PKK.js.map} +0 -0
  764. /package/dist/{chunk-PAF5KZCR.js.map → chunk-FMHSDIVG.js.map} +0 -0
  765. /package/dist/{chunk-ZSTD6Y3K.js.map → chunk-G5UFOMON.js.map} +0 -0
  766. /package/dist/{chunk-Z7CCL464.js.map → chunk-GKA6USKV.js.map} +0 -0
  767. /package/dist/{chunk-2ZYAC3DC.js.map → chunk-HGIPR72Y.js.map} +0 -0
  768. /package/dist/{chunk-ES7XNERS.js.map → chunk-IBUDYN5E.js.map} +0 -0
  769. /package/dist/{chunk-FEE2HAON.js.map → chunk-J37WYVIZ.js.map} +0 -0
  770. /package/dist/{chunk-CHQ43UJQ.js.map → chunk-JG5CF5Q3.js.map} +0 -0
  771. /package/dist/{chunk-GDIKNIEA.js.map → chunk-JSQH233D.js.map} +0 -0
  772. /package/dist/{chunk-WSLS55SH.js.map → chunk-JWWLSDVM.js.map} +0 -0
  773. /package/dist/{chunk-ZNHC46CT.js.map → chunk-KTJUDDVQ.js.map} +0 -0
  774. /package/dist/{chunk-E2Z4X6C2.js.map → chunk-MY5MF4RI.js.map} +0 -0
  775. /package/dist/{chunk-MZTVOOR6.js.map → chunk-P4ZGUPGA.js.map} +0 -0
  776. /package/dist/{chunk-YHW2RAAG.js.map → chunk-PQDYA3ZQ.js.map} +0 -0
  777. /package/dist/{chunk-LFH5VSSF.js.map → chunk-PVJ6IIFA.js.map} +0 -0
  778. /package/dist/{chunk-QRZRAMHA.js.map → chunk-QKVKQD6S.js.map} +0 -0
  779. /package/dist/{chunk-7APH7QLC.js.map → chunk-R6O3FLKW.js.map} +0 -0
  780. /package/dist/{chunk-OGDBTL5C.js.map → chunk-RFQQRF6Q.js.map} +0 -0
  781. /package/dist/{chunk-I7R6YROK.js.map → chunk-RG27DDKN.js.map} +0 -0
  782. /package/dist/{chunk-UXLT7W2N.js.map → chunk-SB5DR4NL.js.map} +0 -0
  783. /package/dist/{chunk-G5BQJGRA.js.map → chunk-SF42FFDZ.js.map} +0 -0
  784. /package/dist/{chunk-AGWIWLOP.js.map → chunk-SORR4JHU.js.map} +0 -0
  785. /package/dist/{chunk-U4PLKSSS.js.map → chunk-SZEBQMZW.js.map} +0 -0
  786. /package/dist/{chunk-72QBXULB.js.map → chunk-THDOHHDN.js.map} +0 -0
  787. /package/dist/{chunk-UU3FWU6D.js.map → chunk-TXDCZOPG.js.map} +0 -0
  788. /package/dist/{chunk-5QGC2624.js.map → chunk-U6GSEOBY.js.map} +0 -0
  789. /package/dist/{chunk-7ZTUUKLX.js.map → chunk-UBTNM5RO.js.map} +0 -0
  790. /package/dist/{chunk-N2JOZ3QD.js.map → chunk-UHZDDPUU.js.map} +0 -0
  791. /package/dist/{chunk-QFOT5WAZ.js.map → chunk-UVES3USV.js.map} +0 -0
  792. /package/dist/{chunk-HM23KADV.js.map → chunk-UYA5LCAR.js.map} +0 -0
  793. /package/dist/{chunk-SI2KSG6E.js.map → chunk-VHEXNBCO.js.map} +0 -0
  794. /package/dist/{chunk-KLJM7HE5.js.map → chunk-VVWZ4BOI.js.map} +0 -0
  795. /package/dist/{chunk-NG2U3VHX.js.map → chunk-WENNRY5E.js.map} +0 -0
  796. /package/dist/{chunk-RGOZHZCN.js.map → chunk-WTLUZOBK.js.map} +0 -0
  797. /package/dist/{chunk-W3K7KLIR.js.map → chunk-ZLEGHQOO.js.map} +0 -0
  798. /package/dist/{chunk-RJKY22D4.js.map → chunk-ZX7527EE.js.map} +0 -0
  799. /package/dist/{cohort-ZFGFEEBD.js.map → cohort-NKRTCX5Z.js.map} +0 -0
  800. /package/dist/{cohortSunburst-EEPGV2RB.js.map → cohortSunburst-DFJW6WXU.js.map} +0 -0
  801. /package/dist/{condition-7EWFLQSO.js.map → condition-PYFOEVX5.js.map} +0 -0
  802. /package/dist/{controls-QHDSDWKI.js.map → controls-RVNIN66W.js.map} +0 -0
  803. /package/dist/{controls.config-LBSCZ6GP.js.map → controls.config-XVEYYBI4.js.map} +0 -0
  804. /package/dist/{correlation-IJQJPNNP.js.map → correlation-MNL4DGSW.js.map} +0 -0
  805. /package/dist/{customdata.inputui-TZGX2CUD.js.map → customdata.inputui-WFIIJATQ.js.map} +0 -0
  806. /package/dist/{dataDownload-33EWD3AD.js.map → dataDownload-CMSP5FA4.js.map} +0 -0
  807. /package/dist/{databrowser.ui-YNKDTAAN.js.map → databrowser.ui-FYZPXXEJ.js.map} +0 -0
  808. /package/dist/{dictionary-OTR6Z5EZ.js.map → dictionary-76BXY6WU.js.map} +0 -0
  809. /package/dist/{dnaMethylation-LQTCTOOE.js.map → dnaMethylation-WTIJVNIU.js.map} +0 -0
  810. /package/dist/{dnaMethylation.integration.spec-U5VQYAK3.js.map → dnaMethylation.integration.spec-YXQEFLC5.js.map} +0 -0
  811. /package/dist/{dofetch-HLG7G7RX.js.map → dofetch-XID2XEJT.js.map} +0 -0
  812. /package/dist/{e2pca-AXDPYR7U.js.map → e2pca-DD6DA7X3.js.map} +0 -0
  813. /package/dist/{ep-4WK46CH7.js.map → ep-S4PI4AUJ.js.map} +0 -0
  814. /package/dist/{expclust.gdc.spec-CYGWGREQ.js.map → expclust.gdc.spec-BDV4RJO6.js.map} +0 -0
  815. /package/dist/{facet-IZSSZDHK.js.map → facet-EOXEW2LN.js.map} +0 -0
  816. /package/dist/{gb-AUZBUZFM.js.map → gb-AKE7RDPB.js.map} +0 -0
  817. /package/dist/{geneExpClustering-AQBFLXLP.js.map → geneExpClustering-73ED7HIN.js.map} +0 -0
  818. /package/dist/{geneExpression-V4JMTMLI.js.map → geneExpression-AEJILDKJ.js.map} +0 -0
  819. /package/dist/{geneExpression-HDJVPVPK.js.map → geneExpression-NXDXXKEA.js.map} +0 -0
  820. /package/dist/{geneORA-LDFFSEMQ.js.map → geneORA-7KFQ4PW2.js.map} +0 -0
  821. /package/dist/{geneRanking-IVKDSNDV.js.map → geneRanking-RKJU4PM2.js.map} +0 -0
  822. /package/dist/{geneVariant-TK3FJ22L.js.map → geneVariant-2AGC3ECG.js.map} +0 -0
  823. /package/dist/{geneVariant.integration.spec-ZHAFWQ2O.js.map → geneVariant.integration.spec-UJXGQEZG.js.map} +0 -0
  824. /package/dist/{genefusion.ui-U5YPVXAF.js.map → genefusion.ui-KEBOA3TK.js.map} +0 -0
  825. /package/dist/{geneset-NSHQ2NDR.js.map → geneset-BU6V3CB5.js.map} +0 -0
  826. /package/dist/{genomeBrowser.spec-HP4OQPCV.js.map → genomeBrowser.spec-BGQHJZKH.js.map} +0 -0
  827. /package/dist/{grin2-5WKONQPG.js.map → grin2-OUZN5LOU.js.map} +0 -0
  828. /package/dist/{grin2-V2ZBOJBO.js.map → grin2-WRGQ7BDG.js.map} +0 -0
  829. /package/dist/{hierCluster-7IOPNYFN.js.map → hierCluster-3ERW47JJ.js.map} +0 -0
  830. /package/dist/{hierCluster-IDBCUKHJ.js.map → hierCluster-JAFKBC6C.js.map} +0 -0
  831. /package/dist/{hierCluster.config-Z4NRL5P5.js.map → hierCluster.config-QIJNY5OD.js.map} +0 -0
  832. /package/dist/{hierCluster.integration.spec-PHEXOGPI.js.map → hierCluster.integration.spec-XA4K3UU6.js.map} +0 -0
  833. /package/dist/{hierCluster.interactivity-NHZ5EPBV.js.map → hierCluster.interactivity-RDFPQOOP.js.map} +0 -0
  834. /package/dist/{hierCluster.renderers-WXJUMDFN.js.map → hierCluster.renderers-SU5IYI33.js.map} +0 -0
  835. /package/dist/{imagePlot-NMNCAYS7.js.map → imagePlot-J4PHG7V2.js.map} +0 -0
  836. /package/dist/{importPlot-HZML5XMJ.js.map → importPlot-U67MZZXY.js.map} +0 -0
  837. /package/dist/{isoformExpression-4IU4AUQ2.js.map → isoformExpression-K5BCDJLL.js.map} +0 -0
  838. /package/dist/{isoformExpression.unit.spec-KKMKU5Z2.js.map → isoformExpression.unit.spec-35FHEO27.js.map} +0 -0
  839. /package/dist/{junction-EXA2WANI.js.map → junction-6GGWFF2J.js.map} +0 -0
  840. /package/dist/{launch.adhoc-YA6FRHSC.js.map → launch.adhoc-ONCSL65L.js.map} +0 -0
  841. /package/dist/{lollipop-EWLGYDIR.js.map → lollipop-BWP4BG7Q.js.map} +0 -0
  842. /package/dist/{maf-PXMHR3PY.js.map → maf-GV6JHWYK.js.map} +0 -0
  843. /package/dist/{maftimeline-QFKT7PW2.js.map → maftimeline-HE7XLJWG.js.map} +0 -0
  844. /package/dist/{matrix-KASG3KIY.js.map → matrix-IAM6SA7K.js.map} +0 -0
  845. /package/dist/{matrix-VSX63V3L.js.map → matrix-QF5MBV5Y.js.map} +0 -0
  846. /package/dist/{matrix.cells-7TTOQRWU.js.map → matrix.cells-A5E63KDN.js.map} +0 -0
  847. /package/dist/{matrix.config-U3I726EC.js.map → matrix.config-VLRMO7J2.js.map} +0 -0
  848. /package/dist/{matrix.data-Y4DXSR2P.js.map → matrix.data-R4FW2PQH.js.map} +0 -0
  849. /package/dist/{matrix.groups-C5CHYWQZ.js.map → matrix.groups-3UH2KOIY.js.map} +0 -0
  850. /package/dist/{matrix.integration.spec-4KWLFXMY.js.map → matrix.integration.spec-57YYARQU.js.map} +0 -0
  851. /package/dist/{matrix.interactivity-JK6URU6Z.js.map → matrix.interactivity-KNRJSSTQ.js.map} +0 -0
  852. /package/dist/{matrix.layout-KKOA7GGL.js.map → matrix.layout-OMNDDITA.js.map} +0 -0
  853. /package/dist/{matrix.legend-3FFHXTLX.js.map → matrix.legend-SE7SQTNN.js.map} +0 -0
  854. /package/dist/{matrix.renderers-F7EWYQWL.js.map → matrix.renderers-6MMW7XMU.js.map} +0 -0
  855. /package/dist/{matrix.serieses-I4JWWONC.js.map → matrix.serieses-BEZCQDLJ.js.map} +0 -0
  856. /package/dist/{matrix.sort-5JTCLBPB.js.map → matrix.sort-KRNS4VPF.js.map} +0 -0
  857. /package/dist/{matrix.sort.unit.spec-EW53F5DT.js.map → matrix.sort.unit.spec-UXTQPKVV.js.map} +0 -0
  858. /package/dist/{matrix.sorterUi.unit.spec-OGTYY6GC.js.map → matrix.sorterUi.unit.spec-LJJ7GCEB.js.map} +0 -0
  859. /package/dist/{matrix.unit.spec-RXKKHRUN.js.map → matrix.unit.spec-2OSFPN5T.js.map} +0 -0
  860. /package/dist/{mavb-YI2WEGFI.js.map → mavb-CZAZO6AO.js.map} +0 -0
  861. /package/dist/{mds.samplescatterplot-GGJE67MF.js.map → mds.samplescatterplot-ENSEO2VX.js.map} +0 -0
  862. /package/dist/{mds.survivalplot-A6DS6FHO.js.map → mds.survivalplot-QSKD6FSX.js.map} +0 -0
  863. /package/dist/{multivalue-3WCYDVL3.js.map → multivalue-FZTFADA2.js.map} +0 -0
  864. /package/dist/{numericDictTermCluster-AOTEPNEI.js.map → numericDictTermCluster-IFIEM3E4.js.map} +0 -0
  865. /package/dist/{oncomatrix-BB4SB5AJ.js.map → oncomatrix-GZKCAMSR.js.map} +0 -0
  866. /package/dist/{oncomatrix.spec-M4ZC3KFC.js.map → oncomatrix.spec-FTLMVGTH.js.map} +0 -0
  867. /package/dist/{plot.2dvaf-QUD743E6.js.map → plot.2dvaf-PWO4XOFU.js.map} +0 -0
  868. /package/dist/{plot.app-35I4DJXK.js.map → plot.app-JYBZEBHK.js.map} +0 -0
  869. /package/dist/{plot.barplot-7OL4HWZB.js.map → plot.barplot-PA2PDVOB.js.map} +0 -0
  870. /package/dist/{plot.boxplot-N2VSPDYA.js.map → plot.boxplot-IHIEWQWG.js.map} +0 -0
  871. /package/dist/{plot.brainImaging-4PIAFROV.js.map → plot.brainImaging-WQ2WWEW3.js.map} +0 -0
  872. /package/dist/{plot.disco-6CFYMWU3.js.map → plot.disco-QIURLAHA.js.map} +0 -0
  873. /package/dist/{plot.ssgq-MGUBQNWE.js.map → plot.ssgq-T27XDC4K.js.map} +0 -0
  874. /package/dist/{plot.vaf2cov-KVI2GMG4.js.map → plot.vaf2cov-Y2DJRQED.js.map} +0 -0
  875. /package/dist/{polar2-IGAOHGPE.js.map → polar2-3MFBRZ4G.js.map} +0 -0
  876. /package/dist/{profileForms-MW7JQURG.js.map → profileForms-J3O7XDHY.js.map} +0 -0
  877. /package/dist/{profilePlot-OVOSFR47.js.map → profilePlot-C45ERAOZ.js.map} +0 -0
  878. /package/dist/{proteomeCohortCompare-ONYL2UN4.js.map → proteomeCohortCompare-2IS7GNJZ.js.map} +0 -0
  879. /package/dist/{pseudbulk.unit.spec-CGV4JTEK.js.map → pseudbulk.unit.spec-SY3ATAPK.js.map} +0 -0
  880. /package/dist/{pseudobulk-WFCQX5KR.js.map → pseudobulk-N6WNHKAC.js.map} +0 -0
  881. /package/dist/{qualitative-6H674T7D.js.map → qualitative-SKUTWJLA.js.map} +0 -0
  882. /package/dist/{qualitative-4SLUE6BW.js.map → qualitative-XWN5V3EE.js.map} +0 -0
  883. /package/dist/{radar2-QXHO2MQA.js.map → radar2-AHZME5CF.js.map} +0 -0
  884. /package/dist/{radarFacility2-JCVOYMH4.js.map → radarFacility2-CVEVC4U5.js.map} +0 -0
  885. /package/dist/{render-IIFS3Y2N.js.map → render-S47OJIIP.js.map} +0 -0
  886. /package/dist/{report-NFBB3PUI.js.map → report-IPX3PKSW.js.map} +0 -0
  887. /package/dist/{sampleView-XQXKIPC7.js.map → sampleView-OZQUKPVV.js.map} +0 -0
  888. /package/dist/{samplelst-RIC5E2W4.js.map → samplelst-7XXJTJ4J.js.map} +0 -0
  889. /package/dist/{samplematrix-WLCFCPBR.js.map → samplematrix-JN35HJBG.js.map} +0 -0
  890. /package/dist/{sc-TXRF7D6F.js.map → sc-6ZHDNPYP.js.map} +0 -0
  891. /package/dist/{scatter-YQ47446T.js.map → scatter-4MP6TG67.js.map} +0 -0
  892. /package/dist/{scatter-JUGGPR4B.js.map → scatter-TRMY47CC.js.map} +0 -0
  893. /package/dist/{selectGenomeWithTklst-2ELB6HQK.js.map → selectGenomeWithTklst-UDNTL544.js.map} +0 -0
  894. /package/dist/{singleCellCellType-DUTH4SZF.js.map → singleCellCellType-UXABRPQQ.js.map} +0 -0
  895. /package/dist/{singleCellCellType.unit.spec-PWP6I5PZ.js.map → singleCellCellType.unit.spec-N22EQMZW.js.map} +0 -0
  896. /package/dist/{singleCellGeneExpression-3563T7GE.js.map → singleCellGeneExpression-OBPVP6IU.js.map} +0 -0
  897. /package/dist/{singleCellGeneExpression.unit.spec-66IDCFJC.js.map → singleCellGeneExpression.unit.spec-NVCFU5B4.js.map} +0 -0
  898. /package/dist/{singleCellNumericValue-XVQTKLTS.js.map → singleCellNumericValue-Z2X3LLRB.js.map} +0 -0
  899. /package/dist/{singleCellNumericValue.unit.spec-LJSTGKNS.js.map → singleCellNumericValue.unit.spec-Q7DCQHEE.js.map} +0 -0
  900. /package/dist/{singleCellPlot-MKYJJXSG.js.map → singleCellPlot-S5N6ZEEA.js.map} +0 -0
  901. /package/dist/{singlecell-ANCWPAAO.js.map → singlecell-OK2P4AS2.js.map} +0 -0
  902. /package/dist/{singlecell-KMRVFOC5.js.map → singlecell-RI6HA3NI.js.map} +0 -0
  903. /package/dist/{snp-B5UHGWVD.js.map → snp-XRM2UAEJ.js.map} +0 -0
  904. /package/dist/{snp.unit.spec-YAHITASM.js.map → snp.unit.spec-CDTYGH4K.js.map} +0 -0
  905. /package/dist/{snplocus-MLGICRGT.js.map → snplocus-CAUGDRZE.js.map} +0 -0
  906. /package/dist/{snplst-DZPIQEKI.js.map → snplst-DP533FL2.js.map} +0 -0
  907. /package/dist/{spliceevent.a53ss.diagram-4NYPSFC2.js.map → spliceevent.a53ss.diagram-XWEN4UMO.js.map} +0 -0
  908. /package/dist/{spliceevent.exonskip.diagram-WLLTP7NP.js.map → spliceevent.exonskip.diagram-HBXQOUT4.js.map} +0 -0
  909. /package/dist/{spliceevent.noeventdiagram-NOSO752Y.js.map → spliceevent.noeventdiagram-ORQJ62ON.js.map} +0 -0
  910. /package/dist/{ssGSEA-4DVY6Z5U.js.map → ssGSEA-PLDZ2556.js.map} +0 -0
  911. /package/dist/{ssGSEA.unit.spec-UDXV4Q7S.js.map → ssGSEA.unit.spec-ORFJFZJY.js.map} +0 -0
  912. /package/dist/{stattable-T5X76Q32.js.map → stattable-GVRVRO2Y.js.map} +0 -0
  913. /package/dist/{studyCatalog-O3EPBJPW.js.map → studyCatalog-K46WJHC6.js.map} +0 -0
  914. /package/dist/{summarizeCnvGeneexp-ST36TPEJ.js.map → summarizeCnvGeneexp-7WSJTWKH.js.map} +0 -0
  915. /package/dist/{summarizeGeneexpSurvival-AZOFCBMT.js.map → summarizeGeneexpSurvival-H3TW7I4I.js.map} +0 -0
  916. /package/dist/{summarizeMutationCnv-HRCW6BYV.js.map → summarizeMutationCnv-JOYXEMFP.js.map} +0 -0
  917. /package/dist/{summarizeMutationDiagnosis-RQQO2MOR.js.map → summarizeMutationDiagnosis-GBIGXFY5.js.map} +0 -0
  918. /package/dist/{summarizeMutationSurvival-UHSUJ7FU.js.map → summarizeMutationSurvival-3RULG3KW.js.map} +0 -0
  919. /package/dist/{summary-ZMM5ET67.js.map → summary-VKLFTPC2.js.map} +0 -0
  920. /package/dist/{summary.integration.spec-GW5UGDDU.js.map → summary.integration.spec-EK3MPFVD.js.map} +0 -0
  921. /package/dist/{summaryInput-ZO5TPARQ.js.map → summaryInput-POI5KQSP.js.map} +0 -0
  922. /package/dist/{sunburst-LXRG2SFE.js.map → sunburst-BIVYHF5R.js.map} +0 -0
  923. /package/dist/{sunburst-6VJS2SUY.js.map → sunburst-SYHQOCGQ.js.map} +0 -0
  924. /package/dist/{survival-U6J6KFN2.js.map → survival-CG2GQ4YY.js.map} +0 -0
  925. /package/dist/{survival-QXHY7JRR.js.map → survival-NEO3E2HS.js.map} +0 -0
  926. /package/dist/{survival.integration.spec-HN3LL6IY.js.map → survival.integration.spec-PPK5KO4V.js.map} +0 -0
  927. /package/dist/{svgraph-CVI27CTM.js.map → svgraph-Q2U2HEMF.js.map} +0 -0
  928. /package/dist/{swimmer-M4JGBO72.js.map → swimmer-GA4C6YH7.js.map} +0 -0
  929. /package/dist/{table-QO22C2ER.js.map → table-DJJIES6L.js.map} +0 -0
  930. /package/dist/{termCollection-EN73BZV5.js.map → termCollection-CHVUM5C6.js.map} +0 -0
  931. /package/dist/{termCollection-KWNFLRWJ.js.map → termCollection-R3LTBPJ4.js.map} +0 -0
  932. /package/dist/{termCollection.unit.spec-Z27AZUE6.js.map → termCollection.unit.spec-B7KAAOFT.js.map} +0 -0
  933. /package/dist/{termCollectionFractionSelection-Q7QFEPKA.js.map → termCollectionFractionSelection-A72QM36J.js.map} +0 -0
  934. /package/dist/{termCollectionFractionSelection.unit.spec-PYLIFZN5.js.map → termCollectionFractionSelection.unit.spec-JR77QEIG.js.map} +0 -0
  935. /package/dist/{tk-WVEDS5OU.js.map → tk-GRGKFATN.js.map} +0 -0
  936. /package/dist/{tp.ui-CG36YXBY.js.map → tp.ui-NATRJ5EN.js.map} +0 -0
  937. /package/dist/{tvs.categorical-GCJISWBS.js.map → tvs.categorical-U2ZYLPSW.js.map} +0 -0
  938. /package/dist/{tvs.condition-YTCVMB3I.js.map → tvs.condition-6EBZALR4.js.map} +0 -0
  939. /package/dist/{tvs.dt-UCSZ5S44.js.map → tvs.dt-H626ESMQ.js.map} +0 -0
  940. /package/dist/{tvs.dtcnv.categorical-KYB6XPL3.js.map → tvs.dtcnv.categorical-6S7INDYC.js.map} +0 -0
  941. /package/dist/{tvs.dtcnv.continuous-MJWJNMKJ.js.map → tvs.dtcnv.continuous-MLYNEMHI.js.map} +0 -0
  942. /package/dist/{tvs.dtfusion-IZCEMTH5.js.map → tvs.dtfusion-2OLY6X7G.js.map} +0 -0
  943. /package/dist/{tvs.dtitd-DZ4WWGNO.js.map → tvs.dtitd-Z6MEL5SH.js.map} +0 -0
  944. /package/dist/{tvs.dtsnvindel-PMJCV4E7.js.map → tvs.dtsnvindel-HPBQSCYV.js.map} +0 -0
  945. /package/dist/{tvs.dtsv-5K2RNWDH.js.map → tvs.dtsv-BRRNX64J.js.map} +0 -0
  946. /package/dist/{tvs.multivalue-6NSC6JPR.js.map → tvs.multivalue-H2G7WKAL.js.map} +0 -0
  947. /package/dist/{tvs.numeric-7U2NDY4A.js.map → tvs.numeric-OKYGMQSK.js.map} +0 -0
  948. /package/dist/{tvs.samplelst-3SIYTFWZ.js.map → tvs.samplelst-46FGACU7.js.map} +0 -0
  949. /package/dist/{tvs.survival-Q3F5SLBW.js.map → tvs.survival-QL4KC3SQ.js.map} +0 -0
  950. /package/dist/{tvs.termCollection-OR73LBNX.js.map → tvs.termCollection-22DFW3PF.js.map} +0 -0
  951. /package/dist/{vocabulary-RWRAQ4VJ.js.map → vocabulary-LJEERZJ6.js.map} +0 -0
@@ -0,0 +1,3574 @@
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-YBXQBSFY.js";
17
+ import {
18
+ genomic2gm
19
+ } from "./chunk-HJ6L54YS.js";
20
+ import "./chunk-QKVKQD6S.js";
21
+ import {
22
+ Menu
23
+ } from "./chunk-CNFTQSNE.js";
24
+ import "./chunk-DOC3HBOV.js";
25
+ import "./chunk-TVJOSRCH.js";
26
+ import "./chunk-3CIL7KH7.js";
27
+ import "./chunk-T4XPCSLP.js";
28
+ import "./chunk-VVWZ4BOI.js";
29
+ import "./chunk-W5J3LTYS.js";
30
+ import "./chunk-2IAELUCN.js";
31
+ import "./chunk-CFYWQJ7F.js";
32
+ import {
33
+ axisTop,
34
+ bplen,
35
+ dtcloss,
36
+ dtfusionrna,
37
+ dtitd,
38
+ dtnloss,
39
+ mclasscloss,
40
+ mclassfusionrna,
41
+ mclassitd,
42
+ mclassnloss
43
+ } from "./chunk-2N345NXD.js";
44
+ import "./chunk-HBNB5TRH.js";
45
+ import "./chunk-PF4DSFDR.js";
46
+ import {
47
+ linear
48
+ } from "./chunk-4OLM3KSB.js";
49
+ import "./chunk-PWYMHUXY.js";
50
+ import "./chunk-TLT4YIG3.js";
51
+ import "./chunk-5R63Q5KH.js";
52
+ import {
53
+ select_default
54
+ } from "./chunk-I6Y4O3RR.js";
55
+ import "./chunk-Q5RDQNIT.js";
56
+ import "./chunk-HS5PO5ZQ.js";
57
+
58
+ // src/svmr.unload.js
59
+ function svmr_export_json(svmr, hqonly) {
60
+ var rows = [];
61
+ for (const sample of svmr.samples) {
62
+ for (const egg of sample.egglst) {
63
+ for (const eg of egg.lst) {
64
+ if (eg.ismsg) {
65
+ const lst = eg.lst.map((evt) => evt.lst[0]);
66
+ if (hqonly) {
67
+ let hashq = false;
68
+ for (const i of lst) {
69
+ if (i.rating == "Major") hashq = true;
70
+ }
71
+ if (hashq) {
72
+ rows.push(lst);
73
+ }
74
+ } else {
75
+ rows.push(lst);
76
+ }
77
+ } else {
78
+ for (const evt of eg.lst) {
79
+ for (const p of evt.lst) {
80
+ if (hqonly) {
81
+ if (p.rating == "Major") rows.push([p]);
82
+ } else {
83
+ rows.push([p]);
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ const lines = [], e_itd = [], e_nloss = [], e_closs = [];
92
+ for (const row of rows) {
93
+ if (row.length == 1 && row[0].usepair) {
94
+ const p = row[0];
95
+ if (p.isitd) {
96
+ const u = p.usepair;
97
+ const gm = svmr.genome.isoformmatch(u.a.isoform, p.chrA, p.posA);
98
+ if (!gm) {
99
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): no gene model found for " + u.a.isoform);
100
+ continue;
101
+ }
102
+ const exonbp1 = genomic2gm(p.posA, gm).rnapos;
103
+ const exonbp2 = genomic2gm(p.posB, gm).rnapos;
104
+ if (exonbp1 <= exonbp2) {
105
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): negative duplication length");
106
+ continue;
107
+ }
108
+ const itd = {
109
+ typecode: dtitd,
110
+ gene: p.geneA,
111
+ isoform: u.a.isoform,
112
+ rating: p.rating,
113
+ score: p.score,
114
+ functioneffect: p.functioneffect,
115
+ rnaposition: exonbp2,
116
+ rnaduplength: exonbp1 - exonbp2 + 1,
117
+ a: {
118
+ chr: p.chrA,
119
+ position: p.posA,
120
+ strand: p.ortA,
121
+ ratio: p.ratioA,
122
+ chimericreads: p.readsA,
123
+ totalreads: p.totalreadsA,
124
+ match: p.matchA,
125
+ repeat: p.repeatA
126
+ },
127
+ b: {
128
+ chr: p.chrB,
129
+ position: p.posB,
130
+ strand: p.ortB,
131
+ ratio: p.ratioB,
132
+ chimericreads: p.readsB,
133
+ totalreads: p.totalreadsB,
134
+ match: p.matchB,
135
+ repeat: p.repeatB
136
+ }
137
+ };
138
+ let aalen = 0, bplen2 = 0;
139
+ if (u.a.contigaa && u.b.contigaa) {
140
+ aalen = u.b.contigaa - u.a.contigaa - 1;
141
+ }
142
+ if (u.a.contigbp && u.b.contigbp) {
143
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
144
+ }
145
+ if (aalen > 0) {
146
+ itd.interstitial = { aalen };
147
+ }
148
+ if (bplen2 > 0) {
149
+ if (!itd.interstitial) itd.interstitial = {};
150
+ itd.interstitial.bplen = bplen2;
151
+ }
152
+ lines.push([p.sample, p.geneA, p.usepair.a.isoform, JSON.stringify(itd)]);
153
+ continue;
154
+ }
155
+ if (p.isnloss) {
156
+ const p2 = p.usepair.b;
157
+ if (!p2.isoform) {
158
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no isoform");
159
+ continue;
160
+ }
161
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrB, p.posB);
162
+ if (!gm) {
163
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no gene model found for " + p2.isoform);
164
+ continue;
165
+ }
166
+ const exonbp = genomic2gm(p.posB, gm).rnapos;
167
+ const pp = {
168
+ typecode: dtnloss,
169
+ gene: p.geneB,
170
+ isoform: p2.isoform,
171
+ rating: p.rating,
172
+ score: p.score,
173
+ functioneffect: p.functioneffect,
174
+ rnaposition: exonbp,
175
+ chr: p.chrB,
176
+ position: p.posB,
177
+ strand: p.ortB,
178
+ ratio: p.ratioB,
179
+ chimericreads: p.readsB,
180
+ match: p.matchB,
181
+ repeat: p.repeatB,
182
+ partner: {
183
+ chr: p.chrA,
184
+ position: p.posA,
185
+ strand: p.ortA,
186
+ ratio: p.ratioA,
187
+ chimericreads: p.readsA,
188
+ match: p.matchA,
189
+ repeat: p.repeatA
190
+ }
191
+ };
192
+ if (p.geneA) {
193
+ pp.partner.gene = p.geneA;
194
+ }
195
+ if (p.usepair.a.isoform) {
196
+ pp.partner.isoform = p.usepair.a.isoform;
197
+ }
198
+ lines.push([p.sample, p.geneB, p2.isoform, JSON.stringify(pp)]);
199
+ continue;
200
+ }
201
+ if (p.iscloss) {
202
+ const p2 = p.usepair.a;
203
+ if (!p2.isoform) {
204
+ e_nloss.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no isoform");
205
+ continue;
206
+ }
207
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrA, p.posA);
208
+ if (!gm) {
209
+ e_nloss.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no gene model found by " + p2.isoform);
210
+ continue;
211
+ }
212
+ const exonbp = genomic2gm(p.posA, gm).rnapos;
213
+ const pp = {
214
+ typecode: dtcloss,
215
+ gene: p.geneA,
216
+ isoform: p2.isoform,
217
+ rating: p.rating,
218
+ score: p.score,
219
+ functioneffect: p.functioneffect,
220
+ rnaposition: exonbp,
221
+ chr: p.chrA,
222
+ position: p.posA,
223
+ strand: p.ortA,
224
+ ratio: p.ratioA,
225
+ chimericreads: p.readsA,
226
+ match: p.matchA,
227
+ repeat: p.repeatA,
228
+ partner: {
229
+ chr: p.chrB,
230
+ position: p.posB,
231
+ strand: p.ortB,
232
+ ratio: p.ratioB,
233
+ chimericreads: p.readsB,
234
+ match: p.matchB,
235
+ repeat: p.repeatB
236
+ }
237
+ };
238
+ if (p.geneB) {
239
+ pp.partner.gene = p.geneB;
240
+ }
241
+ if (p.usepair.b.isoform) {
242
+ pp.partner.isoform = p.usepair.b.isoform;
243
+ }
244
+ lines.push([p.sample, p.geneA, p2.isoform, JSON.stringify(pp)]);
245
+ continue;
246
+ }
247
+ }
248
+ const genes = /* @__PURE__ */ new Set(), isoforms = /* @__PURE__ */ new Set(), cleanup = [];
249
+ for (const p of row) {
250
+ if (p.geneA) genes.add(p.geneA);
251
+ if (p.geneB) genes.add(p.geneB);
252
+ if (p.usepair) {
253
+ if (p.usepair.a.isoform) isoforms.add(p.usepair.a.isoform);
254
+ if (p.usepair.b.isoform) isoforms.add(p.usepair.b.isoform);
255
+ }
256
+ const clean = {
257
+ type: p.type,
258
+ type2: p.type2,
259
+ rating: p.rating,
260
+ score: p.score,
261
+ functioneffect: p.functioneffect,
262
+ a: {
263
+ name: p.geneA,
264
+ chr: p.chrA,
265
+ position: p.posA,
266
+ strand: p.ortA,
267
+ ratio: p.ratioA,
268
+ feature: p.featureA,
269
+ chimericreads: p.readsA,
270
+ contiglen: p.matchA,
271
+ repeatscore: p.repeatA
272
+ },
273
+ b: {
274
+ name: p.geneB,
275
+ chr: p.chrB,
276
+ position: p.posB,
277
+ strand: p.ortB,
278
+ ratio: p.ratioB,
279
+ feature: p.featureB,
280
+ chimericreads: p.readsB,
281
+ contiglen: p.matchB,
282
+ repeatscore: p.repeatB
283
+ }
284
+ };
285
+ if (p.usepair) {
286
+ const u = p.usepair;
287
+ clean.frame = u.frame;
288
+ if (u.a.isoform) {
289
+ clean.a.isoform = u.a.isoform;
290
+ }
291
+ if (u.b.isoform) {
292
+ clean.b.isoform = u.b.isoform;
293
+ }
294
+ let aalen = 0, bplen2 = 0;
295
+ if (u.a.contigaa && u.b.contigaa) {
296
+ aalen = u.b.contigaa - u.a.contigaa - 1;
297
+ }
298
+ if (u.a.contigbp && u.b.contigbp) {
299
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
300
+ }
301
+ if (aalen > 0) {
302
+ clean.interstitial = { aalen };
303
+ }
304
+ if (bplen2 > 0) {
305
+ if (!clean.interstitial) clean.interstitial = {};
306
+ clean.interstitial.bplen = bplen2;
307
+ }
308
+ }
309
+ cleanup.push(clean);
310
+ }
311
+ const genenames = [...genes];
312
+ const isoformnames = [...isoforms];
313
+ lines.push([
314
+ row[0].sample,
315
+ genenames.length ? genenames.join(",") : "none",
316
+ isoformnames.length ? isoformnames.join(",") : "none",
317
+ JSON.stringify(cleanup)
318
+ ]);
319
+ }
320
+ if (e_itd.length) {
321
+ svmr.err(e_itd.join("<br>"));
322
+ }
323
+ if (e_nloss.length) {
324
+ svmr.err(e_nloss.join("<br>"));
325
+ }
326
+ if (e_closs.length) {
327
+ svmr.err(e_closs.join("<br>"));
328
+ }
329
+ export_data("Fusion data from " + svmr.filename, [{ text: lines.map((i) => i.join(" ")).join("\n") }]);
330
+ }
331
+ function svmr_2pp(svmr, hqonly) {
332
+ const rows = [];
333
+ for (const sample of svmr.samples) {
334
+ for (const egg of sample.egglst) {
335
+ for (const eg of egg.lst) {
336
+ if (eg.ismsg) {
337
+ const lst = eg.lst.map((evt) => evt.lst[0]);
338
+ if (hqonly) {
339
+ let hashq = false;
340
+ for (const i of lst) {
341
+ if (i.rating == "Major") hashq = true;
342
+ }
343
+ if (hashq) {
344
+ rows.push(lst);
345
+ }
346
+ } else {
347
+ rows.push(lst);
348
+ }
349
+ } else {
350
+ for (const evt of eg.lst) {
351
+ for (const p of evt.lst) {
352
+ if (hqonly) {
353
+ if (p.rating == "Major") rows.push([p]);
354
+ } else {
355
+ rows.push([p]);
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+ const genes = {}, e_itd = [], e_nloss = [], e_closs = [];
364
+ for (const row of rows) {
365
+ if (row.length == 1 && row[0].usepair) {
366
+ const p = row[0];
367
+ if (p.isitd) {
368
+ if (!p.geneA) {
369
+ e_itd.push(p.sample + " ITD (" + p.rating + "): no gene name??");
370
+ continue;
371
+ }
372
+ const u = p.usepair;
373
+ const gm = svmr.genome.isoformmatch(u.a.isoform, p.chrA, p.posA);
374
+ if (!gm) {
375
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): no gene model found for " + u.a.isoform);
376
+ continue;
377
+ }
378
+ const exonbp1 = genomic2gm(p.posA, gm).rnapos;
379
+ const exonbp2 = genomic2gm(p.posB, gm).rnapos;
380
+ if (exonbp1 <= exonbp2) {
381
+ e_itd.push(p.sample + " " + p.geneA + " ITD (" + p.rating + "): negative duplication length");
382
+ continue;
383
+ }
384
+ const itd = {
385
+ dt: dtitd,
386
+ class: mclassitd,
387
+ mname: "ITD",
388
+ gene: p.geneA,
389
+ sample: p.sample,
390
+ isoform: u.a.isoform,
391
+ rating: p.rating,
392
+ score: p.score,
393
+ functioneffect: p.functioneffect,
394
+ rnaposition: exonbp2,
395
+ rnaduplength: exonbp1 - exonbp2 + 1,
396
+ a: {
397
+ chr: p.chrA,
398
+ position: p.posA,
399
+ strand: p.ortA,
400
+ ratio: p.ratioA,
401
+ chimericreads: p.readsA,
402
+ totalreads: p.totalreadsA,
403
+ match: p.matchA,
404
+ repeat: p.repeatA
405
+ },
406
+ b: {
407
+ chr: p.chrB,
408
+ position: p.posB,
409
+ strand: p.ortB,
410
+ ratio: p.ratioB,
411
+ chimericreads: p.readsB,
412
+ totalreads: p.totalreadsB,
413
+ match: p.matchB,
414
+ repeat: p.repeatB
415
+ }
416
+ };
417
+ let aalen = 0, bplen2 = 0;
418
+ if (u.a.contigaa && u.b.contigaa) {
419
+ aalen = u.b.contigaa - u.a.contigaa - 1;
420
+ }
421
+ if (u.a.contigbp && u.b.contigbp) {
422
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
423
+ }
424
+ if (aalen > 0) {
425
+ itd.interstitial = { aalen };
426
+ }
427
+ if (bplen2 > 0) {
428
+ if (!itd.interstitial) itd.interstitial = {};
429
+ itd.interstitial.bplen = bplen2;
430
+ }
431
+ if (!(p.geneA in genes)) {
432
+ genes[p.geneA] = [];
433
+ }
434
+ genes[p.geneA].push(itd);
435
+ continue;
436
+ }
437
+ if (p.isnloss) {
438
+ if (!p.geneB) {
439
+ e_nloss.push(p.sample + " NLoss (" + p.rating + "): no geneB");
440
+ continue;
441
+ }
442
+ const p2 = p.usepair.b;
443
+ if (!p2.isoform) {
444
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no isoform");
445
+ continue;
446
+ }
447
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrB, p.posB);
448
+ if (!gm) {
449
+ e_nloss.push(p.sample + " " + p.geneB + " NLoss (" + p.rating + "): no gene model found for " + p2.isoform);
450
+ continue;
451
+ }
452
+ const exonbp = genomic2gm(p.posB, gm).rnapos;
453
+ const pp = {
454
+ dt: dtnloss,
455
+ class: mclassnloss,
456
+ mname: "N-loss",
457
+ gene: p.geneB,
458
+ sample: p.sample,
459
+ isoform: p2.isoform,
460
+ rating: p.rating,
461
+ score: p.score,
462
+ functioneffect: p.functioneffect,
463
+ rnaposition: exonbp,
464
+ chr: p.chrB,
465
+ position: p.posB,
466
+ strand: p.ortB,
467
+ ratio: p.ratioB,
468
+ chimericreads: p.readsB,
469
+ match: p.matchB,
470
+ repeat: p.repeatB,
471
+ partner: {
472
+ chr: p.chrA,
473
+ position: p.posA,
474
+ strand: p.ortA,
475
+ ratio: p.ratioA,
476
+ chimericreads: p.readsA,
477
+ match: p.matchA,
478
+ repeat: p.repeatA
479
+ }
480
+ };
481
+ if (p.geneA) {
482
+ pp.partner.gene = p.geneA;
483
+ }
484
+ if (p.usepair.a.isoform) {
485
+ pp.partner.isoform = p.usepair.a.isoform;
486
+ }
487
+ if (!(p.geneB in genes)) {
488
+ genes[p.geneB] = [];
489
+ }
490
+ genes[p.geneB].push(pp);
491
+ continue;
492
+ }
493
+ if (p.iscloss) {
494
+ if (!p.geneA) {
495
+ e_closs.push(p.sample + " CLoss (" + p.rating + "): no geneA");
496
+ continue;
497
+ }
498
+ const p2 = p.usepair.a;
499
+ if (!p2.isoform) {
500
+ e_closs.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no isoform");
501
+ continue;
502
+ }
503
+ const gm = svmr.genome.isoformmatch(p2.isoform, p.chrA, p.posA);
504
+ if (!gm) {
505
+ e_closs.push(p.sample + " " + p.geneA + " CLoss (" + p.rating + "): no gene model found by " + p2.isoform);
506
+ continue;
507
+ }
508
+ const exonbp = genomic2gm(p.posA, gm).rnapos;
509
+ const pp = {
510
+ dt: dtcloss,
511
+ class: mclasscloss,
512
+ mname: "C-loss",
513
+ gene: p.geneA,
514
+ sample: p.sample,
515
+ isoform: p2.isoform,
516
+ rating: p.rating,
517
+ score: p.score,
518
+ functioneffect: p.functioneffect,
519
+ rnaposition: exonbp,
520
+ chr: p.chrA,
521
+ position: p.posA,
522
+ strand: p.ortA,
523
+ ratio: p.ratioA,
524
+ chimericreads: p.readsA,
525
+ match: p.matchA,
526
+ repeat: p.repeatA,
527
+ partner: {
528
+ chr: p.chrB,
529
+ position: p.posB,
530
+ strand: p.ortB,
531
+ ratio: p.ratioB,
532
+ chimericreads: p.readsB,
533
+ match: p.matchB,
534
+ repeat: p.repeatB
535
+ }
536
+ };
537
+ if (p.geneB) {
538
+ pp.partner.gene = p.geneB;
539
+ }
540
+ if (p.usepair.b.isoform) {
541
+ pp.partner.isoform = p.usepair.b.isoform;
542
+ }
543
+ if (!(p.geneA in genes)) {
544
+ genes[p.geneA] = [];
545
+ }
546
+ genes[p.geneA].push(pp);
547
+ continue;
548
+ }
549
+ }
550
+ const gene2isoform = /* @__PURE__ */ new Map();
551
+ const cleanup = [];
552
+ for (const p of row) {
553
+ if (p.geneA) {
554
+ if (!gene2isoform.has(p.geneA)) gene2isoform.set(p.geneA, /* @__PURE__ */ new Set());
555
+ if (p.usepair) {
556
+ if (p.usepair.a.isoform) gene2isoform.get(p.geneA).add(p.usepair.a.isoform);
557
+ }
558
+ }
559
+ if (p.geneB) {
560
+ if (!gene2isoform.has(p.geneB)) gene2isoform.set(p.geneB, /* @__PURE__ */ new Set());
561
+ if (p.usepair) {
562
+ if (p.usepair.b.isoform) gene2isoform.get(p.geneB).add(p.usepair.b.isoform);
563
+ }
564
+ }
565
+ const clean = {
566
+ type: p.type,
567
+ type2: p.type2,
568
+ rating: p.rating,
569
+ score: p.score,
570
+ functioneffect: p.functioneffect,
571
+ a: {
572
+ name: p.geneA,
573
+ chr: p.chrA,
574
+ position: p.posA,
575
+ strand: p.ortA,
576
+ ratio: p.ratioA,
577
+ feature: p.featureA,
578
+ chimericreads: p.readsA,
579
+ contiglen: p.matchA,
580
+ repeatscore: p.repeatA
581
+ },
582
+ b: {
583
+ name: p.geneB,
584
+ chr: p.chrB,
585
+ position: p.posB,
586
+ strand: p.ortB,
587
+ ratio: p.ratioB,
588
+ feature: p.featureB,
589
+ chimericreads: p.readsB,
590
+ contiglen: p.matchB,
591
+ repeatscore: p.repeatB
592
+ }
593
+ };
594
+ if (p.usepair) {
595
+ const u = p.usepair;
596
+ clean.frame = u.frame;
597
+ if (u.a.isoform) {
598
+ clean.a.isoform = u.a.isoform;
599
+ }
600
+ if (u.b.isoform) {
601
+ clean.b.isoform = u.b.isoform;
602
+ }
603
+ let aalen = 0, bplen2 = 0;
604
+ if (u.a.contigaa && u.b.contigaa) {
605
+ aalen = u.b.contigaa - u.a.contigaa - 1;
606
+ }
607
+ if (u.a.contigbp && u.b.contigbp) {
608
+ bplen2 = u.b.contigbp - u.a.contigbp - 1;
609
+ }
610
+ if (aalen > 0) {
611
+ clean.interstitial = { aalen };
612
+ }
613
+ if (bplen2 > 0) {
614
+ if (!clean.interstitial) clean.interstitial = {};
615
+ clean.interstitial.bplen = bplen2;
616
+ }
617
+ }
618
+ cleanup.push(clean);
619
+ }
620
+ for (const [genename, iset] of gene2isoform) {
621
+ for (const isoform of iset) {
622
+ if (!(genename in genes)) {
623
+ genes[genename] = [];
624
+ }
625
+ const pp = {
626
+ dt: dtfusionrna,
627
+ class: mclassfusionrna,
628
+ sample: row[0].sample,
629
+ isoform,
630
+ pairlst: duplicate(cleanup)
631
+ };
632
+ for (const i of cleanup) {
633
+ if (i.functioneffect) {
634
+ pp.functioneffect = i.functioneffect;
635
+ }
636
+ }
637
+ genes[genename].push(pp);
638
+ }
639
+ }
640
+ }
641
+ if (e_itd.length) {
642
+ svmr.err(e_itd.join("<br>"));
643
+ }
644
+ if (e_nloss.length) {
645
+ svmr.err(e_nloss.join("<br>"));
646
+ }
647
+ if (e_closs.length) {
648
+ svmr.err(e_closs.join("<br>"));
649
+ }
650
+ let genecount = 0, genesup = {};
651
+ for (const k in genes) {
652
+ genecount++;
653
+ genesup[k.toUpperCase()] = genes[k];
654
+ }
655
+ if (genecount == 0) {
656
+ alert("No data can be added.");
657
+ return;
658
+ }
659
+ let ds = null;
660
+ for (const n in svmr.genome.datasets) {
661
+ if (svmr.genome.datasets[n].svmrid == svmr.id) {
662
+ ds = svmr.genome.datasets[n];
663
+ break;
664
+ }
665
+ }
666
+ if (ds) {
667
+ ds.bulkdata = genesup;
668
+ } else {
669
+ ds = {
670
+ label: svmr.filename,
671
+ svmrid: svmr.id,
672
+ bulkdata: genesup
673
+ };
674
+ svmr.genome.datasets[svmr.filename] = ds;
675
+ }
676
+ if (svmr.cohort) {
677
+ svmr.cohortpane.pane.remove();
678
+ } else {
679
+ svmr.cohort = {
680
+ name: svmr.filename,
681
+ genome: svmr.genome,
682
+ show_genetable: 1,
683
+ jwt: svmr.jwt,
684
+ dsset: {}
685
+ };
686
+ svmr.cohort.dsset[svmr.filename] = ds;
687
+ }
688
+ const pane = newpane({ x: 200, y: 200 });
689
+ import("./tp.ui-NATRJ5EN.js").then((p) => {
690
+ p.default(svmr.cohort, pane.body, svmr.hostURL);
691
+ svmr.cohortpane = pane;
692
+ });
693
+ }
694
+ function svmr_export_text(svmr, hqonly) {
695
+ const rows = [];
696
+ const headerlst = svmr.atlst.map((i) => i.label);
697
+ headerlst.push("transcript_nbr");
698
+ headerlst.push("breakpoint_nbr");
699
+ headerlst.push("functionalClass");
700
+ for (const sample of svmr.samples) {
701
+ const whole = [];
702
+ for (const egg of sample.egglst) {
703
+ for (const eg of egg.lst) {
704
+ if (eg.ismsg) {
705
+ const lst = eg.lst.map((evt) => evt.lst[0]);
706
+ if (hqonly) {
707
+ let hashq = false;
708
+ for (const i of lst) {
709
+ if (i.rating == "Major") hashq = true;
710
+ }
711
+ if (hashq) {
712
+ whole.push(lst);
713
+ }
714
+ } else {
715
+ whole.push(lst);
716
+ }
717
+ } else {
718
+ for (const evt of eg.lst) {
719
+ for (const p of evt.lst) {
720
+ if (hqonly) {
721
+ if (p.rating == "Major") whole.push([p]);
722
+ } else {
723
+ whole.push([p]);
724
+ }
725
+ }
726
+ }
727
+ }
728
+ }
729
+ }
730
+ for (let gid = 0; gid < whole.length; gid++) {
731
+ for (let prodid = 0; prodid < whole[gid].length; prodid++) {
732
+ let prod = whole[gid][prodid];
733
+ 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 = [];
734
+ for (const p of prod.pairs) {
735
+ frame.push(p.frame);
736
+ a_isoform.push(p.a.isoform);
737
+ b_isoform.push(p.b.isoform);
738
+ let v = p.a.codon;
739
+ a_codon.push(Number.isNaN(v) ? "" : v);
740
+ v = p.b.codon;
741
+ b_codon.push(Number.isNaN(v) ? "" : v);
742
+ v = p.a.exon;
743
+ a_exon.push(Number.isNaN(v) ? "" : v);
744
+ v = p.b.exon;
745
+ b_exon.push(Number.isNaN(v) ? "" : v);
746
+ a_anchor.push(p.a.anchor ? p.a.anchor : "");
747
+ b_anchor.push(p.b.anchor ? p.b.anchor : "");
748
+ v = p.a.contigaa;
749
+ a_contigaa.push(v == void 0 ? "" : v);
750
+ v = p.b.contigaa;
751
+ b_contigaa.push(v == void 0 ? "" : v);
752
+ v = p.a.contigbp;
753
+ a_contigbp.push(v == void 0 ? "" : v);
754
+ v = p.b.contigbp;
755
+ b_contigbp.push(v == void 0 ? "" : v);
756
+ }
757
+ const row = [];
758
+ for (const i of svmr.atlst) {
759
+ switch (i.key) {
760
+ case "lstframe":
761
+ row.push(frame.join(","));
762
+ break;
763
+ // A
764
+ case "lstisoforma":
765
+ row.push(a_isoform.join(","));
766
+ break;
767
+ case "lstisoformacodon":
768
+ row.push(a_codon.join(","));
769
+ break;
770
+ case "lstisoformaexon":
771
+ row.push(a_exon.join(","));
772
+ break;
773
+ case "lstisoformaanchor":
774
+ row.push(a_anchor.join(","));
775
+ break;
776
+ case "lstcontigaaA":
777
+ row.push(a_contigaa.join(","));
778
+ break;
779
+ case "lstcontigbpA":
780
+ row.push(a_contigbp.join(","));
781
+ break;
782
+ // B
783
+ case "lstisoformb":
784
+ row.push(b_isoform.join(","));
785
+ break;
786
+ case "lstisoformbcodon":
787
+ row.push(b_codon.join(","));
788
+ break;
789
+ case "lstisoformbexon":
790
+ row.push(b_exon.join(","));
791
+ break;
792
+ case "lstisoformbanchor":
793
+ row.push(b_anchor.join(","));
794
+ break;
795
+ case "lstcontigaaB":
796
+ row.push(b_contigaa.join(","));
797
+ break;
798
+ case "lstcontigbpB":
799
+ row.push(b_contigbp.join(","));
800
+ break;
801
+ default:
802
+ row.push(prod[i.key]);
803
+ }
804
+ }
805
+ row.push(gid + 1);
806
+ row.push(prodid + 1);
807
+ row.push(prod.functioneffect ? prod.functioneffect : "");
808
+ rows.push(row);
809
+ }
810
+ }
811
+ }
812
+ export_data("Fusion data from " + svmr.filename, [{ text: headerlst.join(" ") + "\n" + rows.join("\n") }]);
813
+ }
814
+ function duplicate(i) {
815
+ const lst = [];
816
+ for (const j of i) {
817
+ const k = {};
818
+ for (const n in j) k[n] = j[n];
819
+ k.a = {};
820
+ for (const n in j.a) k.a[n] = j.a[n];
821
+ k.b = {};
822
+ for (const n in j.b) k.b[n] = j.b[n];
823
+ if (j.interstitial) {
824
+ k.interstitial = {};
825
+ for (const n in j.interstitial) k.interstitial[n] = j.interstitial[n];
826
+ }
827
+ lst.push(k);
828
+ }
829
+ return lst;
830
+ }
831
+
832
+ // src/svmr.c.js
833
+ var genomelimit = 1e4;
834
+ var knownprod_c = "#A702C4";
835
+ var tip = new Menu();
836
+ var type2lst = [
837
+ { label: "CLoss", flag: "iscloss" },
838
+ { label: "ENHANCER_PROX" },
839
+ { label: "Fusion", flag: "isfusion" },
840
+ { label: "GENE_PROX" },
841
+ { label: "GENIC" },
842
+ { label: "HALF_INTERGENIC" },
843
+ { label: "INTERGENIC" },
844
+ { label: "INTRONIC" },
845
+ { label: "INVERTED_REPEAT" },
846
+ { label: "ITD", flag: "isitd" },
847
+ { label: "NLoss", flag: "isnloss" },
848
+ { label: "other", flag: "isother" },
849
+ { label: "TRUNCATING" },
850
+ { label: "upTSS", flag: "isuptss" }
851
+ ];
852
+ function findType2(value) {
853
+ if (!value) return;
854
+ const v = value.toLowerCase();
855
+ return type2lst.find((t) => t.label.toLowerCase() == v);
856
+ }
857
+ var ratingGrades = [
858
+ { rating: "HQ", htmlab: "HQ" + "&nbsp;".repeat(11) },
859
+ { rating: "LQ", htmlab: "LQ" + "&nbsp;".repeat(11) },
860
+ { rating: "RT", htmlab: "Read-through " },
861
+ { rating: "bad", htmlab: "Bad" + "&nbsp;".repeat(10) },
862
+ { rating: "NA", htmlab: "NA" + "&nbsp;".repeat(11) }
863
+ ];
864
+ var productCategories = [
865
+ {
866
+ htmlab: '<span style="background-color:' + colorinframe + ';color:white;padding:1px 3px;font-size:80%;">in-frame&nbsp;&nbsp;</span>'
867
+ },
868
+ { htmlab: '<span style="background-color:#E3C3C8;padding:1px 3px;font-size:80%;">truncation</span>' },
869
+ { htmlab: '<span style="background-color:#ccc;padding:1px 3px;font-size:80%;">others&nbsp;&nbsp;&nbsp;&nbsp;</span>' }
870
+ ];
871
+ function getBucket(prod) {
872
+ let grade = ratingGrades.findIndex((g) => g.rating == prod.rating);
873
+ if (grade == -1) grade = ratingGrades.findIndex((g) => g.rating == "bad");
874
+ const pair = prod.usepair;
875
+ let category;
876
+ if (pair) {
877
+ category = pair.inframe ? 0 : 1;
878
+ } else if (prod.isnloss || prod.iscloss) {
879
+ category = 1;
880
+ } else {
881
+ category = 2;
882
+ }
883
+ return grade * productCategories.length + category;
884
+ }
885
+ var svmr_c_default = class {
886
+ constructor(genome, atlst, items, filename, holder, hostURL, jwt) {
887
+ window.svmr = this;
888
+ this.hostURL = hostURL;
889
+ this.jwt = jwt;
890
+ this.id = Math.random();
891
+ this.items = items;
892
+ this.genome = genome;
893
+ this.filename = filename;
894
+ this.atlst = atlst;
895
+ this.cf_repeat = 0.7, this.cf_reads = 2;
896
+ this.cf_match = 40;
897
+ this.cf_ratio = 0.01;
898
+ this.expression = {};
899
+ this.samples = [];
900
+ this.genelst = [];
901
+ this.elab2sample = {};
902
+ if (!holder) {
903
+ const pane = newpane({ x: 100, y: 100, toshrink: true });
904
+ pane.header.append("span").style("color", "#858585").style("font-size", ".7em").html("Fusion Editor&nbsp;");
905
+ pane.header.append("span").text(filename);
906
+ holder = pane.body;
907
+ }
908
+ this.holder = holder;
909
+ this.errdiv = holder.append("div").style("width", "500px").style("margin", "10px");
910
+ const butrow = holder.append("div").style("margin", "20px").style("padding", "0px");
911
+ this.buttgene = butrow.append("button").text("Loading genes").on("click", () => {
912
+ if (genediv.style("display") == "none") {
913
+ appear(genediv);
914
+ } else {
915
+ disappear(genediv);
916
+ }
917
+ });
918
+ this.buttsample = butrow.append("button").text("Loading samples").on("click", () => {
919
+ if (this.ul.style("display") == "none") {
920
+ appear(this.ul);
921
+ } else {
922
+ disappear(this.ul);
923
+ }
924
+ });
925
+ butrow.append("button").text("Gene expression").on("click", () => {
926
+ if (this.expression.div.style("display") == "none") {
927
+ appear(this.expression.div);
928
+ } else {
929
+ disappear(this.expression.div);
930
+ }
931
+ });
932
+ butrow.append("button").text("Parameter cutoff").on("click", () => {
933
+ if (cutoffdiv.style("display") == "none") {
934
+ appear(cutoffdiv);
935
+ } else {
936
+ disappear(cutoffdiv);
937
+ }
938
+ });
939
+ butrow.append("button").text("Legend").on("click", () => {
940
+ if (legenddiv.style("display") == "none") {
941
+ appear(legenddiv);
942
+ } else {
943
+ disappear(legenddiv);
944
+ }
945
+ });
946
+ butrow.append("button").style("margin-right", "20px").text("Export data").on("click", (event) => {
947
+ 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;
948
+ for (const sample of this.samples) {
949
+ for (const egg of sample.egglst) {
950
+ for (const eg of egg.lst) {
951
+ if (eg.ismsg) {
952
+ let hashq = false;
953
+ for (const i of eg.lst) {
954
+ if (i.rating == "Major") hashq = true;
955
+ }
956
+ if (hashq) multi_hq++;
957
+ else multi_nhq++;
958
+ } else {
959
+ for (const evt of eg.lst) {
960
+ for (const p of evt.lst) {
961
+ if (p.rating == "Major") {
962
+ if (p.isitd) itd_hq++;
963
+ else if (p.iscloss || p.isnloss) trunc_hq++;
964
+ else single_hq++;
965
+ } else {
966
+ if (p.isitd) itd_nhq++;
967
+ else if (p.iscloss || p.isnloss) trunc_nhq++;
968
+ else single_nhq++;
969
+ }
970
+ }
971
+ }
972
+ }
973
+ }
974
+ }
975
+ }
976
+ const d02 = tip.clear().showunder(event.target).d.append("div");
977
+ const table = d02.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
978
+ let tr = table.append("tr").style("color", "#858585");
979
+ tr.append("td");
980
+ tr.append("td").text("2-gene fusion");
981
+ tr.append("td").text("Multi-gene fusion");
982
+ tr.append("td").text("ITD");
983
+ tr.append("td").text("Truncation");
984
+ tr = table.append("tr");
985
+ tr.append("td").text("Major").style("color", "#858585").style("text-align", "right");
986
+ tr.append("td").text(single_hq);
987
+ tr.append("td").text(multi_hq);
988
+ tr.append("td").text(itd_hq);
989
+ tr.append("td").text(trunc_hq);
990
+ tr = table.append("tr");
991
+ tr.append("td").text("not Major").style("color", "#858585").style("text-align", "right");
992
+ tr.append("td").text(single_nhq);
993
+ tr.append("td").text(multi_nhq);
994
+ tr.append("td").text(itd_nhq);
995
+ tr.append("td").text(trunc_nhq);
996
+ let dd = d02.append("div").style("margin", "10px").text('Export fusions labeled as "Major"');
997
+ dd.append("button").style("margin", "10px").text("Tabular format").on("click", () => svmr_export_text(this, true));
998
+ dd.append("button").style("margin", "10px").text("JSON format").on("click", () => svmr_export_json(this, true));
999
+ dd.append("button").style("margin", "10px").text("View in ProteinPaint").on("click", () => svmr_2pp(this, true));
1000
+ dd = d02.append("div").style("margin", "10px").text("Export all fusions");
1001
+ dd.append("button").style("margin", "10px").text("Tabular format").on("click", () => svmr_export_text(this, false));
1002
+ dd.append("button").style("margin", "10px").text("JSON format").on("click", () => svmr_export_json(this, false));
1003
+ dd.append("button").style("margin", "10px").text("View in ProteinPaint").on("click", () => svmr_2pp(this, false));
1004
+ });
1005
+ butrow.append("a").attr("target", "_blank").attr("href", "https://docs.google.com/document/d/1DRVzE_WenG490eRYB7VGFOygtSqtF5L97rhK0HOUCNY/edit?usp=sharing").text("Help");
1006
+ this.expression.div = holder.append("div").style("display", "none").style("margin", "20px").style("padding", "20px").style("border", "dashed 1px #bbb");
1007
+ this.expression.prediv = this.expression.div.append("div");
1008
+ this.expression.prediv.append("div").style("margin", "5px").text("Load a file that includes gene expression data for current samples.");
1009
+ 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");
1010
+ this.expression.input = this.expression.prediv.append("input").attr("type", "file").on("change", (event) => {
1011
+ loadexpression(this, event.target.files[0]);
1012
+ });
1013
+ this.expression.presays = this.expression.prediv.append("span").style("padding-left", "20px");
1014
+ this.expression.afterdiv = this.expression.div.append("div").style("display", "none");
1015
+ const genediv = holder.append("div").style("display", "none").style("margin", "20px");
1016
+ let d0 = genediv.append("div").style("display", "inline-block").style("border", "dashed 1px #bbb");
1017
+ this.genefilter = d0.append("div").style("background-color", "#ededed").style("padding", "10px 20px");
1018
+ let d01 = d0.append("div").style("padding", "10px 20px").style("overflow-y", "scroll").style("resize", "vertical").style("height", "300px");
1019
+ d01.append("div").style("margin", "10px").style("font-size", "70%").text("Not included: read-through and intergenic events (including one or both sides).");
1020
+ this.genetable = d01.append("table");
1021
+ const cutoffdiv = holder.append("div").style("display", "none").style("margin", "20px");
1022
+ d0 = cutoffdiv.append("div").style("display", "inline-block").style("padding", "20px").style("border", "solid 1px #ededed");
1023
+ d0.append("span").style("padding", "0px 10px").text("Alert if:");
1024
+ d01 = d0.append("span").style("padding", "0px 10px");
1025
+ d01.append("span").html("chimeric reads &le;&nbsp;");
1026
+ d01.append("input").attr("size", 3).property("value", this.cf_reads).on("change", (event) => {
1027
+ const v = Number.parseInt(event.target.value);
1028
+ if (Number.isNaN(v)) {
1029
+ return;
1030
+ }
1031
+ this.cf_reads = v;
1032
+ });
1033
+ d01 = d0.append("span").style("padding", "0px 10px");
1034
+ d01.append("span").html("repeat score &ge;&nbsp;");
1035
+ d01.append("input").attr("size", 3).property("value", this.cf_repeat).on("change", (event) => {
1036
+ const v = Number.parseFloat(event.target.value);
1037
+ if (Number.isNaN(v)) {
1038
+ return;
1039
+ }
1040
+ this.cf_repeat = v;
1041
+ });
1042
+ d01 = d0.append("span").style("padding", "0px 10px");
1043
+ d01.append("span").html("contig bp length &le;&nbsp;");
1044
+ d01.append("input").attr("size", 3).property("value", this.cf_match).on("change", (event) => {
1045
+ const v = Number.parseInt(event.target.value);
1046
+ if (Number.isNaN(v)) {
1047
+ return;
1048
+ }
1049
+ this.cf_match = v;
1050
+ });
1051
+ d01 = d0.append("span").style("padding", "0px 10px");
1052
+ d01.append("span").html("ratio &le;&nbsp;");
1053
+ d01.append("input").attr("size", 3).property("value", this.cf_ratio).on("change", (event) => {
1054
+ const v = Number.parseFloat(event.target.value);
1055
+ if (Number.isNaN(v)) {
1056
+ return;
1057
+ }
1058
+ this.cf_ratio = v;
1059
+ });
1060
+ const legenddiv = holder.append("div").style("display", "none").style("margin", "20px");
1061
+ var h = 16;
1062
+ legenddiv.append("div").style("display", "inline-block").style("padding", "10px").style("border", "solid 1px #ededed").html(
1063
+ '<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>'
1064
+ );
1065
+ this.ul = holder.append("ul");
1066
+ this.step_isoform(items);
1067
+ }
1068
+ // end of constructor
1069
+ err(m) {
1070
+ sayerror(this.errdiv, m);
1071
+ }
1072
+ step_isoform(items) {
1073
+ const newset = /* @__PURE__ */ new Set();
1074
+ for (const item of items) {
1075
+ for (const i of item.pairs) {
1076
+ let n = i.a.isoform;
1077
+ if (n && !this.genome.isoformcache.has(n.toUpperCase())) {
1078
+ newset.add(n);
1079
+ }
1080
+ n = i.b.isoform;
1081
+ if (n && !this.genome.isoformcache.has(n.toUpperCase())) {
1082
+ newset.add(n);
1083
+ }
1084
+ }
1085
+ }
1086
+ if (newset.size == 0) {
1087
+ this.step_eat(items);
1088
+ return;
1089
+ }
1090
+ const newisoform = [];
1091
+ for (const n of newset) {
1092
+ newisoform.push(n);
1093
+ }
1094
+ const wait = this.holder.append("div").style("margin", "20px").text("Loading " + newset.size + " isoforms ...");
1095
+ fetch(
1096
+ new Request(this.hostURL + "/isoformlst", {
1097
+ method: "POST",
1098
+ headers: { "content-type": "application/json" },
1099
+ body: JSON.stringify({ genome: this.genome.name, lst: newisoform, jwt: this.jwt })
1100
+ })
1101
+ ).then((data) => {
1102
+ return data.json();
1103
+ }).then((data) => {
1104
+ if (data.error) throw { message: "Cannot load isoforms: " + data.error };
1105
+ wait.remove();
1106
+ for (const ilst of data.lst) {
1107
+ if (ilst[0]) {
1108
+ this.genome.isoformcache.set(ilst[0].isoform, ilst);
1109
+ }
1110
+ }
1111
+ const isoformErr = [];
1112
+ for (const k of newset) {
1113
+ if (!this.genome.isoformcache.has(k.toUpperCase())) {
1114
+ isoformErr.push(k);
1115
+ }
1116
+ }
1117
+ if (isoformErr.length) {
1118
+ this.err(
1119
+ isoformErr.length + " invalid isoform" + (isoformErr.length > 1 ? "s" : "") + ": " + isoformErr.join(", ")
1120
+ );
1121
+ }
1122
+ this.step_eat(items);
1123
+ }).catch((err) => {
1124
+ this.err(err.message);
1125
+ if (err.stack) console.log(err.stack);
1126
+ });
1127
+ }
1128
+ step_eat(items) {
1129
+ for (const prod of items) {
1130
+ prod.hook = {};
1131
+ let use = null;
1132
+ for (const p of prod.pairs) {
1133
+ let gm = this.genome.isoformmatch(p.a.isoform, prod.chrA, prod.posA);
1134
+ if (gm) {
1135
+ prod.geneA = gm.name;
1136
+ p.a.isdefault = gm.isdefault;
1137
+ if (Number.isNaN(p.a.codon) || p.a.codon < 0) {
1138
+ p.a.codon = void 0;
1139
+ const a = genomic2gm(prod.posA, gm);
1140
+ if (a.atupstream) {
1141
+ p.a.atupstream = a.atupstream;
1142
+ } else if (a.atdownstream) {
1143
+ p.a.atdownstream = a.atdownstream;
1144
+ } else if (a.atutr3) {
1145
+ p.a.atutr3 = a.atutr3;
1146
+ } else if (a.atutr5) {
1147
+ p.a.atutr5 = a.atutr5;
1148
+ } else {
1149
+ p.a.codon = a.codon;
1150
+ }
1151
+ }
1152
+ }
1153
+ gm = this.genome.isoformmatch(p.b.isoform, prod.chrB, prod.posB);
1154
+ if (gm) {
1155
+ prod.geneB = gm.name;
1156
+ p.b.isdefault = gm.isdefault;
1157
+ if (Number.isNaN(p.b.codon) || p.b.codon < 0) {
1158
+ p.b.codon = void 0;
1159
+ const a = genomic2gm(prod.posB, gm);
1160
+ if (a.atupstream) {
1161
+ p.b.atupstream = a.atupstream;
1162
+ } else if (a.atdownstream) {
1163
+ p.b.atdownstream = a.atdownstream;
1164
+ } else if (a.atutr3) {
1165
+ p.b.atutr3 = a.atutr3;
1166
+ } else if (a.atutr5) {
1167
+ p.b.atutr5 = a.atutr5;
1168
+ } else {
1169
+ p.b.codon = a.codon;
1170
+ }
1171
+ }
1172
+ }
1173
+ if (p.a.isdefault && p.b.isdefault) {
1174
+ if (!use) {
1175
+ use = p;
1176
+ }
1177
+ if (p.inframe) {
1178
+ use = p;
1179
+ }
1180
+ }
1181
+ }
1182
+ if (use) {
1183
+ prod.usepair = use;
1184
+ } else {
1185
+ prod.notes.push("No preferred isoform pair");
1186
+ prod.usepair = prod.pairs[0];
1187
+ }
1188
+ if (prod.usepair) {
1189
+ prod.usepair.inuse = true;
1190
+ }
1191
+ prod.eventlabel = (prod.geneA ? prod.geneA : prod.chrA) + "-" + (prod.geneB ? prod.geneB : prod.chrB);
1192
+ }
1193
+ const tmp = /* @__PURE__ */ Object.create(null);
1194
+ const sampleless = /* @__PURE__ */ Object.create(null);
1195
+ let hassampleless = false;
1196
+ for (const prod of items) {
1197
+ let n = prod.sample;
1198
+ if (n) {
1199
+ if (!(n in tmp)) {
1200
+ tmp[n] = {};
1201
+ }
1202
+ if (!(prod.eventlabel in tmp[n])) {
1203
+ tmp[n][prod.eventlabel] = [];
1204
+ }
1205
+ tmp[n][prod.eventlabel].push(prod);
1206
+ } else {
1207
+ hassampleless = true;
1208
+ if (!(prod.eventlabel in sampleless)) {
1209
+ sampleless[prod.eventlabel] = [];
1210
+ }
1211
+ sampleless[prod.eventlabel].push(prod);
1212
+ }
1213
+ }
1214
+ for (const sn in tmp) {
1215
+ this.samples.push({
1216
+ name: sn,
1217
+ events: tmp[sn]
1218
+ });
1219
+ }
1220
+ if (hassampleless) {
1221
+ this.samples.push({
1222
+ name: "No name",
1223
+ events: sampleless
1224
+ });
1225
+ }
1226
+ this.buttsample.text(this.samples.length + " sample" + (this.samples.length > 1 ? "s" : ""));
1227
+ for (const sample of this.samples) {
1228
+ for (const elab in sample.events) {
1229
+ if (!(elab in this.elab2sample)) {
1230
+ this.elab2sample[elab] = [];
1231
+ }
1232
+ this.elab2sample[elab].push(sample);
1233
+ }
1234
+ }
1235
+ for (const sample of this.samples) {
1236
+ sample.gene2events = {};
1237
+ for (const elab in sample.events) {
1238
+ for (const prod of sample.events[elab]) {
1239
+ const a = prod.geneA;
1240
+ if (a) {
1241
+ if (!(a in sample.gene2events)) {
1242
+ sample.gene2events[a] = {};
1243
+ }
1244
+ sample.gene2events[a][elab] = 1;
1245
+ }
1246
+ const b = prod.geneB;
1247
+ if (b) {
1248
+ if (!(b in sample.gene2events)) {
1249
+ sample.gene2events[b] = {};
1250
+ }
1251
+ sample.gene2events[b][elab] = 1;
1252
+ }
1253
+ }
1254
+ }
1255
+ }
1256
+ for (const sample of this.samples) {
1257
+ const newholder = [];
1258
+ for (const grade of ratingGrades) {
1259
+ for (const elab in sample.events) {
1260
+ for (const prod of sample.events[elab]) {
1261
+ if (prod.rating == grade.rating) msjoin(prod, newholder);
1262
+ }
1263
+ }
1264
+ }
1265
+ let msgid = 0;
1266
+ const msglst = [];
1267
+ for (const lst of newholder) {
1268
+ if (lst.length > 1) {
1269
+ for (const prod of lst) {
1270
+ prod.msgid = msgid;
1271
+ }
1272
+ msgid++;
1273
+ msglst.push(lst);
1274
+ }
1275
+ }
1276
+ const buckets = ratingGrades.flatMap(() => productCategories.map(() => []));
1277
+ for (const msg of msglst) {
1278
+ const thisset = [];
1279
+ let best = buckets.length;
1280
+ for (const prod of msg) {
1281
+ thisset.push({ label: prod.eventlabel, lst: [prod] });
1282
+ best = Math.min(best, getBucket(prod));
1283
+ }
1284
+ buckets[best].push({ label: "", lst: thisset, ismsg: true });
1285
+ }
1286
+ const genepairs = {};
1287
+ for (const elab in sample.events) {
1288
+ const buckets2 = buckets.map(() => []);
1289
+ for (const prod of sample.events[elab]) {
1290
+ if (prod.msgid != void 0) {
1291
+ continue;
1292
+ }
1293
+ if (prod.geneA && prod.geneB) {
1294
+ const key = prod.geneA + "-" + prod.geneB;
1295
+ let hash = genepairs[key];
1296
+ if (!hash) {
1297
+ const key2 = prod.geneB + "-" + prod.geneA;
1298
+ hash = genepairs[key2];
1299
+ }
1300
+ if (hash) {
1301
+ if (!(key in hash)) {
1302
+ hash[key] = [];
1303
+ }
1304
+ hash[key].push(prod);
1305
+ } else {
1306
+ genepairs[key] = {};
1307
+ genepairs[key][key] = [prod];
1308
+ }
1309
+ continue;
1310
+ }
1311
+ buckets2[getBucket(prod)].push(prod);
1312
+ }
1313
+ const best = buckets2.findIndex((lst) => lst.length > 0);
1314
+ if (best != -1) {
1315
+ buckets[best].push({ label: elab, lst: [{ label: elab, lst: buckets2[best] }] });
1316
+ }
1317
+ }
1318
+ for (const key in genepairs) {
1319
+ let best = buckets.length;
1320
+ const thisset = [];
1321
+ for (const elab in genepairs[key]) {
1322
+ const prodlst = genepairs[key][elab];
1323
+ if (prodlst.length == 1) {
1324
+ if (prodlst[0].msgid != void 0) {
1325
+ continue;
1326
+ }
1327
+ }
1328
+ thisset.push({ label: elab, lst: prodlst });
1329
+ for (const prod of prodlst) {
1330
+ best = Math.min(best, getBucket(prod));
1331
+ }
1332
+ }
1333
+ if (best < buckets.length) {
1334
+ buckets[best].push({ label: key, lst: thisset });
1335
+ }
1336
+ }
1337
+ sample.egglst = [];
1338
+ ratingGrades.forEach((grade, i) => {
1339
+ productCategories.forEach((category, j) => {
1340
+ const lst = buckets[i * productCategories.length + j];
1341
+ if (!lst.length) return;
1342
+ sample.egglst.push({ htmlab: grade.htmlab + category.htmlab, lst });
1343
+ });
1344
+ });
1345
+ const countInframe = (rating) => {
1346
+ const i = ratingGrades.findIndex((g) => g.rating == rating);
1347
+ return buckets[i * productCategories.length].reduce((n, eg) => n + eg.lst.length, 0);
1348
+ };
1349
+ sample.hqincount = countInframe("HQ");
1350
+ sample.lqincount = countInframe("LQ");
1351
+ }
1352
+ this.samples.sort((a, b) => {
1353
+ if (a.hqincount == b.hqincount) {
1354
+ return b.lqincount - a.lqincount;
1355
+ }
1356
+ return b.hqincount - a.hqincount;
1357
+ });
1358
+ for (const sample of this.samples) {
1359
+ for (const egg of sample.egglst) {
1360
+ for (const eg of egg.lst) {
1361
+ for (const evt of eg.lst) {
1362
+ evt.lst.sort((a, b) => {
1363
+ const pa = a.usepair, pb = b.usepair;
1364
+ if (pa) {
1365
+ if (pb) {
1366
+ if (pa.inframe) {
1367
+ if (!pb.inframe) {
1368
+ return -1;
1369
+ }
1370
+ } else {
1371
+ if (pb.inframe) {
1372
+ return 1;
1373
+ }
1374
+ }
1375
+ } else {
1376
+ return -1;
1377
+ }
1378
+ } else {
1379
+ if (pb) {
1380
+ return 1;
1381
+ }
1382
+ }
1383
+ return b.score - a.score;
1384
+ });
1385
+ }
1386
+ }
1387
+ egg.lst.sort((a, b) => {
1388
+ if (a.lst.length != b.lst.length) {
1389
+ return b.lst.length - a.lst.length;
1390
+ }
1391
+ let scorea = 0;
1392
+ for (const evta of a.lst) {
1393
+ for (const prod of evta.lst) {
1394
+ scorea = Math.max(scorea, prod.score);
1395
+ }
1396
+ }
1397
+ let scoreb = 0;
1398
+ for (const evtb of b.lst) {
1399
+ for (const prod of evtb.lst) {
1400
+ scoreb = Math.max(scoreb, prod.score);
1401
+ }
1402
+ }
1403
+ return scoreb - scorea;
1404
+ });
1405
+ }
1406
+ let prodid = 1;
1407
+ for (const egg of sample.egglst) {
1408
+ for (const eg of egg.lst) {
1409
+ for (const evt of eg.lst) {
1410
+ for (const prod of evt.lst) {
1411
+ prod.prodid = prodid++;
1412
+ }
1413
+ }
1414
+ }
1415
+ }
1416
+ }
1417
+ this.step_gene();
1418
+ this.step_table();
1419
+ }
1420
+ dogenefilter() {
1421
+ let va = this.gui.inputa.property("value");
1422
+ let vb = this.gui.inputb.property("value");
1423
+ if (va.length + vb.length == 0) {
1424
+ this.gui.says.text(
1425
+ "Showing " + (this.genelst.length > 100 ? 100 : "all") + " of " + this.genelst.length + " pairs"
1426
+ );
1427
+ this.geneshow(this.genelst.length > 100 ? this.genelst.slice(0, 100) : this.genelst);
1428
+ return;
1429
+ }
1430
+ va = va.length == 0 ? null : va.toLowerCase();
1431
+ vb = vb.length == 0 ? null : vb.toLowerCase();
1432
+ const uselst = [];
1433
+ for (const g of this.genelst) {
1434
+ if (va) {
1435
+ if (!g.a) continue;
1436
+ if (g.a.toLowerCase().indexOf(va) == -1) continue;
1437
+ }
1438
+ if (vb) {
1439
+ if (!g.b) continue;
1440
+ if (g.b.toLowerCase().indexOf(vb) == -1) continue;
1441
+ }
1442
+ uselst.push(g);
1443
+ }
1444
+ this.gui.says.text("Showing " + Math.min(100, uselst.length) + " of " + this.genelst.length + " pairs");
1445
+ this.geneshow(uselst.length > 100 ? uselst.slice(0, 100) : uselst);
1446
+ }
1447
+ geneshow(lst) {
1448
+ this.genetable.selectAll("*").remove();
1449
+ const tr = this.genetable.append("tr").style("background-color", "#ededed").style("font-size", ".8em");
1450
+ tr.append("td").text("gene A");
1451
+ tr.append("td").text("gene B");
1452
+ tr.append("td").text("# sample");
1453
+ tr.append("td").text("rating");
1454
+ for (const evt of lst) {
1455
+ let color1 = "black", color2 = "black", weight1, weight2;
1456
+ if (evt.ainter) {
1457
+ color1 = "#aaa";
1458
+ weight1 = "normal";
1459
+ } else {
1460
+ const a = evt.samples[0].prodlst[0].hlgene;
1461
+ if (a == 1 || a == 3 || a == 4) weight1 = "bold";
1462
+ if (a == 4) color1 = knownprod_c;
1463
+ }
1464
+ if (evt.binter) {
1465
+ color2 = "#aaa";
1466
+ weight2 = "normal";
1467
+ } else {
1468
+ const a = evt.samples[0].prodlst[0].hlgene;
1469
+ if (a == 2 || a == 3 || a == 4) weight2 = "bold";
1470
+ if (a == 4) color2 = knownprod_c;
1471
+ }
1472
+ const tr2 = this.genetable.append("tr").attr("class", "sja_clb");
1473
+ tr2.append("td").text(evt.a).style("color", color1).style("font-weight", weight1);
1474
+ tr2.append("td").text(evt.b).style("color", color2).style("font-weight", weight2);
1475
+ const td = tr2.append("td").text(evt.samples.length);
1476
+ tr2.on("click", () => {
1477
+ const p = tr2.node().getBoundingClientRect();
1478
+ const pane2 = newpane({ x: p.left + p.width + 10, y: p.top });
1479
+ pane2.header.text(evt.a + " - " + evt.b);
1480
+ const table = pane2.body.append("table");
1481
+ for (const sample of evt.samples) {
1482
+ const tr3 = table.append("tr");
1483
+ tr3.append("td").style("vertical-align", "top").style("padding-top", "5px").text(sample.name);
1484
+ const td2 = tr3.append("td");
1485
+ for (const prod of sample.prodlst) {
1486
+ const logo = this.eventlogo([prod], td2);
1487
+ logo.style("position", "relative");
1488
+ logo.append("div").style("position", "absolute").style("width", "100%").style("height", "100%").style("top", "0px").style("left", "0px").on("mouseover", (event) => {
1489
+ const p2 = event.target.getBoundingClientRect();
1490
+ tip.clear().show(p2.left + p2.width - 2, p2.top - 30);
1491
+ this.showsvpairs({
1492
+ prodlst: [prod],
1493
+ holder: tip.d.append("div"),
1494
+ nodetail: true,
1495
+ sample,
1496
+ eglst: null,
1497
+ showothersample: false
1498
+ });
1499
+ }).on("click", (event) => {
1500
+ const p2 = event.target.getBoundingClientRect();
1501
+ const pane = newpane({ x: p2.left + p2.width + 40, y: p2.top - 60 });
1502
+ pane.header.text(sample.name);
1503
+ this.showsvpairs({
1504
+ prodlst: [prod],
1505
+ holder: pane.body
1506
+ });
1507
+ });
1508
+ }
1509
+ }
1510
+ });
1511
+ const hash = {};
1512
+ for (const smp of evt.samples) {
1513
+ const hash2 = {};
1514
+ for (const p of smp.prodlst) {
1515
+ hash2[p.rating] = 1;
1516
+ }
1517
+ for (var n in hash2) {
1518
+ if (!(n in hash)) {
1519
+ hash[n] = 0;
1520
+ }
1521
+ hash[n]++;
1522
+ }
1523
+ }
1524
+ const lst2 = [];
1525
+ for (const smp of ratingGrades.map((g) => g.rating)) {
1526
+ if (hash[smp]) {
1527
+ lst2.push(
1528
+ '<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>"
1529
+ );
1530
+ }
1531
+ }
1532
+ tr2.append("td").html(lst2.join(" "));
1533
+ }
1534
+ }
1535
+ step_gene() {
1536
+ this.gui = {};
1537
+ this.genefilter.append("span").text("Filter:");
1538
+ this.gui.inputa = this.genefilter.append("input").attr("size", 7).attr("placeholder", "gene A").style("margin-left", "10px").on("keyup", () => this.dogenefilter());
1539
+ this.gui.inputb = this.genefilter.append("input").attr("size", 7).attr("placeholder", "gene B").style("margin-left", "10px").on("keyup", () => this.dogenefilter());
1540
+ this.genefilter.append("button").style("margin-left", "10px").text("Reset").on("click", () => {
1541
+ this.gui.inputa.property("value", "");
1542
+ this.gui.inputb.property("value", "");
1543
+ this.dogenefilter();
1544
+ });
1545
+ this.gui.says = this.genefilter.append("span").style("padding-left", "20px");
1546
+ const events = {};
1547
+ const genes = /* @__PURE__ */ new Set();
1548
+ for (const sample of this.samples) {
1549
+ for (const k in sample.events) {
1550
+ for (const prod of sample.events[k]) {
1551
+ if (!prod.geneA || !prod.geneB) continue;
1552
+ if (prod.rating == "RT") continue;
1553
+ if (prod.geneA) {
1554
+ genes.add(prod.geneA);
1555
+ }
1556
+ if (prod.geneB) {
1557
+ genes.add(prod.geneB);
1558
+ }
1559
+ const n = (prod.geneA ? prod.geneA : "<" + prod.chrA) + " - " + (prod.geneB ? prod.geneB : "<" + prod.chrB);
1560
+ if (!(n in events)) {
1561
+ events[n] = /* @__PURE__ */ Object.create(null);
1562
+ }
1563
+ if (!(sample.name in events[n])) {
1564
+ events[n][sample.name] = [];
1565
+ }
1566
+ events[n][sample.name].push(prod);
1567
+ }
1568
+ }
1569
+ }
1570
+ this.buttgene.text(genes.size + " gene" + (genes.size > 1 ? "s" : ""));
1571
+ for (const k in events) {
1572
+ const tmp = k.split(" - ");
1573
+ const evt = { samples: [] };
1574
+ if (tmp[0][0] == "<") {
1575
+ evt.a = tmp[0].slice(1, tmp[0].length);
1576
+ evt.ainter = true;
1577
+ } else {
1578
+ evt.a = tmp[0];
1579
+ }
1580
+ if (tmp[1][0] == "<") {
1581
+ evt.b = tmp[1].slice(1, tmp[1].length);
1582
+ evt.binter = true;
1583
+ } else {
1584
+ evt.b = tmp[1];
1585
+ }
1586
+ for (const sn in events[k]) {
1587
+ evt.samples.push({ name: sn, prodlst: events[k][sn] });
1588
+ }
1589
+ this.genelst.push(evt);
1590
+ }
1591
+ this.genelst.sort((a, b) => {
1592
+ let ca = 0;
1593
+ for (const s of a.samples) {
1594
+ for (const p of s.prodlst) {
1595
+ if (p.rating == "HQ") ca++;
1596
+ }
1597
+ }
1598
+ let cb = 0;
1599
+ for (const s of b.samples) {
1600
+ for (const p of s.prodlst) {
1601
+ if (p.rating == "HQ") cb++;
1602
+ }
1603
+ }
1604
+ return cb - ca;
1605
+ });
1606
+ this.dogenefilter();
1607
+ }
1608
+ step_table() {
1609
+ this.eggbar = [];
1610
+ this.ul.selectAll("*").remove();
1611
+ for (const sample of this.samples) {
1612
+ this.ul.append("li").style("font-weight", "bold").style("color", "#545454").text(sample.name);
1613
+ sample.ul = this.ul.append("ul").style("margin-bottom", "10px");
1614
+ this.showsample(sample);
1615
+ }
1616
+ }
1617
+ showsample(sample) {
1618
+ sample.ul.selectAll("*").remove();
1619
+ for (const egg of sample.egglst) {
1620
+ const evtnum = egg.lst.reduce((i, j) => i + j.lst.length, 0);
1621
+ const li = sample.ul.append("li");
1622
+ const bar = li.append("div").attr("class", "sja_clb2").html(egg.htmlab + " " + evtnum);
1623
+ bar.on("click", () => {
1624
+ for (const bar0 of this.eggbar) {
1625
+ bar0.style("background-color", "");
1626
+ }
1627
+ bar.style("background-color", "yellow");
1628
+ const next = select_default(li.node().nextSibling);
1629
+ if (next.style("display") == "none") {
1630
+ appear(next);
1631
+ egg.isopen = true;
1632
+ } else {
1633
+ disappear(next);
1634
+ egg.isopen = false;
1635
+ }
1636
+ });
1637
+ this.eggbar.push(bar);
1638
+ const div = sample.ul.append("div").style("margin", "10px");
1639
+ this.showevents(sample, egg.lst, div);
1640
+ }
1641
+ }
1642
+ showevents(sample, eglst, holder) {
1643
+ const svg = holder.append("svg");
1644
+ 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;
1645
+ for (const eg of eglst) {
1646
+ graphheight += rows;
1647
+ if (eg.lst.length == 1) {
1648
+ graphheight += rowh;
1649
+ } else {
1650
+ graphheight += vpad * 2 + (rowh + rows) * eg.lst.length + (rowh2 + rows) * (eg.lst.length - 1) + gvpad;
1651
+ }
1652
+ for (const evt of eg.lst) {
1653
+ evt.svg = {};
1654
+ const prodlst = evt.lst;
1655
+ const prod = prodlst[0];
1656
+ let labA, labB;
1657
+ if (prod.geneA) {
1658
+ const t = prod.geneA.split(",");
1659
+ if (t.length > 2) {
1660
+ labA = t[0] + "," + t[1] + "...";
1661
+ } else {
1662
+ labA = prod.geneA;
1663
+ }
1664
+ } else {
1665
+ labA = "";
1666
+ }
1667
+ if (prod.geneB) {
1668
+ const t = prod.geneB.split(",");
1669
+ if (t.length > 2) {
1670
+ labB = t[0] + "," + t[1] + "...";
1671
+ } else {
1672
+ labB = prod.geneB;
1673
+ }
1674
+ } else {
1675
+ labB = "";
1676
+ }
1677
+ svg.append("text").text(labA).attr("font-size", fontsize).attr("font-family", "Courier").each(function() {
1678
+ geneAw = Math.max(geneAw, this.getBBox().width);
1679
+ }).remove();
1680
+ svg.append("text").text(labB).attr("font-size", fontsize).attr("font-family", "Courier").each(function() {
1681
+ geneBw = Math.max(geneBw, this.getBBox().width);
1682
+ }).remove();
1683
+ svg.append("text").text(prod.rating).attr("font-size", fontsize).attr("font-family", "Courier").each(function() {
1684
+ evt.svg.ratingw = this.getBBox().width;
1685
+ }).remove();
1686
+ evt.svg.framew = 22;
1687
+ evt.svg.typew = 60;
1688
+ svg.append("text").attr("font-size", fontsize).attr("font-family", font).each(function() {
1689
+ for (const label of [prod.type2 || "", ...type2lst.map((t) => t.label)]) {
1690
+ this.textContent = label;
1691
+ evt.svg.typew = Math.max(evt.svg.typew, this.getBBox().width);
1692
+ }
1693
+ }).remove();
1694
+ if (prod.usepair) {
1695
+ evt.svg.frameword = prod.usepair.inframe ? "IN" : "O";
1696
+ } else {
1697
+ evt.svg.frameword = "?";
1698
+ }
1699
+ svg.append("text").text(prod.featureA).attr("font-size", fontsizefeature).attr("font-family", font).each(function() {
1700
+ evt.svg.featurew = this.getBBox().width;
1701
+ }).remove();
1702
+ svg.append("text").text(prod.featureB).attr("font-size", fontsizefeature).attr("font-family", font).each(function() {
1703
+ evt.svg.featurew = Math.max(evt.svg.featurew, this.getBBox().width);
1704
+ }).remove();
1705
+ svg.append("text").text(Math.floor(prod.score)).attr("font-size", fontsize).attr("font-family", font).each(function() {
1706
+ evt.svg.scorew = this.getBBox().width;
1707
+ }).remove();
1708
+ evt.svg.logow = evt.svg.ratingw + evt.svg.framew + evt.svg.typew + evt.svg.featurew + evt.svg.scorew + s5 * 6;
1709
+ eventlogow = Math.max(eventlogow, evt.svg.logow + (prodlst.length > 1 ? s4 + etw : 0));
1710
+ if (prod.geneA && prod.geneB) {
1711
+ const slst = this.elab2sample[evt.label];
1712
+ if (!slst) {
1713
+ evt.svg.recurtext = "Recurrence check error";
1714
+ evt.svg.recurtextcolor = "red";
1715
+ } else if (slst.length == 1) {
1716
+ evt.svg.recurtext = "No recurrence";
1717
+ evt.svg.recurtextcolor = "#aaaaaa";
1718
+ } else {
1719
+ evt.svg.hasrecurrence = true;
1720
+ evt.svg.recurtext = "In " + slst.length + " samples";
1721
+ evt.svg.recurtextcolor = "black";
1722
+ }
1723
+ } else {
1724
+ evt.svg.recurtext = "Unknown recurrence";
1725
+ evt.svg.recurtextcolor = "#aaaaaa";
1726
+ }
1727
+ svg.append("text").text(evt.svg.recurtext).attr("font-size", fontsize - 4).attr("font-family", font).each(function() {
1728
+ evt.svg.recurw = this.getBBox().width;
1729
+ }).remove();
1730
+ recurw = Math.max(recurw, evt.svg.recurw);
1731
+ }
1732
+ }
1733
+ geneAw += 10;
1734
+ geneBw += 10;
1735
+ graphheight += rows;
1736
+ let ghandlew = 100;
1737
+ let roww = chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1 + chrBw + s3 + eventlogow + s6 + recurw;
1738
+ svg.attr("width", hpad0 * 2 + hpad * 2 + roww + ghandlew).attr("height", graphheight);
1739
+ const g = svg.append("g").attr("transform", "translate(" + hpad0 + ",0)");
1740
+ let y = 0;
1741
+ for (const eg of eglst) {
1742
+ y += rows;
1743
+ const g_eg = g.append("g").attr("transform", "translate(0," + y + ")");
1744
+ 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);
1745
+ if (eg.lst.length > 1) {
1746
+ 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");
1747
+ if (eg.ismsg) {
1748
+ const g2 = g_eg.append("g").attr("transform", "translate(" + (roww + hpad * 2) + ",0)");
1749
+ g2.append("rect").attr("width", ghandlew).attr("height", rowh).attr("fill", "#858585").attr("shape-rendering", "crispEdges");
1750
+ 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");
1751
+ g2.append("rect").attr("width", ghandlew).attr("height", rowh).attr("fill", "white").attr("fill-opacity", 0).on("click", (event) => {
1752
+ const joinlst = [];
1753
+ const idlst = [];
1754
+ for (const evt of eg.lst) {
1755
+ const prod = evt.lst[0];
1756
+ idlst.push(prod.prodid);
1757
+ const p2 = {
1758
+ a: {
1759
+ chr: prod.chrA,
1760
+ position: prod.posA,
1761
+ strand: prod.ortA,
1762
+ name: prod.geneA ? prod.geneA : prod.chrA,
1763
+ ratio: prod.ratioA.toFixed(2),
1764
+ feature: prod.featureA,
1765
+ contiglen: prod.matchA,
1766
+ chimericreads: prod.readsA,
1767
+ repeatscore: prod.repeatA
1768
+ },
1769
+ b: {
1770
+ chr: prod.chrB,
1771
+ position: prod.posB,
1772
+ strand: prod.ortB,
1773
+ name: prod.geneB ? prod.geneB : prod.chrB,
1774
+ ratio: prod.ratioB.toFixed(2),
1775
+ feature: prod.featureB,
1776
+ contiglen: prod.matchB,
1777
+ chimericreads: prod.readsB,
1778
+ repeatscore: prod.repeatB
1779
+ },
1780
+ rating: prod.rating,
1781
+ score: Math.ceil(prod.score)
1782
+ };
1783
+ if (prod.usepair) {
1784
+ p2.inframe = prod.usepair.inframe;
1785
+ const x = prod.usepair.a;
1786
+ p2.a.gm = this.genome.isoformmatch(x.isoform, p2.a.chr, p2.a.position);
1787
+ p2.a.codon = x.codon;
1788
+ p2.a.exon = x.exon;
1789
+ p2.a.atupstream = x.atupstream;
1790
+ p2.a.atdownstream = x.atdownstream;
1791
+ p2.a.atutr5 = x.atutr5;
1792
+ p2.a.atutr3 = x.atutr3;
1793
+ const y2 = prod.usepair.b;
1794
+ p2.b.gm = this.genome.isoformmatch(y2.isoform, p2.b.chr, p2.b.position);
1795
+ p2.b.codon = y2.codon;
1796
+ p2.b.exon = y2.exon;
1797
+ p2.b.atupstream = y2.atupstream;
1798
+ p2.b.atdownstream = y2.atdownstream;
1799
+ p2.b.atutr5 = y2.atutr5;
1800
+ p2.b.atutr3 = y2.atutr3;
1801
+ let aalen = 0, bplen2 = 0;
1802
+ if (x.contigaa && y2.contigaa) {
1803
+ aalen = y2.contigaa - x.contigaa - 1;
1804
+ }
1805
+ if (x.contigbp && y2.contigbp) {
1806
+ bplen2 = y2.contigbp - x.contigbp - 1;
1807
+ }
1808
+ if (aalen) {
1809
+ p2.interstitial = { aalen };
1810
+ }
1811
+ if (bplen2) {
1812
+ if (!p2.interstitial) p2.interstitial = {};
1813
+ p2.interstitial.bplen = bplen2;
1814
+ }
1815
+ }
1816
+ joinlst.push(p2);
1817
+ }
1818
+ const p = event.target.getBoundingClientRect();
1819
+ const pane = newpane({ x: p.left + 10, y: p.top + p.height + 10 });
1820
+ const div = pane.body.append("div").style("margin", "10px");
1821
+ div.append("span").style("padding-right", "20px").text("Product id: " + idlst.join(", "));
1822
+ div.append("button").style("margin-right", "10px").text("Break").on("click", () => {
1823
+ const eg2id = eg.lst.map((j) => j.lst[0].prodid);
1824
+ let idx = 0;
1825
+ for (; idx < eglst.length; idx++) {
1826
+ const eg2 = eglst[idx];
1827
+ if (eg2.ismsg) {
1828
+ const eg22id = eg2.lst.map((j) => j.lst[0].prodid);
1829
+ if (eg22id.join(",") == eg2id.join(",")) {
1830
+ break;
1831
+ }
1832
+ }
1833
+ }
1834
+ delete eg.ismsg;
1835
+ const oldlst = eg.lst;
1836
+ eg.lst = [eg.lst[0]];
1837
+ for (let j = 1; j < oldlst.length; j++) {
1838
+ eglst.splice(idx, 0, {
1839
+ label: "",
1840
+ lst: [oldlst[j]]
1841
+ });
1842
+ }
1843
+ svg.remove();
1844
+ this.showevents(sample, eglst, holder);
1845
+ pane.pane.remove();
1846
+ });
1847
+ div.append("button").text("Edit").on("click", (event2) => {
1848
+ const inputdom = document.createElement("input");
1849
+ div.node().insertBefore(inputdom, event2.target);
1850
+ const buttdom = document.createElement("button");
1851
+ div.node().insertBefore(buttdom, event2.target);
1852
+ div.node().removeChild(event2.target);
1853
+ inputdom.focus();
1854
+ const input = select_default(inputdom);
1855
+ const butt = select_default(buttdom);
1856
+ input.attr("size", 10).style("margin", "0px 10px").property("value", idlst.join(","));
1857
+ butt.text("Apply").on("click", () => {
1858
+ const lst0 = inputdom.value.trim().split(",");
1859
+ const goodid = [];
1860
+ for (const s of lst0) {
1861
+ if (!s) continue;
1862
+ const j = Number.parseInt(s);
1863
+ if (Number.isNaN(j)) return alert("invalid id: " + s);
1864
+ if (this.prodidisinvalid(j, sample)) return alert("invalid id " + j);
1865
+ goodid.push(j);
1866
+ }
1867
+ if (goodid.length <= 1) return alert("must be at least 2 products");
1868
+ const newevtlst = [];
1869
+ for (const id of goodid) {
1870
+ const lookprod = this.extractprod(id, sample);
1871
+ if (lookprod) {
1872
+ newevtlst.push({ label: lookprod.eventlabel, lst: [lookprod] });
1873
+ } else {
1874
+ return alert("unknown product id " + id);
1875
+ }
1876
+ }
1877
+ if (newevtlst.length <= 1) return alert("less than 2 products cannot make a group");
1878
+ eglst.unshift({ lst: newevtlst, ismsg: true });
1879
+ this.showsample(sample);
1880
+ pane.pane.remove();
1881
+ });
1882
+ });
1883
+ svtable({
1884
+ samplelst: [
1885
+ {
1886
+ pairlst: joinlst
1887
+ }
1888
+ ],
1889
+ nosample: true,
1890
+ holder: pane.body
1891
+ });
1892
+ const par = {
1893
+ pairlst: joinlst,
1894
+ genome: this.genome,
1895
+ holder: pane.body,
1896
+ hostURL: this.hostURL,
1897
+ jwt: this.jwt
1898
+ };
1899
+ import("./svgraph-Q2U2HEMF.js").then((p2) => {
1900
+ p2.default(par);
1901
+ });
1902
+ });
1903
+ }
1904
+ }
1905
+ const g_rows = g_eg.append("g").attr("transform", "translate(" + hpad + "," + (eg.lst.length > 1 ? vpad : 0) + ")");
1906
+ let y1 = 0;
1907
+ let evtid = 0;
1908
+ const bgcolor = "#ededed";
1909
+ const elabhash = {};
1910
+ for (const e of eg.lst) {
1911
+ elabhash[e.label] = 1;
1912
+ }
1913
+ const showngenenotip = {};
1914
+ for (const evt of eg.lst) {
1915
+ const prodlst = evt.lst;
1916
+ const prod = prodlst[0];
1917
+ const thispair = prod.usepair;
1918
+ if (eg.lst.length > 1 && evtid > 0) {
1919
+ const g_row2 = g_rows.append("g").attr("transform", "translate(" + (chrAw + s1 + rowh + s7 + geneAw + genesp + s2 / 2) + "," + y1 + ")");
1920
+ 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");
1921
+ if (eg.ismsg) {
1922
+ text2.text(prod.mswhat ? prod.mswhat : "No connection detail");
1923
+ } else {
1924
+ text2.text("Reciprocal");
1925
+ }
1926
+ y1 += rowh2 + rows;
1927
+ }
1928
+ const textcolor = prod.chrA == prod.chrB ? "black" : colorctx;
1929
+ const g_row = g_rows.append("g").attr("transform", "translate(0," + y1 + ")");
1930
+ 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);
1931
+ const extevt = { a: null, b: null };
1932
+ if (prod.geneA) {
1933
+ if (prod.geneA in showngenenotip) {
1934
+ showngenenotip[prod.geneA] = 1;
1935
+ } else {
1936
+ const lst = [];
1937
+ for (const elab in sample.gene2events[prod.geneA]) {
1938
+ if (!(elab in elabhash)) {
1939
+ lst.push(elab);
1940
+ }
1941
+ }
1942
+ if (lst.length > 0) {
1943
+ extevt.a = { lst };
1944
+ 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);
1945
+ if (lst.length > 1) {
1946
+ 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");
1947
+ }
1948
+ 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");
1949
+ }
1950
+ }
1951
+ }
1952
+ 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");
1953
+ let antisense = false;
1954
+ if (thispair) {
1955
+ const thisn = thispair.a.isoform;
1956
+ if (thisn) {
1957
+ const _gm = this.genome.isoformmatch(thisn, prod.chrA, prod.posA);
1958
+ if (_gm && _gm.strand != prod.ortA) {
1959
+ antisense = true;
1960
+ }
1961
+ }
1962
+ }
1963
+ 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);
1964
+ let labA;
1965
+ if (prod.geneA) {
1966
+ const t = prod.geneA.split(",");
1967
+ if (t.length > 2) {
1968
+ labA = t[0] + "," + t[1] + "...";
1969
+ } else {
1970
+ labA = prod.geneA;
1971
+ }
1972
+ } else {
1973
+ labA = "";
1974
+ }
1975
+ 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(
1976
+ "font-weight",
1977
+ prod.hlgene ? prod.hlgene == 1 || prod.hlgene == 3 || prod.hlgene == 4 ? "bold" : "normal" : "normal"
1978
+ ).attr("fill", prod.hlgene ? prod.hlgene == 4 ? knownprod_c : "#545454" : "#545454").attr("text-anchor", "end").attr("dominant-baseline", "central");
1979
+ 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");
1980
+ 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");
1981
+ antisense = false;
1982
+ if (thispair) {
1983
+ const thisn = thispair.b.isoform;
1984
+ if (thisn) {
1985
+ const _gm = this.genome.isoformmatch(thisn, prod.chrB, prod.posB);
1986
+ if (_gm && _gm.strand != prod.ortB) {
1987
+ antisense = true;
1988
+ }
1989
+ }
1990
+ }
1991
+ 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);
1992
+ let labB;
1993
+ if (prod.geneB) {
1994
+ let t = prod.geneB.split(",");
1995
+ if (t.length > 2) {
1996
+ labB = t[0] + "," + t[1] + "...";
1997
+ } else {
1998
+ labB = prod.geneB;
1999
+ }
2000
+ } else {
2001
+ labB = "";
2002
+ }
2003
+ 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(
2004
+ "font-weight",
2005
+ prod.hlgene ? prod.hlgene == 2 || prod.hlgene == 3 || prod.hlgene == 4 ? "bold" : "normal" : "normal"
2006
+ ).attr("fill", prod.hlgene ? prod.hlgene == 4 ? knownprod_c : "#545454" : "#545454").attr("dominant-baseline", "central");
2007
+ if (prod.geneB) {
2008
+ if (prod.geneB in showngenenotip) {
2009
+ } else {
2010
+ showngenenotip[prod.geneB] = 1;
2011
+ const lst = [];
2012
+ for (const elab in sample.gene2events[prod.geneB]) {
2013
+ if (!(elab in elabhash)) {
2014
+ lst.push(elab);
2015
+ }
2016
+ }
2017
+ if (lst.length > 0) {
2018
+ extevt.b = { lst };
2019
+ 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);
2020
+ if (lst.length > 1) {
2021
+ 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");
2022
+ }
2023
+ 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");
2024
+ }
2025
+ }
2026
+ }
2027
+ 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);
2028
+ let x = chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1 + chrBw + s3;
2029
+ const x0 = x;
2030
+ 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);
2031
+ x += s5;
2032
+ 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");
2033
+ x += evt.svg.ratingw + s5;
2034
+ prod.hook.mainFrame = {};
2035
+ 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");
2036
+ if (prod.usepair) {
2037
+ prod.hook.mainFrame.bg.attr("fill", prod.usepair.inframe ? colorinframe : coloroutframe);
2038
+ } else {
2039
+ prod.hook.mainFrame.bg.attr("fill", "none").attr("stroke", "black");
2040
+ }
2041
+ 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");
2042
+ x += evt.svg.framew + s5;
2043
+ 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");
2044
+ x += evt.svg.typew + s5;
2045
+ 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");
2046
+ 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");
2047
+ x += evt.svg.featurew + s5;
2048
+ 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");
2049
+ x += evt.svg.scorew + s5 + s4;
2050
+ 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", () => {
2051
+ logobg.attr("stroke-width", "2");
2052
+ const d = tip.clear().showunder(logobg.node()).d.append("div");
2053
+ this.prodstat(prod, d);
2054
+ }).on("mouseout", () => {
2055
+ logobg.attr("stroke-width", "1");
2056
+ tip.hide();
2057
+ });
2058
+ if (prodlst.length > 1) {
2059
+ 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);
2060
+ 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");
2061
+ 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) => {
2062
+ logobg2.attr("stroke-width", "2");
2063
+ const table = tip.clear().showunder(event.target).d.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2064
+ const tr1 = table.append("tr");
2065
+ const tr2 = table.append("tr");
2066
+ for (var k = 1; k < prodlst.length; k++) {
2067
+ this.eventlogo([prodlst[k]], tr1.append("td"));
2068
+ this.prodstat(prodlst[k], tr2.append("td"));
2069
+ }
2070
+ }).on("mouseout", () => {
2071
+ logobg2.attr("stroke-width", "1");
2072
+ tip.hide();
2073
+ });
2074
+ }
2075
+ x = chrAw + s1 + rowh + s7 + geneAw + genesp + s2 + genesp + geneBw + s7 + rowh + s1 + chrBw + s3 + eventlogow + s6;
2076
+ 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");
2077
+ if (evt.svg.hasrecurrence) {
2078
+ text.attr("class", "sja_svgtext2").on("mouseover", (event) => {
2079
+ const p = event.target.getBoundingClientRect();
2080
+ tip.clear().show(p.left + p.width + 10, p.top - 15);
2081
+ const slst = this.elab2sample[evt.label];
2082
+ const dd = tip.d;
2083
+ dd.append("div").style("margin", "10px").style("color", "#aaa").text("This fusion is recurrent in other samples:");
2084
+ const table = dd.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2085
+ for (const s of slst) {
2086
+ if (s.name == sample.name) {
2087
+ continue;
2088
+ }
2089
+ const tr = table.append("tr");
2090
+ tr.append("td").style("font-weight", "bold").style("color", "#858585").text(s.name);
2091
+ this.eventlogo(s.events[evt.label], tr.append("td"));
2092
+ }
2093
+ }).on("mouseout", () => tip.hide());
2094
+ }
2095
+ 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) => {
2096
+ boxa.attr("stroke-width", 2);
2097
+ boxb.attr("stroke-width", 2);
2098
+ const p = event.target.getBoundingClientRect();
2099
+ tip.clear().show(p.left + p.width + s7 / 2, p.top - 30);
2100
+ this.showsvpairs({
2101
+ prodlst: evt.lst,
2102
+ holder: tip.d,
2103
+ nodetail: true,
2104
+ sample,
2105
+ eglst,
2106
+ showothersample: true
2107
+ });
2108
+ }).on("mouseout", () => {
2109
+ tip.hide();
2110
+ boxa.attr("stroke-width", 1);
2111
+ boxb.attr("stroke-width", 1);
2112
+ }).on("click", (event) => {
2113
+ if (evt.inclick) {
2114
+ return;
2115
+ }
2116
+ evt.inclick = true;
2117
+ const p = event.target.getBoundingClientRect();
2118
+ const pane3 = newpane({
2119
+ x: p.left + p.width + s7 + rowh + s1 + chrBw + s3 + eventlogow + s6 + recurw + 5,
2120
+ y: p.top - 100,
2121
+ close: function() {
2122
+ evt.inclick = false;
2123
+ pane3.pane.remove();
2124
+ }
2125
+ });
2126
+ const prod2 = evt.lst[0];
2127
+ pane3.header.html(
2128
+ '<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>"
2129
+ );
2130
+ this.showsvpairs({
2131
+ prodlst: evt.lst,
2132
+ holder: pane3.body
2133
+ });
2134
+ });
2135
+ if (extevt.a) {
2136
+ 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", () => {
2137
+ this.extevt_mo(extevt.a);
2138
+ tip.hide();
2139
+ }).on("click", (event) => {
2140
+ this.extevt_c(extevt.a, event.target, sample);
2141
+ });
2142
+ }
2143
+ if (extevt.b) {
2144
+ 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", () => {
2145
+ this.extevt_mo(extevt.b);
2146
+ tip.hide();
2147
+ }).on("click", (event) => this.extevt_c(extevt.b, event.target, sample));
2148
+ }
2149
+ y1 += rowh + rows;
2150
+ evtid++;
2151
+ }
2152
+ y += groupheight + (eg.lst.length > 1 ? gvpad : 0);
2153
+ }
2154
+ holder.style("display", "none");
2155
+ }
2156
+ extevt_mover(ext, dom, sample) {
2157
+ ext.circle.attr("fill", "#858585");
2158
+ if (ext.text) {
2159
+ ext.text.attr("fill", "white");
2160
+ }
2161
+ tip.clear().showunder(dom);
2162
+ tip.d.append("div").style("margin", "10px").style("color", "#aaa").text("Associated fusions from this sample:");
2163
+ this.extevt_table(ext.lst, tip.d, sample);
2164
+ }
2165
+ extevt_mo(ext) {
2166
+ ext.circle.attr("fill", "white");
2167
+ if (ext.text) {
2168
+ ext.text.attr("fill", "black");
2169
+ }
2170
+ }
2171
+ extevt_c(ext, dom, sample) {
2172
+ const p = dom.getBoundingClientRect();
2173
+ const pane = newpane({ x: p.left, y: p.top + p.height + 10 });
2174
+ this.extevt_table(ext.lst, pane.body, sample);
2175
+ }
2176
+ extevt_table(lst, holder, sample) {
2177
+ const table = holder.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2178
+ for (const elab of lst) {
2179
+ const tr = table.append("tr");
2180
+ const prodlst = sample.events[elab];
2181
+ if (!prodlst) {
2182
+ tr.append('<td colspan=2 style="color:red">No products found for ' + elab + "</td>");
2183
+ continue;
2184
+ }
2185
+ const prod = prodlst[0];
2186
+ tr.append("td").style("text-align", "right").text(prod.geneA ? prod.geneA : prod.chrA);
2187
+ tr.append("td").text(prod.geneB ? prod.geneB : prod.chrB);
2188
+ this.eventlogo(prodlst, tr.append("td"));
2189
+ }
2190
+ }
2191
+ eventlogo(prodlst, holder) {
2192
+ const d = holder.append("div");
2193
+ if (!prodlst || prodlst.length == 0) {
2194
+ d.style("color", "red").text("No products");
2195
+ } else {
2196
+ const p = prodlst[0];
2197
+ d.append("div").style("display", "inline-block").style("padding", "2px 4px").style("border", "solid 1px #858585").style("border-radius", "5px").html(
2198
+ 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)
2199
+ );
2200
+ if (prodlst.length > 1) {
2201
+ 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);
2202
+ }
2203
+ }
2204
+ return d;
2205
+ }
2206
+ prodstat(prod, holder) {
2207
+ holder.append("p").text("Product id: " + prod.prodid);
2208
+ const alertcolor = "#FFb3b3", bg = "#f1f1f1";
2209
+ const table = holder.append("table").style("border-spacing", "8px").style("border-collapse", "separate");
2210
+ let tr = table.append("tr");
2211
+ tr.append("td");
2212
+ tr.append("td").style("background-color", bg).text(prod.geneA ? prod.geneA : prod.chrA);
2213
+ tr.append("td").style("background-color", bg).text(prod.geneB ? prod.geneB : prod.chrB);
2214
+ tr = table.append("tr");
2215
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("chimeric reads");
2216
+ tr.append("td").style("padding", "5px").style("background-color", prod.readsA <= this.cf_reads ? alertcolor : "").text(prod.readsA);
2217
+ tr.append("td").style("padding", "5px").style("background-color", prod.readsB <= this.cf_reads ? alertcolor : "").text(prod.readsB);
2218
+ tr = table.append("tr");
2219
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("ratio");
2220
+ tr.append("td").style("padding", "5px").style("background-color", prod.ratioA <= this.cf_ratio ? alertcolor : "").text(Math.ceil(prod.ratioA * 100) + "%");
2221
+ tr.append("td").style("padding", "5px").style("background-color", prod.ratioB <= this.cf_ratio ? alertcolor : "").text(Math.ceil(prod.ratioB * 100) + "%");
2222
+ tr = table.append("tr");
2223
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("contig length");
2224
+ tr.append("td").style("padding", "5px").style("background-color", prod.matchA <= this.cf_match ? alertcolor : "").text(prod.matchA + " bp");
2225
+ tr.append("td").style("padding", "5px").style("background-color", prod.matchB <= this.cf_match ? alertcolor : "").text(prod.matchB + " bp");
2226
+ tr = table.append("tr");
2227
+ tr.append("td").style("font-size", "80%").style("background-color", bg).text("repeat score");
2228
+ tr.append("td").style("padding", "5px").style("background-color", prod.repeatA >= this.cf_repeat ? alertcolor : "").text(prod.repeatA);
2229
+ tr.append("td").style("padding", "5px").style("background-color", prod.repeatB >= this.cf_repeat ? alertcolor : "").text(prod.repeatB);
2230
+ }
2231
+ showsvpairs(arg) {
2232
+ const table = arg.holder.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2233
+ const tr = table.append("tr");
2234
+ const _tr = table.append("tr");
2235
+ const expressiontd = _tr.append("td").attr("colspan", arg.prodlst.length);
2236
+ const tr2 = table.append("tr");
2237
+ const geneset = /* @__PURE__ */ new Set();
2238
+ for (const prod of arg.prodlst) {
2239
+ if (prod.geneA) {
2240
+ geneset.add(prod.geneA);
2241
+ }
2242
+ if (prod.geneB) {
2243
+ geneset.add(prod.geneB);
2244
+ }
2245
+ const td = tr.append("td").style("vertical-align", "top");
2246
+ if (arg.nodetail) {
2247
+ const div = td.append("div");
2248
+ div.append("span").style("padding-right", "20px").text("Product id: " + prod.prodid);
2249
+ const ratingsl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2250
+ const newv = event.target.value;
2251
+ prod.rating = newv;
2252
+ if (prod.hook.mainRating) {
2253
+ prod.hook.mainRating.text(newv);
2254
+ }
2255
+ if (prod.hook.lessRating) {
2256
+ prod.hook.lessRating.text(newv);
2257
+ }
2258
+ });
2259
+ const framesl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2260
+ const sl = event.target;
2261
+ const inframe = sl.options[sl.selectedIndex].innerHTML == "in-frame";
2262
+ prod.usepair.inframe = inframe;
2263
+ if (prod.hook.mainFrame) {
2264
+ prod.hook.mainFrame.text.text(inframe ? "IN" : "O");
2265
+ prod.hook.mainFrame.bg.attr("fill", inframe ? colorinframe : coloroutframe);
2266
+ }
2267
+ if (prod.hook.lessFrame) {
2268
+ prod.hook.lessFrame.html(
2269
+ 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>'
2270
+ );
2271
+ }
2272
+ });
2273
+ const typesl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2274
+ const t = findType2(event.target.value);
2275
+ if (!t) return;
2276
+ prod.type2 = t.label;
2277
+ if (prod.hook.mainType) {
2278
+ prod.hook.mainType.text(t.label);
2279
+ }
2280
+ for (const t2 of type2lst) {
2281
+ if (t2.flag) prod[t2.flag] = t2 === t;
2282
+ }
2283
+ });
2284
+ const effectsl = div.append("select").style("margin-right", "5px").on("change", (event) => {
2285
+ const sl = event.target;
2286
+ const newv = sl.options[sl.selectedIndex].innerHTML;
2287
+ prod.functioneffect = newv;
2288
+ });
2289
+ div.append("button").text("Create group").on("click", (event) => {
2290
+ let dnew = document.createElement("div");
2291
+ div.node().insertBefore(dnew, event.target);
2292
+ select_default(event.target).remove();
2293
+ dnew = select_default(dnew);
2294
+ dnew.style("display", "inline-block");
2295
+ if (!arg.eglst) {
2296
+ dnew.text("Cannot do it here: please go to sample " + arg.sample.name);
2297
+ return;
2298
+ }
2299
+ dnew.append("input").attr("size", 10).property("value", prod.prodid + ",");
2300
+ dnew.append("button").style("margin", "0px 10px").text("Apply").on("click", (event2) => {
2301
+ const lst0 = event2.target.previousSibling.value.trim().split(",");
2302
+ const goodid = [];
2303
+ for (const i of lst0) {
2304
+ const j = Number.parseInt(i);
2305
+ if (Number.isNaN(j)) return alert("invalid id " + i);
2306
+ if (this.prodidisinvalid(j, arg.sample)) return alert("invalid id " + j);
2307
+ goodid.push(j);
2308
+ }
2309
+ if (goodid.length <= 1) return alert("need at least 2 id");
2310
+ const newevtlst = [];
2311
+ for (const i of goodid) {
2312
+ const thisprod = this.extractprod(i, arg.sample);
2313
+ if (thisprod) {
2314
+ newevtlst.push({ label: thisprod.eventlabel, lst: [thisprod] });
2315
+ } else {
2316
+ return alert("invalid id " + i);
2317
+ }
2318
+ }
2319
+ if (newevtlst.length <= 1) return alert("less than 2 products cannot make a group");
2320
+ arg.eglst.unshift({ lst: newevtlst, ismsg: true });
2321
+ this.showsample(arg.sample);
2322
+ tip.hide();
2323
+ });
2324
+ });
2325
+ for (const rating of ["HQ", "LQ", "RT", "bad", "Major", "NA"]) {
2326
+ ratingsl.append("option").attr("value", rating).text(rating);
2327
+ }
2328
+ ratingsl.property("value", prod.rating);
2329
+ framesl.append("option").text("in-frame");
2330
+ framesl.append("option").text("out-of-frame");
2331
+ if (!prod.usepair) {
2332
+ framesl.attr("disabled", 1);
2333
+ } else {
2334
+ framesl.property("selectedIndex", prod.usepair.inframe ? 0 : 1);
2335
+ }
2336
+ const curtype = findType2(prod.type2);
2337
+ if (!curtype) {
2338
+ typesl.append("option").attr("value", "").attr("disabled", 1).text(prod.type2 || "");
2339
+ }
2340
+ for (const t of type2lst) {
2341
+ typesl.append("option").attr("value", t.label).text(t.label);
2342
+ }
2343
+ typesl.property("value", curtype ? curtype.label : "");
2344
+ effectsl.append("option").text("unknown effect");
2345
+ effectsl.append("option").text("fusion gene");
2346
+ effectsl.append("option").text("truncation, activated oncogene");
2347
+ effectsl.append("option").text("truncation, loss-of-function");
2348
+ effectsl.append("option").text("truncation, no consequence");
2349
+ effectsl.append("option").text("ITD");
2350
+ switch (prod.functioneffect) {
2351
+ case void 0:
2352
+ effectsl.property("selectedIndex", 0);
2353
+ break;
2354
+ case "fusion gene":
2355
+ effectsl.property("selectedIndex", 1);
2356
+ break;
2357
+ case "truncation, activated oncogene":
2358
+ effectsl.property("selectedIndex", 2);
2359
+ break;
2360
+ case "truncation, loss-of-function":
2361
+ effectsl.property("selectedIndex", 3);
2362
+ break;
2363
+ case "truncation, no consequence":
2364
+ effectsl.property("selectedIndex", 4);
2365
+ break;
2366
+ case "ITD":
2367
+ effectsl.property("selectedIndex", 5);
2368
+ break;
2369
+ }
2370
+ }
2371
+ const p = {
2372
+ a: {
2373
+ chr: prod.chrA,
2374
+ position: prod.posA,
2375
+ strand: prod.ortA,
2376
+ name: prod.geneA ? prod.geneA : prod.chrA,
2377
+ ratio: prod.ratioA.toFixed(2),
2378
+ feature: prod.featureA,
2379
+ contiglen: prod.matchA,
2380
+ chimericreads: prod.readsA,
2381
+ repeatscore: prod.repeatA
2382
+ },
2383
+ b: {
2384
+ chr: prod.chrB,
2385
+ position: prod.posB,
2386
+ strand: prod.ortB,
2387
+ name: prod.geneB ? prod.geneB : prod.chrB,
2388
+ ratio: prod.ratioB.toFixed(2),
2389
+ feature: prod.featureB,
2390
+ contiglen: prod.matchB,
2391
+ chimericreads: prod.readsB,
2392
+ repeatscore: prod.repeatB
2393
+ },
2394
+ rating: prod.rating,
2395
+ score: Math.ceil(prod.score),
2396
+ originalprod: prod
2397
+ };
2398
+ if (prod.usepair) {
2399
+ p.inframe = prod.usepair.inframe;
2400
+ const x = prod.usepair.a;
2401
+ p.a.gm = this.genome.isoformmatch(x.isoform, prod.chrA, prod.posA);
2402
+ p.a.codon = x.codon;
2403
+ p.a.exon = x.exon;
2404
+ p.a.atupstream = x.atupstream;
2405
+ p.a.atdownstream = x.atdownstream;
2406
+ p.a.atutr5 = x.atutr5;
2407
+ p.a.atutr3 = x.atutr3;
2408
+ const y = prod.usepair.b;
2409
+ p.b.gm = this.genome.isoformmatch(y.isoform, prod.chrB, prod.posB);
2410
+ p.b.codon = y.codon;
2411
+ p.b.exon = y.exon;
2412
+ p.b.atupstream = y.atupstream;
2413
+ p.b.atdownstream = y.atdownstream;
2414
+ p.b.atutr5 = y.atutr5;
2415
+ p.b.atutr3 = y.atutr3;
2416
+ let aalen = 0, bplen2 = 0;
2417
+ if (x.contigaa && y.contigaa) {
2418
+ aalen = y.contigaa - x.contigaa - 1;
2419
+ }
2420
+ if (x.contigbp && y.contigbp) {
2421
+ bplen2 = y.contigbp - x.contigbp - 1;
2422
+ }
2423
+ if (aalen) {
2424
+ p.interstitial = { aalen };
2425
+ }
2426
+ if (bplen2) {
2427
+ if (!p.interstitial) p.interstitial = {};
2428
+ p.interstitial.bplen = bplen2;
2429
+ }
2430
+ }
2431
+ svtable({
2432
+ samplelst: [
2433
+ {
2434
+ pairlst: [p]
2435
+ }
2436
+ ],
2437
+ nosample: true,
2438
+ holder: td
2439
+ });
2440
+ const par = {
2441
+ pairlst: [p],
2442
+ genome: this.genome,
2443
+ holder: td,
2444
+ quiet: true,
2445
+ hostURL: this.hostURL,
2446
+ jwt: this.jwt
2447
+ };
2448
+ import("./svgraph-Q2U2HEMF.js").then((p2) => {
2449
+ p2.default(par);
2450
+ });
2451
+ if (!arg.nodetail) {
2452
+ const td2 = tr2.append("td").style("font-size", ".8em").style("vertical-align", "top");
2453
+ const lst = [];
2454
+ for (const at of this.atlst) {
2455
+ if (!at.custom) continue;
2456
+ const v = prod[at.key];
2457
+ lst.push({
2458
+ k: at.label,
2459
+ v: v == void 0 ? "" : v
2460
+ });
2461
+ }
2462
+ make_table_2col(td2, lst, 25);
2463
+ prod.pairs.sort((a, b) => {
2464
+ if (a.inuse) return -1;
2465
+ if (b.inuse) return 1;
2466
+ return 0;
2467
+ });
2468
+ const table0 = td2.append("table");
2469
+ for (const pair of prod.pairs) {
2470
+ const tr3 = table0.append("tr");
2471
+ tr3.append("td").html(
2472
+ (pair.inframe ? "in-frame" : "out-of-frame") + '<div style="font-size:70%">frame code: ' + pair.frame + "</div>"
2473
+ );
2474
+ const td3 = tr3.append("td");
2475
+ const table2 = td3.append("table").style("margin-bottom", "20px").style("border", pair.inuse ? "solid 1px black" : "").style("border-spacing", "10px").style("border-collapse", "separate");
2476
+ let _tr2 = table2.append("tr").style("color", "#858585").style("font-size", ".7em");
2477
+ _tr2.append("td").text("gene");
2478
+ _tr2.append("td").text("isoform");
2479
+ _tr2.append("td").text("gene position");
2480
+ _tr2.append("td").text("exon");
2481
+ _tr2.append("td").text("anchor");
2482
+ _tr2.append("td").text("contig AA");
2483
+ _tr2.append("td").text("contig bp");
2484
+ const tr1 = table2.append("tr");
2485
+ const tr22 = table2.append("tr");
2486
+ tr1.append("td").text(prod.geneA ? prod.geneA : prod.chrA);
2487
+ tr22.append("td").text(prod.geneB ? prod.geneB : prod.chrB);
2488
+ tr1.append("td").text(pair.a.isoform ? pair.a.isoform : "");
2489
+ tr22.append("td").text(pair.b.isoform ? pair.b.isoform : "");
2490
+ tr1.append("td").text(
2491
+ 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" : ""
2492
+ );
2493
+ tr22.append("td").text(
2494
+ 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" : ""
2495
+ );
2496
+ tr1.append("td").text(pair.a.exon ? pair.a.exon : "");
2497
+ tr22.append("td").text(pair.b.exon ? pair.b.exon : "");
2498
+ tr1.append("td").text(pair.a.anchor ? pair.a.anchor : "");
2499
+ tr22.append("td").text(pair.b.anchor ? pair.b.anchor : "");
2500
+ tr1.append("td").html(pair.a.contigaa ? '<span style="color:#858585;font-size:70%">ends at</span> ' + pair.a.contigaa : "?");
2501
+ tr22.append("td").html(
2502
+ pair.b.contigaa ? '<span style="color:#858585;font-size:70%">starts at</span> ' + pair.b.contigaa : "?"
2503
+ );
2504
+ tr1.append("td").html(pair.a.contigbp ? '<span style="color:#858585;font-size:70%">ends at</span> ' + pair.a.contigbp : "?");
2505
+ tr22.append("td").html(
2506
+ pair.b.contigbp ? '<span style="color:#858585;font-size:70%">starts at</span> ' + pair.b.contigbp : "?"
2507
+ );
2508
+ }
2509
+ }
2510
+ }
2511
+ if (!arg.sample) {
2512
+ return;
2513
+ }
2514
+ const thislab = arg.prodlst[0].eventlabel;
2515
+ const samplelst = this.elab2sample[thislab];
2516
+ const othersample = [];
2517
+ if (samplelst) {
2518
+ for (const s of samplelst) {
2519
+ if (s.name != arg.sample.name) othersample.push(s);
2520
+ }
2521
+ }
2522
+ if (arg.showothersample && othersample.length > 0) {
2523
+ arg.holder.append("button").style("display", "block").style("margin", "20px").text("Show in " + othersample.length + " other sample" + (othersample.length > 1 ? "s" : "")).on("click", (event) => {
2524
+ select_default(event.target).remove();
2525
+ for (const sample of othersample) {
2526
+ const prodlst = sample.events[thislab];
2527
+ if (!prodlst) {
2528
+ arg.holder.append("div").style("margin", "20px").style("color", "red").text("Error: no products for this event in " + sample.name);
2529
+ continue;
2530
+ }
2531
+ const table2 = arg.holder.append("table").style("margin-top", "20px").style("border", "solid 1px #ccc");
2532
+ const tr3 = table2.append("tr");
2533
+ tr3.append("td").text(sample.name);
2534
+ const td = tr3.append("td");
2535
+ this.showsvpairs({
2536
+ prodlst,
2537
+ holder: td,
2538
+ nodetail: true,
2539
+ sample,
2540
+ // FIXME: eglst info is hidden somewhere in sample.egglst
2541
+ eglst: null
2542
+ });
2543
+ }
2544
+ });
2545
+ }
2546
+ if (this.expression.genes && geneset.size > 0) {
2547
+ const table2 = expressiontd.append("table");
2548
+ const tr3 = table2.append("tr");
2549
+ for (const gene of geneset) {
2550
+ const expd = this.expression.genes[gene];
2551
+ if (expd) {
2552
+ const div = tr3.append("td").style("vertical-align", "top").append("div").style("display", "inline-block").style("margin-right", "20px").style("border", "solid 1px #ccc");
2553
+ div.append("div").style("background-color", "#ededed").style("padding", "10px").text(gene);
2554
+ if (arg.sample) {
2555
+ for (const v of expd) {
2556
+ if (v.sample == arg.sample.name) {
2557
+ v.ishighlight = true;
2558
+ div.append("div").style("padding", "10px").style("font-size", "70%").html("Expression in " + arg.sample.name + ': <span style="font-size:150%">' + v.value + "</span>");
2559
+ } else {
2560
+ v.ishighlight = false;
2561
+ }
2562
+ }
2563
+ }
2564
+ showgenevalues({
2565
+ data: this.expression.genes[gene],
2566
+ holder: div.append("div").style("margin", "10px"),
2567
+ width: 200,
2568
+ height: 200,
2569
+ namename: "sample"
2570
+ });
2571
+ } else {
2572
+ tr3.append("td").style("vertical-align", "top").text("No expression data for " + gene + "</td>");
2573
+ }
2574
+ }
2575
+ }
2576
+ }
2577
+ prodidisinvalid(id, sample) {
2578
+ for (const egg of sample.egglst) {
2579
+ for (const eg of egg.lst) {
2580
+ for (const e of eg.lst) {
2581
+ for (const p of e.lst) {
2582
+ if (p.prodid == id) return false;
2583
+ }
2584
+ }
2585
+ }
2586
+ }
2587
+ return true;
2588
+ }
2589
+ extractprod(id, sample) {
2590
+ let prod = null;
2591
+ for (let n = 0; n < sample.egglst.length; n++) {
2592
+ const _egg = sample.egglst[n];
2593
+ for (let j = 0; j < _egg.lst.length; j++) {
2594
+ const _eg = _egg.lst[j];
2595
+ for (let k = 0; k < _eg.lst.length; k++) {
2596
+ const _evt = _eg.lst[k];
2597
+ for (let p = 0; p < _evt.lst.length; p++) {
2598
+ const p2 = _evt.lst[p];
2599
+ if (p2.prodid == id) {
2600
+ prod = p2;
2601
+ _evt.lst.splice(p, 1);
2602
+ break;
2603
+ }
2604
+ }
2605
+ if (prod) {
2606
+ if (_evt.lst.length == 0) {
2607
+ _eg.lst.splice(k, 1);
2608
+ }
2609
+ break;
2610
+ }
2611
+ }
2612
+ if (prod) {
2613
+ if (_eg.lst.length == 0) {
2614
+ _egg.lst.splice(j, 1);
2615
+ } else {
2616
+ if (_eg.ismsg && _eg.lst.length == 1) {
2617
+ delete _eg.ismsg;
2618
+ }
2619
+ }
2620
+ break;
2621
+ }
2622
+ }
2623
+ if (prod) {
2624
+ if (_egg.lst.length == 0) {
2625
+ sample.egglst.splice(n, 1);
2626
+ }
2627
+ break;
2628
+ }
2629
+ }
2630
+ return prod;
2631
+ }
2632
+ // end of class
2633
+ };
2634
+ function msjoin(prod, newholder) {
2635
+ if (prod.isitd) return;
2636
+ if (prod.sv_ort == "?") return;
2637
+ var single = true;
2638
+ var thispair = prod.usepair;
2639
+ for (var i = 0; i < newholder.length; i++) {
2640
+ var tmplst = newholder[i];
2641
+ var prod2 = tmplst[0];
2642
+ if (prod.chrB == prod2.chrA && prod.ortB == prod2.ortA) {
2643
+ if (testreadcount(prod, prod2)) {
2644
+ var thatpair = prod2.usepair;
2645
+ if (thispair && thatpair && thispair.b.isoform && thispair.b.isoform == thatpair.a.isoform) {
2646
+ var p1 = thispair.b;
2647
+ var p2 = thatpair.a;
2648
+ var ahead = false;
2649
+ if (p1.atutr5) {
2650
+ if (p2.codon != void 0) {
2651
+ ahead = true;
2652
+ prod2.mswhat = "5' UTR to coding region";
2653
+ } else if (p2.atutr3) {
2654
+ ahead = true;
2655
+ prod2.mswhat = "5' UTR to 3' UTR";
2656
+ } else if (p2.atutr5 && p1.atutr5.off < p2.atutr5.off) {
2657
+ ahead = true;
2658
+ prod2.mswhat = p2.atutr5.off - p1.atutr5.off + " bp apart in 5' UTR";
2659
+ }
2660
+ } else if (p1.atutr3) {
2661
+ if (p2.atutr3 && p1.atutr3.off < p2.atutr3.off) {
2662
+ ahead = true;
2663
+ prod2.mswhat = p2.atutr3.off - p1.atutr3.off + " bp apart in 3' UTR";
2664
+ }
2665
+ } else if (p1.codon != void 0) {
2666
+ if (p2.codon != void 0 && p2.codon > p1.codon) {
2667
+ ahead = true;
2668
+ prod2.mswhat = p2.codon - p1.codon + " aa apart in protein";
2669
+ } else if (p2.atutr3) {
2670
+ ahead = true;
2671
+ prod2.mswhat = "coding region to 3' UTR";
2672
+ }
2673
+ }
2674
+ if (ahead) {
2675
+ tmplst.unshift(prod);
2676
+ single = false;
2677
+ break;
2678
+ }
2679
+ }
2680
+ var dst = prod2.posA - prod.posB;
2681
+ if (prod.ortB == "+" && dst > 0 && dst < genomelimit || prod.ortB == "-" && dst < 0 && -dst < genomelimit) {
2682
+ prod2.mswhat = Math.abs(dst) + " bp apart on genome";
2683
+ tmplst.unshift(prod);
2684
+ single = false;
2685
+ break;
2686
+ }
2687
+ }
2688
+ }
2689
+ prod2 = tmplst[tmplst.length - 1];
2690
+ if (prod.chrA == prod2.chrB && prod.ortA == prod2.ortB) {
2691
+ if (testreadcount(prod2, prod)) {
2692
+ var thatpair = prod2.usepair;
2693
+ if (thispair && thatpair && thispair.a.isoform && thispair.a.isoform == thatpair.b.isoform) {
2694
+ var p1 = thatpair.b;
2695
+ var p2 = thispair.a;
2696
+ var behind = false;
2697
+ if (p1.atutr5) {
2698
+ if (p2.codon != void 0) {
2699
+ behind = true;
2700
+ prod.mswhat = "5' UTR to coding region";
2701
+ } else if (p2.atutr3) {
2702
+ behind = true;
2703
+ prod.mswhat = "5' UTR to 3' UTR";
2704
+ } else if (p2.atutr5 && p1.atutr5.off < p2.atutr5.off) {
2705
+ behind = true;
2706
+ prod.mswhat = p2.atutr5.off - p1.atutr5.off + " bp apart in 5' UTR";
2707
+ }
2708
+ } else if (p1.atutr3) {
2709
+ if (p2.atutr3 && p1.atutr3.off < p2.atutr3.off) {
2710
+ behind = true;
2711
+ prod.mswhat = p2.atutr3.off - p1.atutr3.off + " bp apart in 3' UTR";
2712
+ }
2713
+ } else if (p1.codon != void 0) {
2714
+ if (p2.codon != void 0 && p2.codon > p1.codon) {
2715
+ behind = true;
2716
+ prod.mswhat = p2.codon - p1.codon + " aa apart in protein";
2717
+ } else if (p2.atutr3) {
2718
+ behind = true;
2719
+ prod.mswhat = "coding region to 3' UTR";
2720
+ }
2721
+ }
2722
+ if (behind) {
2723
+ tmplst.push(prod);
2724
+ single = false;
2725
+ break;
2726
+ }
2727
+ }
2728
+ var dst = prod.posA - prod2.posB;
2729
+ if (prod.ortA == "+" && dst > 0 && dst < genomelimit && prod.ortA == "-" && dst < 0 && -dst < genomelimit) {
2730
+ prod.mswhat = Math.abs(dst) + " bp apart on genome";
2731
+ tmplst.push(prod);
2732
+ single = false;
2733
+ break;
2734
+ }
2735
+ }
2736
+ }
2737
+ }
2738
+ if (single) {
2739
+ newholder.push([prod]);
2740
+ }
2741
+ function testreadcount(p12, p22) {
2742
+ if (!p12.usepair || !p12.usepair.inframe) return false;
2743
+ if (!p22.usepair || !p22.usepair.inframe) return false;
2744
+ if (p12.readsB == 0 || p22.readsA == 0) return false;
2745
+ var fold = p12.readsB / p22.readsA;
2746
+ return fold >= 0.2 && fold <= 5;
2747
+ }
2748
+ }
2749
+ function svtable(arg) {
2750
+ const table = arg.holder.append("table").style("border-spacing", "10px").style("border-collapse", "separate");
2751
+ const htr = table.append("tr").style("font-size", "70%").style("color", "#858585");
2752
+ const fields = [
2753
+ { label: "Feature", hide: true, get: (a) => a.feature },
2754
+ { label: "Ratio", hide: true, get: (a) => Math.ceil(a.ratio * 100) + "%" },
2755
+ { label: "Chimeric<br>reads", hide: true, get: (a) => a.chimericreads },
2756
+ { label: "Contig<br>length", hide: true, get: (a) => a.contiglen },
2757
+ { label: "Repeat<br>score", hide: true, get: (a) => a.repeatscore },
2758
+ { label: "Cicero<br>score", hide: true, atpair: true, get: (a) => a.score },
2759
+ { label: "Cicero<br>rating", israting: true, hide: true, atpair: true, get: (a) => a.rating }
2760
+ ];
2761
+ for (const sample of arg.samplelst) {
2762
+ for (const p of sample.pairlst) {
2763
+ if (p.a.feature || p.b.feature) fields[0].hide = false;
2764
+ if (typeof p.a.ratio == "number" || typeof (p.b.ratio == "number")) fields[1].hide = false;
2765
+ if (typeof p.a.chimericreads == "number" || typeof p.b.chimericreads == "number") fields[2].hide = false;
2766
+ if (typeof p.a.contiglen == "number" || typeof p.b.contiglen == "number") fields[3].hide = false;
2767
+ if (typeof p.a.repeatscore == "number" || typeof p.b.repeatscore == "number") fields[4].hide = false;
2768
+ if (typeof p.score == "number") fields[5].hide = false;
2769
+ if (p.rating) fields[6].hide = false;
2770
+ }
2771
+ }
2772
+ if (!arg.nosample) {
2773
+ htr.append("td");
2774
+ }
2775
+ htr.append("td");
2776
+ htr.append("td");
2777
+ htr.append("td").html("Genomic<br>position");
2778
+ htr.append("td").html("Genomic<br>dist.");
2779
+ for (const f of fields) {
2780
+ if (f.hide) return;
2781
+ htr.append("td").html(f.label);
2782
+ }
2783
+ for (const sample of arg.samplelst) {
2784
+ let tr = table.append("tr");
2785
+ if (!arg.nosample) {
2786
+ const td = tr.append("td").text(sample.sample);
2787
+ if (sample.pairlst.length > 1) {
2788
+ td.attr("rowspan", sample.pairlst.length);
2789
+ }
2790
+ }
2791
+ for (let i = 0; i < sample.pairlst.length; i++) {
2792
+ if (i > 0) {
2793
+ tr = table.append("tr");
2794
+ }
2795
+ const pair = sample.pairlst[i];
2796
+ tr.append("td").style("text-align", "right").html(
2797
+ '<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>"
2798
+ );
2799
+ const td = tr.append("td");
2800
+ if (pair.originalprod && pair.originalprod.hook.lessFrame) {
2801
+ pair.originalprod.hook.lessFrame = td;
2802
+ }
2803
+ if (pair.inframe) {
2804
+ td.html(
2805
+ '<span style="background-color:' + colorinframe + ';color:white;padding:2px 3px;font-size:80%;white-space:nowrap">In frame</span>'
2806
+ );
2807
+ } else {
2808
+ if (pair.a.gm || pair.b.gm) {
2809
+ td.html(
2810
+ '<span style="background-color:#858585;color:white;padding:2px 3px;font-size:80%;white-space:nowrap">Out of frame</span>'
2811
+ );
2812
+ } else {
2813
+ td.html(
2814
+ '<span style="border:solid 1px #858585;color:#858585;padding:1px 2px;font-size:80%;white-space:nowrap">no gene ?</span>'
2815
+ );
2816
+ }
2817
+ }
2818
+ tr.append("td").html(
2819
+ '<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>"
2820
+ );
2821
+ tr.append("td").html(
2822
+ pair.a.chr == pair.b.chr ? bplen(Math.abs(pair.a.position - pair.b.position)) : '<span style="color:' + colorctx + '">CTX</span>'
2823
+ );
2824
+ for (const f of fields) {
2825
+ if (f.hide) continue;
2826
+ const td2 = tr.append("td");
2827
+ if (f.israting && pair.originalprod && pair.originalprod.hook.lessRating) {
2828
+ pair.originalprod.hook.lessRating = td2;
2829
+ }
2830
+ if (f.atpair) {
2831
+ td2.text(f.get(pair));
2832
+ } else {
2833
+ td2.html(
2834
+ '<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>"
2835
+ );
2836
+ }
2837
+ }
2838
+ }
2839
+ }
2840
+ }
2841
+ function loadexpression(svmr, file) {
2842
+ const genes = {};
2843
+ const ep = svmr.expression;
2844
+ ep.genes = genes;
2845
+ const reader = new FileReader();
2846
+ const chunksize = 4096;
2847
+ let chunks = [];
2848
+ let offset = 0;
2849
+ reader.onloadend = (e) => {
2850
+ if (e.target.readyState != FileReader.DONE) return;
2851
+ const chunk = e.target.result;
2852
+ chunks.push(chunk);
2853
+ const isend = offset >= file.size;
2854
+ process(isend);
2855
+ if (isend) {
2856
+ done();
2857
+ } else {
2858
+ offset += chunksize;
2859
+ ep.presays.text("Reading file: " + Math.ceil(offset / file.size * 100) + "%");
2860
+ reader.readAsText(file.slice(offset, offset + chunksize));
2861
+ }
2862
+ };
2863
+ reader.readAsText(file.slice(0, chunksize));
2864
+ const hg = {}, hs = {};
2865
+ let good = 0, bad = 0;
2866
+ function process(isend) {
2867
+ const lines = chunks.join("").split("\n");
2868
+ for (let i = 0; i < lines.length - 1 - (isend ? 0 : 1); i++) {
2869
+ const l = lines[i].split(" ");
2870
+ if (l.length == 3) {
2871
+ const v = Number.parseFloat(l[1]);
2872
+ if (Number.isNaN(v)) {
2873
+ bad++;
2874
+ } else {
2875
+ good++;
2876
+ hg[l[0]] = 1;
2877
+ hs[l[2]] = 1;
2878
+ if (!(l[0] in genes)) {
2879
+ genes[l[0]] = [];
2880
+ }
2881
+ genes[l[0]].push({
2882
+ sample: l[2],
2883
+ value: v
2884
+ });
2885
+ }
2886
+ } else {
2887
+ bad++;
2888
+ }
2889
+ }
2890
+ if (!isend) {
2891
+ chunks = [lines[lines.length - 1]];
2892
+ }
2893
+ }
2894
+ function done() {
2895
+ let genec = 0;
2896
+ for (const n in hg) genec++;
2897
+ let samplec = 0;
2898
+ for (const n in hs) samplec++;
2899
+ disappear(ep.prediv);
2900
+ appear(ep.afterdiv);
2901
+ ep.afterdiv.selectAll("*").remove();
2902
+ ep.afterdiv.append("div").text(
2903
+ "Expression data loaded for " + genec + " genes, " + samplec + " samples, " + good + " data points" + (bad > 0 ? ", " + bad + " bad lines" : "")
2904
+ );
2905
+ ep.afterdiv.append("button").text("Delete").style("margin", "20px").on("click", () => {
2906
+ delete ep.genes;
2907
+ ep.prediv.node().removeChild(ep.input.node());
2908
+ ep.input = ep.prediv.append("input").attr("type", "file").on("change", (event) => {
2909
+ loadexpression(svmr, event.target.files[0]);
2910
+ });
2911
+ ep.presays.text("");
2912
+ disappear(ep.afterdiv);
2913
+ appear(ep.prediv);
2914
+ });
2915
+ }
2916
+ }
2917
+ function showgenevalues(arg) {
2918
+ const hlcolor = "red";
2919
+ arg.data.sort((a, b) => {
2920
+ return b.value - a.value;
2921
+ });
2922
+ let width = arg.width ? arg.width : 400, height = arg.height ? arg.height : 400;
2923
+ let maxv = 0;
2924
+ for (const v of arg.data) {
2925
+ maxv = Math.max(maxv, v.value);
2926
+ }
2927
+ let dotr;
2928
+ const xscale = linear().domain([0, maxv]);
2929
+ const svg = arg.holder.append("svg");
2930
+ const axisg = svg.append("g");
2931
+ const dotg = svg.append("g");
2932
+ const dotset = dotg.selectAll().data(arg.data).enter().append("g");
2933
+ 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) => {
2934
+ event.target.setAttribute("transform", "scale(1.5)");
2935
+ drag.text((d.sample ? d.sample : d.patient + " " + d.sampletype) + " " + d.value).attr("fill", d.ishighlight ? hlcolor : "black");
2936
+ }).on("mouseout", (event, d) => {
2937
+ event.target.setAttribute("transform", "scale(1)");
2938
+ drag.text("drag to resize").attr("fill", "black");
2939
+ });
2940
+ 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) => {
2941
+ event.preventDefault();
2942
+ const x0 = event.clientX, y0 = event.clientY, width0 = width, height0 = height;
2943
+ const b = select_default(document.body);
2944
+ b.on("mousemove", () => {
2945
+ width = width0 + event.clientX - x0;
2946
+ height = height0 + event.clientY - y0;
2947
+ sizing();
2948
+ }).on("mouseup", () => {
2949
+ b.on("mousemove", null).on("mouseup", null);
2950
+ });
2951
+ });
2952
+ function sizing() {
2953
+ dotr = Math.max(5, Math.min(width, height) / 40);
2954
+ const fontsize = Math.min(18, Math.max(12, dotr * 2)), ticksize = 5, axish = fontsize + ticksize + 5, axispad = dotr + 5, width2 = dotr * 3;
2955
+ xscale.range([0, width]);
2956
+ svg.attr("width", dotr * 2 + width + width2).attr("height", axish + axispad + height + dotr * 2);
2957
+ axisstyle({
2958
+ axis: axisg.attr("transform", "translate(" + dotr * 2 + "," + axish + ")").call(
2959
+ axisTop().scale(xscale).ticks(Math.min(10, Math.ceil(width / 50)))
2960
+ ),
2961
+ fontsize,
2962
+ color: "black",
2963
+ showline: true
2964
+ });
2965
+ dotg.attr("transform", "translate(" + dotr * 2 + "," + (axish + axispad) + ")");
2966
+ dotset.attr("transform", (d, i) => {
2967
+ return "translate(" + xscale(d.value) + "," + height * i / arg.data.length + ")";
2968
+ });
2969
+ dotcir.attr("r", (d) => {
2970
+ return dotr * (d.ishighlight ? 1.5 : 1);
2971
+ });
2972
+ drag.attr("font-size", fontsize).attr("x", dotr * 2 + width + width2 - 5).attr("y", axish + axispad + height + dotr * 2 - 5);
2973
+ }
2974
+ sizing();
2975
+ return this;
2976
+ }
2977
+
2978
+ // src/svmr.js
2979
+ function svmrparseinput(arg, sayerror2, genome, holder, hostURL, jwt) {
2980
+ if (!arg.dataname) {
2981
+ arg.dataname = "Unnamed dataset";
2982
+ }
2983
+ if (arg.input) {
2984
+ const [e, header, items] = svmrparseraw(arg.input, genome);
2985
+ if (e) {
2986
+ sayerror2("Fusion Editor input error: " + e);
2987
+ return;
2988
+ }
2989
+ svmrlaunch(genome, header, items, arg.dataname, holder, hostURL, jwt);
2990
+ return;
2991
+ }
2992
+ if (!arg.urls) {
2993
+ sayerror2('neither .input:"" or .urls:[] is provided for Fusion Editor');
2994
+ return;
2995
+ }
2996
+ if (!Array.isArray(arg.urls)) {
2997
+ sayerror2("fusioneditor.urls[] should be an array of URL strings");
2998
+ return;
2999
+ }
3000
+ if (arg.urls.length == 0) {
3001
+ sayerror2("fusioneditor.urls[] is empty");
3002
+ return;
3003
+ }
3004
+ const wait = holder.append("div").style("margin", "20px").style("color", "#aaa").style("font-size", "1.5em").text("Loading fusion gene data ...");
3005
+ const tasks = [];
3006
+ arg.urls.forEach((url) => {
3007
+ tasks.push(
3008
+ fetch(
3009
+ new Request(hostURL + "/urltextfile", {
3010
+ method: "POST",
3011
+ headers: { "content-type": "application/json" },
3012
+ body: JSON.stringify({ url, jwt })
3013
+ })
3014
+ ).then((data) => {
3015
+ return data.json();
3016
+ }).then((data) => {
3017
+ if (data.error) throw { message: "Error with " + url + ": " + data.error };
3018
+ return { data: data.text, url };
3019
+ })
3020
+ );
3021
+ });
3022
+ Promise.all(tasks).then((data) => {
3023
+ wait.remove();
3024
+ if (data.length == 0) {
3025
+ sayerror2("No data retrieved from fusioneditor.urls");
3026
+ return;
3027
+ }
3028
+ const [e, header, items] = svmrparseraw(data[0].data, genome);
3029
+ if (e) {
3030
+ sayerror2("Error parsing fusion gene data in file " + data[0].url);
3031
+ return;
3032
+ }
3033
+ for (let i = 1; i < data.length; i++) {
3034
+ const [e2, header2, items2] = svmrparseraw(data[i].data, genome);
3035
+ if (e2) {
3036
+ sayerror2("Error parsing fusion gene data in file " + data[i].url);
3037
+ return;
3038
+ }
3039
+ for (const j of items2) {
3040
+ items.push(j);
3041
+ }
3042
+ for (const h of header2) {
3043
+ let notfound = true;
3044
+ for (const h2 of header) {
3045
+ if (h2.key == h.key) {
3046
+ notfound = false;
3047
+ break;
3048
+ }
3049
+ }
3050
+ if (notfound) {
3051
+ header.push(h);
3052
+ }
3053
+ }
3054
+ }
3055
+ if (items.length == 0) {
3056
+ sayerror2("No fusion genes parsed from fusioneditor");
3057
+ return;
3058
+ }
3059
+ svmrlaunch(genome, header, items, arg.dataname, holder, hostURL, jwt);
3060
+ }).catch((err) => {
3061
+ wait.remove();
3062
+ sayerror2(err.message);
3063
+ if (err.stack) console.log(err.stack);
3064
+ });
3065
+ }
3066
+ function svmrui(dlst, genomes, hostURL, jwt) {
3067
+ const [pane, inputdiv, gselect, filediv, saydiv, visualdiv] = dlst;
3068
+ inputdiv.append("div").style("margin-top", "20px").html(
3069
+ "<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>"
3070
+ );
3071
+ inputdiv.append("p").html("<a href=https://proteinpaint.stjude.org/ppdemo/hg19/fusion/cicero.output target=_blank>Example file</a>");
3072
+ function cmt(t, red) {
3073
+ saydiv.style("color", red ? "red" : "black").text(t);
3074
+ }
3075
+ const fileui = () => {
3076
+ filediv.selectAll("*").remove();
3077
+ const input = filediv.append("input").attr("type", "file").on("change", (event) => {
3078
+ const file = event.target.files[0];
3079
+ if (!file) {
3080
+ fileui();
3081
+ return;
3082
+ }
3083
+ if (!file.size) {
3084
+ cmt("Invalid file " + file.name);
3085
+ fileui();
3086
+ return;
3087
+ }
3088
+ const reader = new FileReader();
3089
+ reader.onload = (event2) => {
3090
+ const usegenome = gselect.options[gselect.selectedIndex].innerHTML;
3091
+ const genomeobj = genomes[usegenome];
3092
+ const [err, header, items] = svmrparseraw(event2.target.result, genomeobj);
3093
+ if (err) {
3094
+ cmt(err, 1);
3095
+ fileui();
3096
+ return;
3097
+ }
3098
+ svmrlaunch(genomeobj, header, items, file.name, visualdiv, hostURL, jwt);
3099
+ filediv.remove();
3100
+ inputdiv.remove();
3101
+ };
3102
+ reader.onerror = function() {
3103
+ cmt("Error reading file " + file.name, 1);
3104
+ fileui();
3105
+ return;
3106
+ };
3107
+ reader.readAsText(file, "utf8");
3108
+ });
3109
+ setTimeout(() => input.node().focus(), 1100);
3110
+ };
3111
+ fileui();
3112
+ }
3113
+ function svmrlaunch(genome, header, items, filename, holder, hostURL, jwt) {
3114
+ new svmr_c_default(genome, header, items, filename, holder, hostURL, jwt);
3115
+ }
3116
+ function svmrparseraw(raw, genome) {
3117
+ const lines = raw.trim().split("\n");
3118
+ const [err, header] = parseheader(lines[0]);
3119
+ if (err) {
3120
+ return ["File header error: " + err];
3121
+ }
3122
+ const skipword = lines[0].split(" ")[0];
3123
+ const items = [];
3124
+ const badlines = [];
3125
+ for (let i = 1; i < lines.length; i++) {
3126
+ const line = lines[i];
3127
+ if (line == "") continue;
3128
+ if (line[0] == "#") continue;
3129
+ const lst = line.trim().split(" ");
3130
+ if (lst[0] == skipword) continue;
3131
+ const m = {
3132
+ notes: []
3133
+ // collect notes
3134
+ };
3135
+ for (let j = 0; j < header.length; j++) {
3136
+ if (lst[j] !== void 0 && lst[j].includes('"'))
3137
+ return ['Input file has invalid character " e.g. "NM_001007565"'];
3138
+ m[header[j].key] = lst[j];
3139
+ }
3140
+ if (!m.rating || m.rating.toUpperCase() == "NA") {
3141
+ m.rating = "NA";
3142
+ } else if (m.rating.toLowerCase() == "major") {
3143
+ m.rating = "HQ";
3144
+ }
3145
+ if (!ratingGrades.some((g) => g.rating == m.rating)) {
3146
+ badlines.push([i, "invalid rating: " + m.rating, lst]);
3147
+ continue;
3148
+ }
3149
+ if (!m.chrA) {
3150
+ badlines.push([i, "missing chrA", lst]);
3151
+ continue;
3152
+ }
3153
+ if (!genome.chrlookup[m.chrA.toUpperCase()]) {
3154
+ badlines.push([i, "invalid chrA: " + m.chrA, lst]);
3155
+ continue;
3156
+ }
3157
+ if (!m.chrB) {
3158
+ badlines.push([i, "missing chrB", lst]);
3159
+ continue;
3160
+ }
3161
+ if (!genome.chrlookup[m.chrB.toUpperCase()]) {
3162
+ badlines.push([i, "invalid chrB: " + m.chrB, lst]);
3163
+ continue;
3164
+ }
3165
+ let s = m.posA;
3166
+ if (!s) {
3167
+ badlines.push([i, "missing posA", lst]);
3168
+ continue;
3169
+ }
3170
+ let v = Number.parseInt(s);
3171
+ if (Number.isNaN(v)) {
3172
+ badlines.push([i, "invalid posA: " + s, lst]);
3173
+ continue;
3174
+ }
3175
+ if (v < 0 || v >= genome.chrlookup[m.chrA.toUpperCase()].len) {
3176
+ badlines.push([i, "invalid posA: " + s, lst]);
3177
+ continue;
3178
+ }
3179
+ m.posA = v;
3180
+ s = m.posB;
3181
+ if (!s) {
3182
+ badlines.push([i, "missing posB", lst]);
3183
+ continue;
3184
+ }
3185
+ v = Number.parseInt(s);
3186
+ if (isNaN(v)) {
3187
+ badlines.push([i, "invalid posB: " + s, lst]);
3188
+ continue;
3189
+ }
3190
+ if (v < 0 || v >= genome.chrlookup[m.chrB.toUpperCase()].len) {
3191
+ badlines.push([i, "invalid posB: " + s, lst]);
3192
+ continue;
3193
+ }
3194
+ m.posB = v;
3195
+ if (!m.ratioA) {
3196
+ badlines.push([i, "missing ratioA", lst]);
3197
+ continue;
3198
+ }
3199
+ v = Number.parseFloat(m.ratioA);
3200
+ if (Number.isNaN(v)) {
3201
+ badlines.push([i, "invalid value for ratioA", lst]);
3202
+ continue;
3203
+ }
3204
+ if (v > 1) {
3205
+ badlines.push([i, "ratioA > 100%", lst]);
3206
+ v = 1;
3207
+ }
3208
+ m.ratioA = v;
3209
+ if (!m.ratioB) {
3210
+ badlines.push([i, "missing ratioB", lst]);
3211
+ continue;
3212
+ }
3213
+ v = Number.parseFloat(m.ratioB);
3214
+ if (Number.isNaN(v)) {
3215
+ badlines.push([i, "invalid value for ratioB", lst]);
3216
+ continue;
3217
+ }
3218
+ if (v > 1) {
3219
+ badlines.push([i, "ratioB > 100%", lst]);
3220
+ v = 1;
3221
+ }
3222
+ m.ratioB = v;
3223
+ if (!m.score) {
3224
+ badlines.push([i, "missing score", lst]);
3225
+ continue;
3226
+ }
3227
+ v = Number.parseFloat(m.score);
3228
+ if (Number.isNaN(v)) {
3229
+ badlines.push([i, "invalid value for score", lst]);
3230
+ continue;
3231
+ }
3232
+ m.score = v;
3233
+ if (!m.readsA) {
3234
+ badlines.push([i, "readsA missing", lst]);
3235
+ continue;
3236
+ }
3237
+ v = Number.parseInt(m.readsA);
3238
+ if (Number.isNaN(v)) {
3239
+ badlines.push([i, "invalid value for readsA", lst]);
3240
+ continue;
3241
+ }
3242
+ m.readsA = v;
3243
+ if (!m.readsB) {
3244
+ badlines.push([i, "readsB missing", lst]);
3245
+ continue;
3246
+ }
3247
+ v = Number.parseInt(m.readsB);
3248
+ if (Number.isNaN(v)) {
3249
+ badlines.push([i, "invalid value for readsB", lst]);
3250
+ continue;
3251
+ }
3252
+ m.readsB = v;
3253
+ if (!m.matchA) {
3254
+ badlines.push([i, "matchA missing", lst]);
3255
+ continue;
3256
+ }
3257
+ v = Number.parseInt(m.matchA);
3258
+ if (Number.isNaN(v)) {
3259
+ badlines.push([i, "invalid value for matchA", lst]);
3260
+ continue;
3261
+ }
3262
+ m.matchA = v;
3263
+ if (!m.matchB) {
3264
+ badlines.push([i, "matchB missing", lst]);
3265
+ continue;
3266
+ }
3267
+ v = Number.parseInt(m.matchB);
3268
+ if (Number.isNaN(v)) {
3269
+ badlines.push([i, "invalid value for matchB", lst]);
3270
+ continue;
3271
+ }
3272
+ m.matchB = v;
3273
+ if (!m.repeatA) {
3274
+ badlines.push([i, "repeatA missing", lst]);
3275
+ continue;
3276
+ }
3277
+ v = Number.parseFloat(m.repeatA);
3278
+ if (Number.isNaN(v)) {
3279
+ badlines.push([i, "invalid value for repeatA", lst]);
3280
+ continue;
3281
+ }
3282
+ m.repeatA = v;
3283
+ if (!m.repeatB) {
3284
+ badlines.push([i, "repeatB missing", lst]);
3285
+ continue;
3286
+ }
3287
+ v = Number.parseFloat(m.repeatB);
3288
+ if (Number.isNaN(v)) {
3289
+ badlines.push([i, "invalid value for repeatB", lst]);
3290
+ continue;
3291
+ }
3292
+ m.repeatB = v;
3293
+ if (m.type2) {
3294
+ const t = findType2(m.type2);
3295
+ if (!t) {
3296
+ badlines.push([i, "unknown functional effect: " + m.type2, lst]);
3297
+ continue;
3298
+ }
3299
+ if (t.flag) m[t.flag] = true;
3300
+ }
3301
+ if (m.geneA == "" || m.geneA == "NA") {
3302
+ m.geneA = null;
3303
+ }
3304
+ if (m.geneB == "" || m.geneB == "NA") {
3305
+ m.geneB = null;
3306
+ }
3307
+ if (m.featureA == "intergenic") m.geneA = null;
3308
+ if (m.featureB == "intergenic") m.geneB = null;
3309
+ 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(",") : [];
3310
+ let exona = null, exonb = null, anchora = null, anchorb = null, contigaaA = null, contigaaB = null, contigbpA = null, contigbpB = null;
3311
+ if (m.lstisoformaexon) exona = m.lstisoformaexon.split(",");
3312
+ if (m.lstisoformbexon) exonb = m.lstisoformbexon.split(",");
3313
+ if (m.lstisoformaanchor) anchora = m.lstisoformaanchor.split(",");
3314
+ if (m.lstisoformbanchor) anchorb = m.lstisoformbanchor.split(",");
3315
+ if (m.lstcontigaaA) contigaaA = m.lstcontigaaA.split(",");
3316
+ if (m.lstcontigaaB) contigaaB = m.lstcontigaaB.split(",");
3317
+ if (m.lstcontigbpA) contigbpA = m.lstcontigbpA.split(",");
3318
+ if (m.lstcontigbpB) contigbpB = m.lstcontigbpB.split(",");
3319
+ const paircount = Math.max(isoforma.length, isoformb.length, codona.length, codonb.length, frame.length);
3320
+ m.pairs = [];
3321
+ for (let j = 0; j < paircount; j++) {
3322
+ const pair = {
3323
+ a: {
3324
+ isoform: isoforma[j] && isoforma[j].length > 0 ? isoforma[j] : null,
3325
+ exon: exona ? Number.parseInt(exona[j]) : NaN,
3326
+ codon: codona[j] ? Number.parseInt(codona[j]) : NaN,
3327
+ anchor: anchora ? anchora[j] : void 0
3328
+ },
3329
+ b: {
3330
+ isoform: isoformb[j] && isoformb[j].length > 0 ? isoformb[j] : null,
3331
+ exon: exonb ? Number.parseInt(exonb[j]) : NaN,
3332
+ codon: codonb[j] ? Number.parseInt(codonb[j]) : NaN,
3333
+ anchor: anchorb ? anchorb[j] : void 0
3334
+ },
3335
+ frame: frame[j],
3336
+ inframe: frame[j] == "1" || frame[j] == "2"
3337
+ };
3338
+ if (m.isuptss) {
3339
+ pair.inframe = true;
3340
+ }
3341
+ let aaa = NaN, aab = NaN, bpa = NaN, bpb = NaN;
3342
+ if (contigaaA && contigaaA[j]) aaa = Number.parseInt(contigaaA[j]);
3343
+ if (contigaaB && contigaaB[j]) aab = Number.parseInt(contigaaB[j]);
3344
+ if (contigbpA && contigbpA[j]) bpa = Number.parseInt(contigbpA[j]);
3345
+ if (contigbpB && contigbpB[j]) bpb = Number.parseInt(contigbpB[j]);
3346
+ if (!Number.isNaN(aaa) && !Number.isNaN(aab)) {
3347
+ pair.a.contigaa = aaa;
3348
+ pair.b.contigaa = aab;
3349
+ }
3350
+ if (!Number.isNaN(bpa) && !Number.isNaN(bpb)) {
3351
+ pair.a.contigbp = bpa;
3352
+ pair.b.contigbp = bpb;
3353
+ }
3354
+ m.pairs.push(pair);
3355
+ }
3356
+ if (m.exception) {
3357
+ m.notes.push(m.exception);
3358
+ }
3359
+ if (m.hlgene) {
3360
+ const v2 = Number.parseInt(m.hlgene);
3361
+ if (Number.isNaN(v2) || v2 != 0 && v2 != 1 && v2 != 2 && v2 != 3 && v2 != 4) {
3362
+ badlines.push([i, "invalid value for highlight gene flag: " + m.hlgene, lst]);
3363
+ delete m.hlgene;
3364
+ } else {
3365
+ m.hlgene = v2;
3366
+ }
3367
+ }
3368
+ items.push(m);
3369
+ }
3370
+ if (badlines.length > 0) {
3371
+ const hlst = header.map((i) => i.key);
3372
+ bulk_badline(hlst, badlines);
3373
+ }
3374
+ if (items.length == 0) {
3375
+ return ["No data loaded"];
3376
+ }
3377
+ return [null, header, items];
3378
+ }
3379
+ function parseheader(line) {
3380
+ const original = line.trim().split(" ");
3381
+ if (original.length <= 1) return ["invalid file header"];
3382
+ const header = [];
3383
+ const lower = [];
3384
+ for (const i2 of original) {
3385
+ lower.push(i2.toLowerCase());
3386
+ header.push({
3387
+ label: i2,
3388
+ key: i2.toLowerCase(),
3389
+ custom: true
3390
+ });
3391
+ }
3392
+ const htry = (...arg) => {
3393
+ for (const s of arg) {
3394
+ const i2 = lower.indexOf(s);
3395
+ if (i2 != -1) return i2;
3396
+ }
3397
+ return -1;
3398
+ };
3399
+ let i = htry("genea");
3400
+ if (i == -1) return ["geneA missing"];
3401
+ header[i].key = "geneA";
3402
+ delete header[i].custom;
3403
+ i = htry("chra");
3404
+ if (i == -1) return ["chrA missing"];
3405
+ header[i].key = "chrA";
3406
+ delete header[i].custom;
3407
+ i = htry("posa");
3408
+ if (i == -1) return ["posA missing"];
3409
+ header[i].key = "posA";
3410
+ delete header[i].custom;
3411
+ i = htry("orta");
3412
+ if (i == -1) return ["ortA missing"];
3413
+ header[i].key = "ortA";
3414
+ delete header[i].custom;
3415
+ i = htry("featurea");
3416
+ if (i == -1) return ["featureA missing"];
3417
+ header[i].key = "featureA";
3418
+ delete header[i].custom;
3419
+ i = htry("ratioa");
3420
+ if (i == -1) return ["ratioA missing"];
3421
+ header[i].key = "ratioA";
3422
+ delete header[i].custom;
3423
+ i = htry("readsa");
3424
+ if (i == -1) return ["readsA missing"];
3425
+ header[i].key = "readsA";
3426
+ delete header[i].custom;
3427
+ i = htry("sv_refseqa_aa_index");
3428
+ if (i != -1) {
3429
+ header[i].key = "lstcontigaaA";
3430
+ delete header[i].custom;
3431
+ }
3432
+ i = htry("sv_refseqa_contig_index");
3433
+ if (i != -1) {
3434
+ header[i].key = "lstcontigbpA";
3435
+ delete header[i].custom;
3436
+ }
3437
+ i = htry("total_readsa");
3438
+ if (i != -1) {
3439
+ header[i].key = "totalreadsA";
3440
+ delete header[i].custom;
3441
+ }
3442
+ i = htry("geneb");
3443
+ if (i == -1) return ["geneB missing"];
3444
+ header[i].key = "geneB";
3445
+ delete header[i].custom;
3446
+ i = htry("chrb");
3447
+ if (i == -1) return ["chrB missing"];
3448
+ header[i].key = "chrB";
3449
+ delete header[i].custom;
3450
+ i = htry("posb");
3451
+ if (i == -1) return ["posB missing"];
3452
+ header[i].key = "posB";
3453
+ delete header[i].custom;
3454
+ i = htry("ortb");
3455
+ if (i == -1) return ["ortB missing"];
3456
+ header[i].key = "ortB";
3457
+ delete header[i].custom;
3458
+ i = htry("featureb");
3459
+ if (i == -1) return ["featureB missing"];
3460
+ header[i].key = "featureB";
3461
+ delete header[i].custom;
3462
+ i = htry("ratiob");
3463
+ if (i == -1) return ["ratioB missing"];
3464
+ header[i].key = "ratioB";
3465
+ delete header[i].custom;
3466
+ i = htry("readsb");
3467
+ if (i == -1) return ["readsB missing"];
3468
+ header[i].key = "readsB";
3469
+ delete header[i].custom;
3470
+ i = htry("sv_refseqb_aa_index");
3471
+ if (i != -1) {
3472
+ header[i].key = "lstcontigaaB";
3473
+ delete header[i].custom;
3474
+ }
3475
+ i = htry("sv_refseqb_contig_index");
3476
+ if (i != -1) {
3477
+ header[i].key = "lstcontigbpB";
3478
+ delete header[i].custom;
3479
+ }
3480
+ i = htry("total_readsb");
3481
+ if (i != -1) {
3482
+ header[i].key = "totalreadsB";
3483
+ delete header[i].custom;
3484
+ }
3485
+ i = htry("sv_inframe", "frame");
3486
+ if (i == -1) return ["sv_inframe missing"];
3487
+ header[i].key = "lstframe";
3488
+ delete header[i].custom;
3489
+ i = htry("sv_refseqa");
3490
+ if (i == -1) return ["sv_refseqA missing"];
3491
+ header[i].key = "lstisoforma";
3492
+ delete header[i].custom;
3493
+ i = htry("sv_refseqa_codon");
3494
+ if (i != -1) {
3495
+ header[i].key = "lstisoformacodon";
3496
+ }
3497
+ i = htry("sv_refseqb_codon");
3498
+ if (i != -1) {
3499
+ header[i].key = "lstisoformbcodon";
3500
+ }
3501
+ i = htry("score");
3502
+ if (i == -1) return ["score missing"];
3503
+ header[i].key = "score";
3504
+ delete header[i].custom;
3505
+ i = htry("sv_refseqb");
3506
+ if (i == -1) return ["sv_refseqB missing"];
3507
+ header[i].key = "lstisoformb";
3508
+ delete header[i].custom;
3509
+ i = htry("rating");
3510
+ if (i == -1) return ["rating missing"];
3511
+ header[i].key = "rating";
3512
+ delete header[i].custom;
3513
+ i = htry("matcha");
3514
+ if (i == -1) return ["matchA missing"];
3515
+ header[i].key = "matchA";
3516
+ delete header[i].custom;
3517
+ i = htry("matchb");
3518
+ if (i == -1) return ["matchB missing"];
3519
+ header[i].key = "matchB";
3520
+ delete header[i].custom;
3521
+ i = htry("repeata");
3522
+ if (i == -1) return ["repeatA missing"];
3523
+ header[i].key = "repeatA";
3524
+ delete header[i].custom;
3525
+ i = htry("repeatb");
3526
+ if (i == -1) return ["repeatB missing"];
3527
+ header[i].key = "repeatB";
3528
+ delete header[i].custom;
3529
+ i = htry("functional effect");
3530
+ if (i == -1) return ["functional effect missing"];
3531
+ header[i].key = "type2";
3532
+ delete header[i].custom;
3533
+ i = htry("sample");
3534
+ if (i != -1) {
3535
+ header[i].key = "sample";
3536
+ delete header[i].custom;
3537
+ }
3538
+ i = htry("sv_processing_exception");
3539
+ if (i != -1) {
3540
+ header[i].key = "exception";
3541
+ }
3542
+ i = htry("medal");
3543
+ if (i != -1) {
3544
+ header[i].key = "hlgene";
3545
+ }
3546
+ i = htry("sv_refseqa_exon");
3547
+ if (i != -1) {
3548
+ header[i].key = "lstisoformaexon";
3549
+ delete header[i].custom;
3550
+ }
3551
+ i = htry("sv_refseqb_exon");
3552
+ if (i != -1) {
3553
+ header[i].key = "lstisoformbexon";
3554
+ delete header[i].custom;
3555
+ }
3556
+ i = htry("sv_refseqa_anchor_type");
3557
+ if (i != -1) {
3558
+ header[i].key = "lstisoformaanchor";
3559
+ delete header[i].custom;
3560
+ }
3561
+ i = htry("sv_refseqb_anchor_type");
3562
+ if (i != -1) {
3563
+ header[i].key = "lstisoformbanchor";
3564
+ delete header[i].custom;
3565
+ }
3566
+ return [null, header];
3567
+ }
3568
+ export {
3569
+ svmrlaunch,
3570
+ svmrparseinput,
3571
+ svmrparseraw,
3572
+ svmrui
3573
+ };
3574
+ //# sourceMappingURL=svmr-HKFHKGLI.js.map