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

Annotation of /FigKernelScripts/make_IPR_PFAM_GO_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : mkubal 1.1 $genome = shift(@ARGV);
2 :     open(IN,"/vol/seed-attributes/computation_results/iprscan_results_for_$genome");
3 :     open(IPR,">/vol/seed-attributes/IPR/IPR_attributes_for_$genome.txt");
4 :     open(PFAM,">/vol/seed-attributes/PFAM/PFAM_attributes_for_$genome.txt");
5 :     open(GO,">/vol/seed-attributes/GO/GO_attributes_for_$genome.txt");
6 :    
7 :     my $id;
8 :     my $goid;
9 :     my $description;
10 :     my $pf;
11 :     my $ipr;
12 :     my $record_ipr;
13 :    
14 :     while ($_ = <IN>){
15 :     if($_ =~/(\d+.\d.peg.\d+)/){
16 :     $id = $1;
17 :     $id = "fig|".$id;
18 :     $record_ipr = 1;
19 :     }
20 :    
21 :     if($record_ipr){
22 :     if($_ =~/interpro id=\"(IPR\d+)\"/){
23 :     $ipr = $1;
24 :     $record_ipr = 0;
25 :     }
26 :     }
27 :    
28 :     if($_ =~/GO:(\d+)/){
29 :     $goid = $1;
30 :     }
31 :    
32 :     if($_ =~/<description>(.*)<\/description/){
33 :     $description = $1;
34 :     print GO "$id\tGO\t$goid\n";
35 :     }
36 :    
37 :     if($_ =~/(PF\d+)/){
38 :     $pf = $1;
39 :     }
40 :    
41 :     if($_ =~/location start=\"(\d+)\"\send=\"(\d+)\"\sscore=\"(.*)\"\sstatus/){
42 :     $start = $1;
43 :     $end = $2;
44 :     $score = $3;
45 :     if($score =~/(\d+)e-(\d+)/){
46 :     $part1 = $1;
47 :     $part2 = $2;
48 :     if($part2 > 19){
49 :     $part2 = (1000 - $part2);
50 : mkubal 1.3 $part1 = $part1 * 100;
51 : mkubal 1.1 $score = $part2.".".$part1;
52 : mkubal 1.2 print PFAM "$id\tPFAM::$pf\t$score;$start-$end\n";
53 :     print IPR "$id\tIPR::$ipr\t$score;$start-$end\n";
54 : mkubal 1.1 }
55 :     }
56 :     if($score eq "0"){
57 : mkubal 1.2 print PFAM "$id\tPFAM::$pf\t0.0;$start-$end\n";
58 :     print IPR "$id\tIPR::$ipr\t0.0;$start-$end\n";
59 : mkubal 1.1 }
60 :     }
61 :     }
62 :     close(IN);
63 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3