[Bio] / FigKernelScripts / run_remote_Phobius_for_genome.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/run_remote_Phobius_for_genome.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : mkubal 1.1 use LWP;
2 :     use URI;
3 :     use FIG;
4 :    
5 :     #enter SEED genome id as first argument
6 :     $genome = shift(@ARGV);
7 :    
8 :     $fig = new FIG;
9 :    
10 :     $dir = "/vol/seed-attributes/computation_results/Phobius/$genome";
11 :    
12 :     if(-d $dir){
13 :     $already_there = 1;
14 :     print "$genome has already been run\n"; exit;
15 :     }
16 :     else{
17 :     `mkdir /vol/seed-attributes/computation_results/Phobius/$genome`;
18 :     }
19 :    
20 :     @pegs = $fig->pegs_of($genome);
21 :     foreach $peg (@pegs){
22 :     print "$peg\n";
23 :     $seq = $fig->get_translation($peg);
24 :     if($peg =~/(\d+.\d+.peg.\d+)/){$peg = $1;}
25 :     $file = "/vol/seed-attributes/computation_results/Phobius/$genome/$peg".".Phobius_result";
26 :     open(OUT,">$file");
27 :    
28 :     my $browser = LWP::UserAgent->new;
29 :     $url = "http://phobius.cgb.ki.se/cgi-bin/predict.pl ";
30 :     my $response = $browser->post($url,
31 :     [
32 :     'protseq' => "$seq",
33 :     'format' => "nog",
34 :     'Submit' => "Submit"
35 :     ]
36 :     );
37 :    
38 :     print OUT $response->content;
39 :     close(OUT);
40 :     #print $response->content;
41 :     sleep(1);
42 :     }
43 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3