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

View of /FigKernelScripts/make_PFAM_HMM_derived_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Wed Aug 15 21:11:02 2007 UTC (12 years, 11 months ago) by mkubal
Branch: MAIN
version 1.0

$genome = shift(@ARGV);
open(IN,"/vol/seed-attributes/computation_results/Pfam_TimeLogic_HMM_Search/$genome");
open(PFAM,">/vol/seed-attributes/PFAM/PFAM_hmm_derived_attributes_for_$genome.txt");

my $id;
my $pf;
my $start;
my $end;
my $evalue;
my $score;

while ($_ = <IN>){
    if($_ =~/(fig\|\d+.\d.peg.\d+)/){
	$id = $1;
    }
    
    if($_ =~/^\sA\s=\s(PF\d+)/){
	$pf = $1;
    }
       
    if($_ =~/E_Value =\s+(.*)/){
	$evalue = $1;
	chomp($evalue);
    }
        
    if($_ =~ /QS =\s+(\d+)\s+QE =\s+(\d+)/){
	$start = $1;
	$end = $2;
    	if($evalue =~/(\d+)e-(\d+)/){
	    $part1 = $1;
	    $part2 = $2;
	    if($part2 > 19){
		$part2 = (1000 - $part2);
		$part1 = $part1 * 100;
		$score = $part2.".".$part1;
		print PFAM "$id\tPFAM::$pf\t$score;$start-$end\n";
	    }
	}
	if($evalue eq "0"){
	    print PFAM "$id\tPFAM::$pf\t0.0;$start-$end\n";
	}
    }
}
close(IN);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3