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

Annotation of /FortyEight/rp_make_PFAM_HMM_derived_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : mkubal 1.1 my $jobdir = shift(@ARGV);
2 :     my $genome = shift(@ARGV);
3 :    
4 :     my $input_file = $jobdir."/$genome_PFAM_HMM_search_results.txt";
5 : mkubal 1.2 my $output_file = $jobdir."/rp/$genome/PFAM_HMM_derived_attributes_for_$genome.txt";
6 : mkubal 1.1
7 :     open(IN,"$input_file");
8 :     open(PFAM,">$output_file");
9 :    
10 :     print PFAM "$genome\tPFAM_attribute_by_HMM_search_on_TimeLogic\tPfam_version_22\n";
11 :    
12 :     my $id;
13 :     my $pf;
14 :     my $start;
15 :     my $end;
16 :     my $evalue;
17 :     my $score;
18 :    
19 :     while ($_ = <IN>){
20 :     if($_ =~/(fig\|\d+.\d+.peg.\d+)/){
21 :     $id = $1;
22 :     }
23 :    
24 :     if($_ =~/^\sA\s=\s(PF\d+)/){
25 :     $pf = $1;
26 :     }
27 :    
28 :     if($_ =~/E_Value =\s+(.*)/){
29 :     $evalue = $1;
30 :     chomp($evalue);
31 :     }
32 :    
33 :     if($_ =~ /QS =\s+(\d+)\s+QE =\s+(\d+)/){
34 :     $start = $1;
35 :     $end = $2;
36 :     if($evalue =~/(\d+.\d+)e-(\d+)/){
37 :     $part1 = $1;
38 :     $part2 = $2;
39 :     if($part2 > 19){
40 :     $part2 = (1000 - $part2);
41 :     $part1 = $part1 * 100;
42 :     $score = $part2.".".$part1;
43 :     print PFAM "$id\tPFAM::$pf\t$score;$start-$end\n";
44 :     }
45 :     }
46 :     if($evalue =~/^0/){
47 :     print PFAM "$id\tPFAM::$pf\t0.0;$start-$end\n";
48 :     }
49 :     }
50 :     }
51 :     close(IN);
52 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3