@sjcrh/proteinpaint-client 2.226.0 → 2.227.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (949) hide show
  1. package/dist/2dmaf-75YAQQ3P.js +1362 -0
  2. package/dist/AggMatrixInput-KYDS23KP.js +402 -0
  3. package/dist/AggregateMatrix-XGGF6KBX.js +37 -0
  4. package/dist/AppHeader-CNY5RTJN.js +826 -0
  5. package/dist/BoxPlot-OQIJJO66.js +1247 -0
  6. package/dist/CorrelationVolcano-QN5D37V7.js +613 -0
  7. package/dist/CorrelationVolcano-QN5D37V7.js.map +7 -0
  8. package/dist/Cuminc-J6DONJTA.js +1217 -0
  9. package/dist/DE-XUBJUUBB.js +85 -0
  10. package/dist/DEinput-DCOPTSWO.js +483 -0
  11. package/dist/DEinput-DCOPTSWO.js.map +7 -0
  12. package/dist/DM-2UUXUJOC.js +86 -0
  13. package/dist/DifferentialAnalysis-U6ZPFHNM.js +236 -0
  14. package/dist/Disco-RR2NN66T.js +3445 -0
  15. package/dist/Disco.UI-MQ7WZQOP.js +239 -0
  16. package/dist/DmrPlot-MKAKFUJR.js +366 -0
  17. package/dist/GB-2X3ZRFXN.js +1388 -0
  18. package/dist/GB-2X3ZRFXN.js.map +7 -0
  19. package/dist/GSEA-DTIA4MNS.js +870 -0
  20. package/dist/GeneExpInput-4GM5MBBX.js +38 -0
  21. package/dist/Geomap-FF6DBN7M.js +80 -0
  22. package/dist/HicApp-LGXNL36X.js +2240 -0
  23. package/dist/IDCViewer-FQABJNUI.js +10810 -0
  24. package/dist/NumBinaryEditor-7NOHUH76.js +274 -0
  25. package/dist/NumBinaryEditor.unit.spec-SVE5SZYB.js +308 -0
  26. package/dist/NumContEditor-MSWCQUKL.js +100 -0
  27. package/dist/NumContEditor.unit.spec-UFPASWBH.js +160 -0
  28. package/dist/NumCustomBinEditor-DF24SO2N.js +29 -0
  29. package/dist/NumCustomBinEditor.unit.spec-N3S3ROBI.js +393 -0
  30. package/dist/NumDiscreteEditor-HL257XGY.js +165 -0
  31. package/dist/NumDiscreteEditor.unit.spec-6PTPX547.js +229 -0
  32. package/dist/NumRegularBinEditor-EWCKTXWY.js +29 -0
  33. package/dist/NumRegularBinEditor.unit.spec-AMGPMY7U.js +274 -0
  34. package/dist/NumSplineEditor-YDNJ2DW2.js +205 -0
  35. package/dist/NumSplineEditor.unit.spec-L4JZ3OND.js +220 -0
  36. package/dist/NumericDensity-SQW67WKL.js +29 -0
  37. package/dist/NumericDensity.unit.spec-KBK3JZZG.js +414 -0
  38. package/dist/NumericHandler-HG7FK4D4.js +30 -0
  39. package/dist/NumericHandler.unit.spec-N7PYAGGF.js +225 -0
  40. package/dist/ProteomeInput-6XGREJFP.js +610 -0
  41. package/dist/Regression-4DDXNQNO.js +1412 -0
  42. package/dist/RunChart2-ARCUC4Z3.js +744 -0
  43. package/dist/SC-AV6COOPI.js +1290 -0
  44. package/dist/Violin-2P5I6NL5.js +1105 -0
  45. package/dist/Volcano-TZQF3HY6.js +2745 -0
  46. package/dist/Volcano-TZQF3HY6.js.map +7 -0
  47. package/dist/Wsi-KN26SIP3.js +650 -0
  48. package/dist/Wsi-KN26SIP3.js.map +7 -0
  49. package/dist/aboutSunburst-V557OK5L.js +93 -0
  50. package/dist/adSandbox-76PMWKTX.js +29 -0
  51. package/dist/animatedBubbleChart-CFRJJDAC.js +542 -0
  52. package/dist/app-2SUVPURX.js +38 -0
  53. package/dist/app-PR42RXHC.js +28 -0
  54. package/dist/app.js +12 -12
  55. package/dist/bam-AYHWKHXL.js +872 -0
  56. package/dist/barchart-S4CLMJO7.js +38 -0
  57. package/dist/barchart2-R2BGA2WO.js +305 -0
  58. package/dist/block-QKO2PO4A.js +6208 -0
  59. package/dist/block-QKO2PO4A.js.map +7 -0
  60. package/dist/block.init-SSWOFFJR.js +29 -0
  61. package/dist/block.mds.expressionrank-GJBLSUUM.js +350 -0
  62. package/dist/block.mds.geneboxplot-SAAU4OH5.js +819 -0
  63. package/dist/block.mds.junction-IIZPRLPH.js +1534 -0
  64. package/dist/block.mds.svcnv-KOG7O25F.js +6325 -0
  65. package/dist/block.svg-5GJ744H3.js +155 -0
  66. package/dist/block.tk.aicheck-CTIJCHIC.js +274 -0
  67. package/dist/block.tk.bam-RTB7C6CW.js +1906 -0
  68. package/dist/block.tk.bigwig.ui-OJVOCOWS.js +202 -0
  69. package/dist/block.tk.hicstraw-GUE6G2DA.js +814 -0
  70. package/dist/block.tk.junction-XILEKNJY.js +2353 -0
  71. package/dist/block.tk.junction.textmatrixui-OF6BW6OY.js +190 -0
  72. package/dist/block.tk.ld-QZVJUGZU.js +90 -0
  73. package/dist/block.tk.menu-B2NV6ZX3.js +1050 -0
  74. package/dist/block.tk.pgv-46OQHX7S.js +934 -0
  75. package/dist/brainImaging-TWTGRSHJ.js +550 -0
  76. package/dist/brainRegions-YTTLJMBU.js +213 -0
  77. package/dist/bubbleHeatmap-OZVG67KF.js +374 -0
  78. package/dist/bubbleHeatmap-OZVG67KF.js.map +7 -0
  79. package/dist/cellTypeBubbleHeatmap-4QFAAED5.js +274 -0
  80. package/dist/cellTypeBubbleHeatmap-4QFAAED5.js.map +7 -0
  81. package/dist/chunk-255OQYGC.js +267 -0
  82. package/dist/chunk-2B3CYHUF.js +30 -0
  83. package/dist/chunk-2BXMWQTJ.js +1339 -0
  84. package/dist/chunk-2E3AJFOA.js +550 -0
  85. package/dist/chunk-2IAELUCN.js +348 -0
  86. package/dist/chunk-2W6U53AG.js +195 -0
  87. package/dist/chunk-3R6VYZYB.js +96 -0
  88. package/dist/chunk-3YAQY5NZ.js +626 -0
  89. package/dist/chunk-52WVSXYC.js +305 -0
  90. package/dist/chunk-6CQ5ADIY.js +56 -0
  91. package/dist/chunk-6UHSGC6G.js +276 -0
  92. package/dist/chunk-6YRM7Z4F.js +4521 -0
  93. package/dist/chunk-6YRM7Z4F.js.map +7 -0
  94. package/dist/chunk-7E37WMAX.js +141 -0
  95. package/dist/chunk-7EP77LOA.js +194 -0
  96. package/dist/chunk-7LJ4LTD6.js +54 -0
  97. package/dist/chunk-7MEBMH77.js +14 -0
  98. package/dist/chunk-7NVFEGCE.js +30 -0
  99. package/dist/chunk-A52K2E32.js +340 -0
  100. package/dist/chunk-A6DDXPLN.js +961 -0
  101. package/dist/chunk-A6DDXPLN.js.map +7 -0
  102. package/dist/chunk-A7UNLPQQ.js +243 -0
  103. package/dist/chunk-BH4KIOUQ.js +480 -0
  104. package/dist/chunk-CFYWQJ7F.js +472 -0
  105. package/dist/chunk-CFYWQJ7F.js.map +7 -0
  106. package/dist/chunk-CG2H6EFQ.js +55 -0
  107. package/dist/chunk-CNDQFKUB.js +468 -0
  108. package/dist/chunk-CVLHDO2O.js +2685 -0
  109. package/dist/chunk-CVRTDBLZ.js +2008 -0
  110. package/dist/chunk-CXCAQOFB.js +26888 -0
  111. package/dist/chunk-CXCAQOFB.js.map +7 -0
  112. package/dist/chunk-DMG4ZMX5.js +830 -0
  113. package/dist/chunk-DMG4ZMX5.js.map +7 -0
  114. package/dist/chunk-DYX6B6RN.js +328 -0
  115. package/dist/chunk-FA2B6PKK.js +42 -0
  116. package/dist/chunk-FA6M7PSZ.js +134 -0
  117. package/dist/chunk-FCQPQD7Z.js +181 -0
  118. package/dist/chunk-FCQPQD7Z.js.map +7 -0
  119. package/dist/chunk-FF4J6QSF.js +240 -0
  120. package/dist/chunk-FYHUHKUC.js +6375 -0
  121. package/dist/chunk-G3CJDTG4.js +48 -0
  122. package/dist/chunk-HRD5MN33.js +1219 -0
  123. package/dist/chunk-HRD5MN33.js.map +7 -0
  124. package/dist/chunk-ILAYJZBC.js +184 -0
  125. package/dist/chunk-IT7EE7LY.js +2334 -0
  126. package/dist/chunk-JG5CF5Q3.js +397 -0
  127. package/dist/chunk-JI632MAR.js +400 -0
  128. package/dist/chunk-JI632MAR.js.map +7 -0
  129. package/dist/chunk-L3ORR2TC.js +2799 -0
  130. package/dist/chunk-L6BT6WZP.js +54 -0
  131. package/dist/chunk-LF2DWEKN.js +255 -0
  132. package/dist/chunk-MJZ66SUG.js +35 -0
  133. package/dist/chunk-N5T7TT5H.js +56 -0
  134. package/dist/chunk-NB4C446B.js +299 -0
  135. package/dist/chunk-NJYYF2LF.js +263 -0
  136. package/dist/chunk-NMVEXITA.js +379 -0
  137. package/dist/chunk-NS2H3C6X.js +182 -0
  138. package/dist/chunk-O7346S3P.js +1253 -0
  139. package/dist/chunk-OV3W5AMN.js +103 -0
  140. package/dist/chunk-PQDYA3ZQ.js +274 -0
  141. package/dist/chunk-QFRR3ZRE.js +466 -0
  142. package/dist/chunk-QLKEA3WE.js +102 -0
  143. package/dist/chunk-QM7CXRSF.js +96 -0
  144. package/dist/chunk-QV6VZLS5.js +2932 -0
  145. package/dist/chunk-RTE32A22.js +123 -0
  146. package/dist/chunk-RUFY5VCS.js +161 -0
  147. package/dist/chunk-RUFY5VCS.js.map +7 -0
  148. package/dist/chunk-SB5DR4NL.js +562 -0
  149. package/dist/chunk-SCATA75L.js +100 -0
  150. package/dist/chunk-SCATA75L.js.map +7 -0
  151. package/dist/chunk-SDUMZTIK.js +2095 -0
  152. package/dist/chunk-TIU2GGWN.js +5258 -0
  153. package/dist/chunk-TIU2GGWN.js.map +7 -0
  154. package/dist/chunk-TYLCIGGN.js +296 -0
  155. package/dist/chunk-UHZDDPUU.js +444 -0
  156. package/dist/chunk-UW6GRHZ4.js +516 -0
  157. package/dist/chunk-UYA5LCAR.js +281 -0
  158. package/dist/chunk-V7CB5D7A.js +50 -0
  159. package/dist/chunk-VBUDRJJG.js +203 -0
  160. package/dist/chunk-VVWZ4BOI.js +2349 -0
  161. package/dist/chunk-W3K3N275.js +418 -0
  162. package/dist/chunk-WENNRY5E.js +170 -0
  163. package/dist/chunk-Z4R7TCTB.js +257 -0
  164. package/dist/chunk-ZFNEHOW4.js +848 -0
  165. package/dist/chunk-ZLEGHQOO.js +217 -0
  166. package/dist/cohort-TLSGXKV5.js +66 -0
  167. package/dist/cohortSunburst-TNMXPHJW.js +402 -0
  168. package/dist/condition-NN7YK7AI.js +323 -0
  169. package/dist/controls-472G34VU.js +30 -0
  170. package/dist/controls.config-2BQ7QYOB.js +30 -0
  171. package/dist/correlation-5UPYEHC6.js +91 -0
  172. package/dist/customdata.inputui-EWYP4MRY.js +280 -0
  173. package/dist/dataDownload-X5UXBEK4.js +326 -0
  174. package/dist/databrowser.ui-PFHJKHIW.js +424 -0
  175. package/dist/dictionary-M2MCNRN2.js +109 -0
  176. package/dist/dnaMethylation-A7AWG2P5.js +29 -0
  177. package/dist/dnaMethylation.integration.spec-JWCMRFAM.js +194 -0
  178. package/dist/dnaMethylation.unit.spec-PIVJBW7Z.js +95 -0
  179. package/dist/dofetch-XID2XEJT.js +49 -0
  180. package/dist/e2pca-VJRNE6BU.js +340 -0
  181. package/dist/ep-BZE65IX2.js +1247 -0
  182. package/dist/expclust.gdc.spec-5BGBANUV.js +298 -0
  183. package/dist/facet-RXUO4LRY.js +556 -0
  184. package/dist/gb-NDRFDS5A.js +77 -0
  185. package/dist/geneExpClustering-ONJGTSGM.js +240 -0
  186. package/dist/geneExpression-NXDXXKEA.js +309 -0
  187. package/dist/geneExpression-PYI42HV6.js +29 -0
  188. package/dist/geneExpression.unit.spec-PTFHHTP7.js +150 -0
  189. package/dist/geneORA-SDR43UOL.js +269 -0
  190. package/dist/geneRanking-QI43IRNV.js +544 -0
  191. package/dist/geneVariant-OT4V554H.js +32 -0
  192. package/dist/geneVariant-V7EKM7RW.js +289 -0
  193. package/dist/geneVariant-V7EKM7RW.js.map +7 -0
  194. package/dist/geneVariant.integration.spec-6OE4HKYB.js +672 -0
  195. package/dist/genefusion.ui-IQDKCZPX.js +299 -0
  196. package/dist/geneset-TLZPZOQP.js +199 -0
  197. package/dist/genomeBrowser.spec-HIOTFKFK.js +272 -0
  198. package/dist/grin2-G2PVFRKR.js +945 -0
  199. package/dist/grin2-RJQZRVFF.js +66 -0
  200. package/dist/hierCluster-C6ICZSOB.js +51 -0
  201. package/dist/hierCluster-MESFVAO7.js +55 -0
  202. package/dist/hierCluster.config-7HROWR2T.js +32 -0
  203. package/dist/hierCluster.integration.spec-CJT22MJI.js +479 -0
  204. package/dist/hierCluster.interactivity-MDX5QSEF.js +45 -0
  205. package/dist/hierCluster.renderers-SU5IYI33.js +18 -0
  206. package/dist/imagePlot-3Y5FNIJL.js +152 -0
  207. package/dist/importPlot-WE5QSSFY.js +8 -0
  208. package/dist/isoformExpression-TMLFOZVK.js +31 -0
  209. package/dist/isoformExpression.unit.spec-MSVTQC3E.js +233 -0
  210. package/dist/junction-YKZV4LEL.js +32 -0
  211. package/dist/junction.unit.spec-3GPBCHXJ.js +224 -0
  212. package/dist/junction.unit.spec-3GPBCHXJ.js.map +7 -0
  213. package/dist/launch.adhoc-DS6UME2S.js +33 -0
  214. package/dist/leftlabel.sample-F6TEFWEW.js +260 -0
  215. package/dist/leftlabel.sample-F6TEFWEW.js.map +7 -0
  216. package/dist/lollipop-ZKDAU3O5.js +162 -0
  217. package/dist/maf-DKOORWGV.js +451 -0
  218. package/dist/maftimeline-EHJ2CWJJ.js +583 -0
  219. package/dist/matrix-7JDLGNU7.js +55 -0
  220. package/dist/matrix-EB7YOLMN.js +50 -0
  221. package/dist/matrix.cells-A5E63KDN.js +25 -0
  222. package/dist/matrix.config-GSW2WJM4.js +33 -0
  223. package/dist/matrix.data-R4FW2PQH.js +22 -0
  224. package/dist/matrix.groups-3UH2KOIY.js +25 -0
  225. package/dist/matrix.integration.spec-R32TIABT.js +3156 -0
  226. package/dist/matrix.interactivity-RDPMBDVK.js +33 -0
  227. package/dist/matrix.layout-FD275D3P.js +35 -0
  228. package/dist/matrix.legend-SE7SQTNN.js +19 -0
  229. package/dist/matrix.renderers-RK2BRCHZ.js +30 -0
  230. package/dist/matrix.serieses-BEZCQDLJ.js +18 -0
  231. package/dist/matrix.sort-KRNS4VPF.js +25 -0
  232. package/dist/matrix.sort.unit.spec-LZG3GOXM.js +464 -0
  233. package/dist/matrix.sorterUi.unit.spec-RR2KK4R5.js +334 -0
  234. package/dist/matrix.unit.spec-3PK6LUNE.js +146 -0
  235. package/dist/mavb-CUPAESFH.js +726 -0
  236. package/dist/mds.samplescatterplot-WGQ7A7UC.js +1545 -0
  237. package/dist/mds.survivalplot-ZEGSEJO2.js +472 -0
  238. package/dist/multivalue-DKUQCROX.js +79 -0
  239. package/dist/numericDictTermCluster-IFIEM3E4.js +62 -0
  240. package/dist/oncomatrix-WSPJAWHW.js +286 -0
  241. package/dist/oncomatrix.spec-LDWTZ7LO.js +439 -0
  242. package/dist/plot.2dvaf-N333YSMC.js +368 -0
  243. package/dist/plot.app-HU5RQS5I.js +32 -0
  244. package/dist/plot.barplot-4T2UEIYX.js +93 -0
  245. package/dist/plot.boxplot-C4OXCRFB.js +142 -0
  246. package/dist/plot.brainImaging-A6FEKFEA.js +51 -0
  247. package/dist/plot.disco-VDL7YKRX.js +100 -0
  248. package/dist/plot.ssgq-OII7PFPG.js +130 -0
  249. package/dist/plot.vaf2cov-RZ5JPWMC.js +249 -0
  250. package/dist/polar2-6KR2KX5D.js +228 -0
  251. package/dist/profileForms-YJDJIBSY.js +937 -0
  252. package/dist/profilePlot-U4U4AYMO.js +45 -0
  253. package/dist/proteinView-F5QEDDWR.js +1346 -0
  254. package/dist/proteinView-F5QEDDWR.js.map +7 -0
  255. package/dist/proteomeCohortCompare-QCXKLAWG.js +866 -0
  256. package/dist/pseudbulk.unit.spec-3A2FWQZI.js +82 -0
  257. package/dist/pseudobulk-WB6NXFJ6.js +31 -0
  258. package/dist/qualitative-CQUBCCGT.js +34 -0
  259. package/dist/qualitative-QQ3CWFVP.js +241 -0
  260. package/dist/radar2-FNC67FNX.js +323 -0
  261. package/dist/radarFacility2-3X77B4WP.js +331 -0
  262. package/dist/render-G5NCZTMW.js +29 -0
  263. package/dist/report-CR645KQ4.js +213 -0
  264. package/dist/sampleView-6PG2HJZL.js +39 -0
  265. package/dist/samplelst-FCQ7YPPQ.js +114 -0
  266. package/dist/samplematrix-GXMN5QTS.js +2188 -0
  267. package/dist/sc-4ZTSQOXC.js +77 -0
  268. package/dist/scatter-2PUQU22I.js +84 -0
  269. package/dist/scatter-ZSZTA37T.js +919 -0
  270. package/dist/selectGenomeWithTklst-XHWBEM2G.js +125 -0
  271. package/dist/singleCellCellType-NP7Y4N6Z.js +29 -0
  272. package/dist/singleCellCellType.unit.spec-5I3FECB4.js +150 -0
  273. package/dist/singleCellGeneExpression-7RWH633E.js +29 -0
  274. package/dist/singleCellGeneExpression.unit.spec-2X2BDTNO.js +144 -0
  275. package/dist/singleCellNumericValue-I6V4ME6T.js +29 -0
  276. package/dist/singleCellNumericValue.unit.spec-4HKAJXB3.js +412 -0
  277. package/dist/singleCellPlot-QRFR3AJH.js +44 -0
  278. package/dist/singlecell-AQEAB445.js +77 -0
  279. package/dist/singlecell-DX4EXNUV.js +1562 -0
  280. package/dist/snp-2URSYPBL.js +29 -0
  281. package/dist/snp.unit.spec-ZV2RCDT4.js +167 -0
  282. package/dist/snplocus-BB4I2QIP.js +200 -0
  283. package/dist/snplst-A5S7CQEM.js +36 -0
  284. package/dist/spliceevent.a53ss.diagram-6C4OQOVF.js +142 -0
  285. package/dist/spliceevent.exonskip.diagram-FKSR3JEL.js +274 -0
  286. package/dist/spliceevent.noeventdiagram-G3JQUZKK.js +451 -0
  287. package/dist/ssGSEA-KLMOSI53.js +29 -0
  288. package/dist/ssGSEA.unit.spec-HBALWLVB.js +79 -0
  289. package/dist/stattable-ZCMPIC3I.js +112 -0
  290. package/dist/studyCatalog-UZ4BSYY6.js +457 -0
  291. package/dist/summarizeCnvGeneexp-Z43GYKZB.js +154 -0
  292. package/dist/summarizeGeneexpSurvival-4OHRMCFV.js +101 -0
  293. package/dist/summarizeMutationCnv-EZXMLADC.js +155 -0
  294. package/dist/summarizeMutationDiagnosis-RPQP4TM5.js +31 -0
  295. package/dist/summarizeMutationSurvival-LX4TRGJZ.js +95 -0
  296. package/dist/summary-FZQVK5KR.js +40 -0
  297. package/dist/summary.integration.spec-46T65LR5.js +405 -0
  298. package/dist/summaryInput-BHU7G5FC.js +238 -0
  299. package/dist/sunburst-A5NS3KJQ.js +274 -0
  300. package/dist/sunburst-R5X2C7FK.js +34 -0
  301. package/dist/survival-MKW5J5ZH.js +1248 -0
  302. package/dist/survival-N2NKMVOV.js +49 -0
  303. package/dist/survival.integration.spec-K5FMOOTF.js +609 -0
  304. package/dist/svgraph-3WRCJA5D.js +1377 -0
  305. package/dist/svmr-TLMT7GE3.js +3574 -0
  306. package/dist/svmr-TLMT7GE3.js.map +7 -0
  307. package/dist/swimmer-XV5KVWEM.js +993 -0
  308. package/dist/table-XUGFZSGV.js +192 -0
  309. package/dist/termCollection-23ZRHZHF.js +247 -0
  310. package/dist/termCollection-NWTAUSSW.js +29 -0
  311. package/dist/termCollection.unit.spec-WE3JMSUI.js +295 -0
  312. package/dist/termCollectionFractionSelection-5FLFLMIY.js +38 -0
  313. package/dist/termCollectionFractionSelection.unit.spec-CCFGGXAA.js +184 -0
  314. package/dist/tk-CTHINOMN.js +1224 -0
  315. package/dist/tk-CTHINOMN.js.map +7 -0
  316. package/dist/tk-F3TSB4IB.js +38 -0
  317. package/dist/tp.ui-4QDX3FGM.js +1453 -0
  318. package/dist/tvs.categorical-24OT3XZI.js +28 -0
  319. package/dist/tvs.condition-X4SXCVGN.js +160 -0
  320. package/dist/tvs.dt-FRBJRSWI.js +34 -0
  321. package/dist/tvs.dtcnv.categorical-4RRSO735.js +31 -0
  322. package/dist/tvs.dtcnv.continuous-HXY2PBUA.js +72 -0
  323. package/dist/tvs.dtfusion-67LXBQA4.js +31 -0
  324. package/dist/tvs.dtitd-MCJZCNV2.js +31 -0
  325. package/dist/tvs.dtsnvindel-K5YIIBQJ.js +31 -0
  326. package/dist/tvs.dtsv-RP7FUB2N.js +31 -0
  327. package/dist/tvs.multivalue-CROMWUCP.js +84 -0
  328. package/dist/tvs.numeric-IYYYV6ZJ.js +32 -0
  329. package/dist/tvs.samplelst-5DXKRFYM.js +95 -0
  330. package/dist/tvs.survival-W5RXODBT.js +110 -0
  331. package/dist/tvs.termCollection-OSJYIWDX.js +118 -0
  332. package/dist/vocabulary-HTRYJUD7.js +32 -0
  333. package/dist/wsi.direct-UHVG525G.js +11600 -0
  334. package/dist/wsi.direct-UHVG525G.js.map +7 -0
  335. package/package.json +3 -3
  336. package/dist/2dmaf-CSBPMYHO.js +0 -1362
  337. package/dist/AggMatrixInput-2HST4LLJ.js +0 -402
  338. package/dist/AggregateMatrix-UPOAX44L.js +0 -37
  339. package/dist/AppHeader-H5QBVKUS.js +0 -826
  340. package/dist/BoxPlot-JTBQA6PL.js +0 -1247
  341. package/dist/CorrelationVolcano-AWBPVDMT.js +0 -613
  342. package/dist/CorrelationVolcano-AWBPVDMT.js.map +0 -7
  343. package/dist/Cuminc-3BXJVWIH.js +0 -1217
  344. package/dist/DE-237VV46D.js +0 -85
  345. package/dist/DEinput-W443UW5T.js +0 -479
  346. package/dist/DEinput-W443UW5T.js.map +0 -7
  347. package/dist/DM-TIW623IR.js +0 -86
  348. package/dist/DifferentialAnalysis-PHUA2GPK.js +0 -236
  349. package/dist/Disco-WHV52SCI.js +0 -3445
  350. package/dist/Disco.UI-UDUXNCZX.js +0 -239
  351. package/dist/DmrPlot-FZCD6FTX.js +0 -366
  352. package/dist/GB-6UW5LOUV.js +0 -1388
  353. package/dist/GB-6UW5LOUV.js.map +0 -7
  354. package/dist/GSEA-3CNHMK6M.js +0 -870
  355. package/dist/GeneExpInput-ZOVP7BFY.js +0 -38
  356. package/dist/Geomap-JREOIESM.js +0 -80
  357. package/dist/HicApp-RKAMIUXQ.js +0 -2240
  358. package/dist/IDCViewer-KXV4FU3V.js +0 -10810
  359. package/dist/NumBinaryEditor-FNVYUK2J.js +0 -274
  360. package/dist/NumBinaryEditor.unit.spec-PWR23U3J.js +0 -308
  361. package/dist/NumContEditor-YLBJW64K.js +0 -100
  362. package/dist/NumContEditor.unit.spec-6JWBCPFY.js +0 -160
  363. package/dist/NumCustomBinEditor-42AFCXRN.js +0 -29
  364. package/dist/NumCustomBinEditor.unit.spec-AFBTF2CL.js +0 -393
  365. package/dist/NumDiscreteEditor-FJIBZTBP.js +0 -165
  366. package/dist/NumDiscreteEditor.unit.spec-MC4INDCB.js +0 -229
  367. package/dist/NumRegularBinEditor-2WRE72TL.js +0 -29
  368. package/dist/NumRegularBinEditor.unit.spec-L3S6NRCM.js +0 -274
  369. package/dist/NumSplineEditor-TVMVAN7I.js +0 -205
  370. package/dist/NumSplineEditor.unit.spec-GEL36GZZ.js +0 -220
  371. package/dist/NumericDensity-BNFAVOFO.js +0 -29
  372. package/dist/NumericDensity.unit.spec-XBYUFBTQ.js +0 -414
  373. package/dist/NumericHandler-4VFFJNX6.js +0 -30
  374. package/dist/NumericHandler.unit.spec-76T2IVRS.js +0 -225
  375. package/dist/ProteomeInput-M5UIO73Q.js +0 -610
  376. package/dist/Regression-5LB5TLA6.js +0 -1412
  377. package/dist/RunChart2-HIFXOEKZ.js +0 -744
  378. package/dist/SC-SMMW5MJG.js +0 -1290
  379. package/dist/Violin-COAFYZOV.js +0 -1105
  380. package/dist/Volcano-62II76B4.js +0 -2748
  381. package/dist/Volcano-62II76B4.js.map +0 -7
  382. package/dist/Wsi-OYW2L7FR.js +0 -637
  383. package/dist/Wsi-OYW2L7FR.js.map +0 -7
  384. package/dist/aboutSunburst-3FYJGR6B.js +0 -93
  385. package/dist/adSandbox-4VHYWBQC.js +0 -29
  386. package/dist/animatedBubbleChart-QCCIC5IT.js +0 -542
  387. package/dist/app-IF7YPCGZ.js +0 -28
  388. package/dist/app-JZ43TSJP.js +0 -38
  389. package/dist/bam-2VPZGSW3.js +0 -872
  390. package/dist/barchart-VYTWYYGG.js +0 -38
  391. package/dist/barchart2-XC7J4VEO.js +0 -305
  392. package/dist/block-YGQFUK5L.js +0 -6203
  393. package/dist/block-YGQFUK5L.js.map +0 -7
  394. package/dist/block.init-BVP3YZHQ.js +0 -29
  395. package/dist/block.mds.expressionrank-RKDDKY4J.js +0 -350
  396. package/dist/block.mds.geneboxplot-3FZ3EZZ6.js +0 -819
  397. package/dist/block.mds.junction-MCOG37RA.js +0 -1534
  398. package/dist/block.mds.svcnv-IEOR5IQZ.js +0 -6325
  399. package/dist/block.svg-3XHRHYCV.js +0 -155
  400. package/dist/block.tk.aicheck-TMDUGNZX.js +0 -274
  401. package/dist/block.tk.bam-73KW4QEJ.js +0 -1906
  402. package/dist/block.tk.bigwig.ui-E5W6R7DQ.js +0 -202
  403. package/dist/block.tk.hicstraw-BNNE6ZMW.js +0 -814
  404. package/dist/block.tk.junction-DMPRZRNY.js +0 -2353
  405. package/dist/block.tk.junction.textmatrixui-XS2E7MQL.js +0 -190
  406. package/dist/block.tk.ld-QD3XDLO4.js +0 -90
  407. package/dist/block.tk.menu-S6XI732E.js +0 -1050
  408. package/dist/block.tk.pgv-KH4TMR3A.js +0 -934
  409. package/dist/brainImaging-NK4JENN3.js +0 -550
  410. package/dist/brainRegions-YUEMTKYH.js +0 -213
  411. package/dist/bubbleHeatmap-LQCVS4WK.js +0 -374
  412. package/dist/bubbleHeatmap-LQCVS4WK.js.map +0 -7
  413. package/dist/cellTypeBubbleHeatmap-DFRSPWAY.js +0 -274
  414. package/dist/cellTypeBubbleHeatmap-DFRSPWAY.js.map +0 -7
  415. package/dist/chunk-37ZEGLVY.js +0 -267
  416. package/dist/chunk-3RPX4ZVV.js +0 -2334
  417. package/dist/chunk-4LK5YFHF.js +0 -102
  418. package/dist/chunk-4WFG5Y3A.js +0 -2095
  419. package/dist/chunk-4WFXCUT4.js +0 -141
  420. package/dist/chunk-5LY2ASQX.js +0 -305
  421. package/dist/chunk-6V7ITU5F.js +0 -2349
  422. package/dist/chunk-7UK7CU4F.js +0 -398
  423. package/dist/chunk-7UK7CU4F.js.map +0 -7
  424. package/dist/chunk-AAQDXVQT.js +0 -134
  425. package/dist/chunk-ADJBQCFM.js +0 -243
  426. package/dist/chunk-ATIITEOR.js +0 -692
  427. package/dist/chunk-ATIITEOR.js.map +0 -7
  428. package/dist/chunk-BWVJAFEQ.js +0 -35
  429. package/dist/chunk-CDCNBN6G.js +0 -50
  430. package/dist/chunk-CGSBIFFO.js +0 -1339
  431. package/dist/chunk-DPWSIN62.js +0 -26787
  432. package/dist/chunk-DPWSIN62.js.map +0 -7
  433. package/dist/chunk-EARMOT6Q.js +0 -176
  434. package/dist/chunk-EARMOT6Q.js.map +0 -7
  435. package/dist/chunk-ECCXTB5S.js +0 -562
  436. package/dist/chunk-ECTOEM7X.js +0 -96
  437. package/dist/chunk-EKIWZUEO.js +0 -54
  438. package/dist/chunk-FALP6GXG.js +0 -96
  439. package/dist/chunk-FRD6LQF7.js +0 -103
  440. package/dist/chunk-FRPYXYYQ.js +0 -263
  441. package/dist/chunk-FV2GLMSI.js +0 -397
  442. package/dist/chunk-G6SP5IQT.js +0 -626
  443. package/dist/chunk-GZL6YFZJ.js +0 -30
  444. package/dist/chunk-H353EVLK.js +0 -240
  445. package/dist/chunk-HKR5R5YR.js +0 -466
  446. package/dist/chunk-HULTLO4D.js +0 -217
  447. package/dist/chunk-IIN4CG67.js +0 -56
  448. package/dist/chunk-ISWFHYEZ.js +0 -123
  449. package/dist/chunk-JBUTLI3V.js +0 -1253
  450. package/dist/chunk-JCNZJKLK.js +0 -55
  451. package/dist/chunk-JEVDRC64.js +0 -56
  452. package/dist/chunk-KBZAB2H2.js +0 -340
  453. package/dist/chunk-KDKJLITX.js +0 -54
  454. package/dist/chunk-KNFJN6CM.js +0 -299
  455. package/dist/chunk-KSYGLBZ4.js +0 -4389
  456. package/dist/chunk-KSYGLBZ4.js.map +0 -7
  457. package/dist/chunk-KUOXZIH4.js +0 -348
  458. package/dist/chunk-KZ54E2FU.js +0 -184
  459. package/dist/chunk-L7FMBWWK.js +0 -6375
  460. package/dist/chunk-LMONIWPI.js +0 -30
  461. package/dist/chunk-LTY7WOAT.js +0 -281
  462. package/dist/chunk-LYDN734A.js +0 -194
  463. package/dist/chunk-LYMYO6TY.js +0 -652
  464. package/dist/chunk-LYMYO6TY.js.map +0 -7
  465. package/dist/chunk-MRZUZDRA.js +0 -444
  466. package/dist/chunk-NGBI4FST.js +0 -195
  467. package/dist/chunk-OKM4ACTA.js +0 -170
  468. package/dist/chunk-OUDHHMZU.js +0 -159
  469. package/dist/chunk-OUDHHMZU.js.map +0 -7
  470. package/dist/chunk-OYXRYWGU.js +0 -2932
  471. package/dist/chunk-P2HMCEMM.js +0 -5254
  472. package/dist/chunk-P2HMCEMM.js.map +0 -7
  473. package/dist/chunk-P5FHYGJK.js +0 -848
  474. package/dist/chunk-P7QDNXSH.js +0 -276
  475. package/dist/chunk-Q7GK35TB.js +0 -257
  476. package/dist/chunk-QXRM5NMW.js +0 -274
  477. package/dist/chunk-RI3GAHQE.js +0 -255
  478. package/dist/chunk-SH7SL4I5.js +0 -1219
  479. package/dist/chunk-SH7SL4I5.js.map +0 -7
  480. package/dist/chunk-SJHWZZ4M.js +0 -70
  481. package/dist/chunk-SJHWZZ4M.js.map +0 -7
  482. package/dist/chunk-T2W4JHWJ.js +0 -472
  483. package/dist/chunk-T2W4JHWJ.js.map +0 -7
  484. package/dist/chunk-TDBS3UFZ.js +0 -379
  485. package/dist/chunk-THHYPA5K.js +0 -48
  486. package/dist/chunk-U2OB3S3M.js +0 -14
  487. package/dist/chunk-UA2ADBTO.js +0 -42
  488. package/dist/chunk-USGUVW5Q.js +0 -182
  489. package/dist/chunk-UWVDD4C2.js +0 -480
  490. package/dist/chunk-W2SBSEKT.js +0 -550
  491. package/dist/chunk-XAHZYGKW.js +0 -468
  492. package/dist/chunk-XKWLP433.js +0 -328
  493. package/dist/chunk-YWB2QHV2.js +0 -2799
  494. package/dist/chunk-Z6M77JDG.js +0 -2008
  495. package/dist/chunk-Z7RFFJXU.js +0 -516
  496. package/dist/chunk-ZG7EBTHK.js +0 -203
  497. package/dist/chunk-ZJLJHQWM.js +0 -418
  498. package/dist/chunk-ZKU6RST3.js +0 -2685
  499. package/dist/chunk-ZLWEUYPT.js +0 -296
  500. package/dist/cohort-X327AG3O.js +0 -66
  501. package/dist/cohortSunburst-GNWIVDNA.js +0 -402
  502. package/dist/condition-3M4L2HIM.js +0 -323
  503. package/dist/controls-OKNHZJOU.js +0 -30
  504. package/dist/controls.config-FUKM5LEP.js +0 -30
  505. package/dist/correlation-PC4MXCFM.js +0 -91
  506. package/dist/customdata.inputui-HCRTX56R.js +0 -280
  507. package/dist/dataDownload-HJO7UW7S.js +0 -326
  508. package/dist/databrowser.ui-EY3H6B4S.js +0 -424
  509. package/dist/dictionary-L6CTMFY7.js +0 -109
  510. package/dist/dnaMethylation-FEB5GGXK.js +0 -29
  511. package/dist/dnaMethylation.integration.spec-4DC6TJNZ.js +0 -194
  512. package/dist/dnaMethylation.unit.spec-REOHQOBC.js +0 -95
  513. package/dist/dofetch-YFGOKCKV.js +0 -49
  514. package/dist/e2pca-QSAVTCPL.js +0 -340
  515. package/dist/ep-LAFLKVSW.js +0 -1247
  516. package/dist/expclust.gdc.spec-OM4J6WBL.js +0 -298
  517. package/dist/facet-WHTV2VIX.js +0 -556
  518. package/dist/gb-DLXWWBB6.js +0 -77
  519. package/dist/geneExpClustering-KB2MB2VM.js +0 -240
  520. package/dist/geneExpression-3D7PDZ2I.js +0 -309
  521. package/dist/geneExpression-3RSRGYGQ.js +0 -29
  522. package/dist/geneExpression.unit.spec-EINAWLPR.js +0 -150
  523. package/dist/geneORA-J4KVSZT3.js +0 -269
  524. package/dist/geneRanking-HKLJ7CN6.js +0 -544
  525. package/dist/geneVariant-3BRGRFPT.js +0 -32
  526. package/dist/geneVariant-VI5DGDAB.js +0 -289
  527. package/dist/geneVariant-VI5DGDAB.js.map +0 -7
  528. package/dist/geneVariant.integration.spec-3IBX4NNE.js +0 -672
  529. package/dist/genefusion.ui-OESQL7TW.js +0 -299
  530. package/dist/geneset-3BMV3KP4.js +0 -199
  531. package/dist/genomeBrowser.spec-I3WKAITC.js +0 -272
  532. package/dist/grin2-4BBCH3H5.js +0 -66
  533. package/dist/grin2-5L2U32LY.js +0 -945
  534. package/dist/hierCluster-KM56NTN6.js +0 -51
  535. package/dist/hierCluster-XCJF5IQ6.js +0 -55
  536. package/dist/hierCluster.config-E2EYOXX6.js +0 -32
  537. package/dist/hierCluster.integration.spec-IIEJ2YEI.js +0 -479
  538. package/dist/hierCluster.interactivity-AJFEJTGX.js +0 -45
  539. package/dist/hierCluster.renderers-XKI344FM.js +0 -18
  540. package/dist/imagePlot-3B3BXI6I.js +0 -152
  541. package/dist/importPlot-JDVH7Q2Z.js +0 -8
  542. package/dist/isoformExpression-UFHY5LB2.js +0 -31
  543. package/dist/isoformExpression.unit.spec-U6GDCNQR.js +0 -233
  544. package/dist/junction-W2STW5WW.js +0 -32
  545. package/dist/junction.unit.spec-R4DIBFLB.js +0 -178
  546. package/dist/junction.unit.spec-R4DIBFLB.js.map +0 -7
  547. package/dist/launch.adhoc-KN7HFHJH.js +0 -33
  548. package/dist/leftlabel.sample-CK2EK7J6.js +0 -254
  549. package/dist/leftlabel.sample-CK2EK7J6.js.map +0 -7
  550. package/dist/lollipop-EKIGAAK6.js +0 -162
  551. package/dist/maf-MK2MM7J4.js +0 -451
  552. package/dist/maftimeline-7RTMXWFA.js +0 -583
  553. package/dist/matrix-UM2EZODJ.js +0 -50
  554. package/dist/matrix-YBL4FZYJ.js +0 -55
  555. package/dist/matrix.cells-45ZFADK5.js +0 -25
  556. package/dist/matrix.config-QTBIRXKU.js +0 -33
  557. package/dist/matrix.data-WAMOLSKW.js +0 -22
  558. package/dist/matrix.groups-RXFXZABD.js +0 -25
  559. package/dist/matrix.integration.spec-JZDZRVOK.js +0 -3156
  560. package/dist/matrix.interactivity-P4VYGTB2.js +0 -33
  561. package/dist/matrix.layout-WWPRXXHX.js +0 -35
  562. package/dist/matrix.legend-4MCMVVKO.js +0 -19
  563. package/dist/matrix.renderers-JQTUODDS.js +0 -30
  564. package/dist/matrix.serieses-3IDRKSGO.js +0 -18
  565. package/dist/matrix.sort-EAWOB56R.js +0 -25
  566. package/dist/matrix.sort.unit.spec-FOWLULHA.js +0 -464
  567. package/dist/matrix.sorterUi.unit.spec-U5CQDTMX.js +0 -334
  568. package/dist/matrix.unit.spec-VTLD4EOZ.js +0 -146
  569. package/dist/mavb-JIIXJHBK.js +0 -726
  570. package/dist/mds.samplescatterplot-PTWA2V6E.js +0 -1545
  571. package/dist/mds.survivalplot-XVZ66GP5.js +0 -472
  572. package/dist/multivalue-2H7QX7MG.js +0 -79
  573. package/dist/numericDictTermCluster-EHCDRT6J.js +0 -62
  574. package/dist/oncomatrix-RZLZUC32.js +0 -286
  575. package/dist/oncomatrix.spec-Z5UQGTW2.js +0 -439
  576. package/dist/plot.2dvaf-IRBZBJ6B.js +0 -368
  577. package/dist/plot.app-I23IAZ3Z.js +0 -32
  578. package/dist/plot.barplot-PYLRAZB7.js +0 -93
  579. package/dist/plot.boxplot-VBWU7DUG.js +0 -142
  580. package/dist/plot.brainImaging-HDJMEMTK.js +0 -51
  581. package/dist/plot.disco-5BVG3WMT.js +0 -100
  582. package/dist/plot.ssgq-S3BKXJMW.js +0 -130
  583. package/dist/plot.vaf2cov-VD7DU2XR.js +0 -249
  584. package/dist/polar2-PYLEVG7E.js +0 -228
  585. package/dist/profileForms-CI2YYD3Y.js +0 -937
  586. package/dist/profilePlot-UCC4ZVHQ.js +0 -45
  587. package/dist/proteinView-FBY6TK3S.js +0 -1346
  588. package/dist/proteinView-FBY6TK3S.js.map +0 -7
  589. package/dist/proteomeCohortCompare-2VUSLC6I.js +0 -866
  590. package/dist/pseudbulk.unit.spec-VPZWNTIA.js +0 -82
  591. package/dist/pseudobulk-RUXGZ7OY.js +0 -31
  592. package/dist/qualitative-3AVR4GRX.js +0 -34
  593. package/dist/qualitative-5QNBKDOZ.js +0 -241
  594. package/dist/radar2-AOYMS54Y.js +0 -323
  595. package/dist/radarFacility2-PP2MAXIP.js +0 -331
  596. package/dist/render-ASLVKYEX.js +0 -29
  597. package/dist/report-UVYKDMQC.js +0 -213
  598. package/dist/sampleView-6UHR7FSR.js +0 -39
  599. package/dist/samplelst-ABC2CCNN.js +0 -114
  600. package/dist/samplematrix-36UCHZLC.js +0 -2188
  601. package/dist/sc-XLSAM725.js +0 -77
  602. package/dist/scatter-ADOBAOW2.js +0 -84
  603. package/dist/scatter-ZNVLI627.js +0 -919
  604. package/dist/selectGenomeWithTklst-DPDBDYTR.js +0 -125
  605. package/dist/singleCellCellType-STVPYZD4.js +0 -29
  606. package/dist/singleCellCellType.unit.spec-ZLY37AXL.js +0 -150
  607. package/dist/singleCellGeneExpression-PCGLU35S.js +0 -29
  608. package/dist/singleCellGeneExpression.unit.spec-PSLKK362.js +0 -144
  609. package/dist/singleCellNumericValue-SR3SJEOB.js +0 -29
  610. package/dist/singleCellNumericValue.unit.spec-PXVXJ4HJ.js +0 -412
  611. package/dist/singleCellPlot-JXB7M6OH.js +0 -44
  612. package/dist/singlecell-EDSX56QO.js +0 -1562
  613. package/dist/singlecell-PH55NFRX.js +0 -77
  614. package/dist/snp-3VEYBTAQ.js +0 -29
  615. package/dist/snp.unit.spec-V7OB44US.js +0 -167
  616. package/dist/snplocus-HX67RBT5.js +0 -200
  617. package/dist/snplst-H5YXCY33.js +0 -36
  618. package/dist/spliceevent.a53ss.diagram-DBDEEHSK.js +0 -142
  619. package/dist/spliceevent.exonskip.diagram-EYEL6BY6.js +0 -274
  620. package/dist/spliceevent.noeventdiagram-64OEXK7U.js +0 -451
  621. package/dist/ssGSEA-3YWQH6KM.js +0 -29
  622. package/dist/ssGSEA.unit.spec-23V2IXP5.js +0 -79
  623. package/dist/stattable-GPSBCNYC.js +0 -112
  624. package/dist/studyCatalog-W5PATRNY.js +0 -457
  625. package/dist/summarizeCnvGeneexp-YGI23QH5.js +0 -154
  626. package/dist/summarizeGeneexpSurvival-KQ6OLWYR.js +0 -101
  627. package/dist/summarizeMutationCnv-XDHBNEPU.js +0 -155
  628. package/dist/summarizeMutationDiagnosis-VKIJRJ2Q.js +0 -31
  629. package/dist/summarizeMutationSurvival-57YKJGLE.js +0 -95
  630. package/dist/summary-4WQOVIUF.js +0 -40
  631. package/dist/summary.integration.spec-FRNWBU7F.js +0 -405
  632. package/dist/summaryInput-X7DS2YA7.js +0 -238
  633. package/dist/sunburst-3OEAQA3O.js +0 -34
  634. package/dist/sunburst-MSGTXYMM.js +0 -274
  635. package/dist/survival-5KC5CNZU.js +0 -1248
  636. package/dist/survival-QXDS6N46.js +0 -49
  637. package/dist/survival.integration.spec-PKENHLTZ.js +0 -609
  638. package/dist/svgraph-VJLB7BBN.js +0 -1377
  639. package/dist/svmr-6BDEZAS6.js +0 -3834
  640. package/dist/svmr-6BDEZAS6.js.map +0 -7
  641. package/dist/swimmer-R3DN7N36.js +0 -993
  642. package/dist/table-YF5VORU6.js +0 -192
  643. package/dist/termCollection-3KGLZFDW.js +0 -29
  644. package/dist/termCollection-KSHVOPS5.js +0 -247
  645. package/dist/termCollection.unit.spec-HTBDG5PL.js +0 -295
  646. package/dist/termCollectionFractionSelection-MK4NKWUX.js +0 -38
  647. package/dist/termCollectionFractionSelection.unit.spec-AMF32FDN.js +0 -184
  648. package/dist/tk-FDHBAKXQ.js +0 -1198
  649. package/dist/tk-FDHBAKXQ.js.map +0 -7
  650. package/dist/tk-Z54DOECH.js +0 -38
  651. package/dist/tp.ui-M4TZVT53.js +0 -1453
  652. package/dist/tvs.categorical-HY3BWCZR.js +0 -28
  653. package/dist/tvs.condition-Y36TRIX4.js +0 -160
  654. package/dist/tvs.dt-XKVJZP7Y.js +0 -34
  655. package/dist/tvs.dtcnv.categorical-OMRZR4Y7.js +0 -31
  656. package/dist/tvs.dtcnv.continuous-AGYOBI5K.js +0 -72
  657. package/dist/tvs.dtfusion-2JX5Y2IH.js +0 -31
  658. package/dist/tvs.dtitd-SDSLBBWC.js +0 -31
  659. package/dist/tvs.dtsnvindel-LI7K464K.js +0 -31
  660. package/dist/tvs.dtsv-VRCLX7QY.js +0 -31
  661. package/dist/tvs.multivalue-4OTY6J2S.js +0 -84
  662. package/dist/tvs.numeric-CDATYOR2.js +0 -32
  663. package/dist/tvs.samplelst-76JOJG2M.js +0 -95
  664. package/dist/tvs.survival-WTFJOKIZ.js +0 -110
  665. package/dist/tvs.termCollection-QQXAS7PE.js +0 -118
  666. package/dist/vocabulary-6ACAEFTL.js +0 -32
  667. package/dist/wsi.direct-OS32TQRM.js +0 -11515
  668. package/dist/wsi.direct-OS32TQRM.js.map +0 -7
  669. /package/dist/{2dmaf-CSBPMYHO.js.map → 2dmaf-75YAQQ3P.js.map} +0 -0
  670. /package/dist/{AggMatrixInput-2HST4LLJ.js.map → AggMatrixInput-KYDS23KP.js.map} +0 -0
  671. /package/dist/{AggregateMatrix-UPOAX44L.js.map → AggregateMatrix-XGGF6KBX.js.map} +0 -0
  672. /package/dist/{AppHeader-H5QBVKUS.js.map → AppHeader-CNY5RTJN.js.map} +0 -0
  673. /package/dist/{BoxPlot-JTBQA6PL.js.map → BoxPlot-OQIJJO66.js.map} +0 -0
  674. /package/dist/{Cuminc-3BXJVWIH.js.map → Cuminc-J6DONJTA.js.map} +0 -0
  675. /package/dist/{DE-237VV46D.js.map → DE-XUBJUUBB.js.map} +0 -0
  676. /package/dist/{DM-TIW623IR.js.map → DM-2UUXUJOC.js.map} +0 -0
  677. /package/dist/{DifferentialAnalysis-PHUA2GPK.js.map → DifferentialAnalysis-U6ZPFHNM.js.map} +0 -0
  678. /package/dist/{Disco-WHV52SCI.js.map → Disco-RR2NN66T.js.map} +0 -0
  679. /package/dist/{Disco.UI-UDUXNCZX.js.map → Disco.UI-MQ7WZQOP.js.map} +0 -0
  680. /package/dist/{DmrPlot-FZCD6FTX.js.map → DmrPlot-MKAKFUJR.js.map} +0 -0
  681. /package/dist/{GSEA-3CNHMK6M.js.map → GSEA-DTIA4MNS.js.map} +0 -0
  682. /package/dist/{GeneExpInput-ZOVP7BFY.js.map → GeneExpInput-4GM5MBBX.js.map} +0 -0
  683. /package/dist/{Geomap-JREOIESM.js.map → Geomap-FF6DBN7M.js.map} +0 -0
  684. /package/dist/{HicApp-RKAMIUXQ.js.map → HicApp-LGXNL36X.js.map} +0 -0
  685. /package/dist/{IDCViewer-KXV4FU3V.js.map → IDCViewer-FQABJNUI.js.map} +0 -0
  686. /package/dist/{NumBinaryEditor-FNVYUK2J.js.map → NumBinaryEditor-7NOHUH76.js.map} +0 -0
  687. /package/dist/{NumBinaryEditor.unit.spec-PWR23U3J.js.map → NumBinaryEditor.unit.spec-SVE5SZYB.js.map} +0 -0
  688. /package/dist/{NumContEditor-YLBJW64K.js.map → NumContEditor-MSWCQUKL.js.map} +0 -0
  689. /package/dist/{NumContEditor.unit.spec-6JWBCPFY.js.map → NumContEditor.unit.spec-UFPASWBH.js.map} +0 -0
  690. /package/dist/{NumCustomBinEditor-42AFCXRN.js.map → NumCustomBinEditor-DF24SO2N.js.map} +0 -0
  691. /package/dist/{NumCustomBinEditor.unit.spec-AFBTF2CL.js.map → NumCustomBinEditor.unit.spec-N3S3ROBI.js.map} +0 -0
  692. /package/dist/{NumDiscreteEditor-FJIBZTBP.js.map → NumDiscreteEditor-HL257XGY.js.map} +0 -0
  693. /package/dist/{NumDiscreteEditor.unit.spec-MC4INDCB.js.map → NumDiscreteEditor.unit.spec-6PTPX547.js.map} +0 -0
  694. /package/dist/{NumRegularBinEditor-2WRE72TL.js.map → NumRegularBinEditor-EWCKTXWY.js.map} +0 -0
  695. /package/dist/{NumRegularBinEditor.unit.spec-L3S6NRCM.js.map → NumRegularBinEditor.unit.spec-AMGPMY7U.js.map} +0 -0
  696. /package/dist/{NumSplineEditor-TVMVAN7I.js.map → NumSplineEditor-YDNJ2DW2.js.map} +0 -0
  697. /package/dist/{NumSplineEditor.unit.spec-GEL36GZZ.js.map → NumSplineEditor.unit.spec-L4JZ3OND.js.map} +0 -0
  698. /package/dist/{NumericDensity-BNFAVOFO.js.map → NumericDensity-SQW67WKL.js.map} +0 -0
  699. /package/dist/{NumericDensity.unit.spec-XBYUFBTQ.js.map → NumericDensity.unit.spec-KBK3JZZG.js.map} +0 -0
  700. /package/dist/{NumericHandler-4VFFJNX6.js.map → NumericHandler-HG7FK4D4.js.map} +0 -0
  701. /package/dist/{NumericHandler.unit.spec-76T2IVRS.js.map → NumericHandler.unit.spec-N7PYAGGF.js.map} +0 -0
  702. /package/dist/{ProteomeInput-M5UIO73Q.js.map → ProteomeInput-6XGREJFP.js.map} +0 -0
  703. /package/dist/{Regression-5LB5TLA6.js.map → Regression-4DDXNQNO.js.map} +0 -0
  704. /package/dist/{RunChart2-HIFXOEKZ.js.map → RunChart2-ARCUC4Z3.js.map} +0 -0
  705. /package/dist/{SC-SMMW5MJG.js.map → SC-AV6COOPI.js.map} +0 -0
  706. /package/dist/{Violin-COAFYZOV.js.map → Violin-2P5I6NL5.js.map} +0 -0
  707. /package/dist/{aboutSunburst-3FYJGR6B.js.map → aboutSunburst-V557OK5L.js.map} +0 -0
  708. /package/dist/{adSandbox-4VHYWBQC.js.map → adSandbox-76PMWKTX.js.map} +0 -0
  709. /package/dist/{animatedBubbleChart-QCCIC5IT.js.map → animatedBubbleChart-CFRJJDAC.js.map} +0 -0
  710. /package/dist/{app-IF7YPCGZ.js.map → app-2SUVPURX.js.map} +0 -0
  711. /package/dist/{app-JZ43TSJP.js.map → app-PR42RXHC.js.map} +0 -0
  712. /package/dist/{bam-2VPZGSW3.js.map → bam-AYHWKHXL.js.map} +0 -0
  713. /package/dist/{barchart-VYTWYYGG.js.map → barchart-S4CLMJO7.js.map} +0 -0
  714. /package/dist/{barchart2-XC7J4VEO.js.map → barchart2-R2BGA2WO.js.map} +0 -0
  715. /package/dist/{block.init-BVP3YZHQ.js.map → block.init-SSWOFFJR.js.map} +0 -0
  716. /package/dist/{block.mds.expressionrank-RKDDKY4J.js.map → block.mds.expressionrank-GJBLSUUM.js.map} +0 -0
  717. /package/dist/{block.mds.geneboxplot-3FZ3EZZ6.js.map → block.mds.geneboxplot-SAAU4OH5.js.map} +0 -0
  718. /package/dist/{block.mds.junction-MCOG37RA.js.map → block.mds.junction-IIZPRLPH.js.map} +0 -0
  719. /package/dist/{block.mds.svcnv-IEOR5IQZ.js.map → block.mds.svcnv-KOG7O25F.js.map} +0 -0
  720. /package/dist/{block.svg-3XHRHYCV.js.map → block.svg-5GJ744H3.js.map} +0 -0
  721. /package/dist/{block.tk.aicheck-TMDUGNZX.js.map → block.tk.aicheck-CTIJCHIC.js.map} +0 -0
  722. /package/dist/{block.tk.bam-73KW4QEJ.js.map → block.tk.bam-RTB7C6CW.js.map} +0 -0
  723. /package/dist/{block.tk.bigwig.ui-E5W6R7DQ.js.map → block.tk.bigwig.ui-OJVOCOWS.js.map} +0 -0
  724. /package/dist/{block.tk.hicstraw-BNNE6ZMW.js.map → block.tk.hicstraw-GUE6G2DA.js.map} +0 -0
  725. /package/dist/{block.tk.junction-DMPRZRNY.js.map → block.tk.junction-XILEKNJY.js.map} +0 -0
  726. /package/dist/{block.tk.junction.textmatrixui-XS2E7MQL.js.map → block.tk.junction.textmatrixui-OF6BW6OY.js.map} +0 -0
  727. /package/dist/{block.tk.ld-QD3XDLO4.js.map → block.tk.ld-QZVJUGZU.js.map} +0 -0
  728. /package/dist/{block.tk.menu-S6XI732E.js.map → block.tk.menu-B2NV6ZX3.js.map} +0 -0
  729. /package/dist/{block.tk.pgv-KH4TMR3A.js.map → block.tk.pgv-46OQHX7S.js.map} +0 -0
  730. /package/dist/{brainImaging-NK4JENN3.js.map → brainImaging-TWTGRSHJ.js.map} +0 -0
  731. /package/dist/{brainRegions-YUEMTKYH.js.map → brainRegions-YTTLJMBU.js.map} +0 -0
  732. /package/dist/{chunk-37ZEGLVY.js.map → chunk-255OQYGC.js.map} +0 -0
  733. /package/dist/{chunk-GZL6YFZJ.js.map → chunk-2B3CYHUF.js.map} +0 -0
  734. /package/dist/{chunk-CGSBIFFO.js.map → chunk-2BXMWQTJ.js.map} +0 -0
  735. /package/dist/{chunk-W2SBSEKT.js.map → chunk-2E3AJFOA.js.map} +0 -0
  736. /package/dist/{chunk-KUOXZIH4.js.map → chunk-2IAELUCN.js.map} +0 -0
  737. /package/dist/{chunk-NGBI4FST.js.map → chunk-2W6U53AG.js.map} +0 -0
  738. /package/dist/{chunk-FALP6GXG.js.map → chunk-3R6VYZYB.js.map} +0 -0
  739. /package/dist/{chunk-G6SP5IQT.js.map → chunk-3YAQY5NZ.js.map} +0 -0
  740. /package/dist/{chunk-5LY2ASQX.js.map → chunk-52WVSXYC.js.map} +0 -0
  741. /package/dist/{chunk-JEVDRC64.js.map → chunk-6CQ5ADIY.js.map} +0 -0
  742. /package/dist/{chunk-P7QDNXSH.js.map → chunk-6UHSGC6G.js.map} +0 -0
  743. /package/dist/{chunk-4WFXCUT4.js.map → chunk-7E37WMAX.js.map} +0 -0
  744. /package/dist/{chunk-LYDN734A.js.map → chunk-7EP77LOA.js.map} +0 -0
  745. /package/dist/{chunk-KDKJLITX.js.map → chunk-7LJ4LTD6.js.map} +0 -0
  746. /package/dist/{chunk-U2OB3S3M.js.map → chunk-7MEBMH77.js.map} +0 -0
  747. /package/dist/{chunk-LMONIWPI.js.map → chunk-7NVFEGCE.js.map} +0 -0
  748. /package/dist/{chunk-KBZAB2H2.js.map → chunk-A52K2E32.js.map} +0 -0
  749. /package/dist/{chunk-ADJBQCFM.js.map → chunk-A7UNLPQQ.js.map} +0 -0
  750. /package/dist/{chunk-UWVDD4C2.js.map → chunk-BH4KIOUQ.js.map} +0 -0
  751. /package/dist/{chunk-JCNZJKLK.js.map → chunk-CG2H6EFQ.js.map} +0 -0
  752. /package/dist/{chunk-XAHZYGKW.js.map → chunk-CNDQFKUB.js.map} +0 -0
  753. /package/dist/{chunk-ZKU6RST3.js.map → chunk-CVLHDO2O.js.map} +0 -0
  754. /package/dist/{chunk-Z6M77JDG.js.map → chunk-CVRTDBLZ.js.map} +0 -0
  755. /package/dist/{chunk-XKWLP433.js.map → chunk-DYX6B6RN.js.map} +0 -0
  756. /package/dist/{chunk-UA2ADBTO.js.map → chunk-FA2B6PKK.js.map} +0 -0
  757. /package/dist/{chunk-AAQDXVQT.js.map → chunk-FA6M7PSZ.js.map} +0 -0
  758. /package/dist/{chunk-H353EVLK.js.map → chunk-FF4J6QSF.js.map} +0 -0
  759. /package/dist/{chunk-L7FMBWWK.js.map → chunk-FYHUHKUC.js.map} +0 -0
  760. /package/dist/{chunk-THHYPA5K.js.map → chunk-G3CJDTG4.js.map} +0 -0
  761. /package/dist/{chunk-KZ54E2FU.js.map → chunk-ILAYJZBC.js.map} +0 -0
  762. /package/dist/{chunk-3RPX4ZVV.js.map → chunk-IT7EE7LY.js.map} +0 -0
  763. /package/dist/{chunk-FV2GLMSI.js.map → chunk-JG5CF5Q3.js.map} +0 -0
  764. /package/dist/{chunk-YWB2QHV2.js.map → chunk-L3ORR2TC.js.map} +0 -0
  765. /package/dist/{chunk-EKIWZUEO.js.map → chunk-L6BT6WZP.js.map} +0 -0
  766. /package/dist/{chunk-RI3GAHQE.js.map → chunk-LF2DWEKN.js.map} +0 -0
  767. /package/dist/{chunk-BWVJAFEQ.js.map → chunk-MJZ66SUG.js.map} +0 -0
  768. /package/dist/{chunk-IIN4CG67.js.map → chunk-N5T7TT5H.js.map} +0 -0
  769. /package/dist/{chunk-KNFJN6CM.js.map → chunk-NB4C446B.js.map} +0 -0
  770. /package/dist/{chunk-FRPYXYYQ.js.map → chunk-NJYYF2LF.js.map} +0 -0
  771. /package/dist/{chunk-TDBS3UFZ.js.map → chunk-NMVEXITA.js.map} +0 -0
  772. /package/dist/{chunk-USGUVW5Q.js.map → chunk-NS2H3C6X.js.map} +0 -0
  773. /package/dist/{chunk-JBUTLI3V.js.map → chunk-O7346S3P.js.map} +0 -0
  774. /package/dist/{chunk-FRD6LQF7.js.map → chunk-OV3W5AMN.js.map} +0 -0
  775. /package/dist/{chunk-QXRM5NMW.js.map → chunk-PQDYA3ZQ.js.map} +0 -0
  776. /package/dist/{chunk-HKR5R5YR.js.map → chunk-QFRR3ZRE.js.map} +0 -0
  777. /package/dist/{chunk-4LK5YFHF.js.map → chunk-QLKEA3WE.js.map} +0 -0
  778. /package/dist/{chunk-ECTOEM7X.js.map → chunk-QM7CXRSF.js.map} +0 -0
  779. /package/dist/{chunk-OYXRYWGU.js.map → chunk-QV6VZLS5.js.map} +0 -0
  780. /package/dist/{chunk-ISWFHYEZ.js.map → chunk-RTE32A22.js.map} +0 -0
  781. /package/dist/{chunk-ECCXTB5S.js.map → chunk-SB5DR4NL.js.map} +0 -0
  782. /package/dist/{chunk-4WFG5Y3A.js.map → chunk-SDUMZTIK.js.map} +0 -0
  783. /package/dist/{chunk-ZLWEUYPT.js.map → chunk-TYLCIGGN.js.map} +0 -0
  784. /package/dist/{chunk-MRZUZDRA.js.map → chunk-UHZDDPUU.js.map} +0 -0
  785. /package/dist/{chunk-Z7RFFJXU.js.map → chunk-UW6GRHZ4.js.map} +0 -0
  786. /package/dist/{chunk-LTY7WOAT.js.map → chunk-UYA5LCAR.js.map} +0 -0
  787. /package/dist/{chunk-CDCNBN6G.js.map → chunk-V7CB5D7A.js.map} +0 -0
  788. /package/dist/{chunk-ZG7EBTHK.js.map → chunk-VBUDRJJG.js.map} +0 -0
  789. /package/dist/{chunk-6V7ITU5F.js.map → chunk-VVWZ4BOI.js.map} +0 -0
  790. /package/dist/{chunk-ZJLJHQWM.js.map → chunk-W3K3N275.js.map} +0 -0
  791. /package/dist/{chunk-OKM4ACTA.js.map → chunk-WENNRY5E.js.map} +0 -0
  792. /package/dist/{chunk-Q7GK35TB.js.map → chunk-Z4R7TCTB.js.map} +0 -0
  793. /package/dist/{chunk-P5FHYGJK.js.map → chunk-ZFNEHOW4.js.map} +0 -0
  794. /package/dist/{chunk-HULTLO4D.js.map → chunk-ZLEGHQOO.js.map} +0 -0
  795. /package/dist/{cohort-X327AG3O.js.map → cohort-TLSGXKV5.js.map} +0 -0
  796. /package/dist/{cohortSunburst-GNWIVDNA.js.map → cohortSunburst-TNMXPHJW.js.map} +0 -0
  797. /package/dist/{condition-3M4L2HIM.js.map → condition-NN7YK7AI.js.map} +0 -0
  798. /package/dist/{controls-OKNHZJOU.js.map → controls-472G34VU.js.map} +0 -0
  799. /package/dist/{controls.config-FUKM5LEP.js.map → controls.config-2BQ7QYOB.js.map} +0 -0
  800. /package/dist/{correlation-PC4MXCFM.js.map → correlation-5UPYEHC6.js.map} +0 -0
  801. /package/dist/{customdata.inputui-HCRTX56R.js.map → customdata.inputui-EWYP4MRY.js.map} +0 -0
  802. /package/dist/{dataDownload-HJO7UW7S.js.map → dataDownload-X5UXBEK4.js.map} +0 -0
  803. /package/dist/{databrowser.ui-EY3H6B4S.js.map → databrowser.ui-PFHJKHIW.js.map} +0 -0
  804. /package/dist/{dictionary-L6CTMFY7.js.map → dictionary-M2MCNRN2.js.map} +0 -0
  805. /package/dist/{dnaMethylation-FEB5GGXK.js.map → dnaMethylation-A7AWG2P5.js.map} +0 -0
  806. /package/dist/{dnaMethylation.integration.spec-4DC6TJNZ.js.map → dnaMethylation.integration.spec-JWCMRFAM.js.map} +0 -0
  807. /package/dist/{dnaMethylation.unit.spec-REOHQOBC.js.map → dnaMethylation.unit.spec-PIVJBW7Z.js.map} +0 -0
  808. /package/dist/{dofetch-YFGOKCKV.js.map → dofetch-XID2XEJT.js.map} +0 -0
  809. /package/dist/{e2pca-QSAVTCPL.js.map → e2pca-VJRNE6BU.js.map} +0 -0
  810. /package/dist/{ep-LAFLKVSW.js.map → ep-BZE65IX2.js.map} +0 -0
  811. /package/dist/{expclust.gdc.spec-OM4J6WBL.js.map → expclust.gdc.spec-5BGBANUV.js.map} +0 -0
  812. /package/dist/{facet-WHTV2VIX.js.map → facet-RXUO4LRY.js.map} +0 -0
  813. /package/dist/{gb-DLXWWBB6.js.map → gb-NDRFDS5A.js.map} +0 -0
  814. /package/dist/{geneExpClustering-KB2MB2VM.js.map → geneExpClustering-ONJGTSGM.js.map} +0 -0
  815. /package/dist/{geneExpression-3D7PDZ2I.js.map → geneExpression-NXDXXKEA.js.map} +0 -0
  816. /package/dist/{geneExpression-3RSRGYGQ.js.map → geneExpression-PYI42HV6.js.map} +0 -0
  817. /package/dist/{geneExpression.unit.spec-EINAWLPR.js.map → geneExpression.unit.spec-PTFHHTP7.js.map} +0 -0
  818. /package/dist/{geneORA-J4KVSZT3.js.map → geneORA-SDR43UOL.js.map} +0 -0
  819. /package/dist/{geneRanking-HKLJ7CN6.js.map → geneRanking-QI43IRNV.js.map} +0 -0
  820. /package/dist/{geneVariant-3BRGRFPT.js.map → geneVariant-OT4V554H.js.map} +0 -0
  821. /package/dist/{geneVariant.integration.spec-3IBX4NNE.js.map → geneVariant.integration.spec-6OE4HKYB.js.map} +0 -0
  822. /package/dist/{genefusion.ui-OESQL7TW.js.map → genefusion.ui-IQDKCZPX.js.map} +0 -0
  823. /package/dist/{geneset-3BMV3KP4.js.map → geneset-TLZPZOQP.js.map} +0 -0
  824. /package/dist/{genomeBrowser.spec-I3WKAITC.js.map → genomeBrowser.spec-HIOTFKFK.js.map} +0 -0
  825. /package/dist/{grin2-5L2U32LY.js.map → grin2-G2PVFRKR.js.map} +0 -0
  826. /package/dist/{grin2-4BBCH3H5.js.map → grin2-RJQZRVFF.js.map} +0 -0
  827. /package/dist/{hierCluster-KM56NTN6.js.map → hierCluster-C6ICZSOB.js.map} +0 -0
  828. /package/dist/{hierCluster-XCJF5IQ6.js.map → hierCluster-MESFVAO7.js.map} +0 -0
  829. /package/dist/{hierCluster.config-E2EYOXX6.js.map → hierCluster.config-7HROWR2T.js.map} +0 -0
  830. /package/dist/{hierCluster.integration.spec-IIEJ2YEI.js.map → hierCluster.integration.spec-CJT22MJI.js.map} +0 -0
  831. /package/dist/{hierCluster.interactivity-AJFEJTGX.js.map → hierCluster.interactivity-MDX5QSEF.js.map} +0 -0
  832. /package/dist/{hierCluster.renderers-XKI344FM.js.map → hierCluster.renderers-SU5IYI33.js.map} +0 -0
  833. /package/dist/{imagePlot-3B3BXI6I.js.map → imagePlot-3Y5FNIJL.js.map} +0 -0
  834. /package/dist/{importPlot-JDVH7Q2Z.js.map → importPlot-WE5QSSFY.js.map} +0 -0
  835. /package/dist/{isoformExpression-UFHY5LB2.js.map → isoformExpression-TMLFOZVK.js.map} +0 -0
  836. /package/dist/{isoformExpression.unit.spec-U6GDCNQR.js.map → isoformExpression.unit.spec-MSVTQC3E.js.map} +0 -0
  837. /package/dist/{junction-W2STW5WW.js.map → junction-YKZV4LEL.js.map} +0 -0
  838. /package/dist/{launch.adhoc-KN7HFHJH.js.map → launch.adhoc-DS6UME2S.js.map} +0 -0
  839. /package/dist/{lollipop-EKIGAAK6.js.map → lollipop-ZKDAU3O5.js.map} +0 -0
  840. /package/dist/{maf-MK2MM7J4.js.map → maf-DKOORWGV.js.map} +0 -0
  841. /package/dist/{maftimeline-7RTMXWFA.js.map → maftimeline-EHJ2CWJJ.js.map} +0 -0
  842. /package/dist/{matrix-UM2EZODJ.js.map → matrix-7JDLGNU7.js.map} +0 -0
  843. /package/dist/{matrix-YBL4FZYJ.js.map → matrix-EB7YOLMN.js.map} +0 -0
  844. /package/dist/{matrix.cells-45ZFADK5.js.map → matrix.cells-A5E63KDN.js.map} +0 -0
  845. /package/dist/{matrix.config-QTBIRXKU.js.map → matrix.config-GSW2WJM4.js.map} +0 -0
  846. /package/dist/{matrix.data-WAMOLSKW.js.map → matrix.data-R4FW2PQH.js.map} +0 -0
  847. /package/dist/{matrix.groups-RXFXZABD.js.map → matrix.groups-3UH2KOIY.js.map} +0 -0
  848. /package/dist/{matrix.integration.spec-JZDZRVOK.js.map → matrix.integration.spec-R32TIABT.js.map} +0 -0
  849. /package/dist/{matrix.interactivity-P4VYGTB2.js.map → matrix.interactivity-RDPMBDVK.js.map} +0 -0
  850. /package/dist/{matrix.layout-WWPRXXHX.js.map → matrix.layout-FD275D3P.js.map} +0 -0
  851. /package/dist/{matrix.legend-4MCMVVKO.js.map → matrix.legend-SE7SQTNN.js.map} +0 -0
  852. /package/dist/{matrix.renderers-JQTUODDS.js.map → matrix.renderers-RK2BRCHZ.js.map} +0 -0
  853. /package/dist/{matrix.serieses-3IDRKSGO.js.map → matrix.serieses-BEZCQDLJ.js.map} +0 -0
  854. /package/dist/{matrix.sort-EAWOB56R.js.map → matrix.sort-KRNS4VPF.js.map} +0 -0
  855. /package/dist/{matrix.sort.unit.spec-FOWLULHA.js.map → matrix.sort.unit.spec-LZG3GOXM.js.map} +0 -0
  856. /package/dist/{matrix.sorterUi.unit.spec-U5CQDTMX.js.map → matrix.sorterUi.unit.spec-RR2KK4R5.js.map} +0 -0
  857. /package/dist/{matrix.unit.spec-VTLD4EOZ.js.map → matrix.unit.spec-3PK6LUNE.js.map} +0 -0
  858. /package/dist/{mavb-JIIXJHBK.js.map → mavb-CUPAESFH.js.map} +0 -0
  859. /package/dist/{mds.samplescatterplot-PTWA2V6E.js.map → mds.samplescatterplot-WGQ7A7UC.js.map} +0 -0
  860. /package/dist/{mds.survivalplot-XVZ66GP5.js.map → mds.survivalplot-ZEGSEJO2.js.map} +0 -0
  861. /package/dist/{multivalue-2H7QX7MG.js.map → multivalue-DKUQCROX.js.map} +0 -0
  862. /package/dist/{numericDictTermCluster-EHCDRT6J.js.map → numericDictTermCluster-IFIEM3E4.js.map} +0 -0
  863. /package/dist/{oncomatrix-RZLZUC32.js.map → oncomatrix-WSPJAWHW.js.map} +0 -0
  864. /package/dist/{oncomatrix.spec-Z5UQGTW2.js.map → oncomatrix.spec-LDWTZ7LO.js.map} +0 -0
  865. /package/dist/{plot.2dvaf-IRBZBJ6B.js.map → plot.2dvaf-N333YSMC.js.map} +0 -0
  866. /package/dist/{plot.app-I23IAZ3Z.js.map → plot.app-HU5RQS5I.js.map} +0 -0
  867. /package/dist/{plot.barplot-PYLRAZB7.js.map → plot.barplot-4T2UEIYX.js.map} +0 -0
  868. /package/dist/{plot.boxplot-VBWU7DUG.js.map → plot.boxplot-C4OXCRFB.js.map} +0 -0
  869. /package/dist/{plot.brainImaging-HDJMEMTK.js.map → plot.brainImaging-A6FEKFEA.js.map} +0 -0
  870. /package/dist/{plot.disco-5BVG3WMT.js.map → plot.disco-VDL7YKRX.js.map} +0 -0
  871. /package/dist/{plot.ssgq-S3BKXJMW.js.map → plot.ssgq-OII7PFPG.js.map} +0 -0
  872. /package/dist/{plot.vaf2cov-VD7DU2XR.js.map → plot.vaf2cov-RZ5JPWMC.js.map} +0 -0
  873. /package/dist/{polar2-PYLEVG7E.js.map → polar2-6KR2KX5D.js.map} +0 -0
  874. /package/dist/{profileForms-CI2YYD3Y.js.map → profileForms-YJDJIBSY.js.map} +0 -0
  875. /package/dist/{profilePlot-UCC4ZVHQ.js.map → profilePlot-U4U4AYMO.js.map} +0 -0
  876. /package/dist/{proteomeCohortCompare-2VUSLC6I.js.map → proteomeCohortCompare-QCXKLAWG.js.map} +0 -0
  877. /package/dist/{pseudbulk.unit.spec-VPZWNTIA.js.map → pseudbulk.unit.spec-3A2FWQZI.js.map} +0 -0
  878. /package/dist/{pseudobulk-RUXGZ7OY.js.map → pseudobulk-WB6NXFJ6.js.map} +0 -0
  879. /package/dist/{qualitative-3AVR4GRX.js.map → qualitative-CQUBCCGT.js.map} +0 -0
  880. /package/dist/{qualitative-5QNBKDOZ.js.map → qualitative-QQ3CWFVP.js.map} +0 -0
  881. /package/dist/{radar2-AOYMS54Y.js.map → radar2-FNC67FNX.js.map} +0 -0
  882. /package/dist/{radarFacility2-PP2MAXIP.js.map → radarFacility2-3X77B4WP.js.map} +0 -0
  883. /package/dist/{render-ASLVKYEX.js.map → render-G5NCZTMW.js.map} +0 -0
  884. /package/dist/{report-UVYKDMQC.js.map → report-CR645KQ4.js.map} +0 -0
  885. /package/dist/{sampleView-6UHR7FSR.js.map → sampleView-6PG2HJZL.js.map} +0 -0
  886. /package/dist/{samplelst-ABC2CCNN.js.map → samplelst-FCQ7YPPQ.js.map} +0 -0
  887. /package/dist/{samplematrix-36UCHZLC.js.map → samplematrix-GXMN5QTS.js.map} +0 -0
  888. /package/dist/{sc-XLSAM725.js.map → sc-4ZTSQOXC.js.map} +0 -0
  889. /package/dist/{scatter-ADOBAOW2.js.map → scatter-2PUQU22I.js.map} +0 -0
  890. /package/dist/{scatter-ZNVLI627.js.map → scatter-ZSZTA37T.js.map} +0 -0
  891. /package/dist/{selectGenomeWithTklst-DPDBDYTR.js.map → selectGenomeWithTklst-XHWBEM2G.js.map} +0 -0
  892. /package/dist/{singleCellCellType-STVPYZD4.js.map → singleCellCellType-NP7Y4N6Z.js.map} +0 -0
  893. /package/dist/{singleCellCellType.unit.spec-ZLY37AXL.js.map → singleCellCellType.unit.spec-5I3FECB4.js.map} +0 -0
  894. /package/dist/{singleCellGeneExpression-PCGLU35S.js.map → singleCellGeneExpression-7RWH633E.js.map} +0 -0
  895. /package/dist/{singleCellGeneExpression.unit.spec-PSLKK362.js.map → singleCellGeneExpression.unit.spec-2X2BDTNO.js.map} +0 -0
  896. /package/dist/{singleCellNumericValue-SR3SJEOB.js.map → singleCellNumericValue-I6V4ME6T.js.map} +0 -0
  897. /package/dist/{singleCellNumericValue.unit.spec-PXVXJ4HJ.js.map → singleCellNumericValue.unit.spec-4HKAJXB3.js.map} +0 -0
  898. /package/dist/{singleCellPlot-JXB7M6OH.js.map → singleCellPlot-QRFR3AJH.js.map} +0 -0
  899. /package/dist/{singlecell-PH55NFRX.js.map → singlecell-AQEAB445.js.map} +0 -0
  900. /package/dist/{singlecell-EDSX56QO.js.map → singlecell-DX4EXNUV.js.map} +0 -0
  901. /package/dist/{snp-3VEYBTAQ.js.map → snp-2URSYPBL.js.map} +0 -0
  902. /package/dist/{snp.unit.spec-V7OB44US.js.map → snp.unit.spec-ZV2RCDT4.js.map} +0 -0
  903. /package/dist/{snplocus-HX67RBT5.js.map → snplocus-BB4I2QIP.js.map} +0 -0
  904. /package/dist/{snplst-H5YXCY33.js.map → snplst-A5S7CQEM.js.map} +0 -0
  905. /package/dist/{spliceevent.a53ss.diagram-DBDEEHSK.js.map → spliceevent.a53ss.diagram-6C4OQOVF.js.map} +0 -0
  906. /package/dist/{spliceevent.exonskip.diagram-EYEL6BY6.js.map → spliceevent.exonskip.diagram-FKSR3JEL.js.map} +0 -0
  907. /package/dist/{spliceevent.noeventdiagram-64OEXK7U.js.map → spliceevent.noeventdiagram-G3JQUZKK.js.map} +0 -0
  908. /package/dist/{ssGSEA-3YWQH6KM.js.map → ssGSEA-KLMOSI53.js.map} +0 -0
  909. /package/dist/{ssGSEA.unit.spec-23V2IXP5.js.map → ssGSEA.unit.spec-HBALWLVB.js.map} +0 -0
  910. /package/dist/{stattable-GPSBCNYC.js.map → stattable-ZCMPIC3I.js.map} +0 -0
  911. /package/dist/{studyCatalog-W5PATRNY.js.map → studyCatalog-UZ4BSYY6.js.map} +0 -0
  912. /package/dist/{summarizeCnvGeneexp-YGI23QH5.js.map → summarizeCnvGeneexp-Z43GYKZB.js.map} +0 -0
  913. /package/dist/{summarizeGeneexpSurvival-KQ6OLWYR.js.map → summarizeGeneexpSurvival-4OHRMCFV.js.map} +0 -0
  914. /package/dist/{summarizeMutationCnv-XDHBNEPU.js.map → summarizeMutationCnv-EZXMLADC.js.map} +0 -0
  915. /package/dist/{summarizeMutationDiagnosis-VKIJRJ2Q.js.map → summarizeMutationDiagnosis-RPQP4TM5.js.map} +0 -0
  916. /package/dist/{summarizeMutationSurvival-57YKJGLE.js.map → summarizeMutationSurvival-LX4TRGJZ.js.map} +0 -0
  917. /package/dist/{summary-4WQOVIUF.js.map → summary-FZQVK5KR.js.map} +0 -0
  918. /package/dist/{summary.integration.spec-FRNWBU7F.js.map → summary.integration.spec-46T65LR5.js.map} +0 -0
  919. /package/dist/{summaryInput-X7DS2YA7.js.map → summaryInput-BHU7G5FC.js.map} +0 -0
  920. /package/dist/{sunburst-MSGTXYMM.js.map → sunburst-A5NS3KJQ.js.map} +0 -0
  921. /package/dist/{sunburst-3OEAQA3O.js.map → sunburst-R5X2C7FK.js.map} +0 -0
  922. /package/dist/{survival-5KC5CNZU.js.map → survival-MKW5J5ZH.js.map} +0 -0
  923. /package/dist/{survival-QXDS6N46.js.map → survival-N2NKMVOV.js.map} +0 -0
  924. /package/dist/{survival.integration.spec-PKENHLTZ.js.map → survival.integration.spec-K5FMOOTF.js.map} +0 -0
  925. /package/dist/{svgraph-VJLB7BBN.js.map → svgraph-3WRCJA5D.js.map} +0 -0
  926. /package/dist/{swimmer-R3DN7N36.js.map → swimmer-XV5KVWEM.js.map} +0 -0
  927. /package/dist/{table-YF5VORU6.js.map → table-XUGFZSGV.js.map} +0 -0
  928. /package/dist/{termCollection-KSHVOPS5.js.map → termCollection-23ZRHZHF.js.map} +0 -0
  929. /package/dist/{termCollection-3KGLZFDW.js.map → termCollection-NWTAUSSW.js.map} +0 -0
  930. /package/dist/{termCollection.unit.spec-HTBDG5PL.js.map → termCollection.unit.spec-WE3JMSUI.js.map} +0 -0
  931. /package/dist/{termCollectionFractionSelection-MK4NKWUX.js.map → termCollectionFractionSelection-5FLFLMIY.js.map} +0 -0
  932. /package/dist/{termCollectionFractionSelection.unit.spec-AMF32FDN.js.map → termCollectionFractionSelection.unit.spec-CCFGGXAA.js.map} +0 -0
  933. /package/dist/{tk-Z54DOECH.js.map → tk-F3TSB4IB.js.map} +0 -0
  934. /package/dist/{tp.ui-M4TZVT53.js.map → tp.ui-4QDX3FGM.js.map} +0 -0
  935. /package/dist/{tvs.categorical-HY3BWCZR.js.map → tvs.categorical-24OT3XZI.js.map} +0 -0
  936. /package/dist/{tvs.condition-Y36TRIX4.js.map → tvs.condition-X4SXCVGN.js.map} +0 -0
  937. /package/dist/{tvs.dt-XKVJZP7Y.js.map → tvs.dt-FRBJRSWI.js.map} +0 -0
  938. /package/dist/{tvs.dtcnv.categorical-OMRZR4Y7.js.map → tvs.dtcnv.categorical-4RRSO735.js.map} +0 -0
  939. /package/dist/{tvs.dtcnv.continuous-AGYOBI5K.js.map → tvs.dtcnv.continuous-HXY2PBUA.js.map} +0 -0
  940. /package/dist/{tvs.dtfusion-2JX5Y2IH.js.map → tvs.dtfusion-67LXBQA4.js.map} +0 -0
  941. /package/dist/{tvs.dtitd-SDSLBBWC.js.map → tvs.dtitd-MCJZCNV2.js.map} +0 -0
  942. /package/dist/{tvs.dtsnvindel-LI7K464K.js.map → tvs.dtsnvindel-K5YIIBQJ.js.map} +0 -0
  943. /package/dist/{tvs.dtsv-VRCLX7QY.js.map → tvs.dtsv-RP7FUB2N.js.map} +0 -0
  944. /package/dist/{tvs.multivalue-4OTY6J2S.js.map → tvs.multivalue-CROMWUCP.js.map} +0 -0
  945. /package/dist/{tvs.numeric-CDATYOR2.js.map → tvs.numeric-IYYYV6ZJ.js.map} +0 -0
  946. /package/dist/{tvs.samplelst-76JOJG2M.js.map → tvs.samplelst-5DXKRFYM.js.map} +0 -0
  947. /package/dist/{tvs.survival-WTFJOKIZ.js.map → tvs.survival-W5RXODBT.js.map} +0 -0
  948. /package/dist/{tvs.termCollection-QQXAS7PE.js.map → tvs.termCollection-OSJYIWDX.js.map} +0 -0
  949. /package/dist/{vocabulary-6ACAEFTL.js.map → vocabulary-HTRYJUD7.js.map} +0 -0
@@ -0,0 +1,2745 @@
1
+ import {
2
+ downloadManhattanSvg,
3
+ manhattanLayoutDefaults,
4
+ plotManhattan
5
+ } from "./chunk-LF2DWEKN.js";
6
+ import {
7
+ VolcanoModel,
8
+ getGroupColors
9
+ } from "./chunk-255OQYGC.js";
10
+ import {
11
+ CCRE_TRACK_NAME
12
+ } from "./chunk-DYX6B6RN.js";
13
+ import {
14
+ BACKGROUND_CORRECTION_TITLE,
15
+ DATermTypes,
16
+ DataPointInteractions,
17
+ GeneSetEditUI,
18
+ MultiTermWrapperEditUI,
19
+ PlotBase,
20
+ SCAN_Y_AXIS_OPTIONS,
21
+ axisstyle,
22
+ controlsInit,
23
+ downloadTable,
24
+ drawHoverShapes,
25
+ enabledTermTypes,
26
+ fileDateStamp,
27
+ fillTermWrapper,
28
+ getCombinedTermFilter,
29
+ getDNAMethTermName,
30
+ getDNAMethUnit,
31
+ getDefaultVolcanoSettings,
32
+ getGEunit,
33
+ getGroupForRegion,
34
+ getSampleNum,
35
+ getSpliceMethodOptions,
36
+ onDeltaBetaAxis,
37
+ renderTable,
38
+ sayerror,
39
+ startElapsedTimer,
40
+ table2col,
41
+ to_svg,
42
+ validateVolcanoSettings,
43
+ withOthersGroup
44
+ } from "./chunk-CXCAQOFB.js";
45
+ import "./chunk-HJ6L54YS.js";
46
+ import "./chunk-ILAYJZBC.js";
47
+ import {
48
+ Menu
49
+ } from "./chunk-CNFTQSNE.js";
50
+ import "./chunk-DOC3HBOV.js";
51
+ import "./chunk-TVJOSRCH.js";
52
+ import "./chunk-3CIL7KH7.js";
53
+ import "./chunk-T4XPCSLP.js";
54
+ import {
55
+ HYPER_COLOR,
56
+ HYPO_COLOR,
57
+ dofetch3
58
+ } from "./chunk-VVWZ4BOI.js";
59
+ import {
60
+ uiLabel
61
+ } from "./chunk-W5J3LTYS.js";
62
+ import "./chunk-2IAELUCN.js";
63
+ import "./chunk-CFYWQJ7F.js";
64
+ import {
65
+ DMR_SCAN_ELEMENT_TYPE,
66
+ DNA_METHYLATION,
67
+ GENE_EXPRESSION,
68
+ JUNCTION,
69
+ PROTEOME_DAP,
70
+ SINGLECELL_CELLTYPE,
71
+ axisBottom,
72
+ axisLeft,
73
+ bplen
74
+ } from "./chunk-2N345NXD.js";
75
+ import {
76
+ copyMerge,
77
+ getCompInit
78
+ } from "./chunk-HBNB5TRH.js";
79
+ import "./chunk-PF4DSFDR.js";
80
+ import {
81
+ linear
82
+ } from "./chunk-4OLM3KSB.js";
83
+ import "./chunk-PWYMHUXY.js";
84
+ import {
85
+ roundValueAuto
86
+ } from "./chunk-TLT4YIG3.js";
87
+ import "./chunk-5R63Q5KH.js";
88
+ import {
89
+ selectAll_default,
90
+ select_default
91
+ } from "./chunk-I6Y4O3RR.js";
92
+ import {
93
+ rgb
94
+ } from "./chunk-Q5RDQNIT.js";
95
+ import "./chunk-HS5PO5ZQ.js";
96
+
97
+ // plots/volcano/promoterLabel.ts
98
+ function elementNoun(elementType) {
99
+ switch (elementType) {
100
+ case void 0:
101
+ case "":
102
+ case "promoter":
103
+ return { one: "Promoter", many: "promoters" };
104
+ /* Two different promoter DEFINITIONS, deliberately given distinct nouns. 'promoter' is
105
+ the TSS -1500/+500 window (Bibikova 2011 / Sandoval 2011 -- the 450K array's
106
+ TSS1500+TSS200 categories); 'promoter_pls' is the ENCODE cCRE promoter-like element,
107
+ ~349 bp, i.e. the CpG-island core with the shores removed. They cover different numbers
108
+ of genes and their hit counts are NOT comparable, so the UI must never call both
109
+ "promoters". */
110
+ case "promoter_pls":
111
+ return { one: "cCRE promoter", many: "cCRE promoters" };
112
+ case "eqtm_block":
113
+ return { one: "eQTM block", many: "eQTM blocks" };
114
+ case "enhancer":
115
+ return { one: "Enhancer", many: "enhancers" };
116
+ /* Distal and proximal are separate ENCODE classes and separate hypotheses -- dELS are
117
+ the intronic/intergenic enhancers where myeloma hypermethylation concentrates, pELS sit
118
+ within 2 kb of a TSS and behave more promoter-like. There are 4.5x as many dELS, so their
119
+ hit counts are not comparable to each other either. Naming them apart keeps a reader from
120
+ reading two runs as the same analysis. */
121
+ case "enhancer_distal":
122
+ return { one: "Distal enhancer", many: "distal enhancers" };
123
+ case "enhancer_proximal":
124
+ return { one: "Proximal enhancer", many: "proximal enhancers" };
125
+ // de novo regions called by the genome scan, not an annotated class at all
126
+ case DMR_SCAN_ELEMENT_TYPE:
127
+ return { one: "DMR", many: "DMRs" };
128
+ default:
129
+ return { one: "Element", many: "elements" };
130
+ }
131
+ }
132
+ function formatPromoterLabel(d) {
133
+ if (!d) return "";
134
+ const id = d.promoter_id || "";
135
+ const { chr, start, stop } = d;
136
+ if (!chr || !Number.isFinite(start) || !Number.isFinite(stop)) return id;
137
+ const region = `${chr}:${start}-${stop}`;
138
+ const idx = id.match(/\.(p\d+)_[^_]*:\d+-\d+$/);
139
+ return idx ? `${idx[1]} \xB7 ${region}` : region;
140
+ }
141
+
142
+ // plots/volcano/viewModel/VolcanoViewModel.ts
143
+ function shortenGroupName(name) {
144
+ if (name.length >= 25) return name.substring(0, 20) + "...";
145
+ return name;
146
+ }
147
+ var DEPTH_RATIO_WARN = 1.5;
148
+ var VolcanoViewModel = class {
149
+ constructor(config, response, settings) {
150
+ this.numSignificant = 0;
151
+ this.numNonSignificant = 0;
152
+ /** The significant count split by direction, from the server so it reflects every
153
+ * significant row rather than the maxInteractiveDots-capped `dots`. */
154
+ this.numSignificantUp = 0;
155
+ this.numSignificantDown = 0;
156
+ this.minLogFoldChange = 0;
157
+ this.maxLogFoldChange = 0;
158
+ //Used for the y axis domain
159
+ this.minLogPValue = 0;
160
+ this.maxLogPValue = 0;
161
+ //Unpadded extents — used for the visible axis labels/ticks (only span real data)
162
+ this.minLogFoldChangeAxis = 0;
163
+ this.maxLogFoldChangeAxis = 0;
164
+ this.minLogPValueAxis = 0;
165
+ this.maxLogPValueAxis = 0;
166
+ //Dot radius in pixels (from server) — overlay rings size to match the PNG
167
+ this.dotRadiusPx = 2;
168
+ //Used in place of 0 p values that cannot be log transformed
169
+ this.minNonZeroPValue = 1e-9;
170
+ this.offset = 10;
171
+ this.bottomPad = 60;
172
+ this.horizPad = 70;
173
+ this.topPad = 40;
174
+ this.config = config;
175
+ this.response = response;
176
+ this.plotX = this.horizPad + this.offset * 2;
177
+ this.dataRows = response.data.dots;
178
+ const { caseColor, controlColor } = getGroupColors(this.config);
179
+ const barplot = { colorNegative: controlColor, colorPositive: caseColor };
180
+ this.termType = config.termType;
181
+ this.scan = response.scan;
182
+ this.singlePValue = config.termType == DATermTypes.PROTEOME_DAP || !!this.scan;
183
+ this.pValueLabel = this.setPValueLabel(settings);
184
+ this.pValueTable = {
185
+ columns: [
186
+ // a scan's effect size is delta-beta; the fold change is a difference of logits
187
+ { label: this.scan ? "\u0394\u03B2" : "log\u2082(fold-change)", barplot, sortable: true },
188
+ // DAP files carry a single FDR (adjusted p-value) and a scan a single p; other term
189
+ // types report both a raw and an adjusted p-value.
190
+ ...this.singlePValue ? [{ label: this.pValueLabel, sortable: true }] : [
191
+ { label: "Original p-value", sortable: true },
192
+ { label: "Adjusted p-value", sortable: true }
193
+ ]
194
+ ],
195
+ /** Filled in setPointData(), one row per threshold-passing dot. Populated even when the
196
+ * table is hidden — the download reads it. */
197
+ rows: [],
198
+ rowKeys: /* @__PURE__ */ new Map(),
199
+ height: settings.height + this.topPad
200
+ };
201
+ this.settings = settings;
202
+ this.dataType = this.setDataType();
203
+ this.setMinMaxValues();
204
+ const plotDim = this.setPlotDimensions();
205
+ this.setPTableColumns();
206
+ const pointData = this.setPointData(plotDim, controlColor, caseColor);
207
+ const foldChangeIdx = this.pValueTable.columns.findIndex((c) => c.barplot);
208
+ this.pValueTable.rows.sort((a, b) => b[foldChangeIdx].value - a[foldChangeIdx].value);
209
+ this.viewData = {
210
+ images: response.images || [],
211
+ termInfo: this.setTermInfo(plotDim),
212
+ plotDim,
213
+ pointData,
214
+ pValueTableData: this.pValueTable,
215
+ statsData: this.setStatsData(),
216
+ scan: this.scan,
217
+ pValueLabel: this.pValueLabel,
218
+ singlePValue: this.singlePValue,
219
+ numSignificantUp: this.numSignificantUp,
220
+ numSignificantDown: this.numSignificantDown,
221
+ xOffset: this.response.data.xOffset ?? 0,
222
+ centered: !!this.response.data.centered,
223
+ provenance: this.setProvenance(),
224
+ userActions: this.setUserActions(),
225
+ deltaBetaAxisLabel: this.setDeltaBetaAxisLabel(),
226
+ deltaPsiAxisLabel: this.setDeltaPsiAxisLabel(),
227
+ volcanoPng: response.data.volcanoPng,
228
+ plotExtent: response.data.plotExtent
229
+ };
230
+ }
231
+ /* The delta-beta axis used to read "Δβ (case − control)". Those are positional roles, not
232
+ names, so the plot showed the size of an effect but not its direction -- you had to already
233
+ know which group landed in which slot, or open a downloaded file and read the provenance line.
234
+ Name the groups instead, in subtraction order (case first), so the axis states what it plots.
235
+
236
+ Returns undefined when the group names are not available; the view falls back to the old
237
+ wording rather than rendering a broken label. */
238
+ setDeltaBetaAxisLabel() {
239
+ const groups = this.config?.samplelst?.groups;
240
+ const control = groups?.[0]?.name;
241
+ const cases = groups?.[1]?.name;
242
+ if (!control || !cases) return void 0;
243
+ const centered = this.response.data.centered ? " \u2212 median" : "";
244
+ return `\u0394\u03B2${centered} (${shortenGroupName(cases)} \u2212 ${shortenGroupName(control)})`;
245
+ }
246
+ // same as setDeltaBetaAxisLabel, for ΔPSI
247
+ setDeltaPsiAxisLabel() {
248
+ const groups = this.config?.samplelst?.groups;
249
+ const control = groups?.[0]?.name;
250
+ const cases = groups?.[1]?.name;
251
+ if (!control || !cases) return void 0;
252
+ return `\u0394PSI (${shortenGroupName(cases)} \u2212 ${shortenGroupName(control)})`;
253
+ }
254
+ /** What the y axis and the p column are called. Named here once so the axis, the table header,
255
+ * the hover rows and the multi-hit table cannot disagree. */
256
+ setPValueLabel(settings) {
257
+ if (this.termType == DATermTypes.PROTEOME_DAP) return "FDR";
258
+ if (this.scan)
259
+ return this.scan.backgroundCorrection ? "p vs matched background" : (
260
+ // a scan from before the choice existed plotted the smoothed FDR
261
+ SCAN_Y_AXIS_OPTIONS.find((o) => o.value == (this.scan.yAxis ?? "min_smoothed_fdr")).label
262
+ );
263
+ return `${settings.pValueType} p-value`;
264
+ }
265
+ setDataType() {
266
+ if (this.termType == DATermTypes.GENE_EXPRESSION) return "genes";
267
+ if (this.termType == DATermTypes.DNA_METHYLATION) return elementNoun(this.settings?.elementType).many;
268
+ if (this.termType == DATermTypes.JUNCTION) return "clusters";
269
+ if (this.termType == DATermTypes.SINGLECELL_CELLTYPE) return "genes";
270
+ if (this.termType == DATermTypes.PROTEOME_DAP) return "proteins";
271
+ if (this.termType == DATermTypes.SINGLECELL_GENE_EXPRESSION) return "cells";
272
+ throw new Error(`Unknown termType: ${this.termType}`);
273
+ }
274
+ setMinMaxValues() {
275
+ const ext = this.response.data.plotExtent;
276
+ this.minLogFoldChange = ext.xMin;
277
+ this.maxLogFoldChange = ext.xMax;
278
+ this.minLogPValue = ext.yMin;
279
+ this.maxLogPValue = ext.yMax;
280
+ this.minLogFoldChangeAxis = ext.xMinUnpadded;
281
+ this.maxLogFoldChangeAxis = ext.xMaxUnpadded;
282
+ this.minLogPValueAxis = ext.yMinUnpadded;
283
+ this.maxLogPValueAxis = ext.yMaxUnpadded;
284
+ this.dotRadiusPx = ext.dotRadiusPx;
285
+ if (ext.minNonZeroPValue > 0) this.minNonZeroPValue = ext.minNonZeroPValue;
286
+ }
287
+ setPlotDimensions() {
288
+ const ext = this.response.data.plotExtent;
289
+ const plotW = ext.pixelWidth;
290
+ const plotH = ext.pixelHeight;
291
+ const xPlotScale = linear().domain([this.minLogFoldChange, this.maxLogFoldChange]).range([0, plotW]);
292
+ const yPlotScale = linear().domain([this.minLogPValue, this.maxLogPValue]).range([plotH, 0]);
293
+ const xScale = linear().domain([this.minLogFoldChangeAxis, this.maxLogFoldChangeAxis]).range([xPlotScale(this.minLogFoldChangeAxis), xPlotScale(this.maxLogFoldChangeAxis)]);
294
+ const yScale = linear().domain([this.minLogPValueAxis, this.maxLogPValueAxis]).range([yPlotScale(this.minLogPValueAxis), yPlotScale(this.maxLogPValueAxis)]);
295
+ return {
296
+ svg: {
297
+ //20 is for the term info above the plot
298
+ height: plotH + this.topPad + this.bottomPad * 2 + this.offset * 3,
299
+ width: plotW + this.horizPad * 2
300
+ },
301
+ top: {
302
+ x: this.plotX,
303
+ y: 5
304
+ },
305
+ xAxisLabel: {
306
+ x: this.horizPad + plotW / 2 + this.offset,
307
+ y: this.topPad + plotH + this.bottomPad + this.offset
308
+ },
309
+ xScale: {
310
+ scale: xScale,
311
+ x: this.plotX,
312
+ y: plotH + this.topPad + this.offset * 2
313
+ },
314
+ yAxisLabel: {
315
+ text: `-log10(${this.pValueLabel})`,
316
+ x: this.horizPad / 3,
317
+ y: this.topPad + plotH / 2
318
+ },
319
+ yScale: {
320
+ scale: yScale,
321
+ x: this.horizPad,
322
+ y: this.topPad
323
+ },
324
+ plot: {
325
+ height: plotH,
326
+ width: plotW,
327
+ x: this.plotX,
328
+ y: this.topPad
329
+ },
330
+ logFoldChangeLine: {
331
+ x: xPlotScale(0) + this.plotX,
332
+ y1: this.topPad,
333
+ y2: plotH + this.offset * 4
334
+ },
335
+ xPlotScale,
336
+ yPlotScale
337
+ };
338
+ }
339
+ setTermInfo(plotDim) {
340
+ if (!enabledTermTypes.has(this.termType)) return;
341
+ if (this.termType == DATermTypes.PROTEOME_DAP) {
342
+ return {
343
+ y: plotDim.top.y + 10,
344
+ first: {
345
+ label: shortenGroupName(`Control (${this.response.sample_size1})`),
346
+ x: 0
347
+ },
348
+ second: {
349
+ label: shortenGroupName(`Case (${this.response.sample_size2})`),
350
+ x: this.settings.width
351
+ }
352
+ };
353
+ }
354
+ if (this.termType == DATermTypes.SINGLECELL_CELLTYPE) {
355
+ const groupLabel = `${this.config.termId} ${this.config.categoryName}`;
356
+ return {
357
+ y: plotDim.top.y + 10,
358
+ first: {
359
+ label: shortenGroupName(`Not in ${groupLabel}`),
360
+ x: 0
361
+ },
362
+ second: {
363
+ label: shortenGroupName(groupLabel),
364
+ x: this.settings.width
365
+ }
366
+ };
367
+ }
368
+ return {
369
+ //Set slightly above the plot
370
+ y: plotDim.top.y + 10,
371
+ first: {
372
+ // color: controlColor || this.settings.defaultSignColor,
373
+ label: shortenGroupName(`${this.config.samplelst.groups[0].name} (${this.response.sample_size1})`),
374
+ x: 0
375
+ // rectX: this.settings.width/2 - 10,
376
+ },
377
+ second: {
378
+ // color: caseColor || this.settings.defaultSignColor,
379
+ label: shortenGroupName(`${this.config.samplelst.groups[1].name} (${this.response.sample_size2})`),
380
+ x: this.settings.width
381
+ // rectX: this.settings.width/2 + 10,
382
+ }
383
+ };
384
+ }
385
+ setPointData(_plotDim, controlColor, caseColor) {
386
+ const radius = this.dotRadiusPx;
387
+ this.pValueTable.rows = [];
388
+ this.pValueTable.rowKeys.clear();
389
+ const dataCopy = structuredClone(this.dataRows);
390
+ for (const d of dataCopy) {
391
+ const highlightKey = this.termType === DATermTypes.DNA_METHYLATION ? d.promoter_id : this.termType === DATermTypes.JUNCTION ? d.cluster_id : d.gene_name;
392
+ d.highlighted = this.config?.highlightedData?.includes(highlightKey);
393
+ d.significant = true;
394
+ this.getGenesColor(d, d.significant, controlColor, caseColor);
395
+ if (d.significant) {
396
+ this.numSignificant++;
397
+ const row = this.singlePValue ? [
398
+ { value: roundValueAuto(this.scan ? d.delta_beta : d.fold_change) },
399
+ { value: roundValueAuto(d.original_p_value) }
400
+ ] : [
401
+ { value: roundValueAuto(d.fold_change) },
402
+ { value: roundValueAuto(d.original_p_value) },
403
+ { value: d.adjusted_p_value != void 0 ? roundValueAuto(d.adjusted_p_value) : "" }
404
+ ];
405
+ if (this.termType == DATermTypes.DNA_METHYLATION) {
406
+ if (this.scan) {
407
+ row.splice(
408
+ 1,
409
+ 0,
410
+ // fold_change carries the peak per-CpG delta-beta on a scan row
411
+ { value: roundValueAuto(d.fold_change) },
412
+ { value: d.no_cpgs },
413
+ { value: d.stop - d.start },
414
+ ...this.scan.backgroundCorrection ? [{ value: d.excess == null ? "" : roundValueAuto(d.excess) }] : []
415
+ );
416
+ } else {
417
+ row.splice(
418
+ 1,
419
+ 0,
420
+ { value: roundValueAuto(d.delta_beta) },
421
+ { value: roundValueAuto(d.mean_beta_control) },
422
+ { value: roundValueAuto(d.mean_beta_case) }
423
+ );
424
+ }
425
+ row.splice(0, 0, { value: formatPromoterLabel(d) }, { value: d.gene_name || "" });
426
+ } else if (this.termType == DATermTypes.JUNCTION) {
427
+ row[0] = { value: roundValueAuto(d.delta_psi) };
428
+ row.splice(
429
+ 1,
430
+ 0,
431
+ { value: roundValueAuto(d.psi_control) },
432
+ { value: roundValueAuto(d.psi_case) },
433
+ { value: d.n_junc }
434
+ );
435
+ row.splice(0, 0, { value: d.cluster_id }, { value: d.genes || "" });
436
+ } else if (this.termType == DATermTypes.PROTEOME_DAP) {
437
+ row.splice(0, 0, { value: d.gene_name || "" }, { value: d.gene || "" });
438
+ } else {
439
+ row.splice(0, 0, { value: d.gene_name || "" });
440
+ }
441
+ this.pValueTable.rows.push(row);
442
+ this.pValueTable.rowKeys.set(row, highlightKey);
443
+ } else {
444
+ this.numNonSignificant++;
445
+ }
446
+ d.x = d.pixel_x + this.plotX;
447
+ d.y = d.pixel_y + this.topPad;
448
+ d.radius = radius;
449
+ }
450
+ this.numSignificant = this.response.data.totalSignificantRows;
451
+ this.numNonSignificant = Math.max(0, this.response.data.totalRows - this.numSignificant);
452
+ this.numSignificantUp = this.response.data.totalSignificantUp ?? 0;
453
+ this.numSignificantDown = this.response.data.totalSignificantDown ?? 0;
454
+ dataCopy.sort((a, b) => a.highlighted - b.highlighted);
455
+ return dataCopy;
456
+ }
457
+ getGenesColor(d, significant, controlColor, caseColor) {
458
+ if (!d.gene_name && this.termType != DATermTypes.DNA_METHYLATION && this.termType != DATermTypes.JUNCTION)
459
+ throw new Error(`Missing gene_name in data: ${JSON.stringify(d)}`);
460
+ if (significant) {
461
+ const x = this.termType == DATermTypes.JUNCTION ? d.delta_psi : onDeltaBetaAxis(this.termType, this.settings) ? d.delta_beta - (this.response.data.xOffset ?? 0) : d.fold_change;
462
+ if (controlColor && caseColor) d.color = x > 0 ? caseColor : controlColor;
463
+ else d.color = this.settings.defaultSignColor;
464
+ } else d.color = this.settings.defaultNonSignColor;
465
+ }
466
+ /** One line describing what produced this result: which groups, how many samples actually
467
+ * entered the model, and every setting that changes the numbers.
468
+ *
469
+ * This exists because an exported table is the artifact that outlives the session. Re-running
470
+ * a contrast months later and getting different counts is impossible to diagnose when the
471
+ * original run's group sizes and options were never written down anywhere -- the file, the
472
+ * screenshot and the memory of it all look identical regardless of how it was configured.
473
+ * Only settings that can change the result are listed; cosmetic ones are deliberately left
474
+ * out so the line stays readable and a difference in it always means a real difference. */
475
+ setProvenance() {
476
+ const s = this.settings;
477
+ const parts = [];
478
+ if (this.config.samplelst?.groups?.length == 2) {
479
+ const [g1, g2] = this.config.samplelst.groups;
480
+ parts.push(`group1 (control) "${g1.name}" n=${this.response.sample_size1}`);
481
+ parts.push(`group2 (case) "${g2.name}" n=${this.response.sample_size2}`);
482
+ }
483
+ const conf = this.config.confounderTws?.map((t) => t?.term?.name || t?.term?.id).filter(Boolean);
484
+ parts.push(`confounders: ${conf?.length ? conf.join(" + ") : "none"}`);
485
+ if (this.termType == DATermTypes.DNA_METHYLATION) {
486
+ parts.push(`element class: ${s.elementType || "promoter"}`);
487
+ parts.push(`x axis: ${onDeltaBetaAxis(this.termType, s) ? "delta-beta" : "log2(fold-change)"}`);
488
+ const off = this.response.data.xOffset ?? 0;
489
+ if (this.response.data.centered)
490
+ parts.push(`centered on median delta-beta ${off > 0 ? "+" : ""}${roundValueAuto(off)}`);
491
+ if (this.scan) {
492
+ parts.push(`scan: ${s.scanChromosome || "whole genome"}`);
493
+ parts.push(`background correction: ${s.backgroundCorrection ? "yes" : "no"}`);
494
+ parts.push(`min CpGs per DMR: ${s.minCpgs}`);
495
+ } else parts.push(`min samples per group: ${s.minSamplesPerGroup}`);
496
+ parts.push(`exclude sex chromosomes: ${s.excludeSexChr ? "yes" : "no"}`);
497
+ } else if (this.termType == DATermTypes.GENE_EXPRESSION) {
498
+ parts.push(`method: ${s.method}`);
499
+ } else if (this.termType == DATermTypes.JUNCTION) {
500
+ parts.push(`method: ${this.response.method || s.method}`);
501
+ parts.push(`min samples per intron: ${s.minSamplesPerIntron}; min samples per group: ${s.minSamplesPerGroup}`);
502
+ parts.push(`min counts per cluster: ${s.minCountsPerCluster}`);
503
+ }
504
+ const onDeltaBeta = onDeltaBetaAxis(this.termType, s);
505
+ const effect = this.termType == DATermTypes.JUNCTION ? `|delta-PSI| > ${s.deltaPsiCutoff}` : onDeltaBeta ? `|delta-beta| > ${s.deltaBetaCutoff}` : `|log2(fold-change)| > ${s.foldChangeCutoff}`;
506
+ parts.push(`significance: ${s.pValueType} p < ${roundValueAuto(Math.pow(10, -s.pValue))}, ${effect}`);
507
+ return parts.join("; ");
508
+ }
509
+ setStatsData() {
510
+ const tableRows = [
511
+ {
512
+ label: `Percentage of significant ${this.dataType}`,
513
+ value: roundValueAuto(this.numSignificant * 100 / (this.numSignificant + this.numNonSignificant))
514
+ },
515
+ {
516
+ label: `Number of significant ${this.dataType}`,
517
+ value: this.numSignificant
518
+ },
519
+ {
520
+ label: `Number of total ${this.dataType}`,
521
+ value: this.numSignificant + this.numNonSignificant
522
+ }
523
+ ];
524
+ if (this.termType == DATermTypes.GENE_EXPRESSION || this.termType == DATermTypes.DNA_METHYLATION || this.termType == DATermTypes.JUNCTION) {
525
+ tableRows.push(
526
+ {
527
+ label: this.config.samplelst.groups[0].name + " sample size (control group)",
528
+ value: this.response.sample_size1
529
+ },
530
+ {
531
+ label: this.config.samplelst.groups[1].name + " sample size (case group)",
532
+ value: this.response.sample_size2
533
+ }
534
+ );
535
+ } else if (this.termType == DATermTypes.PROTEOME_DAP) {
536
+ tableRows.push(
537
+ {
538
+ label: "Control sample size",
539
+ value: this.response.sample_size1
540
+ },
541
+ {
542
+ label: "Case sample size",
543
+ value: this.response.sample_size2
544
+ }
545
+ );
546
+ }
547
+ if (this.response.bcv !== void 0 && this.response.bcv !== null) {
548
+ tableRows.push({
549
+ label: "Biological coefficient of variation",
550
+ value: roundValueAuto(this.response.bcv)
551
+ });
552
+ }
553
+ if (this.scan) tableRows.push(...this.setScanStats(this.scan));
554
+ return tableRows;
555
+ }
556
+ /* The whole-scan facts, every one of them over the scan as returned -- before the volcano's
557
+ thresholds -- and over the same set of DMRs (those meeting the CpG floor), so no two lines here
558
+ have different denominators. The counts the thresholds select are the three rows above. */
559
+ setScanStats(s) {
560
+ const run = s.runChromosomes || s.chromosomes;
561
+ const rows = [
562
+ { label: "Chromosomes scanned", value: run.length },
563
+ // the counts below are over the chromosome shown, the run's genome-wide facts say so in their labels
564
+ ...s.chromosomes.length < run.length ? [{ label: "Chromosomes shown", value: s.chromosomes.join(", ") }] : [],
565
+ { label: "CpGs analyzed", value: s.totalProbesAnalyzed },
566
+ { label: "DMRs called", value: s.called },
567
+ { label: `DMRs with ${s.minCpgs}+ CpGs`, value: s.kept },
568
+ // what the rows below, the Manhattan and the browser track count
569
+ ...s.minDeltaBeta ? [{ label: `\u2026 and |\u0394\u03B2| > ${s.minDeltaBeta}`, value: s.shown }] : [],
570
+ { label: "Hypermethylated", value: s.hyper },
571
+ { label: "Hypomethylated", value: s.hypo },
572
+ // not on the volcano: no evidence to plot, rather than evidence of no change
573
+ ...s.withoutStatistic ? [{ label: `DMRs with no ${this.pValueLabel} (not plotted)`, value: s.withoutStatistic }] : [],
574
+ ...s.withoutDeltaBeta ? [{ label: "DMRs with no \u0394\u03B2 (not plotted or counted)", value: s.withoutDeltaBeta }] : []
575
+ ];
576
+ if (s.width)
577
+ rows.push({
578
+ label: "DMR width, median (IQR)",
579
+ value: `${bplen(s.width.median)} (${bplen(s.width.q1)} \u2013 ${bplen(s.width.q3)})`
580
+ });
581
+ if (s.regionMask)
582
+ rows.push({
583
+ label: `DMRs removed by artifact mask (${s.regionMask.sources.join(", ")}; \u2265${Math.round(
584
+ s.regionMask.overlapFrac * 100
585
+ )}% masked)`,
586
+ value: s.regionMask.dmrsDropped
587
+ });
588
+ const gm = s.globalMethylation;
589
+ if (gm) {
590
+ const [g1, g2] = this.config.samplelst?.groups?.map((g) => g.name) || ["group 1", "group 2"];
591
+ const one = run.length == 1 ? run[0] : null;
592
+ const meanLabel = (g) => one ? `${g} mean \u03B2 on ${one}` : `${g} genome-wide mean \u03B2`;
593
+ rows.push(
594
+ { label: meanLabel(g1), value: gm.controlMeanBeta.toFixed(4) },
595
+ { label: meanLabel(g2), value: gm.caseMeanBeta.toFixed(4) },
596
+ {
597
+ label: one ? `\u03B2 shift on ${one} (case \u2212 control)` : "Genome-wide \u03B2 shift (case \u2212 control)",
598
+ value: `${gm.shift >= 0 ? "+" : ""}${gm.shift.toFixed(4)}`
599
+ }
600
+ );
601
+ const dc = gm.controlMeanDepth, dk = gm.caseMeanDepth;
602
+ if (dc != null && dk != null) {
603
+ rows.push(
604
+ { label: `${g1} mean reads per CpG`, value: dc.toFixed(2) },
605
+ { label: `${g2} mean reads per CpG`, value: dk.toFixed(2) }
606
+ );
607
+ const ratio = Math.max(dc, dk) / Math.min(dc, dk);
608
+ if (ratio > DEPTH_RATIO_WARN) {
609
+ const deeper = dk > dc ? g2 : g1;
610
+ const differ = Number.isFinite(ratio) ? `${deeper} has ${ratio.toFixed(1)}\xD7 the reads per CpG` : `Only ${deeper} has reads`;
611
+ const floor = s.minDeltaBeta ? `only those with |\u0394\u03B2| > ${s.minDeltaBeta} are counted.` : "set Min \u0394\u03B2 to count only DMRs whose beta moved.";
612
+ rows.push({
613
+ label: "\u26A0 Read depth differs between groups",
614
+ value: `${differ}. DMRcate calls DMRs from read-count ratios that shift with depth, so DMRs with little beta change may reflect depth rather than methylation; ${floor}`
615
+ });
616
+ }
617
+ }
618
+ }
619
+ const bc = s.backgroundCorrection;
620
+ if (bc) {
621
+ rows.push(
622
+ {
623
+ label: `Intergenic background windows sampled${s.chromosomes.length < run.length ? " (whole run)" : ""}`,
624
+ value: bc.windows
625
+ },
626
+ { label: `DMRs scored against background (matched on ${bc.matchedOn.join(" and ")})`, value: bc.scored },
627
+ { label: "DMRs unscored: stratum too thin (not plotted)", value: bc.unscored },
628
+ {
629
+ label: "DMRs moving more than matched background (p < 0.05)",
630
+ value: `${bc.significant.toLocaleString()} of ${bc.scored.toLocaleString()} (${(100 * bc.significant / Math.max(1, bc.scored)).toFixed(1)}%)`
631
+ }
632
+ );
633
+ }
634
+ if (s.geneBodyLoss)
635
+ rows.push({
636
+ // the correction adds the background gate, so the label must say which set this is
637
+ label: s.backgroundCorrection ? "Gene-body loss regions beating background \u2192 genes" : "Gene-body loss regions \u2192 genes",
638
+ value: `${s.geneBodyLoss.regions.toLocaleString()} \u2192 ${s.geneBodyLoss.genes.length.toLocaleString()}`
639
+ });
640
+ const pf = s.profileSummary;
641
+ if (pf) {
642
+ const pct = (v) => `${(100 * v).toFixed(1)}%`;
643
+ rows.push(
644
+ {
645
+ label: `Methylome profile: ${pf.bins.toLocaleString()} bins measured`,
646
+ value: `${pct(pf.fractionHyper)} hyper`
647
+ },
648
+ {
649
+ label: "Methylome profile: per-bin \u0394\u03B2, median (IQR)",
650
+ value: `${pf.median >= 0 ? "+" : ""}${pf.median.toFixed(4)} (${pf.q1.toFixed(4)} \u2013 ${pf.q3.toFixed(4)})`
651
+ },
652
+ { label: "Methylome profile: bins moving |\u0394\u03B2| > 0.05", value: pct(pf.fractionBeyond05) },
653
+ { label: "Methylome profile: bins moving |\u0394\u03B2| > 0.10", value: pct(pf.fractionBeyond10) }
654
+ );
655
+ }
656
+ const r = s.resources;
657
+ if (r) {
658
+ const top = r.perChromosome[0];
659
+ rows.push(
660
+ {
661
+ label: "Compute: workers \xD7 threads",
662
+ value: `${r.workers} \xD7 ${r.threadsPerWorker} (${r.workers * r.threadsPerWorker} core${r.workers * r.threadsPerWorker == 1 ? "" : "s"})`
663
+ },
664
+ { label: "Compute: wall time", value: `${(r.wallMs / 1e3).toFixed(1)} s` },
665
+ {
666
+ label: "Compute: peak memory per worker",
667
+ value: `${Math.round(r.peakWorkerMemoryMb).toLocaleString()} MB${top ? ` (${top.chr}, ${top.probes.toLocaleString()} CpGs)` : ""}`
668
+ },
669
+ { label: "Compute: peak memory, worker pool", value: `${Math.round(r.peakPoolMemoryMb).toLocaleString()} MB` },
670
+ { label: "Compute: worker CPU time", value: `${r.workerCpuSeconds.toFixed(1)} s` },
671
+ {
672
+ label: "Compute: server process",
673
+ value: `+${Math.round(r.nodeRssDeltaMb).toLocaleString()} MB, ${r.nodeCpuSeconds.toFixed(1)} s CPU`
674
+ }
675
+ );
676
+ }
677
+ return rows;
678
+ }
679
+ setPTableColumns() {
680
+ if (this.termType == DATermTypes.DNA_METHYLATION) {
681
+ if (this.scan) {
682
+ this.pValueTable.columns.splice(
683
+ 1,
684
+ 0,
685
+ { label: "Peak \u0394\u03B2", sortable: true },
686
+ { label: "CpGs", sortable: true },
687
+ { label: "Width (bp)", sortable: true },
688
+ ...this.scan.backgroundCorrection ? [{ label: "Excess \u0394\u03B2", sortable: true }] : []
689
+ );
690
+ } else {
691
+ this.pValueTable.columns.splice(
692
+ 1,
693
+ 0,
694
+ { label: "\u0394\u03B2", sortable: true },
695
+ { label: "Mean \u03B2 (group 1)", sortable: true },
696
+ { label: "Mean \u03B2 (group 2)", sortable: true }
697
+ );
698
+ }
699
+ this.pValueTable.columns.splice(
700
+ 0,
701
+ 0,
702
+ { label: elementNoun(this.settings?.elementType).one, sortable: true },
703
+ { label: "Gene(s)", sortable: true }
704
+ );
705
+ } else if (this.termType == DATermTypes.JUNCTION) {
706
+ this.pValueTable.columns[0].label = "\u0394PSI";
707
+ this.pValueTable.columns.splice(
708
+ 1,
709
+ 0,
710
+ { label: "PSI (group 1)", sortable: true },
711
+ { label: "PSI (group 2)", sortable: true },
712
+ { label: "Junctions", sortable: true }
713
+ );
714
+ this.pValueTable.columns.splice(0, 0, { label: "Cluster", sortable: true }, { label: "Gene(s)", sortable: true });
715
+ } else if (this.termType == DATermTypes.PROTEOME_DAP) {
716
+ this.pValueTable.columns.splice(0, 0, { label: "Identifier", sortable: true }, { label: "Gene", sortable: true });
717
+ } else {
718
+ this.pValueTable.columns.splice(0, 0, { label: "Gene Name", sortable: true });
719
+ }
720
+ }
721
+ setUserActions() {
722
+ const userActions = {
723
+ noShow: /* @__PURE__ */ new Set()
724
+ };
725
+ if (this.scan) userActions.noShow.add("Confounding factors");
726
+ if (this.termType == DATermTypes.GENE_EXPRESSION) {
727
+ if (this.settings.method == "edgeR" && getSampleNum(this.config) > 100) {
728
+ userActions.noShow.add("Confounding factors");
729
+ }
730
+ if (this.settings.method == "wilcoxon") userActions.noShow.add("Confounding factors");
731
+ }
732
+ return userActions;
733
+ }
734
+ };
735
+
736
+ // plots/volcano/groupColors.ts
737
+ function groupColors(config) {
738
+ const g = config?.samplelst?.groups;
739
+ if (!g?.length) return {};
740
+ const values = config?.tw?.term?.values;
741
+ const pick = (i) => values?.[g[i]?.name]?.color || g[i]?.color;
742
+ const out = {};
743
+ const c1 = pick(0);
744
+ const c2 = pick(1);
745
+ if (c1) out.group1 = c1;
746
+ if (c2) out.group2 = c2;
747
+ return out;
748
+ }
749
+
750
+ // plots/volcano/interactions/VolcanoInteractions.ts
751
+ var VolcanoInteractions = class {
752
+ constructor(app, id, dom) {
753
+ this.app = app;
754
+ this.dom = dom;
755
+ this.id = id;
756
+ this.pValueTableData = [];
757
+ this.data = [];
758
+ this.totalSignificantRows = 0;
759
+ this.provenance = "";
760
+ }
761
+ /** Launches a multi-term select tree
762
+ * On submit, dispatches a plot_edit action with the new confounders */
763
+ async confoundersMenu() {
764
+ const state = this.app.getState();
765
+ const config = state.plots.find((p) => p.id === this.id);
766
+ if (config.termType !== GENE_EXPRESSION && config.termType !== DNA_METHYLATION) return;
767
+ const allowedGroupNames = /* @__PURE__ */ new Set([config.samplelst.groups[0].name, config.samplelst.groups[1].name]);
768
+ const grpTerms = new Set(
769
+ (this.app?.vocabApi?.state.groups || []).filter((g) => allowedGroupNames.has(g.name)).flatMap(
770
+ (g) => g.filter.lst.flatMap((f) => {
771
+ if (f.tvs?.term) return f.tvs.term;
772
+ else return f.lst.map((l) => l.tvs.term);
773
+ })
774
+ )
775
+ );
776
+ const disable_terms = grpTerms.size ? Array.from(grpTerms) : [];
777
+ const maxNum = config.settings.volcano.method == "edgeR" ? 1 : 2;
778
+ const ui = new MultiTermWrapperEditUI({
779
+ app: this.app,
780
+ callback: async (tws) => {
781
+ this.dom.actionsTip.hide();
782
+ await this.app.dispatch({
783
+ type: "plot_edit",
784
+ id: this.id,
785
+ config: { confounderTws: tws }
786
+ });
787
+ },
788
+ holder: this.dom.actionsTip.d,
789
+ headerText: "Select confounders",
790
+ maxNum,
791
+ state,
792
+ twList: config.confounderTws,
793
+ disable_terms
794
+ });
795
+ await ui.renderUI();
796
+ }
797
+ download(termType) {
798
+ this.dom.actionsTip.clear().showunder(this.dom.controls.select("div").node());
799
+ const manhattan = this.dom.holder.select("#sjpp-volcano-scanManhattan > svg").node();
800
+ const profile = this.dom.holder.select('[data-testid="sjpp-volcano-methylationProfile"] svg').node();
801
+ const opts = [
802
+ {
803
+ text: manhattan ? "Download volcano plot" : "Download plot",
804
+ callback: () => {
805
+ const svg = this.dom.holder.select("svg").node();
806
+ to_svg(svg, `Differential ${termType} analysis volcano`, { apply_dom_styles: true });
807
+ }
808
+ },
809
+ ...manhattan ? [{ text: "Download DMR plot", callback: () => downloadManhattanSvg(manhattan, "DMR scan Manhattan") }] : [],
810
+ ...profile ? [
811
+ {
812
+ text: "Download methylation profile",
813
+ callback: () => downloadManhattanSvg(profile, "DMR scan methylation profile")
814
+ }
815
+ ] : [],
816
+ {
817
+ // DAP volcanoes report a single FDR rather than a p-value.
818
+ text: termType === PROTEOME_DAP ? "Download FDR table" : "Download p-value table",
819
+ callback: (itemDiv) => this.downloadPvalueTable(termType, itemDiv)
820
+ }
821
+ ];
822
+ for (const opt of opts) {
823
+ const itemDiv = this.dom.actionsTip.d.append("div").attr("class", "sja_menuoption").text(opt.text);
824
+ itemDiv.on("click", () => opt.callback(itemDiv));
825
+ }
826
+ }
827
+ /* The interactive table only holds the most-significant maxInteractiveDots rows, because the
828
+ dot overlay has to stay responsive. The download has no such constraint, so it should be the
829
+ COMPLETE set of significant rows: when the two differ, re-request with the cap lifted and write
830
+ those rows instead.
831
+
832
+ That second request is cheap. volcanoRender is deliberately not part of the DA cache key (see
833
+ dmKeyInputs in server/routes/termdb.diffMeth.ts), so lifting the cap re-uses the cached R result
834
+ and pays only for a re-render.
835
+
836
+ If the re-request fails the download still happens, with the capped rows and a note saying so --
837
+ losing the file entirely would be a worse outcome than a disclosed subset. */
838
+ async downloadPvalueTable(termType, itemDiv) {
839
+ const date = fileDateStamp();
840
+ const label = termType === PROTEOME_DAP ? "fdr" : "p-value";
841
+ let { rows, columns } = this.pValueTableData;
842
+ let subsetNote;
843
+ const cappedNote = (reason) => `Top ${rows.length.toLocaleString()} of ${this.totalSignificantRows.toLocaleString()} significant results, selected by adjusted p-value and sorted by fold-change. This file is not the complete result set (${reason}).`;
844
+ if (this.totalSignificantRows > rows.length) {
845
+ if (!this.fetchAllRows) subsetNote = cappedNote("complete set unavailable");
846
+ else {
847
+ const restore = itemDiv?.text();
848
+ itemDiv?.text(`Preparing ${this.totalSignificantRows.toLocaleString()} rows...`);
849
+ try {
850
+ const full = await this.fetchAllRows();
851
+ rows = full.rows;
852
+ columns = full.columns;
853
+ } catch (e) {
854
+ subsetNote = cappedNote(`could not retrieve the complete set: ${e?.message || e}`);
855
+ } finally {
856
+ if (restore) itemDiv?.text(restore);
857
+ }
858
+ }
859
+ }
860
+ const note = [subsetNote, this.provenance && `Run: ${this.provenance}`].filter(Boolean).join(" | ");
861
+ downloadTable(rows, columns, `${label}-table-${date}.tsv`, note || void 0);
862
+ }
863
+ async highlightDataPoint(value) {
864
+ const config = this.app.getState().plots.find((p) => p.id === this.id);
865
+ const highlightedData = config.highlightedData.includes(value) ? config.highlightedData.filter((d) => d !== value) : [...config.highlightedData, value];
866
+ await this.app.dispatch({
867
+ type: "plot_edit",
868
+ id: this.id,
869
+ config: { highlightedData }
870
+ });
871
+ }
872
+ /** When clicking on a data point, launches the box plot in a separate sandbox
873
+ * For geneExpression, value == gene symbol */
874
+ launchBoxPlot(value) {
875
+ const config = this.app.getState().plots.find((p) => p.id === this.id);
876
+ const values = {};
877
+ for (const group of config.samplelst.groups) {
878
+ values[group.name] = {
879
+ key: group.name,
880
+ label: group.name,
881
+ list: group.values
882
+ };
883
+ }
884
+ const setTerm = () => {
885
+ if (config.termType == GENE_EXPRESSION) {
886
+ return {
887
+ q: { mode: "continuous" },
888
+ term: {
889
+ gene: value,
890
+ name: value,
891
+ type: config.termType
892
+ }
893
+ };
894
+ } else return config.term;
895
+ };
896
+ this.app.dispatch({
897
+ type: "plot_create",
898
+ config: {
899
+ chartType: "summary",
900
+ childType: "boxplot",
901
+ term: setTerm(),
902
+ term2: {
903
+ q: { groups: config.tw.q.groups, type: "custom-samplelst" },
904
+ term: config.tw.term
905
+ }
906
+ }
907
+ });
908
+ }
909
+ /** Launch a violin plot for a gene expression data point. */
910
+ launchViolinGeneExp(value) {
911
+ const config = this.app.getState().plots.find((p) => p.id === this.id);
912
+ this.app.dispatch({
913
+ type: "plot_create",
914
+ config: {
915
+ chartType: "summary",
916
+ childType: "violin",
917
+ term: {
918
+ q: { mode: "continuous" },
919
+ term: {
920
+ gene: value,
921
+ name: value,
922
+ type: config.termType
923
+ }
924
+ },
925
+ term2: {
926
+ q: { groups: config.tw.q.groups, type: "custom-samplelst" },
927
+ term: config.tw.term
928
+ }
929
+ }
930
+ });
931
+ }
932
+ launchGeneSetEdit() {
933
+ const plotConfig = this.app.getState().plots.find((p) => p.id === this.id);
934
+ const holder = this.dom.actionsTip.d.append("div").style("padding", "5px");
935
+ const limitedGenesList = plotConfig.termType === DNA_METHYLATION ? this.data.map((d) => d.promoter_id) : this.data.map((d) => d.gene_name);
936
+ new GeneSetEditUI({
937
+ holder,
938
+ genome: this.app.opts.genome,
939
+ vocabApi: this.app.vocabApi,
940
+ limitedGenesList,
941
+ geneList: plotConfig.highlightedData.map((d) => {
942
+ return { gene: d };
943
+ }),
944
+ customInputs: [
945
+ {
946
+ label: "Cancel highlight",
947
+ getDisplayStyle: () => plotConfig.highlightedData.length > 0 ? "" : "none",
948
+ showInput: async () => {
949
+ await this.app.dispatch({
950
+ type: "plot_edit",
951
+ id: this.id,
952
+ config: { highlightedData: [] }
953
+ });
954
+ this.dom.actionsTip.hide();
955
+ }
956
+ }
957
+ ],
958
+ callback: async (result) => {
959
+ const highlightedData = result.geneList.map((d) => d.gene);
960
+ await this.app.dispatch({
961
+ type: "plot_edit",
962
+ id: this.id,
963
+ config: { highlightedData }
964
+ });
965
+ this.dom.actionsTip.hide();
966
+ }
967
+ });
968
+ }
969
+ /** Opens the region view on a DMR of a scan: a window on the scan's own DMRcate run -- its
970
+ * chromosomes, lambda, C and FDR -- so it draws the DMRs the volcano drew, from the cache. Takes the
971
+ * scan rather than a region alone so it cannot be opened from an element class, whose hits come
972
+ * from another test: a per-element comparison that DMRcate's de novo calls need not agree with. */
973
+ async launchDmr(d, scan) {
974
+ const config = this.app.getState().plots.find((p) => p.id === this.id);
975
+ const colors = groupColors(config);
976
+ const s = config.settings.volcano;
977
+ const termfilter = this.app.getState().termfilter;
978
+ const groups = withOthersGroup(config.samplelst.groups, termfilter);
979
+ const k = scan.dmrcate;
980
+ const dmrConfig = {
981
+ chartType: "dmr",
982
+ headerText: `DMR: ${d.chr}:${d.start}-${d.stop}`,
983
+ coordinateOverride: { chr: d.chr, start: d.start, stop: d.stop },
984
+ // the samples of each group, or the filter of a group that is defined by one
985
+ group1: getGroupForRegion(groups[0]),
986
+ group2: getGroupForRegion(groups[1]),
987
+ group1Name: groups[0].name,
988
+ group2Name: groups[1].name,
989
+ settings: {
990
+ colors,
991
+ lambda: k?.lambda ?? s.lambda,
992
+ C: k?.C ?? s.C,
993
+ fdr_cutoff: k?.fdr_cutoff ?? s.fdrCutoff,
994
+ // the floor the scan's counts were made with, which the control may since have left
995
+ minDeltaBeta: scan.minDeltaBeta
996
+ },
997
+ scanChromosomes: scan.runChromosomes,
998
+ // also in the run's cache key, so the region finds the scan's run rather than refitting it
999
+ backgroundCorrection: !!scan.backgroundCorrection,
1000
+ // the scan drops DMRs with fewer CpGs; the region view drops them too
1001
+ minCpgs: scan.minCpgs,
1002
+ // and the DMRs without its y-axis statistic
1003
+ yAxis: scan.yAxis,
1004
+ /* the cohort filter the scan request sent, which resolves a filter-defined group that carries none
1005
+ of its own; a different cohort would be a different run */
1006
+ filter0: termfilter.filter0,
1007
+ ...scan.globalMethylation?.controlMeanDepth != null && scan.globalMethylation?.caseMeanDepth != null ? {
1008
+ readDepth: {
1009
+ control: scan.globalMethylation.controlMeanDepth,
1010
+ case: scan.globalMethylation.caseMeanDepth
1011
+ }
1012
+ } : {}
1013
+ };
1014
+ this.app.dispatch({
1015
+ type: "plot_create",
1016
+ config: dmrConfig
1017
+ });
1018
+ }
1019
+ /* Open a genome browser on a scan's DMR, with the scan's own DMRs as a track. The scan wrote
1020
+ every DMR it called to a bedj file in the server's cache (at the CpG floor the volcano counts
1021
+ at), so the track is an ordinary file tk: the browser reads whatever region is in view from it,
1022
+ including after the reader types another position into the search box. Opened on the DMR with
1023
+ room either side. */
1024
+ /** A genome browser on a methylation hit: a scan's DMR, with the scan's DMRs as a track, or an element-class hit
1025
+ * (promoter, cCRE), with the genes and cCREs around it and no DMR track, since no DMRs were called */
1026
+ async launchMethylationGenomeBrowser(d, scan) {
1027
+ const tracks = [];
1028
+ const ccre = (this.app.opts.genome?.tracks || []).find((t) => t.name == CCRE_TRACK_NAME);
1029
+ if (ccre) tracks.push(structuredClone(ccre));
1030
+ if (scan?.bedjFile) {
1031
+ tracks.push({
1032
+ type: "bedj",
1033
+ name: "Scan DMRs",
1034
+ // the file is under the server's bedj cache dir, not the tp dir
1035
+ isCache: true,
1036
+ file: scan.bedjFile,
1037
+ stackheight: 14,
1038
+ // drives both the fill and the block legend, which counts each class in view
1039
+ categories: {
1040
+ hyper: { label: "Hypermethylated DMR", color: HYPER_COLOR },
1041
+ hypo: { label: "Hypomethylated DMR", color: HYPO_COLOR }
1042
+ }
1043
+ });
1044
+ }
1045
+ const pad = Math.max(5e3, d.stop - d.start);
1046
+ this.app.dispatch({
1047
+ type: "plot_create",
1048
+ config: {
1049
+ chartType: "genomeBrowser",
1050
+ // a coordinate with no gene: genomic mode, whatever mode the dataset defaults the browser to
1051
+ blockIsProteinMode: false,
1052
+ geneSearchResult: { chr: d.chr, start: Math.max(0, d.start - pad), stop: d.stop + pad },
1053
+ tracks
1054
+ }
1055
+ });
1056
+ }
1057
+ /* Open a genome browser on an intron cluster, with its junctions as a track whose y is the
1058
+ -log10 p of each junction, or |ΔPSI| with leafcutter that has no such p, and whose color tells
1059
+ the group with higher PSI.
1060
+ The junctions come from the cached data, by re-sending the analysis request with the cluster id. */
1061
+ async launchSpliceGenomeBrowser(d) {
1062
+ const data = await dofetch3("termdb/diffSplice", { body: { ...this.daRequest, clusterId: d.cluster_id } });
1063
+ if (data.error) {
1064
+ sayerror(this.dom.error, data.error);
1065
+ return;
1066
+ }
1067
+ const config = this.app.getState().plots.find((p) => p.id === this.id);
1068
+ const { caseColor, controlColor } = getGroupColors(config);
1069
+ const cluster = d.cluster_id.slice(d.cluster_id.indexOf(":") + 1);
1070
+ const strand = cluster.split("_").pop();
1071
+ const pad = Math.max(500, Math.round((d.stop - d.start) * 0.2));
1072
+ this.app.dispatch({
1073
+ type: "plot_create",
1074
+ config: {
1075
+ chartType: "genomeBrowser",
1076
+ // as for a scan DMR: a coordinate with no gene opens in genomic mode
1077
+ blockIsProteinMode: false,
1078
+ // cluster start/stop are the 1-based exon boundaries; the junctions are already 0-based
1079
+ geneSearchResult: { chr: d.chr, start: Math.max(0, d.start - 1 - pad), stop: d.stop + pad },
1080
+ tracks: [
1081
+ {
1082
+ type: "j2",
1083
+ name: d.genes ? `${d.genes} ${cluster}` : cluster,
1084
+ custom_data: data.junctions.map((j) => ({ ...j, strand })),
1085
+ deltaPsiGroups: {
1086
+ control: { name: config.samplelst.groups[0].name, color: controlColor },
1087
+ case: { name: config.samplelst.groups[1].name, color: caseColor }
1088
+ }
1089
+ }
1090
+ ]
1091
+ }
1092
+ });
1093
+ }
1094
+ /** Launch a violin/box plot for a DNA methylation promoter.
1095
+ * Creates a methylation term using the promoter's chr/start/stop coordinates.
1096
+ * The tw handler fills in id and unit from termdbConfig. */
1097
+ launchDNAMethViolin(d) {
1098
+ const config = this.app.getState().plots.find((p) => p.id === this.id);
1099
+ const elementType = config?.settings?.volcano?.elementType;
1100
+ const genomicFeatureType = elementType === DMR_SCAN_ELEMENT_TYPE ? "region" : d.promoter_id ? "promoter" : "gene";
1101
+ const featureName = genomicFeatureType === "gene" ? d.gene_name?.split(",")[0]?.trim() || "" : "";
1102
+ const term = {
1103
+ genomicFeatureType,
1104
+ featureName,
1105
+ type: DNA_METHYLATION,
1106
+ chr: d.chr,
1107
+ start: d.start,
1108
+ stop: d.stop
1109
+ };
1110
+ if (genomicFeatureType === "promoter" && elementType) term.elementType = elementType;
1111
+ if (genomicFeatureType !== "gene") {
1112
+ const noun = elementNoun(elementType).one;
1113
+ const unit = term.elementType && this.app.vocabApi.termdbConfig.queries?.dnaMethylation?.unit || getDNAMethUnit(genomicFeatureType, this.app.vocabApi);
1114
+ term.unit = unit;
1115
+ term.name = getDNAMethTermName(term, unit, noun);
1116
+ }
1117
+ this.app.dispatch({
1118
+ type: "plot_create",
1119
+ config: {
1120
+ chartType: "summary",
1121
+ childType: "violin",
1122
+ term: {
1123
+ q: { mode: "continuous" },
1124
+ term
1125
+ },
1126
+ term2: {
1127
+ q: { groups: config.tw.q.groups, type: "custom-samplelst" },
1128
+ term: config.tw.term
1129
+ }
1130
+ }
1131
+ });
1132
+ }
1133
+ async launchDEGClustering() {
1134
+ const geneIndex = this.pValueTableData.columns.findIndex((col) => col.label === "Gene Name");
1135
+ const adjustedPValIndex = this.pValueTableData.columns.findIndex((col) => col.label === "Adjusted p-value");
1136
+ const rowsSorted = [...this.pValueTableData.rows].sort((a, b) => {
1137
+ const aQVal = Number(a[adjustedPValIndex].value);
1138
+ const bQVal = Number(b[adjustedPValIndex].value);
1139
+ return aQVal - bQVal;
1140
+ });
1141
+ const geneList = rowsSorted.slice(0, 100).map((r) => ({ gene: r[geneIndex].value }));
1142
+ const tws = geneList.map((d) => {
1143
+ const gene = d.gene;
1144
+ const unit = getGEunit(this.app.vocabApi);
1145
+ const name = `${gene} ${unit}`;
1146
+ const term = { gene, name, type: GENE_EXPRESSION };
1147
+ return { term, q: {} };
1148
+ });
1149
+ const group = { lst: tws, type: "hierCluster" };
1150
+ const customVariable = this.app.getState().plots.find((p) => p.id === this.id).tw;
1151
+ const annotationGroup = { lst: [customVariable] };
1152
+ const config = {
1153
+ chartType: "hierCluster",
1154
+ termgroups: [group, annotationGroup],
1155
+ dataType: GENE_EXPRESSION,
1156
+ filter: {
1157
+ in: true,
1158
+ join: "",
1159
+ type: "tvslst",
1160
+ lst: [{ type: "tvs", tvs: { term: customVariable.term } }]
1161
+ }
1162
+ };
1163
+ await this.app.dispatch({
1164
+ type: "plot_create",
1165
+ config: structuredClone(config)
1166
+ });
1167
+ }
1168
+ };
1169
+
1170
+ // plots/volcano/interactions/geneBodyLossDE.ts
1171
+ async function geneBodyLossTest(tip, config, vocab, scan, app) {
1172
+ const gb = scan.geneBodyLoss;
1173
+ const holder = tip.d;
1174
+ const groups = (scan.matchedSamplelst || config?.samplelst)?.groups;
1175
+ if (!groups || groups.length != 2) {
1176
+ sayerror(holder.append("div"), "Two sample groups are required.");
1177
+ return;
1178
+ }
1179
+ const div = holder.append("div").style("padding", "10px").style("max-width", "900px");
1180
+ const wait = div.append("div").style("color", "#777").text("Running differential expression\u2026");
1181
+ const de = getDefaultVolcanoSettings({}, { termType: "geneExpression" });
1182
+ try {
1183
+ const res = await dofetch3("termdb/dmrGeneDE", {
1184
+ body: {
1185
+ genome: vocab.genome,
1186
+ dslabel: vocab.dslabel,
1187
+ // `in` is part of the DE cache key, so it must travel or the two runs get separate entries
1188
+ samplelst: {
1189
+ groups: groups.map((g) => ({
1190
+ name: g.name,
1191
+ in: g.in,
1192
+ values: g.values,
1193
+ filter: g.filter,
1194
+ filter0: g.filter0,
1195
+ mapParent2Children: g.mapParent2Children
1196
+ }))
1197
+ },
1198
+ genes: gb.genes,
1199
+ method: de.method,
1200
+ min_count: de.minCount,
1201
+ min_total_count: de.minTotalCount,
1202
+ cpm_cutoff: de.cpmCutoff,
1203
+ filter: app.getState().termfilter?.filter,
1204
+ filter0: app.getState().termfilter?.filter0
1205
+ }
1206
+ });
1207
+ wait.remove();
1208
+ if (res?.error) {
1209
+ sayerror(div.append("div"), res.error);
1210
+ return;
1211
+ }
1212
+ renderGeneDE(div, res, gb.regions, config, scan, app, tip);
1213
+ } catch (e) {
1214
+ wait.remove();
1215
+ sayerror(div.append("div"), e?.message || String(e));
1216
+ }
1217
+ }
1218
+ function renderGeneDE(div, res, nRegions, config, scan, app, tip) {
1219
+ const gb = scan.geneBodyLoss;
1220
+ const samplelst = scan.matchedSamplelst || config.samplelst;
1221
+ const nMatched = samplelst.groups.reduce((n, g) => n + (g.values?.length ?? g.sampleCount ?? 0), 0);
1222
+ const dir = res.weightedDiff < 0 ? "lower" : "higher";
1223
+ div.append("button").attr("class", "sja_menuoption").attr("data-testid", "sjpp-geneBodyLoss-deVolcano").style("margin", "0 0 8px").style("padding", "3px 6px").text(
1224
+ `Open as differential expression volcano on the ${nMatched.toLocaleString()} samples with methylation, ${gb.genes.length.toLocaleString()} genes highlighted`
1225
+ ).on("click", () => {
1226
+ tip.hide();
1227
+ app.dispatch({
1228
+ type: "plot_create",
1229
+ config: structuredClone({
1230
+ chartType: "differentialAnalysis",
1231
+ termType: "geneExpression",
1232
+ state: config.state,
1233
+ samplelst,
1234
+ tw: config.tw,
1235
+ highlightedData: gb.genes,
1236
+ /* The default highlight is orange-yellow, which on a case group drawn in orange makes
1237
+ the highlighted hits and the up-regulated genes one blob. Use the colour the
1238
+ methylation figures give to LOSS instead: these genes are highlighted because they
1239
+ lost gene-body methylation, so the fill says the same thing there and here. */
1240
+ settings: { volcano: { defaultHighlightColor: HYPO_COLOR } }
1241
+ })
1242
+ });
1243
+ });
1244
+ div.append("div").style("font-weight", "bold").style("padding", "4px 0").text(
1245
+ `Genes under a gene-body loss region are expressed ${dir} in the case group: ${res.weightedDiff >= 0 ? "+" : ""}${res.weightedDiff.toFixed(3)} log\u2082 fold change within matched gene length (p = ${res.p < 1e-3 ? res.p.toExponential(1) : res.p.toFixed(4)}).`
1246
+ );
1247
+ div.append("div").style("color", "#777").style("font-size", ".92em").text(
1248
+ `${nRegions.toLocaleString()} regions \u2192 ${res.genesRequested.toLocaleString()} genes; ${res.nHit.toLocaleString()} compared against ${res.nOther.toLocaleString()} genes of matched length across ${res.strata.length} strata. ${res.genesNotInDE.toLocaleString()} were not tested by DE (low count or absent from the expression matrix) and ${res.unmatchedHits.toLocaleString()} fell in strata too thin to match. Comparing hits to all other genes instead would recover gene length.`
1249
+ );
1250
+ if (res.sigCount) {
1251
+ div.append("div").style("padding", "8px 0 2px").style("font-weight", "bold").text(
1252
+ `${res.sigCount.toLocaleString()} of these genes are differentially expressed on their own (p < 0.05), ${res.sigDown.toLocaleString()} of them down.`
1253
+ );
1254
+ const { caseColor, controlColor } = getGroupColors(config);
1255
+ renderTable({
1256
+ div: div.append("div"),
1257
+ columns: [
1258
+ { label: "Gene" },
1259
+ { label: "Length (log\u2081\u2080 bp)", barplot: { axisWidth: 90, colorPositive: "#999", tickCount: 3 } },
1260
+ { label: "log\u2082FC", barplot: { axisWidth: 110, colorNegative: controlColor, colorPositive: caseColor } },
1261
+ { label: res.topGenes[0]?.adjusted ? "Adjusted p" : "p", align: "right" }
1262
+ ],
1263
+ rows: res.topGenes.map((g) => [
1264
+ { value: g.gene },
1265
+ { value: g.len ? Number(Math.log10(g.len).toFixed(2)) : NaN },
1266
+ { value: Number(g.fc.toFixed(3)) },
1267
+ { value: Number(g.p.toPrecision(2)) }
1268
+ ]),
1269
+ showLines: true,
1270
+ maxHeight: "26vh",
1271
+ download: { fileName: "gene-body-loss-genes.tsv" }
1272
+ });
1273
+ if (res.sigCount > res.topGenes.length)
1274
+ div.append("div").style("color", "#777").style("font-size", ".9em").text(`Showing the ${res.topGenes.length} most significant of ${res.sigCount.toLocaleString()}.`);
1275
+ }
1276
+ div.append("div").style("padding", "10px 0 2px").style("font-weight", "bold").text("By gene length");
1277
+ renderTable({
1278
+ div: div.append("div"),
1279
+ columns: [
1280
+ { label: "Gene length" },
1281
+ { label: "Genes hit", align: "right" },
1282
+ { label: "Matched", align: "right" },
1283
+ { label: "Median log\u2082FC, hit", align: "right" },
1284
+ { label: "Median log\u2082FC, matched", align: "right" },
1285
+ { label: "Difference", align: "right" }
1286
+ ],
1287
+ rows: res.strata.map((s) => [
1288
+ { value: `${bplen(s.lenFrom)} \u2013 ${bplen(s.lenTo)}` },
1289
+ { value: s.nHit.toLocaleString() },
1290
+ { value: s.nOther.toLocaleString() },
1291
+ { value: Number(s.medianHit.toFixed(3)) },
1292
+ { value: Number(s.medianOther.toFixed(3)) },
1293
+ { value: Number(s.diff.toFixed(3)) }
1294
+ ]),
1295
+ showLines: true,
1296
+ maxHeight: "26vh",
1297
+ download: { fileName: "gene-body-loss-expression.tsv" }
1298
+ });
1299
+ }
1300
+
1301
+ // plots/volcano/interactions/dmrGeneLink.ts
1302
+ async function dmrGeneLinkPanel(tip, config, vocab, scan, app) {
1303
+ const div = tip.d.append("div").style("padding", "10px").style("max-width", "1000px");
1304
+ const wait = div.append("div").style("color", "#777").text("Linking DMRs to genes and running differential expression\u2026");
1305
+ const de = getDefaultVolcanoSettings({}, { termType: "geneExpression" });
1306
+ const state = app.getState();
1307
+ let res;
1308
+ try {
1309
+ res = await dofetch3("termdb/dmrGeneLink", {
1310
+ body: {
1311
+ genome: vocab.genome,
1312
+ dslabel: vocab.dslabel,
1313
+ cacheId: scan.cacheId,
1314
+ minCpgs: scan.minCpgs,
1315
+ minDeltaBeta: scan.minDeltaBeta,
1316
+ // the run is genome-wide; the volcano may be showing a part of it
1317
+ chromosomes: scan.chromosomes,
1318
+ /* The cohort the scan compared, expanded and matched server-side. The plot state's list can still
1319
+ hold a "Not in" group as {in:false} carrying the included group's values, which DE reads as two
1320
+ overlapping groups. */
1321
+ samplelst: {
1322
+ groups: (scan.matchedSamplelst || config.samplelst).groups.map((g) => ({
1323
+ name: g.name,
1324
+ in: g.in,
1325
+ values: g.values,
1326
+ filter: g.filter,
1327
+ filter0: g.filter0,
1328
+ mapParent2Children: g.mapParent2Children
1329
+ }))
1330
+ },
1331
+ method: de.method,
1332
+ min_count: de.minCount,
1333
+ min_total_count: de.minTotalCount,
1334
+ cpm_cutoff: de.cpmCutoff,
1335
+ filter: state.termfilter?.filter,
1336
+ filter0: state.termfilter?.filter0
1337
+ }
1338
+ });
1339
+ } catch (e) {
1340
+ res = { error: e?.message || String(e) };
1341
+ }
1342
+ wait.remove();
1343
+ if (res.error) return sayerror(div.append("div"), res.error);
1344
+ div.append("div").style("font-weight", "bold").text(
1345
+ `${res.genes.toLocaleString()} genes touched by DMRs of ${scan.minCpgs}+ CpGs (${res.links.toLocaleString()} gene-context links), read against ${res.deMethod || "differential"} expression on the samples with methylation`
1346
+ );
1347
+ div.append("div").style("color", "#777").style("font-size", ".92em").style("padding", "2px 0 6px").text(
1348
+ `Promoter = within ${bplen(
1349
+ 2e3
1350
+ )} of the TSS; body = the rest of the gene. Concordant: promoter \u0394\u03B2 and expression change in opposite directions, or gene-body \u0394\u03B2 and expression in the same direction (expression adjusted p < 0.05).`
1351
+ );
1352
+ const summary = table2col({ holder: div.append("div") });
1353
+ for (const context of ["promoter", "body"]) {
1354
+ const s = res.summary[context] || {};
1355
+ const [td1, td2] = summary.addRow();
1356
+ td1.text(context == "promoter" ? "Promoter DMRs" : "Gene-body DMRs");
1357
+ td2.text(
1358
+ ["concordant", "discordant", "no expression change", "not tested"].map((k) => `${k}: ${(s[k] || 0).toLocaleString()}`).join(" \xB7 ")
1359
+ );
1360
+ }
1361
+ const rows = res.rows;
1362
+ const litDiv = div.append("div");
1363
+ const recordOf = /* @__PURE__ */ new Map();
1364
+ const tableRows = rows.map((r) => {
1365
+ const cells = [
1366
+ { value: r.gene },
1367
+ { value: r.context },
1368
+ { value: `${r.dmr.chr}:${r.dmr.start}-${r.dmr.stop}` },
1369
+ { value: Number(r.dmr.deltaBeta.toFixed(3)) },
1370
+ { value: r.dmr.cpgs },
1371
+ { value: r.nDmrs },
1372
+ { value: r.fc == null ? "" : Number(r.fc.toFixed(3)) },
1373
+ { value: r.p == null ? "" : Number(r.p.toPrecision(2)) },
1374
+ { value: r.relationship }
1375
+ ];
1376
+ recordOf.set(cells, r);
1377
+ return cells;
1378
+ });
1379
+ renderTable({
1380
+ div: div.append("div"),
1381
+ columns: [
1382
+ { label: "Gene" },
1383
+ { label: "Context" },
1384
+ { label: "Strongest DMR" },
1385
+ { label: "\u0394\u03B2", sortable: true },
1386
+ { label: "CpGs", sortable: true },
1387
+ { label: "DMRs", sortable: true },
1388
+ { label: "Expression log\u2082FC", sortable: true },
1389
+ { label: "Expression p", sortable: true },
1390
+ { label: "Relationship" }
1391
+ ],
1392
+ rows: tableRows,
1393
+ showLines: true,
1394
+ maxHeight: "40vh",
1395
+ header: { allowSort: true },
1396
+ noRadioBtn: true,
1397
+ download: { fileName: "dmr-gene-links.tsv" },
1398
+ // a click asks PubMed about that row's gene in that row's context
1399
+ noButtonCallback: (i) => showLiterature(litDiv, vocab, recordOf.get(tableRows[i]), disease)
1400
+ });
1401
+ if (rows.length < res.links)
1402
+ div.append("div").style("color", "#777").style("font-size", ".9em").text(`Showing the first ${rows.length.toLocaleString()} of ${res.links.toLocaleString()} links.`);
1403
+ const hint = litDiv.append("div").style("color", "#777").style("padding", "6px 0");
1404
+ hint.append("span").text("Click a row for PubMed articles on that gene and mechanism, optionally within a disease: ");
1405
+ const disease = hint.append("input").attr("type", "text").attr("placeholder", "e.g. myeloma").style("width", "120px");
1406
+ }
1407
+ async function showLiterature(holder, vocab, r, disease) {
1408
+ holder.selectAll(".sjpp-dmr-lit").remove();
1409
+ const out = holder.append("div").attr("class", "sjpp-dmr-lit");
1410
+ const head = out.append("div").style("padding", "8px 0 2px").style("font-weight", "bold");
1411
+ const d = String(disease?.property("value") || "").trim();
1412
+ const within = d ? ` in ${d}` : "";
1413
+ head.text(`PubMed: ${r.gene}, ${r.context} methylation and expression${within}\u2026`);
1414
+ const res = await dofetch3("termdb/dmrLiterature", {
1415
+ body: { genome: vocab.genome, dslabel: vocab.dslabel, gene: r.gene, context: r.context, disease: d }
1416
+ }).catch((e) => ({ error: e?.message || String(e) }));
1417
+ holder = out;
1418
+ if (res.error) return sayerror(holder.append("div"), res.error);
1419
+ head.text(
1420
+ `PubMed: ${r.gene}, ${r.context} methylation and expression${within} (${res.count.toLocaleString()} article${res.count == 1 ? "" : "s"}${res.count > res.articles.length ? `, ${res.articles.length} most relevant shown` : ""}; this link is ${r.relationship})`
1421
+ );
1422
+ if (!res.articles.length) {
1423
+ holder.append("div").style("color", "#777").text("No articles match. The link may be unreported rather than unsupported.");
1424
+ return;
1425
+ }
1426
+ const ul = holder.append("ul").style("margin", "2px 0");
1427
+ for (const a of res.articles) {
1428
+ const li = ul.append("li");
1429
+ li.append("span").text(`${a.title} ${a.journal} ${a.year}. `);
1430
+ li.append("a").attr("href", a.doi ? `https://doi.org/${a.doi}` : `https://pubmed.ncbi.nlm.nih.gov/${a.pmid}/`).attr("target", "_blank").text(a.doi ? `doi:${a.doi}` : `PMID ${a.pmid}`);
1431
+ }
1432
+ }
1433
+
1434
+ // plots/volcano/view/VolcanoPlotView.ts
1435
+ var VolcanoPlotView = class {
1436
+ constructor(dom, interactions, termType) {
1437
+ this.linked = [];
1438
+ this.dom = dom;
1439
+ this.interactions = interactions;
1440
+ this.termType = termType;
1441
+ const actions = this.dom.holder.append("div").attr("id", "sjpp-volcano-actions").style("display", "block").style("z-index", 1).style("position", "relative");
1442
+ this.row = this.dom.holder.append("div").attr("id", "sjpp-volcano-row").style("display", "flex").style("align-items", "flex-start");
1443
+ const svg = this.row.append("svg").style("display", "inline-block").attr("id", "sjpp-volcano-svg").style("vertical-align", "top");
1444
+ this.volcanoDom = {
1445
+ actions,
1446
+ svg,
1447
+ pValueTable: void 0,
1448
+ top: void 0,
1449
+ xAxis: void 0,
1450
+ xAxisLabel: void 0,
1451
+ yAxis: void 0,
1452
+ yAxisLabel: void 0,
1453
+ plot: void 0
1454
+ };
1455
+ }
1456
+ render(settings, viewData) {
1457
+ this.settings = settings;
1458
+ this.viewData = viewData;
1459
+ this.linked = [];
1460
+ const plotDim = this.viewData.plotDim;
1461
+ this.initDom();
1462
+ this.renderUserActions();
1463
+ this.renderPlot(plotDim);
1464
+ renderDataPoints(this);
1465
+ this.renderFoldChangeLine(plotDim);
1466
+ this.attachInteractions(plotDim);
1467
+ if (this.settings.showPValueTable) this.renderPValueTable();
1468
+ if (this.viewData.scan?.manhattan) this.renderScanManhattan();
1469
+ }
1470
+ initDom() {
1471
+ this.volcanoDom.actions.selectAll("*").remove();
1472
+ this.volcanoDom.svg.selectAll("*").remove();
1473
+ const svg = this.volcanoDom.svg;
1474
+ this.volcanoDom.top = svg.append("g").attr("id", "sjpp-volcano-top");
1475
+ this.volcanoDom.xAxis = svg.append("g").attr("id", "sjpp-volcano-xAxis");
1476
+ this.volcanoDom.yAxis = svg.append("g").attr("id", "sjpp-volcano-yAxis");
1477
+ this.volcanoDom.xAxisLabel = svg.append("text").attr("id", "sjpp-volcano-xAxisLabel").attr("text-anchor", "middle");
1478
+ this.volcanoDom.yAxisLabel = svg.append("text").attr("id", "sjpp-volcano-yAxisLabel").attr("text-anchor", "middle");
1479
+ this.volcanoDom.plot = svg.append("g").attr("id", "sjpp-volcano-plot");
1480
+ this.dom.holder.select("#sjpp-volcano-pValueTable").remove();
1481
+ this.dom.holder.select("#sjpp-volcano-scanManhattan").remove();
1482
+ if (!this.settings.showPValueTable) return;
1483
+ this.volcanoDom.pValueTable = this.row.append("div").attr("id", "sjpp-volcano-pValueTable").attr("data-testid", "sjpp-volcano-pValueTable").style("display", "inline-block").style("vertical-align", "top");
1484
+ }
1485
+ renderUserActions() {
1486
+ this.dom.actionsTip.d.style("overflow", "hidden");
1487
+ this.volcanoDom.actions.style("margin-left", "20px").style("padding", "5px");
1488
+ this.addActionButton(
1489
+ "Confounding factors",
1490
+ [DATermTypes.GENE_EXPRESSION, DATermTypes.DNA_METHYLATION],
1491
+ () => this.interactions.confoundersMenu()
1492
+ );
1493
+ this.addActionButton(
1494
+ "Highlight genes",
1495
+ [DATermTypes.GENE_EXPRESSION, DATermTypes.SINGLECELL_CELLTYPE, DATermTypes.DNA_METHYLATION],
1496
+ () => this.interactions.launchGeneSetEdit()
1497
+ );
1498
+ this.addActionButton(
1499
+ "Statistics",
1500
+ [DATermTypes.GENE_EXPRESSION, DATermTypes.SINGLECELL_CELLTYPE, DATermTypes.DNA_METHYLATION],
1501
+ () => {
1502
+ this.renderStatsMenu();
1503
+ },
1504
+ { whenOpen: "Hide statistics" }
1505
+ );
1506
+ const gb = this.viewData.scan?.geneBodyLoss;
1507
+ const hasExpression = !!this.interactions.app.vocabApi.termdbConfig?.queries?.rnaseqGeneCount;
1508
+ if (hasExpression && gb?.genes.length) {
1509
+ this.addActionButton(
1510
+ `Expression of ${gb.genes.length.toLocaleString()} gene-body loss genes`,
1511
+ [DATermTypes.DNA_METHYLATION],
1512
+ () => geneBodyLossTest(
1513
+ this.dom.actionsTip,
1514
+ this.interactions.app.getState().plots.find((p) => p.id == this.interactions.id),
1515
+ this.interactions.app.vocabApi.vocab,
1516
+ this.viewData.scan,
1517
+ this.interactions.app
1518
+ )
1519
+ );
1520
+ }
1521
+ if (hasExpression && this.viewData.scan?.cacheId) {
1522
+ this.addActionButton(
1523
+ "Genes, expression and literature",
1524
+ [DATermTypes.DNA_METHYLATION],
1525
+ () => dmrGeneLinkPanel(
1526
+ this.dom.actionsTip,
1527
+ this.interactions.app.getState().plots.find((p) => p.id == this.interactions.id),
1528
+ this.interactions.app.vocabApi.vocab,
1529
+ this.viewData.scan,
1530
+ this.interactions.app
1531
+ )
1532
+ );
1533
+ }
1534
+ const dmNoun = elementNoun(this.settings?.elementType);
1535
+ const SIG_PREFIX = "Number of significant ";
1536
+ const sigRow = this.viewData.statsData.find((d) => d.label.startsWith(SIG_PREFIX));
1537
+ const numSigGenes = Number(sigRow?.value ?? 0);
1538
+ if (numSigGenes) {
1539
+ const n = numSigGenes.toLocaleString();
1540
+ const isDM = this.termType == DATermTypes.DNA_METHYLATION;
1541
+ const up = this.viewData.numSignificantUp;
1542
+ const down = this.viewData.numSignificantDown;
1543
+ const split = up + down > 0 ? ` (${up.toLocaleString()} ${isDM ? "hyper" : "up"} / ${down.toLocaleString()} ${isDM ? "hypo" : "down"})` : "";
1544
+ const off = this.viewData.xOffset;
1545
+ const centered = this.viewData.centered ? `, centered on median \u0394\u03B2 ${off > 0 ? "+" : ""}${off.toFixed(3)}` : "";
1546
+ const noun = isDM ? this.viewData.scan ? dmNoun.many : `DM ${dmNoun.many}` : this.termType == DATermTypes.GENE_EXPRESSION ? "DE genes" : `significant ${sigRow.label.slice(SIG_PREFIX.length)}`;
1547
+ const sigText = `${n} ${noun}` + split + centered + ":";
1548
+ this.volcanoDom.actions.append("span").text(sigText).style("margin-left", "10px").style("font-weight", "bold");
1549
+ const pValueTableButtonText = this.settings.showPValueTable ? "Hide p-value table" : "Show p-value table";
1550
+ this.addActionButton(
1551
+ pValueTableButtonText,
1552
+ [DATermTypes.GENE_EXPRESSION, DATermTypes.SINGLECELL_CELLTYPE, DATermTypes.DNA_METHYLATION],
1553
+ async () => {
1554
+ const showTable = !this.settings.showPValueTable;
1555
+ await this.interactions.app.dispatch({
1556
+ type: "plot_edit",
1557
+ id: this.interactions.id,
1558
+ config: { settings: { volcano: { showPValueTable: showTable } } }
1559
+ });
1560
+ }
1561
+ );
1562
+ }
1563
+ if (numSigGenes && numSigGenes >= 3) {
1564
+ this.addActionButton(
1565
+ `Hierarchical clustering of ${numSigGenes > 100 ? "top 100" : numSigGenes} DE genes`,
1566
+ [DATermTypes.GENE_EXPRESSION],
1567
+ async () => {
1568
+ await this.interactions.launchDEGClustering();
1569
+ }
1570
+ );
1571
+ }
1572
+ }
1573
+ /** Use the termTypes arr to render the buttons in a consistent order.
1574
+ *
1575
+ * Pass `opts.whenOpen` to make the button a toggle: clicking once opens
1576
+ * the actionsTip with the callback's content and swaps the button text
1577
+ * to `whenOpen` ("Hide statistics", etc.); clicking again hides the tip
1578
+ * and restores the original text. The text also restores when the tip
1579
+ * closes via Esc or outside-click (Menu.onHide hook), and when another
1580
+ * action button hijacks the tip (the loop below resets all toggles
1581
+ * before showing the new content). */
1582
+ addActionButton(text, termTypes, callback, opts) {
1583
+ if (this.viewData.userActions.noShow.has(text)) return;
1584
+ if (!termTypes.includes(this.termType)) return;
1585
+ const button = this.volcanoDom.actions.append("button").attr("class", "sja_menuoption").style("margin", "3px").style("padding", "3px").text(text).on("click", async () => {
1586
+ const whenOpen = opts?.whenOpen;
1587
+ if (whenOpen && button.text() === whenOpen) {
1588
+ this.dom.actionsTip.hide();
1589
+ return;
1590
+ }
1591
+ this.volcanoDom.actions.selectAll('button[data-volcano-toggle-open="1"]').each(function() {
1592
+ const b = select_default(this);
1593
+ const closed = b.attr("data-volcano-toggle-closed");
1594
+ if (closed) b.text(closed).attr("data-volcano-toggle-open", null);
1595
+ this.parent_menu = void 0;
1596
+ const eh = this.__volcanoEscHandler;
1597
+ if (eh) {
1598
+ document.removeEventListener("keydown", eh);
1599
+ this.__volcanoEscHandler = void 0;
1600
+ }
1601
+ });
1602
+ this.dom.actionsTip.clear().showunder(button.node());
1603
+ if (whenOpen) {
1604
+ button.text(whenOpen).attr("data-volcano-toggle-open", "1").attr("data-volcano-toggle-closed", text);
1605
+ button.node().parent_menu = this.dom.actionsTip.dnode;
1606
+ const escHandler = (e) => {
1607
+ if (e.key === "Escape") this.dom.actionsTip.hide();
1608
+ };
1609
+ document.addEventListener("keydown", escHandler);
1610
+ button.node().__volcanoEscHandler = escHandler;
1611
+ this.dom.actionsTip.onHide = () => {
1612
+ button.text(text).attr("data-volcano-toggle-open", null);
1613
+ button.node().parent_menu = void 0;
1614
+ document.removeEventListener("keydown", escHandler);
1615
+ button.node().__volcanoEscHandler = void 0;
1616
+ };
1617
+ } else {
1618
+ this.dom.actionsTip.onHide = void 0;
1619
+ }
1620
+ await callback();
1621
+ });
1622
+ }
1623
+ renderPlot(plotDim) {
1624
+ this.volcanoDom.svg.attr("width", plotDim.svg.width).attr("height", plotDim.svg.height);
1625
+ this.renderTermInfo(plotDim);
1626
+ this.volcanoDom.yAxisLabel.attr(
1627
+ "transform",
1628
+ `translate(${plotDim.yAxisLabel.x}, ${plotDim.yAxisLabel.y}) rotate(-90)`
1629
+ );
1630
+ this.setSvgSubscriptLabel(this.volcanoDom.yAxisLabel, "-log", "10", `(${this.viewData.pValueLabel})`);
1631
+ this.volcanoDom.xAxisLabel.attr("transform", `translate(${plotDim.xAxisLabel.x}, ${plotDim.xAxisLabel.y})`);
1632
+ if (this.termType === DATermTypes.JUNCTION) {
1633
+ this.volcanoDom.xAxisLabel.selectAll("*").remove();
1634
+ this.volcanoDom.xAxisLabel.text(this.viewData.deltaPsiAxisLabel || "\u0394PSI (case \u2212 control)");
1635
+ } else if (onDeltaBetaAxis(this.termType, this.settings)) {
1636
+ this.volcanoDom.xAxisLabel.selectAll("*").remove();
1637
+ this.volcanoDom.xAxisLabel.text(this.viewData.deltaBetaAxisLabel || "\u0394\u03B2 (case \u2212 control)");
1638
+ } else {
1639
+ this.volcanoDom.xAxisLabel.text(null);
1640
+ this.setSvgSubscriptLabel(this.volcanoDom.xAxisLabel, "log", "2", "(fold-change)");
1641
+ }
1642
+ this.renderScale(plotDim.xScale);
1643
+ this.renderScale(plotDim.yScale, true);
1644
+ if (this.viewData.volcanoPng) {
1645
+ this.volcanoDom.plot.append("image").attr("href", `data:image/png;base64,${this.viewData.volcanoPng}`).attr("x", plotDim.plot.x).attr("y", plotDim.plot.y).attr("width", plotDim.plot.width).attr("height", plotDim.plot.height).attr("preserveAspectRatio", "none");
1646
+ }
1647
+ }
1648
+ renderTermInfo(plotDim) {
1649
+ if (this.viewData.termInfo == void 0) return;
1650
+ this.volcanoDom.top.attr("transform", `translate(${plotDim.top.x}, ${plotDim.top.y})`);
1651
+ const y = this.viewData.termInfo.y;
1652
+ const addLabel = (term) => {
1653
+ return this.volcanoDom.top.append("text").attr("font-size", "0.9em").attr("transform", `translate(${term.x}, ${y + 10})`).text(term.label);
1654
+ };
1655
+ const firstTerm = this.viewData.termInfo.first;
1656
+ addLabel(firstTerm);
1657
+ const secondTerm = this.viewData.termInfo.second;
1658
+ const secondLabel = addLabel(secondTerm);
1659
+ secondLabel.attr("text-anchor", "end");
1660
+ }
1661
+ renderScale(scale, isLeft = false) {
1662
+ const scaleG = this.volcanoDom[isLeft ? "yAxis" : "xAxis"].append("g").attr("transform", `translate(${scale.x}, ${scale.y})`).call(isLeft ? axisLeft(scale.scale) : axisBottom(scale.scale));
1663
+ axisstyle({
1664
+ axis: scaleG,
1665
+ color: "black",
1666
+ showline: true
1667
+ });
1668
+ }
1669
+ renderFoldChangeLine(plotDim) {
1670
+ this.volcanoDom.plot.append("line").attr("stroke", "#ccc").attr("shape-rendering", "crispEdges").attr("x1", plotDim.logFoldChangeLine.x).attr("x2", plotDim.logFoldChangeLine.x).attr("y1", plotDim.logFoldChangeLine.y1).attr("y2", plotDim.logFoldChangeLine.y2);
1671
+ }
1672
+ renderStatsMenu() {
1673
+ for (const img of this.viewData.images || []) {
1674
+ this.dom.actionsTip.d.append("img").style("display", "inline-block").style("margin-left", "10px").style("margin-top", "-30px").attr("width", 450).attr("height", 450).attr("src", img.src);
1675
+ }
1676
+ const tableHolder = this.dom.actionsTip.d.append("div").style("display", this.viewData.images.length == 1 ? "inline-block" : "block").style("margin", `${this.viewData.images.length == 1 ? `40px 10px` : `0px 0px`} 0px 5px`).style("vertical-align", "top");
1677
+ const table = table2col({ holder: tableHolder });
1678
+ for (const d of this.viewData.statsData) {
1679
+ const [td1, td2] = table.addRow();
1680
+ td1.text(d.label);
1681
+ td2.style("text-align", "end").text(Number.isInteger(d.value) ? d.value.toLocaleString() : d.value);
1682
+ }
1683
+ }
1684
+ /* Where the DMRs are, along the whole genome: every kept DMR in the server's PNG, hyper above
1685
+ the line and hypo below, height = evidence; the most significant thousand are live. A dot is
1686
+ the same DMR the volcano shows, so hover and click give the volcano's own rows and actions --
1687
+ the violin of that region and the region view, a genome browser with the called DMRs, the
1688
+ per-CpG group means and the genes. Same lifecycle as the p-value table: redrawn from each
1689
+ response, never left stale. */
1690
+ /** What the scan covered, for the figure titles: the chromosome when that is all of it, and "the
1691
+ * genome" otherwise. A one-chromosome scan describing itself as genome-wide overstates every
1692
+ * number under it, which is what a dev host holding a subset of CpG shards produces. */
1693
+ scanSpan() {
1694
+ const chrs = this.viewData.scan?.chromosomes || [];
1695
+ return chrs.length == 1 ? chrs[0] : "the genome";
1696
+ }
1697
+ renderScanManhattan() {
1698
+ const { manhattan } = this.viewData.scan;
1699
+ const div = this.row.insert("div", "#sjpp-volcano-pValueTable").attr("id", "sjpp-volcano-scanManhattan").attr("data-testid", "sjpp-volcano-scanManhattan").style("display", "block").style("margin", "0 0 0 20px");
1700
+ const asRow = (d) => ({
1701
+ promoter_id: `${d.chrom}:${d.start}-${d.stop}`,
1702
+ gene_name: d.gene_name,
1703
+ chr: d.chrom,
1704
+ start: d.start,
1705
+ stop: d.stop,
1706
+ delta_beta: d.delta_beta,
1707
+ fold_change: d.fold_change,
1708
+ original_p_value: d.p,
1709
+ adjusted_p_value: d.p,
1710
+ no_cpgs: d.no_cpgs,
1711
+ excess: d.excess,
1712
+ min_smoothed_fdr: d.min_smoothed_fdr
1713
+ });
1714
+ const g2 = this.viewData.scan.matchedSamplelst?.groups?.[1]?.name || "case group";
1715
+ const link = {
1716
+ points: [],
1717
+ highlight: () => {
1718
+ },
1719
+ region: (d) => ({ chr: d.chrom, start: d.start, stop: d.stop })
1720
+ };
1721
+ const handle = plotManhattan(
1722
+ div,
1723
+ { png: manhattan.png, plotData: manhattan.plotData },
1724
+ {
1725
+ ...manhattanLayoutDefaults,
1726
+ plotWidth: manhattan.plotWidth,
1727
+ plotHeight: manhattan.plotHeight,
1728
+ // the radius the PNG was drawn at; see the profile below. Absent from older cached scans
1729
+ pngDotRadius: manhattan.dotRadius ?? manhattanLayoutDefaults.pngDotRadius,
1730
+ // the server already picked N per direction; the client must not re-cap by |y|
1731
+ interactiveDotsCap: manhattan.plotData.points.length,
1732
+ maxTooltipGenes: this.settings.maxTooltipGenes,
1733
+ legendItemWidth: 130,
1734
+ // saved from the volcano's download menu, with the profile under it
1735
+ showDownload: false
1736
+ },
1737
+ void 0,
1738
+ {
1739
+ // names the chromosome when that is all the scan covered, rather than "the genome"
1740
+ title: `DMRs along ${this.scanSpan()}, direction in ${g2} (top ${manhattan.interactive.toLocaleString()} per direction interactive)`,
1741
+ // short, because it runs down a 300 px axis: the legend and title say what the sign means
1742
+ yAxisLabel: `\xB1log\u2081\u2080(${this.viewData.pValueLabel})`,
1743
+ legend: [
1744
+ { label: "Hypermethylated", color: HYPER_COLOR, hollow: !manhattan.filled },
1745
+ { label: "Hypomethylated", color: HYPO_COLOR, hollow: !manhattan.filled }
1746
+ ],
1747
+ itemNoun: "DMR",
1748
+ renderSingleHoverTooltip: (d, container) => {
1749
+ const table = table2col({ holder: container.append("table") });
1750
+ this.addTooltipRows(asRow(d), table);
1751
+ if (d.no_cpgs != null) addTooltipRow(table, "CpGs", d.no_cpgs);
1752
+ },
1753
+ buildMultiHitTableData: (dots) => this.buildMultiHitTable(dots.map(asRow)),
1754
+ getActions: (d) => this.getActionMenuOpts(asRow(d)),
1755
+ getRowKey: (d) => `${d.chrom}:${d.start}-${d.stop}`,
1756
+ onHover: (dots) => this.mirrorHover(link, dots)
1757
+ }
1758
+ );
1759
+ this.linked.push(Object.assign(link, handle));
1760
+ this.renderMethylationProfile(this.viewData.scan.matchedSamplelst?.groups?.[0]?.name || "control group", g2);
1761
+ }
1762
+ /* The genome-wide methylation profile, under the DMR plot: mean beta per group in 100 kb bins,
1763
+ drawn as the per-bin difference. The DMR plot above shows the regions that passed a threshold;
1764
+ this shows every bin that was measured, which is what says whether the methylome shifted a
1765
+ little everywhere or a lot in a few places.
1766
+
1767
+ Same component and the same hover/click layer as the DMR plot, on the bins that moved most in
1768
+ each direction: 29,000 dots in a band cannot be read by eye, so a dot has to be able to say
1769
+ which 100 kb it is, what each group's mean beta there was, and how many CpGs that rests on.
1770
+ Clicking opens the browser on the bin -- the question a standout bin raises is which of the
1771
+ scan's DMRs are inside it, and that is the view that answers it. */
1772
+ renderMethylationProfile(controlName, caseName) {
1773
+ const profile = this.viewData.scan?.profile;
1774
+ if (!profile) return;
1775
+ const div = this.dom.holder.select("#sjpp-volcano-scanManhattan").append("div").attr("data-testid", "sjpp-volcano-methylationProfile").style("display", "block").style("margin-top", "-70px");
1776
+ const region = (d) => ({ chr: d.chrom, start: d.pos, stop: d.pos + profile.binBp });
1777
+ const label = (d) => `${d.chrom}:${(d.pos + 1).toLocaleString()}-${(d.pos + profile.binBp).toLocaleString()}`;
1778
+ const link = { points: [], highlight: () => {
1779
+ }, region };
1780
+ const handle = plotManhattan(
1781
+ div,
1782
+ { png: profile.png, plotData: profile.plotData },
1783
+ {
1784
+ ...manhattanLayoutDefaults,
1785
+ plotWidth: profile.plotWidth,
1786
+ plotHeight: profile.plotHeight,
1787
+ /* The radius the PNG was drawn at, not the shared default of 2: the hover layer is
1788
+ placed in the PNG's own pixel space, and a 1 px mismatch in the padding stretches
1789
+ the image against the dot coordinates the server computed. */
1790
+ pngDotRadius: profile.dotRadius,
1791
+ // the server already picked N per direction; the client must not re-cap by |y|
1792
+ interactiveDotsCap: profile.plotData.points.length,
1793
+ /* More rows than the volcano's 5. At 100 kb there are ~29,000 bins over 1,000 px, so
1794
+ a cursor covers a median of 7 live bins on MMRF however tight the hit radius -- the
1795
+ dots genuinely overlap at this scale. 8 shows the whole neighbourhood on a typical
1796
+ hover instead of 5 of it. */
1797
+ maxTooltipGenes: 8,
1798
+ showLegend: false,
1799
+ showDownload: false
1800
+ },
1801
+ void 0,
1802
+ {
1803
+ /* The width drawn, not the width requested: the server reports back what it binned at,
1804
+ and a reader quoting the figure needs the two to agree. The interactive count is the
1805
+ live dot count rather than the per-direction rule, because at a coarse width the rule
1806
+ reaches every bin and "top 1,000 per direction" would read as a restriction. */
1807
+ title: `${this.scanSpan() == "the genome" ? "Methylome-wide" : `${this.scanSpan()}-wide`} profile: mean \u0394\u03B2 per ${bplen(profile.binBp)} bin in ${caseName} (${profile.interactive.toLocaleString()} of ${profile.bins.toLocaleString()} bins interactive)`,
1808
+ yAxisLabel: "\u0394\u03B2 per bin",
1809
+ itemNoun: "bin",
1810
+ renderSingleHoverTooltip: (d, container) => {
1811
+ const table = table2col({ holder: container.append("table") });
1812
+ addTooltipRow(table, "Region", label(d));
1813
+ addTooltipRow(table, "\u0394\u03B2", roundValueAuto(d.y));
1814
+ addTooltipRow(table, `Mean \u03B2, ${controlName}`, roundValueAuto(d.control));
1815
+ addTooltipRow(table, `Mean \u03B2, ${caseName}`, roundValueAuto(d.case));
1816
+ addTooltipRow(table, "CpGs measured", d.n_probes.toLocaleString());
1817
+ },
1818
+ buildMultiHitTableData: (dots) => ({
1819
+ columns: [{ label: "Region" }, { label: "\u0394\u03B2", sortable: true }, { label: "CpGs", sortable: true }],
1820
+ rows: dots.map((d) => [{ value: label(d) }, { value: roundValueAuto(d.y) }, { value: d.n_probes }])
1821
+ }),
1822
+ getActions: (d) => [
1823
+ {
1824
+ label: "Genome browser",
1825
+ onClick: async () => await this.interactions.launchMethylationGenomeBrowser(region(d), this.viewData.scan)
1826
+ }
1827
+ ],
1828
+ getRowKey: (d) => label(d),
1829
+ onHover: (dots) => this.mirrorHover(link, dots)
1830
+ }
1831
+ );
1832
+ this.linked.push(Object.assign(link, handle));
1833
+ }
1834
+ /* Ring, on every other figure, the live dots overlapping what the cursor is on. Only live dots can
1835
+ be ringed -- the rest are pixels in a PNG -- so a hovered DMR outside another figure's interactive
1836
+ top N has nothing to light up there. */
1837
+ mirrorHover(src, dots) {
1838
+ const hovered = dots.map(src.region);
1839
+ for (const p of this.linked) {
1840
+ if (p === src) continue;
1841
+ p.highlight(
1842
+ hovered.length ? p.points.filter((d) => {
1843
+ const r = p.region(d);
1844
+ return hovered.some((h) => h.chr == r.chr && h.start < r.stop && r.start < h.stop);
1845
+ }) : []
1846
+ );
1847
+ }
1848
+ }
1849
+ renderPValueTable() {
1850
+ if (!this.settings.showPValueTable) return;
1851
+ const maxTableRows = 5e3;
1852
+ const allRows = this.viewData.pValueTableData.rows;
1853
+ const rows = allRows.length > maxTableRows ? allRows.slice(0, maxTableRows) : allRows;
1854
+ if (allRows.length > maxTableRows) {
1855
+ this.volcanoDom.pValueTable.append("div").style("padding", "5px 10px").style("font-size", ".8em").style("color", "#666").text(
1856
+ `Showing top ${maxTableRows.toLocaleString()} of ${allRows.length.toLocaleString()} significant results (sorted by fold-change)`
1857
+ );
1858
+ }
1859
+ renderTable({
1860
+ columns: this.viewData.pValueTableData.columns,
1861
+ rows,
1862
+ div: this.volcanoDom.pValueTable,
1863
+ showLines: true,
1864
+ maxHeight: `${this.viewData.pValueTableData.height}px`,
1865
+ resize: true,
1866
+ header: { allowSort: true },
1867
+ noRadioBtn: true,
1868
+ noButtonCallback: (i) => {
1869
+ const key = this.viewData.pValueTableData.rowKeys.get(rows[i]);
1870
+ if (!key) return;
1871
+ this.interactions.highlightDataPoint(key);
1872
+ },
1873
+ hoverEffects: (tr, row) => {
1874
+ const circles = this.volcanoDom.plot.selectAll("circle").nodes();
1875
+ const key = this.viewData.pValueTableData.rowKeys.get(row);
1876
+ const dataKey = this.termType === DATermTypes.DNA_METHYLATION ? "promoter_id" : "gene_name";
1877
+ const circle = circles.find((d) => d.__data__[dataKey] == key);
1878
+ if (!circle || circle.__data__.highlighted) return;
1879
+ let clone;
1880
+ tr.on("mouseover", () => {
1881
+ if (circle.__data__.highlighted || clone) return;
1882
+ clone = this.volcanoDom.plot.node()?.appendChild(circle.cloneNode(true));
1883
+ clone.setAttribute("fill-opacity", 0.9);
1884
+ });
1885
+ tr.on("mouseleave", () => {
1886
+ if (!clone) return;
1887
+ clone.remove();
1888
+ clone = null;
1889
+ });
1890
+ this.volcanoDom.pValueTable.on("mouseover", () => {
1891
+ selectAll_default(circles).attr("stroke-opacity", 0.075);
1892
+ });
1893
+ this.volcanoDom.pValueTable.on("mouseleave", () => {
1894
+ selectAll_default(circles).attr("stroke-opacity", (d) => d.significant ? 0.35 : 0.2);
1895
+ });
1896
+ }
1897
+ });
1898
+ }
1899
+ setSvgSubscriptLabel(textElem, prefix, subscript, suffix) {
1900
+ textElem.text(null);
1901
+ textElem.append("tspan").text(prefix);
1902
+ textElem.append("tspan").attr("baseline-shift", "sub").attr("font-size", "0.7em").text(subscript);
1903
+ textElem.append("tspan").text(suffix);
1904
+ }
1905
+ attachInteractions(plotDim) {
1906
+ const points = this.viewData.pointData;
1907
+ if (!points || points.length === 0) return;
1908
+ const dotRadiusPx = this.viewData.plotExtent.dotRadiusPx;
1909
+ const hitRadius = dotRadiusPx + 3;
1910
+ const highlightRadius = Math.max(0.5, dotRadiusPx - 0.5);
1911
+ const highlightColor = this.settings.defaultHighlightColor;
1912
+ const hoverLayer = this.volcanoDom.plot.append("g").attr("id", "sjpp-volcano-hover").style("pointer-events", "none");
1913
+ const cover = this.volcanoDom.plot.append("rect").attr("id", "sjpp-volcano-cover").attr("x", plotDim.plot.x).attr("y", plotDim.plot.y).attr("width", plotDim.plot.width).attr("height", plotDim.plot.height).attr("fill", "transparent").style("pointer-events", "all").style("cursor", "default");
1914
+ const circlePath = (r) => `M${r},0 A${r},${r} 0 1,1 ${-r},0 A${r},${r} 0 1,1 ${r},0 Z`;
1915
+ const link = this.viewData.scan ? {
1916
+ points,
1917
+ region: (d) => ({ chr: d.chr, start: d.start, stop: d.stop }),
1918
+ highlight: (dots) => {
1919
+ drawHoverShapes(
1920
+ linkedLayer,
1921
+ dots.map((d) => ({
1922
+ path: circlePath(dotRadiusPx + 2),
1923
+ transform: `translate(${d.x},${d.y})`,
1924
+ stroke: "black",
1925
+ strokeWidth: 2
1926
+ }))
1927
+ );
1928
+ }
1929
+ } : void 0;
1930
+ const linkedLayer = this.volcanoDom.plot.append("g").style("pointer-events", "none");
1931
+ if (link) this.linked.push(link);
1932
+ new DataPointInteractions({
1933
+ cover,
1934
+ hoverLayer,
1935
+ hoverTip: this.dom.tip,
1936
+ points,
1937
+ // Quadtree in cover-local space — d.x/d.y are SVG-absolute, so subtract
1938
+ // the plot rect's origin once when building the tree.
1939
+ getX: (d) => d.x - plotDim.plot.x,
1940
+ getY: (d) => d.y - plotDim.plot.y,
1941
+ hitRadius,
1942
+ toHoverSpec: (d) => ({
1943
+ path: circlePath(highlightRadius),
1944
+ // Hover layer lives in the same coord space as the dots (SVG-absolute),
1945
+ // so translate by d.x/d.y — NOT the cover-local pair.
1946
+ transform: `translate(${d.x},${d.y})`,
1947
+ fill: highlightColor,
1948
+ fillOpacity: 0.9,
1949
+ stroke: "none"
1950
+ }),
1951
+ maxTooltipRows: this.settings.maxTooltipGenes,
1952
+ ...link ? { onHover: (dots) => this.mirrorHover(link, dots) } : {},
1953
+ itemNoun: "gene",
1954
+ renderSingleHoverTooltip: (d, container) => {
1955
+ const table = table2col({ holder: container.append("table") });
1956
+ this.addTooltipRows(d, table);
1957
+ },
1958
+ buildMultiHitTableData: (dots) => this.buildMultiHitTable(dots),
1959
+ getActions: (d) => this.getActionMenuOpts(d),
1960
+ renderSingleHitInfo: (d, container) => {
1961
+ const tbl = table2col({ holder: container.append("table") });
1962
+ this.addTooltipRows(d, tbl);
1963
+ },
1964
+ getRowKey: (d) => d.gene_name
1965
+ }).attach();
1966
+ }
1967
+ /** Multi-hit hover table for differential splicing: one row per intron cluster. */
1968
+ get onDeltaBeta() {
1969
+ return onDeltaBetaAxis(this.termType, this.settings);
1970
+ }
1971
+ buildSpliceMultiHitTable(dots) {
1972
+ const { pValueLabel, singlePValue } = this.viewData;
1973
+ const pLabel = pValueLabel.charAt(0).toUpperCase() + pValueLabel.slice(1);
1974
+ const pField = singlePValue ? "original_p_value" : `${this.settings.pValueType}_p_value`;
1975
+ const columns = [
1976
+ { label: "Cluster" },
1977
+ { label: "Gene(s)" },
1978
+ { label: "\u0394PSI", sortable: true },
1979
+ { label: pLabel, sortable: true }
1980
+ ];
1981
+ const rows = dots.map((d) => [
1982
+ { value: d.cluster_id },
1983
+ { value: d.genes || "" },
1984
+ { value: roundValueAuto(d.delta_psi) },
1985
+ { value: roundValueAuto(d[pField]) }
1986
+ ]);
1987
+ return { columns, rows };
1988
+ }
1989
+ // p-value rows duplicate those in addTooltipRows
1990
+ addSpliceTooltipRows(d, table) {
1991
+ const c = d;
1992
+ addTooltipRow(table, "Cluster", c.cluster_id);
1993
+ if (c.genes) addTooltipRow(table, "Gene(s)", c.genes);
1994
+ if (c.chr) addTooltipRow(table, "Position", `${c.chr}:${c.start}-${c.stop}`);
1995
+ addTooltipRow(table, "\u0394PSI", roundValueAuto(c.delta_psi));
1996
+ if (c.psi_control != null) addTooltipRow(table, "PSI (group 1)", roundValueAuto(c.psi_control));
1997
+ if (c.psi_case != null) addTooltipRow(table, "PSI (group 2)", roundValueAuto(c.psi_case));
1998
+ if (c.n_junc != null) addTooltipRow(table, "Junctions", c.n_junc);
1999
+ if (c.top_intron) addTooltipRow(table, "Top intron", c.top_intron);
2000
+ if (this.viewData.singlePValue) {
2001
+ addTooltipRow(table, this.viewData.pValueLabel, roundValueAuto(d.original_p_value));
2002
+ } else {
2003
+ addTooltipRow(table, "Original p-value", roundValueAuto(d.original_p_value));
2004
+ if (d.adjusted_p_value != void 0) addTooltipRow(table, "Adjusted p-value", roundValueAuto(d.adjusted_p_value));
2005
+ }
2006
+ }
2007
+ buildMultiHitTable(dots) {
2008
+ if (this.termType === DATermTypes.JUNCTION) return this.buildSpliceMultiHitTable(dots);
2009
+ const isDM = this.termType === DATermTypes.DNA_METHYLATION;
2010
+ const isDAP = this.termType === DATermTypes.PROTEOME_DAP;
2011
+ const effectLabel = this.onDeltaBeta ? "\u0394\u03B2" : "log\u2082(FC)";
2012
+ const pValueType = this.settings.pValueType;
2013
+ const { pValueLabel, singlePValue } = this.viewData;
2014
+ const pLabel = pValueLabel.charAt(0).toUpperCase() + pValueLabel.slice(1);
2015
+ const pField = singlePValue ? "original_p_value" : `${pValueType}_p_value`;
2016
+ const columns = isDM ? [
2017
+ { label: elementNoun(this.settings?.elementType).one },
2018
+ { label: "Gene(s)" },
2019
+ { label: effectLabel, sortable: true },
2020
+ { label: pLabel, sortable: true }
2021
+ ] : isDAP ? [
2022
+ { label: "Identifier" },
2023
+ { label: "Gene" },
2024
+ { label: effectLabel, sortable: true },
2025
+ { label: pLabel, sortable: true }
2026
+ ] : [{ label: "Gene" }, { label: effectLabel, sortable: true }, { label: pLabel, sortable: true }];
2027
+ const rows = dots.map((d) => {
2028
+ const fc = { value: roundValueAuto(this.onDeltaBeta ? d.delta_beta : d.fold_change) };
2029
+ const pval = { value: roundValueAuto(d[pField]) };
2030
+ if (isDM) {
2031
+ return [{ value: formatPromoterLabel(d) }, { value: d.gene_name || "" }, fc, pval];
2032
+ }
2033
+ if (isDAP) {
2034
+ return [{ value: d.gene_name || "" }, { value: d.gene || "" }, fc, pval];
2035
+ }
2036
+ return [{ value: d.gene_name || "" }, fc, pval];
2037
+ });
2038
+ return { columns, rows };
2039
+ }
2040
+ /** Per-data-point action menu items (Violin / DMR / Box-plot). Used by
2041
+ * both the single-gene click flow and the multi-gene click-menu rows so
2042
+ * the launchers stay in lock-step. */
2043
+ getActionMenuOpts(d) {
2044
+ const termType = this.termType;
2045
+ const interactions = this.interactions;
2046
+ const all = [
2047
+ {
2048
+ label: "Violin plot",
2049
+ isVisible: () => termType === DATermTypes.DNA_METHYLATION || termType === DATermTypes.GENE_EXPRESSION,
2050
+ onClick: async () => {
2051
+ if (termType === DATermTypes.DNA_METHYLATION) interactions.launchDNAMethViolin(d);
2052
+ if (termType === DATermTypes.GENE_EXPRESSION) interactions.launchViolinGeneExp(d.gene_name);
2053
+ }
2054
+ },
2055
+ {
2056
+ /* A scan has already called every DMR: the browser shows them from the cache, beside
2057
+ the genes and cCREs, with no per-CpG detail; the region view below adds that detail. An
2058
+ element-class hit (promoter, cCRE) opens on the genes and cCREs around it. */
2059
+ label: "Genome browser",
2060
+ isVisible: () => termType === DATermTypes.DNA_METHYLATION,
2061
+ onClick: async () => {
2062
+ const dm = d;
2063
+ await interactions.launchMethylationGenomeBrowser(dm, this.viewData.scan);
2064
+ }
2065
+ },
2066
+ {
2067
+ label: "Genome browser",
2068
+ isVisible: () => termType === DATermTypes.JUNCTION,
2069
+ onClick: async () => {
2070
+ await interactions.launchSpliceGenomeBrowser(d);
2071
+ }
2072
+ },
2073
+ {
2074
+ /* The region view on a scan's DMR only. An element-class hit (promoter, cCRE) comes from a
2075
+ per-element test; the region view draws DMRcate's de novo calls, which need not agree with it,
2076
+ and showing one under the other mixes two analyses. The violin and the browser above serve
2077
+ elements. */
2078
+ label: "Differentially Methylated Region (DMR) Analysis",
2079
+ isVisible: () => termType === DATermTypes.DNA_METHYLATION && !!this.viewData.scan,
2080
+ onClick: async () => {
2081
+ const dm = d;
2082
+ await interactions.launchDmr({ chr: dm.chr, start: dm.start, stop: dm.stop }, this.viewData.scan);
2083
+ }
2084
+ },
2085
+ {
2086
+ label: "Box plot",
2087
+ isVisible: () => termType === DATermTypes.GENE_EXPRESSION,
2088
+ onClick: async () => {
2089
+ interactions.launchBoxPlot(d.gene_name);
2090
+ }
2091
+ }
2092
+ ];
2093
+ return all.filter((o) => o.isVisible()).map(({ label, onClick }) => ({ label, onClick }));
2094
+ }
2095
+ /** Populates a `table2col` instance with the standard volcano hover rows
2096
+ * (gene/promoter, fold-change, original + adjusted p-values). */
2097
+ addTooltipRows(d, table) {
2098
+ if (this.termType === DATermTypes.JUNCTION) {
2099
+ this.addSpliceTooltipRows(d, table);
2100
+ return;
2101
+ }
2102
+ if (this.termType === DATermTypes.DNA_METHYLATION) {
2103
+ if ("promoter_id" in d)
2104
+ addTooltipRow(table, elementNoun(this.settings?.elementType).one, formatPromoterLabel(d));
2105
+ if (d.gene_name) addTooltipRow(table, "Gene(s)", d.gene_name);
2106
+ } else if (this.termType === DATermTypes.PROTEOME_DAP) {
2107
+ addTooltipRow(table, "Identifier", d.gene_name);
2108
+ if ("gene" in d) addTooltipRow(table, "Gene", d.gene);
2109
+ } else {
2110
+ addTooltipRow(table, "Gene name", d.gene_name);
2111
+ }
2112
+ if (this.onDeltaBeta) {
2113
+ addTooltipRow(table, "\u0394\u03B2", roundValueAuto(d.delta_beta));
2114
+ } else {
2115
+ addTooltipRow(table, "log<sub>2</sub>(fold-change)", roundValueAuto(d.fold_change));
2116
+ }
2117
+ if (this.viewData.singlePValue) {
2118
+ addTooltipRow(table, this.viewData.pValueLabel, roundValueAuto(d.original_p_value));
2119
+ const sfdr = d.min_smoothed_fdr;
2120
+ if (sfdr != null && (this.viewData.scan?.yAxis ?? "min_smoothed_fdr") != "min_smoothed_fdr")
2121
+ addTooltipRow(table, "Min smoothed FDR", roundValueAuto(sfdr));
2122
+ } else {
2123
+ addTooltipRow(table, "Original p-value", roundValueAuto(d.original_p_value));
2124
+ if (d.adjusted_p_value != void 0) addTooltipRow(table, "Adjusted p-value", roundValueAuto(d.adjusted_p_value));
2125
+ }
2126
+ }
2127
+ };
2128
+ function addTooltipRow(table, text, value) {
2129
+ const [td1, td2] = table.addRow();
2130
+ td1.html(text);
2131
+ td2.text(value);
2132
+ }
2133
+ function renderDataPoints(self) {
2134
+ self.volcanoDom.plot.selectAll("circle").data(self.viewData.pointData).enter().append("circle").attr("stroke", (d) => rgb(d.color).formatHex()).attr("stroke-opacity", (d) => d.significant ? 0.35 : 0.2).attr("stroke-width", 1).attr("fill", self.settings.defaultHighlightColor).attr("fill-opacity", (d) => d.highlighted ? 0.9 : 0).attr("cx", (d) => d.x).attr("cy", (d) => d.y).attr("r", (d) => d.radius).style("pointer-events", "none");
2135
+ }
2136
+
2137
+ // plots/volcano/VolcanoControlInputs.ts
2138
+ var isScan = (plot) => plot?.settings?.volcano?.elementType == DMR_SCAN_ELEMENT_TYPE;
2139
+ var VolcanoControlInputs = class {
2140
+ constructor(config, termType, elementTypes, chromosomes) {
2141
+ this.config = config;
2142
+ this.termType = termType;
2143
+ this.elementTypes = elementTypes || [];
2144
+ this.chromosomes = chromosomes || [];
2145
+ this.inputs = [
2146
+ {
2147
+ // DAP volcanoes threshold a single FDR (adjusted p-value); other term types
2148
+ // threshold a p-value.
2149
+ label: this.config.termType == PROTEOME_DAP ? "FDR significance (-log\u2081\u2080)" : "P value significance (-log\u2081\u2080)",
2150
+ type: "number",
2151
+ chartType: "volcano",
2152
+ settingsKey: "pValue",
2153
+ title: this.config.termType == PROTEOME_DAP ? "The FDR threshold to determine statistical significance" : "The p-value threshold to determine statistical significance",
2154
+ min: 0,
2155
+ // 5e-324 is the smallest positive number greater than 0 representable
2156
+ // in IEEE 64-bit floating point (i.e. javascripts native Number.MIN_VALUE)
2157
+ // -Math.log10(5e-324) = 323.3
2158
+ max: 323.3,
2159
+ step: 1
2160
+ },
2161
+ {
2162
+ label: "P value",
2163
+ type: "radio",
2164
+ chartType: "volcano",
2165
+ settingsKey: "pValueType",
2166
+ title: "Toggle between original and adjusted pvalues for volcano plot",
2167
+ // DAP files carry only a single FDR, and a DMR scan a single p, so there is nothing to
2168
+ // toggle between
2169
+ getDisplayStyle: (plot) => this.config.termType == PROTEOME_DAP || isScan(plot) ? "none" : "",
2170
+ options: [
2171
+ { label: "Adjusted", value: "adjusted" },
2172
+ { label: "Original", value: "original" }
2173
+ ]
2174
+ },
2175
+ /* Hidden for differential methylation: a DM run plots and thresholds on delta-beta,
2176
+ so a log2 cutoff would set a limit in units the plot never shows. Every other term
2177
+ type still gets it.
2178
+ Splicing is hidden for the same reason -- it plots and thresholds on delta-PSI, and
2179
+ supplies its own |dPSI| control in addSplicingControlInputs(). */
2180
+ ...this.termType === DNA_METHYLATION || this.termType === JUNCTION ? [] : [
2181
+ {
2182
+ label: "Fold change (log\u2082)",
2183
+ type: "number",
2184
+ chartType: "volcano",
2185
+ settingsKey: "foldChangeCutoff",
2186
+ title: "The fold change threshold to determine biological significance",
2187
+ min: -10,
2188
+ max: 10
2189
+ }
2190
+ ],
2191
+ {
2192
+ label: "Max interactive dots",
2193
+ type: "number",
2194
+ chartType: "volcano",
2195
+ settingsKey: "maxInteractiveDots",
2196
+ title: "Cap on the number of top-significant points the server returns as interactive overlay circles. The PNG still shows every dot.",
2197
+ min: 0,
2198
+ max: 2e4,
2199
+ step: 100
2200
+ },
2201
+ //Preferably, keep all the display (e.g. colors, sizes, etc.) controls
2202
+ //at the bottom of the list or at least together
2203
+ {
2204
+ label: "Plot height",
2205
+ type: "number",
2206
+ chartType: "volcano",
2207
+ settingsKey: "height",
2208
+ title: "Height of the plot in pixels",
2209
+ min: 300,
2210
+ max: 1e3
2211
+ },
2212
+ {
2213
+ label: "Plot width",
2214
+ type: "number",
2215
+ chartType: "volcano",
2216
+ settingsKey: "width",
2217
+ title: "Width of the plot in pixels",
2218
+ min: 300,
2219
+ max: 1e3
2220
+ },
2221
+ {
2222
+ label: "Significant value color",
2223
+ type: "color",
2224
+ chartType: "volcano",
2225
+ title: "Default color for significant data points.",
2226
+ settingsKey: "defaultSignColor",
2227
+ getDisplayStyle: () => {
2228
+ if (this.config.termType == SINGLECELL_CELLTYPE) return "none";
2229
+ const controlColor = this.config.tw?.term?.values?.[this.config.samplelst.groups[0].name]?.color;
2230
+ const caseColor = this.config.tw?.term?.values?.[this.config.samplelst.groups[1].name].color;
2231
+ if (controlColor && caseColor) return "none";
2232
+ else return "";
2233
+ }
2234
+ },
2235
+ {
2236
+ label: "Non-significant value color",
2237
+ type: "color",
2238
+ chartType: "volcano",
2239
+ title: "Default color for non-significant data points.",
2240
+ settingsKey: "defaultNonSignColor"
2241
+ },
2242
+ {
2243
+ label: "Highlight color",
2244
+ type: "color",
2245
+ chartType: "volcano",
2246
+ title: "Default color for highlighted data points.",
2247
+ settingsKey: "defaultHighlightColor"
2248
+ }
2249
+ ];
2250
+ this.setVolcanoControlInputs();
2251
+ }
2252
+ /** Add more term type specific controls here. */
2253
+ setVolcanoControlInputs() {
2254
+ this.addGeneExpControlInputs();
2255
+ this.addDNAMethControlInputs();
2256
+ this.addSplicingControlInputs();
2257
+ this.addSingleCellCTControlInputs();
2258
+ }
2259
+ addGeneExpControlInputs() {
2260
+ if (this.termType !== GENE_EXPRESSION) return;
2261
+ const geInputs = [
2262
+ {
2263
+ label: "Minimum read count",
2264
+ type: "number",
2265
+ chartType: "volcano",
2266
+ settingsKey: "minCount",
2267
+ title: "The smallest number of reads required for a gene to be considered in the analysis",
2268
+ min: 0,
2269
+ max: 1e4
2270
+ },
2271
+ {
2272
+ label: "Minimum total read count",
2273
+ type: "number",
2274
+ chartType: "volcano",
2275
+ settingsKey: "minTotalCount",
2276
+ title: "The smallest total number of reads required for a gene to be considered in the analysis",
2277
+ min: 0,
2278
+ max: 1e4
2279
+ },
2280
+ {
2281
+ label: "CPM cutoff",
2282
+ type: "number",
2283
+ chartType: "volcano",
2284
+ settingsKey: "cpmCutoff",
2285
+ title: "The minimum normalized expression threshold to retain only genes with sufficient expression",
2286
+ min: 0
2287
+ },
2288
+ {
2289
+ label: "Method",
2290
+ type: "radio",
2291
+ chartType: "volcano",
2292
+ settingsKey: "method",
2293
+ title: "Toggle between analysis methods",
2294
+ options: this.getMethodOptions()
2295
+ }
2296
+ // {
2297
+ // label: 'Rank Genes by',
2298
+ // type: 'radio',
2299
+ // chartType: 'volcano',
2300
+ // settingsKey: 'rankBy',
2301
+ // title: 'Rank genes by either the absolute value of the fold change or the variance',
2302
+ // options: [
2303
+ // { label: 'abs(Fold Change)', value: 'abs(foldChange)' },
2304
+ // { label: 'Variance', value: 'variance' }
2305
+ // ],
2306
+ // //TODO: will enable this feature when there is backhand support
2307
+ // getDisplayStyle: () => 'none'
2308
+ // }
2309
+ ];
2310
+ this.inputs.splice(0, 0, ...geInputs);
2311
+ }
2312
+ addDNAMethControlInputs() {
2313
+ if (this.termType !== DNA_METHYLATION) return;
2314
+ const scanOnly = (plot) => isScan(plot) ? "" : "none";
2315
+ const notScan = (plot) => isScan(plot) ? "none" : "";
2316
+ const dmInputs = [
2317
+ /* Element class comes FIRST because it is categorically different from the
2318
+ controls below it: those tune how the test is run, this one changes what is
2319
+ being tested. Promoters, eQTM blocks, and cCRE classes are different genomic
2320
+ features with different coordinates and different test counts, so switching
2321
+ produces a different analysis rather than a refined one.
2322
+
2323
+ Hidden unless the dataset offers a genuine choice -- a single class means
2324
+ there is nothing to pick, and a dataset using the legacy promoter-only config
2325
+ gets no new UI at all. */
2326
+ ...this.elementTypes.length > 1 ? [
2327
+ {
2328
+ label: "Element class",
2329
+ type: "dropdown",
2330
+ chartType: "volcano",
2331
+ settingsKey: "elementType",
2332
+ options: this.elementTypes.map((e) => ({ value: e.key, label: e.label })),
2333
+ title: "Which regulatory elements to test. This changes the features being analysed, not just the thresholds: promoters are TSS windows (-1500/+500 bp, the 450K array definition), cCRE promoters are the ~349 bp ENCODE promoter-like elements (the CpG-island core, no shores), eQTM blocks are runs of CpGs whose methylation correlates with a gene, and the other cCRE classes are ENCODE enhancer and CTCF annotations. Hit counts are not comparable across classes because the number of tests and the genes covered both differ. Narrow elements recover focal signal that a wide window averages away; wide windows do better on broad marks."
2334
+ }
2335
+ ] : [],
2336
+ /* The scan's own knobs, shown only while the scan is the selected class. The chromosome
2337
+ picker is a plain dropdown rather than the region search box: string2pos() turns a bare
2338
+ "chr20" into a 20kb window at the chromosome midpoint, which would silently scan 0.005% of
2339
+ the target. chrM is left out -- 16.5 kb of circular DNA that cannot carry a domain. */
2340
+ {
2341
+ label: "Scan",
2342
+ type: "dropdown",
2343
+ chartType: "volcano",
2344
+ settingsKey: "scanChromosome",
2345
+ getDisplayStyle: scanOnly,
2346
+ options: [
2347
+ { value: "", label: "Whole genome" },
2348
+ ...this.chromosomes.filter((c) => c != "chrM" && c != "chrMT").map((c) => ({ value: c, label: c }))
2349
+ ],
2350
+ title: "Show the DMRs called de novo across the whole genome, or only those on one chromosome. DMRs are always called over the whole genome, because DMRcate calibrates its cutoff over every CpG tested: one chromosome run alone calls different DMRs. The first scan of a comparison can take a minute or more on a large cohort, longer with the background drift correction; it is cached, so switching chromosomes after that is quick."
2351
+ },
2352
+ {
2353
+ label: "Correct for background drift",
2354
+ type: "checkbox",
2355
+ chartType: "volcano",
2356
+ settingsKey: "backgroundCorrection",
2357
+ boxLabel: "",
2358
+ getDisplayStyle: scanOnly,
2359
+ title: BACKGROUND_CORRECTION_TITLE
2360
+ },
2361
+ {
2362
+ label: "Y axis",
2363
+ type: "radio",
2364
+ chartType: "volcano",
2365
+ settingsKey: "scanYAxis",
2366
+ title: "Which region statistic the volcano and the DMR plot put on the y axis. DMRcate calls DMRs with the min smoothed FDR; it reports the other three for each DMR. Hover over an option for what it measures.",
2367
+ // the background correction plots its own p, so there is nothing to choose then
2368
+ getDisplayStyle: (plot) => isScan(plot) && !plot.settings.volcano.backgroundCorrection ? "" : "none",
2369
+ options: SCAN_Y_AXIS_OPTIONS
2370
+ },
2371
+ {
2372
+ label: "Min CpGs per DMR",
2373
+ type: "number",
2374
+ chartType: "volcano",
2375
+ settingsKey: "minCpgs",
2376
+ getDisplayStyle: scanOnly,
2377
+ min: 1,
2378
+ max: 1e3,
2379
+ title: "Drop DMRs called from fewer CpGs. DMRs of only two or three CpGs tend to carry the largest effect sizes but the least reliable direction, so a \u0394\u03B2-sorted table would lead with the rows that mean least. Applied to the cached scan, so changing it redraws rather than refits."
2380
+ },
2381
+ /* DMRcate's region-shape knobs. Unlike the CpG floor these change the fit's output, so each
2382
+ one refits the scan (and gets its own cache entry). */
2383
+ {
2384
+ label: "DMR bandwidth \u03BB (bp)",
2385
+ type: "number",
2386
+ chartType: "volcano",
2387
+ settingsKey: "lambda",
2388
+ getDisplayStyle: scanOnly,
2389
+ min: 50,
2390
+ max: 1e5,
2391
+ step: 50,
2392
+ title: "DMRcate lambda. Two things at once: the width of the Gaussian kernel that smooths per-CpG statistics along the genome, and the largest gap allowed between significant CpGs chained into one DMR. Larger values merge nearby signal into fewer, wider DMRs and recover broad domains; smaller values split them into narrow, focal regions. DMRcate recommends 1000 bp for CpG-resolution data. Changing it refits the scan."
2393
+ },
2394
+ {
2395
+ label: "DMR kernel scaling C",
2396
+ type: "number",
2397
+ chartType: "volcano",
2398
+ settingsKey: "C",
2399
+ getDisplayStyle: scanOnly,
2400
+ min: 0.5,
2401
+ max: 50,
2402
+ step: 0.5,
2403
+ title: "DMRcate C: the kernel standard deviation is lambda / C. A larger C gives a narrower kernel, so each CpG borrows evidence from fewer neighbours: sharper boundaries and more, smaller DMRs, at the cost of power in sparse regions. A smaller C smooths further. DMRcate recommends 2. Changing it refits the scan."
2404
+ },
2405
+ {
2406
+ label: "Per-CpG FDR cutoff",
2407
+ type: "number",
2408
+ chartType: "volcano",
2409
+ settingsKey: "fdrCutoff",
2410
+ getDisplayStyle: scanOnly,
2411
+ min: 1e-4,
2412
+ max: 0.5,
2413
+ step: 0.01,
2414
+ title: "The FDR a CpG's smoothed statistic must pass to take part in a DMR. Raising it lets weaker CpGs join, which extends DMRs and bridges gaps between them; lowering it keeps only the strongest CpGs, giving shorter, fewer DMRs. DMRcate's default is 0.05. This is not the volcano's significance threshold, which is applied afterwards to each DMR. Changing it refits the scan."
2415
+ },
2416
+ {
2417
+ /* Display width for the methylome-wide profile only. The metric is the 100 kb bin and
2418
+ the Statistics rows stay on it whatever this says -- this is here because 29,000 dots
2419
+ over 1,000 px overlap however small the dot, so the native figure reads as a band. */
2420
+ label: "Profile bin width",
2421
+ type: "dropdown",
2422
+ chartType: "volcano",
2423
+ settingsKey: "profileBinBp",
2424
+ getDisplayStyle: scanOnly,
2425
+ options: [
2426
+ { value: 1e5, label: "100 Kb (native)" },
2427
+ { value: 5e5, label: "500 Kb" },
2428
+ { value: 1e6, label: "1 Mb" },
2429
+ { value: 5e6, label: "5 Mb" }
2430
+ ],
2431
+ // a <select> hands back its value as a string; the setting is a width in bp
2432
+ processInput: (v) => Number(v),
2433
+ title: "How wide a bin the methylome-wide profile draws. 100 kb is the width the metric is computed and reported at (Zhou 2018); the coarser widths average neighbouring bins into one dot, weighted by the CpGs each rests on, so a genome-wide shift is legible instead of hidden in a band of overlapping dots. Display only: the Statistics rows and the fraction-of-bins-moved figures stay on the 100 kb bins, and changing this redraws the cached scan rather than refitting it. The most extreme 1,000 bins per direction stay hoverable at any width."
2434
+ },
2435
+ {
2436
+ label: "Min samples per group",
2437
+ type: "number",
2438
+ chartType: "volcano",
2439
+ settingsKey: "minSamplesPerGroup",
2440
+ title: "Minimum non-NA samples required per group for a promoter to be tested",
2441
+ // the scan resolves its own groups (3+ per group, fixed) and has no per-element NA filter
2442
+ getDisplayStyle: notScan,
2443
+ min: 1,
2444
+ max: 100
2445
+ },
2446
+ {
2447
+ label: "Exclude sex chromosomes",
2448
+ type: "checkbox",
2449
+ chartType: "volcano",
2450
+ settingsKey: "excludeSexChr",
2451
+ boxLabel: "",
2452
+ // the scan honours it too: scanChromosomes() drops chrX/chrY from a whole-genome scan
2453
+ title: "Drop chrX and chrY (promoters, elements, or whole chromosomes from a DMR scan). Recommended for mixed-sex cohorts \u2014 X-inactivation makes chrX methylation strongly sex-dependent, so a sex-imbalanced comparison reports sex rather than the grouping variable. On a scan this also shifts the autosomal DMRs slightly, since the DMRcate prior and its multiple-testing corrections are genome-wide; gene links and gene set enrichment lose the X-linked genes."
2454
+ },
2455
+ {
2456
+ label: "Center \u0394\u03B2 on median",
2457
+ type: "checkbox",
2458
+ chartType: "volcano",
2459
+ settingsKey: "centerDeltaBeta",
2460
+ boxLabel: "",
2461
+ // the background correction is the scan's version of this question
2462
+ getDisplayStyle: notScan,
2463
+ title: 'Move the \u0394\u03B2 origin to the median across all tested elements, so 0 is the typical element rather than no change. Use it to ask "which elements moved MORE than the typical one" \u2014 at a symmetric cutoff, a contrast whose whole distribution sits off zero clears the hyper threshold more easily than the hypo one, which skews the hyper:hypo ratio on its own. Leave it off to ask "which elements gained or lost methylation", since a genuine genome-wide shift is itself a result and centering would subtract it. The \u0394\u03B2 values in the table and its download are unaffected either way.'
2464
+ },
2465
+ {
2466
+ label: "Min \u0394\u03B2",
2467
+ type: "number",
2468
+ chartType: "volcano",
2469
+ settingsKey: "deltaBetaCutoff",
2470
+ title: "Effect-size cutoff for differential methylation, applied to \u0394\u03B2. 0.1 is a 10-percentage-point change in methylation, the conventional floor for calling a region differentially methylated. Kept separate from the log\u2082 cutoff because the two are not interchangeable.",
2471
+ min: 0,
2472
+ max: 1,
2473
+ step: 0.01
2474
+ }
2475
+ ];
2476
+ this.inputs.splice(0, 0, ...dmInputs);
2477
+ }
2478
+ addSingleCellCTControlInputs() {
2479
+ if (this.termType !== SINGLECELL_CELLTYPE) return;
2480
+ const scctInputs = [];
2481
+ this.inputs.splice(0, 0, ...scctInputs);
2482
+ }
2483
+ addSplicingControlInputs() {
2484
+ if (this.termType !== JUNCTION) return;
2485
+ const dsInputs = [
2486
+ {
2487
+ label: "Method",
2488
+ type: "radio",
2489
+ chartType: "volcano",
2490
+ settingsKey: "method",
2491
+ title: "edgeR is a fast screen that also tests each junction. leafcutter is the exact test of a cluster: it takes longer, and has no p-value per junction.",
2492
+ options: getSpliceMethodOptions()
2493
+ },
2494
+ {
2495
+ label: "Minimum counts per cluster",
2496
+ type: "number",
2497
+ chartType: "volcano",
2498
+ settingsKey: "minCountsPerCluster",
2499
+ title: "Threshold on each sample's total read count in the cluster",
2500
+ min: 0,
2501
+ max: 1e4
2502
+ },
2503
+ {
2504
+ /* leafcutter's -i: an intron must be seen in at least this many samples. Defaulted by
2505
+ validateDSSettings to a fraction of cohort size rather than a fixed count, because a
2506
+ fixed one silently loosens as N grows -- 5 samples is a third of a 15-sample run and
2507
+ 0.2% of a 2,500-sample one. Editable here so a user can override that default. */
2508
+ label: "Minimum samples per intron",
2509
+ type: "number",
2510
+ chartType: "volcano",
2511
+ settingsKey: "minSamplesPerIntron",
2512
+ title: "An intron must be observed in at least this many samples to be kept. Defaults to 2% of the cohort, floor 5.",
2513
+ min: 1,
2514
+ max: 1e4
2515
+ },
2516
+ {
2517
+ // leafcutter's -g: the same floor, applied within each of the two groups
2518
+ label: "Minimum samples per group",
2519
+ type: "number",
2520
+ chartType: "volcano",
2521
+ settingsKey: "minSamplesPerGroup",
2522
+ title: "A cluster must have sufficient coverage in at least this many samples in EACH group. Defaults to 1% of the cohort, floor 3.",
2523
+ min: 1,
2524
+ max: 1e4
2525
+ },
2526
+ {
2527
+ /* The cutoff that actually matters for this term type. At large cohorts the p-value
2528
+ stops discriminating -- at ~1000 per group most "significant" clusters shift under a
2529
+ percentage point of PSI -- so the effect size is the filter, not the p. The unit is
2530
+ named in the title because 0.05 here is 5 percentage points, not a p-value. */
2531
+ label: "Minimum |\u0394PSI|",
2532
+ type: "number",
2533
+ chartType: "volcano",
2534
+ settingsKey: "deltaPsiCutoff",
2535
+ title: "Clusters must shift at least this much in PSI to count as significant. 0.05 = 5 percentage points.",
2536
+ min: 0,
2537
+ max: 1,
2538
+ step: 0.01
2539
+ }
2540
+ ];
2541
+ this.inputs.splice(0, 0, ...dsInputs);
2542
+ }
2543
+ getMethodOptions() {
2544
+ if (this.termType !== GENE_EXPRESSION) return;
2545
+ const features = JSON.parse(sessionStorage.getItem("optionalFeatures"));
2546
+ if (features?.runDE_methods?.length) {
2547
+ const opts = [];
2548
+ for (const m of features.runDE_methods) {
2549
+ opts.push({ label: m, value: m.toLowerCase() });
2550
+ }
2551
+ return opts;
2552
+ }
2553
+ return [
2554
+ { label: "edgeR", value: "edgeR" },
2555
+ { label: "Wilcoxon", value: "wilcoxon" },
2556
+ { label: "Limma", value: "limma" }
2557
+ ];
2558
+ }
2559
+ };
2560
+
2561
+ // plots/volcano/Volcano.ts
2562
+ var MIN_WILCOXON_GROUP_SIZE = 20;
2563
+ var Volcano = class _Volcano extends PlotBase {
2564
+ static {
2565
+ this.type = "volcano";
2566
+ }
2567
+ constructor(opts, api) {
2568
+ super(opts, api);
2569
+ if (this.opts.parentId) this.parentId = this.opts.parentId;
2570
+ this.type = _Volcano.type;
2571
+ this.components = {
2572
+ controls: {}
2573
+ };
2574
+ this.termType = opts.termType;
2575
+ const holder = opts.holder.classed("sjpp-volcano-main", true).attr("data-testid", `sjpp-volcano-main-${opts.termType}`);
2576
+ const controls = typeof opts.controls == "object" ? opts.controls : holder || holder.append("div");
2577
+ const error = opts.holder.append("div").attr("id", "sjpp-volcano-error").attr("data-testid", `sjpp-volcano-error-${opts.termType}`).style("opacity", 0.75);
2578
+ this.dom = {
2579
+ holder,
2580
+ controls,
2581
+ error,
2582
+ wait: holder.append("div").attr("id", "sjpp-volcano-wait").attr("data-testid", `sjpp-volcano-wait-${opts.termType}`).style("opacity", 0.75).style("padding", "20px").text("Loading..."),
2583
+ tip: new Menu({ padding: "" }),
2584
+ actionsTip: new Menu({ padding: "" })
2585
+ };
2586
+ }
2587
+ getState(appState) {
2588
+ const config = appState.plots.find((p) => p.id === this.id);
2589
+ if (!config) {
2590
+ throw new Error(
2591
+ `No plot with id='${this.id}' found. Did you set this.id before this.api = getComponentApi(this)?`
2592
+ );
2593
+ }
2594
+ const parentConfig = this.parentId && appState.plots.find((p) => p.id === this.parentId);
2595
+ const termfilter = getCombinedTermFilter(appState, config.filter || parentConfig?.filter);
2596
+ return {
2597
+ config: Object.assign({}, config, {
2598
+ settings: {
2599
+ volcano: config.settings.volcano
2600
+ }
2601
+ }),
2602
+ termfilter
2603
+ };
2604
+ }
2605
+ async setControls() {
2606
+ const plotConfig = this.app.getState().plots.find((p) => p.id === this.id);
2607
+ const controls = new VolcanoControlInputs(
2608
+ plotConfig,
2609
+ this.termType,
2610
+ this.app.vocabApi.termdbConfig?.queries?.dnaMethylation?.elementTypes,
2611
+ this.app.opts.genome?.majorchrorder
2612
+ );
2613
+ this.components.controls = await controlsInit({
2614
+ app: this.app,
2615
+ id: this.id,
2616
+ holder: this.dom.controls.style("display", "inline-block"),
2617
+ inputs: controls.inputs
2618
+ });
2619
+ this.components.controls.on("downloadClick.volcano", () => this.interactions.download(this.termType));
2620
+ if (plotConfig.chartType == "differentialAnalysis")
2621
+ this.components.controls.on(
2622
+ "helpClick.differentialAnalysis",
2623
+ () => (
2624
+ //Opens the page for the differential analysis wiki
2625
+ //Can't put in parent as DA does not have a controls component
2626
+ window.open("https://github.com/stjude/proteinpaint/wiki/Differential-analysis")
2627
+ )
2628
+ );
2629
+ }
2630
+ async init() {
2631
+ this.interactions = new VolcanoInteractions(this.app, this.id, this.dom);
2632
+ this.model = new VolcanoModel(this, this.termType);
2633
+ this.view = new VolcanoPlotView(this.dom, this.interactions, this.termType);
2634
+ await this.setControls();
2635
+ }
2636
+ async main() {
2637
+ if (!this.interactions) throw new Error("Volcano Interactions not initialized");
2638
+ if (!this.model) throw new Error("Volcano Model not initialized");
2639
+ if (!this.view) throw new Error("Volcano View not initialized");
2640
+ const config = structuredClone(this.state.config);
2641
+ if (config.chartType != this.type && config.childType != this.type) return;
2642
+ const settings = config.settings.volcano;
2643
+ let showWait, stopTimer;
2644
+ try {
2645
+ const isScan2 = settings.elementType == DMR_SCAN_ELEMENT_TYPE;
2646
+ const waitText = !isScan2 ? "Loading..." : `Scanning the genome for DMRs${settings.scanChromosome ? ` to show ${settings.scanChromosome}` : ""}... the first scan of a comparison can take a minute or more, and is cached after that.`;
2647
+ this.dom.wait.text(waitText);
2648
+ showWait = setTimeout(() => {
2649
+ this.dom.wait.style("display", "block");
2650
+ }, 500);
2651
+ if (this.termType == DNA_METHYLATION) stopTimer = startElapsedTimer(this.dom.wait, waitText);
2652
+ const response = await this.model.getData(config, settings);
2653
+ this.dom.error.text("");
2654
+ if (!response || response.error || !response.data || !response.data.volcanoPng || !response.data.totalRows) {
2655
+ const msg = response?.error || "No data returned from server";
2656
+ if (response?.code === "CACHE_BUSY") {
2657
+ if (window.confirm(msg)) this.main();
2658
+ } else sayerror(this.dom.error, msg);
2659
+ return;
2660
+ }
2661
+ const viewModel = new VolcanoViewModel(config, response, settings);
2662
+ this.interactions.pValueTableData = viewModel.viewData.pValueTableData;
2663
+ this.interactions.data = response.data.dots;
2664
+ this.interactions.daRequest = response.daRequest;
2665
+ this.interactions.totalSignificantRows = response.data.totalSignificantRows;
2666
+ this.interactions.provenance = viewModel.viewData.provenance;
2667
+ this.interactions.fetchAllRows = async () => {
2668
+ const full = await new VolcanoModel(this, this.termType).getData(config, {
2669
+ ...settings,
2670
+ maxInteractiveDots: null
2671
+ });
2672
+ if (!full || full.error || !full.data?.dots) throw new Error(full?.error || "no rows returned");
2673
+ return new VolcanoViewModel(config, full, settings).viewData.pValueTableData;
2674
+ };
2675
+ this.view.render(settings, viewModel.viewData);
2676
+ const notes = [];
2677
+ if (!response.data.dots.length) notes.push("No points passed the significance thresholds.");
2678
+ const smallestGroup = Math.min(response.sample_size1, response.sample_size2);
2679
+ if (settings.method == "wilcoxon" && smallestGroup < MIN_WILCOXON_GROUP_SIZE) {
2680
+ const samplesLabel = uiLabel(this.app.vocabApi.termdbConfig?.uiLabels, "samples", "samples");
2681
+ notes.push(
2682
+ `The smaller group has ${smallestGroup.toLocaleString()} ${samplesLabel}. Wilcoxon p-values are approximated here, and a gene that is zero in most ${samplesLabel} can be assigned a p-value far smaller than its group sizes can support. Rank these results by fold change rather than by p-value magnitude, and do not compare the p-values against another analysis.`
2683
+ );
2684
+ }
2685
+ if (notes.length) this.dom.error.text(notes.join(" ")).style("color", "#555");
2686
+ } catch (e) {
2687
+ if (e instanceof Error) console.error(e.message || e);
2688
+ else if (e.stack) console.log(e.stack);
2689
+ throw e;
2690
+ } finally {
2691
+ clearTimeout(showWait);
2692
+ stopTimer?.();
2693
+ this.dom.wait.style("display", "none");
2694
+ }
2695
+ }
2696
+ };
2697
+ var volcanoInit = getCompInit(Volcano);
2698
+ var componentInit = volcanoInit;
2699
+ async function getPlotConfig(opts, app) {
2700
+ if (!opts.termType) throw new Error(".termType is required");
2701
+ const config = {
2702
+ settings: {
2703
+ // app is passed through so the defaults can read the dataset's preferred starting
2704
+ // element class from termdbConfig; opts alone does not carry it
2705
+ volcano: getDefaultVolcanoSettings(opts.overrides, { ...opts, app })
2706
+ },
2707
+ highlightedData: opts.highlightedData || [],
2708
+ termType: opts.termType
2709
+ };
2710
+ if (opts.termType == GENE_EXPRESSION || opts.termType == DNA_METHYLATION) {
2711
+ if (opts.confounderTws) {
2712
+ try {
2713
+ for (const tw of opts.confounderTws) {
2714
+ await fillTermWrapper(tw, app.vocabApi);
2715
+ }
2716
+ } catch (e) {
2717
+ console.error(e.message || e);
2718
+ throw new Error(`Volcano getPlotConfig() failed to fill confounder term wrappers: ${e}`);
2719
+ }
2720
+ }
2721
+ Object.assign(config, {
2722
+ confounderTws: opts.confounderTws || [],
2723
+ samplelst: opts.samplelst
2724
+ });
2725
+ }
2726
+ if (opts.termType == SINGLECELL_CELLTYPE) {
2727
+ Object.assign(config, {
2728
+ //TODO: Fix this logic
2729
+ sample: opts.experimentID || opts.sample || opts.samples?.[0]?.experiments[0]?.experimentID,
2730
+ termId: app.vocabApi.termdbConfig.queries.singleCell.DEgenes.termId,
2731
+ //TODO: 'Cluster' is a fallback for development
2732
+ //Should require opts.categoryName in the future
2733
+ categoryName: opts.categoryName || "Cluster"
2734
+ });
2735
+ }
2736
+ validateVolcanoSettings(config, opts);
2737
+ return copyMerge(config, opts);
2738
+ }
2739
+ export {
2740
+ Volcano,
2741
+ componentInit,
2742
+ getPlotConfig,
2743
+ volcanoInit
2744
+ };
2745
+ //# sourceMappingURL=Volcano-TZQF3HY6.js.map