Skip to content
Snippets Groups Projects
Commit b8d4e89c authored by Nicole Finks's avatar Nicole Finks
Browse files

"Gene __ +does+ not exist in the data"

parent e56da709
Branches
Tags
2 merge requests!9Develop,!8Repository
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div class="header"> <div class="header">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<h2>{{ .Description }}</h2> <h2>{{ .Description }}</h2>
</div> </div>
<div class="content"> <div class="content">
{{ .Content }} {{ .Content }}
</div> </div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
<head> <head>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> <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/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> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<style> <style>
.ui-autocomplete { .ui-autocomplete {
max-height: 200px; max-height: 200px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
} }
</style> </style>
<script> <script>
$(function(){ $(function(){
$("#lineage" ).selectmenu({width: 230}); $("#lineage" ).selectmenu({width: 230});
}); });
$(function(){ $(function(){
$("#populations" ).selectmenu({width: 230}); $("#populations" ).selectmenu({width: 230});
}); });
$(function(){ $(function(){
var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }}; var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }};
var selectedGene = $("#gene").autocomplete({ var selectedGene = $("#gene").autocomplete({
source: genes.genes, source: genes.genes,
maxResults: 10, maxResults: 10,
maxShowItems: 10, maxShowItems: 10,
minLength: 1, minLength: 1,
}); });
}); });
$("#analysis").click(function (event) { $("#analysis").click(function (event) {
event.preventDefault(); event.preventDefault();
var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }}; var genes = {{ index .Site.Data.scRNAseq_huPr_D.genes }};
_gene = $('#gene').val().toUpperCase(); _gene = $('#gene').val().toUpperCase();
if($.inArray(_gene,genes.genes) < 0){ if($.inArray(_gene,genes.genes) < 0){
alert("Gene "+ _gene +" not exist in the data.") alert("Gene "+ _gene +" does not exist in the data.")
return return
} }
<!-- alert(_gene) --> <!-- alert(_gene) -->
document.getElementById("label.gene").innerHTML = _gene document.getElementById("label.gene").innerHTML = _gene
document.getElementById("label.lineage").innerHTML = $("#lineage").val().toUpperCase() + " Cells" document.getElementById("label.lineage").innerHTML = $("#lineage").val().toUpperCase() + " Cells"
document.getElementById("label.ClusterVis").innerHTML = "Cluster Visualization" document.getElementById("label.ClusterVis").innerHTML = "Cluster Visualization"
var img = document.getElementById("img.ClusterVis"); var img = document.getElementById("img.ClusterVis");
img.src="/images/scRNAseq_huPr_D/png/ID/" + $("#lineage").val() + "/" + $("#populations").val() + "/ClusterVis.png" img.src="/images/scRNAseq_huPr_D/png/ID/" + $("#lineage").val() + "/" + $("#populations").val() + "/ClusterVis.png"
document.getElementById("label.Feature").innerHTML = "Feature Plot" document.getElementById("label.Feature").innerHTML = "Feature Plot"
var img = document.getElementById("img.Feature"); var img = document.getElementById("img.Feature");
img.src="/images/scRNAseq_huPr_D/png/Feature/" + $("#lineage").val() + "/genes/" + _gene + ".png" img.src="/images/scRNAseq_huPr_D/png/Feature/" + $("#lineage").val() + "/genes/" + _gene + ".png"
document.getElementById("label.ViolinBox").innerHTML = "Violin Box Plot" document.getElementById("label.ViolinBox").innerHTML = "Violin Box Plot"
var img = document.getElementById("img.ViolinBox"); var img = document.getElementById("img.ViolinBox");
img.src="/images/scRNAseq_huPr_D/png/ViolinBox/" + $("#lineage").val() + "/" + $("#populations").val() + "/" + _gene + ".png" img.src="/images/scRNAseq_huPr_D/png/ViolinBox/" + $("#lineage").val() + "/" + $("#populations").val() + "/" + _gene + ".png"
return(_gene) return(_gene)
}); });
</script> </script>
</head> </head>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment