</head>
<body>
<?php
-echo $_POST["excludedSpecies"] . "<br>";
+
+$excludedSpecies = "";
+if(isset($_POST['param'])) $excludedSpecies = $_POST['param'];
+
$input = "";
if (!isset($_POST["geneIDs"])) {
echo "Heatmap <br\>";
$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
<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" />
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);