From: miles Date: Mon, 19 Nov 2012 23:33:11 +0000 (+0000) Subject: Fixed species inclusion to show even irrelevant species if asked. X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=fd57492fdfeb83134b7271fa75425c8028c380f4;p=old-jaiswallab-svn%2F.git Fixed species inclusion to show even irrelevant species if asked. Improved summary of data. svn path=/; revision=415 --- diff --git a/Personnel/miles/Web Page/Heatmap.jar b/Personnel/miles/Web Page/Heatmap.jar index 7b1c942..855ba42 100644 Binary files a/Personnel/miles/Web Page/Heatmap.jar and b/Personnel/miles/Web Page/Heatmap.jar differ diff --git a/Personnel/miles/Web Page/heatMap.php b/Personnel/miles/Web Page/heatMap.php index 60fd39e..8d1c2a2 100644 --- a/Personnel/miles/Web Page/heatMap.php +++ b/Personnel/miles/Web Page/heatMap.php @@ -5,13 +5,11 @@
"; //echo $finalInput; - +//echo "

"; exec("java -Djava.awt.headless=true -jar Heatmap.jar " . "\"" . $finalInput . "\"", $output); //main heatmap data parsing @@ -38,16 +37,30 @@ for ($i = 0; $i < sizeof($output); $i ++) { $tmp[$i] = explode(",", $output[$i]); } - -$allSpecies; +$speciesWithData; for ($s = 0; $s < sizeof($tmp) - 2; $s ++) // the last array in tmp is the list of cluster IDs { - $allSpecies[$s] = $tmp[$s][0]; + $speciesWithData[$s] = $tmp[$s][0]; } -if(!isset($originalSpecies)) { -$originalSpecies = $allSpecies; -} +$allSpecies = $speciesWithData; +$j = 0; +for($i = 0; $i < sizeof($includedSpecies); $i++) + { + $included = false; + for($s = 0; $s < sizeof($speciesWithData); $s++) + { + if($includedSpecies[$i] == $speciesWithData[$s]) + { + $included = true; + } + } + if($included == false) + { + $allSpecies[sizeof($allSpecies) + $j] = $includedSpecies[$i]; + $j++; + } + } $allClusterIDs; for ($c = 0; $c < sizeof($tmp[sizeof($tmp) - 2]); $c ++) @@ -55,12 +68,20 @@ for ($c = 0; $c < sizeof($tmp[sizeof($tmp) - 2]); $c ++) $allClusterIDs[$c] = $tmp[sizeof($tmp) - 2][$c]; } - $heatMapData; -for ($s = 0; $s < (sizeof($tmp) - 2); $s ++) +for ($s = 0; $s < sizeof($allSpecies); $s ++) { for ($c = 0; $c < sizeof($allClusterIDs); $c ++) - $heatMapData[$s][$c] = $tmp[$s][$c+1]; + { + if($s < sizeof($speciesWithData)) + { + $heatMapData[$s][$c] = $tmp[$s][$c+1]; + } + else + { + $heatMapData[$s][$c] = 0; + } + } } $geneIDs = explode(" ", $input); @@ -106,50 +127,25 @@ $height = 25 * $clusterCount + 200; ?> -




+

-The following species have been included in the heat map: +The following species have been included in the heat map: +

Click on a species name, cluster number, or cell for more information. -
Scroll down to see more clusters, right to see more species (if any exist). -
- There are " . $speciesCount . " species in the heatmap."; ?> +

Scroll down to see more clusters, right to see more species (if any exist). +

+
- - - - -
@@ -445,7 +441,7 @@ function jumpToCluster() { function generateImage() { document.infoForm.action="download.php"; - document.infoForm.param.value = "unset DISPLAY && java -Djava.awt.headless=true -jar Heatmap.jar \"image" + "" + ";" + "\""; + document.infoForm.param.value = "unset DISPLAY && java -Djava.awt.headless=true -jar Heatmap.jar \"image" + "" + ";" + "\""; document.infoForm.submit(); } @@ -459,6 +455,7 @@ canvas.addEventListener('mouseup', showInfo, false); \ No newline at end of file diff --git a/Personnel/miles/Web Page/upload.php b/Personnel/miles/Web Page/upload.php index af35d80..c63be21 100644 --- a/Personnel/miles/Web Page/upload.php +++ b/Personnel/miles/Web Page/upload.php @@ -37,7 +37,7 @@ else if($goToNode10){ ?> - +