[Bio] / FortyEight / rp_make_PHOBIUS_attributes.pl Repository:
ViewVC logotype

Annotation of /FortyEight/rp_make_PHOBIUS_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : mkubal 1.1 my $jobdir = shift(@ARGV);
2 :     my $genome = shift(@ARGV);
3 :     my $date = localtime();
4 :    
5 : mkubal 1.3 opendir(DIR,$jobdir."/rp/$genome");
6 : mkubal 1.2
7 :     if(! -d "$jobdir/rp/$genome/attributes"){
8 :     `mkdir $jobdir/rp/$genome/attributes`;
9 :     }
10 :    
11 :     open(PHOB,">$jobdir/rp/$genome/attributes/PHOBIUS_attributes_for_$genome.txt");
12 : mkubal 1.1
13 :     my @files = readdir(DIR);
14 :    
15 :     print PHOB "$genome\tPhobius_run_on_remote_server\t$date\n";
16 :     foreach my $file (@files){
17 :     if ($file =~/($genome.peg.\d+).PHOBIUS_result/){
18 :     my $peg = "fig|".$1;
19 : mkubal 1.3 open(IN,$jobdir."/rp/$genome/$file");
20 : mkubal 1.1 my @tm_locations = ();
21 :     while ($_ = <IN>){
22 :     if($_ =~/SIGNAL\s+(\d+)\s+(\d+)/){
23 :     print PHOB "$peg\tPhobius::signal\t$1-$2\n";
24 :     }
25 :     if($_ =~/TRANSMEM\s+(\d+)\s+(\d+)/){
26 :     my $loc = "$1-$2";
27 :     push(@tm_locations,$loc);
28 :     }
29 :     }
30 :     close(IN);
31 :     if(scalar(@tm_locations) > 0){
32 :     my $loc_string = join(",",@tm_locations);
33 :     print PHOB "$peg\tPhobius::transmembrane\t$loc_string\n";
34 :     }
35 :     }
36 :     }
37 :    
38 :     close(PHOB);
39 :    
40 : mkubal 1.3 `rm $jobdir/rp/$genome/*.PHOBIUS_result`;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3