[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.2 - (view) (download) (as text)

1 : efrank 1.1 use FIG;
2 :     my $fig = new FIG;
3 :    
4 :     $usage = "usage: assign_to_hypo Genome [functions=FunctionFile] [Parms for auto_assign]";
5 :    
6 :     ($genome = shift @ARGV)
7 :     || die $usage;
8 :    
9 :     if ($ARGV[0] =~ /^functions=(\S+)/)
10 :     {
11 :     $functions_file = $1;
12 :     %assigned = map { $_ =~ /^(\S+)\t(\S[^\t\n]+\S)/; $1 => $2 } `cat $functions_file`;
13 :     shift @ARGV;
14 :     $use_file = 1;
15 :     }
16 :    
17 :     open(TMP,">/tmp/tmp$$.fids")
18 :     || die "aborted";
19 :     foreach $fid ($fig->all_features($genome,"peg"))
20 :     {
21 :     $func = $use_file ? $assigned{$fid} : scalar $fig->function_of($fid);
22 :     if (&FIG::hypo($func))
23 :     {
24 :     print TMP "$fid\n";
25 :     }
26 :     }
27 :     close(TMP);
28 :     $parms = join(" ",@ARGV);
29 : overbeek 1.2 foreach $_ (`auto_assign $parms < /tmp/tmp$$.fids | make_calls`)
30 :     {
31 :     if (($_ =~ /^\S+\t(\S[^\t]+\S)/) && (! &FIG::hypo($1)))
32 :     {
33 :     print $_;
34 :     }
35 :     }
36 : efrank 1.1 unlink("/tmp/tmp$$.fids");
37 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3