From: miles Date: Fri, 5 Apr 2013 00:47:04 +0000 (+0000) Subject: View Ontology Changes: X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=36aa438a81a0002238f67d46aafb8b903a478cc0;p=old-jaiswallab-svn%2F.git View Ontology Changes: -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 --- diff --git a/Personnel/miles/Web Page/heatMap.php b/Personnel/miles/Web Page/heatMap.php index 33f1c88..31fe170 100644 --- a/Personnel/miles/Web Page/heatMap.php +++ b/Personnel/miles/Web Page/heatMap.php @@ -109,6 +109,7 @@ Click on a species name, cluster number, or cell for more information.
+
diff --git a/Personnel/miles/Web Page/infoChoice.php b/Personnel/miles/Web Page/infoChoice.php index b51748c..a9a3abf 100644 --- a/Personnel/miles/Web Page/infoChoice.php +++ b/Personnel/miles/Web Page/infoChoice.php @@ -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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
"; + echo "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
"; + echo "

\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
"; $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 "" . $str . "
"; +$gene = $data[$i][0]; +$cluster = $data[$i][1]; +echo "" . $gene . " ----------- " . $cluster . "
"; $i++; } diff --git a/Personnel/miles/Web Page/viewOntology.php b/Personnel/miles/Web Page/viewOntology.php index 12ef2c0..b4ed98f 100644 --- a/Personnel/miles/Web Page/viewOntology.php +++ b/Personnel/miles/Web Page/viewOntology.php @@ -151,7 +151,7 @@ $ontologies = explode(",",$_POST["ontologies"]); } if(empty($cellData)) { - echo "These genes are not yet annotated in our database."; + echo "

These genes have no annotations in the database.

"; } else { $semiFinalCellData; @@ -181,7 +181,7 @@ $ontologies = explode(",",$_POST["ontologies"]); $width = 1200; } else { -echo "No ontologies were selected!"; +echo "

No ontologies were selected!

"; } ?>