"> * Only letter, numbers and underlines are valid for job IDs.
Check for databases details
Input format:
* For different databases, the availabilities of pathway activities may be variable.
   It is possible that you input some pathways but there are no corresponding activities for spesific database.
* The input lines must be exactly the same with KEGG pathway names or compound IDs.
   You can check for it with KEGG webpage or find proper examples below.


alert('JobID already exists!') "; return false; } } function regclick($jobid) { $pattern = "/^[a-zA-Z0-9_]{1,}$/"; if (preg_match($pattern, $jobid)) { return true; } else { return false; } } function regclick2($input) { $pattern = "/[\<\>\*\&\=\%\^\$\#\@\!\~\`\.\?\']{1,}/"; if (preg_match($pattern, $input)) { return false; } else { return true; } } function submitting($inputformat, $database, $snps, $snptype) { if ($_POST["jobid"] == ''){ $jobid = date("YmdHis"); } else { $jobid = $_POST["jobid"]; } if (!isset($_POST['notbot'])) { echo ""; } elseif ($snps == 'cpd' && $inputformat != 'cpd') { echo ""; } elseif ($_POST["input"] == '' && !isset($_POST["exampledata"]) ){ echo ""; } elseif (regclick($jobid) == false) { echo ""; } elseif (regclick2($_POST["input"]) == false) { echo ""; } elseif (isset($_POST["exampledata"])) { if (makedir($jobid, $inputformat, $snps) == true) { if ($_POST["inputformat"] == 'pathway') { copy ('example/path.txt',"jobs/$jobid/input/input.txt"); } elseif ($_POST["inputformat"] == 'cpd') { copy ('example/cpd.txt',"jobs/$jobid/input/input.txt"); } $LOG = fopen("jobs/$jobid/input/log.txt", "w"); fwrite($LOG, "$jobid\n$inputformat\n$database\n$snps\n$snptype\n"); fclose($LOG); posting($jobid, $inputformat, $database, $snps, $snptype); } } else { if (makedir($jobid, $inputformat, $snps) == true) { $IN = fopen("jobs/$jobid/input/input.txt", "w"); fwrite($IN, $_POST["input"]); fclose($IN); $LOG = fopen("jobs/$jobid/input/log.txt", "w"); fwrite($LOG, "$jobid\n$inputformat\n$database\n$snps\n$snptype\n"); fclose($LOG); posting($jobid, $inputformat, $database, $snps, $snptype); } } } function posting($jobid, $inputformat, $database, $snps, $snptype) { echo $snptype; # $sys = "/usr/sbin/R-3.1.2/bin/Rscript bin/input.R $jobid $inputformat $database $snps $snptype 1>>jobs/$jobid/log/out1.log 2>> jobs/$jobid/log/error1.log"; $sys = "/usr/sbin/R-3.1.2/bin/Rscript bin/input.R $jobid $inputformat $database $snps $snptype"; exec($sys); header("Location: weights.php?jobid=$jobid"); } if(isset($_POST["submit"])) { $inputformat = $_POST["inputformat"]; $database = $_POST["database"]; $snps = $_POST["snps"]; $snptype = ''; if ($snps == 'none') { $snptype = 'NULL'; } else { if (isset($_POST['snpup'])) { $snptype .= 'UPSTREAM\|'; } if (isset($_POST["snpsyn"])) { $snptype .= '^SYNONYMOUS\|PLUS\|'; } if (isset($_POST["snpmis"])) { $snptype .= '^NON\|PLUS\|'; } if (isset($_POST['snpnon'])) { $snptype .= 'LOST\|GAINED\|'; } if (isset($_POST["snpshift"])) { $snptype .= 'FRAME\|'; } if (isset($_POST["snpindel"])) { $snptype .= 'INSERTION\|DELETION\|'; } if (isset($_POST["snpintron"])) { $snptype .= 'INTRON\|'; } if (isset($_POST["snpsplice"])) { $snptype .= 'SPLICE\|'; } $snptype .= 'Effect'; } submitting($inputformat, $database, $snps, $snptype); } ?>