From: miles Date: Tue, 20 Nov 2012 23:53:06 +0000 (+0000) Subject: now all species requested will appear, regardless of relevance, in their X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=855c5260925e599556c56ba425de61d7ac54b854;p=old-jaiswallab-svn%2F.git now all species requested will appear, regardless of relevance, in their original alphanumberical order. much bug fixing. download as jpg working again. svn path=/; revision=416 --- diff --git a/Personnel/miles/Web Page/Heatmap.jar b/Personnel/miles/Web Page/Heatmap.jar index 855ba42..5efbe9d 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 8d1c2a2..1c96b29 100644 --- a/Personnel/miles/Web Page/heatMap.php +++ b/Personnel/miles/Web Page/heatMap.php @@ -5,7 +5,6 @@
"; -//echo $finalInput; -//echo "

"; +$finalInput = "webpage " . implode(" ",$includedSpecies) . ";" . $input; + exec("java -Djava.awt.headless=true -jar Heatmap.jar " . "\"" . $finalInput . "\"", $output); //main heatmap data parsing @@ -37,30 +34,16 @@ for ($i = 0; $i < sizeof($output); $i ++) { $tmp[$i] = explode(",", $output[$i]); } -$speciesWithData; + +$allSpecies; for ($s = 0; $s < sizeof($tmp) - 2; $s ++) // the last array in tmp is the list of cluster IDs { - $speciesWithData[$s] = $tmp[$s][0]; + $allSpecies[$s] = $tmp[$s][0]; } +if(!isset($includedSpecies)) { +$allSpecies; //TODO remove all mention of included species after java has been run +} -$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 ++) @@ -68,19 +51,13 @@ for ($c = 0; $c < sizeof($tmp[sizeof($tmp) - 2]); $c ++) $allClusterIDs[$c] = $tmp[sizeof($tmp) - 2][$c]; } + $heatMapData; -for ($s = 0; $s < sizeof($allSpecies); $s ++) +for ($s = 0; $s < (sizeof($tmp) - 2); $s ++) { - for ($c = 0; $c < sizeof($allClusterIDs); $c ++) + for ($c = 0; $c < sizeof($allClusterIDs); $c ++) { - if($s < sizeof($speciesWithData)) - { - $heatMapData[$s][$c] = $tmp[$s][$c+1]; - } - else - { - $heatMapData[$s][$c] = 0; - } + $heatMapData[$s][$c] = $tmp[$s][$c+1]; } } @@ -89,12 +66,11 @@ $maxCount = $output[sizeof($output)-1]; $clusterCount = sizeof($allClusterIDs); $speciesCount = sizeof($allSpecies); -$temp; +$finalHeatMapData; for ($i = 0; $i < sizeof($heatMapData); $i ++) { - $temp[$i] = implode(",", $heatMapData[$i]); + $finalHeatMapData[$i] = implode(",", $heatMapData[$i]); } -$finalHeatMapData = $temp; // extra goodies from the mysql database $username="inparanoid-read-user"; @@ -123,7 +99,6 @@ function array_search2d($needle, $haystack) { $width = 25*$speciesCount + 100; $height = 25 * $clusterCount + 200; - ?> @@ -178,7 +153,7 @@ for(var i=0; i"; +var rawSpecies = ""; var allSpecies = rawSpecies.split(","); var speciesCount = allSpecies.length; @@ -441,7 +416,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(); }