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

View of /FigKernelScripts/score_dfcs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Thu Dec 1 22:00:49 2005 UTC (14 years, 6 months ago) by overbeek
Branch: MAIN
add direct functional coupling

#!/usr/bin/env /Volumes/raid/FIGdisk.v4/env/mac/bin/perl

BEGIN {
    @INC = qw(
              /Volumes/raid/FIGdisk.v4/dist/releases/dev/mac/lib
              /Volumes/raid/FIGdisk.v4/dist/releases/dev/mac/lib/FigKernelPackages
              /Volumes/raid/FIGdisk.v4/dist/dev/mac/lib
              /Volumes/raid/FIGdisk.v4/dist/dev/mac/lib/FigKernelPackages
              /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/5.8.7/darwin-2level
              /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/5.8.7
              /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/site_perl/5.8.7/darwin-2level
              /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/site_perl/5.8.7
              /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/site_perl
              .
              /Volumes/raid/FIGdisk.v4/config
 
);
}
use Data::Dumper;
use Carp;
use FIG_Config;
$ENV{'BLASTMAT'} = "/Volumes/raid/FIGdisk.v4/BLASTMAT";
$ENV{'FIG_HOME'} = "/Volumes/raid/FIGdisk.v4";
# end of tool_hdr
########################################################################

use FIG;
my $fig = new FIG;

my @fc_bins = (
	       [0.554,100],
	       [0.626,50],
	       [0.532,25],
	       [0.369,13],
	       [0.219,7],
	       [0.140,0]
	      );

while (defined($_ = <STDIN>))
{
    chop;
    ($peg1,$peg2,$fc) = split(/\t/,$_);
    $sc = &score_fc($fc,\@fc_bins);
    print join("\t",($peg1,$peg2,$sc,"","","",$fc,"")),"\n";
}
sub score_fc {
    my($fcsc,$bins) = @_;

    for ($i=0; ($i < @$bins) && ($fcsc < $bins->[$i]->[1]); $i++) {}
    return $bins->[$i]->[0];
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3