Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
check boxes for removing species from the heat map
authormiles <miles@localhost>
Thu, 11 Oct 2012 22:01:09 +0000 (22:01 +0000)
committermiles <miles@localhost>
Thu, 11 Oct 2012 22:01:09 +0000 (22:01 +0000)
svn path=/; revision=400

Personnel/miles/Web Page/Main Page.html
Personnel/miles/Web Page/heatMap.php

index c040e728c577031a0eb82c897486bacb3deb5107..03fd56d39b1e07c20dfa922f33fc735e9007e7b3 100644 (file)
@@ -14,9 +14,7 @@ Click "Submit" when done:
 <P>
 <TEXTAREA name="geneIDs" rows ="5" value="Gene IDs">
 </TEXTAREA>
-<input type="submit" value="Submit" />
-<TEXTAREA name="excludedSpecies" rows = "3" value="">
-</TEXTAREA>
+<input type="submit" value="Submit">
 </form>
 
 
index f539ce9ae5e26b64e5410a6e7879383f5e08a28c..c3bd4037d610db4f89c6d2d8991bdc181e94e44b 100644 (file)
@@ -5,7 +5,10 @@
 </head>
 <body>
 <?php
-echo $_POST["excludedSpecies"] .  "<br>";
+
+$excludedSpecies = "";
+if(isset($_POST['param'])) $excludedSpecies = $_POST['param'];
+
 $input = "";
 if (!isset($_POST["geneIDs"])) {
 echo "Heatmap <br\>";
@@ -18,15 +21,8 @@ if(!preg_match("/[a-zA-Z0-9\.]/", substr($input,-1))) {
   $input = substr_replace($input ,"",-1);
   }
 }
-$excludedSpecies = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", " ", $_POST["excludedSpecies"]);
-if(!preg_match("/[a-zA-Z0-9\.]/", substr($excludedSpecies,-1))) {
-  $excludedSpecies = substr_replace($excludedSpecies ,"",-1);
-  }
-echo $excludedSpecies . "<br>";
 
-$excludedSpecies = trim($_POST["excludedSpecies"]);
 $finalInput = "webpage " . $excludedSpecies . ";" . $input;
-echo $finalInput . "<br>";
 exec("java -Djava.awt.headless=true -jar Heatmap.jar " . "\"" . $finalInput . "\"", $output);
 
 //main heatmap data parsing
@@ -125,11 +121,29 @@ Click on a species name, cluster number, or cell for more information.
 <br>
 <?php echo "There are " . $clusterCount . " clusters in the heatmap. <br> There are " . $speciesCount . " species in the heatmap."; ?>
 
-<form name="infoForm" action="changes" method="post" >
-<input type="hidden" name="param"/>
+<form name="infoForm" action="changes" method="post">
+<input type="hidden" name="param">
+</form>
+
+<br> <br>
+If you do not wish to view any of the species in the final heat map, click on the checkbox next to the correct species names and then click 'submit' to reload the heat map.
+<br> <br>
+<form action="heatMap.php" name="redraw" method="post">
+<input type="hidden" name="param">
+<input type="hidden" name="genelist" value="<?php if(isset($_POST['genelist'])) echo $_POST['genelist'] ?>" >
+<input type="hidden" name="geneIDs" value="<?php echo $_POST['geneIDs'] ?>" >
+<?php
+for($i = 0; $i < sizeof($allSpecies); $i++) {
+echo "<input type=\"checkbox\" name=\"ch" . $i . "\" value=\"" . $allSpecies[$i] . "\">\n";
+echo $allSpecies[$i] . "\n";
+} 
+?>
+<p>
+<input type="button" value="Submit" onClick="resubmitSpecies()">
 </form>
 
 
+
 <form name="jumpTo" >
 <input type="submit" value="Jump to Cluster:" onClick="return jumpToCluster()"/>
 <input type="text" name="cluster" />
@@ -500,6 +514,19 @@ function generateImage() {
   document.infoForm.submit();
 }
 
+function resubmitSpecies() {
+var eliminatedSpecies = "";
+<?php
+  for($i = 0; $i < sizeof($allSpecies); $i++) {
+    echo "if(document.redraw.ch" . $i . ".checked) { \n";
+    echo "eliminatedSpecies = eliminatedSpecies + \" \" + document.redraw.ch" . $i . ".value;\n";
+    echo "} \n";
+  }
+?>
+  document.redraw.param.value = eliminatedSpecies;
+  document.redraw.submit();
+}
+
 drawMap(true);
 
 canvas.addEventListener('mouseup', showInfo, false);