Load different data
";
//loop through the directory list
foreach ($dirlist as $key => $filename) {
//start a new row
echo "
";
// if the filename contains the ".dat" then display it
if (strpos($filename, ".dat")){
//store the first found csv name
if (!$found_one_dat){
$first_found_dat=$filename;
}
$found_one_dat=true;
echo "";//start the new cell
//display the file loading link building a url querystring like this:
//applicationfile.php?read=somefile.csv&w=1280
echo "".$filename." ";
echo " | ";// close the cell
//end the row
echo "
";
}//END if (strpos($filename, ".dat"))
}//end foreach ($dirlist as $key => $value)
// finish the table
echo "";
//if no data file was found then output a message about this
if(!$found_one_dat){
echo '
No .dat file in the data directory
';
echo 'Regretably there is no loadable data in the data directory. ';
echo 'A .dat file containing the names of the node and leaf data files needs to ';
echo 'be uploaded to a folder called
data in the application directory ';
echo 'by ftp before this application can be useful. (Someone with write access ';
echo 'to the application directory would need to do this.) ';
echo 'The csv files named in the dat file also need to be present in the directory. ';
echo 'The node data needs to be a 3-column csv file containing clustering data';
echo ' and the feaf data should be a 2-column csv file containing leaf ';
echo 'description data. ';
}
//check the GET data to see if the user has chosen a file
//if not then load the data for the first displayed csv file and offer that
if(isset($_GET['read']))
{
$filename=$_GET['read'];
}else{
$filename=$first_found_dat;
//$filename="default.dat";
}
//http://www.macs.hw.ac.uk/cgi-bin/ips/echo
//prototype_3_0_1.php
?>
The current data
Below are details of the currently loaded data set:
The largest merge height (dissimilarity value) is
0.
There are
0 leaf nodes.