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

Annotation of /FigKernelScripts/score_dfcs.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1 #!/usr/bin/env /Volumes/raid/FIGdisk.v4/env/mac/bin/perl
2 : olson 1.2 #
3 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
4 :     # for Interpretations of Genomes. All Rights Reserved.
5 :     #
6 :     # This file is part of the SEED Toolkit.
7 :     #
8 :     # The SEED Toolkit is free software. You can redistribute
9 :     # it and/or modify it under the terms of the SEED Toolkit
10 :     # Public License.
11 :     #
12 :     # You should have received a copy of the SEED Toolkit Public License
13 :     # along with this program; if not write to the University of Chicago
14 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
15 :     # Genomes at veronika@thefig.info or download a copy from
16 :     # http://www.theseed.org/LICENSE.TXT.
17 :     #
18 :    
19 : overbeek 1.1
20 :     BEGIN {
21 :     @INC = qw(
22 :     /Volumes/raid/FIGdisk.v4/dist/releases/dev/mac/lib
23 :     /Volumes/raid/FIGdisk.v4/dist/releases/dev/mac/lib/FigKernelPackages
24 :     /Volumes/raid/FIGdisk.v4/dist/dev/mac/lib
25 :     /Volumes/raid/FIGdisk.v4/dist/dev/mac/lib/FigKernelPackages
26 :     /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/5.8.7/darwin-2level
27 :     /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/5.8.7
28 :     /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/site_perl/5.8.7/darwin-2level
29 :     /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/site_perl/5.8.7
30 :     /Volumes/raid/FIGdisk.v4/env/mac/lib/perl5/site_perl
31 :     .
32 :     /Volumes/raid/FIGdisk.v4/config
33 :    
34 :     );
35 :     }
36 :     use Data::Dumper;
37 :     use Carp;
38 :     use FIG_Config;
39 :     $ENV{'BLASTMAT'} = "/Volumes/raid/FIGdisk.v4/BLASTMAT";
40 :     $ENV{'FIG_HOME'} = "/Volumes/raid/FIGdisk.v4";
41 :     # end of tool_hdr
42 :     ########################################################################
43 :    
44 :     use FIG;
45 :     my $fig = new FIG;
46 :    
47 :     my @fc_bins = (
48 :     [0.554,100],
49 :     [0.626,50],
50 :     [0.532,25],
51 :     [0.369,13],
52 :     [0.219,7],
53 :     [0.140,0]
54 :     );
55 :    
56 :     while (defined($_ = <STDIN>))
57 :     {
58 :     chop;
59 :     ($peg1,$peg2,$fc) = split(/\t/,$_);
60 :     $sc = &score_fc($fc,\@fc_bins);
61 :     print join("\t",($peg1,$peg2,$sc,"","","",$fc,"")),"\n";
62 :     }
63 :     sub score_fc {
64 :     my($fcsc,$bins) = @_;
65 :    
66 :     for ($i=0; ($i < @$bins) && ($fcsc < $bins->[$i]->[1]); $i++) {}
67 :     return $bins->[$i]->[0];
68 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3