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

Annotation of /FigKernelScripts/assign_to_hypo.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : olson 1.3 #
2 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 : efrank 1.1 use FIG;
19 :     my $fig = new FIG;
20 :    
21 :     $usage = "usage: assign_to_hypo Genome [functions=FunctionFile] [Parms for auto_assign]";
22 :    
23 :     ($genome = shift @ARGV)
24 :     || die $usage;
25 :    
26 :     if ($ARGV[0] =~ /^functions=(\S+)/)
27 :     {
28 :     $functions_file = $1;
29 :     %assigned = map { $_ =~ /^(\S+)\t(\S[^\t\n]+\S)/; $1 => $2 } `cat $functions_file`;
30 :     shift @ARGV;
31 :     $use_file = 1;
32 :     }
33 :    
34 :     open(TMP,">/tmp/tmp$$.fids")
35 :     || die "aborted";
36 :     foreach $fid ($fig->all_features($genome,"peg"))
37 :     {
38 :     $func = $use_file ? $assigned{$fid} : scalar $fig->function_of($fid);
39 :     if (&FIG::hypo($func))
40 :     {
41 :     print TMP "$fid\n";
42 :     }
43 :     }
44 :     close(TMP);
45 :     $parms = join(" ",@ARGV);
46 : overbeek 1.2 foreach $_ (`auto_assign $parms < /tmp/tmp$$.fids | make_calls`)
47 :     {
48 :     if (($_ =~ /^\S+\t(\S[^\t]+\S)/) && (! &FIG::hypo($1)))
49 :     {
50 :     print $_;
51 :     }
52 :     }
53 : efrank 1.1 unlink("/tmp/tmp$$.fids");
54 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3