@sjcrh/proteinpaint-client 2.63.0 → 2.63.2

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 (207) hide show
  1. package/README.md +9 -7
  2. package/dist/{2dmaf-70c0b6bb.js → 2dmaf-0cabb4a4.js} +1 -1
  3. package/dist/{ColorScale-b44d51ef.js → ColorScale-9800a609.js} +1 -1
  4. package/dist/{DEanalysis-b86d0874.js → DEanalysis-567989ff.js} +1 -1
  5. package/dist/{Disco-16cd51c0.js → Disco-5d1404ce.js} +1 -1
  6. package/dist/{Disco.UI-a38a12e6.js → Disco.UI-54228bb6.js} +1 -1
  7. package/dist/{DragControls-0c173a20.js → DragControls-a05737c2.js} +1 -1
  8. package/dist/{DziViewer-5c2d68e7.js → DziViewer-3f466d90.js} +2 -2
  9. package/dist/{FilterRxComp-0e75dd8d.js → FilterRxComp-fc769f34.js} +1 -1
  10. package/dist/{FilterStateless-ad3df967.js → FilterStateless-8f30f856.js} +1 -1
  11. package/dist/{HicApp-bcf8330c.js → HicApp-aac413df.js} +1 -1
  12. package/dist/{OrbitControls-c33cf781.js → OrbitControls-8b7f91ca.js} +1 -1
  13. package/dist/app-59194db0.js +1 -0
  14. package/dist/{app-f91922b4.js → app-71453429.js} +1 -1
  15. package/dist/{app-bfce9bf5.js → app-fb676934.js} +1 -1
  16. package/dist/app.js +1 -1
  17. package/dist/{bam-95f36008.js → bam-e7f6baea.js} +1 -1
  18. package/dist/{barchart-e2af00a8.js → barchart-ef4874c8.js} +1 -1
  19. package/dist/{barchart.events-272fd122.js → barchart.events-e24facf7.js} +1 -1
  20. package/dist/{bars.renderer-f0e5af5a.js → bars.renderer-c46d3f44.js} +1 -1
  21. package/dist/{block-ec76524e.js → block-4f585abe.js} +1 -1
  22. package/dist/block.lazyload-6f83d057.js +1 -0
  23. package/dist/{block.legend-f8cad7e4.js → block.legend-cec87c6f.js} +1 -1
  24. package/dist/{block.mds-20655637.js → block.mds-f5a11c42.js} +1 -1
  25. package/dist/{block.mds.cnv-5feb86a0.js → block.mds.cnv-25423c1e.js} +1 -1
  26. package/dist/{block.mds.expressionrank-c7043f35.js → block.mds.expressionrank-fc1996d5.js} +1 -1
  27. package/dist/{block.mds.expressionstat-4bf457f3.js → block.mds.expressionstat-45b6bf47.js} +1 -1
  28. package/dist/{block.mds.geneboxplot-132e5fe6.js → block.mds.geneboxplot-037df46d.js} +1 -1
  29. package/dist/{block.mds.junction-1f9810df.js → block.mds.junction-00161de6.js} +1 -1
  30. package/dist/{block.mds.svcnv-094c416f.js → block.mds.svcnv-0c257af4.js} +1 -1
  31. package/dist/{block.mds.svcnv.share-bb976e02.js → block.mds.svcnv.share-c0b9dfad.js} +1 -1
  32. package/dist/{block.mds2-7045e32c.js → block.mds2-9009f8d8.js} +1 -1
  33. package/dist/{block.svg-d8d76ba7.js → block.svg-86bbfcb0.js} +1 -1
  34. package/dist/{block.tk.aicheck-317d04bd.js → block.tk.aicheck-a5697794.js} +1 -1
  35. package/dist/{block.tk.ase-d1577ec1.js → block.tk.ase-ad1be47c.js} +1 -1
  36. package/dist/{block.tk.bam-3cdc13a0.js → block.tk.bam-14339d16.js} +1 -1
  37. package/dist/{block.tk.bedgraphdot-5304e06c.js → block.tk.bedgraphdot-efe19e56.js} +1 -1
  38. package/dist/{block.tk.bigwig.ui-0c96dce5.js → block.tk.bigwig.ui-a92f286b.js} +1 -1
  39. package/dist/{block.tk.hicstraw-39d89269.js → block.tk.hicstraw-57fbbe61.js} +1 -1
  40. package/dist/{block.tk.junction-b45b3a95.js → block.tk.junction-64c39cd5.js} +1 -1
  41. package/dist/{block.tk.junction.textmatrixui-6ec019e1.js → block.tk.junction.textmatrixui-09e5e02f.js} +1 -1
  42. package/dist/{block.tk.ld-5c54e58b.js → block.tk.ld-f681d099.js} +1 -1
  43. package/dist/{block.tk.menu-30a2c3a5.js → block.tk.menu-2563364c.js} +1 -1
  44. package/dist/{block.tk.pgv-7ff2dfaf.js → block.tk.pgv-9dfc00c0.js} +1 -1
  45. package/dist/{boxplot-7de25274.js → boxplot-a2e1ace0.js} +1 -1
  46. package/dist/brainImaging-21701238.js +1 -0
  47. package/dist/{brush-db0ed33a.js → brush-bb4566a3.js} +1 -1
  48. package/dist/{categorical-bc309399.js → categorical-a00f4ffc.js} +1 -1
  49. package/dist/{condition-f0eb2343.js → condition-2034db37.js} +1 -1
  50. package/dist/{controls-8d4972c8.js → controls-0467d2ec.js} +1 -1
  51. package/dist/{controls.btns-bad9e4cf.js → controls.btns-ad7b28a2.js} +1 -1
  52. package/dist/{controls.config-e0f394cb.js → controls.config-6cf816fb.js} +1 -1
  53. package/dist/{controls.divide-d8ac5a9b.js → controls.divide-3c0d52d7.js} +1 -1
  54. package/dist/{controls.overlay-3ac8773d.js → controls.overlay-3a55c2ec.js} +1 -1
  55. package/dist/{controls.term1-008f4be4.js → controls.term1-59f4cd60.js} +1 -1
  56. package/dist/cuminc-8d21132b.js +1 -0
  57. package/dist/{customdata.inputui-58cd9b32.js → customdata.inputui-40ba6d7f.js} +1 -1
  58. package/dist/{dataDownload-91da6dd6.js → dataDownload-bfa92dad.js} +1 -1
  59. package/dist/{databrowser.ui-c50862e4.js → databrowser.ui-4799f04d.js} +1 -1
  60. package/dist/{density-7c3f91eb.js → density-4c2b53f6.js} +1 -1
  61. package/dist/{dictionary-48a38837.js → dictionary-89e860ee.js} +1 -1
  62. package/dist/{drag-c354e2c6.js → drag-88d451b4.js} +1 -1
  63. package/dist/{e2pca-3bba91fa.js → e2pca-8a3f2566.js} +1 -1
  64. package/dist/{ep-144d8973.js → ep-5399c5cc.js} +1 -1
  65. package/dist/{fusion.parse-ae1253f4.js → fusion.parse-fc25e5bd.js} +1 -1
  66. package/dist/{geneExpClustering-96d09008.js → geneExpClustering-a916ebda.js} +1 -1
  67. package/dist/{geneExpression-d6494fd3.js → geneExpression-501e95c0.js} +1 -1
  68. package/dist/{geneExpression-9ca2da4f.js → geneExpression-9047481a.js} +1 -1
  69. package/dist/{geneExpression-be9b5da2.js → geneExpression-da4b50f0.js} +1 -1
  70. package/dist/{geneORA-85850143.js → geneORA-ffb2497e.js} +1 -1
  71. package/dist/{geneVariant-3df05e0c.js → geneVariant-7ab521d6.js} +1 -1
  72. package/dist/{geneVariant-3d674865.js → geneVariant-d79431a2.js} +1 -1
  73. package/dist/{genefusion.ui-3e2a3a73.js → genefusion.ui-3ce190c7.js} +1 -1
  74. package/dist/{geneset-3b761b2c.js → geneset-3522bcda.js} +1 -1
  75. package/dist/{genomeBrowser-2105a98f.js → genomeBrowser-9b72eb22.js} +1 -1
  76. package/dist/{genomeBrowser.controls-f9b9bf42.js → genomeBrowser.controls-bef8bf99.js} +1 -1
  77. package/dist/{groupsetting-4901d033.js → groupsetting-574ad150.js} +1 -1
  78. package/dist/{hierCluster-a7ff7f5a.js → hierCluster-3b14b2b3.js} +1 -1
  79. package/dist/{hierCluster.config-3d124abf.js → hierCluster.config-f8686a30.js} +1 -1
  80. package/dist/{hierCluster.interactivity-3463cc0b.js → hierCluster.interactivity-3b5f1e81.js} +1 -1
  81. package/dist/{hierCluster.renderers-668d0075.js → hierCluster.renderers-9f9a7cad.js} +1 -1
  82. package/dist/{html.legend-3e428f9e.js → html.legend-ef8066dd.js} +1 -1
  83. package/dist/{imagePlot-6d89200c.js → imagePlot-095b9a92.js} +1 -1
  84. package/dist/{lasso-393c1570.js → lasso-ef63631b.js} +1 -1
  85. package/dist/{launch.adhoc-9c59874e.js → launch.adhoc-1b356f97.js} +1 -1
  86. package/dist/{legacyDataset-26ead9cc.js → legacyDataset-056e9d4c.js} +1 -1
  87. package/dist/{log-4d74231e.js → log-ca1e2a74.js} +1 -1
  88. package/dist/{lollipop-59f65024.js → lollipop-6ad9ec3c.js} +1 -1
  89. package/dist/{maf-72e5b7da.js → maf-dfada1c8.js} +1 -1
  90. package/dist/{maftimeline-ed8aaae8.js → maftimeline-1b715a01.js} +1 -1
  91. package/dist/{matrix-3d09a31f.js → matrix-3fae58f8.js} +1 -1
  92. package/dist/matrix.cells-3620eb3a.js +1 -0
  93. package/dist/{matrix.cluster-acdfc6a7.js → matrix.cluster-15b8a865.js} +1 -1
  94. package/dist/{matrix.config-cd01ebbd.js → matrix.config-8247bea5.js} +1 -1
  95. package/dist/{matrix.controls-86eb8d5c.js → matrix.controls-dea65894.js} +1 -1
  96. package/dist/{matrix.data-e2d7ac16.js → matrix.data-121a1a8c.js} +1 -1
  97. package/dist/{matrix.dom-e5f91cc0.js → matrix.dom-83c5fa39.js} +1 -1
  98. package/dist/{matrix.groups-f1969b5c.js → matrix.groups-2e1202ef.js} +1 -1
  99. package/dist/{matrix.interactivity-92bc8332.js → matrix.interactivity-2b076155.js} +1 -1
  100. package/dist/{matrix.layout-29a8f334.js → matrix.layout-8dc54c05.js} +1 -1
  101. package/dist/{matrix.legend-8c28039e.js → matrix.legend-e0078739.js} +1 -1
  102. package/dist/matrix.renderers-0c8eddc9.js +1 -0
  103. package/dist/{matrix.serieses-e079f04a.js → matrix.serieses-2898da6b.js} +1 -1
  104. package/dist/{matrix.sort-e1f83454.js → matrix.sort-249d4a35.js} +1 -1
  105. package/dist/{matrix.sorterUi-2025f39d.js → matrix.sorterUi-d26208c8.js} +1 -1
  106. package/dist/{mavb-37fffd68.js → mavb-9a6fa2e9.js} +1 -1
  107. package/dist/{mds.fimo-68f0eaf5.js → mds.fimo-ce97371c.js} +1 -1
  108. package/dist/{mds.samplescatterplot-362f3591.js → mds.samplescatterplot-a54b9e93.js} +1 -1
  109. package/dist/{mds.survivalplot-f5bda05a.js → mds.survivalplot-c5093f73.js} +1 -1
  110. package/dist/{mdsjsonform-7f0b6cc7.js → mdsjsonform-09b4e1cb.js} +1 -1
  111. package/dist/metaboliteIntensity-eeb5ad12.js +1 -0
  112. package/dist/niceNumLabels-ddb76164.js +1 -0
  113. package/dist/{nodrag-777a34a5.js → nodrag-bed2488c.js} +1 -1
  114. package/dist/{numeric-2eb8c25b.js → numeric-d5536b1c.js} +1 -1
  115. package/dist/numeric.binary-d67da945.js +1 -0
  116. package/dist/numeric.continuous-9a0c88bc.js +1 -0
  117. package/dist/numeric.discrete-921f7097.js +1 -0
  118. package/dist/numeric.spline-649308d5.js +1 -0
  119. package/dist/{numeric.toggle-5316211b.js → numeric.toggle-52789fd2.js} +1 -1
  120. package/dist/{oncomatrix-cd9fa01b.js → oncomatrix-6950c48c.js} +1 -1
  121. package/dist/{parseData-1bfa9946.js → parseData-480d1ff3.js} +1 -1
  122. package/dist/{plot.2dvaf-1ed153c1.js → plot.2dvaf-1ecc4bbc.js} +1 -1
  123. package/dist/plot.app-c841507a.js +1 -0
  124. package/dist/{plot.barplot-61742e94.js → plot.barplot-24140b0f.js} +1 -1
  125. package/dist/{plot.boxplot-fe966ac3.js → plot.boxplot-87fe8ab2.js} +1 -1
  126. package/dist/{plot.brainImaging-d2c23bb7.js → plot.brainImaging-325ebded.js} +1 -1
  127. package/dist/{plot.disco-70d493f4.js → plot.disco-621d1b8e.js} +1 -1
  128. package/dist/{plot.dzi-14e6fdc4.js → plot.dzi-3a7e478e.js} +1 -1
  129. package/dist/{plot.ssgq-9d364d41.js → plot.ssgq-1949c207.js} +1 -1
  130. package/dist/{plot.vaf2cov-4d28015b.js → plot.vaf2cov-d03c6409.js} +1 -1
  131. package/dist/{profileBarchart-c104f8e2.js → profileBarchart-11755d7c.js} +1 -1
  132. package/dist/{profileHome-a555583d.js → profileHome-9c5e266b.js} +1 -1
  133. package/dist/{profilePlot-5ce5b6a0.js → profilePlot-8ee3034a.js} +1 -1
  134. package/dist/{profilePolar-610213d4.js → profilePolar-9fe70c32.js} +1 -1
  135. package/dist/{profileRadar-fddb18f7.js → profileRadar-0e744181.js} +1 -1
  136. package/dist/{profileRadarFacility-2c2db1dd.js → profileRadarFacility-102544c5.js} +1 -1
  137. package/dist/{recover-a08c8d01.js → recover-b1ec4fed.js} +1 -1
  138. package/dist/{regression.inputs-5718cf72.js → regression.inputs-ad548745.js} +1 -1
  139. package/dist/{regression.inputs.values.table-d587c1cf.js → regression.inputs.values.table-1618447a.js} +1 -1
  140. package/dist/{regression.results-748024be.js → regression.results-25008028.js} +1 -1
  141. package/dist/{renderPvalueTable-c435aefd.js → renderPvalueTable-46056189.js} +1 -1
  142. package/dist/sampleScatter-47dd82cb.js +1 -0
  143. package/dist/{sampleScatter.interactivity-e9c30652.js → sampleScatter.interactivity-cfa3451d.js} +1 -1
  144. package/dist/{sampleScatter.rendererThree-3e6c032e.js → sampleScatter.rendererThree-c5321d24.js} +2 -2
  145. package/dist/{sampleView-d6a91293.js → sampleView-30b97c7d.js} +1 -1
  146. package/dist/{samplelst-821ec148.js → samplelst-2bdc1b9d.js} +1 -1
  147. package/dist/{samplematrix-7aa0a780.js → samplematrix-4f0ec523.js} +1 -1
  148. package/dist/{scatter-2e2c76f4.js → scatter-8a337eeb.js} +1 -1
  149. package/dist/{selectGenomeWithTklst-51cd21a4.js → selectGenomeWithTklst-895106fb.js} +1 -1
  150. package/dist/{singleCellPlot-c7347a27.js → singleCellPlot-360eaec6.js} +1 -1
  151. package/dist/{singlecell-a668bb17.js → singlecell-29c1cbb1.js} +1 -1
  152. package/dist/{singlecell-7c851ef8.js → singlecell-75f8af89.js} +1 -1
  153. package/dist/{snplocus-fe6f4ba1.js → snplocus-0cafa73c.js} +1 -1
  154. package/dist/{snplst-751cea95.js → snplst-2284d5ce.js} +1 -1
  155. package/dist/{spliceevent.a53ss.diagram-b157f95d.js → spliceevent.a53ss.diagram-44ccabf9.js} +1 -1
  156. package/dist/{spliceevent.exonskip.diagram-071a3467.js → spliceevent.exonskip.diagram-c8d1bdf0.js} +1 -1
  157. package/dist/spliceevent.exonskip.getdefault-9fe16119.js +1 -0
  158. package/dist/{spliceevent.noeventdiagram-1c731f35.js → spliceevent.noeventdiagram-5e244090.js} +1 -1
  159. package/dist/{spliceevent.phrase-7a3bfb00.js → spliceevent.phrase-186eb050.js} +1 -1
  160. package/dist/{stattable-a7713026.js → stattable-886f7dad.js} +1 -1
  161. package/dist/{style.gdc-40ec2784.js → style.gdc-4ac9b96b.js} +1 -1
  162. package/dist/{summary-592d8f81.js → summary-ee2045a5.js} +1 -1
  163. package/dist/{sunburst-452df940.js → sunburst-bbff8818.js} +1 -1
  164. package/dist/survival-04e279f8.js +1 -0
  165. package/dist/{survival-450b6df4.js → survival-d7bd3c6b.js} +1 -1
  166. package/dist/{svg.download-56529955.js → svg.download-54c99186.js} +1 -1
  167. package/dist/{svg.legend-c82b153f.js → svg.legend-28652faa.js} +1 -1
  168. package/dist/{svgraph-3c5cd8d2.js → svgraph-a12d89da.js} +1 -1
  169. package/dist/{svmr-3dd531ef.js → svmr-248055c8.js} +1 -1
  170. package/dist/{table-d6c411fd.js → table-1dae543a.js} +1 -1
  171. package/dist/{table-bf604c50.js → table-b4a61573.js} +1 -1
  172. package/dist/{termInfo-96285f4a.js → termInfo-4c759483.js} +1 -1
  173. package/dist/{termsetting-9a7511e6.js → termsetting-636d2271.js} +1 -1
  174. package/dist/{tk-6a8e5bb0.js → tk-741d4674.js} +1 -1
  175. package/dist/{tp.ui-221efed6.js → tp.ui-23151bb1.js} +1 -1
  176. package/dist/{tvs.density-9fdae0cc.js → tvs.density-9fe0c7fd.js} +1 -1
  177. package/dist/{tvs.geneVariant-149e25b7.js → tvs.geneVariant-1b179327.js} +1 -1
  178. package/dist/tvs.numeric-b4cfc975.js +1 -0
  179. package/dist/{tvs.samplelst-a38e9c2b.js → tvs.samplelst-681358bc.js} +1 -1
  180. package/dist/{uiUtils-a6de7f14.js → uiUtils-74700a01.js} +1 -1
  181. package/dist/{variantBrowser-05375469.js → variantBrowser-910b4bcd.js} +1 -1
  182. package/dist/{vcf-58904308.js → vcf-16ba1e06.js} +1 -1
  183. package/dist/{violin-c1b78717.js → violin-a41b2e2b.js} +1 -1
  184. package/dist/{violin.interactivity-534d6993.js → violin.interactivity-bcf0ccc2.js} +1 -1
  185. package/dist/{violin.renderer-16540fb8.js → violin.renderer-149310eb.js} +1 -1
  186. package/dist/{violinRenderer-688abcb2.js → violinRenderer-71c9f3ab.js} +1 -1
  187. package/dist/{viridis-d3cf2713.js → viridis-81de7bcd.js} +1 -1
  188. package/dist/{y-2d48b9e4.js → y-76c7da8c.js} +1 -1
  189. package/dist/{zoom-2d4ede33.js → zoom-a40839cf.js} +1 -1
  190. package/package.json +7 -7
  191. package/dist/app-de19f41c.js +0 -1
  192. package/dist/block.lazyload-ebd949e4.js +0 -1
  193. package/dist/brainImaging-007edaa3.js +0 -1
  194. package/dist/cuminc-72257faf.js +0 -1
  195. package/dist/matrix.cells-a5157233.js +0 -1
  196. package/dist/matrix.renderers-3b8dfd04.js +0 -1
  197. package/dist/metaboliteIntensity-512257f3.js +0 -1
  198. package/dist/niceNumLabels-8fdc6507.js +0 -1
  199. package/dist/numeric.binary-0a3b17d2.js +0 -1
  200. package/dist/numeric.continuous-f77038de.js +0 -1
  201. package/dist/numeric.discrete-b977e88f.js +0 -1
  202. package/dist/numeric.spline-d64b1abe.js +0 -1
  203. package/dist/plot.app-91a1d78d.js +0 -1
  204. package/dist/sampleScatter-031f47de.js +0 -1
  205. package/dist/spliceevent.exonskip.getdefault-93feb627.js +0 -1
  206. package/dist/survival-6a4c4f12.js +0 -1
  207. package/dist/tvs.numeric-f9ce58bc.js +0 -1
@@ -1 +1 @@
1
- import{d as t,C as n,bm as e}from"./app-f91922b4.js";import{m as a}from"./radiobutton-09bff425.js";async function o(n){const{holder:e,genomes:a}=n;{const n=await t("mdsjsonform",{method:"POST",body:"{}"});if(n.error){e.append("div").text(n.error);return}}const[o,c]=i(e);const g={};g.genome=A(c,a);g.position=s(c);g.name=G(c);m(c,g);b(c,g);_(c,g);d(c,g);y(c,g);S(c,g);window.doms=g;p(o,g)}function i(t){const n=t.append("div");n.append("div").style("font-size","20px").style("margin","10px").text("Create a Custom GenomePaint Track");const e=n.append("div").style("display","grid").style("grid-template-columns","1fr 3fr").style("align-items","start").style("grid-template-rows","1fr 1fr").style("row-gap","15px").style("margins","5px").style("position","relative").style("padding","10px");return[n,e]}function p(n,e){const a=n;a.append("button").style("margin-left","10px").style("margin-top","5px").text("Submit").on("click",(async()=>{o.html("Loading...");try{const n=g(e);const a=n.genome;delete n.genome;const i=await t("mdsjsonform",{method:"POST",body:JSON.stringify({deposit:n})});if(i.error)throw i.error;const p=[window.location.origin+"?block=1","genome="+a,"mdsjsoncache="+i.id];if(n.position){p.push("position="+n.position);delete n.position}o.html("<a href="+p.join("&")+" target=_blank>View track</a>")}catch(t){window.alert("Error: "+t);if(t.stack)console.log(t.stack);c(o);return}}));const o=a.append("span").style("margin-left","10px").style("border","solid 1px #eee").style("padding","2px 9px");c(o);a.append("button").text("Example").style("margin-top","5px").style("margin-left","20px").on("click",(()=>{e.position.property("value","chr7:54990404-55375627");e.name.property("value","TCGA GBM somatic alterations");e.svcnvfileurl.property("value","proteinpaint_demo/hg19/tcga-gbm/gbm.svcnv.hg19.gz");e.vcffileurl.property("value","proteinpaint_demo/hg19/tcga-gbm/gbm.snvindel.vep.vcf.gz");e.expressionfileurl.property("value","proteinpaint_demo/hg19/tcga-gbm/gbm.fpkm.hg19.gz");e.isdense_radios.nodes()[1].click();e.svcnv_radios.nodes()[0].click();e.vcf_radios.nodes()[0].click();e.expression_radios.nodes()[0].click();e.assay_uidiv_inuse.style("display","block");e.assaytrack_bigwig_textarea.property("value",`TCGA-06-0152-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010643_R1.bw\tTCGA-06-0152-02A RNA coverage\nTCGA-06-0152-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010643_R1.bw\tTCGA-06-0152-02A WGS coverage\nTCGA-41-5651-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010602_D1.bw\tTCGA-41-5651-01A RNA coverage\nTCGA-41-5651-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010602_D1.bw\tTCGA-41-5651-01A WGS coverage\nTCGA-02-2483-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010586_D1.bw\tTCGA-02-2483-01A RNA coverage\nTCGA-02-2483-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010586_D1.bw\tTCGA-02-2483-01A WGS coverage\nTCGA-06-0171-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010485_R1.bw\tTCGA-06-0171-02A RNA coverage\nTCGA-06-0171-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010485_R1.bw\tTCGA-06-0171-02A WGS coverage\nTCGA-06-0211-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010540_R1.bw\tTCGA-06-0211-02A RNA coverage\nTCGA-06-0211-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010540_R1.bw\tTCGA-06-0211-02A WGS coverage\nTCGA-26-5135-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010548_D1.bw\tTCGA-26-5135-01A RNA coverage\nTCGA-26-5135-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010548_D1.bw\tTCGA-26-5135-01A WGS coverage\nTCGA-32-1970-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010550_D1.bw\tTCGA-32-1970-01A RNA coverage\nTCGA-32-1970-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010550_D1.bw\tTCGA-32-1970-01A WGS coverage\nTCGA-06-0125-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010572_D1.bw\tTCGA-06-0125-01A RNA coverage\nTCGA-06-0125-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010572_D1.bw\tTCGA-06-0125-01A WGS coverage\nTCGA-26-5132-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010504_D1.bw\tTCGA-26-5132-01A RNA coverage\nTCGA-26-5132-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010504_D1.bw\tTCGA-26-5132-01A WGS coverage\nTCGA-06-0210-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010624_D1.bw\tTCGA-06-0210-01A RNA coverage\nTCGA-06-0210-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010624_D1.bw\tTCGA-06-0210-01A WGS coverage\nTCGA-06-0686-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010607_D1.bw\tTCGA-06-0686-01A RNA coverage\nTCGA-06-0686-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010607_D1.bw\tTCGA-06-0686-01A WGS coverage\nTCGA-14-1402-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010600_R1.bw\tTCGA-14-1402-02A RNA coverage\nTCGA-14-1402-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010600_R1.bw\tTCGA-14-1402-02A WGS coverage\nTCGA-06-0125-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010572_R1.bw\tTCGA-06-0125-02A RNA coverage\nTCGA-06-0125-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010572_R1.bw\tTCGA-06-0125-02A WGS coverage\nTCGA-06-0157-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010633_D1.bw\tTCGA-06-0157-01A RNA coverage\nTCGA-06-0157-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010633_D1.bw\tTCGA-06-0157-01A WGS coverage\nTCGA-06-0190-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010560_D1.bw\tTCGA-06-0190-01A RNA coverage\nTCGA-06-0190-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010560_D1.bw\tTCGA-06-0190-01A WGS coverage\nTCGA-14-2554-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010592_D1.bw\tTCGA-14-2554-01A RNA coverage\nTCGA-14-2554-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010592_D1.bw\tTCGA-14-2554-01A WGS coverage\nTCGA-06-5411-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010518_D1.bw\tTCGA-06-5411-01A RNA coverage\nTCGA-06-5411-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010518_D1.bw\tTCGA-06-5411-01A WGS coverage\nTCGA-19-1389-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010509_R1.bw\tTCGA-19-1389-02A RNA coverage\nTCGA-19-1389-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010509_R1.bw\tTCGA-19-1389-02A WGS coverage\nTCGA-19-2620-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010513_D1.bw\tTCGA-19-2620-01A RNA coverage\nTCGA-19-2620-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010513_D1.bw\tTCGA-19-2620-01A WGS coverage\nTCGA-19-2629-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010627_D1.bw\tTCGA-19-2629-01A RNA coverage\nTCGA-19-2629-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010627_D1.bw\tTCGA-19-2629-01A WGS coverage\nTCGA-02-2485-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010530_D1.bw\tTCGA-02-2485-01A RNA coverage\nTCGA-02-2485-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010530_D1.bw\tTCGA-02-2485-01A WGS coverage\nTCGA-27-2528-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010599_D1.bw\tTCGA-27-2528-01A RNA coverage\nTCGA-27-2528-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010599_D1.bw\tTCGA-27-2528-01A WGS coverage\nTCGA-27-1831-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010641_D1.bw\tTCGA-27-1831-01A RNA coverage\nTCGA-27-1831-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010641_D1.bw\tTCGA-27-1831-01A WGS coverage\nTCGA-06-5415-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010554_D1.bw\tTCGA-06-5415-01A RNA coverage\nTCGA-06-5415-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010554_D1.bw\tTCGA-06-5415-01A WGS coverage\nTCGA-19-5960-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010577_D1.bw\tTCGA-19-5960-01A RNA coverage\nTCGA-19-5960-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010577_D1.bw\tTCGA-19-5960-01A WGS coverage\nTCGA-06-0210-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010624_R1.bw\tTCGA-06-0210-02A RNA coverage\nTCGA-06-0210-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010624_R1.bw\tTCGA-06-0210-02A WGS coverage\nTCGA-15-1444-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010527_D1.bw\tTCGA-15-1444-01A RNA coverage\nTCGA-15-1444-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010527_D1.bw\tTCGA-15-1444-01A WGS coverage\nTCGA-14-1034-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010484_D1.bw\tTCGA-14-1034-01A RNA coverage\nTCGA-14-1034-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010484_D1.bw\tTCGA-14-1034-01A WGS coverage\nTCGA-27-2523-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010559_D1.bw\tTCGA-27-2523-01A RNA coverage\nTCGA-27-2523-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010559_D1.bw\tTCGA-27-2523-01A WGS coverage\nTCGA-06-2557-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010549_D1.bw\tTCGA-06-2557-01A RNA coverage\nTCGA-06-2557-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010549_D1.bw\tTCGA-06-2557-01A WGS coverage\nTCGA-06-2570-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010593_D1.bw\tTCGA-06-2570-01A RNA coverage\nTCGA-06-2570-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010593_D1.bw\tTCGA-06-2570-01A WGS coverage\nTCGA-06-0745-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010515_D1.bw\tTCGA-06-0745-01A RNA coverage\nTCGA-06-0745-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010515_D1.bw\tTCGA-06-0745-01A WGS coverage\nTCGA-14-1034-02B\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010484_R1.bw\tTCGA-14-1034-02B RNA coverage\nTCGA-14-1034-02B\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010484_R1.bw\tTCGA-14-1034-02B WGS coverage\nTCGA-14-1823-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010587_D1.bw\tTCGA-14-1823-01A RNA coverage\nTCGA-14-1823-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010587_D1.bw\tTCGA-14-1823-01A WGS coverage\nTCGA-06-0190-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010560_R1.bw\tTCGA-06-0190-02A RNA coverage\nTCGA-06-0190-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010560_R1.bw\tTCGA-06-0190-02A WGS coverage\nTCGA-06-0211-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010540_D2.bw\tTCGA-06-0211-01A RNA coverage\nTCGA-06-0211-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010540_D2.bw\tTCGA-06-0211-01A WGS coverage\nTCGA-19-2624-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010505_D1.bw\tTCGA-19-2624-01A RNA coverage\nTCGA-19-2624-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010505_D1.bw\tTCGA-19-2624-01A WGS coverage\nTCGA-06-0744-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010537_D1.bw\tTCGA-06-0744-01A RNA coverage\nTCGA-06-0744-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010537_D1.bw\tTCGA-06-0744-01A WGS coverage`);e.assaytrack_junction_textarea.property("value",`TCGA-19-5960-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010577_D1.bam.junction.gz\tTCGA-19-5960-01A RNA junction\nTCGA-06-0190-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010560_D1.bam.junction.gz\tTCGA-06-0190-01A RNA junction\nTCGA-14-1402-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010600_R1.bam.junction.gz\tTCGA-14-1402-02A RNA junction\nTCGA-19-2620-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010513_D1.bam.junction.gz\tTCGA-19-2620-01A RNA junction\nTCGA-06-5411-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010518_D1.bam.junction.gz\tTCGA-06-5411-01A RNA junction\nTCGA-14-1034-02B\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010484_R1.bam.junction.gz\tTCGA-14-1034-02B RNA junction\nTCGA-26-5132-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010504_D1.bam.junction.gz\tTCGA-26-5132-01A RNA junction\nTCGA-14-1034-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010484_D1.bam.junction.gz\tTCGA-14-1034-01A RNA junction\nTCGA-19-2624-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010505_D1.bam.junction.gz\tTCGA-19-2624-01A RNA junction\nTCGA-06-2570-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010593_D1.bam.junction.gz\tTCGA-06-2570-01A RNA junction\nTCGA-06-0210-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010624_D1.bam.junction.gz\tTCGA-06-0210-01A RNA junction\nTCGA-06-0190-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010560_R1.bam.junction.gz\tTCGA-06-0190-02A RNA junction\nTCGA-14-2554-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010592_D1.bam.junction.gz\tTCGA-14-2554-01A RNA junction\nTCGA-27-2523-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010559_D1.bam.junction.gz\tTCGA-27-2523-01A RNA junction\nTCGA-41-5651-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010602_D1.bam.junction.gz\tTCGA-41-5651-01A RNA junction\nTCGA-06-5415-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010554_D1.bam.junction.gz\tTCGA-06-5415-01A RNA junction\nTCGA-14-1823-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010587_D1.bam.junction.gz\tTCGA-14-1823-01A RNA junction\nTCGA-06-0211-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010540_D2.bam.junction.gz\tTCGA-06-0211-01A RNA junction\nTCGA-06-0686-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010607_D1.bam.junction.gz\tTCGA-06-0686-01A RNA junction\nTCGA-27-2528-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010599_D1.bam.junction.gz\tTCGA-27-2528-01A RNA junction\nTCGA-02-2483-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010586_D1.bam.junction.gz\tTCGA-02-2483-01A RNA junction\nTCGA-06-2557-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010549_D1.bam.junction.gz\tTCGA-06-2557-01A RNA junction\nTCGA-06-0745-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010515_D1.bam.junction.gz\tTCGA-06-0745-01A RNA junction\nTCGA-06-0171-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010485_R1.bam.junction.gz\tTCGA-06-0171-02A RNA junction\nTCGA-19-1389-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010509_R1.bam.junction.gz\tTCGA-19-1389-02A RNA junction\nTCGA-32-1970-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010550_D1.bam.junction.gz\tTCGA-32-1970-01A RNA junction\nTCGA-06-0157-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010633_D1.bam.junction.gz\tTCGA-06-0157-01A RNA junction\nTCGA-26-5135-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010548_D1.bam.junction.gz\tTCGA-26-5135-01A RNA junction\nTCGA-15-1444-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010527_D1.bam.junction.gz\tTCGA-15-1444-01A RNA junction\nTCGA-06-0210-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010624_R1.bam.junction.gz\tTCGA-06-0210-02A RNA junction\nTCGA-06-0125-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010572_D1.bam.junction.gz\tTCGA-06-0125-01A RNA junction\nTCGA-19-2629-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010627_D1.bam.junction.gz\tTCGA-19-2629-01A RNA junction\nTCGA-06-0211-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010540_R1.bam.junction.gz\tTCGA-06-0211-02A RNA junction\nTCGA-06-0125-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010572_R1.bam.junction.gz\tTCGA-06-0125-02A RNA junction\nTCGA-06-0744-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010537_D1.bam.junction.gz\tTCGA-06-0744-01A RNA junction\nTCGA-02-2485-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010530_D1.bam.junction.gz\tTCGA-02-2485-01A RNA junction\nTCGA-06-0152-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010643_R1.bam.junction.gz\tTCGA-06-0152-02A RNA junction\nTCGA-27-1831-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010641_D1.bam.junction.gz\tTCGA-27-1831-01A RNA junction`)}));a.append("span").style("margin-left","8px").append("span").style("opacity",".5").style("color","red").text("Will overwrite existing contents.")}function c(t){t.html("").append("span").style("opacity",".5").text("Link will appear here.")}function g(t){const e={type:n.mdssvcnv,isdense:t.isdense,isfull:t.isfull,getallsamples:t.getallsamples};{const n=t.genome.node();e.genome=n.options[n.selectedIndex].text}{const n=t.position.property("value").trim();if(n)e.position=n}e.name=t.name.property("value")||"My dataset";{const n=t.svcnvfileurl.property("value").trim();const a=t.vcffileurl.property("value").trim();if(!n&&!a)throw"Either SVCNV or VCF file/URL (or both) needs to be provided.";if(n){if(r(n)){e.svcnvurl=n}else{e.svcnvfile=n}const a=t.cnvValueCutoff.property("value");if(a){e.cnvValueCutoff=Number(a)}const o=t.cnvLengthUpperLimit.property("value");if(o){e.cnvLengthUpperLimit=Number(o)}}if(a){if(r(a)){e.vcfurl=a}else{e.vcffile=a}}}{const n=t.expressionfileurl.property("value").trim();if(n){if(r(n)){e.expressionurl=n}else{e.expressionfile=n}}}{const n=t.segmeanValueCutoff.property("value");if(n){e.segmeanValueCutoff=Number(n)}}{const n=t.lohLengthUpperLimit.property("value");if(n){e.lohLengthUpperLimit=Number(n)}}if(t.sampleset_uidiv_inuse){const n=t.sampleset_textarea.property("value").trim();const a=new Map;const o=[];for(const t of n.split("\n")){if(!t)continue;const[n,e]=t.split("\t");if(e){if(!a.has(e))a.set(e,[]);a.get(e).add(n)}else{o.push(n)}}e.sampleset=[];if(o.length){e.sampleset.push({samples:o})}for(const[t,n]of a){e.sampleset.push({name:t,samples:n})}if(!e.sampleset.length){delete e.sampleset}}if(t.assay_uidiv_inuse){const n=[...j(t),...D(t),...N(t),...H(t)];e.sample2assaytrack={};for(const{sample:t,tk:a}of n){if(!e.sample2assaytrack[t])e.sample2assaytrack[t]=[];e.sample2assaytrack[t].push(a)}}return e}function r(t){const n=t.toUpperCase();return n.startsWith("HTTP://")||n.startsWith("HTTPS://")}function A(t,n){const e=t.append("div");e.append("span").text("Genome");const a=t.append("div");const o=a.append("select");for(const t in n){o.append("option").text(t)}return o}function s(t,n){const e=t.append("div");e.append("span").text("Default position");const a=t.append("div");return a.append("div").append("input").attr("size",30).property("placeholder","chr:start-stop")}function G(t){const n=t.append("div");n.append("span").text("Track name");const e=t.append("div");return e.append("div").append("input").attr("size",30)}function d(t,n){n.isdense=true;n.isfull=false;const e=t.append("div");e.append("span").text("Display");const o=t.append("div");const{divs:i,labels:p,inputs:c}=a({holder:o,options:[{label:"Dense",value:1,checked:true},{label:"Expanded",value:2}],callback:t=>{if(t==1){n.isdense=true;n.isfull=false}else{n.isdense=false;n.isfull=true}},styles:{display:"inline"}});n.isdense_radios=c}function m(t,n){const e=t.append("div");e.append("span").html('<a href=https://docs.google.com/document/d/1owXUQuqw5hBHFERm0Ria7anKtpyoPBaZY_MCiXXf5wE/edit#heading=h.57qr5fp90wn9 target=_blank>CNV+SV+fusion</a> file<br><span style="font-size:.7em">Either CNV or VCF file is required</span>');const o=t.append("div");const i=o.append("div");const p=o.append("div").style("display","none");const{divs:c,labels:g,inputs:r}=a({holder:i,options:[{label:"Yes",value:1},{label:"No",value:2,checked:true}],callback:t=>{n.svcnv_inuse=t==1;p.style("display",t==1?"block":"none")},styles:{display:"inline"}});n.svcnv_radios=r;n.svcnv_controls=p;n.svcnvfileurl=l(p);f(p,n)}function l(t){const n=t.append("div");return n.append("div").append("input").attr("size",55).property("placeholder","File path or URL")}function b(t,n){n.vcf=true;const e=t.append("div");e.append("span").html("<a href=https://docs.google.com/document/d/1owXUQuqw5hBHFERm0Ria7anKtpyoPBaZY_MCiXXf5wE/edit#heading=h.hce6nejglfdx target=_blank>VCF</a> file");const o=t.append("div");const i=o.append("div");const p=o.append("div").style("display","none");const{divs:c,labels:g,inputs:r}=a({holder:i,options:[{label:"Yes",value:1},{label:"No",value:2,checked:true}],callback:t=>{n.vcf_inuse=t==1;p.style("display",t==1?"block":"none")},styles:{display:"inline"}});n.vcf_radios=r;n.vcf_controls=p;n.vcffileurl=u(p)}function u(t){const n=t.append("div");return n.append("div").append("input").attr("size",55).property("placeholder","File path or URL")}function _(t,n){n.expression=true;const e=t.append("div");e.append("span").html("<a href=https://docs.google.com/document/d/1owXUQuqw5hBHFERm0Ria7anKtpyoPBaZY_MCiXXf5wE/edit#heading=h.v8yrfg1dqvdy target=_blank>Gene expression</a> file");const o=t.append("div");const i=o.append("div");const p=o.append("div").style("display","none");const{divs:c,labels:g,inputs:r}=a({holder:i,options:[{label:"Yes",value:1},{label:"No",value:2,checked:true}],callback:t=>{n.expression_inuse=t==1;p.style("display",t==1?"block":"none")},styles:{display:"inline"}});n.expression_radios=r;n.expression_controls=p;n.expressionfileurl=C(p)}function C(t){const n=t.append("div");return n.append("div").append("input").attr("size",55).property("placeholder","File path or URL")}function v(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").attr("step","0.1").property("placeholder","CNV value cutoff")}function T(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").property("placeholder","CNV upper limit")}function h(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").attr("step","0.1").property("placeholder","Segment mean cutoff")}function w(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").property("placeholder","LOH upper limit")}function f(t,n){const e=t.append("div").append("div").style("width","49%").style("padding","10px").style("display","inline").style("position","relative");n.cnvValueCutoff=v(e);n.cnvLengthUpperLimit=T(e);n.segmeanValueCutoff=h(e);n.lohLengthUpperLimit=w(e)}function y(t,n){const e=t.append("div");e.append("button").style("width","230px").style("height","30px").style("text-align","center").style("font-size","15px").style("display","inline-block").text("Define Sample Subset").on("click",(()=>{if(o.style("display")=="none"){o.style("display","block")}else{o.style("display","none")}}));const a=t.append("div");const o=a.append("div").style("display","none");n.sampleset_uidiv_inuse=o;n.sampleset_textarea=o.append("textarea").style("width","200px").style("height","250px")}function S(t,n){const a=t.append("div");a.append("button").style("width","230px").style("height","30px").style("text-align","center").style("font-size","15px").style("display","inline-block").text("Define Sample Assay Tracks").on("click",(()=>{if(i.style("display")=="none"){i.style("display","block")}else{i.style("display","none")}}));const o=t.append("div");const i=o.append("div").style("display","none");n.assay_uidiv_inuse=i;const p=[{label:"bigWig",callback:t=>{t.append("div").text("Copy and paste the sample name, file path, and track name in a three column format separated by tabs");n.assaytrack_bigwig_textarea=t.append("textarea").style("width","500px").style("height","160px")}},{label:"Stranded bigWig",callback:t=>{t.append("div").text("Copy and paste the sample name, strand 1 file path, strand 2 file path, and track name in a four column format separated by tabs");n.assaytrack_bigwigstranded_textarea=t.append("textarea").style("width","500px").style("height","160px")}},{label:"JSON-BED (bedj)",callback:t=>{t.append("div").text("Copy and paste the sample name, file path, and track name in a three column format separated by tabs");n.assaytrack_bedj_textarea=t.append("textarea").style("width","500px").style("height","160px")}},{label:"Splice junction",callback:t=>{t.append("div").text("Copy and paste the sample name, file path, and track name in a three column format separated by tabs");n.assaytrack_junction_textarea=t.append("textarea").style("width","500px").style("height","160px")}}];e(i,p,true)}function j(t){const e=t.assaytrack_bigwig_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[2]||o+" bigwig",type:n.bigwig};if(r(e[1])){i.url=e[1]}else{i.file=e[1]}a.push({sample:o,tk:i})}return a}function D(t){const e=t.assaytrack_bigwigstranded_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[3]||o+" stranded bigWig",type:n.bigwigstranded};if(r(e[1])){i.url1={strand1:{url:e[1]}}}else{i.file1={strand1:{file:e[1]}}}if(r(e[2])){i.url2={strand2:{url:e[2]}}}else{i.file2={strand2:{file:e[2]}}}a.push({sample:o,tk:i})}return a}function N(t){const e=t.assaytrack_bedj_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[2]||o+" JSON bed",type:n.bedj};if(r(e[1])){i.url=e[1]}else{i.file=e[1]}a.push({sample:o,tk:i})}return a}function H(t){const e=t.assaytrack_junction_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[2]||o+" splice junction",type:n.junction};if(r(e[1])){i.url=e[1]}else{i.file=e[1]}a.push({sample:o,tk:i})}return a}export{o as init_mdsjsonform};
1
+ import{d as t,C as n,bm as e}from"./app-71453429.js";import{m as a}from"./radiobutton-09bff425.js";async function o(n){const{holder:e,genomes:a}=n;{const n=await t("mdsjsonform",{method:"POST",body:"{}"});if(n.error){e.append("div").text(n.error);return}}const[o,c]=i(e);const g={};g.genome=A(c,a);g.position=s(c);g.name=G(c);m(c,g);b(c,g);_(c,g);d(c,g);y(c,g);S(c,g);window.doms=g;p(o,g)}function i(t){const n=t.append("div");n.append("div").style("font-size","20px").style("margin","10px").text("Create a Custom GenomePaint Track");const e=n.append("div").style("display","grid").style("grid-template-columns","1fr 3fr").style("align-items","start").style("grid-template-rows","1fr 1fr").style("row-gap","15px").style("margins","5px").style("position","relative").style("padding","10px");return[n,e]}function p(n,e){const a=n;a.append("button").style("margin-left","10px").style("margin-top","5px").text("Submit").on("click",(async()=>{o.html("Loading...");try{const n=g(e);const a=n.genome;delete n.genome;const i=await t("mdsjsonform",{method:"POST",body:JSON.stringify({deposit:n})});if(i.error)throw i.error;const p=[window.location.origin+"?block=1","genome="+a,"mdsjsoncache="+i.id];if(n.position){p.push("position="+n.position);delete n.position}o.html("<a href="+p.join("&")+" target=_blank>View track</a>")}catch(t){window.alert("Error: "+t);if(t.stack)console.log(t.stack);c(o);return}}));const o=a.append("span").style("margin-left","10px").style("border","solid 1px #eee").style("padding","2px 9px");c(o);a.append("button").text("Example").style("margin-top","5px").style("margin-left","20px").on("click",(()=>{e.position.property("value","chr7:54990404-55375627");e.name.property("value","TCGA GBM somatic alterations");e.svcnvfileurl.property("value","proteinpaint_demo/hg19/tcga-gbm/gbm.svcnv.hg19.gz");e.vcffileurl.property("value","proteinpaint_demo/hg19/tcga-gbm/gbm.snvindel.vep.vcf.gz");e.expressionfileurl.property("value","proteinpaint_demo/hg19/tcga-gbm/gbm.fpkm.hg19.gz");e.isdense_radios.nodes()[1].click();e.svcnv_radios.nodes()[0].click();e.vcf_radios.nodes()[0].click();e.expression_radios.nodes()[0].click();e.assay_uidiv_inuse.style("display","block");e.assaytrack_bigwig_textarea.property("value",`TCGA-06-0152-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010643_R1.bw\tTCGA-06-0152-02A RNA coverage\nTCGA-06-0152-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010643_R1.bw\tTCGA-06-0152-02A WGS coverage\nTCGA-41-5651-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010602_D1.bw\tTCGA-41-5651-01A RNA coverage\nTCGA-41-5651-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010602_D1.bw\tTCGA-41-5651-01A WGS coverage\nTCGA-02-2483-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010586_D1.bw\tTCGA-02-2483-01A RNA coverage\nTCGA-02-2483-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010586_D1.bw\tTCGA-02-2483-01A WGS coverage\nTCGA-06-0171-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010485_R1.bw\tTCGA-06-0171-02A RNA coverage\nTCGA-06-0171-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010485_R1.bw\tTCGA-06-0171-02A WGS coverage\nTCGA-06-0211-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010540_R1.bw\tTCGA-06-0211-02A RNA coverage\nTCGA-06-0211-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010540_R1.bw\tTCGA-06-0211-02A WGS coverage\nTCGA-26-5135-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010548_D1.bw\tTCGA-26-5135-01A RNA coverage\nTCGA-26-5135-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010548_D1.bw\tTCGA-26-5135-01A WGS coverage\nTCGA-32-1970-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010550_D1.bw\tTCGA-32-1970-01A RNA coverage\nTCGA-32-1970-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010550_D1.bw\tTCGA-32-1970-01A WGS coverage\nTCGA-06-0125-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010572_D1.bw\tTCGA-06-0125-01A RNA coverage\nTCGA-06-0125-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010572_D1.bw\tTCGA-06-0125-01A WGS coverage\nTCGA-26-5132-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010504_D1.bw\tTCGA-26-5132-01A RNA coverage\nTCGA-26-5132-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010504_D1.bw\tTCGA-26-5132-01A WGS coverage\nTCGA-06-0210-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010624_D1.bw\tTCGA-06-0210-01A RNA coverage\nTCGA-06-0210-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010624_D1.bw\tTCGA-06-0210-01A WGS coverage\nTCGA-06-0686-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010607_D1.bw\tTCGA-06-0686-01A RNA coverage\nTCGA-06-0686-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010607_D1.bw\tTCGA-06-0686-01A WGS coverage\nTCGA-14-1402-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010600_R1.bw\tTCGA-14-1402-02A RNA coverage\nTCGA-14-1402-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010600_R1.bw\tTCGA-14-1402-02A WGS coverage\nTCGA-06-0125-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010572_R1.bw\tTCGA-06-0125-02A RNA coverage\nTCGA-06-0125-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010572_R1.bw\tTCGA-06-0125-02A WGS coverage\nTCGA-06-0157-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010633_D1.bw\tTCGA-06-0157-01A RNA coverage\nTCGA-06-0157-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010633_D1.bw\tTCGA-06-0157-01A WGS coverage\nTCGA-06-0190-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010560_D1.bw\tTCGA-06-0190-01A RNA coverage\nTCGA-06-0190-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010560_D1.bw\tTCGA-06-0190-01A WGS coverage\nTCGA-14-2554-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010592_D1.bw\tTCGA-14-2554-01A RNA coverage\nTCGA-14-2554-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010592_D1.bw\tTCGA-14-2554-01A WGS coverage\nTCGA-06-5411-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010518_D1.bw\tTCGA-06-5411-01A RNA coverage\nTCGA-06-5411-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010518_D1.bw\tTCGA-06-5411-01A WGS coverage\nTCGA-19-1389-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010509_R1.bw\tTCGA-19-1389-02A RNA coverage\nTCGA-19-1389-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010509_R1.bw\tTCGA-19-1389-02A WGS coverage\nTCGA-19-2620-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010513_D1.bw\tTCGA-19-2620-01A RNA coverage\nTCGA-19-2620-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010513_D1.bw\tTCGA-19-2620-01A WGS coverage\nTCGA-19-2629-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010627_D1.bw\tTCGA-19-2629-01A RNA coverage\nTCGA-19-2629-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010627_D1.bw\tTCGA-19-2629-01A WGS coverage\nTCGA-02-2485-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010530_D1.bw\tTCGA-02-2485-01A RNA coverage\nTCGA-02-2485-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010530_D1.bw\tTCGA-02-2485-01A WGS coverage\nTCGA-27-2528-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010599_D1.bw\tTCGA-27-2528-01A RNA coverage\nTCGA-27-2528-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010599_D1.bw\tTCGA-27-2528-01A WGS coverage\nTCGA-27-1831-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010641_D1.bw\tTCGA-27-1831-01A RNA coverage\nTCGA-27-1831-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010641_D1.bw\tTCGA-27-1831-01A WGS coverage\nTCGA-06-5415-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010554_D1.bw\tTCGA-06-5415-01A RNA coverage\nTCGA-06-5415-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010554_D1.bw\tTCGA-06-5415-01A WGS coverage\nTCGA-19-5960-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010577_D1.bw\tTCGA-19-5960-01A RNA coverage\nTCGA-19-5960-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010577_D1.bw\tTCGA-19-5960-01A WGS coverage\nTCGA-06-0210-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010624_R1.bw\tTCGA-06-0210-02A RNA coverage\nTCGA-06-0210-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010624_R1.bw\tTCGA-06-0210-02A WGS coverage\nTCGA-15-1444-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010527_D1.bw\tTCGA-15-1444-01A RNA coverage\nTCGA-15-1444-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010527_D1.bw\tTCGA-15-1444-01A WGS coverage\nTCGA-14-1034-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010484_D1.bw\tTCGA-14-1034-01A RNA coverage\nTCGA-14-1034-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010484_D1.bw\tTCGA-14-1034-01A WGS coverage\nTCGA-27-2523-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010559_D1.bw\tTCGA-27-2523-01A RNA coverage\nTCGA-27-2523-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010559_D1.bw\tTCGA-27-2523-01A WGS coverage\nTCGA-06-2557-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010549_D1.bw\tTCGA-06-2557-01A RNA coverage\nTCGA-06-2557-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010549_D1.bw\tTCGA-06-2557-01A WGS coverage\nTCGA-06-2570-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010593_D1.bw\tTCGA-06-2570-01A RNA coverage\nTCGA-06-2570-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010593_D1.bw\tTCGA-06-2570-01A WGS coverage\nTCGA-06-0745-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010515_D1.bw\tTCGA-06-0745-01A RNA coverage\nTCGA-06-0745-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010515_D1.bw\tTCGA-06-0745-01A WGS coverage\nTCGA-14-1034-02B\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010484_R1.bw\tTCGA-14-1034-02B RNA coverage\nTCGA-14-1034-02B\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010484_R1.bw\tTCGA-14-1034-02B WGS coverage\nTCGA-14-1823-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010587_D1.bw\tTCGA-14-1823-01A RNA coverage\nTCGA-14-1823-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010587_D1.bw\tTCGA-14-1823-01A WGS coverage\nTCGA-06-0190-02A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010560_R1.bw\tTCGA-06-0190-02A RNA coverage\nTCGA-06-0190-02A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010560_R1.bw\tTCGA-06-0190-02A WGS coverage\nTCGA-06-0211-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010540_D2.bw\tTCGA-06-0211-01A RNA coverage\nTCGA-06-0211-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010540_D2.bw\tTCGA-06-0211-01A WGS coverage\nTCGA-19-2624-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010505_D1.bw\tTCGA-19-2624-01A RNA coverage\nTCGA-19-2624-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010505_D1.bw\tTCGA-19-2624-01A WGS coverage\nTCGA-06-0744-01A\tproteinpaint_demo/hg19/tcga-gbm/rna-bw/SJHGG010537_D1.bw\tTCGA-06-0744-01A RNA coverage\nTCGA-06-0744-01A\tproteinpaint_demo/hg19/tcga-gbm/DNA/cov-wgs/SJHGG010537_D1.bw\tTCGA-06-0744-01A WGS coverage`);e.assaytrack_junction_textarea.property("value",`TCGA-19-5960-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010577_D1.bam.junction.gz\tTCGA-19-5960-01A RNA junction\nTCGA-06-0190-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010560_D1.bam.junction.gz\tTCGA-06-0190-01A RNA junction\nTCGA-14-1402-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010600_R1.bam.junction.gz\tTCGA-14-1402-02A RNA junction\nTCGA-19-2620-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010513_D1.bam.junction.gz\tTCGA-19-2620-01A RNA junction\nTCGA-06-5411-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010518_D1.bam.junction.gz\tTCGA-06-5411-01A RNA junction\nTCGA-14-1034-02B\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010484_R1.bam.junction.gz\tTCGA-14-1034-02B RNA junction\nTCGA-26-5132-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010504_D1.bam.junction.gz\tTCGA-26-5132-01A RNA junction\nTCGA-14-1034-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010484_D1.bam.junction.gz\tTCGA-14-1034-01A RNA junction\nTCGA-19-2624-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010505_D1.bam.junction.gz\tTCGA-19-2624-01A RNA junction\nTCGA-06-2570-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010593_D1.bam.junction.gz\tTCGA-06-2570-01A RNA junction\nTCGA-06-0210-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010624_D1.bam.junction.gz\tTCGA-06-0210-01A RNA junction\nTCGA-06-0190-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010560_R1.bam.junction.gz\tTCGA-06-0190-02A RNA junction\nTCGA-14-2554-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010592_D1.bam.junction.gz\tTCGA-14-2554-01A RNA junction\nTCGA-27-2523-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010559_D1.bam.junction.gz\tTCGA-27-2523-01A RNA junction\nTCGA-41-5651-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010602_D1.bam.junction.gz\tTCGA-41-5651-01A RNA junction\nTCGA-06-5415-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010554_D1.bam.junction.gz\tTCGA-06-5415-01A RNA junction\nTCGA-14-1823-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010587_D1.bam.junction.gz\tTCGA-14-1823-01A RNA junction\nTCGA-06-0211-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010540_D2.bam.junction.gz\tTCGA-06-0211-01A RNA junction\nTCGA-06-0686-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010607_D1.bam.junction.gz\tTCGA-06-0686-01A RNA junction\nTCGA-27-2528-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010599_D1.bam.junction.gz\tTCGA-27-2528-01A RNA junction\nTCGA-02-2483-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010586_D1.bam.junction.gz\tTCGA-02-2483-01A RNA junction\nTCGA-06-2557-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010549_D1.bam.junction.gz\tTCGA-06-2557-01A RNA junction\nTCGA-06-0745-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010515_D1.bam.junction.gz\tTCGA-06-0745-01A RNA junction\nTCGA-06-0171-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010485_R1.bam.junction.gz\tTCGA-06-0171-02A RNA junction\nTCGA-19-1389-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010509_R1.bam.junction.gz\tTCGA-19-1389-02A RNA junction\nTCGA-32-1970-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010550_D1.bam.junction.gz\tTCGA-32-1970-01A RNA junction\nTCGA-06-0157-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010633_D1.bam.junction.gz\tTCGA-06-0157-01A RNA junction\nTCGA-26-5135-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010548_D1.bam.junction.gz\tTCGA-26-5135-01A RNA junction\nTCGA-15-1444-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010527_D1.bam.junction.gz\tTCGA-15-1444-01A RNA junction\nTCGA-06-0210-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010624_R1.bam.junction.gz\tTCGA-06-0210-02A RNA junction\nTCGA-06-0125-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010572_D1.bam.junction.gz\tTCGA-06-0125-01A RNA junction\nTCGA-19-2629-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010627_D1.bam.junction.gz\tTCGA-19-2629-01A RNA junction\nTCGA-06-0211-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010540_R1.bam.junction.gz\tTCGA-06-0211-02A RNA junction\nTCGA-06-0125-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010572_R1.bam.junction.gz\tTCGA-06-0125-02A RNA junction\nTCGA-06-0744-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010537_D1.bam.junction.gz\tTCGA-06-0744-01A RNA junction\nTCGA-02-2485-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010530_D1.bam.junction.gz\tTCGA-02-2485-01A RNA junction\nTCGA-06-0152-02A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010643_R1.bam.junction.gz\tTCGA-06-0152-02A RNA junction\nTCGA-27-1831-01A\tproteinpaint_demo/hg19/tcga-gbm/junction/SJHGG010641_D1.bam.junction.gz\tTCGA-27-1831-01A RNA junction`)}));a.append("span").style("margin-left","8px").append("span").style("opacity",".5").style("color","red").text("Will overwrite existing contents.")}function c(t){t.html("").append("span").style("opacity",".5").text("Link will appear here.")}function g(t){const e={type:n.mdssvcnv,isdense:t.isdense,isfull:t.isfull,getallsamples:t.getallsamples};{const n=t.genome.node();e.genome=n.options[n.selectedIndex].text}{const n=t.position.property("value").trim();if(n)e.position=n}e.name=t.name.property("value")||"My dataset";{const n=t.svcnvfileurl.property("value").trim();const a=t.vcffileurl.property("value").trim();if(!n&&!a)throw"Either SVCNV or VCF file/URL (or both) needs to be provided.";if(n){if(r(n)){e.svcnvurl=n}else{e.svcnvfile=n}const a=t.cnvValueCutoff.property("value");if(a){e.cnvValueCutoff=Number(a)}const o=t.cnvLengthUpperLimit.property("value");if(o){e.cnvLengthUpperLimit=Number(o)}}if(a){if(r(a)){e.vcfurl=a}else{e.vcffile=a}}}{const n=t.expressionfileurl.property("value").trim();if(n){if(r(n)){e.expressionurl=n}else{e.expressionfile=n}}}{const n=t.segmeanValueCutoff.property("value");if(n){e.segmeanValueCutoff=Number(n)}}{const n=t.lohLengthUpperLimit.property("value");if(n){e.lohLengthUpperLimit=Number(n)}}if(t.sampleset_uidiv_inuse){const n=t.sampleset_textarea.property("value").trim();const a=new Map;const o=[];for(const t of n.split("\n")){if(!t)continue;const[n,e]=t.split("\t");if(e){if(!a.has(e))a.set(e,[]);a.get(e).add(n)}else{o.push(n)}}e.sampleset=[];if(o.length){e.sampleset.push({samples:o})}for(const[t,n]of a){e.sampleset.push({name:t,samples:n})}if(!e.sampleset.length){delete e.sampleset}}if(t.assay_uidiv_inuse){const n=[...j(t),...D(t),...N(t),...H(t)];e.sample2assaytrack={};for(const{sample:t,tk:a}of n){if(!e.sample2assaytrack[t])e.sample2assaytrack[t]=[];e.sample2assaytrack[t].push(a)}}return e}function r(t){const n=t.toUpperCase();return n.startsWith("HTTP://")||n.startsWith("HTTPS://")}function A(t,n){const e=t.append("div");e.append("span").text("Genome");const a=t.append("div");const o=a.append("select");for(const t in n){o.append("option").text(t)}return o}function s(t,n){const e=t.append("div");e.append("span").text("Default position");const a=t.append("div");return a.append("div").append("input").attr("size",30).property("placeholder","chr:start-stop")}function G(t){const n=t.append("div");n.append("span").text("Track name");const e=t.append("div");return e.append("div").append("input").attr("size",30)}function d(t,n){n.isdense=true;n.isfull=false;const e=t.append("div");e.append("span").text("Display");const o=t.append("div");const{divs:i,labels:p,inputs:c}=a({holder:o,options:[{label:"Dense",value:1,checked:true},{label:"Expanded",value:2}],callback:t=>{if(t==1){n.isdense=true;n.isfull=false}else{n.isdense=false;n.isfull=true}},styles:{display:"inline"}});n.isdense_radios=c}function m(t,n){const e=t.append("div");e.append("span").html('<a href=https://docs.google.com/document/d/1owXUQuqw5hBHFERm0Ria7anKtpyoPBaZY_MCiXXf5wE/edit#heading=h.57qr5fp90wn9 target=_blank>CNV+SV+fusion</a> file<br><span style="font-size:.7em">Either CNV or VCF file is required</span>');const o=t.append("div");const i=o.append("div");const p=o.append("div").style("display","none");const{divs:c,labels:g,inputs:r}=a({holder:i,options:[{label:"Yes",value:1},{label:"No",value:2,checked:true}],callback:t=>{n.svcnv_inuse=t==1;p.style("display",t==1?"block":"none")},styles:{display:"inline"}});n.svcnv_radios=r;n.svcnv_controls=p;n.svcnvfileurl=l(p);f(p,n)}function l(t){const n=t.append("div");return n.append("div").append("input").attr("size",55).property("placeholder","File path or URL")}function b(t,n){n.vcf=true;const e=t.append("div");e.append("span").html("<a href=https://docs.google.com/document/d/1owXUQuqw5hBHFERm0Ria7anKtpyoPBaZY_MCiXXf5wE/edit#heading=h.hce6nejglfdx target=_blank>VCF</a> file");const o=t.append("div");const i=o.append("div");const p=o.append("div").style("display","none");const{divs:c,labels:g,inputs:r}=a({holder:i,options:[{label:"Yes",value:1},{label:"No",value:2,checked:true}],callback:t=>{n.vcf_inuse=t==1;p.style("display",t==1?"block":"none")},styles:{display:"inline"}});n.vcf_radios=r;n.vcf_controls=p;n.vcffileurl=u(p)}function u(t){const n=t.append("div");return n.append("div").append("input").attr("size",55).property("placeholder","File path or URL")}function _(t,n){n.expression=true;const e=t.append("div");e.append("span").html("<a href=https://docs.google.com/document/d/1owXUQuqw5hBHFERm0Ria7anKtpyoPBaZY_MCiXXf5wE/edit#heading=h.v8yrfg1dqvdy target=_blank>Gene expression</a> file");const o=t.append("div");const i=o.append("div");const p=o.append("div").style("display","none");const{divs:c,labels:g,inputs:r}=a({holder:i,options:[{label:"Yes",value:1},{label:"No",value:2,checked:true}],callback:t=>{n.expression_inuse=t==1;p.style("display",t==1?"block":"none")},styles:{display:"inline"}});n.expression_radios=r;n.expression_controls=p;n.expressionfileurl=C(p)}function C(t){const n=t.append("div");return n.append("div").append("input").attr("size",55).property("placeholder","File path or URL")}function v(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").attr("step","0.1").property("placeholder","CNV value cutoff")}function T(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").property("placeholder","CNV upper limit")}function h(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").attr("step","0.1").property("placeholder","Segment mean cutoff")}function w(t){const n=t.append("div");return n.append("div").append("input").attr("type","number").property("placeholder","LOH upper limit")}function f(t,n){const e=t.append("div").append("div").style("width","49%").style("padding","10px").style("display","inline").style("position","relative");n.cnvValueCutoff=v(e);n.cnvLengthUpperLimit=T(e);n.segmeanValueCutoff=h(e);n.lohLengthUpperLimit=w(e)}function y(t,n){const e=t.append("div");e.append("button").style("width","230px").style("height","30px").style("text-align","center").style("font-size","15px").style("display","inline-block").text("Define Sample Subset").on("click",(()=>{if(o.style("display")=="none"){o.style("display","block")}else{o.style("display","none")}}));const a=t.append("div");const o=a.append("div").style("display","none");n.sampleset_uidiv_inuse=o;n.sampleset_textarea=o.append("textarea").style("width","200px").style("height","250px")}function S(t,n){const a=t.append("div");a.append("button").style("width","230px").style("height","30px").style("text-align","center").style("font-size","15px").style("display","inline-block").text("Define Sample Assay Tracks").on("click",(()=>{if(i.style("display")=="none"){i.style("display","block")}else{i.style("display","none")}}));const o=t.append("div");const i=o.append("div").style("display","none");n.assay_uidiv_inuse=i;const p=[{label:"bigWig",callback:t=>{t.append("div").text("Copy and paste the sample name, file path, and track name in a three column format separated by tabs");n.assaytrack_bigwig_textarea=t.append("textarea").style("width","500px").style("height","160px")}},{label:"Stranded bigWig",callback:t=>{t.append("div").text("Copy and paste the sample name, strand 1 file path, strand 2 file path, and track name in a four column format separated by tabs");n.assaytrack_bigwigstranded_textarea=t.append("textarea").style("width","500px").style("height","160px")}},{label:"JSON-BED (bedj)",callback:t=>{t.append("div").text("Copy and paste the sample name, file path, and track name in a three column format separated by tabs");n.assaytrack_bedj_textarea=t.append("textarea").style("width","500px").style("height","160px")}},{label:"Splice junction",callback:t=>{t.append("div").text("Copy and paste the sample name, file path, and track name in a three column format separated by tabs");n.assaytrack_junction_textarea=t.append("textarea").style("width","500px").style("height","160px")}}];e(i,p,true)}function j(t){const e=t.assaytrack_bigwig_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[2]||o+" bigwig",type:n.bigwig};if(r(e[1])){i.url=e[1]}else{i.file=e[1]}a.push({sample:o,tk:i})}return a}function D(t){const e=t.assaytrack_bigwigstranded_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[3]||o+" stranded bigWig",type:n.bigwigstranded};if(r(e[1])){i.url1={strand1:{url:e[1]}}}else{i.file1={strand1:{file:e[1]}}}if(r(e[2])){i.url2={strand2:{url:e[2]}}}else{i.file2={strand2:{file:e[2]}}}a.push({sample:o,tk:i})}return a}function N(t){const e=t.assaytrack_bedj_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[2]||o+" JSON bed",type:n.bedj};if(r(e[1])){i.url=e[1]}else{i.file=e[1]}a.push({sample:o,tk:i})}return a}function H(t){const e=t.assaytrack_junction_textarea.property("value").trim();const a=[];for(const t of e.split("\n")){if(!t||t[0]=="#")continue;const e=t.split("\t");const o=e[0];if(!e[1]){continue}const i={name:e[2]||o+" splice junction",type:n.junction};if(r(e[1])){i.url=e[1]}else{i.file=e[1]}a.push({sample:o,tk:i})}return a}export{o as init_mdsjsonform};
@@ -0,0 +1 @@
1
+ import{aD as n}from"./app-71453429.js";function t(n){switch(n){case"./numeric.binary.ts":return import("./numeric.binary-d67da945.js");case"./numeric.continuous.ts":return import("./numeric.continuous-9a0c88bc.js");case"./numeric.discrete.ts":return import("./numeric.discrete-921f7097.js");case"./numeric.spline.ts":return import("./numeric.spline-649308d5.js");case"./numeric.toggle.ts":return import("./numeric.toggle-52789fd2.js");default:return new Promise((function(t,e){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(e.bind(null,new Error("Unknown variable dynamic import: "+n)))}))}}function e(t){return n(this,void 0,void 0,(function*(){const n=t.opts.numericEditMenuVersion;const e=n.length>1?"toggle":n[0];const i=yield r(e);return yield i.getHandler(t)}))}function i(t,e,i=null){var r;return n(this,void 0,void 0,(function*(){if(!((r=t.q)===null||r===void 0?void 0:r.mode))t.q={mode:"continuous"};const n=t.q.mode||"continuous";if(!t.term.bins){const n=yield e.getDefaultBins({tw:t});t.term.bins=n;t.q=JSON.parse(JSON.stringify(t.term.bins.default))}t.q.mode=n;return t}))}function r(e){return n(this,void 0,void 0,(function*(){try{return yield t(`./numeric.${e}.ts`)}catch(n){if(n.stack)console.log(n.stack);throw`Type numeric.${e} does not exist [handlers/numeric.ts importSubtype()]`}}))}export{i as fillTW,e as getHandler};
@@ -0,0 +1 @@
1
+ import{m as t}from"./FilterRxComp-fc769f34.js";function o(o){const n=o.sort(((t,o)=>t-o));const s=Math.abs(n[0]-n[n.length-1]);const r=t(s);const c=s>=10?0:s>=1?1:r+2;return o.map((t=>Number(t.toFixed(c))))}export{o as n};
@@ -1 +1 @@
1
- import{q as e}from"./app-f91922b4.js";const t={passive:false};const n={capture:true,passive:false};function s(e){e.stopImmediatePropagation()}function a(e){e.preventDefault();e.stopImmediatePropagation()}function o(t){var s=t.document.documentElement,o=e(t).on("dragstart.drag",a,n);if("onselectstart"in s){o.on("selectstart.drag",a,n)}else{s.__noselect=s.style.MozUserSelect;s.style.MozUserSelect="none"}}function l(t,s){var o=t.document.documentElement,l=e(t).on("dragstart.drag",null);if(s){l.on("click.drag",a,n);setTimeout((function(){l.on("click.drag",null)}),0)}if("onselectstart"in o){l.on("selectstart.drag",null)}else{o.style.MozUserSelect=o.__noselect;delete o.__noselect}}export{n as a,s as b,a as c,o as d,t as n,l as y};
1
+ import{q as e}from"./app-71453429.js";const t={passive:false};const n={capture:true,passive:false};function s(e){e.stopImmediatePropagation()}function a(e){e.preventDefault();e.stopImmediatePropagation()}function o(t){var s=t.document.documentElement,o=e(t).on("dragstart.drag",a,n);if("onselectstart"in s){o.on("selectstart.drag",a,n)}else{s.__noselect=s.style.MozUserSelect;s.style.MozUserSelect="none"}}function l(t,s){var o=t.document.documentElement,l=e(t).on("dragstart.drag",null);if(s){l.on("click.drag",a,n);setTimeout((function(){l.on("click.drag",null)}),0)}if("onselectstart"in o){l.on("selectstart.drag",null)}else{o.style.MozUserSelect=o.__noselect;delete o.__noselect}}export{n as a,s as b,a as c,o as d,t as n,l as y};
@@ -1 +1 @@
1
- import{aD as e}from"./app-f91922b4.js";function t(e){switch(e){case"./numeric.binary.ts":return import("./numeric.binary-0a3b17d2.js");case"./numeric.continuous.ts":return import("./numeric.continuous-f77038de.js");case"./numeric.discrete.ts":return import("./numeric.discrete-b977e88f.js");case"./numeric.spline.ts":return import("./numeric.spline-d64b1abe.js");case"./numeric.toggle.ts":return import("./numeric.toggle-5316211b.js");default:return new Promise((function(t,n){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}function n(t){return e(this,void 0,void 0,(function*(){const e=t.opts.numericEditMenuVersion;const n=e.length>1?"toggle":e[0];const i=yield r(n);return yield i.getHandler(t)}))}function i(t,n,i=null){return e(this,void 0,void 0,(function*(){if(!t.q.mode){if(!i||i.mode)t.q.mode="discrete"}const e=t.term.type=="float"||t.term.type=="integer"?"toggle":t.q.mode;const o=yield r(e);return yield o.fillTW(t,n,i)}))}function r(n){return e(this,void 0,void 0,(function*(){try{return yield t(`./numeric.${n}.ts`)}catch(e){if(e.stack)console.log(e.stack);throw`Type numeric.${n} does not exist [handlers/numeric.ts importSubtype()]`}}))}export{i as fillTW,n as getHandler};
1
+ import{aD as e}from"./app-71453429.js";function t(e){switch(e){case"./numeric.binary.ts":return import("./numeric.binary-d67da945.js");case"./numeric.continuous.ts":return import("./numeric.continuous-9a0c88bc.js");case"./numeric.discrete.ts":return import("./numeric.discrete-921f7097.js");case"./numeric.spline.ts":return import("./numeric.spline-649308d5.js");case"./numeric.toggle.ts":return import("./numeric.toggle-52789fd2.js");default:return new Promise((function(t,n){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}function n(t){return e(this,void 0,void 0,(function*(){const e=t.opts.numericEditMenuVersion;const n=e.length>1?"toggle":e[0];const i=yield r(n);return yield i.getHandler(t)}))}function i(t,n,i=null){return e(this,void 0,void 0,(function*(){if(!t.q.mode){if(!i||i.mode)t.q.mode="discrete"}const e=t.term.type=="float"||t.term.type=="integer"?"toggle":t.q.mode;const o=yield r(e);return yield o.fillTW(t,n,i)}))}function r(n){return e(this,void 0,void 0,(function*(){try{return yield t(`./numeric.${n}.ts`)}catch(e){if(e.stack)console.log(e.stack);throw`Type numeric.${n} does not exist [handlers/numeric.ts importSubtype()]`}}))}export{i as fillTW,n as getHandler};
@@ -0,0 +1 @@
1
+ import{aD as e}from"./app-71453429.js";import{setDensityPlot as t}from"./density-4c2b53f6.js";import{renderBoundaryInclusionInput as i,renderBoundaryInputDivs as n}from"./numeric.discrete-921f7097.js";import{u as o,w as r}from"./FilterRxComp-fc769f34.js";import{m as d}from"./checkbox-0e5c659f.js";import{b as s}from"./termsetting-636d2271.js";import{convertViolinData as a}from"./tvs.numeric-b4cfc975.js";import{v as l}from"./violinRenderer-71c9f3ab.js";import"./drag-88d451b4.js";import"./nodrag-bed2488c.js";import"./pointer-c7475677.js";import"./table-1dae543a.js";import"./radiobutton-09bff425.js";import"path";import"./tvs.density-9fe0c7fd.js";import"./brush-bb4566a3.js";import"./niceNumLabels-ddb76164.js";import"./axis-6cb4f314.js";import"./line-264f8f9e.js";import"./constant-426a1483.js";import"./basis-3870f5ba.js";function u(o){return{getPillName(e){return s(o,e)},getPillStatus(){var e;return{text:((e=o.usecase)===null||e===void 0?void 0:e.target)=="regression"?o.data.q.lst.find((e=>e.label!=o.data.refGrp)).label:"binary"}},showEditMenu(r){var d,s;return e(this,void 0,void 0,(function*(){o.num_obj={};o.num_obj.plot_size={width:500,height:100,xpad:10,ypad:20};r.selectAll("*").remove();r.append("div").style("padding","10px").style("text-align","center").html("Getting distribution data ...<br/>");const f=yield o.vocabApi.getViolinPlotData({term:{term:o.term,q:o.q},filter:o.filter,svgw:o.num_obj.plot_size.width/window.devicePixelRatio},(s=(d=o.opts).getBodyParams)===null||s===void 0?void 0:s.call(d));o.num_obj.density_data=a(f);o.dom.num_holder=r;r.selectAll("*").remove();o.dom.density_div=r.append("div");o.vr=new l(o.dom.density_div,o.num_obj.density_data,o.num_obj.plot_size.width,o.num_obj.plot_size.height);o.num_obj.svg=o.vr.svg;o.dom.bins_div=r.append("div").style("padding","4px");m(o);t(o);i(o);o.dom.cutoff_div=o.dom.bins_div.append("div").style("margin","10px");p(o);o.dom.bins_table=o.dom.bins_div.append("div").style("display","flex").style("color","rgb(136, 136, 136)").style("margin","10px").style("width","100%");o.dom.rangeAndLabelDiv=o.dom.bins_table.append("div");n(o,o.q.lst);const y=r.append("div").style("padding","3px 10px");y.append("button").style("margin","5px").html("Apply").on("click",(()=>e(this,void 0,void 0,(function*(){delete o.q.startinclusive;delete o.q.stopinclusive;delete o.q.bin_size;delete o.q.first_bin;delete o.q.last_bin;o.q.lst=c(o);o.numqByTermIdModeType[o.term.id].binary=JSON.parse(JSON.stringify(o.q));o.q.mode="binary";o.runCallback()}))));y.append("button").style("margin","5px").html("Reset").on("click",(()=>{o.q={};delete o.numqByTermIdModeType[o.term.id];u(o).showEditMenu(o.dom.num_holder)}))}))}}}function m(e){const t=e.num_obj.density_data;const i=e.q&&e.q.lst&&e.q.lst.length?e.q.lst[0].stop:undefined;const n=e.numqByTermIdModeType;if(!e.term)throw`Missing .term{} [numeric.binary, setqDefaults()]`;const d=e.term;if(!n[d.id])n[d.id]={};if(!n[d.id].binary){const o=i!==undefined?Number(i):t.maxvalue!=t.minvalue?t.minvalue+(t.maxvalue-t.minvalue)/2:t.maxvalue;n[d.id].binary={mode:"binary",type:"custom-bin",modeBinaryCutoffType:"normal",modeBinaryCutoffPercentile:50,lst:[{startunbounded:true,stopinclusive:true,stop:o.toFixed(e.term.type=="integer"?0:2)},{stopunbounded:true,start:o.toFixed(e.term.type=="integer"?0:2)}]}}if(!e.q||e.q.mode!=="binary")e.q={};const s=JSON.parse(JSON.stringify(n[d.id].binary));e.q=Object.assign(s,e.q);if(e.q.lst){e.q.lst.forEach((t=>{if(!("label"in t))t.label=o(t,e.q);if(!("range"in t))t.range=r(t,e.q)}))}}function p(i){return e(this,void 0,void 0,(function*(){i.dom.cutoff_div.append("span").style("margin-right","5px").style("opacity",.5).text("Boundary value");i.dom.customBinBoundaryInput=i.dom.cutoff_div.append("input").style("width","100px").attr("type","number").style("margin-right","10px").attr("value",i.q.modeBinaryCutoffType=="normal"?i.q.lst[0].stop:i.q.modeBinaryCutoffPercentile).on("change",s);i.dom.customBinBoundaryPercentileCheckbox=d({holder:i.dom.cutoff_div,labeltext:"Use percentile",checked:i.q.modeBinaryCutoffType=="percentile",divstyle:{display:"inline-block"},callback:l});function s(){return e(this,void 0,void 0,(function*(){const e=+this.value;if(i.q.modeBinaryCutoffType=="normal"){a(e)}else if(i.q.modeBinaryCutoffType=="percentile"){if(e<1||e>99){window.alert("Invalid percentile value: enter integer between 1 and 99");return}i.q.modeBinaryCutoffPercentile=e;yield u()}else{throw"invalid modeBinaryCutoffType value"}}))}function a(e){i.q.lst[0].stop=e;i.q.lst[1].start=e;i.q.lst.forEach((e=>{e.label=o(e,i.q);e.range=r(e,i.q)}));if(!i.num_obj)throw`Missing density data [numeric.binary updateUI()]`;t(i);n(i,i.q.lst)}function l(){return e(this,void 0,void 0,(function*(){i.q.modeBinaryCutoffType=i.q.modeBinaryCutoffType=="percentile"?"normal":"percentile";if(i.q.modeBinaryCutoffType=="normal"){const e=i.q.lst[0].stop;i.dom.customBinBoundaryInput.property("value",e);a(e)}else if(i.q.modeBinaryCutoffType=="percentile"){i.dom.customBinBoundaryInput.property("value",i.q.modeBinaryCutoffPercentile);yield u()}else{throw"invalid modeBinaryCutoffType value"}}))}function u(){return e(this,void 0,void 0,(function*(){const e=yield i.opts.vocabApi.getPercentile(i.term.id,[i.q.modeBinaryCutoffPercentile],i.filter);a(e.values[0])}))}}))}function c(e){const t=e.dom.boundaryInput.property("value")=="startinclusive";const i=e.dom.boundaryInput.property("value")=="stopinclusive";const n=e.dom.bins_table.node().querySelectorAll("input");const r=e.q.lst[0].stop;const d=[{startunbounded:true,stop:r,startinclusive:t,stopinclusive:i},{start:r,startinclusive:t,stopinclusive:i,stopunbounded:true}];d.forEach(((t,i)=>{const r=n[i].value;t.label=r?r:o(t,e.q)}));return d}export{u as getHandler};
@@ -0,0 +1 @@
1
+ import{aD as t}from"./app-71453429.js";import{b as e}from"./termsetting-636d2271.js";import{convertViolinData as i}from"./tvs.numeric-b4cfc975.js";import{v as n}from"./violinRenderer-71c9f3ab.js";import"path";import"./FilterRxComp-fc769f34.js";import"./table-1dae543a.js";import"./tvs.density-9fe0c7fd.js";import"./brush-bb4566a3.js";import"./pointer-c7475677.js";import"./nodrag-bed2488c.js";import"./niceNumLabels-ddb76164.js";import"./axis-6cb4f314.js";import"./line-264f8f9e.js";import"./constant-426a1483.js";import"./basis-3870f5ba.js";function o(o){return{getPillName(t){return e(o,t)},getPillStatus(){return{text:"continuous"}},showEditMenu(e){var a,l;return t(this,void 0,void 0,(function*(){s(o);e.style("padding","5px").selectAll("*").remove();const t=e.append("div");const r={width:500,height:100,xpad:10,ypad:20};const p=yield o.vocabApi.getViolinPlotData({term:{term:o.term,q:o.q},filter:o.filter,svgw:r.width/window.devicePixelRatio},(l=(a=o.opts).getBodyParams)===null||l===void 0?void 0:l.call(a));const d=i(p);const m=new n(t,d,r.width,r.height);m.render();m.svg;e.append("div").style("display","inline-block").style("padding","3px 10px").html("Scale values");const c=e.append("select").on("change",(t=>{if(!o.q)throw`Missing .q{} [numeric.continuous getHandler()]`;if(t.target.value!="1")o.q.scale=Number(t.target.value);else delete o.q.scale}));c.selectAll("option").data([{html:"No Scaling",value:1},{html:"Per 10",value:10},{html:"Per 100",value:100},{html:"Per 1000",value:1e3}]).enter().append("option").attr("value",(t=>t.value)).html((t=>t.html)).property("selected",(t=>"scale"in o.q&&t.value==o.q.scale));const u=e.append("div").style("padding","3px 10px");if(o.term.type=="survival"){u.append("div").style("font-size",".8em").style("margin","20px 5px 5px 5px").html(`\n\t\t\t\t\t\tDisplay survival outcomes as time to event (${o.term.unit})\n\t\t\t\t\t`)}u.append("button").style("margin","5px").html("Apply").on("click",(()=>{o.q.mode="continuous";o.runCallback()}))}))}}}function s(t){const e=t.numqByTermIdModeType;const i=t.term;if(!e[i.id])e[i.id]={};if(!e[i.id].continuous){e[i.id].continuous={mode:"continuous"}}const n=JSON.parse(JSON.stringify(e[i.id].continuous));t.q=Object.assign(n,t.q)}export{o as getHandler};
@@ -0,0 +1 @@
1
+ import{aD as e,aR as t,f as n,k as i}from"./app-71453429.js";import{setDensityPlot as s}from"./density-4c2b53f6.js";import{u as a,w as r}from"./FilterRxComp-fc769f34.js";import{m as o}from"./radiobutton-09bff425.js";import{b as l,f as d}from"./termsetting-636d2271.js";import{convertViolinData as u}from"./tvs.numeric-b4cfc975.js";import{v as p}from"./violinRenderer-71c9f3ab.js";import"./drag-88d451b4.js";import"./nodrag-bed2488c.js";import"./pointer-c7475677.js";import"./table-1dae543a.js";import"path";import"./tvs.density-9fe0c7fd.js";import"./brush-bb4566a3.js";import"./niceNumLabels-ddb76164.js";import"./axis-6cb4f314.js";import"./line-264f8f9e.js";import"./constant-426a1483.js";import"./basis-3870f5ba.js";function m(t){return{getPillName(e){return l(t,e)},getPillStatus(){var e,n;if(!t.q)throw`Missing .q{} [numeric.discrete getPillStatus()]`;const i=((e=t.q)===null||e===void 0?void 0:e.name)||((n=t.q)===null||n===void 0?void 0:n.reuseId);if(i)return{text:i};if(t.q.type=="regular-bin")return{text:"bin size="+t.q.bin_size};return{text:t.q.lst.length+" bins"}},showEditMenu(n){return e(this,void 0,void 0,(function*(){c(t,n)}))}}}function c(t,n){var i,a;return e(this,void 0,void 0,(function*(){t.num_obj={};t.num_obj.plot_size={width:500,height:100,xpad:10,ypad:20};n.selectAll("*").remove();n.append("div").style("padding","10px").style("text-align","center").html("Getting distribution data ...<br/>");try{if(!t.vocabApi)throw`Missing .vocabApi{} [numeric.discrete showBinsMenu()]`;const e=yield d({term:t.term,q:t.q},t.vocabApi);const n=yield t.vocabApi.getViolinPlotData({term:e,filter:t.filter,svgw:t.num_obj.plot_size.width/window.devicePixelRatio,strokeWidth:.2},(a=(i=t.opts).getBodyParams)===null||a===void 0?void 0:a.call(i));t.q=JSON.parse(JSON.stringify(e.q));t.num_obj.density_data=u(n)}catch(e){console.log(e)}n.selectAll("*").remove();if(t.term.type=="survival"){t.dom.discreteSur_div=n.append("div").style("padding","4px");N(t);return}t.dom.num_holder=n;t.dom.density_div=n.append("div");t.vr=new p(t.dom.density_div,t.num_obj.density_data,t.num_obj.plot_size.width,t.num_obj.plot_size.height);t.num_obj.svg=t.vr.svg;t.dom.bins_div=n.append("div").style("padding","4px");v(t);s(t);f(t);g(t);I(t)}))}function b(e){var t;if(e.q.type=="regular-bin"){if(!e.q.first_bin){e.q.first_bin={stop:Number(e.dom.first_stop_input.property("value"))}}e.q.startinclusive=e.dom.boundaryInput.property("value")=="startinclusive";e.q.stopinclusive=e.dom.boundaryInput.property("value")=="stopinclusive";const n=e.dom.bin_size_input.property("value");e.q.bin_size=Number(n);if(n.includes(".")&&!n.endsWith(".")){e.q.rounding="."+n.split(".")[1].length+"f"}else{e.q.rounding=".0f"}if(e.q.scale)delete e.q.scale;if(Number.isFinite((t=e.q.last_bin)===null||t===void 0?void 0:t.start));else{delete e.q.last_bin}e.numqByTermIdModeType[e.term.id].discrete["regular-bin"]=JSON.parse(JSON.stringify(e.q))}else if(e.term.type!=="survival"){if(e.dom.bins_table.selectAll("input").node().value){e.q.lst=y(e);e.numqByTermIdModeType[e.term.id].discrete["custom-bin"]=JSON.parse(JSON.stringify(e.q))}}e.q.mode="discrete";e.dom.tip.hide();e.runCallback()}function y(e){var t;const n=e.dom.boundaryInput.property("value")=="startinclusive";const i=e.dom.boundaryInput.property("value")=="stopinclusive";const s=e.dom.bins_table.node().querySelectorAll("input");let o;const l=e.dom.customBinBoundaryInput.property("value").split("\n").filter((e=>e!=""&&!isNaN(e)));const d=new Set(l);const u=Array.from(d).map((e=>+e)).sort(((e,t)=>e-t)).map(((t,l)=>{const d={start:+t,startinclusive:n,stopinclusive:i};if(o){delete o.stopunbounded;o.stop=d.start;const t=s[l].value;o.label=t?t:a(o,e.q,e.term.valueConversion);o.range=r(o,e.q)}o=d;return d}));if(u.length==0)return;o.stopunbounded=true;const p=(t=s[u.length])===null||t===void 0?void 0:t.value;o.label=p?p:a(o,e.q,e.term.valueConversion);o.range=r(o,e.q);u.unshift({startunbounded:true,stop:u[0].start,startinclusive:n,stopinclusive:i,label:s[0].value});if(!u[0].label)u[0].label=a(u[0],e.q,e.term.valueConversion);if(!u[0].range)u[0].range=r(u[0],e.q);return u}function v(e){var t,n;const i=e.num_obj.density_data;const s=e.numqByTermIdModeType;const o=e.term;if(!s[o.id])s[o.id]={};if(!s[o.id].discrete){const t=!Number.isFinite(i.minvalue)||!Number.isFinite(i.maxvalue)?0:i.maxvalue!=i.minvalue?i.minvalue+(i.maxvalue-i.minvalue)/2:i.maxvalue;s[o.id].discrete={"regular-bin":e.q&&e.q.type=="regular-bin"?JSON.parse(JSON.stringify(e.q)):e.opts.use_bins_less&&o.bins.less?JSON.parse(JSON.stringify(o.bins.less)):JSON.parse(JSON.stringify(o.bins.default)),"custom-bin":e.q&&e.q.type=="custom-bin"?e.q:{type:"custom-bin",mode:"discrete",lst:[{startunbounded:true,startinclusive:true,stopinclusive:false,stop:+t.toFixed(o.type=="integer"?0:2)},{stopunbounded:true,startinclusive:true,stopinclusive:false,start:+t.toFixed(o.type=="integer"?0:2)}]}};if(!s[o.id].discrete["regular-bin"].type){s[o.id].discrete["regular-bin"].type="regular-bin"}}if(e.q&&!e.q.mode)e.q.mode="discrete";if(!e.q||e.q.mode!=="discrete")e.q={};if(!e.q.type){e.q.type=((n=(t=e.term.bins)===null||t===void 0?void 0:t.default)===null||n===void 0?void 0:n.type)||"regular-bin"}const l=JSON.parse(JSON.stringify(s[o.id].discrete[e.q.type]));e.q=Object.assign(l,e.q);const d="bin_size"in e.q&&e.q.bin_size.toString();if(!e.q.rounding&&typeof d=="string"&&d.includes(".")&&!d.endsWith(".")){const t=d.split(".")[1].length;e.q.rounding="."+t+"f"}if(e.q.lst){e.q.lst.forEach((t=>{if(!("label"in t))t.label=a(t,e.q,e.term.valueConversion);if(!("range"in t))t.range=r(t,e.q)}))}}function f(e){e.dom.boundaryInclusionDiv=e.dom.bins_div.append("div").style("margin-left","5px");e.dom.boundaryInclusionDiv.append("span").style("padding","5px").style("color","rgb(136, 136, 136)").html("Boundary Inclusion");const t='<span style="font-family:Times;font-style:italic">x</span>';e.dom.boundaryInput=e.dom.boundaryInclusionDiv.append("select").style("margin-left","10px").on("change",(function(){const t=e.q.mode=="binary"?e.numqByTermIdModeType[e.term.id].binary:e.numqByTermIdModeType[e.term.id].discrete[e.q.type];t.lst=e.q.lst;if(t.type=="regular-bin"){n(t)}else{t.lst.forEach((t=>{n(t);t.label=a(t,e.q,e.term.valueConversion);t.range=r(t,e.q)}));z(e,t.lst)}function n(t){t.startinclusive=e.dom.boundaryInput.node().selectedIndex==1;t.stopinclusive=e.dom.boundaryInput.node().selectedIndex==0}}));e.dom.boundaryInput.selectAll("option").data([{value:"stopinclusive",html:"start &lt; "+t+" &le; end"},{value:"startinclusive",html:"start &le; "+t+" &lt; end"}]).enter().append("option").property("value",(e=>e.value)).property("selected",(t=>{if(e.q.type=="regular-bin")return e.q[t.value]==true;else return e.q.lst[0][t.value]==true})).html((e=>e.html))}function g(n){const i=n.dom.bins_div.append("div").style("margin","10px");if(n.term.bins.default.type=="custom-bin"){n.q.type="custom-bin";v(n);s(n);w(n,i);return}if(n.term.bins.default.type!="regular-bin")throw"self.bins.default.type is neither regular-bin or custom-bin, cannot render ui";const a=[{active:n.q.type=="regular-bin",label:"Same bin size",callback:(t,i)=>e(this,void 0,void 0,(function*(){n.q.type="regular-bin";v(n);s(n);if(!a[0].isInitialized){_(n,i.contentHolder);a[0].isInitialized=true}}))},{active:n.q.type=="custom-bin",label:"Varying bin sizes",callback:(t,i)=>e(this,void 0,void 0,(function*(){n.q.type="custom-bin";v(n);s(n);if(!a[1].isInitialized){w(n,i.contentHolder);a[1].isInitialized=true}}))}];new t({holder:i,tabs:a}).main()}function q(e,t){if(!e.term.valueConversion)return;t.append("div").style("margin-bottom","5px").style("opacity",.6).text(`Note: using values by the unit of ${e.term.valueConversion.fromUnit}.`)}function _(e,t){q(e,t);e.dom.bins_table=t.append("table");h(e,e.dom.bins_table.append("tr"));x(e,e.dom.bins_table.append("tr"));j(e,e.dom.bins_table.append("tr"))}function h(e,t){t.append("td").style("margin","5px").style("opacity",.5).text("Bin Size");const i=e.num_obj.density_data;const a=e.q.bin_size;e.dom.bin_size_input=t.append("td").append("input").attr("type","number").attr("value","rounding"in e.q?n(e.q.rounding)(e.q.bin_size):e.q.bin_size).style("margin-left","15px").style("width","100px").style("color",(()=>e.q.bin_size>Math.abs(i.maxvalue-i.minvalue)?"red":"")).on("change",(t=>{const n=Number(t.target.value);if(n<=0){window.alert("Please enter non-negative bin size.");t.target.value=a;return}if((i.maxvalue-i.minvalue)/n>100){window.alert("Bin size too small. Try setting a bigger value.");t.target.value=a;return}e.q.bin_size=n;e.dom.bin_size_input.style("color",e.q.bin_size>i.maxvalue-i.minvalue?"red":n!=a?"green":"");s(e)}))}function x(e,t){if(!e.q.first_bin)throw"missing q.first_bin";t.append("td").style("margin","5px").style("opacity",.5).text("First Bin Stop");const n=e.num_obj.density_data;const i=e.q.first_bin.stop;e.dom.first_stop_input=t.append("td").append("input").attr("type","number").property("value",i).style("width","100px").style("margin-left","15px").on("change",(t=>{const s=Number(t.target.value);if(s<n.minvalue||s>n.maxvalue){window.alert("First bin stop value out of bound.");t.target.value=i;return}if(e.q.first_bin)e.q.first_bin.stop=s;e.renderBinLines(e,e.q)}));t.append("td").append("div").style("font-size",".6em").style("opacity",.5).style("display",e.num_obj.no_density_data?"none":"block").text("Indicated by left-most red line. Drag to change.")}function j(e,t){const n=!e.q.last_bin||!Number.isFinite(e.q.last_bin.start);t.append("td").style("margin","5px").style("opacity",.5).text("Last Bin Start");const i=e.num_obj.density_data;const a=t.append("td").style("padding-left","15px").style("vertical-align","top");const r=a.append("div");o({holder:r,options:[{label:"Automatic",value:"auto",checked:n},{label:"Fixed",value:"fixed",checked:!n}],callback:t=>{if(t=="auto"){delete e.q.last_bin.start;l.style("display","none");e.renderBinLines(e,e.q);s(e);return}l.style("display","inline-block");if(!e.q.last_bin)e.q.last_bin={};if(e.dom.last_start_input.property("value")==""){e.dom.last_start_input.property("value",i.maxvalue)}d();s(e)}});const l=t.append("td").append("div").style("display",n?"none":"inline-block");e.dom.last_start_input=l.append("input").attr("type","number").property("value",e.q.last_bin?e.q.last_bin.start:"").style("width","100px").on("change",d);l.append("div").style("font-size",".6em").style("opacity",.5).style("display",e.num_obj.no_density_data?"none":"block").text("Indicated by right-most red line. Drag to change.");function d(){const t=Number(e.dom.last_start_input.property("value"));if(e.q.first_bin&&t<=e.q.first_bin.stop){window.alert("Last bin start cannot be smaller than first bin stop.");e.dom.last_start_input.property("value",i.maxvalue);return}if(t>i.maxvalue){window.alert("Last bin start value out of bound.");e.dom.last_start_input.property("value",i.maxvalue);return}if(!e.q.last_bin)e.q.last_bin={};e.q.last_bin.start=t;e.renderBinLines(e,e.q)}}function w(t,n){q(t,n);t.dom.bins_table=n.append("div").style("display","flex").style("width","100%");const s=t.dom.bins_table.append("div").style("margin-right","20px");t.dom.rangeAndLabelDiv=t.dom.bins_table.append("div");s.append("div").style("margin-bottom","5px").style("color","rgb(136, 136, 136)").text("Bin boundaries");t.dom.customBinBoundaryInput=s.append("textarea").style("width","100px").style("height","70px").text(t.q.lst.slice(1).map((e=>e.start)).join("\n")).on("change",a).on("keyup",(function(n){return e(this,void 0,void 0,(function*(){if(!i(n)&&n.key!=8)return;if(!t.dom.bins_table.selectAll("input").node().value)return;a.call(this)}))}));s.append("div").style("font-size",".6em").style("margin-left","1px").style("color","#858585").html("Enter numeric values </br>seperated by ENTER");function a(){const e=t.dom.bins_table.selectAll("input");e.property("value","");const n=y(t);if(n==undefined){return}const i=t.numqByTermIdModeType[t.term.id].discrete[t.q.type];if(t.q.hiddenValues)i.hiddenValues=t.q.hiddenValues;if(r(n,i.lst)){i.lst=n;t.renderBinLines(t,i)}z(t,i.lst);t.q.lst=i.lst}function r(e,t){if(e.length!=t.length)return true;if(Object.keys(e[0]).length!==Object.keys(t[0]).length)return true;for(const[n,i]of t.entries()){for(const t of Object.keys(i)){if(i[t]&&i[t]!==e[n][t]){return true}}}return false}z(t,t.q.lst)}function z(e,t){const n=e.dom.rangeAndLabelDiv;n.selectAll("*").remove();const i=n.append("div").style("display","grid").style("grid-template-columns","auto auto").style("column-gap","20px").style("align-items","center");i.append("div").style("margin-bottom","3px").style("color","rgb(136, 136, 136)").text("Range");i.append("div").style("margin-bottom","3px").style("color","rgb(136, 136, 136)").text("Bin label");for(const[e,n]of t.entries()){i.append("div").attr("name","range").html(n.range);i.append("div").append("input").attr("type","text").style("margin","2px 0px").property("value",n.label).on("change",(function(){t[e].label=this.value}))}e.dom.customBinRanges=e.dom.bins_table.selectAll('div[name="range"]').data(t);e.dom.customBinLabelInput=e.dom.bins_table.selectAll("input").data(t)}function I(e){const t=e.dom.bins_div.append("div");t.append("button").style("margin","5px").html("Apply").on("click",(()=>b(e)));t.append("button").style("margin","5px").html("Reset").on("click",(()=>{e.q={};delete e.numqByTermIdModeType[e.term.id];c(e,e.dom.num_holder)}))}function N(e){const t=e.dom.discreteSur_div.append("div");t.append("div").style("font-size",".8em").style("margin","5px").html(`\n\t\t\tDisplay survival outcomes as exit codes <br>\n\t\t`);const n=e.dom.discreteSur_div.append("div");n.append("button").style("margin","5px").html("Apply").on("click",(()=>b(e)))}export{m as getHandler,f as renderBoundaryInclusionInput,z as renderBoundaryInputDivs};
@@ -0,0 +1 @@
1
+ import{aD as t,k as e}from"./app-71453429.js";import{setDensityPlot as n}from"./density-4c2b53f6.js";import{b as o}from"./termsetting-636d2271.js";import{convertViolinData as i}from"./tvs.numeric-b4cfc975.js";import{v as s}from"./violinRenderer-71c9f3ab.js";import"./FilterRxComp-fc769f34.js";import"./table-1dae543a.js";import"./drag-88d451b4.js";import"./nodrag-bed2488c.js";import"./pointer-c7475677.js";import"path";import"./tvs.density-9fe0c7fd.js";import"./brush-bb4566a3.js";import"./niceNumLabels-ddb76164.js";import"./axis-6cb4f314.js";import"./line-264f8f9e.js";import"./constant-426a1483.js";import"./basis-3870f5ba.js";function l(e){return{getPillName(t){return o(e,t)},getPillStatus(){return{text:"cubic spline"}},showEditMenu(o){var l,p;return t(this,void 0,void 0,(function*(){e.num_obj={};e.num_obj.plot_size={width:500,height:100,xpad:10,ypad:20};o.selectAll("*").remove();o.append("div").style("padding","10px").style("text-align","center").html("Getting distribution data ...<br/>");try{const t=yield e.vocabApi.getViolinPlotData({term:{term:e.term,q:e.q},filter:e.filter,svgw:e.num_obj.plot_size.width/window.devicePixelRatio},(p=(l=e.opts).getBodyParams)===null||p===void 0?void 0:p.call(l));e.num_obj.density_data=i(t)}catch(t){console.log(t)}o.selectAll("*").remove();e.dom.density_div=o.append("div");e.vr=new s(e.dom.density_div,e.num_obj.density_data,e.num_obj.plot_size.width,e.num_obj.plot_size.height);e.num_obj.svg=e.vr.svg;e.dom.num_holder=o;e.dom.knots_div=o.append("div").style("padding","5px");yield d(e);n(e);r(e);y(e)}))}}}function d(e){return t(this,void 0,void 0,(function*(){const t=e.numqByTermIdModeType;const n=e.term;if(!t[n.id])t[n.id]={};if(!t[n.id]["spline"]){t[n.id]["spline"]={mode:"spline",knots:[]}}const o=JSON.parse(JSON.stringify(t[n.id]["spline"]));e.q=Object.assign(o,e.q);if(!e.q.knots.length){const t=4;yield u(e,t);e.numqByTermIdModeType[e.term.id]["spline"].knots=e.q.knots}}))}function r(t){const e=t.dom.knots_div;p(t,e);c(t,e)}function p(n,o){n.dom.custom_knots_div=o.append("div");n.dom.custom_knots_div.append("div").style("display","inline-block").style("vertical-align","top").style("padding","3px 15px").style("font-weight","normal").style("color","rgb(136, 136, 136)").html("Knots");n.dom.customKnotsInput=n.dom.custom_knots_div.append("div").style("display","inline-block").style("padding","3px 15px").style("padding-left","5px").append("textarea").style("height","100px").style("width","100px").text(n.q.knots.map((t=>t.value)).join("\n")).on("change",i).on("keyup",(function(n){return t(this,void 0,void 0,(function*(){if(!e(n)&&n.key!=8)return;i.call(this)}))}));n.dom.custom_knots_div.append("div").style("display","inline-block").style("vertical-align","top").style("font-size",".7em").style("padding","3px 15px").style("padding-left","5px").style("color","rgb(136, 136, 136)").html(`Enter knot values, one knot per line.</br> \n\t\t\tAdjust knot by dragging on the vertical line.</br>\n\t\t \tOr autocompute knots from below.`);function i(){const t=m(n);const e=n.q;if(s(t,e.knots)){e.knots=t;n.renderBinLines(n,e)}n.q=e}function s(t,e){if(t.length!=e.length)return true;if(Object.keys(t[0]).length!==Object.keys(e[0]).length)return true;for(const[n,o]of e.entries()){for(const e of Object.keys(o)){if(o[e]&&o[e]!==t[n][e]){return true}}}return false}}function a(t){t.dom.customKnotsInput.property("value",t.q.knots.map((t=>t.value)).join("\n"))}function m(t){const e=t.dom.customKnotsInput.property("value").split("\n").filter((t=>t!="")).map((t=>+t)).sort(((t,e)=>t-e)).map((t=>{const e={value:+t};return e}));return e}function c(e,o){const i=4;const s=i;e.dom.knot_select_div=o.append("div");e.dom.knot_select_div.append("div").style("display","inline-block").style("margin-left","15px").style("color","rgb(136, 136, 136)").html("Autocompute");const l=e.dom.knot_select_div.append("select").style("margin-left","10px").style("margin-bottom","7px");for(let t=s-1;t<s+5;t++){l.append("option").attr("value",t).html(t)}const d=e.q.knots&&e.q.knots.length?e.q.knots.length:s;l.node().value=d;e.dom.knot_select_div.append("div").style("display","inline-block").style("margin-left","10px").style("color","rgb(136, 136, 136)").html("knots");e.dom.knot_select_div.append("button").style("margin","15px").html("Compute").on("click",(()=>t(this,void 0,void 0,(function*(){const t=Number.parseInt(l.node().value);let o=Number.parseInt(l.node().value);while(e.q.knots.length!=t){yield u(e,o);o=o+1}a(e);n(e)}))));e.dom.knot_select_div.append("div").style("display","inline-block").style("font-size",".7em").style("padding","3px 15px").style("padding-left","5px").style("color","rgb(136, 136, 136)").html("Will overwrite existing values.")}function u(e,n){return t(this,void 0,void 0,(function*(){const t=n-2;const o=e.term;const i=e.q.knots=[];const s=[5];const l=(90/(t+1)).toFixed(0);for(let e=1;e<t+1;e++){s.push(e*l)}s.push(95);const d=yield v(e,s);for(const t of d){i.push({value:t.toFixed(o.type=="integer"?0:2)})}}))}function v(e,n){return t(this,void 0,void 0,(function*(){const t=yield e.vocabApi.getPercentile(e.term.id,n,e.filter);if(t.error||!t.values.length||!t.values.every((t=>Number.isFinite(t))))throw"cannot get median value: "+(t.error||"no data");const o=[...new Set(t.values)];return o}))}function y(t){const e=t.dom.knots_div.append("div");e.append("button").style("margin","5px").html("Apply").on("click",(()=>f(t)));e.append("button").style("margin","5px").html("Reset").on("click",(()=>{t.q={};delete t.numqByTermIdModeType[t.term.id];t.handler=l(t);t.handler.showEditMenu(t.dom.num_holder)}))}function f(t){t.q.mode="spline";t.dom.tip.hide();t.runCallback()}export{l as getHandler};
@@ -1 +1 @@
1
- import{aD as e,aR as i,aS as t}from"./app-f91922b4.js";import{b as n,s as r}from"./termsetting-9a7511e6.js";import{x as s}from"./FilterRxComp-0e75dd8d.js";import"path";import"./table-d6c411fd.js";function o(e){switch(e){case"./numeric.binary.ts":return import("./numeric.binary-0a3b17d2.js");case"./numeric.continuous.ts":return import("./numeric.continuous-f77038de.js");case"./numeric.discrete.ts":return import("./numeric.discrete-b977e88f.js");case"./numeric.spline.ts":return import("./numeric.spline-d64b1abe.js");case"./numeric.toggle.ts":return Promise.resolve().then((function(){return d}));default:return new Promise((function(i,t){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(t.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}function u(t){return e(this,void 0,void 0,(function*(){t.tabCallback=(i,n)=>e(this,void 0,void 0,(function*(){if(!n)return;if(!t.q)throw`Missing .q{} [numeric.toggle getHandler()]`;t.q.mode=n.mode;const e=`numeric.${n.mode}`;if(!t.handlerByType[e]){const i=yield o(`./numeric.${n.mode}.ts`);t.handlerByType[e]=yield i.getHandler(t)}n.isRendered=true;yield t.handlerByType[e].showEditMenu(n.contentHolder)}));const r=[];if(t.opts.numericEditMenuVersion.includes("continuous")){r.push({mode:"continuous",label:"Continuous",callback:t.tabCallback})}if(t.opts.numericEditMenuVersion.includes("discrete")){r.push({mode:"discrete",label:"Discrete",callback:t.tabCallback})}if(t.opts.numericEditMenuVersion.includes("spline")){r.push({mode:"spline",label:"Cubic spline",callback:t.tabCallback})}if(t.opts.numericEditMenuVersion.includes("binary")){r.push({mode:"binary",label:"Binary",callback:t.tabCallback})}return{getPillName(e){return n(t,e)},getPillStatus(){var e;if(!t.q)throw`Missing .q{} [numeric.toggle getPillStatus()]`;let i=t.q.mode;if(t.q.mode=="spline"){i="cubic spline"}else if(t.q.mode=="discrete"){if(((e=t.usecase)===null||e===void 0?void 0:e.target)=="regression"){i="discrete"}else if(t.q.type=="custom-bin"){i=t.q.lst.length+" bins"}else{i="bin size="+t.q.bin_size}}return{text:i}},showEditMenu(n){return e(this,void 0,void 0,(function*(){for(const e of r){delete e.isRendered;e.active=t.q.mode==e.mode||e.mode=="continuous"&&!t.q.mode}const e=n.append("div").style("padding","10px");e.append("span").html("Use as&nbsp;");new i({holder:e.append("div").style("display","inline-block"),contentHolder:n.append("div"),noTopContentStyle:true,tabs:r}).main()}))}}}))}function l(i,n,o){return e(this,void 0,void 0,(function*(){if(!i.q.mode&&!(o===null||o===void 0?void 0:o.mode))i.q.mode="discrete";if(i.q.mode!=="continuous"&&!a(i.q)){t(i.q,i.term.bins.default)}if(o){o.isAtomic=true;const e=o;const r=o;if(e.preferredBins=="median"){const t=e;if(!t.type||t.type!="custom-bin")throw".type must be custom-bin when .preferredBins=median";const r=yield n.getPercentile(i.term.id,[50]);if(!r.values)throw".values[] missing from vocab.getPercentile()";const u=s(r.values[0],2);if(!Number.isFinite(u))throw"median value not a number";const l=JSON.parse(JSON.stringify(o));delete l.preferredBins;i.q=l;i.q.lst=[{startunbounded:true,stop:u,stopinclusive:false,label:"<"+u},{start:u,startinclusive:true,stopunbounded:true,label:"≥"+u}]}else if(r.preferredBins=="less"||r.preferredBins=="default"){i.q=JSON.parse(JSON.stringify(i.term.bins[r.preferredBins]))}else{t(i.q,o)}}r(i.q,i.term)}))}function a(e){if(e.type=="custom-bin"){if(!Array.isArray(e.lst))return false;return true}if(Number.isFinite(e.bin_size)&&e.first_bin){if(Number.isFinite(e.first_bin.stop))return true}return false}var d=Object.freeze({__proto__:null,getHandler:u,fillTW:l});export{l as fillTW,u as getHandler};
1
+ import{aD as e,aR as i,aS as t}from"./app-71453429.js";import{b as n,s as r}from"./termsetting-636d2271.js";import{x as s}from"./FilterRxComp-fc769f34.js";import"path";import"./table-1dae543a.js";function o(e){switch(e){case"./numeric.binary.ts":return import("./numeric.binary-d67da945.js");case"./numeric.continuous.ts":return import("./numeric.continuous-9a0c88bc.js");case"./numeric.discrete.ts":return import("./numeric.discrete-921f7097.js");case"./numeric.spline.ts":return import("./numeric.spline-649308d5.js");case"./numeric.toggle.ts":return Promise.resolve().then((function(){return c}));default:return new Promise((function(i,t){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(t.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}function u(t){return e(this,void 0,void 0,(function*(){t.tabCallback=(i,n)=>e(this,void 0,void 0,(function*(){if(!n)return;if(!t.q)throw`Missing .q{} [numeric.toggle getHandler()]`;t.q.mode=n.mode;const e=`numeric.${n.mode}`;if(!t.handlerByType[e]){const i=yield o(`./numeric.${n.mode}.ts`);t.handlerByType[e]=yield i.getHandler(t)}n.isRendered=true;yield t.handlerByType[e].showEditMenu(n.contentHolder)}));const r=[];if(t.opts.numericEditMenuVersion.includes("continuous")){r.push({mode:"continuous",label:"Continuous",callback:t.tabCallback})}if(t.opts.numericEditMenuVersion.includes("discrete")){r.push({mode:"discrete",label:"Discrete",callback:t.tabCallback})}if(t.opts.numericEditMenuVersion.includes("spline")){r.push({mode:"spline",label:"Cubic spline",callback:t.tabCallback})}if(t.opts.numericEditMenuVersion.includes("binary")){r.push({mode:"binary",label:"Binary",callback:t.tabCallback})}return{getPillName(e){return n(t,e)},getPillStatus(){var e;if(!t.q)throw`Missing .q{} [numeric.toggle getPillStatus()]`;let i=t.q.mode;if(t.q.mode=="spline"){i="cubic spline"}else if(t.q.mode=="discrete"){if(((e=t.usecase)===null||e===void 0?void 0:e.target)=="regression"){i="discrete"}else if(t.q.type=="custom-bin"){i=t.q.lst.length+" bins"}else{i="bin size="+t.q.bin_size}}return{text:i}},showEditMenu(n){return e(this,void 0,void 0,(function*(){for(const e of r){delete e.isRendered;e.active=t.q.mode==e.mode||e.mode=="continuous"&&!t.q.mode}const e=n.append("div").style("padding","10px");e.append("span").html("Use as&nbsp;");new i({holder:e.append("div").style("display","inline-block"),contentHolder:n.append("div"),noTopContentStyle:true,tabs:r}).main()}))}}}))}function l(i,n,o){return e(this,void 0,void 0,(function*(){if(!i.q.mode&&!(o===null||o===void 0?void 0:o.mode))i.q.mode="discrete";if(i.q.mode!=="continuous"&&!a(i.q)){t(i.q,i.term.bins.default)}if(o){o.isAtomic=true;const e=o;const r=o;if(e.preferredBins=="median"){const t=e;if(!t.type||t.type!="custom-bin")throw".type must be custom-bin when .preferredBins=median";const r=yield n.getPercentile(i.term.id,[50]);if(!r.values)throw".values[] missing from vocab.getPercentile()";const u=s(r.values[0],2);if(!Number.isFinite(u))throw"median value not a number";const l=JSON.parse(JSON.stringify(o));delete l.preferredBins;i.q=l;i.q.lst=[{startunbounded:true,stop:u,stopinclusive:false,label:"<"+u},{start:u,startinclusive:true,stopunbounded:true,label:"≥"+u}]}else if(r.preferredBins=="less"||r.preferredBins=="default"){i.q=JSON.parse(JSON.stringify(i.term.bins[r.preferredBins]))}else{t(i.q,o)}}r(i.q,i.term)}))}function a(e){if(e.type=="custom-bin"){if(!Array.isArray(e.lst))return false;return true}if(Number.isFinite(e.bin_size)&&e.first_bin){if(Number.isFinite(e.first_bin.stop))return true}return false}var c=Object.freeze({__proto__:null,getHandler:u,fillTW:l});export{l as fillTW,u as getHandler};
@@ -1 +1 @@
1
- import{appInit as t}from"./plot.app-91a1d78d.js";import{q as e,aS as r,S as i}from"./app-f91922b4.js";import{f as s}from"./termsetting-9a7511e6.js";import{v as a}from"./FilterRxComp-0e75dd8d.js";import"./recover-a08c8d01.js";import"./FilterStateless-ad3df967.js";import"./app-bfce9bf5.js";import"./termInfo-96285f4a.js";import"./table-d6c411fd.js";import"path";const o="hg38";const n="GDC";async function p(i,s,p){const c=p[o];try{if(!c)throw o+" missing";const s=i.settings||{};if(typeof s!="object")throw"arg.settings{} not object";if(!s.matrix)s.matrix={};if(typeof s.matrix!="object")throw"arg.settings.matrix{} not object";if(!s.matrix.geneFilter)s.matrix.geneFilter="CGC";if(!Number.isInteger(s.matrix.maxGenes))s.matrix.maxGenes=50;if(i.filter0&&typeof i.filter0!="object")throw"arg.filter0 not object";const p=await a({state:{vocab:{genome:o,dslabel:n}}});p.getTermdbConfig();const f=await t({holder:e(i.holder).select(".sja_root_holder"),genome:c,state:{genome:o,dslabel:n,termfilter:{filter0:i.filter0},plots:[{chartType:"geneset",toolName:"OncoMatrix",settings:{maxGenes:s.matrix.maxGenes,geneFilter:s.matrix.geneFilter}}]},app:i.opts?.app||{},geneset:{mode:"mutation",genome:c,genes:i.genes,reactsTo(t){if(t.type.startsWith("plot_"))return t.id===this.id;if(t.type.startsWith("filter"))return true;if(t.type=="app_refresh")return true},showWaitMessage(t){t.style("margin","20px");t.append("div").text("Loading the top mutated genes in the current cohort...")},async callback(t,e){if(!t)return;d=t;if(!m){const t=f.getState().plots.find((t=>t.chartType=="matrix"));if(t)m=f.getComponents(`plots.${t.id}`)}const r=[...i.termgroups||[],{lst:e}];if(m){f.dispatch({type:"plot_edit",id:m.id,config:{termgroups:r}})}else{f.dispatch({type:"plot_create",config:{chartType:"matrix",termgroups:r,divideBy:i.divideBy||undefined,settings:s}})}}},recover:{undoHtml:"Undo",redoHtml:"Redo",resetHtml:"Restore",hide(t){return t.plots[0]?.chartType!="matrix"},adjustTrackedState:t=>{const e=structuredClone(t);delete e.termfilter.filter0;if(e.plots){for(const t of e.plots){if(!t.termgroups)continue;for(const e of t.termgroups){if(!e.lst)continue;for(const t of e.lst){if(!t?.term)continue;delete t.term.category2samplecount;delete t.term.values}}}}return e}},matrix:r({reactsTo(t){if(t.type.startsWith("plot_"))return t.id===this.id;if(t.type.startsWith("filter"))return true;if(t.type=="app_refresh")return true},customInputs:{genes:[{label:`Maximum # Genes`,title:"Limit the number of displayed genes",type:"number",chartType:"matrix",settingsKey:"maxGenes",callback:async t=>{for(const t in i.opts?.app?.callbacks){if(t.startsWith("preDispatch")){i.opts?.app?.callbacks[t]();break}}const e=await l(i,{maxGenes:t,geneFilter:s.matrix.geneFilter},p);g.update({termgroups:[{lst:e}],settings:{matrix:{maxGenes:t}}})}}]},callbacks:{"firstRender.gdcMatrix":async t=>{t.on("firstRender.gdcMatrix",null);if(!d)return;f.dispatch({type:"plot_delete",id:d.id});d=undefined}}},i.opts?.matrix||{})});let m,d;const g={update:async t=>{if(!m){const t=f.getState().plots.find((t=>t.chartType=="matrix"));if(t)m=f.getComponents(`plots.${t.id}`)}if("filter0"in t){f.dispatch({type:"filter_replace",filter0:t.filter0})}else if(m){f.dispatch({type:"plot_edit",id:m.id,config:t})}}};return g}catch(t){throw t}}async function l(t,e,r){const a={maxGenes:e.maxGenes,geneFilter:e.geneFilter};if(t.filter0)a.filter0=t.filter0;const o=await i("gdc/topMutatedGenes",{body:a});if(o.error)throw o.error;if(!o.genes)return;return await Promise.all(o.genes.map((async t=>await s({term:{gene:t.gene,type:"geneVariant"}},r))))}export{p as init};
1
+ import{appInit as t}from"./plot.app-c841507a.js";import{q as e,aS as r,S as i}from"./app-71453429.js";import{f as s}from"./termsetting-636d2271.js";import{v as a}from"./FilterRxComp-fc769f34.js";import"./recover-b1ec4fed.js";import"./FilterStateless-8f30f856.js";import"./app-fb676934.js";import"./termInfo-4c759483.js";import"./table-1dae543a.js";import"path";const o="hg38";const n="GDC";async function p(i,s,p){const c=p[o];try{if(!c)throw o+" missing";const s=i.settings||{};if(typeof s!="object")throw"arg.settings{} not object";if(!s.matrix)s.matrix={};if(typeof s.matrix!="object")throw"arg.settings.matrix{} not object";if(!s.matrix.geneFilter)s.matrix.geneFilter="CGC";if(!Number.isInteger(s.matrix.maxGenes))s.matrix.maxGenes=50;if(i.filter0&&typeof i.filter0!="object")throw"arg.filter0 not object";const p=await a({state:{vocab:{genome:o,dslabel:n}}});p.getTermdbConfig();const f=await t({holder:e(i.holder).select(".sja_root_holder"),genome:c,state:{genome:o,dslabel:n,termfilter:{filter0:i.filter0},plots:[{chartType:"geneset",toolName:"OncoMatrix",settings:{maxGenes:s.matrix.maxGenes,geneFilter:s.matrix.geneFilter}}]},app:i.opts?.app||{},geneset:{mode:"mutation",genome:c,genes:i.genes,reactsTo(t){if(t.type.startsWith("plot_"))return t.id===this.id;if(t.type.startsWith("filter"))return true;if(t.type=="app_refresh")return true},showWaitMessage(t){t.style("margin","20px");t.append("div").text("Loading the top mutated genes in the current cohort...")},async callback(t,e){if(!t)return;d=t;if(!m){const t=f.getState().plots.find((t=>t.chartType=="matrix"));if(t)m=f.getComponents(`plots.${t.id}`)}const r=[...i.termgroups||[],{lst:e}];if(m){f.dispatch({type:"plot_edit",id:m.id,config:{termgroups:r}})}else{f.dispatch({type:"plot_create",config:{chartType:"matrix",termgroups:r,divideBy:i.divideBy||undefined,settings:s}})}}},recover:{undoHtml:"Undo",redoHtml:"Redo",resetHtml:"Restore",hide(t){return t.plots[0]?.chartType!="matrix"},adjustTrackedState:t=>{const e=structuredClone(t);delete e.termfilter.filter0;if(e.plots){for(const t of e.plots){if(!t.termgroups)continue;for(const e of t.termgroups){if(!e.lst)continue;for(const t of e.lst){if(!t?.term)continue;delete t.term.category2samplecount;delete t.term.values}}}}return e}},matrix:r({reactsTo(t){if(t.type.startsWith("plot_"))return t.id===this.id;if(t.type.startsWith("filter"))return true;if(t.type=="app_refresh")return true},customInputs:{genes:[{label:`Maximum # Genes`,title:"Limit the number of displayed genes",type:"number",chartType:"matrix",settingsKey:"maxGenes",callback:async t=>{for(const t in i.opts?.app?.callbacks){if(t.startsWith("preDispatch")){i.opts?.app?.callbacks[t]();break}}const e=await l(i,{maxGenes:t,geneFilter:s.matrix.geneFilter},p);g.update({termgroups:[{lst:e}],settings:{matrix:{maxGenes:t}}})}}]},callbacks:{"firstRender.gdcMatrix":async t=>{t.on("firstRender.gdcMatrix",null);if(!d)return;f.dispatch({type:"plot_delete",id:d.id});d=undefined}}},i.opts?.matrix||{})});let m,d;const g={update:async t=>{if(!m){const t=f.getState().plots.find((t=>t.chartType=="matrix"));if(t)m=f.getComponents(`plots.${t.id}`)}if("filter0"in t){f.dispatch({type:"filter_replace",filter0:t.filter0})}else if(m){f.dispatch({type:"plot_edit",id:m.id,config:t})}}};return g}catch(t){throw t}}async function l(t,e,r){const a={maxGenes:e.maxGenes,geneFilter:e.geneFilter};if(t.filter0)a.filter0=t.filter0;const o=await i("gdc/topMutatedGenes",{body:a});if(o.error)throw o.error;if(!o.genes)return;return await Promise.all(o.genes.map((async t=>await s({term:{gene:t.gene,type:"geneVariant"}},r))))}export{p as init};
@@ -1 +1 @@
1
- import{ba as r,aD as e,c as i,d as t}from"./app-f91922b4.js";function n(r,n,o=[]){return e(this,void 0,void 0,(function*(){if(n)window["hic"]=r;if(r.tklst){const e=[];for(const i of r.tklst){if(!i.type){o.push("type missing from one of the tracks accompanying HiC")}else{i.iscustom=true;e.push(i)}}if(e.length){r.tklst=e}else{delete r.tklst}}if(r.enzyme){if(r.genome.hicenzymefragment){let e=null;for(const i of r.genome.hicenzymefragment){if(i.enzyme==r.enzyme){e=i;break}}if(e){r.enzymefile=e.file}else{o.push("unknown enzyme: "+r.enzyme);delete r.enzyme}}else{o.push("no enzyme fragment information available for this genome");delete r.enzyme}}try{if(r.sv&&r.sv.file){const e=yield i(r.hostURL+"/textfile",{method:"POST",body:JSON.stringify({file:r.sv.file,jwt:r.jwt})});const t=e.json();const[n,o,a]=s(t.text);if(n)throw{message:"Error parsing SV: "+n};r.sv.header=o;r.sv.items=a}const e=yield t("hicstat?"+(r.file?"file="+r.file:"url="+r.url));if(e.error){o.push(e.error);return}const n=f(r,e.out);if(n)throw{message:n}}catch(r){o.push(r.message||r);if(r.stack){console.log(r.stack)}}return r}))}function s(r){const e=r.trim().split(/\r?\n/);const[i,t]=o(e[0]);if(i)return["header error: "+i];const n=[];for(let r=1;r<e.length;r++){const i=e[r];if(i[0]=="#")continue;const[s,o]=a(i,t);if(s)return["line "+(r+1)+" error: "+s];n.push(o)}return[null,t,n]}function o(r){const e=r.toLowerCase().split("\t");if(e.length<=1)return"invalid file header for fusions";const i=(...r)=>{for(const i of r){const r=e.indexOf(i);if(r!=-1)return r}return-1};let t=i("chr_a","chr1","chra");if(t==-1)return"chr_A missing from header";e[t]="chr1";t=i("chr_b","chr2","chrb");if(t==-1)return"chr_B missing from header";e[t]="chr2";t=i("pos_a","position_a","position1","posa");if(t==-1)return"pos_a missing from header";e[t]="position1";t=i("pos_b","position_b","position2","posb");if(t==-1)return"pos_b missing from header";e[t]="position2";t=i("strand_a","orta","orienta");if(t==-1)return"strand_a missing from header";e[t]="strand1";t=i("strand_b","ortb","orientb");if(t==-1)return"strand_b missing from header";e[t]="strand2";t=i("numreadsa");if(t!=-1)e[t]="reads1";t=i("numreadsb");if(t!=-1)e[t]="reads2";return[null,e]}function a(r,e){const i=r.split("\t");const t={};for(let r=0;r<e.length;r++){t[e[r]]=i[r]}if(!t.chr1)return["missing chr1"];if(t.chr1.toLowerCase().indexOf("chr")!=0){t.chr1="chr"+t.chr1}if(!t.chr2)return["missing chr2"];if(t.chr2.toLowerCase().indexOf("chr")!=0){t.chr2="chr"+t.chr2}if(!t.position1)return["missing position1"];let n=Number.parseInt(t.position1);if(Number.isNaN(n)||n<=0)return["position1 invalid value"];t.position1=n;if(!t.position2)return["missing position2"];n=Number.parseInt(t.position2);if(Number.isNaN(n)||n<=0)return["position2 invalid value"];t.position2=n;if(t.reads1){n=Number.parseInt(t.reads1);if(Number.isNaN(n))return["reads1 invalid value"];t.reads1=n}if(t.reads2){n=Number.parseInt(t.reads2);if(Number.isNaN(n))return["reads2 invalid value"];t.reads2=n}return[null,t]}function f(e,i){if(!i)return"cannot stat hic file";e.normalization=i.normalization;e.version=i.version;if(!i.Chromosomes)return"Chromosomes not found in file stat";if(!Array.isArray(i.chrorder))return".chrorder[] missing";if(i.chrorder.length==0)return".chrorder[] empty array";e.chrorder=i.chrorder;if(!i["Base pair-delimited resolutions"])return"Base pair-delimited resolutions not found in file stat";if(!Array.isArray(i["Base pair-delimited resolutions"]))return"Base pair-delimited resolutions should be array";e.bpresolution=i["Base pair-delimited resolutions"];if(!i["Fragment-delimited resolutions"])return"Fragment-delimited resolutions not found in file stat";if(!Array.isArray(i["Fragment-delimited resolutions"]))return"Fragment-delimited resolutions is not array";e.fragresolution=i["Fragment-delimited resolutions"];const t=[];for(const r in i.Chromosomes){t.push(r)}const[n,s]=r(e.genome,t);if(n+s==0)return"chromosome names do not match with genome build";if(n>0){e.nochr=true;for(let r=0;r<e.chrorder.length;r++)e.chrorder[r]="chr"+e.chrorder[r]}e.chrlst=[];for(const r of e.genome.majorchrorder){const i=e.nochr?r.replace("chr",""):r;if(t.indexOf(i)!=-1){e.chrlst.push(r)}}}function l(r){const e=new Map;let i=null,t;for(const n of r){if(!n.rest||!n.rest[0]){return["items[].rest data problem"]}const r=Number.parseInt(n.rest[0]);if(Number.isNaN(r)){return[n.start+"."+n.stop+" invalid fragment id: "+n.rest[0]]}e.set(r,[n.start,n.stop]);if(i==null){i=r;t=r}else{i=Math.min(i,r);t=Math.max(t,r)}}return[null,e,i,t]}export{f as a,l as b,n as h};
1
+ import{ba as r,aD as e,c as i,d as t}from"./app-71453429.js";function n(r,n,o=[]){return e(this,void 0,void 0,(function*(){if(n)window["hic"]=r;if(r.tklst){const e=[];for(const i of r.tklst){if(!i.type){o.push("type missing from one of the tracks accompanying HiC")}else{i.iscustom=true;e.push(i)}}if(e.length){r.tklst=e}else{delete r.tklst}}if(r.enzyme){if(r.genome.hicenzymefragment){let e=null;for(const i of r.genome.hicenzymefragment){if(i.enzyme==r.enzyme){e=i;break}}if(e){r.enzymefile=e.file}else{o.push("unknown enzyme: "+r.enzyme);delete r.enzyme}}else{o.push("no enzyme fragment information available for this genome");delete r.enzyme}}try{if(r.sv&&r.sv.file){const e=yield i(r.hostURL+"/textfile",{method:"POST",body:JSON.stringify({file:r.sv.file,jwt:r.jwt})});const t=e.json();const[n,o,a]=s(t.text);if(n)throw{message:"Error parsing SV: "+n};r.sv.header=o;r.sv.items=a}const e=yield t("hicstat?"+(r.file?"file="+r.file:"url="+r.url));if(e.error){o.push(e.error);return}const n=f(r,e.out);if(n)throw{message:n}}catch(r){o.push(r.message||r);if(r.stack){console.log(r.stack)}}return r}))}function s(r){const e=r.trim().split(/\r?\n/);const[i,t]=o(e[0]);if(i)return["header error: "+i];const n=[];for(let r=1;r<e.length;r++){const i=e[r];if(i[0]=="#")continue;const[s,o]=a(i,t);if(s)return["line "+(r+1)+" error: "+s];n.push(o)}return[null,t,n]}function o(r){const e=r.toLowerCase().split("\t");if(e.length<=1)return"invalid file header for fusions";const i=(...r)=>{for(const i of r){const r=e.indexOf(i);if(r!=-1)return r}return-1};let t=i("chr_a","chr1","chra");if(t==-1)return"chr_A missing from header";e[t]="chr1";t=i("chr_b","chr2","chrb");if(t==-1)return"chr_B missing from header";e[t]="chr2";t=i("pos_a","position_a","position1","posa");if(t==-1)return"pos_a missing from header";e[t]="position1";t=i("pos_b","position_b","position2","posb");if(t==-1)return"pos_b missing from header";e[t]="position2";t=i("strand_a","orta","orienta");if(t==-1)return"strand_a missing from header";e[t]="strand1";t=i("strand_b","ortb","orientb");if(t==-1)return"strand_b missing from header";e[t]="strand2";t=i("numreadsa");if(t!=-1)e[t]="reads1";t=i("numreadsb");if(t!=-1)e[t]="reads2";return[null,e]}function a(r,e){const i=r.split("\t");const t={};for(let r=0;r<e.length;r++){t[e[r]]=i[r]}if(!t.chr1)return["missing chr1"];if(t.chr1.toLowerCase().indexOf("chr")!=0){t.chr1="chr"+t.chr1}if(!t.chr2)return["missing chr2"];if(t.chr2.toLowerCase().indexOf("chr")!=0){t.chr2="chr"+t.chr2}if(!t.position1)return["missing position1"];let n=Number.parseInt(t.position1);if(Number.isNaN(n)||n<=0)return["position1 invalid value"];t.position1=n;if(!t.position2)return["missing position2"];n=Number.parseInt(t.position2);if(Number.isNaN(n)||n<=0)return["position2 invalid value"];t.position2=n;if(t.reads1){n=Number.parseInt(t.reads1);if(Number.isNaN(n))return["reads1 invalid value"];t.reads1=n}if(t.reads2){n=Number.parseInt(t.reads2);if(Number.isNaN(n))return["reads2 invalid value"];t.reads2=n}return[null,t]}function f(e,i){if(!i)return"cannot stat hic file";e.normalization=i.normalization;e.version=i.version;if(!i.Chromosomes)return"Chromosomes not found in file stat";if(!Array.isArray(i.chrorder))return".chrorder[] missing";if(i.chrorder.length==0)return".chrorder[] empty array";e.chrorder=i.chrorder;if(!i["Base pair-delimited resolutions"])return"Base pair-delimited resolutions not found in file stat";if(!Array.isArray(i["Base pair-delimited resolutions"]))return"Base pair-delimited resolutions should be array";e.bpresolution=i["Base pair-delimited resolutions"];if(!i["Fragment-delimited resolutions"])return"Fragment-delimited resolutions not found in file stat";if(!Array.isArray(i["Fragment-delimited resolutions"]))return"Fragment-delimited resolutions is not array";e.fragresolution=i["Fragment-delimited resolutions"];const t=[];for(const r in i.Chromosomes){t.push(r)}const[n,s]=r(e.genome,t);if(n+s==0)return"chromosome names do not match with genome build";if(n>0){e.nochr=true;for(let r=0;r<e.chrorder.length;r++)e.chrorder[r]="chr"+e.chrorder[r]}e.chrlst=[];for(const r of e.genome.majorchrorder){const i=e.nochr?r.replace("chr",""):r;if(t.indexOf(i)!=-1){e.chrlst.push(r)}}}function l(r){const e=new Map;let i=null,t;for(const n of r){if(!n.rest||!n.rest[0]){return["items[].rest data problem"]}const r=Number.parseInt(n.rest[0]);if(Number.isNaN(r)){return[n.start+"."+n.stop+" invalid fragment id: "+n.rest[0]]}e.set(r,[n.start,n.stop]);if(i==null){i=r;t=r}else{i=Math.min(i,r);t=Math.max(t,r)}}return[null,e,i,t]}export{f as a,l as b,n as h};
@@ -1 +1 @@
1
- import{M as t,l as e,p as a,_ as r,a as i}from"./app-f91922b4.js";import{b as l,a as s,c as o}from"./axis-6cb4f314.js";const n="#999";const p="#d95f02";const c="#7570b3";const f="#1b9e77";const d="#f3f3f3";const y=.9;function m(m,g,h){if(g.individualcategories){for(const t of m){const e=t[g.individualcategories.categorykey];if(e&&g.individualcategories.categories[e]){t.color=g.individualcategories.categories[e].color}}}const x=g.individualkey;{const t=h.append("div").style("margin","5px 10px 10px 30px");const e=new Set;for(const t of m){e.add(t[x])}t.append("div").text(e.size+" "+x+(e.size>1?"s":""));if(g.individualcategories){for(const e in g.individualcategories.categories){const a=new Set;for(const t of m){const r=t[x];if(!r)continue;if(t[g.individualcategories.categorykey]==e){a.add(r)}}const r=t.append("div").style("margin","5px");r.append("div").style("display","inline-block").attr("class","sja_mcdot").style("background-color",g.individualcategories.categories[e].color).style("padding","1px 3px").text(a.size).style("margin-right","5px");r.append("span").text(g.individualcategories.categories[e].label||e).style("color",g.individualcategories.categories[e].color)}}}const u=new t({border:"none",padding:"0px"});const v=(t,e,a)=>{if(st){st.filter((e=>e[x]==t[x])).attr("fill-opacity",.5)}if(dt){dt.filter((e=>e[x]==t[x])).attr("fill-opacity",.5)}vt.filter((e=>e[x]==t[x])).attr("fill-opacity",.5);At.filter((e=>e[x]==t[x])).attr("fill-opacity",.5);u.show(e,a);u.clear();const i=[{k:x,v:t[x]},{k:g.xsampletype,v:t.sampletypes[g.xsampletype].vaf.toFixed(2)+", "+t.sampletypes[g.xsampletype].total}];if(g.individualcategories){const e=t[g.individualcategories.categorykey];if(e&&g.individualcategories.categories[e]){i.push({k:g.individualcategories.categorylabel||g.individualcategories.categorykey,v:g.individualcategories.categories[e].label||e})}}if(t.sampletypes[g.yleftsampletype]){i.push({k:g.yleftsampletype,v:t.sampletypes[g.yleftsampletype].vaf.toFixed(2)+", "+t.sampletypes[g.yleftsampletype].total})}if(t.sampletypes[g.yrightsampletype]){i.push({k:g.yrightsampletype,v:t.sampletypes[g.yrightsampletype].vaf.toFixed(2)+", "+t.sampletypes[g.yrightsampletype].total})}r(u.d,i)};const k=t=>{u.hide();if(st){st.filter((e=>e[x]==t[x])).attr("fill-opacity",0)}if(dt){dt.filter((e=>e[x]==t[x])).attr("fill-opacity",0)}vt.filter((e=>e[x]==t[x])).attr("fill-opacity",0);At.filter((e=>e[x]==t[x])).attr("fill-opacity",0)};let w=300;let z=300;let b=80;let S=80;let A=100;let F=100;let V=10;let M=10;let X=10;let Y=8;let j=12;let _=6;let C=0;let q=0;let B=0;for(const t of m){C=Math.max(C,t.sampletypes[g.xsampletype].total);if(t.sampletypes[g.yleftsampletype]){q=Math.max(q,t.sampletypes[g.yleftsampletype].total)}if(t.sampletypes[g.yrightsampletype]){B=Math.max(q,t.sampletypes[g.yrightsampletype].total)}}let D=1;let E=0;const G=e().domain([E,D]);const H=e().domain([E,D]);const I=e().domain([0,C]);let J;let K;if(q){J=e().domain([0,q])}if(B){K=e().domain([0,B])}const L=h.append("svg").style("margin","10px");let N,O,P,Q;if(q){N=L.append("g");O=N.append("g");P=N.append("g");Q=P.append("text").attr("transform","rotate(-90)").text(g.yleftsampletype+" VAF").attr("font-family",a).attr("fill",f).attr("text-anchor","middle").attr("dominant-baseline","central")}let R,T,U,W;if(B){R=L.append("g");T=R.append("g");U=R.append("g");W=U.append("text").attr("transform","rotate(-90)").text(g.yrightsampletype+" VAF").attr("font-family",a).attr("fill",f).attr("text-anchor","middle").attr("dominant-baseline","central")}const Z=L.append("g");const $=Z.append("g");const tt=Z.append("text").text(g.xsampletype+" VAF").attr("font-family",a).attr("fill",c).attr("text-anchor","middle");let et,at,rt,it,lt,st;if(q){et=L.append("g");at=et.append("rect").attr("fill",d);rt=et.append("line").attr("stroke","white").attr("stroke-width",2);it=et.append("g");lt=et.append("g").selectAll().data(m.filter((t=>t.sampletypes[g.yleftsampletype]))).enter().append("g");st=lt.append("circle").attr("fill",(t=>t.color||f)).attr("fill-opacity",0).attr("stroke",(t=>t.color||f)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k)}let ot,nt,pt,ct,ft,dt;if(B){ot=L.append("g");nt=ot.append("rect").attr("fill",d);pt=et.append("line").attr("stroke","white").attr("stroke-width",2);ct=ot.append("g");ft=ot.append("g").selectAll().data(m.filter((t=>t.sampletypes[g.yrightsampletype]))).enter().append("g");dt=ft.append("rect").attr("fill",(t=>t.color||f)).attr("fill-opacity",0).attr("stroke",(t=>t.color||f)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k)}const yt=L.append("g");const mt=yt.append("rect").attr("fill",d);const gt=yt.append("line").attr("stroke","white").attr("stroke-width",2);const ht=yt.append("text").text("Coverage").attr("text-anchor","end").attr("dominant-baseline","central").attr("font-family",a).attr("fill",n);const xt=yt.append("g");const ut=yt.append("g").selectAll().data(m).enter().append("g");const vt=ut.append("circle").attr("fill",(t=>t.color||c)).attr("fill-opacity",0).attr("stroke",(t=>t.color||c)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k);const kt=L.append("g");const wt=kt.append("rect").attr("fill",d);const zt=kt.append("line").attr("stroke","white").attr("stroke-width",2);const bt=kt.append("line").attr("stroke","white").attr("stroke-width",2);const St=kt.append("g").selectAll().data(m).enter().append("g");const At=St.append("circle").attr("fill",(t=>t.color||p)).attr("fill-opacity",0).attr("stroke",(t=>t.color||p)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k);const Ft=()=>{b=_+j+10+j*2;S=_+j*2+10+j*2;V=Y*2;M=_+j+Y+10;G.range([0,w]);H.range([0,-z]);I.range([0,A]);if(J){J.range([0,-F])}if(K){K.range([0,F])}if(N){N.attr("transform","translate("+S+","+(X+z)+")");P.attr("transform","translate(-"+(S-j)+",-"+z/2+")");Q.attr("font-size",j*2)}if(R){R.attr("transform","translate("+((q?S+V+F:0)+M+w+M+F+V)+","+(X+z)+")");U.attr("transform","translate("+(S-j)+",-"+z/2+")");W.attr("font-size",j*2)}Z.attr("transform","translate("+(S+V+F+M)+","+(X+z+M+A+V)+")");tt.attr("font-size",j*2).attr("x",w/2).attr("y",b);if(et){et.attr("transform","translate("+(S+V+F)+","+(X+z)+")");it.attr("transform","translate(0,"+(5+Y)+")");at.attr("x",-F).attr("y",-z).attr("width",F).attr("height",z);rt.attr("x1",-F).attr("y1",-z/2).attr("y2",-z/2)}if(ot){ot.attr("transform","translate("+((q?S+V+F:0)+M+w+M)+","+(X+z)+")");ct.attr("transform","translate(0,"+(5+Y)+")");nt.attr("y",-z).attr("width",F).attr("height",z);pt.attr("y1",-z/2).attr("y2",-z/2).attr("x2",F)}yt.attr("transform","translate("+(S+V+F+M)+","+(X+z+M)+")");xt.attr("transform","translate(-"+(5+Y)+",0)");mt.attr("width",w).attr("height",A);gt.attr("x1",w/2).attr("x2",w/2).attr("y2",A);ht.attr("x",-40).attr("y",A/2).attr("font-size",j*1.5);kt.attr("transform","translate("+(S+V+F+M)+","+(X+z)+")");wt.attr("y",-z).attr("width",w).attr("height",z);zt.attr("y1",-z/2).attr("y2",-z/2).attr("x2",w);bt.attr("x1",w/2).attr("x2",w/2).attr("y2",-z);if(O){i({axis:O.call(l().scale(H).tickSize(_-2)),showline:true,color:n,fontsize:j})}if(T){i({axis:T.call(s().scale(H).tickSize(_-2)),showline:true,color:n,fontsize:j})}i({axis:$.call(o().scale(G).tickSize(_-2)),showline:true,color:n,fontsize:j});i({axis:xt.call(l().scale(I).tickSize(_-2).tickValues([0,C])),showline:true,color:n,fontsize:j});if(it){i({axis:it.call(o().scale(J).tickSize(_-2).tickValues([0,q])),showline:true,color:n,fontsize:j})}if(ct){i({axis:ct.call(o().scale(K).tickSize(_-2).tickValues([0,B])),showline:true,color:n,fontsize:j})}if(lt){lt.attr("transform",(t=>{const e=t.sampletypes[g.yleftsampletype];return"translate("+J(e.total)+","+H(e.vaf)+")"}))}if(ft){ft.attr("transform",(t=>{const e=t.sampletypes[g.yrightsampletype];return"translate("+K(e.total)+","+H(e.vaf)+")"}))}ut.attr("transform",(t=>{const e=t.sampletypes[g.xsampletype];return"translate("+G(e.vaf)+","+I(e.total)+")"}));St.attr("transform",(t=>{const e=t.sampletypes[g.xsampletype];const a=t.sampletypes[g.yleftsampletype]||t.sampletypes[g.yrightsampletype];return"translate("+G(e.vaf)+","+H(a.vaf)+")"}));vt.attr("r",Y);At.attr("r",Y);if(st){st.attr("r",Y)}if(dt){dt.attr("x",-Y).attr("y",-Y).attr("width",Y*2).attr("height",Y*2)}L.attr("width",(q?S+V+F:0)+M+w+M+(B?F+V+S:0)).attr("height",X+z+M+A+V+b)};Ft()}export{m as default};
1
+ import{M as t,l as e,p as a,_ as r,a as i}from"./app-71453429.js";import{b as l,a as s,c as o}from"./axis-6cb4f314.js";const n="#999";const p="#d95f02";const c="#7570b3";const f="#1b9e77";const d="#f3f3f3";const y=.9;function m(m,g,h){if(g.individualcategories){for(const t of m){const e=t[g.individualcategories.categorykey];if(e&&g.individualcategories.categories[e]){t.color=g.individualcategories.categories[e].color}}}const x=g.individualkey;{const t=h.append("div").style("margin","5px 10px 10px 30px");const e=new Set;for(const t of m){e.add(t[x])}t.append("div").text(e.size+" "+x+(e.size>1?"s":""));if(g.individualcategories){for(const e in g.individualcategories.categories){const a=new Set;for(const t of m){const r=t[x];if(!r)continue;if(t[g.individualcategories.categorykey]==e){a.add(r)}}const r=t.append("div").style("margin","5px");r.append("div").style("display","inline-block").attr("class","sja_mcdot").style("background-color",g.individualcategories.categories[e].color).style("padding","1px 3px").text(a.size).style("margin-right","5px");r.append("span").text(g.individualcategories.categories[e].label||e).style("color",g.individualcategories.categories[e].color)}}}const u=new t({border:"none",padding:"0px"});const v=(t,e,a)=>{if(st){st.filter((e=>e[x]==t[x])).attr("fill-opacity",.5)}if(dt){dt.filter((e=>e[x]==t[x])).attr("fill-opacity",.5)}vt.filter((e=>e[x]==t[x])).attr("fill-opacity",.5);At.filter((e=>e[x]==t[x])).attr("fill-opacity",.5);u.show(e,a);u.clear();const i=[{k:x,v:t[x]},{k:g.xsampletype,v:t.sampletypes[g.xsampletype].vaf.toFixed(2)+", "+t.sampletypes[g.xsampletype].total}];if(g.individualcategories){const e=t[g.individualcategories.categorykey];if(e&&g.individualcategories.categories[e]){i.push({k:g.individualcategories.categorylabel||g.individualcategories.categorykey,v:g.individualcategories.categories[e].label||e})}}if(t.sampletypes[g.yleftsampletype]){i.push({k:g.yleftsampletype,v:t.sampletypes[g.yleftsampletype].vaf.toFixed(2)+", "+t.sampletypes[g.yleftsampletype].total})}if(t.sampletypes[g.yrightsampletype]){i.push({k:g.yrightsampletype,v:t.sampletypes[g.yrightsampletype].vaf.toFixed(2)+", "+t.sampletypes[g.yrightsampletype].total})}r(u.d,i)};const k=t=>{u.hide();if(st){st.filter((e=>e[x]==t[x])).attr("fill-opacity",0)}if(dt){dt.filter((e=>e[x]==t[x])).attr("fill-opacity",0)}vt.filter((e=>e[x]==t[x])).attr("fill-opacity",0);At.filter((e=>e[x]==t[x])).attr("fill-opacity",0)};let w=300;let z=300;let b=80;let S=80;let A=100;let F=100;let V=10;let M=10;let X=10;let Y=8;let j=12;let _=6;let C=0;let q=0;let B=0;for(const t of m){C=Math.max(C,t.sampletypes[g.xsampletype].total);if(t.sampletypes[g.yleftsampletype]){q=Math.max(q,t.sampletypes[g.yleftsampletype].total)}if(t.sampletypes[g.yrightsampletype]){B=Math.max(q,t.sampletypes[g.yrightsampletype].total)}}let D=1;let E=0;const G=e().domain([E,D]);const H=e().domain([E,D]);const I=e().domain([0,C]);let J;let K;if(q){J=e().domain([0,q])}if(B){K=e().domain([0,B])}const L=h.append("svg").style("margin","10px");let N,O,P,Q;if(q){N=L.append("g");O=N.append("g");P=N.append("g");Q=P.append("text").attr("transform","rotate(-90)").text(g.yleftsampletype+" VAF").attr("font-family",a).attr("fill",f).attr("text-anchor","middle").attr("dominant-baseline","central")}let R,T,U,W;if(B){R=L.append("g");T=R.append("g");U=R.append("g");W=U.append("text").attr("transform","rotate(-90)").text(g.yrightsampletype+" VAF").attr("font-family",a).attr("fill",f).attr("text-anchor","middle").attr("dominant-baseline","central")}const Z=L.append("g");const $=Z.append("g");const tt=Z.append("text").text(g.xsampletype+" VAF").attr("font-family",a).attr("fill",c).attr("text-anchor","middle");let et,at,rt,it,lt,st;if(q){et=L.append("g");at=et.append("rect").attr("fill",d);rt=et.append("line").attr("stroke","white").attr("stroke-width",2);it=et.append("g");lt=et.append("g").selectAll().data(m.filter((t=>t.sampletypes[g.yleftsampletype]))).enter().append("g");st=lt.append("circle").attr("fill",(t=>t.color||f)).attr("fill-opacity",0).attr("stroke",(t=>t.color||f)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k)}let ot,nt,pt,ct,ft,dt;if(B){ot=L.append("g");nt=ot.append("rect").attr("fill",d);pt=et.append("line").attr("stroke","white").attr("stroke-width",2);ct=ot.append("g");ft=ot.append("g").selectAll().data(m.filter((t=>t.sampletypes[g.yrightsampletype]))).enter().append("g");dt=ft.append("rect").attr("fill",(t=>t.color||f)).attr("fill-opacity",0).attr("stroke",(t=>t.color||f)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k)}const yt=L.append("g");const mt=yt.append("rect").attr("fill",d);const gt=yt.append("line").attr("stroke","white").attr("stroke-width",2);const ht=yt.append("text").text("Coverage").attr("text-anchor","end").attr("dominant-baseline","central").attr("font-family",a).attr("fill",n);const xt=yt.append("g");const ut=yt.append("g").selectAll().data(m).enter().append("g");const vt=ut.append("circle").attr("fill",(t=>t.color||c)).attr("fill-opacity",0).attr("stroke",(t=>t.color||c)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k);const kt=L.append("g");const wt=kt.append("rect").attr("fill",d);const zt=kt.append("line").attr("stroke","white").attr("stroke-width",2);const bt=kt.append("line").attr("stroke","white").attr("stroke-width",2);const St=kt.append("g").selectAll().data(m).enter().append("g");const At=St.append("circle").attr("fill",(t=>t.color||p)).attr("fill-opacity",0).attr("stroke",(t=>t.color||p)).attr("stroke-opacity",y).on("mouseover",((t,e)=>v(e,t.clientX,t.clientY))).on("mouseout",k);const Ft=()=>{b=_+j+10+j*2;S=_+j*2+10+j*2;V=Y*2;M=_+j+Y+10;G.range([0,w]);H.range([0,-z]);I.range([0,A]);if(J){J.range([0,-F])}if(K){K.range([0,F])}if(N){N.attr("transform","translate("+S+","+(X+z)+")");P.attr("transform","translate(-"+(S-j)+",-"+z/2+")");Q.attr("font-size",j*2)}if(R){R.attr("transform","translate("+((q?S+V+F:0)+M+w+M+F+V)+","+(X+z)+")");U.attr("transform","translate("+(S-j)+",-"+z/2+")");W.attr("font-size",j*2)}Z.attr("transform","translate("+(S+V+F+M)+","+(X+z+M+A+V)+")");tt.attr("font-size",j*2).attr("x",w/2).attr("y",b);if(et){et.attr("transform","translate("+(S+V+F)+","+(X+z)+")");it.attr("transform","translate(0,"+(5+Y)+")");at.attr("x",-F).attr("y",-z).attr("width",F).attr("height",z);rt.attr("x1",-F).attr("y1",-z/2).attr("y2",-z/2)}if(ot){ot.attr("transform","translate("+((q?S+V+F:0)+M+w+M)+","+(X+z)+")");ct.attr("transform","translate(0,"+(5+Y)+")");nt.attr("y",-z).attr("width",F).attr("height",z);pt.attr("y1",-z/2).attr("y2",-z/2).attr("x2",F)}yt.attr("transform","translate("+(S+V+F+M)+","+(X+z+M)+")");xt.attr("transform","translate(-"+(5+Y)+",0)");mt.attr("width",w).attr("height",A);gt.attr("x1",w/2).attr("x2",w/2).attr("y2",A);ht.attr("x",-40).attr("y",A/2).attr("font-size",j*1.5);kt.attr("transform","translate("+(S+V+F+M)+","+(X+z)+")");wt.attr("y",-z).attr("width",w).attr("height",z);zt.attr("y1",-z/2).attr("y2",-z/2).attr("x2",w);bt.attr("x1",w/2).attr("x2",w/2).attr("y2",-z);if(O){i({axis:O.call(l().scale(H).tickSize(_-2)),showline:true,color:n,fontsize:j})}if(T){i({axis:T.call(s().scale(H).tickSize(_-2)),showline:true,color:n,fontsize:j})}i({axis:$.call(o().scale(G).tickSize(_-2)),showline:true,color:n,fontsize:j});i({axis:xt.call(l().scale(I).tickSize(_-2).tickValues([0,C])),showline:true,color:n,fontsize:j});if(it){i({axis:it.call(o().scale(J).tickSize(_-2).tickValues([0,q])),showline:true,color:n,fontsize:j})}if(ct){i({axis:ct.call(o().scale(K).tickSize(_-2).tickValues([0,B])),showline:true,color:n,fontsize:j})}if(lt){lt.attr("transform",(t=>{const e=t.sampletypes[g.yleftsampletype];return"translate("+J(e.total)+","+H(e.vaf)+")"}))}if(ft){ft.attr("transform",(t=>{const e=t.sampletypes[g.yrightsampletype];return"translate("+K(e.total)+","+H(e.vaf)+")"}))}ut.attr("transform",(t=>{const e=t.sampletypes[g.xsampletype];return"translate("+G(e.vaf)+","+I(e.total)+")"}));St.attr("transform",(t=>{const e=t.sampletypes[g.xsampletype];const a=t.sampletypes[g.yleftsampletype]||t.sampletypes[g.yrightsampletype];return"translate("+G(e.vaf)+","+H(a.vaf)+")"}));vt.attr("r",Y);At.attr("r",Y);if(st){st.attr("r",Y)}if(dt){dt.attr("x",-Y).attr("y",-Y).attr("width",Y*2).attr("height",Y*2)}L.attr("width",(q?S+V+F:0)+M+w+M+(B?F+V+S:0)).attr("height",X+z+M+A+V+b)};Ft()}export{m as default};
@@ -0,0 +1 @@
1
+ import{aA as t,M as s,ac as r}from"./app-71453429.js";import{s as e,r as o}from"./recover-b1ec4fed.js";import{v as i}from"./FilterRxComp-fc769f34.js";import"./FilterStateless-8f30f856.js";import"./app-fb676934.js";import"./termInfo-4c759483.js";import"./table-1dae543a.js";import"./termsetting-636d2271.js";import"path";function a(t){switch(t){case"../plots/DEanalysis.js":return import("./DEanalysis-567989ff.js");case"../plots/Disco.js":return import("./Disco-5d1404ce.js");case"../plots/DziViewer.js":return import("./DziViewer-3f466d90.js");case"../plots/barchart.data.js":return import("./FilterRxComp-fc769f34.js").then((function(t){return t.y}));case"../plots/barchart.events.js":return import("./barchart.events-e24facf7.js");case"../plots/barchart.js":return import("./barchart-ef4874c8.js");case"../plots/bars.renderer.js":return import("./bars.renderer-c46d3f44.js");case"../plots/bars.settings.js":return import("./bars.settings-64bb4642.js");case"../plots/boxplot.js":return import("./boxplot-a2e1ace0.js");case"../plots/brainImaging.js":return import("./brainImaging-21701238.js");case"../plots/controls.btns.js":return import("./controls.btns-ad7b28a2.js");case"../plots/controls.config.js":return import("./controls.config-6cf816fb.js");case"../plots/controls.divide.js":return import("./controls.divide-3c0d52d7.js");case"../plots/controls.js":return import("./controls-0467d2ec.js");case"../plots/controls.overlay.js":return import("./controls.overlay-3a55c2ec.js");case"../plots/controls.term1.js":return import("./controls.term1-59f4cd60.js");case"../plots/cuminc.js":return import("./cuminc-8d21132b.js");case"../plots/dataDownload.js":return import("./dataDownload-bfa92dad.js");case"../plots/dictionary.js":return import("./dictionary-89e860ee.js");case"../plots/geneExpression.js":return import("./geneExpression-9047481a.js");case"../plots/geneORA.js":return import("./geneORA-ffb2497e.js");case"../plots/geneset.js":return import("./geneset-3522bcda.js");case"../plots/genomeBrowser.controls.js":return import("./genomeBrowser.controls-bef8bf99.js");case"../plots/genomeBrowser.js":return import("./genomeBrowser-9b72eb22.js");case"../plots/hierCluster.config.js":return import("./hierCluster.config-f8686a30.js");case"../plots/hierCluster.interactivity.js":return import("./hierCluster.interactivity-3b5f1e81.js").then((function(t){return t.i}));case"../plots/hierCluster.js":return import("./hierCluster-3b14b2b3.js");case"../plots/hierCluster.renderers.js":return import("./hierCluster.renderers-9f9a7cad.js").then((function(t){return t.r}));case"../plots/imagePlot.js":return import("./imagePlot-095b9a92.js");case"../plots/matrix.cells.js":return import("./matrix.cells-3620eb3a.js");case"../plots/matrix.cluster.js":return import("./matrix.cluster-15b8a865.js");case"../plots/matrix.config.js":return import("./matrix.config-8247bea5.js");case"../plots/matrix.controls.js":return import("./matrix.controls-dea65894.js");case"../plots/matrix.data.js":return import("./matrix.data-121a1a8c.js").then((function(t){return t.m}));case"../plots/matrix.dom.js":return import("./matrix.dom-83c5fa39.js");case"../plots/matrix.groups.js":return import("./matrix.groups-2e1202ef.js").then((function(t){return t.m}));case"../plots/matrix.interactivity.js":return import("./matrix.interactivity-2b076155.js");case"../plots/matrix.js":return import("./matrix-3fae58f8.js");case"../plots/matrix.layout.js":return import("./matrix.layout-8dc54c05.js").then((function(t){return t.m}));case"../plots/matrix.legend.js":return import("./matrix.legend-e0078739.js").then((function(t){return t.m}));case"../plots/matrix.renderers.js":return import("./matrix.renderers-0c8eddc9.js");case"../plots/matrix.serieses.js":return import("./matrix.serieses-2898da6b.js").then((function(t){return t.m}));case"../plots/matrix.sort.js":return import("./matrix.sort-249d4a35.js");case"../plots/matrix.sorterUi.js":return import("./matrix.sorterUi-d26208c8.js");case"../plots/plot.app.js":return Promise.resolve().then((function(){return c}));case"../plots/plot.brainImaging.js":return import("./plot.brainImaging-325ebded.js");case"../plots/plot.disco.js":return import("./plot.disco-621d1b8e.js");case"../plots/plot.ssgq.js":return import("./plot.ssgq-1949c207.js");case"../plots/profileBarchart.js":return import("./profileBarchart-11755d7c.js");case"../plots/profilePlot.js":return import("./profilePlot-8ee3034a.js");case"../plots/profilePolar.js":return import("./profilePolar-9fe70c32.js");case"../plots/profileRadar.js":return import("./profileRadar-0e744181.js");case"../plots/profileRadarFacility.js":return import("./profileRadarFacility-102544c5.js");case"../plots/regression.inputs.js":return import("./regression.inputs-ad548745.js").then((function(t){return t.b}));case"../plots/regression.inputs.term.js":return import("./regression.inputs-ad548745.js").then((function(t){return t.a}));case"../plots/regression.inputs.values.table.js":return import("./regression.inputs.values.table-1618447a.js");case"../plots/regression.js":return import("./regression.inputs-ad548745.js").then((function(t){return t.r}));case"../plots/regression.results.js":return import("./regression.results-25008028.js").then((function(t){return t.r}));case"../plots/sampleScatter.interactivity.js":return import("./sampleScatter.interactivity-cfa3451d.js").then((function(t){return t.a}));case"../plots/sampleScatter.js":return import("./sampleScatter-47dd82cb.js").then((function(t){return t.a}));case"../plots/sampleScatter.renderer.js":return import("./sampleScatter-47dd82cb.js").then((function(t){return t.s}));case"../plots/sampleScatter.rendererThree.js":return import("./sampleScatter.rendererThree-c5321d24.js").then((function(t){return t.c}));case"../plots/sampleView.js":return import("./sampleView-30b97c7d.js");case"../plots/scatter.js":return import("./scatter-8a337eeb.js");case"../plots/singleCellPlot.js":return import("./singleCellPlot-360eaec6.js");case"../plots/stattable.js":return import("./stattable-886f7dad.js");case"../plots/summary.js":return import("./summary-ee2045a5.js");case"../plots/survival.js":return import("./survival-d7bd3c6b.js");case"../plots/table.js":return import("./table-b4a61573.js");case"../plots/variantBrowser.js":return import("./variantBrowser-910b4bcd.js");case"../plots/violin.interactivity.js":return import("./violin.interactivity-bcf0ccc2.js");case"../plots/violin.js":return import("./violin-a41b2e2b.js");case"../plots/violin.renderer.js":return import("./violin.renderer-149310eb.js");default:return new Promise((function(s,r){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}class n{constructor(t){this.type="app";const s=t.violin?.mode=="minimal"?null:t.holder.append("div").style("white-space","nowrap");this.dom={holder:t.holder,errdiv:t.holder.append("div"),plotDiv:t.holder.append("div")};if(s){this.dom.plotControls=s.append("div").style("display","inline-block");this.dom.recoverControls=s.append("div").style("display","inline-block")}}validateOpts(t={}){if(!t.holder)throw`missing opts.holder in the MassApp constructor argument`;if(!t.callbacks)t.callbacks={};return t}async preApiFreeze(t){try{t.tip=new s({padding:"5px"});t.printError=t=>this.printError(t);const r=this.opts.state.vocab;t.vocabApi=this.opts.vocabApi?this.opts.vocabApi:await i({app:t,state:{vocab:{genome:r?.genome||this.opts.state.genome,dslabel:r?.dslabel||this.opts.state.dslabel,terms:r?.terms}},fetchOpts:this.opts.fetchOpts});this.opts.state.vocab=t.vocabApi.vocab}catch(t){throw t}}async init(){try{this.opts.state.nav={header_mode:"hidden"};this.store=await e({app:this.api,state:this.opts.state});this.state=await this.store.copyState();this.components={plots:{}};if(this.opts.app?.features?.includes("recover"))this.components.recover=await o({app:this.api,holder:this.dom.recoverControls,getState:t=>t,maxHistoryLen:10});await this.api.dispatch()}catch(t){this.printError(t);throw t}}async main(){this.api.vocabApi.main();for(const t in this.components.plots){const s=this.components.plots[t];if(!this.state.plots.find((t=>t.id===s.id))){s.destroy();delete this.components.plots[t]}}for(const[t,s]of this.state.plots.entries()){if(!this.components.plots[s.id]){const t=this.dom.holder.append("div");if(!this.dom.plotDiv)this.dom.plotDiv=t;const r=await a(`../plots/${s.chartType}.js`);const e=await r.componentInit({id:s.id,app:this.api,holder:t,controls:this.dom.plotControls});this.components.plots[s.id]=e}}}printError(t){r(this.dom.errdiv,"Error: "+(t.message||t));if(t.stack)console.log(t.stack);this.bus.emit("error")}destroy(){this.dom.holder.selectAll("*").remove()}}const p=t(n);var c=Object.freeze({__proto__:null,appInit:p});export{p as appInit};
@@ -1 +1 @@
1
- import{a0 as t,aU as a,p as e,l as o,f as n,a as i}from"./app-f91922b4.js";import{d as l}from"./axis-6cb4f314.js";function r(a,e,o,n){const i=t({x:n.left+200,y:n.top});i.body.style("padding","10px");i.header.html(o);a.sort(((t,a)=>a.size-t.size));s({lst:a,holder:i.body,barcolor:e,limit:Math.min(a.length,20)})}function s(t){t.holder.selectAll("*").remove();const r=t.holder.append("div").style("margin-bottom","10px");r.append("button").text("more").on("click",(()=>{t.limit=Math.min(t.lst.length,t.limit+10);s(t)}));r.append("button").text("less").on("click",(()=>{t.limit=Math.max(1,t.limit-10);s(t)}));r.append("button").text("screenshot").on("click",(()=>a(b.node(),"barplot")));let m=20,c=300,d=5,p=m+5,h=m/8,f=0,x=0;const b=t.holder.append("svg");const g=b.append("g");for(let a=0;a<t.limit;a++){let o=t.lst[a];x=Math.max(x,o.size);b.append("text").text(o.name).attr("font-size",m-2).attr("font-family",e).each((function(){f=Math.max(f,this.getBBox().width)})).remove()}b.attr("width",f+d+c+d).attr("height",p+d+t.limit*(m+h));g.attr("transform","translate("+(f+d)+","+p+")").call(l().scale(o().domain([0,x]).range([0,c])).tickFormat(n("d")));i({axis:g,showline:true,fontsize:m*.8,color:"black"});let y=p+d;const u=c/x;for(let a=0;a<t.limit;a++){const o=t.lst[a];b.append("text").text(o.name).attr("x",f).attr("y",y+m/2).attr("text-anchor","end").attr("font-size",m-2).attr("font-family",e).attr("dominant-baseline","central");b.append("rect").attr("x",f+d).attr("y",y).attr("width",u*o.size).attr("height",m-1).attr("fill",t.barcolor);y+=m+h}}export{r as default};
1
+ import{a0 as t,aU as a,p as e,l as o,f as n,a as i}from"./app-71453429.js";import{d as l}from"./axis-6cb4f314.js";function r(a,e,o,n){const i=t({x:n.left+200,y:n.top});i.body.style("padding","10px");i.header.html(o);a.sort(((t,a)=>a.size-t.size));s({lst:a,holder:i.body,barcolor:e,limit:Math.min(a.length,20)})}function s(t){t.holder.selectAll("*").remove();const r=t.holder.append("div").style("margin-bottom","10px");r.append("button").text("more").on("click",(()=>{t.limit=Math.min(t.lst.length,t.limit+10);s(t)}));r.append("button").text("less").on("click",(()=>{t.limit=Math.max(1,t.limit-10);s(t)}));r.append("button").text("screenshot").on("click",(()=>a(b.node(),"barplot")));let m=20,c=300,d=5,p=m+5,h=m/8,f=0,x=0;const b=t.holder.append("svg");const g=b.append("g");for(let a=0;a<t.limit;a++){let o=t.lst[a];x=Math.max(x,o.size);b.append("text").text(o.name).attr("font-size",m-2).attr("font-family",e).each((function(){f=Math.max(f,this.getBBox().width)})).remove()}b.attr("width",f+d+c+d).attr("height",p+d+t.limit*(m+h));g.attr("transform","translate("+(f+d)+","+p+")").call(l().scale(o().domain([0,x]).range([0,c])).tickFormat(n("d")));i({axis:g,showline:true,fontsize:m*.8,color:"black"});let y=p+d;const u=c/x;for(let a=0;a<t.limit;a++){const o=t.lst[a];b.append("text").text(o.name).attr("x",f).attr("y",y+m/2).attr("text-anchor","end").attr("font-size",m-2).attr("font-family",e).attr("dominant-baseline","central");b.append("rect").attr("x",f+d).attr("y",y).attr("width",u*o.size).attr("height",m-1).attr("fill",t.barcolor);y+=m+h}}export{r as default};
@@ -1 +1 @@
1
- import{am as t,an as e,p as r,l as a,a as n}from"./app-f91922b4.js";import{d as i}from"./axis-6cb4f314.js";function s(s){if(!s.holder)return".holder missing for boxplot";if(!s.list)return".list[] missing";if(!Array.isArray(s.list))return".list should be array";for(const t of s.list){if(!t.label)return".label missing for a group";if(t.samples){for(const e of t.samples){if(!Number.isFinite(e.value))return".value missing from a sample"}}else{if(!Number.isFinite(t.minvalue))return".minvalue missing for a group";if(!Number.isFinite(t.maxvalue))return".maxvalue missing for a group";if(!t.percentile)return".percentile{} missing from a group";if(!Number.isFinite(t.percentile.p05))return".percentile.p05 missing for a group";if(!Number.isFinite(t.percentile.p25))return".percentile.p25 missing for a group";if(!Number.isFinite(t.percentile.p50))return".percentile.p50 missing for a group";if(!Number.isFinite(t.percentile.p75))return".percentile.p75 missing for a group";if(!Number.isFinite(t.percentile.p95))return".percentile.p95 missing for a group"}}const l=t(e);const o=s.holder.append("svg");let p=40,f=300,m=10,u=10,c=30,g=12,h=15;let d=0;let x=null;let b=null;for(const t of s.list){const e=t.samplecount?t.samplecount:t.samples?t.samples.length:null;o.append("text").text(t.label+(e?" (n="+e+")":"")).attr("font-family",r).attr("font-size",h).each((function(){d=Math.max(d,this.getBBox().width)})).remove();if(t.samples){for(const e of t.samples){if(e.value==undefined)continue;if(x==null){x=e.value;b=e.value}else{x=Math.min(x,e.value);b=Math.max(b,e.value)}}}else{if(x==null){x=t.minvalue;b=t.maxvalue}else{x=Math.min(x,t.minvalue);b=Math.max(b,t.maxvalue)}}}o.attr("width",d+u+f+u).attr("height",p+(m+c)*s.list.length+10);const v=o.append("g").attr("transform","translate("+(d+u)+","+p+")");const y=a().domain([x,b]).range([0,f]);const M=v.append("g");n({axis:M.call(i().scale(y).ticks(5)),showline:true,fontsize:g,color:"black"});if(s.axislabel){v.append("text").text(s.axislabel).attr("x",f/2).attr("y",-g-13).attr("font-family",r).attr("font-size",h).attr("text-anchor","middle")}let k=0;for(const t of s.list){k+=m;const e=v.append("g").attr("transform","translate(0,"+k+")");k+=c;const a=t.samplecount?t.samplecount:t.samples?t.samples.length:null;e.append("text").text(t.label+(a?" (n="+a+")":"")).attr("x",-u).attr("y",c/2).attr("text-anchor","end").attr("dominant-baseline","central").attr("font-family",r).attr("font-size",h).attr("fill","black");let n,i,s,o,p;if(t.samples){const e=t.samples.map((t=>t.value));e.sort(((t,e)=>t-e));n=e[Math.floor(e.length*.05)];i=e[Math.floor(e.length*.25)];s=e[Math.floor(e.length*.5)];o=e[Math.floor(e.length*.75)];p=e[Math.floor(e.length*.95)]}else{n=t.percentile.p05;i=t.percentile.p25;s=t.percentile.p50;o=t.percentile.p75;p=t.percentile.p95}const f=y(n);const g=y(i);const d=y(s);const x=y(o);const b=y(p);const M=t.color||l(t.label);e.append("line").attr("y1",c/2).attr("y2",c/2).attr("x1",f).attr("x2",b).attr("stroke",M).attr("shape-rendering","crispEdges");e.append("line").attr("y2",c).attr("x1",f).attr("x2",f).attr("stroke",M).attr("shape-rendering","crispEdges");e.append("line").attr("y2",c).attr("x1",b).attr("x2",b).attr("stroke",M).attr("shape-rendering","crispEdges");e.append("rect").attr("x",g).attr("width",x-g).attr("height",c).attr("stroke",M).attr("fill","white").attr("shape-rendering","crispEdges");e.append("line").attr("y2",c).attr("x1",d).attr("x2",d).attr("stroke",M).attr("shape-rendering","crispEdges")}return null}export{s as default};
1
+ import{am as t,an as e,p as r,l as a,a as n}from"./app-71453429.js";import{d as i}from"./axis-6cb4f314.js";function s(s){if(!s.holder)return".holder missing for boxplot";if(!s.list)return".list[] missing";if(!Array.isArray(s.list))return".list should be array";for(const t of s.list){if(!t.label)return".label missing for a group";if(t.samples){for(const e of t.samples){if(!Number.isFinite(e.value))return".value missing from a sample"}}else{if(!Number.isFinite(t.minvalue))return".minvalue missing for a group";if(!Number.isFinite(t.maxvalue))return".maxvalue missing for a group";if(!t.percentile)return".percentile{} missing from a group";if(!Number.isFinite(t.percentile.p05))return".percentile.p05 missing for a group";if(!Number.isFinite(t.percentile.p25))return".percentile.p25 missing for a group";if(!Number.isFinite(t.percentile.p50))return".percentile.p50 missing for a group";if(!Number.isFinite(t.percentile.p75))return".percentile.p75 missing for a group";if(!Number.isFinite(t.percentile.p95))return".percentile.p95 missing for a group"}}const l=t(e);const o=s.holder.append("svg");let p=40,f=300,m=10,u=10,c=30,g=12,h=15;let d=0;let x=null;let b=null;for(const t of s.list){const e=t.samplecount?t.samplecount:t.samples?t.samples.length:null;o.append("text").text(t.label+(e?" (n="+e+")":"")).attr("font-family",r).attr("font-size",h).each((function(){d=Math.max(d,this.getBBox().width)})).remove();if(t.samples){for(const e of t.samples){if(e.value==undefined)continue;if(x==null){x=e.value;b=e.value}else{x=Math.min(x,e.value);b=Math.max(b,e.value)}}}else{if(x==null){x=t.minvalue;b=t.maxvalue}else{x=Math.min(x,t.minvalue);b=Math.max(b,t.maxvalue)}}}o.attr("width",d+u+f+u).attr("height",p+(m+c)*s.list.length+10);const v=o.append("g").attr("transform","translate("+(d+u)+","+p+")");const y=a().domain([x,b]).range([0,f]);const M=v.append("g");n({axis:M.call(i().scale(y).ticks(5)),showline:true,fontsize:g,color:"black"});if(s.axislabel){v.append("text").text(s.axislabel).attr("x",f/2).attr("y",-g-13).attr("font-family",r).attr("font-size",h).attr("text-anchor","middle")}let k=0;for(const t of s.list){k+=m;const e=v.append("g").attr("transform","translate(0,"+k+")");k+=c;const a=t.samplecount?t.samplecount:t.samples?t.samples.length:null;e.append("text").text(t.label+(a?" (n="+a+")":"")).attr("x",-u).attr("y",c/2).attr("text-anchor","end").attr("dominant-baseline","central").attr("font-family",r).attr("font-size",h).attr("fill","black");let n,i,s,o,p;if(t.samples){const e=t.samples.map((t=>t.value));e.sort(((t,e)=>t-e));n=e[Math.floor(e.length*.05)];i=e[Math.floor(e.length*.25)];s=e[Math.floor(e.length*.5)];o=e[Math.floor(e.length*.75)];p=e[Math.floor(e.length*.95)]}else{n=t.percentile.p05;i=t.percentile.p25;s=t.percentile.p50;o=t.percentile.p75;p=t.percentile.p95}const f=y(n);const g=y(i);const d=y(s);const x=y(o);const b=y(p);const M=t.color||l(t.label);e.append("line").attr("y1",c/2).attr("y2",c/2).attr("x1",f).attr("x2",b).attr("stroke",M).attr("shape-rendering","crispEdges");e.append("line").attr("y2",c).attr("x1",f).attr("x2",f).attr("stroke",M).attr("shape-rendering","crispEdges");e.append("line").attr("y2",c).attr("x1",b).attr("x2",b).attr("stroke",M).attr("shape-rendering","crispEdges");e.append("rect").attr("x",g).attr("width",x-g).attr("height",c).attr("stroke",M).attr("fill","white").attr("shape-rendering","crispEdges");e.append("line").attr("y2",c).attr("x1",d).attr("x2",d).attr("stroke",M).attr("shape-rendering","crispEdges")}return null}export{s as default};
@@ -1 +1 @@
1
- async function e(e,o,a,n,i,r,s={}){const c=t(s);const m=i.append("div").style("margin","20px").text("Loading...");try{if(typeof e?.queries?.NIdata!="object")throw"termdbConfig.queries.NIdata{} not object";const t=e.queries.NIdata[a];if(!t)throw"invalid queryKey";if(typeof n!="object")throw"sample{} not object";if(typeof r!="object")throw"genomeObj{} not object";const s={sampleName:n.sample_id,genome:r,queryKey:a};const d={holder:i,state:{genome:r.name,dslabel:o,args:s,plots:[{chartType:"brainImaging",overrides:c}]}};const g=await import("./plot.app-91a1d78d.js");const p=await g.appInit(d);m.remove()}catch(e){m.text("Error: "+(e.message||e))}}function t(e){const t=structuredClone(e);if(!t.brainImaging)t.brainImaging={};if(!t.downloadImgName){t.downloadImgName="brainImaging"}return t}export{e as default};
1
+ async function e(e,o,a,n,i,r,s={}){const c=t(s);const m=i.append("div").style("margin","20px").text("Loading...");try{if(typeof e?.queries?.NIdata!="object")throw"termdbConfig.queries.NIdata{} not object";const t=e.queries.NIdata[a];if(!t)throw"invalid queryKey";if(typeof n!="object")throw"sample{} not object";if(typeof r!="object")throw"genomeObj{} not object";const s={sampleName:n.sample_id,genome:r,queryKey:a};const d={holder:i,state:{genome:r.name,dslabel:o,args:s,plots:[{chartType:"brainImaging",overrides:c}]}};const g=await import("./plot.app-c841507a.js");const p=await g.appInit(d);m.remove()}catch(e){m.text("Error: "+(e.message||e))}}function t(e){const t=structuredClone(e);if(!t.brainImaging)t.brainImaging={};if(!t.downloadImgName){t.downloadImgName="brainImaging"}return t}export{e as default};
@@ -1 +1 @@
1
- import{S as t,O as e}from"./app-f91922b4.js";async function o(o,a,i,n,r,l={}){const m=s(l,o,r,i);const p=n.append("div").style("margin","20px").text("Loading...");try{if(typeof o?.queries?.singleSampleMutation!="object")throw"termdbConfig.queries.singleSampleMutation{} not object";if(typeof i!="object")throw"sample{} not object";if(typeof r!="object")throw"genomeObj{} not object";const s={genome:r.name,dslabel:a,sample:i[o.queries.singleSampleMutation.sample_id_key]};const l=await t("termdb/singleSampleMutation",{body:s});if(l.error)throw l.error;if(!Array.isArray(l.mlst))throw"data.mlst is not array";if(l.dt2total?.length){for(const t of l.dt2total){n.append("div").style("margin","20px 20px 0px 40px").text(`(Displaying ${l.mlst.filter((e=>e.dt==t.dt)).length} out of total ${t.total} ${e[t.dt]})`)}}const c=l.mlst;for(const t of c)t.position=t.pos;const d={sampleName:i[o.queries.singleSampleMutation.sample_id_key],data:c,genome:r};if(o.queries.singleSampleMutation.discoSkipChrM){d.chromosomes={};for(const t in r.majorchr){if(t.toLowerCase()=="chrm")continue;d.chromosomes[t]=r.majorchr[t]}}const f={holder:n,state:{genome:r.name,dslabel:a,args:d,plots:[{chartType:"Disco",subfolder:"disco",extension:"ts",overrides:m}]}};const g=await import("./plot.app-91a1d78d.js");const u=await g.appInit(f);p.remove()}catch(t){p.text("Error: "+(t.message||t))}}function s(t,e,o,s){const a=structuredClone(t);if(!a.Disco)a.Disco={};a.Disco.showPrioritizeGeneLabelsByGeneSets=!!o.geneset;if(!a.downloadImgName){a.downloadImgName=s[e.queries.singleSampleMutation.sample_id_key]+" Disco"}return a}export{o as default};
1
+ import{S as t,O as e}from"./app-71453429.js";async function o(o,a,i,n,r,l={}){const m=s(l,o,r,i);const p=n.append("div").style("margin","20px").text("Loading...");try{if(typeof o?.queries?.singleSampleMutation!="object")throw"termdbConfig.queries.singleSampleMutation{} not object";if(typeof i!="object")throw"sample{} not object";if(typeof r!="object")throw"genomeObj{} not object";const s={genome:r.name,dslabel:a,sample:i[o.queries.singleSampleMutation.sample_id_key]};const l=await t("termdb/singleSampleMutation",{body:s});if(l.error)throw l.error;if(!Array.isArray(l.mlst))throw"data.mlst is not array";if(l.dt2total?.length){for(const t of l.dt2total){n.append("div").style("margin","20px 20px 0px 40px").text(`(Displaying ${l.mlst.filter((e=>e.dt==t.dt)).length} out of total ${t.total} ${e[t.dt]})`)}}const c=l.mlst;for(const t of c)t.position=t.pos;const d={sampleName:i[o.queries.singleSampleMutation.sample_id_key],data:c,genome:r};if(o.queries.singleSampleMutation.discoSkipChrM){d.chromosomes={};for(const t in r.majorchr){if(t.toLowerCase()=="chrm")continue;d.chromosomes[t]=r.majorchr[t]}}const f={holder:n,state:{genome:r.name,dslabel:a,args:d,plots:[{chartType:"Disco",subfolder:"disco",extension:"ts",overrides:m}]}};const g=await import("./plot.app-c841507a.js");const u=await g.appInit(f);p.remove()}catch(t){p.text("Error: "+(t.message||t))}}function s(t,e,o,s){const a=structuredClone(t);if(!a.Disco)a.Disco={};a.Disco.showPrioritizeGeneLabelsByGeneSets=!!o.geneset;if(!a.downloadImgName){a.downloadImgName=s[e.queries.singleSampleMutation.sample_id_key]+" Disco"}return a}export{o as default};
@@ -1 +1 @@
1
- async function e(e,t,a,s,o){const i=t.append("div").style("margin","20px").text("Loading...");try{const n={holder:t,state:{genome:a.name,dslabel:e,sample_id:s,dzimages:o,plots:[{chartType:"DziViewer",subfolder:"dziviewer",extension:"ts"}]}};const p=await import("./plot.app-91a1d78d.js");const r=await p.appInit(n);i.remove()}catch(e){i.text("Error: "+(e.message||e))}}export{e as default};
1
+ async function e(e,t,a,s,o){const i=t.append("div").style("margin","20px").text("Loading...");try{const n={holder:t,state:{genome:a.name,dslabel:e,sample_id:s,dzimages:o,plots:[{chartType:"DziViewer",subfolder:"dziviewer",extension:"ts"}]}};const p=await import("./plot.app-c841507a.js");const r=await p.appInit(n);i.remove()}catch(e){i.text("Error: "+(e.message||e))}}export{e as default};
@@ -1 +1 @@
1
- import{S as t,Y as e,b8 as o}from"./app-f91922b4.js";async function i(o,i,a,s,r,c,p){const l=r.append("div").text("Loading...");try{if(typeof o?.queries?.singleSampleGenomeQuantification!="object")throw"termdbConfig.queries.singleSampleGenomeQuantification{} missing, cannot plot";const m=o.queries.singleSampleGenomeQuantification[a];if(!m)throw"invalid queryKey";if(typeof s!="object")throw"sample{} not object";if(typeof c!="object")throw"genomeObj{} not object";const d={genome:c.name,dslabel:i,devicePixelRatio:window.devicePixelRatio>1?window.devicePixelRatio:1,singleSampleGenomeQuantification:{dataType:a,sample:s[m.sample_id_key]}};const f=await t("mds3",{body:d});if(f.error)throw f.error;const h=o.queries.singleSampleGbtk?.[m.singleSampleGbtk];r.append("div").attr("data-testid","sjpp_ssgq_sandbox").text(m.description||a);if(h){r.append("div").text(`Click a chromosomal position to zoom in and view ${h.description||m.singleSampleGbtk}`)}const g=r.append("img").attr("width",f.canvasWidth).attr("height",f.canvasHeight).attr("src",f.src);l.remove();if(!h)return;let b;if(p){const o=await t("genelookup",{body:{genome:c.name,input:p,deep:1}});if(o.error)throw o.error;if(o.gmlst&&o.gmlst.length){const t=e(o.gmlst);const a=t[0].chr;const p=Math.max(0,t[0].start-(t[0].stop-t[0].start));const l=f.chrLst.filter((t=>t.chr==a))[0].chrLen;const d=Math.min(l,t[0].stop+(t[0].stop-t[0].start));b=await n(i,s,r,c,m,h,a,p,d)}}g.on("click",(async t=>{const e=t.offsetX-f.xoff;let o,a,p;for(const t of f.chrLst){if(t.xStart<=e&&t.xStop>=e){o=t.chr;a=t.chrLen;p=Math.ceil(t.chrLen/(t.xStop-t.xStart)*(e-t.xStart));break}}if(!o)return;const l=Math.max(0,p-5e5),d=Math.min(p+5e5,a);if(b){b.jump_1basedcoordinate({chr:o,start:l,stop:d});return}b=await n(i,s,r,c,m,h,o,l,d)}))}catch(t){l.text("Error: "+(t.message||t))}}async function n(e,i,n,a,s,r,c,p,l){const m={genome:a.name,dslabel:e,singleSampleGbtk:{dataType:s.singleSampleGbtk,sample:i[r.sample_id_key]}};const d=await t("mds3",{body:m});if(!d.path)return;const f=[{type:"bigwig",name:i[r.sample_id_key],file:d.path,height:100,scale:{min:r.min,max:r.max},pcolor:s.positiveColor,ncolor:s.negativeColor}];o(a,f);const h=new((await import("./block-ec76524e.js").then((function(t){return t.c}))).Block)({genome:a,holder:n.append("div"),nobox:true,tklst:f,chr:c,start:p,stop:l});return h}export{i as plotSingleSampleGenomeQuantification};
1
+ import{S as t,Y as e,b8 as o}from"./app-71453429.js";async function i(o,i,n,s,r,c,p){const l=r.append("div").text("Loading...");try{if(typeof o?.queries?.singleSampleGenomeQuantification!="object")throw"termdbConfig.queries.singleSampleGenomeQuantification{} missing, cannot plot";const m=o.queries.singleSampleGenomeQuantification[n];if(!m)throw"invalid queryKey";if(typeof s!="object")throw"sample{} not object";if(typeof c!="object")throw"genomeObj{} not object";const d={genome:c.name,dslabel:i,devicePixelRatio:window.devicePixelRatio>1?window.devicePixelRatio:1,singleSampleGenomeQuantification:{dataType:n,sample:s[m.sample_id_key]}};const f=await t("mds3",{body:d});if(f.error)throw f.error;const h=o.queries.singleSampleGbtk?.[m.singleSampleGbtk];r.append("div").attr("data-testid","sjpp_ssgq_sandbox").text(m.description||n);if(h){r.append("div").text(`Click a chromosomal position to zoom in and view ${h.description||m.singleSampleGbtk}`)}const g=r.append("img").attr("width",f.canvasWidth).attr("height",f.canvasHeight).attr("src",f.src);l.remove();if(!h)return;let b;if(p){const o=await t("genelookup",{body:{genome:c.name,input:p,deep:1}});if(o.error)throw o.error;if(o.gmlst&&o.gmlst.length){const t=e(o.gmlst);const n=t[0].chr;const p=Math.max(0,t[0].start-(t[0].stop-t[0].start));const l=f.chrLst.filter((t=>t.chr==n))[0].chrLen;const d=Math.min(l,t[0].stop+(t[0].stop-t[0].start));b=await a(i,s,r,c,m,h,n,p,d)}}g.on("click",(async t=>{const e=t.offsetX-f.xoff;let o,n,p;for(const t of f.chrLst){if(t.xStart<=e&&t.xStop>=e){o=t.chr;n=t.chrLen;p=Math.ceil(t.chrLen/(t.xStop-t.xStart)*(e-t.xStart));break}}if(!o)return;const l=Math.max(0,p-5e5),d=Math.min(p+5e5,n);if(b){b.jump_1basedcoordinate({chr:o,start:l,stop:d});return}b=await a(i,s,r,c,m,h,o,l,d)}))}catch(t){l.text("Error: "+(t.message||t))}}async function a(e,i,a,n,s,r,c,p,l){const m={genome:n.name,dslabel:e,singleSampleGbtk:{dataType:s.singleSampleGbtk,sample:i[r.sample_id_key]}};const d=await t("mds3",{body:m});if(!d.path)return;const f=[{type:"bigwig",name:i[r.sample_id_key],file:d.path,height:100,scale:{min:r.min,max:r.max},pcolor:s.positiveColor,ncolor:s.negativeColor}];o(n,f);const h=new((await import("./block-4f585abe.js").then((function(t){return t.c}))).Block)({genome:n,holder:a.append("div"),nobox:true,tklst:f,chr:c,start:p,stop:l});return h}export{i as plotSingleSampleGenomeQuantification};
@@ -1 +1 @@
1
- import{l as t,p as a,am as r,an as e,q as o,_ as n,a as s,f as l}from"./app-f91922b4.js";import{c,b as i}from"./axis-6cb4f314.js";function p(p){for(const t of p.data){if(!t.sampleobj)t.sampleobj={}}let d=p.width||200;let f=p.height||200;const m=p.color||"#999";let h;let x=p.maxtotal||0;if(p.automax){for(const t of p.data){x=Math.max(x,t.total)}}let u=1;const y=[];const g=[];const k=p.bincount||20;for(let t=0;t<k;t++){y.push(0);g.push(0)}{const t=x/k;const a=u/k;for(const r of p.data){if(r.total>=x){y[k-1]++}else{y[Math.floor(r.total/t)]++}g[Math.floor((r.maf==1?.99:r.maf)/a)]++}}const w=Math.max(...y);const b=Math.max(...g);const v=t().domain([0,x]),z=t().domain([0,u]),j=t().domain([0,w]),M=t().domain([0,b]);const A=p.holder.append("svg").style("margin","10px");const F=A.append("text").text("Coverage").attr("text-anchor","middle").attr("fill",m).attr("font-family",a);const S=A.append("g");const V=S.append("text").text("VAF").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill",m).attr("font-family",a).attr("transform","rotate(-90)");const X=A.append("g");const Y=A.append("g");const E=A.append("g");const _=E.append("rect").attr("stroke",m).attr("stroke-dasharray","2,2").attr("fill","none").attr("shape-rendering","crispEdges");const q=E.append("line").attr("stroke",m).attr("stroke-dasharray","2,2").attr("shape-rendering","crispEdges");const C=A.append("g");const D=C.selectAll().data(g).enter().append("rect");const G=A.append("g");const B=A.append("g");const H=B.selectAll().data(y).enter().append("rect");const I=A.append("g");let J=null,K,L,N,O,P;if(p.genotype){const t=r(e);const o=new Set;for(const a of p.data){if(a.genotype){o.add(a.genotype);a.color=t(a.genotype)}}const n=[...o];J=A.append("g");K=J.append("text").text("Genotype").attr("dominant-baseline","central").attr("font-family",a);L=J.selectAll().data(n).enter().append("g");N=L.append("line").attr("stroke",(a=>t(a)));O=L.append("line").attr("stroke",(a=>t(a)));P=L.append("text").text((t=>t)).attr("fill",(a=>t(a))).attr("dominant-baseline","central").attr("font-family",a)}const Q=E.selectAll().data(p.data).enter().append("g");const R=Q.append("line").attr("stroke-opacity",.6).attr("stroke",(t=>t.color?t.color:t.sampleobj.color||p.samplecolor)).each((function(t){t.crosshair1=o(this)}));const T=Q.append("line").attr("stroke-opacity",.6).attr("stroke",(t=>t.color?t.color:t.sampleobj.color||p.samplecolor)).each((function(t){t.crosshair2=o(this)}));const U=Q.append("circle").attr("fill","white").attr("fill-opacity",0).on("mouseover",((t,a)=>{a.crosshair1.attr("stroke-width",3).attr("x1",-h-2).attr("y1",-h-2).attr("x2",h+2).attr("y2",h+2);a.crosshair2.attr("stroke-width",3).attr("x1",h+2).attr("y1",-h-2).attr("x2",-h-2).attr("y2",h+2);p.tip.clear();p.tip.show(t.clientX,t.clientY);const r=[{k:"mut",v:a.mut},{k:"total",v:a.total}];if(a.genotype){r.push({k:"genotype",v:a.genotype})}for(const t in a.sampleobj){if(t=="color")continue;r.push({k:t,v:a.sampleobj[t]})}n(p.tip.d,r).style("margin","none");if(p.mouseover){p.mouseover(a)}})).on("mouseout",((t,a)=>{a.crosshair1.attr("stroke-width",1).attr("x1",-h).attr("y1",-h).attr("x2",h).attr("y2",h);a.crosshair2.attr("stroke-width",1).attr("x1",h).attr("y1",-h).attr("x2",-h).attr("y2",h);p.tip.hide();if(p.mouseout){p.mouseout(a)}}));if(p.click){U.on("click",((t,a)=>{p.click(a)}))}const W=A.append("text").text("drag to resize").attr("class","sja_clbtext").attr("font-size",13).attr("text-anchor","end").attr("fill",m).on("mousedown",(t=>{t.preventDefault();const a=o(document.body);const r=t.clientX,e=t.clientY,n=d,s=f;a.on("mousemove",(t=>{d=n+t.clientX-r;f=s+t.clientY-e;Z()}));a.on("mouseup",(()=>{a.on("mousemove",null).on("mouseup",null)}))}));function Z(){const t=Math.max(12,Math.min(d,f)/25);const a=f/20;h=Math.ceil(t/3);const r=h,e=r+t*3,o=r+20,n=t*1.3,p=t*1.6,u=f/5,y=d/5;v.range([0,d]);z.range([f,0]);j.range([u,0]);M.range([0,y]);A.attr("width",t+e+p+d+n+y+a+r).attr("height",t/2+u+n+f+p+o+r+t);F.attr("font-size",t).attr("x",t+e+p+d/2).attr("y",t/2+u+n+f+p+o+r+t-5);S.attr("transform","translate("+t+","+(t/2+u+n+f/2)+")");V.attr("font-size",t);X.attr("transform","translate("+(t+e+p)+","+(t/2+u+n+f+p)+")").call(c().scale(v).ticks(4).tickSize(r));s({axis:X,color:m,fontsize:t,showline:true});Y.attr("transform","translate("+(t+e)+","+(t/2+u+n)+")").call(i().scale(z).ticks(5).tickSize(r));s({axis:Y,color:m,fontsize:t,showline:true});E.attr("transform","translate("+(t+e+p)+","+(t/2+u+n)+")");_.attr("width",d).attr("height",f);q.attr("y1",f/2).attr("x2",d).attr("y2",f/2);Q.attr("transform",(t=>"translate("+v(t.total>x?x:t.total)+","+z(t.maf)+")"));R.attr("x1",-h).attr("y1",-h).attr("x2",h).attr("y2",h);T.attr("x1",h).attr("y1",-h).attr("x2",-h).attr("y2",h);U.attr("r",h);C.attr("transform","translate("+(t+e+p+d+n)+","+(t/2+u+n+f)+")");const g=f/k;D.attr("y",((t,a)=>-g*(a+1))).attr("width",(t=>M(t))).attr("height",g).attr("fill",m);G.attr("transform","translate("+(t+e+p+d+n)+","+(t/2+u+n+f+p)+")").call(c().scale(M).tickValues([0,b]).tickFormat(l("d")));s({axis:G,color:m,showline:true});B.attr("transform","translate("+(t+e+p)+","+(t/2+u)+")");const Z=d/k;H.attr("x",((t,a)=>Z*a)).attr("y",(t=>j(t)-u)).attr("height",(t=>u-j(t))).attr("width",Z).attr("fill",m);I.attr("transform","translate("+(t+e)+","+t/2+")").call(i().scale(j).tickValues([0,w]).tickFormat(l("d")));s({axis:I,color:m,showline:true});W.attr("x",t+e+p+d+n+y+a+r-5).attr("y",t/2+u+n+f+p+o+r+t-5);if(J){J.attr("transform","translate("+(t+e+p+d+n)+","+t/2+")");K.attr("font-size",t);L.attr("transform",((a,r)=>"translate(0,"+(t/2+3+(t+1)*r+t/2)+")"));N.attr("y1",-t/2).attr("x2",t).attr("y2",t/2);O.attr("x1",t).attr("y1",-t/2).attr("y2",t/2);P.attr("x",t+5).attr("font-size",t)}}Z();return Q}export{p as default};
1
+ import{l as t,p as a,am as r,an as e,q as o,_ as n,a as s,f as l}from"./app-71453429.js";import{c,b as i}from"./axis-6cb4f314.js";function p(p){for(const t of p.data){if(!t.sampleobj)t.sampleobj={}}let d=p.width||200;let f=p.height||200;const m=p.color||"#999";let h;let x=p.maxtotal||0;if(p.automax){for(const t of p.data){x=Math.max(x,t.total)}}let u=1;const y=[];const g=[];const k=p.bincount||20;for(let t=0;t<k;t++){y.push(0);g.push(0)}{const t=x/k;const a=u/k;for(const r of p.data){if(r.total>=x){y[k-1]++}else{y[Math.floor(r.total/t)]++}g[Math.floor((r.maf==1?.99:r.maf)/a)]++}}const w=Math.max(...y);const b=Math.max(...g);const v=t().domain([0,x]),z=t().domain([0,u]),j=t().domain([0,w]),M=t().domain([0,b]);const A=p.holder.append("svg").style("margin","10px");const F=A.append("text").text("Coverage").attr("text-anchor","middle").attr("fill",m).attr("font-family",a);const S=A.append("g");const V=S.append("text").text("VAF").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill",m).attr("font-family",a).attr("transform","rotate(-90)");const X=A.append("g");const Y=A.append("g");const E=A.append("g");const _=E.append("rect").attr("stroke",m).attr("stroke-dasharray","2,2").attr("fill","none").attr("shape-rendering","crispEdges");const q=E.append("line").attr("stroke",m).attr("stroke-dasharray","2,2").attr("shape-rendering","crispEdges");const C=A.append("g");const D=C.selectAll().data(g).enter().append("rect");const G=A.append("g");const B=A.append("g");const H=B.selectAll().data(y).enter().append("rect");const I=A.append("g");let J=null,K,L,N,O,P;if(p.genotype){const t=r(e);const o=new Set;for(const a of p.data){if(a.genotype){o.add(a.genotype);a.color=t(a.genotype)}}const n=[...o];J=A.append("g");K=J.append("text").text("Genotype").attr("dominant-baseline","central").attr("font-family",a);L=J.selectAll().data(n).enter().append("g");N=L.append("line").attr("stroke",(a=>t(a)));O=L.append("line").attr("stroke",(a=>t(a)));P=L.append("text").text((t=>t)).attr("fill",(a=>t(a))).attr("dominant-baseline","central").attr("font-family",a)}const Q=E.selectAll().data(p.data).enter().append("g");const R=Q.append("line").attr("stroke-opacity",.6).attr("stroke",(t=>t.color?t.color:t.sampleobj.color||p.samplecolor)).each((function(t){t.crosshair1=o(this)}));const T=Q.append("line").attr("stroke-opacity",.6).attr("stroke",(t=>t.color?t.color:t.sampleobj.color||p.samplecolor)).each((function(t){t.crosshair2=o(this)}));const U=Q.append("circle").attr("fill","white").attr("fill-opacity",0).on("mouseover",((t,a)=>{a.crosshair1.attr("stroke-width",3).attr("x1",-h-2).attr("y1",-h-2).attr("x2",h+2).attr("y2",h+2);a.crosshair2.attr("stroke-width",3).attr("x1",h+2).attr("y1",-h-2).attr("x2",-h-2).attr("y2",h+2);p.tip.clear();p.tip.show(t.clientX,t.clientY);const r=[{k:"mut",v:a.mut},{k:"total",v:a.total}];if(a.genotype){r.push({k:"genotype",v:a.genotype})}for(const t in a.sampleobj){if(t=="color")continue;r.push({k:t,v:a.sampleobj[t]})}n(p.tip.d,r).style("margin","none");if(p.mouseover){p.mouseover(a)}})).on("mouseout",((t,a)=>{a.crosshair1.attr("stroke-width",1).attr("x1",-h).attr("y1",-h).attr("x2",h).attr("y2",h);a.crosshair2.attr("stroke-width",1).attr("x1",h).attr("y1",-h).attr("x2",-h).attr("y2",h);p.tip.hide();if(p.mouseout){p.mouseout(a)}}));if(p.click){U.on("click",((t,a)=>{p.click(a)}))}const W=A.append("text").text("drag to resize").attr("class","sja_clbtext").attr("font-size",13).attr("text-anchor","end").attr("fill",m).on("mousedown",(t=>{t.preventDefault();const a=o(document.body);const r=t.clientX,e=t.clientY,n=d,s=f;a.on("mousemove",(t=>{d=n+t.clientX-r;f=s+t.clientY-e;Z()}));a.on("mouseup",(()=>{a.on("mousemove",null).on("mouseup",null)}))}));function Z(){const t=Math.max(12,Math.min(d,f)/25);const a=f/20;h=Math.ceil(t/3);const r=h,e=r+t*3,o=r+20,n=t*1.3,p=t*1.6,u=f/5,y=d/5;v.range([0,d]);z.range([f,0]);j.range([u,0]);M.range([0,y]);A.attr("width",t+e+p+d+n+y+a+r).attr("height",t/2+u+n+f+p+o+r+t);F.attr("font-size",t).attr("x",t+e+p+d/2).attr("y",t/2+u+n+f+p+o+r+t-5);S.attr("transform","translate("+t+","+(t/2+u+n+f/2)+")");V.attr("font-size",t);X.attr("transform","translate("+(t+e+p)+","+(t/2+u+n+f+p)+")").call(c().scale(v).ticks(4).tickSize(r));s({axis:X,color:m,fontsize:t,showline:true});Y.attr("transform","translate("+(t+e)+","+(t/2+u+n)+")").call(i().scale(z).ticks(5).tickSize(r));s({axis:Y,color:m,fontsize:t,showline:true});E.attr("transform","translate("+(t+e+p)+","+(t/2+u+n)+")");_.attr("width",d).attr("height",f);q.attr("y1",f/2).attr("x2",d).attr("y2",f/2);Q.attr("transform",(t=>"translate("+v(t.total>x?x:t.total)+","+z(t.maf)+")"));R.attr("x1",-h).attr("y1",-h).attr("x2",h).attr("y2",h);T.attr("x1",h).attr("y1",-h).attr("x2",-h).attr("y2",h);U.attr("r",h);C.attr("transform","translate("+(t+e+p+d+n)+","+(t/2+u+n+f)+")");const g=f/k;D.attr("y",((t,a)=>-g*(a+1))).attr("width",(t=>M(t))).attr("height",g).attr("fill",m);G.attr("transform","translate("+(t+e+p+d+n)+","+(t/2+u+n+f+p)+")").call(c().scale(M).tickValues([0,b]).tickFormat(l("d")));s({axis:G,color:m,showline:true});B.attr("transform","translate("+(t+e+p)+","+(t/2+u)+")");const Z=d/k;H.attr("x",((t,a)=>Z*a)).attr("y",(t=>j(t)-u)).attr("height",(t=>u-j(t))).attr("width",Z).attr("fill",m);I.attr("transform","translate("+(t+e)+","+t/2+")").call(i().scale(j).tickValues([0,w]).tickFormat(l("d")));s({axis:I,color:m,showline:true});W.attr("x",t+e+p+d+n+y+a+r-5).attr("y",t/2+u+n+f+p+o+r+t-5);if(J){J.attr("transform","translate("+(t+e+p+d+n)+","+t/2+")");K.attr("font-size",t);L.attr("transform",((a,r)=>"translate(0,"+(t/2+3+(t+1)*r+t/2)+")"));N.attr("y1",-t/2).attr("x2",t).attr("y2",t/2);O.attr("x1",t).attr("y1",-t/2).attr("y2",t/2);P.attr("x",t+5).attr("font-size",t)}}Z();return Q}export{p as default};