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>
Fri, 5 Apr 2013 00:47:04 +0000 (00:47 +0000)
committermiles <miles@localhost>
Fri, 5 Apr 2013 00:47:04 +0000 (00:47 +0000)
        -Error messages made bigger, clearer

Info Choice Changes:
        -User now has the option of choosing sort criteria
        -Deleted a lot of old, useless code. Much nicer now.

svn path=/; revision=459

Personnel/miles/Web Page/heatMap.php
Personnel/miles/Web Page/infoChoice.php
Personnel/miles/Web Page/viewOntology.php

index 33f1c887a72de7109c3167d7a2b569f70c2ad273..31fe1703b6ca6a7b3561a36aa3610e7e60638793 100644 (file)
@@ -109,6 +109,7 @@ Click on a species name, cluster number, or cell for more information.
 <form name="infoForm" action="infoChoice.php" method="post">
 <input type="hidden" name="param">
 <input type="hidden" name="type">
+<input type="hidden" name="orderBy" value="order by super_id,gene">
 </form>
 
 <form id="jumpTo" name="jumpTo">
index b51748ccda3c1e4f5ec9ab78e1c56a4e1037926c..a9a3abf17abe1ee9f82a0117b78415c252db91b8 100644 (file)
@@ -59,34 +59,44 @@ if($_POST["type"] == "cluster") {
 
 
 } else if($_POST["type"] == "species") {
-      $username="inparanoid-read-user";
-      $password="inparanoid-read-user_pw";
-      $database="inparanoid_data";
-      $url="floret.cgrb.oregonstate.edu:3306";
-
-      $input = explode(",",$_POST['param']);
-
-      $species = $input[0];
-      $clusterCount = sizeof($input)-1;
-
-      // creating logic statements
-      $clusters = "super_id=";
-      for($i=0; $i < $clusterCount; $i++) {
-       $clusters = $clusters . $input[$i+1];
-       if(($i+1) < (sizeof($input)-1)) {
-         $clusters = $clusters . " or super_id=";
-         }
-       }
-
-      // setting key values for mapping from gene ids to iterative ids (for user's sake)
-      $ids;
-      for($i=0; $i<$clusterCount; $i++) {
-       $ids[(string)$input[($i+1)]] = (string) ($i+1);
-  }
-
+  $username="inparanoid-read-user";
+  $password="inparanoid-read-user_pw";
+  $database="inparanoid_data";
+  $url="floret.cgrb.oregonstate.edu:3306";
+
+  $input = explode(",",$_POST['param']);
+  $orderLogic = $_POST['orderBy'];
+
+  $species = $input[0];
+  $clusterCount = sizeof($input)-1;
+
+  // creating logic statements
+  $clusters = "super_id=";
+  for($i=0; $i < $clusterCount; $i++) {
+    $clusters = $clusters . $input[$i+1];
+    if(($i+1) < (sizeof($input)-1)) {
+      $clusters = $clusters . " or super_id=";
+      }
+    }
+
+  echo "<form name=\"sortbygene\" method=\"post\" action=\"infoChoice.php\">\n";
+  echo "<input type=\"hidden\" name=\"param\" value=\"" . $_POST['param'] ."\">\n";
+  echo "<input type=\"hidden\" name=\"type\" value=\"" . $_POST['type'] ."\">\n";
+  echo "<input type=\"hidden\" name=\"orderBy\" value=\"order by gene,super_id\">\n";
+  echo "<input type=\"submit\" name=\"Sort Page by Gene\" value=\"Sort Page by Gene\">\n";
+  echo "</form>";
+  echo "<br> <br>\n";
+
+  echo "<form name=\"sortbycluster\" method=\"post\" action=\"infoChoice.php\">\n";
+  echo "<input type=\"hidden\" name=\"param\" value=\"" . $_POST['param'] ."\">\n";
+  echo "<input type=\"hidden\" name=\"type\" value=\"" . $_POST['type'] ."\">\n";
+  echo "<input type=\"hidden\" name=\"orderBy\" value=\"order by super_id,gene\">\n";
+  echo "<input type=\"submit\" name=\"Sort Page by Cluster ID\" value=\"Sort Page by Cluster ID\">\n";
+  echo "</form>";
+  echo "<br> <br>\n";
 $connection=mysql_connect($url,$username,$password);
 mysql_select_db($database);
-$query="select gene,super_id from super_clust where species=\"" . $species . "\" and (" . $clusters . ")";
+$query="select gene,super_id,species from super_clust where species=\"" . $species . "\" and (" . $clusters . ") " . $orderLogic;
 $results=mysql_query($query);
 
 $numRows = mysql_num_rows($results);
@@ -101,18 +111,18 @@ echo "GENE ID  --------------------  CLUSTER ID <br \>";
 $data;
 $i=0;
 for($row = mysql_fetch_row($results); $row != null; $row = mysql_fetch_row($results)) {
-  $data[$i] = $ids[(string)$row[1]] . "," . $row[0];
-  $i = $i+1;
+  $data[$i][0] = $row[0];
+  $data[$i][1] = $row[1];
+  $i++;
   }
-
-sort($data);
+/*
+sort($data);*/
 $i = 0;
-$species = str_replace(" ", "_", $species);
-
+$species = str_replace(" ", "_",$species);
 while($i < sizeof($data)) {
-$temp = explode(",", $data[$i]);
-$str = $temp[1] . "  -----------  " . $temp[0];
-echo "<a href=\"http://planteome.cgrb.oregonstate.edu/node/11?species=" . $species . "&gene=" . $temp[1] . "\">" . $str . "</a> <br>";
+$gene = $data[$i][0];
+$cluster = $data[$i][1];
+echo "<a href=\"http://planteome.cgrb.oregonstate.edu/node/11?species=" . $species . "&gene=" . $gene . "\">" . $gene . "  -----------  " . $cluster . "</a> <br>";
 $i++;
 }
 
index 12ef2c0e21cc8a4a20557193d2e2b6fbeec89ce7..b4ed98f1a987001c1bbbfd0885577e9c91679048 100644 (file)
@@ -151,7 +151,7 @@ $ontologies = explode(",",$_POST["ontologies"]);
   }
 
   if(empty($cellData)) {
-  echo "These genes are not yet annotated in our database.";
+  echo "<H1> These genes have no annotations in the database. </H1>";
   }
   else {
     $semiFinalCellData;
@@ -181,7 +181,7 @@ $ontologies = explode(",",$_POST["ontologies"]);
   $width = 1200;
 } else {
 
-echo "No ontologies were selected!";
+echo "<br> <br> <H1> No ontologies were selected! </H1>";
 
 }
 ?>