[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.2 - (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 : mkubal 1.2 my $of = $genome.".sim2human.txt";
18 :     open(IN,"/vol/seed-attributes/computation_results/Sim2Human/$of");
19 :     open(OUT,">$jobdir/rp/$genome/attributes/similar_to_human.txt");
20 :     my %sim;
21 :     while($_ = <IN>){
22 :     if($_ =~/(fig\|\d+.\d+.peg.\d+)/){
23 : mkubal 1.1 my $peg = $1;
24 :     $sim{$peg} = 1;
25 :     }
26 : mkubal 1.2 }
27 :     close(IN);
28 :    
29 :     my @pegs = $fig->pegs_of($genome);
30 :     foreach my $peg (@pegs){
31 :     if($sim{$peg}){
32 :     print OUT "$peg\tsimilar_to_human\tyes\n";
33 : mkubal 1.1 }
34 : mkubal 1.2 else{
35 : mkubal 1.1 print OUT "$peg\tsimilar_to_human\tno\n";
36 :     }
37 :     }
38 : mkubal 1.2 $date = `date`;
39 :     chomp($date);
40 :     print OUT "$genome\tsimilar_to_human_computed_for_all_pegs\t$date\n";
41 :     close(OUT);
42 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3