@sjcrh/proteinpaint-client 2.225.0 → 2.227.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (951) hide show
  1. package/dist/2dmaf-B34EJADN.js +1362 -0
  2. package/dist/AggMatrixInput-USCXGZT2.js +402 -0
  3. package/dist/AggregateMatrix-VLCSBD65.js +37 -0
  4. package/dist/AppHeader-KE7QVEW5.js +826 -0
  5. package/dist/BoxPlot-3H5QKYRD.js +1247 -0
  6. package/dist/CorrelationVolcano-ACEJOJS6.js +613 -0
  7. package/dist/CorrelationVolcano-ACEJOJS6.js.map +7 -0
  8. package/dist/Cuminc-6LPS4LR7.js +1217 -0
  9. package/dist/DE-TTKEQYC7.js +85 -0
  10. package/dist/DEinput-W7WEO2NO.js +483 -0
  11. package/dist/DEinput-W7WEO2NO.js.map +7 -0
  12. package/dist/DM-2TUF6Q3C.js +86 -0
  13. package/dist/DifferentialAnalysis-3LP4RAWF.js +236 -0
  14. package/dist/Disco-UP5C7UWX.js +3445 -0
  15. package/dist/Disco.UI-V4I4LOMF.js +239 -0
  16. package/dist/DmrPlot-TZR2NGIH.js +366 -0
  17. package/dist/GB-4NRY4YMF.js +1388 -0
  18. package/dist/GB-4NRY4YMF.js.map +7 -0
  19. package/dist/GSEA-YGKBRJJO.js +870 -0
  20. package/dist/GeneExpInput-L3J2ECVQ.js +38 -0
  21. package/dist/Geomap-4MHU6F57.js +80 -0
  22. package/dist/HicApp-27VGP5F6.js +2240 -0
  23. package/dist/IDCViewer-37GJPPUY.js +10810 -0
  24. package/dist/NumBinaryEditor-SEC2NDGG.js +274 -0
  25. package/dist/NumBinaryEditor.unit.spec-UDYSUC4S.js +308 -0
  26. package/dist/NumContEditor-YPSYWU2A.js +100 -0
  27. package/dist/NumContEditor.unit.spec-NHFBMHQ5.js +160 -0
  28. package/dist/NumCustomBinEditor-N7US5Q64.js +29 -0
  29. package/dist/NumCustomBinEditor.unit.spec-2BMMUBYU.js +393 -0
  30. package/dist/NumDiscreteEditor-BLQ5DEB7.js +165 -0
  31. package/dist/NumDiscreteEditor.unit.spec-JOFPUFU5.js +229 -0
  32. package/dist/NumRegularBinEditor-7BFPBUW2.js +29 -0
  33. package/dist/NumRegularBinEditor.unit.spec-6GZMNRHA.js +274 -0
  34. package/dist/NumSplineEditor-LO3ZR3T3.js +205 -0
  35. package/dist/NumSplineEditor.unit.spec-MRA3DQSB.js +220 -0
  36. package/dist/NumericDensity-NUCVJZ74.js +29 -0
  37. package/dist/NumericDensity.unit.spec-TZLKWH4U.js +414 -0
  38. package/dist/NumericHandler-NH533VBN.js +30 -0
  39. package/dist/NumericHandler.unit.spec-V7MNEHML.js +225 -0
  40. package/dist/ProteomeInput-FEXWZOA2.js +610 -0
  41. package/dist/Regression-NJAPUGT7.js +1412 -0
  42. package/dist/RunChart2-QIJ6NUWY.js +744 -0
  43. package/dist/SC-5NWBVOEE.js +1290 -0
  44. package/dist/Violin-TMACI43Q.js +1105 -0
  45. package/dist/Volcano-BMLHQEXU.js +2745 -0
  46. package/dist/Volcano-BMLHQEXU.js.map +7 -0
  47. package/dist/Wsi-5TWAOBFG.js +650 -0
  48. package/dist/Wsi-5TWAOBFG.js.map +7 -0
  49. package/dist/aboutSunburst-53YAWTV5.js +93 -0
  50. package/dist/adSandbox-7VHXEI7W.js +29 -0
  51. package/dist/animatedBubbleChart-CTFGJIRR.js +542 -0
  52. package/dist/app-AQAQAPUN.js +38 -0
  53. package/dist/app-SZDIV5U4.js +28 -0
  54. package/dist/app.js +12 -12
  55. package/dist/bam-3U5R2KNC.js +872 -0
  56. package/dist/barchart-ZL5VSR7P.js +38 -0
  57. package/dist/barchart2-YELP2HI7.js +305 -0
  58. package/dist/block-AGX6Z4BR.js +6208 -0
  59. package/dist/block-AGX6Z4BR.js.map +7 -0
  60. package/dist/block.init-IBITFICI.js +29 -0
  61. package/dist/block.mds.expressionrank-4L76ILD4.js +350 -0
  62. package/dist/block.mds.geneboxplot-XA7DFHPV.js +819 -0
  63. package/dist/block.mds.junction-GTZD3HEN.js +1534 -0
  64. package/dist/block.mds.svcnv-HTXQ3LGR.js +6325 -0
  65. package/dist/block.svg-BM6OMVRF.js +155 -0
  66. package/dist/block.tk.aicheck-CV53ULEP.js +274 -0
  67. package/dist/block.tk.bam-KJYFNJCX.js +1906 -0
  68. package/dist/block.tk.bigwig.ui-A352D6PT.js +202 -0
  69. package/dist/block.tk.hicstraw-QAFTQESL.js +814 -0
  70. package/dist/block.tk.junction-XURB4RWZ.js +2353 -0
  71. package/dist/block.tk.junction.textmatrixui-RNRWWNGY.js +190 -0
  72. package/dist/block.tk.ld-GWJMVPX3.js +90 -0
  73. package/dist/block.tk.menu-BJZYFMQX.js +1050 -0
  74. package/dist/block.tk.pgv-7XNJTHEW.js +934 -0
  75. package/dist/brainImaging-37EDZLGN.js +550 -0
  76. package/dist/brainRegions-FEW52QUB.js +213 -0
  77. package/dist/bubbleHeatmap-YN34AA4H.js +374 -0
  78. package/dist/bubbleHeatmap-YN34AA4H.js.map +7 -0
  79. package/dist/cellTypeBubbleHeatmap-X4K63FOK.js +274 -0
  80. package/dist/cellTypeBubbleHeatmap-X4K63FOK.js.map +7 -0
  81. package/dist/chunk-24CVFDVW.js +1219 -0
  82. package/dist/chunk-24CVFDVW.js.map +7 -0
  83. package/dist/chunk-2B3CYHUF.js +30 -0
  84. package/dist/chunk-2IAELUCN.js +348 -0
  85. package/dist/chunk-2W6U53AG.js +195 -0
  86. package/dist/chunk-46GCGTHJ.js +1339 -0
  87. package/dist/chunk-4ZX5KHD7.js +96 -0
  88. package/dist/chunk-544DSOC3.js +466 -0
  89. package/dist/chunk-6CV3YVJD.js +194 -0
  90. package/dist/chunk-6UHSGC6G.js +276 -0
  91. package/dist/chunk-6ZZGFZV2.js +35 -0
  92. package/dist/chunk-72FUMSAN.js +6375 -0
  93. package/dist/chunk-7DC4PD5R.js +182 -0
  94. package/dist/chunk-7ISYXUJ7.js +243 -0
  95. package/dist/chunk-7NVFEGCE.js +30 -0
  96. package/dist/chunk-7PQ6MLKG.js +1253 -0
  97. package/dist/chunk-BGPRKPKH.js +56 -0
  98. package/dist/chunk-BILGOVOR.js +480 -0
  99. package/dist/chunk-BKJLRLQQ.js +2008 -0
  100. package/dist/chunk-BQYMKS7S.js +4521 -0
  101. package/dist/chunk-BQYMKS7S.js.map +7 -0
  102. package/dist/chunk-C4BKP67I.js +123 -0
  103. package/dist/chunk-CFYWQJ7F.js +472 -0
  104. package/dist/chunk-CFYWQJ7F.js.map +7 -0
  105. package/dist/chunk-CQNTAIM3.js +328 -0
  106. package/dist/chunk-CW3IVTRX.js +2685 -0
  107. package/dist/chunk-D7KZWYP5.js +516 -0
  108. package/dist/chunk-DFHERVYA.js +961 -0
  109. package/dist/chunk-DFHERVYA.js.map +7 -0
  110. package/dist/chunk-DNXOZATD.js +848 -0
  111. package/dist/chunk-DXF3YDRG.js +2334 -0
  112. package/dist/chunk-ECBVUPDE.js +626 -0
  113. package/dist/chunk-ES22B563.js +257 -0
  114. package/dist/chunk-FA2B6PKK.js +42 -0
  115. package/dist/chunk-FMHSDIVG.js +2932 -0
  116. package/dist/chunk-G5UFOMON.js +255 -0
  117. package/dist/chunk-GKA6USKV.js +550 -0
  118. package/dist/chunk-HGIPR72Y.js +299 -0
  119. package/dist/chunk-IBUDYN5E.js +468 -0
  120. package/dist/chunk-J37WYVIZ.js +418 -0
  121. package/dist/chunk-JG5CF5Q3.js +397 -0
  122. package/dist/chunk-JI632MAR.js +400 -0
  123. package/dist/chunk-JI632MAR.js.map +7 -0
  124. package/dist/chunk-JKPMBNRM.js +100 -0
  125. package/dist/chunk-JKPMBNRM.js.map +7 -0
  126. package/dist/chunk-JSQH233D.js +263 -0
  127. package/dist/chunk-JWWLSDVM.js +296 -0
  128. package/dist/chunk-KGK4JJ4L.js +830 -0
  129. package/dist/chunk-KGK4JJ4L.js.map +7 -0
  130. package/dist/chunk-KTJUDDVQ.js +340 -0
  131. package/dist/chunk-MY5MF4RI.js +55 -0
  132. package/dist/chunk-P4ZGUPGA.js +56 -0
  133. package/dist/chunk-PQDYA3ZQ.js +274 -0
  134. package/dist/chunk-PVJ6IIFA.js +176 -0
  135. package/dist/chunk-QGG5MTIL.js +161 -0
  136. package/dist/chunk-QGG5MTIL.js.map +7 -0
  137. package/dist/chunk-QKVKQD6S.js +184 -0
  138. package/dist/chunk-QNACCFOA.js +48 -0
  139. package/dist/chunk-QNACCFOA.js.map +7 -0
  140. package/dist/chunk-R6O3FLKW.js +141 -0
  141. package/dist/chunk-RFQQRF6Q.js +54 -0
  142. package/dist/chunk-RG27DDKN.js +267 -0
  143. package/dist/chunk-SB5DR4NL.js +562 -0
  144. package/dist/chunk-SF42FFDZ.js +2799 -0
  145. package/dist/chunk-SORR4JHU.js +14 -0
  146. package/dist/chunk-SZEBQMZW.js +50 -0
  147. package/dist/chunk-THDOHHDN.js +102 -0
  148. package/dist/chunk-TXDCZOPG.js +305 -0
  149. package/dist/chunk-U6GSEOBY.js +54 -0
  150. package/dist/chunk-UBTNM5RO.js +203 -0
  151. package/dist/chunk-UHZDDPUU.js +444 -0
  152. package/dist/chunk-UVES3USV.js +134 -0
  153. package/dist/chunk-UYA5LCAR.js +281 -0
  154. package/dist/chunk-VHEXNBCO.js +379 -0
  155. package/dist/chunk-VJJJFEOU.js +96 -0
  156. package/dist/chunk-VJJJFEOU.js.map +7 -0
  157. package/dist/chunk-VPRP24DY.js +2095 -0
  158. package/dist/chunk-VPRP24DY.js.map +7 -0
  159. package/dist/chunk-VVWZ4BOI.js +2349 -0
  160. package/dist/chunk-WENNRY5E.js +170 -0
  161. package/dist/chunk-WTLUZOBK.js +103 -0
  162. package/dist/chunk-YBXQBSFY.js +26888 -0
  163. package/dist/chunk-YBXQBSFY.js.map +7 -0
  164. package/dist/chunk-ZLEGHQOO.js +217 -0
  165. package/dist/chunk-ZO7KUAIF.js +5258 -0
  166. package/dist/chunk-ZO7KUAIF.js.map +7 -0
  167. package/dist/chunk-ZX7527EE.js +240 -0
  168. package/dist/cohort-NKRTCX5Z.js +66 -0
  169. package/dist/cohortSunburst-DFJW6WXU.js +402 -0
  170. package/dist/condition-PYFOEVX5.js +323 -0
  171. package/dist/controls-RVNIN66W.js +30 -0
  172. package/dist/controls.config-XVEYYBI4.js +30 -0
  173. package/dist/correlation-MNL4DGSW.js +91 -0
  174. package/dist/customdata.inputui-WFIIJATQ.js +280 -0
  175. package/dist/dataDownload-CMSP5FA4.js +326 -0
  176. package/dist/databrowser.ui-FYZPXXEJ.js +424 -0
  177. package/dist/dictionary-76BXY6WU.js +109 -0
  178. package/dist/dnaMethylation-WTIJVNIU.js +29 -0
  179. package/dist/dnaMethylation.integration.spec-YXQEFLC5.js +194 -0
  180. package/dist/dnaMethylation.unit.spec-22FLJWVB.js +95 -0
  181. package/dist/dnaMethylation.unit.spec-22FLJWVB.js.map +7 -0
  182. package/dist/dofetch-XID2XEJT.js +49 -0
  183. package/dist/e2pca-DD6DA7X3.js +340 -0
  184. package/dist/ep-S4PI4AUJ.js +1247 -0
  185. package/dist/expclust.gdc.spec-BDV4RJO6.js +298 -0
  186. package/dist/facet-EOXEW2LN.js +556 -0
  187. package/dist/gb-AKE7RDPB.js +77 -0
  188. package/dist/geneExpClustering-73ED7HIN.js +240 -0
  189. package/dist/geneExpression-AEJILDKJ.js +29 -0
  190. package/dist/geneExpression-NXDXXKEA.js +309 -0
  191. package/dist/geneExpression.unit.spec-VUJWR4TA.js +150 -0
  192. package/dist/geneExpression.unit.spec-VUJWR4TA.js.map +7 -0
  193. package/dist/geneORA-7KFQ4PW2.js +269 -0
  194. package/dist/geneRanking-RKJU4PM2.js +544 -0
  195. package/dist/geneVariant-2AGC3ECG.js +32 -0
  196. package/dist/geneVariant-PWMXP6H4.js +289 -0
  197. package/dist/geneVariant-PWMXP6H4.js.map +7 -0
  198. package/dist/geneVariant.integration.spec-UJXGQEZG.js +672 -0
  199. package/dist/genefusion.ui-KEBOA3TK.js +299 -0
  200. package/dist/geneset-BU6V3CB5.js +199 -0
  201. package/dist/genomeBrowser.spec-BGQHJZKH.js +272 -0
  202. package/dist/grin2-OUZN5LOU.js +66 -0
  203. package/dist/grin2-WRGQ7BDG.js +945 -0
  204. package/dist/hierCluster-3ERW47JJ.js +51 -0
  205. package/dist/hierCluster-JAFKBC6C.js +55 -0
  206. package/dist/hierCluster.config-QIJNY5OD.js +32 -0
  207. package/dist/hierCluster.integration.spec-XA4K3UU6.js +479 -0
  208. package/dist/hierCluster.interactivity-RDFPQOOP.js +45 -0
  209. package/dist/hierCluster.renderers-SU5IYI33.js +18 -0
  210. package/dist/imagePlot-J4PHG7V2.js +152 -0
  211. package/dist/importPlot-U67MZZXY.js +8 -0
  212. package/dist/isoformExpression-K5BCDJLL.js +31 -0
  213. package/dist/isoformExpression.unit.spec-35FHEO27.js +233 -0
  214. package/dist/junction-6GGWFF2J.js +32 -0
  215. package/dist/junction.unit.spec-7EJK4HML.js +224 -0
  216. package/dist/junction.unit.spec-7EJK4HML.js.map +7 -0
  217. package/dist/launch.adhoc-ONCSL65L.js +33 -0
  218. package/dist/leftlabel.sample-H5G3U7AA.js +260 -0
  219. package/dist/leftlabel.sample-H5G3U7AA.js.map +7 -0
  220. package/dist/lollipop-BWP4BG7Q.js +162 -0
  221. package/dist/maf-GV6JHWYK.js +451 -0
  222. package/dist/maftimeline-HE7XLJWG.js +583 -0
  223. package/dist/matrix-IAM6SA7K.js +50 -0
  224. package/dist/matrix-QF5MBV5Y.js +55 -0
  225. package/dist/matrix.cells-A5E63KDN.js +25 -0
  226. package/dist/matrix.config-VLRMO7J2.js +33 -0
  227. package/dist/matrix.data-R4FW2PQH.js +22 -0
  228. package/dist/matrix.groups-3UH2KOIY.js +25 -0
  229. package/dist/matrix.integration.spec-57YYARQU.js +3156 -0
  230. package/dist/matrix.interactivity-KNRJSSTQ.js +33 -0
  231. package/dist/matrix.layout-OMNDDITA.js +35 -0
  232. package/dist/matrix.legend-SE7SQTNN.js +19 -0
  233. package/dist/matrix.renderers-6MMW7XMU.js +30 -0
  234. package/dist/matrix.serieses-BEZCQDLJ.js +18 -0
  235. package/dist/matrix.sort-KRNS4VPF.js +25 -0
  236. package/dist/matrix.sort.unit.spec-UXTQPKVV.js +464 -0
  237. package/dist/matrix.sorterUi.unit.spec-LJJ7GCEB.js +334 -0
  238. package/dist/matrix.unit.spec-2OSFPN5T.js +146 -0
  239. package/dist/mavb-CZAZO6AO.js +726 -0
  240. package/dist/mds.samplescatterplot-ENSEO2VX.js +1545 -0
  241. package/dist/mds.survivalplot-QSKD6FSX.js +472 -0
  242. package/dist/multivalue-FZTFADA2.js +79 -0
  243. package/dist/numericDictTermCluster-IFIEM3E4.js +62 -0
  244. package/dist/oncomatrix-GZKCAMSR.js +286 -0
  245. package/dist/oncomatrix.spec-FTLMVGTH.js +439 -0
  246. package/dist/plot.2dvaf-PWO4XOFU.js +368 -0
  247. package/dist/plot.app-JYBZEBHK.js +32 -0
  248. package/dist/plot.barplot-PA2PDVOB.js +93 -0
  249. package/dist/plot.boxplot-IHIEWQWG.js +142 -0
  250. package/dist/plot.brainImaging-WQ2WWEW3.js +51 -0
  251. package/dist/plot.disco-QIURLAHA.js +100 -0
  252. package/dist/plot.ssgq-T27XDC4K.js +130 -0
  253. package/dist/plot.vaf2cov-Y2DJRQED.js +249 -0
  254. package/dist/polar2-3MFBRZ4G.js +228 -0
  255. package/dist/profileForms-J3O7XDHY.js +937 -0
  256. package/dist/profilePlot-C45ERAOZ.js +45 -0
  257. package/dist/proteinView-F2EVY7V5.js +1346 -0
  258. package/dist/proteinView-F2EVY7V5.js.map +7 -0
  259. package/dist/proteomeCohortCompare-2IS7GNJZ.js +866 -0
  260. package/dist/pseudbulk.unit.spec-SY3ATAPK.js +82 -0
  261. package/dist/pseudobulk-N6WNHKAC.js +31 -0
  262. package/dist/qualitative-SKUTWJLA.js +34 -0
  263. package/dist/qualitative-XWN5V3EE.js +241 -0
  264. package/dist/radar2-AHZME5CF.js +323 -0
  265. package/dist/radarFacility2-CVEVC4U5.js +331 -0
  266. package/dist/render-S47OJIIP.js +29 -0
  267. package/dist/report-IPX3PKSW.js +213 -0
  268. package/dist/sampleView-OZQUKPVV.js +39 -0
  269. package/dist/samplelst-7XXJTJ4J.js +114 -0
  270. package/dist/samplematrix-JN35HJBG.js +2188 -0
  271. package/dist/sc-6ZHDNPYP.js +77 -0
  272. package/dist/scatter-4MP6TG67.js +84 -0
  273. package/dist/scatter-TRMY47CC.js +919 -0
  274. package/dist/selectGenomeWithTklst-UDNTL544.js +125 -0
  275. package/dist/singleCellCellType-UXABRPQQ.js +29 -0
  276. package/dist/singleCellCellType.unit.spec-N22EQMZW.js +150 -0
  277. package/dist/singleCellGeneExpression-OBPVP6IU.js +29 -0
  278. package/dist/singleCellGeneExpression.unit.spec-NVCFU5B4.js +144 -0
  279. package/dist/singleCellNumericValue-Z2X3LLRB.js +29 -0
  280. package/dist/singleCellNumericValue.unit.spec-Q7DCQHEE.js +412 -0
  281. package/dist/singleCellPlot-S5N6ZEEA.js +44 -0
  282. package/dist/singlecell-OK2P4AS2.js +1562 -0
  283. package/dist/singlecell-RI6HA3NI.js +77 -0
  284. package/dist/snp-XRM2UAEJ.js +29 -0
  285. package/dist/snp.unit.spec-CDTYGH4K.js +167 -0
  286. package/dist/snplocus-CAUGDRZE.js +200 -0
  287. package/dist/snplst-DP533FL2.js +36 -0
  288. package/dist/spliceevent.a53ss.diagram-XWEN4UMO.js +142 -0
  289. package/dist/spliceevent.exonskip.diagram-HBXQOUT4.js +274 -0
  290. package/dist/spliceevent.noeventdiagram-ORQJ62ON.js +451 -0
  291. package/dist/ssGSEA-PLDZ2556.js +29 -0
  292. package/dist/ssGSEA.unit.spec-ORFJFZJY.js +79 -0
  293. package/dist/stattable-GVRVRO2Y.js +112 -0
  294. package/dist/studyCatalog-K46WJHC6.js +457 -0
  295. package/dist/summarizeCnvGeneexp-7WSJTWKH.js +154 -0
  296. package/dist/summarizeGeneexpSurvival-H3TW7I4I.js +101 -0
  297. package/dist/summarizeMutationCnv-JOYXEMFP.js +155 -0
  298. package/dist/summarizeMutationDiagnosis-GBIGXFY5.js +31 -0
  299. package/dist/summarizeMutationSurvival-3RULG3KW.js +95 -0
  300. package/dist/summary-VKLFTPC2.js +40 -0
  301. package/dist/summary.integration.spec-EK3MPFVD.js +405 -0
  302. package/dist/summaryInput-POI5KQSP.js +238 -0
  303. package/dist/sunburst-BIVYHF5R.js +274 -0
  304. package/dist/sunburst-SYHQOCGQ.js +34 -0
  305. package/dist/survival-CG2GQ4YY.js +1248 -0
  306. package/dist/survival-NEO3E2HS.js +49 -0
  307. package/dist/survival.integration.spec-PPK5KO4V.js +609 -0
  308. package/dist/svgraph-Q2U2HEMF.js +1377 -0
  309. package/dist/svmr-HKFHKGLI.js +3574 -0
  310. package/dist/svmr-HKFHKGLI.js.map +7 -0
  311. package/dist/swimmer-GA4C6YH7.js +993 -0
  312. package/dist/table-DJJIES6L.js +192 -0
  313. package/dist/termCollection-CHVUM5C6.js +247 -0
  314. package/dist/termCollection-R3LTBPJ4.js +29 -0
  315. package/dist/termCollection.unit.spec-B7KAAOFT.js +295 -0
  316. package/dist/termCollectionFractionSelection-A72QM36J.js +38 -0
  317. package/dist/termCollectionFractionSelection.unit.spec-JR77QEIG.js +184 -0
  318. package/dist/tk-GRGKFATN.js +38 -0
  319. package/dist/tk-WV2G2UPY.js +1224 -0
  320. package/dist/tk-WV2G2UPY.js.map +7 -0
  321. package/dist/tp.ui-NATRJ5EN.js +1453 -0
  322. package/dist/tvs.categorical-U2ZYLPSW.js +28 -0
  323. package/dist/tvs.condition-6EBZALR4.js +160 -0
  324. package/dist/tvs.dt-H626ESMQ.js +34 -0
  325. package/dist/tvs.dtcnv.categorical-6S7INDYC.js +31 -0
  326. package/dist/tvs.dtcnv.continuous-MLYNEMHI.js +72 -0
  327. package/dist/tvs.dtfusion-2OLY6X7G.js +31 -0
  328. package/dist/tvs.dtitd-Z6MEL5SH.js +31 -0
  329. package/dist/tvs.dtsnvindel-HPBQSCYV.js +31 -0
  330. package/dist/tvs.dtsv-BRRNX64J.js +31 -0
  331. package/dist/tvs.multivalue-H2G7WKAL.js +84 -0
  332. package/dist/tvs.numeric-OKYGMQSK.js +32 -0
  333. package/dist/tvs.samplelst-46FGACU7.js +95 -0
  334. package/dist/tvs.survival-QL4KC3SQ.js +110 -0
  335. package/dist/tvs.termCollection-22DFW3PF.js +118 -0
  336. package/dist/vocabulary-LJEERZJ6.js +32 -0
  337. package/dist/wsi.direct-3GGVEVQ4.js +11600 -0
  338. package/dist/wsi.direct-3GGVEVQ4.js.map +7 -0
  339. package/package.json +3 -3
  340. package/dist/2dmaf-4W2R2HXG.js +0 -1362
  341. package/dist/AggMatrixInput-3SQ7UW5L.js +0 -402
  342. package/dist/AggregateMatrix-QI55DXDU.js +0 -37
  343. package/dist/AppHeader-C26OHIUQ.js +0 -826
  344. package/dist/BoxPlot-27OYBGJ3.js +0 -1247
  345. package/dist/CorrelationVolcano-XIMXCSHG.js +0 -613
  346. package/dist/CorrelationVolcano-XIMXCSHG.js.map +0 -7
  347. package/dist/Cuminc-737O733E.js +0 -1217
  348. package/dist/DE-EDTGDY6L.js +0 -85
  349. package/dist/DEinput-ZN76I5M5.js +0 -479
  350. package/dist/DEinput-ZN76I5M5.js.map +0 -7
  351. package/dist/DM-25IRANGL.js +0 -86
  352. package/dist/DifferentialAnalysis-7HQYEA5T.js +0 -236
  353. package/dist/Disco-4YNXWGRX.js +0 -3445
  354. package/dist/Disco.UI-67HBGS4Y.js +0 -239
  355. package/dist/DmrPlot-KZVDVPUT.js +0 -366
  356. package/dist/GB-HT3B7Y7R.js +0 -1388
  357. package/dist/GB-HT3B7Y7R.js.map +0 -7
  358. package/dist/GSEA-CMFMNK5Y.js +0 -870
  359. package/dist/GeneExpInput-HMGV23E7.js +0 -38
  360. package/dist/Geomap-RB4SGVPC.js +0 -80
  361. package/dist/HicApp-YRP6YQFA.js +0 -2240
  362. package/dist/IDCViewer-OUSOZNSR.js +0 -10810
  363. package/dist/NumBinaryEditor-YFQDPBB6.js +0 -274
  364. package/dist/NumBinaryEditor.unit.spec-6YC5PCPK.js +0 -308
  365. package/dist/NumContEditor-EH6MA2RW.js +0 -100
  366. package/dist/NumContEditor.unit.spec-Q2JBVIRT.js +0 -160
  367. package/dist/NumCustomBinEditor-USQA3BC6.js +0 -29
  368. package/dist/NumCustomBinEditor.unit.spec-PE2HFRCK.js +0 -393
  369. package/dist/NumDiscreteEditor-VKE4WT24.js +0 -165
  370. package/dist/NumDiscreteEditor.unit.spec-JNG673LE.js +0 -229
  371. package/dist/NumRegularBinEditor-KCCPGJSX.js +0 -29
  372. package/dist/NumRegularBinEditor.unit.spec-4BLKQRZU.js +0 -274
  373. package/dist/NumSplineEditor-4YELHGUO.js +0 -205
  374. package/dist/NumSplineEditor.unit.spec-CKHHK6GH.js +0 -220
  375. package/dist/NumericDensity-LCFM7VSY.js +0 -29
  376. package/dist/NumericDensity.unit.spec-R4ARTJ5I.js +0 -414
  377. package/dist/NumericHandler-2OHRSY6Z.js +0 -30
  378. package/dist/NumericHandler.unit.spec-M3TRIFZW.js +0 -225
  379. package/dist/ProteomeInput-G2EP6QH2.js +0 -610
  380. package/dist/Regression-2HKE6C7F.js +0 -1412
  381. package/dist/RunChart2-WRVW63PB.js +0 -744
  382. package/dist/SC-37RDNFGH.js +0 -1290
  383. package/dist/Violin-KD6FPWC7.js +0 -1105
  384. package/dist/Volcano-U62TCDEL.js +0 -2748
  385. package/dist/Volcano-U62TCDEL.js.map +0 -7
  386. package/dist/Wsi-PB77PVAA.js +0 -637
  387. package/dist/Wsi-PB77PVAA.js.map +0 -7
  388. package/dist/aboutSunburst-5Z24ODIN.js +0 -93
  389. package/dist/adSandbox-AFORHU3V.js +0 -29
  390. package/dist/animatedBubbleChart-F75OBRZW.js +0 -542
  391. package/dist/app-4RZ76DZZ.js +0 -28
  392. package/dist/app-IHE3RNI5.js +0 -38
  393. package/dist/bam-IIRZX3IK.js +0 -872
  394. package/dist/barchart-UIHRIMOE.js +0 -38
  395. package/dist/barchart2-DG3S6FDJ.js +0 -305
  396. package/dist/block-COZKGPXY.js +0 -6203
  397. package/dist/block-COZKGPXY.js.map +0 -7
  398. package/dist/block.init-UBXYVTPQ.js +0 -29
  399. package/dist/block.mds.expressionrank-KSXPPPGR.js +0 -350
  400. package/dist/block.mds.geneboxplot-5RDFDVDE.js +0 -819
  401. package/dist/block.mds.junction-LMM24KXJ.js +0 -1534
  402. package/dist/block.mds.svcnv-4XRXZMPS.js +0 -6325
  403. package/dist/block.svg-VAKLMPMS.js +0 -155
  404. package/dist/block.tk.aicheck-6GHZK2YY.js +0 -274
  405. package/dist/block.tk.bam-7H3BSHR2.js +0 -1906
  406. package/dist/block.tk.bigwig.ui-KX2GACY5.js +0 -202
  407. package/dist/block.tk.hicstraw-OOWEWGMF.js +0 -814
  408. package/dist/block.tk.junction-U7W36OZA.js +0 -2353
  409. package/dist/block.tk.junction.textmatrixui-PAMSBYZT.js +0 -190
  410. package/dist/block.tk.ld-RFQPDG7Q.js +0 -90
  411. package/dist/block.tk.menu-JDJU2OGK.js +0 -1050
  412. package/dist/block.tk.pgv-G2UFCQUT.js +0 -934
  413. package/dist/brainImaging-ASAHWZJH.js +0 -550
  414. package/dist/brainRegions-XTJDLUU4.js +0 -213
  415. package/dist/bubbleHeatmap-UPUITTU6.js +0 -374
  416. package/dist/bubbleHeatmap-UPUITTU6.js.map +0 -7
  417. package/dist/cellTypeBubbleHeatmap-25SOXC2Q.js +0 -274
  418. package/dist/cellTypeBubbleHeatmap-25SOXC2Q.js.map +0 -7
  419. package/dist/chunk-2ZYAC3DC.js +0 -299
  420. package/dist/chunk-325X3T7G.js +0 -692
  421. package/dist/chunk-325X3T7G.js.map +0 -7
  422. package/dist/chunk-3UXHTSZJ.js +0 -159
  423. package/dist/chunk-3UXHTSZJ.js.map +0 -7
  424. package/dist/chunk-4DFKK46J.js +0 -96
  425. package/dist/chunk-54W2RWRB.js +0 -123
  426. package/dist/chunk-5QGC2624.js +0 -54
  427. package/dist/chunk-5YKXYWP3.js +0 -480
  428. package/dist/chunk-6B4AME6E.js +0 -4389
  429. package/dist/chunk-6B4AME6E.js.map +0 -7
  430. package/dist/chunk-6H4FFHFQ.js +0 -82
  431. package/dist/chunk-6H4FFHFQ.js.map +0 -7
  432. package/dist/chunk-72QBXULB.js +0 -102
  433. package/dist/chunk-7APH7QLC.js +0 -141
  434. package/dist/chunk-7HBAALWJ.js +0 -2685
  435. package/dist/chunk-7UK7CU4F.js +0 -398
  436. package/dist/chunk-7UK7CU4F.js.map +0 -7
  437. package/dist/chunk-7ZTUUKLX.js +0 -203
  438. package/dist/chunk-A7GCFL3R.js +0 -30
  439. package/dist/chunk-AGWIWLOP.js +0 -14
  440. package/dist/chunk-CHQ43UJQ.js +0 -397
  441. package/dist/chunk-CQWR4QZO.js +0 -70
  442. package/dist/chunk-CQWR4QZO.js.map +0 -7
  443. package/dist/chunk-D6TLBMIX.js +0 -1339
  444. package/dist/chunk-DDABG5BR.js +0 -328
  445. package/dist/chunk-DR5JLHTB.js +0 -35
  446. package/dist/chunk-E2Z4X6C2.js +0 -55
  447. package/dist/chunk-E4WAVMI5.js +0 -194
  448. package/dist/chunk-EM76Y3HQ.js +0 -1253
  449. package/dist/chunk-ES7XNERS.js +0 -468
  450. package/dist/chunk-F2RTD23W.js +0 -848
  451. package/dist/chunk-FEE2HAON.js +0 -418
  452. package/dist/chunk-G5BQJGRA.js +0 -2799
  453. package/dist/chunk-GAYYXHOG.js +0 -257
  454. package/dist/chunk-GDIKNIEA.js +0 -263
  455. package/dist/chunk-GIZTZCE5.js +0 -195
  456. package/dist/chunk-GONC3LVY.js +0 -626
  457. package/dist/chunk-HGC4EON3.js +0 -348
  458. package/dist/chunk-HM23KADV.js +0 -281
  459. package/dist/chunk-I7R6YROK.js +0 -267
  460. package/dist/chunk-JWX6GEWQ.js +0 -276
  461. package/dist/chunk-K4LZR3HU.js +0 -56
  462. package/dist/chunk-K55KOEI6.js +0 -6375
  463. package/dist/chunk-K7YJILBY.js +0 -5254
  464. package/dist/chunk-K7YJILBY.js.map +0 -7
  465. package/dist/chunk-KLJM7HE5.js +0 -2349
  466. package/dist/chunk-LFH5VSSF.js +0 -176
  467. package/dist/chunk-MBWG3QHI.js +0 -1219
  468. package/dist/chunk-MBWG3QHI.js.map +0 -7
  469. package/dist/chunk-MZTVOOR6.js +0 -56
  470. package/dist/chunk-N2JOZ3QD.js +0 -444
  471. package/dist/chunk-NG2U3VHX.js +0 -170
  472. package/dist/chunk-NUGYNLTL.js +0 -2334
  473. package/dist/chunk-OCOB7XJW.js +0 -2008
  474. package/dist/chunk-OGDBTL5C.js +0 -54
  475. package/dist/chunk-OOVVKQSD.js +0 -26747
  476. package/dist/chunk-OOVVKQSD.js.map +0 -7
  477. package/dist/chunk-PAF5KZCR.js +0 -2932
  478. package/dist/chunk-PPICALUF.js +0 -2102
  479. package/dist/chunk-PPICALUF.js.map +0 -7
  480. package/dist/chunk-QFOT5WAZ.js +0 -134
  481. package/dist/chunk-QFQJO7LD.js +0 -472
  482. package/dist/chunk-QFQJO7LD.js.map +0 -7
  483. package/dist/chunk-QGCB5AKN.js +0 -243
  484. package/dist/chunk-QRZRAMHA.js +0 -184
  485. package/dist/chunk-RGOZHZCN.js +0 -103
  486. package/dist/chunk-RJKY22D4.js +0 -240
  487. package/dist/chunk-RZ2HG7G3.js +0 -102
  488. package/dist/chunk-RZ2HG7G3.js.map +0 -7
  489. package/dist/chunk-SI2KSG6E.js +0 -379
  490. package/dist/chunk-U4PLKSSS.js +0 -50
  491. package/dist/chunk-U7G65D2G.js +0 -466
  492. package/dist/chunk-UU3FWU6D.js +0 -305
  493. package/dist/chunk-UXLT7W2N.js +0 -562
  494. package/dist/chunk-VHQDN3OA.js +0 -182
  495. package/dist/chunk-VTMNHAFC.js +0 -30
  496. package/dist/chunk-W3K7KLIR.js +0 -217
  497. package/dist/chunk-WSLS55SH.js +0 -296
  498. package/dist/chunk-XQIB27PB.js +0 -516
  499. package/dist/chunk-XSBGICK5.js +0 -652
  500. package/dist/chunk-XSBGICK5.js.map +0 -7
  501. package/dist/chunk-YHW2RAAG.js +0 -274
  502. package/dist/chunk-Z7CCL464.js +0 -550
  503. package/dist/chunk-ZBNPXXMK.js +0 -42
  504. package/dist/chunk-ZNHC46CT.js +0 -340
  505. package/dist/chunk-ZSTD6Y3K.js +0 -255
  506. package/dist/cohort-ZFGFEEBD.js +0 -66
  507. package/dist/cohortSunburst-EEPGV2RB.js +0 -402
  508. package/dist/condition-7EWFLQSO.js +0 -323
  509. package/dist/controls-QHDSDWKI.js +0 -30
  510. package/dist/controls.config-LBSCZ6GP.js +0 -30
  511. package/dist/correlation-IJQJPNNP.js +0 -91
  512. package/dist/customdata.inputui-TZGX2CUD.js +0 -280
  513. package/dist/dataDownload-33EWD3AD.js +0 -326
  514. package/dist/databrowser.ui-YNKDTAAN.js +0 -424
  515. package/dist/dictionary-OTR6Z5EZ.js +0 -109
  516. package/dist/dnaMethylation-LQTCTOOE.js +0 -29
  517. package/dist/dnaMethylation.integration.spec-U5VQYAK3.js +0 -194
  518. package/dist/dofetch-HLG7G7RX.js +0 -49
  519. package/dist/e2pca-AXDPYR7U.js +0 -340
  520. package/dist/ep-4WK46CH7.js +0 -1247
  521. package/dist/expclust.gdc.spec-CYGWGREQ.js +0 -298
  522. package/dist/facet-IZSSZDHK.js +0 -556
  523. package/dist/gb-AUZBUZFM.js +0 -77
  524. package/dist/geneExpClustering-AQBFLXLP.js +0 -240
  525. package/dist/geneExpression-HDJVPVPK.js +0 -309
  526. package/dist/geneExpression-V4JMTMLI.js +0 -29
  527. package/dist/geneExpression.unit.spec-KFMSDVMX.js +0 -151
  528. package/dist/geneExpression.unit.spec-KFMSDVMX.js.map +0 -7
  529. package/dist/geneORA-LDFFSEMQ.js +0 -269
  530. package/dist/geneRanking-IVKDSNDV.js +0 -544
  531. package/dist/geneVariant-7X7EEUDW.js +0 -289
  532. package/dist/geneVariant-7X7EEUDW.js.map +0 -7
  533. package/dist/geneVariant-TK3FJ22L.js +0 -32
  534. package/dist/geneVariant.integration.spec-ZHAFWQ2O.js +0 -672
  535. package/dist/genefusion.ui-U5YPVXAF.js +0 -299
  536. package/dist/geneset-NSHQ2NDR.js +0 -199
  537. package/dist/genomeBrowser.spec-HP4OQPCV.js +0 -272
  538. package/dist/grin2-5WKONQPG.js +0 -66
  539. package/dist/grin2-V2ZBOJBO.js +0 -945
  540. package/dist/hierCluster-7IOPNYFN.js +0 -55
  541. package/dist/hierCluster-IDBCUKHJ.js +0 -51
  542. package/dist/hierCluster.config-Z4NRL5P5.js +0 -32
  543. package/dist/hierCluster.integration.spec-PHEXOGPI.js +0 -479
  544. package/dist/hierCluster.interactivity-NHZ5EPBV.js +0 -45
  545. package/dist/hierCluster.renderers-WXJUMDFN.js +0 -18
  546. package/dist/imagePlot-NMNCAYS7.js +0 -152
  547. package/dist/importPlot-HZML5XMJ.js +0 -8
  548. package/dist/isoformExpression-4IU4AUQ2.js +0 -31
  549. package/dist/isoformExpression.unit.spec-KKMKU5Z2.js +0 -233
  550. package/dist/junction-EXA2WANI.js +0 -32
  551. package/dist/junction.unit.spec-H3FGTLEP.js +0 -178
  552. package/dist/junction.unit.spec-H3FGTLEP.js.map +0 -7
  553. package/dist/launch.adhoc-YA6FRHSC.js +0 -33
  554. package/dist/leftlabel.sample-N6M4OL2X.js +0 -254
  555. package/dist/leftlabel.sample-N6M4OL2X.js.map +0 -7
  556. package/dist/lollipop-EWLGYDIR.js +0 -162
  557. package/dist/maf-PXMHR3PY.js +0 -451
  558. package/dist/maftimeline-QFKT7PW2.js +0 -583
  559. package/dist/matrix-KASG3KIY.js +0 -55
  560. package/dist/matrix-VSX63V3L.js +0 -50
  561. package/dist/matrix.cells-7TTOQRWU.js +0 -25
  562. package/dist/matrix.config-U3I726EC.js +0 -33
  563. package/dist/matrix.data-Y4DXSR2P.js +0 -22
  564. package/dist/matrix.groups-C5CHYWQZ.js +0 -25
  565. package/dist/matrix.integration.spec-4KWLFXMY.js +0 -3156
  566. package/dist/matrix.interactivity-JK6URU6Z.js +0 -33
  567. package/dist/matrix.layout-KKOA7GGL.js +0 -35
  568. package/dist/matrix.legend-3FFHXTLX.js +0 -19
  569. package/dist/matrix.renderers-F7EWYQWL.js +0 -30
  570. package/dist/matrix.serieses-I4JWWONC.js +0 -18
  571. package/dist/matrix.sort-5JTCLBPB.js +0 -25
  572. package/dist/matrix.sort.unit.spec-EW53F5DT.js +0 -464
  573. package/dist/matrix.sorterUi.unit.spec-OGTYY6GC.js +0 -334
  574. package/dist/matrix.unit.spec-RXKKHRUN.js +0 -146
  575. package/dist/mavb-YI2WEGFI.js +0 -726
  576. package/dist/mds.samplescatterplot-GGJE67MF.js +0 -1545
  577. package/dist/mds.survivalplot-A6DS6FHO.js +0 -472
  578. package/dist/multivalue-3WCYDVL3.js +0 -79
  579. package/dist/numericDictTermCluster-AOTEPNEI.js +0 -62
  580. package/dist/oncomatrix-BB4SB5AJ.js +0 -286
  581. package/dist/oncomatrix.spec-M4ZC3KFC.js +0 -439
  582. package/dist/plot.2dvaf-QUD743E6.js +0 -368
  583. package/dist/plot.app-35I4DJXK.js +0 -32
  584. package/dist/plot.barplot-7OL4HWZB.js +0 -93
  585. package/dist/plot.boxplot-N2VSPDYA.js +0 -142
  586. package/dist/plot.brainImaging-4PIAFROV.js +0 -51
  587. package/dist/plot.disco-6CFYMWU3.js +0 -100
  588. package/dist/plot.ssgq-MGUBQNWE.js +0 -130
  589. package/dist/plot.vaf2cov-KVI2GMG4.js +0 -249
  590. package/dist/polar2-IGAOHGPE.js +0 -228
  591. package/dist/profileForms-MW7JQURG.js +0 -937
  592. package/dist/profilePlot-OVOSFR47.js +0 -45
  593. package/dist/proteinView-LFP5YYMK.js +0 -1346
  594. package/dist/proteinView-LFP5YYMK.js.map +0 -7
  595. package/dist/proteomeCohortCompare-ONYL2UN4.js +0 -866
  596. package/dist/pseudbulk.unit.spec-CGV4JTEK.js +0 -82
  597. package/dist/pseudobulk-WFCQX5KR.js +0 -31
  598. package/dist/qualitative-4SLUE6BW.js +0 -241
  599. package/dist/qualitative-6H674T7D.js +0 -34
  600. package/dist/radar2-QXHO2MQA.js +0 -323
  601. package/dist/radarFacility2-JCVOYMH4.js +0 -331
  602. package/dist/render-IIFS3Y2N.js +0 -29
  603. package/dist/report-NFBB3PUI.js +0 -213
  604. package/dist/sampleView-XQXKIPC7.js +0 -39
  605. package/dist/samplelst-RIC5E2W4.js +0 -114
  606. package/dist/samplematrix-WLCFCPBR.js +0 -2188
  607. package/dist/sc-TXRF7D6F.js +0 -77
  608. package/dist/scatter-JUGGPR4B.js +0 -919
  609. package/dist/scatter-YQ47446T.js +0 -84
  610. package/dist/selectGenomeWithTklst-2ELB6HQK.js +0 -125
  611. package/dist/singleCellCellType-DUTH4SZF.js +0 -29
  612. package/dist/singleCellCellType.unit.spec-PWP6I5PZ.js +0 -150
  613. package/dist/singleCellGeneExpression-3563T7GE.js +0 -29
  614. package/dist/singleCellGeneExpression.unit.spec-66IDCFJC.js +0 -144
  615. package/dist/singleCellNumericValue-XVQTKLTS.js +0 -29
  616. package/dist/singleCellNumericValue.unit.spec-LJSTGKNS.js +0 -412
  617. package/dist/singleCellPlot-MKYJJXSG.js +0 -44
  618. package/dist/singlecell-ANCWPAAO.js +0 -1562
  619. package/dist/singlecell-KMRVFOC5.js +0 -77
  620. package/dist/snp-B5UHGWVD.js +0 -29
  621. package/dist/snp.unit.spec-YAHITASM.js +0 -167
  622. package/dist/snplocus-MLGICRGT.js +0 -200
  623. package/dist/snplst-DZPIQEKI.js +0 -36
  624. package/dist/spliceevent.a53ss.diagram-4NYPSFC2.js +0 -142
  625. package/dist/spliceevent.exonskip.diagram-WLLTP7NP.js +0 -274
  626. package/dist/spliceevent.noeventdiagram-NOSO752Y.js +0 -451
  627. package/dist/ssGSEA-4DVY6Z5U.js +0 -29
  628. package/dist/ssGSEA.unit.spec-UDXV4Q7S.js +0 -79
  629. package/dist/stattable-T5X76Q32.js +0 -112
  630. package/dist/studyCatalog-O3EPBJPW.js +0 -457
  631. package/dist/summarizeCnvGeneexp-ST36TPEJ.js +0 -154
  632. package/dist/summarizeGeneexpSurvival-AZOFCBMT.js +0 -101
  633. package/dist/summarizeMutationCnv-HRCW6BYV.js +0 -155
  634. package/dist/summarizeMutationDiagnosis-RQQO2MOR.js +0 -31
  635. package/dist/summarizeMutationSurvival-UHSUJ7FU.js +0 -95
  636. package/dist/summary-ZMM5ET67.js +0 -40
  637. package/dist/summary.integration.spec-GW5UGDDU.js +0 -405
  638. package/dist/summaryInput-ZO5TPARQ.js +0 -238
  639. package/dist/sunburst-6VJS2SUY.js +0 -34
  640. package/dist/sunburst-LXRG2SFE.js +0 -274
  641. package/dist/survival-QXHY7JRR.js +0 -49
  642. package/dist/survival-U6J6KFN2.js +0 -1248
  643. package/dist/survival.integration.spec-HN3LL6IY.js +0 -609
  644. package/dist/svgraph-CVI27CTM.js +0 -1377
  645. package/dist/svmr-GZHAP5IV.js +0 -3834
  646. package/dist/svmr-GZHAP5IV.js.map +0 -7
  647. package/dist/swimmer-M4JGBO72.js +0 -993
  648. package/dist/table-QO22C2ER.js +0 -192
  649. package/dist/termCollection-EN73BZV5.js +0 -247
  650. package/dist/termCollection-KWNFLRWJ.js +0 -29
  651. package/dist/termCollection.unit.spec-Z27AZUE6.js +0 -295
  652. package/dist/termCollectionFractionSelection-Q7QFEPKA.js +0 -38
  653. package/dist/termCollectionFractionSelection.unit.spec-PYLIFZN5.js +0 -184
  654. package/dist/tk-BISILMKL.js +0 -1198
  655. package/dist/tk-BISILMKL.js.map +0 -7
  656. package/dist/tk-WVEDS5OU.js +0 -38
  657. package/dist/tp.ui-CG36YXBY.js +0 -1453
  658. package/dist/tvs.categorical-GCJISWBS.js +0 -28
  659. package/dist/tvs.condition-YTCVMB3I.js +0 -160
  660. package/dist/tvs.dt-UCSZ5S44.js +0 -34
  661. package/dist/tvs.dtcnv.categorical-KYB6XPL3.js +0 -31
  662. package/dist/tvs.dtcnv.continuous-MJWJNMKJ.js +0 -72
  663. package/dist/tvs.dtfusion-IZCEMTH5.js +0 -31
  664. package/dist/tvs.dtitd-DZ4WWGNO.js +0 -31
  665. package/dist/tvs.dtsnvindel-PMJCV4E7.js +0 -31
  666. package/dist/tvs.dtsv-5K2RNWDH.js +0 -31
  667. package/dist/tvs.multivalue-6NSC6JPR.js +0 -84
  668. package/dist/tvs.numeric-7U2NDY4A.js +0 -32
  669. package/dist/tvs.samplelst-3SIYTFWZ.js +0 -95
  670. package/dist/tvs.survival-Q3F5SLBW.js +0 -110
  671. package/dist/tvs.termCollection-OR73LBNX.js +0 -118
  672. package/dist/vocabulary-RWRAQ4VJ.js +0 -32
  673. package/dist/wsi.direct-HABLR3IF.js +0 -11515
  674. package/dist/wsi.direct-HABLR3IF.js.map +0 -7
  675. /package/dist/{2dmaf-4W2R2HXG.js.map → 2dmaf-B34EJADN.js.map} +0 -0
  676. /package/dist/{AggMatrixInput-3SQ7UW5L.js.map → AggMatrixInput-USCXGZT2.js.map} +0 -0
  677. /package/dist/{AggregateMatrix-QI55DXDU.js.map → AggregateMatrix-VLCSBD65.js.map} +0 -0
  678. /package/dist/{AppHeader-C26OHIUQ.js.map → AppHeader-KE7QVEW5.js.map} +0 -0
  679. /package/dist/{BoxPlot-27OYBGJ3.js.map → BoxPlot-3H5QKYRD.js.map} +0 -0
  680. /package/dist/{Cuminc-737O733E.js.map → Cuminc-6LPS4LR7.js.map} +0 -0
  681. /package/dist/{DE-EDTGDY6L.js.map → DE-TTKEQYC7.js.map} +0 -0
  682. /package/dist/{DM-25IRANGL.js.map → DM-2TUF6Q3C.js.map} +0 -0
  683. /package/dist/{DifferentialAnalysis-7HQYEA5T.js.map → DifferentialAnalysis-3LP4RAWF.js.map} +0 -0
  684. /package/dist/{Disco-4YNXWGRX.js.map → Disco-UP5C7UWX.js.map} +0 -0
  685. /package/dist/{Disco.UI-67HBGS4Y.js.map → Disco.UI-V4I4LOMF.js.map} +0 -0
  686. /package/dist/{DmrPlot-KZVDVPUT.js.map → DmrPlot-TZR2NGIH.js.map} +0 -0
  687. /package/dist/{GSEA-CMFMNK5Y.js.map → GSEA-YGKBRJJO.js.map} +0 -0
  688. /package/dist/{GeneExpInput-HMGV23E7.js.map → GeneExpInput-L3J2ECVQ.js.map} +0 -0
  689. /package/dist/{Geomap-RB4SGVPC.js.map → Geomap-4MHU6F57.js.map} +0 -0
  690. /package/dist/{HicApp-YRP6YQFA.js.map → HicApp-27VGP5F6.js.map} +0 -0
  691. /package/dist/{IDCViewer-OUSOZNSR.js.map → IDCViewer-37GJPPUY.js.map} +0 -0
  692. /package/dist/{NumBinaryEditor-YFQDPBB6.js.map → NumBinaryEditor-SEC2NDGG.js.map} +0 -0
  693. /package/dist/{NumBinaryEditor.unit.spec-6YC5PCPK.js.map → NumBinaryEditor.unit.spec-UDYSUC4S.js.map} +0 -0
  694. /package/dist/{NumContEditor-EH6MA2RW.js.map → NumContEditor-YPSYWU2A.js.map} +0 -0
  695. /package/dist/{NumContEditor.unit.spec-Q2JBVIRT.js.map → NumContEditor.unit.spec-NHFBMHQ5.js.map} +0 -0
  696. /package/dist/{NumCustomBinEditor-USQA3BC6.js.map → NumCustomBinEditor-N7US5Q64.js.map} +0 -0
  697. /package/dist/{NumCustomBinEditor.unit.spec-PE2HFRCK.js.map → NumCustomBinEditor.unit.spec-2BMMUBYU.js.map} +0 -0
  698. /package/dist/{NumDiscreteEditor-VKE4WT24.js.map → NumDiscreteEditor-BLQ5DEB7.js.map} +0 -0
  699. /package/dist/{NumDiscreteEditor.unit.spec-JNG673LE.js.map → NumDiscreteEditor.unit.spec-JOFPUFU5.js.map} +0 -0
  700. /package/dist/{NumRegularBinEditor-KCCPGJSX.js.map → NumRegularBinEditor-7BFPBUW2.js.map} +0 -0
  701. /package/dist/{NumRegularBinEditor.unit.spec-4BLKQRZU.js.map → NumRegularBinEditor.unit.spec-6GZMNRHA.js.map} +0 -0
  702. /package/dist/{NumSplineEditor-4YELHGUO.js.map → NumSplineEditor-LO3ZR3T3.js.map} +0 -0
  703. /package/dist/{NumSplineEditor.unit.spec-CKHHK6GH.js.map → NumSplineEditor.unit.spec-MRA3DQSB.js.map} +0 -0
  704. /package/dist/{NumericDensity-LCFM7VSY.js.map → NumericDensity-NUCVJZ74.js.map} +0 -0
  705. /package/dist/{NumericDensity.unit.spec-R4ARTJ5I.js.map → NumericDensity.unit.spec-TZLKWH4U.js.map} +0 -0
  706. /package/dist/{NumericHandler-2OHRSY6Z.js.map → NumericHandler-NH533VBN.js.map} +0 -0
  707. /package/dist/{NumericHandler.unit.spec-M3TRIFZW.js.map → NumericHandler.unit.spec-V7MNEHML.js.map} +0 -0
  708. /package/dist/{ProteomeInput-G2EP6QH2.js.map → ProteomeInput-FEXWZOA2.js.map} +0 -0
  709. /package/dist/{Regression-2HKE6C7F.js.map → Regression-NJAPUGT7.js.map} +0 -0
  710. /package/dist/{RunChart2-WRVW63PB.js.map → RunChart2-QIJ6NUWY.js.map} +0 -0
  711. /package/dist/{SC-37RDNFGH.js.map → SC-5NWBVOEE.js.map} +0 -0
  712. /package/dist/{Violin-KD6FPWC7.js.map → Violin-TMACI43Q.js.map} +0 -0
  713. /package/dist/{aboutSunburst-5Z24ODIN.js.map → aboutSunburst-53YAWTV5.js.map} +0 -0
  714. /package/dist/{adSandbox-AFORHU3V.js.map → adSandbox-7VHXEI7W.js.map} +0 -0
  715. /package/dist/{animatedBubbleChart-F75OBRZW.js.map → animatedBubbleChart-CTFGJIRR.js.map} +0 -0
  716. /package/dist/{app-4RZ76DZZ.js.map → app-AQAQAPUN.js.map} +0 -0
  717. /package/dist/{app-IHE3RNI5.js.map → app-SZDIV5U4.js.map} +0 -0
  718. /package/dist/{bam-IIRZX3IK.js.map → bam-3U5R2KNC.js.map} +0 -0
  719. /package/dist/{barchart-UIHRIMOE.js.map → barchart-ZL5VSR7P.js.map} +0 -0
  720. /package/dist/{barchart2-DG3S6FDJ.js.map → barchart2-YELP2HI7.js.map} +0 -0
  721. /package/dist/{block.init-UBXYVTPQ.js.map → block.init-IBITFICI.js.map} +0 -0
  722. /package/dist/{block.mds.expressionrank-KSXPPPGR.js.map → block.mds.expressionrank-4L76ILD4.js.map} +0 -0
  723. /package/dist/{block.mds.geneboxplot-5RDFDVDE.js.map → block.mds.geneboxplot-XA7DFHPV.js.map} +0 -0
  724. /package/dist/{block.mds.junction-LMM24KXJ.js.map → block.mds.junction-GTZD3HEN.js.map} +0 -0
  725. /package/dist/{block.mds.svcnv-4XRXZMPS.js.map → block.mds.svcnv-HTXQ3LGR.js.map} +0 -0
  726. /package/dist/{block.svg-VAKLMPMS.js.map → block.svg-BM6OMVRF.js.map} +0 -0
  727. /package/dist/{block.tk.aicheck-6GHZK2YY.js.map → block.tk.aicheck-CV53ULEP.js.map} +0 -0
  728. /package/dist/{block.tk.bam-7H3BSHR2.js.map → block.tk.bam-KJYFNJCX.js.map} +0 -0
  729. /package/dist/{block.tk.bigwig.ui-KX2GACY5.js.map → block.tk.bigwig.ui-A352D6PT.js.map} +0 -0
  730. /package/dist/{block.tk.hicstraw-OOWEWGMF.js.map → block.tk.hicstraw-QAFTQESL.js.map} +0 -0
  731. /package/dist/{block.tk.junction-U7W36OZA.js.map → block.tk.junction-XURB4RWZ.js.map} +0 -0
  732. /package/dist/{block.tk.junction.textmatrixui-PAMSBYZT.js.map → block.tk.junction.textmatrixui-RNRWWNGY.js.map} +0 -0
  733. /package/dist/{block.tk.ld-RFQPDG7Q.js.map → block.tk.ld-GWJMVPX3.js.map} +0 -0
  734. /package/dist/{block.tk.menu-JDJU2OGK.js.map → block.tk.menu-BJZYFMQX.js.map} +0 -0
  735. /package/dist/{block.tk.pgv-G2UFCQUT.js.map → block.tk.pgv-7XNJTHEW.js.map} +0 -0
  736. /package/dist/{brainImaging-ASAHWZJH.js.map → brainImaging-37EDZLGN.js.map} +0 -0
  737. /package/dist/{brainRegions-XTJDLUU4.js.map → brainRegions-FEW52QUB.js.map} +0 -0
  738. /package/dist/{chunk-A7GCFL3R.js.map → chunk-2B3CYHUF.js.map} +0 -0
  739. /package/dist/{chunk-HGC4EON3.js.map → chunk-2IAELUCN.js.map} +0 -0
  740. /package/dist/{chunk-GIZTZCE5.js.map → chunk-2W6U53AG.js.map} +0 -0
  741. /package/dist/{chunk-D6TLBMIX.js.map → chunk-46GCGTHJ.js.map} +0 -0
  742. /package/dist/{chunk-4DFKK46J.js.map → chunk-4ZX5KHD7.js.map} +0 -0
  743. /package/dist/{chunk-U7G65D2G.js.map → chunk-544DSOC3.js.map} +0 -0
  744. /package/dist/{chunk-E4WAVMI5.js.map → chunk-6CV3YVJD.js.map} +0 -0
  745. /package/dist/{chunk-JWX6GEWQ.js.map → chunk-6UHSGC6G.js.map} +0 -0
  746. /package/dist/{chunk-DR5JLHTB.js.map → chunk-6ZZGFZV2.js.map} +0 -0
  747. /package/dist/{chunk-K55KOEI6.js.map → chunk-72FUMSAN.js.map} +0 -0
  748. /package/dist/{chunk-VHQDN3OA.js.map → chunk-7DC4PD5R.js.map} +0 -0
  749. /package/dist/{chunk-QGCB5AKN.js.map → chunk-7ISYXUJ7.js.map} +0 -0
  750. /package/dist/{chunk-VTMNHAFC.js.map → chunk-7NVFEGCE.js.map} +0 -0
  751. /package/dist/{chunk-EM76Y3HQ.js.map → chunk-7PQ6MLKG.js.map} +0 -0
  752. /package/dist/{chunk-K4LZR3HU.js.map → chunk-BGPRKPKH.js.map} +0 -0
  753. /package/dist/{chunk-5YKXYWP3.js.map → chunk-BILGOVOR.js.map} +0 -0
  754. /package/dist/{chunk-OCOB7XJW.js.map → chunk-BKJLRLQQ.js.map} +0 -0
  755. /package/dist/{chunk-54W2RWRB.js.map → chunk-C4BKP67I.js.map} +0 -0
  756. /package/dist/{chunk-DDABG5BR.js.map → chunk-CQNTAIM3.js.map} +0 -0
  757. /package/dist/{chunk-7HBAALWJ.js.map → chunk-CW3IVTRX.js.map} +0 -0
  758. /package/dist/{chunk-XQIB27PB.js.map → chunk-D7KZWYP5.js.map} +0 -0
  759. /package/dist/{chunk-F2RTD23W.js.map → chunk-DNXOZATD.js.map} +0 -0
  760. /package/dist/{chunk-NUGYNLTL.js.map → chunk-DXF3YDRG.js.map} +0 -0
  761. /package/dist/{chunk-GONC3LVY.js.map → chunk-ECBVUPDE.js.map} +0 -0
  762. /package/dist/{chunk-GAYYXHOG.js.map → chunk-ES22B563.js.map} +0 -0
  763. /package/dist/{chunk-ZBNPXXMK.js.map → chunk-FA2B6PKK.js.map} +0 -0
  764. /package/dist/{chunk-PAF5KZCR.js.map → chunk-FMHSDIVG.js.map} +0 -0
  765. /package/dist/{chunk-ZSTD6Y3K.js.map → chunk-G5UFOMON.js.map} +0 -0
  766. /package/dist/{chunk-Z7CCL464.js.map → chunk-GKA6USKV.js.map} +0 -0
  767. /package/dist/{chunk-2ZYAC3DC.js.map → chunk-HGIPR72Y.js.map} +0 -0
  768. /package/dist/{chunk-ES7XNERS.js.map → chunk-IBUDYN5E.js.map} +0 -0
  769. /package/dist/{chunk-FEE2HAON.js.map → chunk-J37WYVIZ.js.map} +0 -0
  770. /package/dist/{chunk-CHQ43UJQ.js.map → chunk-JG5CF5Q3.js.map} +0 -0
  771. /package/dist/{chunk-GDIKNIEA.js.map → chunk-JSQH233D.js.map} +0 -0
  772. /package/dist/{chunk-WSLS55SH.js.map → chunk-JWWLSDVM.js.map} +0 -0
  773. /package/dist/{chunk-ZNHC46CT.js.map → chunk-KTJUDDVQ.js.map} +0 -0
  774. /package/dist/{chunk-E2Z4X6C2.js.map → chunk-MY5MF4RI.js.map} +0 -0
  775. /package/dist/{chunk-MZTVOOR6.js.map → chunk-P4ZGUPGA.js.map} +0 -0
  776. /package/dist/{chunk-YHW2RAAG.js.map → chunk-PQDYA3ZQ.js.map} +0 -0
  777. /package/dist/{chunk-LFH5VSSF.js.map → chunk-PVJ6IIFA.js.map} +0 -0
  778. /package/dist/{chunk-QRZRAMHA.js.map → chunk-QKVKQD6S.js.map} +0 -0
  779. /package/dist/{chunk-7APH7QLC.js.map → chunk-R6O3FLKW.js.map} +0 -0
  780. /package/dist/{chunk-OGDBTL5C.js.map → chunk-RFQQRF6Q.js.map} +0 -0
  781. /package/dist/{chunk-I7R6YROK.js.map → chunk-RG27DDKN.js.map} +0 -0
  782. /package/dist/{chunk-UXLT7W2N.js.map → chunk-SB5DR4NL.js.map} +0 -0
  783. /package/dist/{chunk-G5BQJGRA.js.map → chunk-SF42FFDZ.js.map} +0 -0
  784. /package/dist/{chunk-AGWIWLOP.js.map → chunk-SORR4JHU.js.map} +0 -0
  785. /package/dist/{chunk-U4PLKSSS.js.map → chunk-SZEBQMZW.js.map} +0 -0
  786. /package/dist/{chunk-72QBXULB.js.map → chunk-THDOHHDN.js.map} +0 -0
  787. /package/dist/{chunk-UU3FWU6D.js.map → chunk-TXDCZOPG.js.map} +0 -0
  788. /package/dist/{chunk-5QGC2624.js.map → chunk-U6GSEOBY.js.map} +0 -0
  789. /package/dist/{chunk-7ZTUUKLX.js.map → chunk-UBTNM5RO.js.map} +0 -0
  790. /package/dist/{chunk-N2JOZ3QD.js.map → chunk-UHZDDPUU.js.map} +0 -0
  791. /package/dist/{chunk-QFOT5WAZ.js.map → chunk-UVES3USV.js.map} +0 -0
  792. /package/dist/{chunk-HM23KADV.js.map → chunk-UYA5LCAR.js.map} +0 -0
  793. /package/dist/{chunk-SI2KSG6E.js.map → chunk-VHEXNBCO.js.map} +0 -0
  794. /package/dist/{chunk-KLJM7HE5.js.map → chunk-VVWZ4BOI.js.map} +0 -0
  795. /package/dist/{chunk-NG2U3VHX.js.map → chunk-WENNRY5E.js.map} +0 -0
  796. /package/dist/{chunk-RGOZHZCN.js.map → chunk-WTLUZOBK.js.map} +0 -0
  797. /package/dist/{chunk-W3K7KLIR.js.map → chunk-ZLEGHQOO.js.map} +0 -0
  798. /package/dist/{chunk-RJKY22D4.js.map → chunk-ZX7527EE.js.map} +0 -0
  799. /package/dist/{cohort-ZFGFEEBD.js.map → cohort-NKRTCX5Z.js.map} +0 -0
  800. /package/dist/{cohortSunburst-EEPGV2RB.js.map → cohortSunburst-DFJW6WXU.js.map} +0 -0
  801. /package/dist/{condition-7EWFLQSO.js.map → condition-PYFOEVX5.js.map} +0 -0
  802. /package/dist/{controls-QHDSDWKI.js.map → controls-RVNIN66W.js.map} +0 -0
  803. /package/dist/{controls.config-LBSCZ6GP.js.map → controls.config-XVEYYBI4.js.map} +0 -0
  804. /package/dist/{correlation-IJQJPNNP.js.map → correlation-MNL4DGSW.js.map} +0 -0
  805. /package/dist/{customdata.inputui-TZGX2CUD.js.map → customdata.inputui-WFIIJATQ.js.map} +0 -0
  806. /package/dist/{dataDownload-33EWD3AD.js.map → dataDownload-CMSP5FA4.js.map} +0 -0
  807. /package/dist/{databrowser.ui-YNKDTAAN.js.map → databrowser.ui-FYZPXXEJ.js.map} +0 -0
  808. /package/dist/{dictionary-OTR6Z5EZ.js.map → dictionary-76BXY6WU.js.map} +0 -0
  809. /package/dist/{dnaMethylation-LQTCTOOE.js.map → dnaMethylation-WTIJVNIU.js.map} +0 -0
  810. /package/dist/{dnaMethylation.integration.spec-U5VQYAK3.js.map → dnaMethylation.integration.spec-YXQEFLC5.js.map} +0 -0
  811. /package/dist/{dofetch-HLG7G7RX.js.map → dofetch-XID2XEJT.js.map} +0 -0
  812. /package/dist/{e2pca-AXDPYR7U.js.map → e2pca-DD6DA7X3.js.map} +0 -0
  813. /package/dist/{ep-4WK46CH7.js.map → ep-S4PI4AUJ.js.map} +0 -0
  814. /package/dist/{expclust.gdc.spec-CYGWGREQ.js.map → expclust.gdc.spec-BDV4RJO6.js.map} +0 -0
  815. /package/dist/{facet-IZSSZDHK.js.map → facet-EOXEW2LN.js.map} +0 -0
  816. /package/dist/{gb-AUZBUZFM.js.map → gb-AKE7RDPB.js.map} +0 -0
  817. /package/dist/{geneExpClustering-AQBFLXLP.js.map → geneExpClustering-73ED7HIN.js.map} +0 -0
  818. /package/dist/{geneExpression-V4JMTMLI.js.map → geneExpression-AEJILDKJ.js.map} +0 -0
  819. /package/dist/{geneExpression-HDJVPVPK.js.map → geneExpression-NXDXXKEA.js.map} +0 -0
  820. /package/dist/{geneORA-LDFFSEMQ.js.map → geneORA-7KFQ4PW2.js.map} +0 -0
  821. /package/dist/{geneRanking-IVKDSNDV.js.map → geneRanking-RKJU4PM2.js.map} +0 -0
  822. /package/dist/{geneVariant-TK3FJ22L.js.map → geneVariant-2AGC3ECG.js.map} +0 -0
  823. /package/dist/{geneVariant.integration.spec-ZHAFWQ2O.js.map → geneVariant.integration.spec-UJXGQEZG.js.map} +0 -0
  824. /package/dist/{genefusion.ui-U5YPVXAF.js.map → genefusion.ui-KEBOA3TK.js.map} +0 -0
  825. /package/dist/{geneset-NSHQ2NDR.js.map → geneset-BU6V3CB5.js.map} +0 -0
  826. /package/dist/{genomeBrowser.spec-HP4OQPCV.js.map → genomeBrowser.spec-BGQHJZKH.js.map} +0 -0
  827. /package/dist/{grin2-5WKONQPG.js.map → grin2-OUZN5LOU.js.map} +0 -0
  828. /package/dist/{grin2-V2ZBOJBO.js.map → grin2-WRGQ7BDG.js.map} +0 -0
  829. /package/dist/{hierCluster-7IOPNYFN.js.map → hierCluster-3ERW47JJ.js.map} +0 -0
  830. /package/dist/{hierCluster-IDBCUKHJ.js.map → hierCluster-JAFKBC6C.js.map} +0 -0
  831. /package/dist/{hierCluster.config-Z4NRL5P5.js.map → hierCluster.config-QIJNY5OD.js.map} +0 -0
  832. /package/dist/{hierCluster.integration.spec-PHEXOGPI.js.map → hierCluster.integration.spec-XA4K3UU6.js.map} +0 -0
  833. /package/dist/{hierCluster.interactivity-NHZ5EPBV.js.map → hierCluster.interactivity-RDFPQOOP.js.map} +0 -0
  834. /package/dist/{hierCluster.renderers-WXJUMDFN.js.map → hierCluster.renderers-SU5IYI33.js.map} +0 -0
  835. /package/dist/{imagePlot-NMNCAYS7.js.map → imagePlot-J4PHG7V2.js.map} +0 -0
  836. /package/dist/{importPlot-HZML5XMJ.js.map → importPlot-U67MZZXY.js.map} +0 -0
  837. /package/dist/{isoformExpression-4IU4AUQ2.js.map → isoformExpression-K5BCDJLL.js.map} +0 -0
  838. /package/dist/{isoformExpression.unit.spec-KKMKU5Z2.js.map → isoformExpression.unit.spec-35FHEO27.js.map} +0 -0
  839. /package/dist/{junction-EXA2WANI.js.map → junction-6GGWFF2J.js.map} +0 -0
  840. /package/dist/{launch.adhoc-YA6FRHSC.js.map → launch.adhoc-ONCSL65L.js.map} +0 -0
  841. /package/dist/{lollipop-EWLGYDIR.js.map → lollipop-BWP4BG7Q.js.map} +0 -0
  842. /package/dist/{maf-PXMHR3PY.js.map → maf-GV6JHWYK.js.map} +0 -0
  843. /package/dist/{maftimeline-QFKT7PW2.js.map → maftimeline-HE7XLJWG.js.map} +0 -0
  844. /package/dist/{matrix-KASG3KIY.js.map → matrix-IAM6SA7K.js.map} +0 -0
  845. /package/dist/{matrix-VSX63V3L.js.map → matrix-QF5MBV5Y.js.map} +0 -0
  846. /package/dist/{matrix.cells-7TTOQRWU.js.map → matrix.cells-A5E63KDN.js.map} +0 -0
  847. /package/dist/{matrix.config-U3I726EC.js.map → matrix.config-VLRMO7J2.js.map} +0 -0
  848. /package/dist/{matrix.data-Y4DXSR2P.js.map → matrix.data-R4FW2PQH.js.map} +0 -0
  849. /package/dist/{matrix.groups-C5CHYWQZ.js.map → matrix.groups-3UH2KOIY.js.map} +0 -0
  850. /package/dist/{matrix.integration.spec-4KWLFXMY.js.map → matrix.integration.spec-57YYARQU.js.map} +0 -0
  851. /package/dist/{matrix.interactivity-JK6URU6Z.js.map → matrix.interactivity-KNRJSSTQ.js.map} +0 -0
  852. /package/dist/{matrix.layout-KKOA7GGL.js.map → matrix.layout-OMNDDITA.js.map} +0 -0
  853. /package/dist/{matrix.legend-3FFHXTLX.js.map → matrix.legend-SE7SQTNN.js.map} +0 -0
  854. /package/dist/{matrix.renderers-F7EWYQWL.js.map → matrix.renderers-6MMW7XMU.js.map} +0 -0
  855. /package/dist/{matrix.serieses-I4JWWONC.js.map → matrix.serieses-BEZCQDLJ.js.map} +0 -0
  856. /package/dist/{matrix.sort-5JTCLBPB.js.map → matrix.sort-KRNS4VPF.js.map} +0 -0
  857. /package/dist/{matrix.sort.unit.spec-EW53F5DT.js.map → matrix.sort.unit.spec-UXTQPKVV.js.map} +0 -0
  858. /package/dist/{matrix.sorterUi.unit.spec-OGTYY6GC.js.map → matrix.sorterUi.unit.spec-LJJ7GCEB.js.map} +0 -0
  859. /package/dist/{matrix.unit.spec-RXKKHRUN.js.map → matrix.unit.spec-2OSFPN5T.js.map} +0 -0
  860. /package/dist/{mavb-YI2WEGFI.js.map → mavb-CZAZO6AO.js.map} +0 -0
  861. /package/dist/{mds.samplescatterplot-GGJE67MF.js.map → mds.samplescatterplot-ENSEO2VX.js.map} +0 -0
  862. /package/dist/{mds.survivalplot-A6DS6FHO.js.map → mds.survivalplot-QSKD6FSX.js.map} +0 -0
  863. /package/dist/{multivalue-3WCYDVL3.js.map → multivalue-FZTFADA2.js.map} +0 -0
  864. /package/dist/{numericDictTermCluster-AOTEPNEI.js.map → numericDictTermCluster-IFIEM3E4.js.map} +0 -0
  865. /package/dist/{oncomatrix-BB4SB5AJ.js.map → oncomatrix-GZKCAMSR.js.map} +0 -0
  866. /package/dist/{oncomatrix.spec-M4ZC3KFC.js.map → oncomatrix.spec-FTLMVGTH.js.map} +0 -0
  867. /package/dist/{plot.2dvaf-QUD743E6.js.map → plot.2dvaf-PWO4XOFU.js.map} +0 -0
  868. /package/dist/{plot.app-35I4DJXK.js.map → plot.app-JYBZEBHK.js.map} +0 -0
  869. /package/dist/{plot.barplot-7OL4HWZB.js.map → plot.barplot-PA2PDVOB.js.map} +0 -0
  870. /package/dist/{plot.boxplot-N2VSPDYA.js.map → plot.boxplot-IHIEWQWG.js.map} +0 -0
  871. /package/dist/{plot.brainImaging-4PIAFROV.js.map → plot.brainImaging-WQ2WWEW3.js.map} +0 -0
  872. /package/dist/{plot.disco-6CFYMWU3.js.map → plot.disco-QIURLAHA.js.map} +0 -0
  873. /package/dist/{plot.ssgq-MGUBQNWE.js.map → plot.ssgq-T27XDC4K.js.map} +0 -0
  874. /package/dist/{plot.vaf2cov-KVI2GMG4.js.map → plot.vaf2cov-Y2DJRQED.js.map} +0 -0
  875. /package/dist/{polar2-IGAOHGPE.js.map → polar2-3MFBRZ4G.js.map} +0 -0
  876. /package/dist/{profileForms-MW7JQURG.js.map → profileForms-J3O7XDHY.js.map} +0 -0
  877. /package/dist/{profilePlot-OVOSFR47.js.map → profilePlot-C45ERAOZ.js.map} +0 -0
  878. /package/dist/{proteomeCohortCompare-ONYL2UN4.js.map → proteomeCohortCompare-2IS7GNJZ.js.map} +0 -0
  879. /package/dist/{pseudbulk.unit.spec-CGV4JTEK.js.map → pseudbulk.unit.spec-SY3ATAPK.js.map} +0 -0
  880. /package/dist/{pseudobulk-WFCQX5KR.js.map → pseudobulk-N6WNHKAC.js.map} +0 -0
  881. /package/dist/{qualitative-6H674T7D.js.map → qualitative-SKUTWJLA.js.map} +0 -0
  882. /package/dist/{qualitative-4SLUE6BW.js.map → qualitative-XWN5V3EE.js.map} +0 -0
  883. /package/dist/{radar2-QXHO2MQA.js.map → radar2-AHZME5CF.js.map} +0 -0
  884. /package/dist/{radarFacility2-JCVOYMH4.js.map → radarFacility2-CVEVC4U5.js.map} +0 -0
  885. /package/dist/{render-IIFS3Y2N.js.map → render-S47OJIIP.js.map} +0 -0
  886. /package/dist/{report-NFBB3PUI.js.map → report-IPX3PKSW.js.map} +0 -0
  887. /package/dist/{sampleView-XQXKIPC7.js.map → sampleView-OZQUKPVV.js.map} +0 -0
  888. /package/dist/{samplelst-RIC5E2W4.js.map → samplelst-7XXJTJ4J.js.map} +0 -0
  889. /package/dist/{samplematrix-WLCFCPBR.js.map → samplematrix-JN35HJBG.js.map} +0 -0
  890. /package/dist/{sc-TXRF7D6F.js.map → sc-6ZHDNPYP.js.map} +0 -0
  891. /package/dist/{scatter-YQ47446T.js.map → scatter-4MP6TG67.js.map} +0 -0
  892. /package/dist/{scatter-JUGGPR4B.js.map → scatter-TRMY47CC.js.map} +0 -0
  893. /package/dist/{selectGenomeWithTklst-2ELB6HQK.js.map → selectGenomeWithTklst-UDNTL544.js.map} +0 -0
  894. /package/dist/{singleCellCellType-DUTH4SZF.js.map → singleCellCellType-UXABRPQQ.js.map} +0 -0
  895. /package/dist/{singleCellCellType.unit.spec-PWP6I5PZ.js.map → singleCellCellType.unit.spec-N22EQMZW.js.map} +0 -0
  896. /package/dist/{singleCellGeneExpression-3563T7GE.js.map → singleCellGeneExpression-OBPVP6IU.js.map} +0 -0
  897. /package/dist/{singleCellGeneExpression.unit.spec-66IDCFJC.js.map → singleCellGeneExpression.unit.spec-NVCFU5B4.js.map} +0 -0
  898. /package/dist/{singleCellNumericValue-XVQTKLTS.js.map → singleCellNumericValue-Z2X3LLRB.js.map} +0 -0
  899. /package/dist/{singleCellNumericValue.unit.spec-LJSTGKNS.js.map → singleCellNumericValue.unit.spec-Q7DCQHEE.js.map} +0 -0
  900. /package/dist/{singleCellPlot-MKYJJXSG.js.map → singleCellPlot-S5N6ZEEA.js.map} +0 -0
  901. /package/dist/{singlecell-ANCWPAAO.js.map → singlecell-OK2P4AS2.js.map} +0 -0
  902. /package/dist/{singlecell-KMRVFOC5.js.map → singlecell-RI6HA3NI.js.map} +0 -0
  903. /package/dist/{snp-B5UHGWVD.js.map → snp-XRM2UAEJ.js.map} +0 -0
  904. /package/dist/{snp.unit.spec-YAHITASM.js.map → snp.unit.spec-CDTYGH4K.js.map} +0 -0
  905. /package/dist/{snplocus-MLGICRGT.js.map → snplocus-CAUGDRZE.js.map} +0 -0
  906. /package/dist/{snplst-DZPIQEKI.js.map → snplst-DP533FL2.js.map} +0 -0
  907. /package/dist/{spliceevent.a53ss.diagram-4NYPSFC2.js.map → spliceevent.a53ss.diagram-XWEN4UMO.js.map} +0 -0
  908. /package/dist/{spliceevent.exonskip.diagram-WLLTP7NP.js.map → spliceevent.exonskip.diagram-HBXQOUT4.js.map} +0 -0
  909. /package/dist/{spliceevent.noeventdiagram-NOSO752Y.js.map → spliceevent.noeventdiagram-ORQJ62ON.js.map} +0 -0
  910. /package/dist/{ssGSEA-4DVY6Z5U.js.map → ssGSEA-PLDZ2556.js.map} +0 -0
  911. /package/dist/{ssGSEA.unit.spec-UDXV4Q7S.js.map → ssGSEA.unit.spec-ORFJFZJY.js.map} +0 -0
  912. /package/dist/{stattable-T5X76Q32.js.map → stattable-GVRVRO2Y.js.map} +0 -0
  913. /package/dist/{studyCatalog-O3EPBJPW.js.map → studyCatalog-K46WJHC6.js.map} +0 -0
  914. /package/dist/{summarizeCnvGeneexp-ST36TPEJ.js.map → summarizeCnvGeneexp-7WSJTWKH.js.map} +0 -0
  915. /package/dist/{summarizeGeneexpSurvival-AZOFCBMT.js.map → summarizeGeneexpSurvival-H3TW7I4I.js.map} +0 -0
  916. /package/dist/{summarizeMutationCnv-HRCW6BYV.js.map → summarizeMutationCnv-JOYXEMFP.js.map} +0 -0
  917. /package/dist/{summarizeMutationDiagnosis-RQQO2MOR.js.map → summarizeMutationDiagnosis-GBIGXFY5.js.map} +0 -0
  918. /package/dist/{summarizeMutationSurvival-UHSUJ7FU.js.map → summarizeMutationSurvival-3RULG3KW.js.map} +0 -0
  919. /package/dist/{summary-ZMM5ET67.js.map → summary-VKLFTPC2.js.map} +0 -0
  920. /package/dist/{summary.integration.spec-GW5UGDDU.js.map → summary.integration.spec-EK3MPFVD.js.map} +0 -0
  921. /package/dist/{summaryInput-ZO5TPARQ.js.map → summaryInput-POI5KQSP.js.map} +0 -0
  922. /package/dist/{sunburst-LXRG2SFE.js.map → sunburst-BIVYHF5R.js.map} +0 -0
  923. /package/dist/{sunburst-6VJS2SUY.js.map → sunburst-SYHQOCGQ.js.map} +0 -0
  924. /package/dist/{survival-U6J6KFN2.js.map → survival-CG2GQ4YY.js.map} +0 -0
  925. /package/dist/{survival-QXHY7JRR.js.map → survival-NEO3E2HS.js.map} +0 -0
  926. /package/dist/{survival.integration.spec-HN3LL6IY.js.map → survival.integration.spec-PPK5KO4V.js.map} +0 -0
  927. /package/dist/{svgraph-CVI27CTM.js.map → svgraph-Q2U2HEMF.js.map} +0 -0
  928. /package/dist/{swimmer-M4JGBO72.js.map → swimmer-GA4C6YH7.js.map} +0 -0
  929. /package/dist/{table-QO22C2ER.js.map → table-DJJIES6L.js.map} +0 -0
  930. /package/dist/{termCollection-EN73BZV5.js.map → termCollection-CHVUM5C6.js.map} +0 -0
  931. /package/dist/{termCollection-KWNFLRWJ.js.map → termCollection-R3LTBPJ4.js.map} +0 -0
  932. /package/dist/{termCollection.unit.spec-Z27AZUE6.js.map → termCollection.unit.spec-B7KAAOFT.js.map} +0 -0
  933. /package/dist/{termCollectionFractionSelection-Q7QFEPKA.js.map → termCollectionFractionSelection-A72QM36J.js.map} +0 -0
  934. /package/dist/{termCollectionFractionSelection.unit.spec-PYLIFZN5.js.map → termCollectionFractionSelection.unit.spec-JR77QEIG.js.map} +0 -0
  935. /package/dist/{tk-WVEDS5OU.js.map → tk-GRGKFATN.js.map} +0 -0
  936. /package/dist/{tp.ui-CG36YXBY.js.map → tp.ui-NATRJ5EN.js.map} +0 -0
  937. /package/dist/{tvs.categorical-GCJISWBS.js.map → tvs.categorical-U2ZYLPSW.js.map} +0 -0
  938. /package/dist/{tvs.condition-YTCVMB3I.js.map → tvs.condition-6EBZALR4.js.map} +0 -0
  939. /package/dist/{tvs.dt-UCSZ5S44.js.map → tvs.dt-H626ESMQ.js.map} +0 -0
  940. /package/dist/{tvs.dtcnv.categorical-KYB6XPL3.js.map → tvs.dtcnv.categorical-6S7INDYC.js.map} +0 -0
  941. /package/dist/{tvs.dtcnv.continuous-MJWJNMKJ.js.map → tvs.dtcnv.continuous-MLYNEMHI.js.map} +0 -0
  942. /package/dist/{tvs.dtfusion-IZCEMTH5.js.map → tvs.dtfusion-2OLY6X7G.js.map} +0 -0
  943. /package/dist/{tvs.dtitd-DZ4WWGNO.js.map → tvs.dtitd-Z6MEL5SH.js.map} +0 -0
  944. /package/dist/{tvs.dtsnvindel-PMJCV4E7.js.map → tvs.dtsnvindel-HPBQSCYV.js.map} +0 -0
  945. /package/dist/{tvs.dtsv-5K2RNWDH.js.map → tvs.dtsv-BRRNX64J.js.map} +0 -0
  946. /package/dist/{tvs.multivalue-6NSC6JPR.js.map → tvs.multivalue-H2G7WKAL.js.map} +0 -0
  947. /package/dist/{tvs.numeric-7U2NDY4A.js.map → tvs.numeric-OKYGMQSK.js.map} +0 -0
  948. /package/dist/{tvs.samplelst-3SIYTFWZ.js.map → tvs.samplelst-46FGACU7.js.map} +0 -0
  949. /package/dist/{tvs.survival-Q3F5SLBW.js.map → tvs.survival-QL4KC3SQ.js.map} +0 -0
  950. /package/dist/{tvs.termCollection-OR73LBNX.js.map → tvs.termCollection-22DFW3PF.js.map} +0 -0
  951. /package/dist/{vocabulary-RWRAQ4VJ.js.map → vocabulary-LJEERZJ6.js.map} +0 -0
@@ -0,0 +1,2745 @@
1
+ import {
2
+ downloadManhattanSvg,
3
+ manhattanLayoutDefaults,
4
+ plotManhattan
5
+ } from "./chunk-G5UFOMON.js";
6
+ import {
7
+ VolcanoModel,
8
+ getGroupColors
9
+ } from "./chunk-RG27DDKN.js";
10
+ import {
11
+ CCRE_TRACK_NAME
12
+ } from "./chunk-CQNTAIM3.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-YBXQBSFY.js";
45
+ import "./chunk-HJ6L54YS.js";
46
+ import "./chunk-QKVKQD6S.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-BMLHQEXU.js.map