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

Annotation of /FigKernelScripts/run_all_inference.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : olson 1.1 #
2 :     # Run rapid_subsystem_inference_batch across all complete genomes.
3 :     #
4 :    
5 :     use strict;
6 :     use FIG;
7 :     use FIG_Config;
8 :    
9 :     my $fig = new FIG;
10 :    
11 :     @ARGV == 1 or @ARGV == 2 or die "Usage: run_all_inference missing-in-subsystems-file [evidence.log]\n";
12 :    
13 :     my $missing = shift;
14 :     my $evidence = shift;
15 :    
16 :     my $tmp = "$FIG_Config::temp/runall.$$";
17 :     open(TMP, ">", $tmp) or die "Cannot write $tmp: $!";
18 :    
19 : olson 1.2 my $now = time;
20 :     for my $genome (sort { &FIG::by_genome_id($a, $b) } $fig->genomes())
21 : olson 1.1 {
22 :     my $dir = $fig->organism_directory($genome);
23 : olson 1.2 my @s = stat("$dir/Subsystems/subsystems");
24 :     if (!@s || ($now - $s[9] > 2 * 86400))
25 :     {
26 :     print "process $dir\n";
27 :     &FIG::verify_dir("$dir/Subsystems");
28 :     print TMP join("\t", "$dir/assigned_functions", "$dir/Subsystems/subsystems", "$dir/Subsystems/bindings"), "\n";
29 :     }
30 : olson 1.1 }
31 :     close(TMP);
32 :    
33 :     my $cmd = "$FIG_Config::bin/rapid_subsystem_inference_batch --missing $missing $evidence < $tmp";
34 :     print "$cmd\n";
35 :     my $rc = system($cmd);
36 :     if ($rc != 0)
37 :     {
38 :     die "fail: $rc\n";
39 :     }
40 :    
41 :     unlink($tmp);
42 :    
43 :    
44 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3