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

Annotation of /FortyEight/rp_make_PSORT_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : mkubal 1.1 my $jobdir = shift(@ARGV);
2 :     my $genome = shift(@ARGV);
3 :     my $date = localtime();
4 :    
5 :     if(! -d "$jobdir/rp/$genome/attributes"){
6 :     `mkdir $jobdir/rp/$genome/attributes`;
7 :     }
8 :    
9 :     if(-e "$jobdir/rp/$genome/attributes/phenotypes.txt"){
10 :    
11 :     my $stain;
12 :     open(IN,"$jobdir/rp/$genome/attributes/phenotypes.txt");
13 :     while($_ = <IN>){
14 :     if($_ =~/Gram_Stain\tPositive/){$stain = "positive";}
15 :     elsif($_ =~/Gram_Stain\tNegative/){$stain = "negative";}
16 :     }
17 :     close(IN);
18 :    
19 :     my $score_threshold;
20 :     if($stain =~/(Negative|Positive)/){
21 :     if($stain eq "Negative"){$score_threshold = 2;}
22 :     else{$score_threshold = 2.5;}
23 :     $results = "/vol/seed-attributes/computation_results/Psort/$genome/$genome.output";
24 :     open(IN,$results);
25 :     my $peg;
26 :     my $record = 0;
27 :     open(OUT,">$jobdir/rp/$genome/attributes/psort.txt");
28 :     while ($_ = <IN>){
29 :     chomp($_);
30 :     if($record){
31 :     if($_ =~/(\w+)\s+(\d+.\d+)/){print OUT "$peg\tPSORT::$1\t$2\n";}
32 :     elsif($_ =~/Unknown/){print OUT "$peg\tPSORT::unknown\tunknown\n";}
33 :     $record = 0;
34 :     }
35 :     else{
36 :     if($_ =~/(fig\|\d+.\d+.peg.\d+)/){$peg = $1;}
37 :     if($_ =~/(CytoplasmicMembrane)\s+(\d+.\d+)/){if($2 > $score_threshold){print OUT "$peg\tPSORT_score::$1\t$2\n";}}
38 :     if($_ =~/(Cytoplasmic)\s+(\d+.\d+)/){if($2 > $score_threshold){print OUT "$peg\tPSORT_score::$1\t$2\n";}}
39 :     if($_ =~/(OuterMembrane)\s+(\d+.\d+)/){if($2 > $score_threshold){print OUT "$peg\tPSORT_score::$1\t$2\n";}}
40 :     if($_ =~/(Periplasmic)\s+(\d+.\d+)/){if($2 > $score_threshold){print OUT "$peg\tPSORT_score::$1\t$2\n";}}
41 :     if($_ =~/(Extracellular)\s+(\d+.\d+)/){if($2 > $score_threshold){print OUT "$peg\tPSORT_score::$1\t$2\n";}}
42 :     if($_ =~/(Cellwall)\s+(\d+.\d+)/){if($2 > $score_threshold){print OUT "$peg\tPSORT_score::$1\t$2\n";}}
43 :     }
44 :     if($_ =~/Final Prediction/){$record = 1}
45 :     }
46 :     close(OUT);
47 :     }
48 :     }
49 :    
50 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3