diff --git a/layouts/custom/data.html b/layouts/custom/data.html index e7c1cb7437293f1c2acc522442650e9c5837fc46..ba1628e2b3c9dc75d0b334d0bd5c784b78815bf7 100644 --- a/layouts/custom/data.html +++ b/layouts/custom/data.html @@ -1,63 +1,63 @@ -{{ partial "header.html" . }} - -<div class="header"> - <h1>{{ .Title }}</h1> - <h2>{{ .Description }}</h2> -</div> -<div class="content"> - {{ .Content }} -</div> - -{{ partial "footer.html" . }} - -<head> - <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> - <style> - .ui-autocomplete { - max-height: 200px; - overflow-y: auto; - overflow-x: hidden; - } - </style> - <script> - $(function(){ - $("#lineage" ).selectmenu({width: 230}); - }); - $(function(){ - $("#populations" ).selectmenu({width: 230}); - }); - $(function(){ - var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }}; - var selectedGene = $("#gene").autocomplete({ - source: genes.genes, - maxResults: 10, - maxShowItems: 10, - minLength: 1, - }); - }); - $("#analysis").click(function (event) { - event.preventDefault(); - var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }}; - _gene = $('#gene').val().toUpperCase(); - if($.inArray(_gene,genes.genes) < 0){ - alert("Gene "+ _gene +" not exist in the data.") - return - } - <!-- alert(_gene) --> - document.getElementById("label.gene").innerHTML = _gene - document.getElementById("label.lineage").innerHTML = $("#lineage").val().toUpperCase() + " Cells" - document.getElementById("label.ClusterVis").innerHTML = "Cluster Visualization" - var img = document.getElementById("img.ClusterVis"); - img.src="/images/scRNAseq_huPr_D/png/ID/" + $("#lineage").val() + "/" + $("#populations").val() + "/ClusterVis.png" - document.getElementById("label.Feature").innerHTML = "Feature Plot" - var img = document.getElementById("img.Feature"); - img.src="/images/scRNAseq_huPr_D/png/Feature/" + $("#lineage").val() + "/genes/" + _gene + ".png" - document.getElementById("label.ViolinBox").innerHTML = "Violin Box Plot" - var img = document.getElementById("img.ViolinBox"); - img.src="/images/scRNAseq_huPr_D/png/ViolinBox/" + $("#lineage").val() + "/" + $("#populations").val() + "/" + _gene + ".png" - return(_gene) - }); - </script> +{{ partial "header.html" . }} + +<div class="header"> + <h1>{{ .Title }}</h1> + <h2>{{ .Description }}</h2> +</div> +<div class="content"> + {{ .Content }} +</div> + +{{ partial "footer.html" . }} + +<head> + <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> + <style> + .ui-autocomplete { + max-height: 200px; + overflow-y: auto; + overflow-x: hidden; + } + </style> + <script> + $(function(){ + $("#lineage" ).selectmenu({width: 230}); + }); + $(function(){ + $("#populations" ).selectmenu({width: 230}); + }); + $(function(){ + var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }}; + var selectedGene = $("#gene").autocomplete({ + source: genes.genes, + maxResults: 10, + maxShowItems: 10, + minLength: 1, + }); + }); + $("#analysis").click(function (event) { + event.preventDefault(); + var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }}; + _gene = $('#gene').val().toUpperCase(); + if($.inArray(_gene,genes.genes) < 0){ + alert("Gene "+ _gene +" does not exist in the data.") + return + } + <!-- alert(_gene) --> + document.getElementById("label.gene").innerHTML = _gene + document.getElementById("label.lineage").innerHTML = $("#lineage").val().toUpperCase() + " Cells" + document.getElementById("label.ClusterVis").innerHTML = "Cluster Visualization" + var img = document.getElementById("img.ClusterVis"); + img.src="/images/scRNAseq_huPr_D/png/ID/" + $("#lineage").val() + "/" + $("#populations").val() + "/ClusterVis.png" + document.getElementById("label.Feature").innerHTML = "Feature Plot" + var img = document.getElementById("img.Feature"); + img.src="/images/scRNAseq_huPr_D/png/Feature/" + $("#lineage").val() + "/genes/" + _gene + ".png" + document.getElementById("label.ViolinBox").innerHTML = "Violin Box Plot" + var img = document.getElementById("img.ViolinBox"); + img.src="/images/scRNAseq_huPr_D/png/ViolinBox/" + $("#lineage").val() + "/" + $("#populations").val() + "/" + _gene + ".png" + return(_gene) + }); + </script> </head> \ No newline at end of file