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

Annotation of /FortyEight/rp_make_similar_to_human_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : mkubal 1.1 use Data::Dumper;
2 :     use Carp;
3 :     use FIG_Config;
4 :    
5 :     use FIGV;
6 :    
7 :     my $jobdir = shift(@ARGV);
8 :     my $genome = shift(@ARGV);
9 :     my $date = localtime();
10 :    
11 :     if(! -d "$jobdir/rp/$genome/attributes"){
12 :     `mkdir $jobdir/rp/$genome/attributes`;
13 :     }
14 :    
15 :     my $fig = new FIGV("$jobdir/rp/$genome");
16 :    
17 :     if($fig->is_prokaryotic($genome)){
18 :     my $of = $genome.".sim2human.txt";
19 :     open(IN,"/vol/seed-attributes/computation_results/Sim2Human/$of");
20 :     open(OUT,">$jobdir/rp/$genome/attributes/similar_to_human.txt");
21 :     my %sim;
22 :     while($_ = <IN>){
23 :     if($_ =~/(fig\|\d+.\d+.peg.\d+)/){
24 :     my $peg = $1;
25 :     $sim{$peg} = 1;
26 :     }
27 :     }
28 :     close(IN);
29 :    
30 :     my @pegs = $fig->pegs_of($genome);
31 :     foreach my $peg (@pegs){
32 :     if($sim{$peg}){
33 :     print OUT "$peg\tsimilar_to_human\tyes\n";
34 :     }
35 :     else{
36 :     print OUT "$peg\tsimilar_to_human\tno\n";
37 :     }
38 :     }
39 :     $date = `date`;
40 :     chomp($date);
41 :     print OUT "$genome\tsimilar_to_human_computed_for_all_pegs\t$date\n";
42 :     close(OUT);
43 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3