1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<?php
case "architecture"://prodom query type which create the file needed for the architecture visualisation
if (count($requete) == 1) //when there's just one query in the array
{
foreach ($requete as $req){
if(!file_exists("../tmp/".$req))// created a folder for each query
mkdir ("../tmp/".$req, 0777);
//if(file_exists("../tmp/'.$req.'/consensus.xdom"))// created a folder for each query
//chmod ("../tmp/'.$req.'/consensus.xdom", 0777);
if (substr($req, -9,4) == "HBG0") // return "HBG"
{
exec('../bin/fetchdom/fetchdom-3.20/fetchdom -b ../data/fetchdom_files/prodom_v2005 -s '.$req.' -t xdom > ../tmp/'.$req.'/consensus.xdom');
//exec ('echo toto >../tmp/'.$req.'/consensus.xdom');
//chmod ("../tmp/$req/consensus.xdom", 0777);
}
else
{
if (substr($req, -8,2) =="CL") // return "CL"
{
exec('../bin/fetchdom/fetchdom-3.20/fetchdom -b ../data/fetchdom_files/prodom_v2005 -d '.$req.' -t spid | ../bin/fetchdom/fetchdom-3.20/fetchdom -b ../data/fetchdom_files/prodom_v2005 -S -- -t xdom > ../tmp/'.$req.'/consensus.xdom');
//chmod ("../tmp/$req/consensus.xdom", 0777);
}
}
}
header("location:../bin/webdom/index.php?jobID=".$req); //using webdom soft.
}
else
{
$req = $requete[0]; //using the first element of the array to create the right folder, easier to have the right path for webdom
if(!file_exists("../tmp/".$req))// created a folder for the all query
mkdir ("../tmp/".$req, 0777);
if (substr($req, -9,4) == "HBG0") // return "HBG"
{
exec('../bin/fetchdom/fetchdom-3.20/fetchdom -b ../data/fetchdom_files/prodom_v2005 -s '.$requete_arch.' -t xdom > ../tmp/'.$req.'/consensus.xdom'); // add all the protein query in the same file by using the chain of character of $requete.arch
}
else
{
if (substr($req, -8,2) =="CL") // return "CL"
{
exec('../bin/fetchdom/fetchdom-3.20/fetchdom -b ../data/fetchdom_files/prodom_v2005 -d '.$requete_arch.' -t spid | ../bin/fetchdom/fetchdom-3.20/fetchdom -b ../data/fetchdom_files/prodom_v2005 -S -- -t xdom > ../tmp/'.$req.'/consensus.xdom'); // add all the protein query in the same file by using the chain of character of $requete.arch
}
}
header("location:../bin/webdom/index.php?jobID=".$req);
}
break;
?> |
Partager