> user_data/$code/run.log');} // $kmer_length = $_POST["kmer_length"]; // $read_length = $_POST["read_length"]; $url="analysis.php?code=$code"; $run_url="run_algorithm.php"; $filename="user_uploads/$code"; $back_button= "
"; //$continue_button= "
"; $continue_button= "
"; // if (!file_exists ($filename)) { echo "
No file uploaded
"; echo "$back_button"; exit; } $consistent=true; // $myfile = fopen($filename, "r") or die("Unable to open file!"); // $line1 = fgets($myfile); $myfile = gzopen($filename, "r") or die("Unable to open file!"); $line1 = gzgets($myfile); $line1 = trim(preg_replace( '/\s+/', ' ', $line1 )); $array=array_map("trim",explode(' ',$line1)); if (count($array)==2) { // echo "GOOD first line"; } else { echo "Bad first line. \n"; $consistent=false; } $line2 = fgets($myfile); $line2 = trim(preg_replace( '/\s+/', ' ', $line2 )); if ($line2 == "NUCMER") { // echo "GOOD second line"; } else { echo "Bad second line\n"; $consistent=false; } // fclose($myfile); gzclose($myfile); if ($consistent) { // if ($previous_bins > 500) { echo "
Great! File was uploaded and looks like a real delta file
"; // } else { // echo "
File was uploaded and has acceptable dimensions: $line_counter samples by $previous_bins bins, but the analysis is unlikely to work optimally without more bins. We recommend at least 500 bins for higher accuracy.
"; // } if (!file_exists("user_data/$code")) { } else { echo "
File already submitted once. Please continue.
"; } echo "
"; echo "$back_button"; echo "
"; echo "$continue_button"; echo "
"; } else { echo "
This doesn't look like a delta file. Are you sure it is the output from nucmer? The first line should list two file names separated by a space, and the second line should be the word 'NUCMER'. The remaining lines in the file specify alignments."; echo "
"; echo "$back_button"; } ?>