Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
View Ontology Changes:
authormiles <miles@localhost>
Tue, 26 Mar 2013 19:23:03 +0000 (19:23 +0000)
committermiles <miles@localhost>
Tue, 26 Mar 2013 19:23:03 +0000 (19:23 +0000)
        -genes are now clickable, and take the user to the Plant
Ontology annotation search for the relevant gene
        -more detailed user instructions

svn path=/; revision=446

Personnel/miles/Web Page/viewOntology.php

index e4e069eb885422a2fd501a6413cd2c3f59dc62d2..b8569cbec69323c8735e0595bd30d3b7b85845a1 100644 (file)
@@ -119,7 +119,8 @@ $width = 1200;
 <div id="Legend" style="float: right; height: 200px; width: 400px;">
 Note: The colors have no relevance to the data, they simply serve to distinguish rows visually. <br> <br>
     The numbers printed inside each cell represent the confidence rating of the ontological assignment; a higher number indicates more confidence.<br><br>
-    An "A" after the term name signifies that it relates to anatomy, a "G" signifies that it relates to growth, development, or structure
+    An "A" after the term name signifies that it relates to anatomy, a "G" signifies that it relates to growth, development, or structure <br><br>
+    Click on a gene or term for detailed annotations from Plant Ontology.
 </div>
 
 
@@ -136,13 +137,40 @@ Your browser does not support the canvas element.
 <canvas id="nothing" width="<?php echo 85 + sizeof($terms)*15 ?>" height="1"> </canvas>
 </div>
 
-<form action="http://plantontology.org/amigo/go.cgi" name="frontForm" id="frontForm">
+
+
+
+
+
+
+
+<form action="http://plantontology.org/amigo/go.cgi" name="termForm" id="termForm">
     <input type="hidden" name="action" value="query">
     <input type="hidden" name="view" value="details">
     <input type="hidden" name="session_id" value="7096b1364253011">
     <input type="hidden" name="query" value="" id="query">
 </form>
 
+
+
+
+
+<form action="http://plantontology.org/amigo/go.cgi" name="geneForm" id="geneForm">
+  <input type="hidden" name="action" value="query">
+  <input type="hidden" name="view" value="query">
+  <input type="hidden" name="query" value="" id="query">
+  <input type="hidden" name="search_constraint" value="gp" id="gp">
+  <input type="hidden" id="exact_match" name="exact_match" value="no">
+</form>
+
+
+
+
+
+
+
+
+
 <script type="text/javascript">
 
 var rawCellData = "<?php echo implode(".",$finalCellData); ?>";
@@ -177,7 +205,7 @@ var maxTermSize = 0;
 for(var i = 0; i < terms.length; i ++) {
   if(terms[i].length > maxTermSize) maxTermSize = terms[i].length;
 }
-maxTermSize = maxTermSize + 2; //This is to account for the legend row
+maxTermSize = maxTermSize + 4; //This is to account for the legend row
 
 var topOffset = maxTermSize*5;//NOTE the *7 is just my own approximation: characters on average seem to be about 5 pixels wide at the current font size
 var leftOffset = 85;
@@ -209,7 +237,7 @@ function drawTerms(startTerm) {
 
   //rotating the canvas for labeling the terms
   ontMap.rotate(-90*Math.PI/180);
-  ontMap.translate(-topOffset+cellSize + 5,0);
+  ontMap.translate(-topOffset+cellSize + 10,0);
 
   //labeling the terms
   var translated = 0;
@@ -222,7 +250,7 @@ function drawTerms(startTerm) {
     }
   //resetting the canvas to start position
   ontMap.translate(0,-translated);
-  ontMap.translate(topOffset-(cellSize+5),0);
+  ontMap.translate(topOffset-(cellSize+10),0);
   ontMap.rotate(90*Math.PI/180);
 }
 
@@ -263,7 +291,7 @@ function drawMap(init) {
 
       var color = termColors[t];
       ontMap.fillStyle=color;
-      ontMap.fillRect(xCoord,topOffset-(cellSize+5),cellSize,cellSize);
+      ontMap.fillRect(xCoord,topOffset-(cellSize+10),cellSize,cellSize);
 
       for(var g=startYCell; (g<geneCount) && ((g-startYCell)<maxRows); g++) {
 
@@ -292,11 +320,11 @@ function showInfo(event) {
   var x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft - canvas.offsetLeft;
   var y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop - canvas.offsetTop;
 
-//   if((x<leftOffset) && (y>topOffset)) {
-//     var index = Math.floor((y-topOffset)/cellSize) + Math.floor(scrolledTop/cellSize);
-//     var gene = genes[index];
-//     getGeneInfo(gene, index);
-//   }
+  if((x<leftOffset) && (y>topOffset)) {
+    var index = Math.floor((y-topOffset)/cellSize) + Math.floor(scrolledTop/cellSize);
+    var gene = genes[index];
+    getGeneInfo(gene);
+  }
   if((y<topOffset) && (x>leftOffset) && (y<leftOffset+maxCols*cellSize)) {
     var index = Math.floor((x-leftOffset)/cellSize) + Math.floor(scrolledLeft/cellSize);
     var term = terms[index].split("-")[0];
@@ -312,8 +340,13 @@ function showInfo(event) {
 }
 
 function getTermInfo(term) {
-  document.frontForm.query.value = term;
-  document.frontForm.submit();
+  document.termForm.query.value = term;
+  document.termForm.submit();
+  }
+
+function getGeneInfo(gene) {
+  document.geneForm.query.value=gene;
+  document.geneForm.submit();
   }