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

Annotation of /FigKernelScripts/ev_code_cron.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1 #__perl__
2 :     #
3 :    
4 :     =pod
5 :    
6 : parrello 1.16 =head1 ev_code_cron.pl (DEPRECATED)
7 : overbeek 1.1
8 :     A wrapper to recalculate and reload the evidence codes. This should allow you to redo all the evidence codes daily, weekly or whatever.
9 :     Really just a series of wrappers around other jobs. Should most certainly be niced while running.
10 :    
11 : parrello 1.16 This script has been replaced by [[EvCodeRefreshPl]].
12 : overbeek 1.1
13 :     =head2 author
14 :    
15 :     RobE RobE@theFIG.info
16 :    
17 :     =cut
18 :    
19 :    
20 :     use strict;
21 :     use FIG;
22 :     my $fig=new FIG;
23 :     use constant DEBUG=>1;
24 :    
25 :     # recalculate the evidence codes
26 :    
27 :     my $dest=$FIG_Config::temp."/evidence_codes.".time; # a temporary directory for the calculations to be stored.
28 :     mkdir ($dest, 0755);
29 :    
30 :     ##### FIND SUBSYSTEMS
31 :     # at the moment we are building evidence codes for all subsystems that are not experimental
32 :     # using the fig->trusted_subsystems code
33 :    
34 :     print STDERR "Finding the subsystems\n" if (DEBUG);
35 :     open(OUT, ">$dest/all_subsys") || die "Can't write to $dest/all_subsys";
36 :     foreach my $ss ($fig->all_subsystems)
37 :     {
38 :     next unless ($fig->usable_subsystem($ss));
39 :     print OUT "$ss\n";
40 :     }
41 :     close OUT;
42 :    
43 :     ##### REBUILD EVIDENCE CODES
44 :     # just use the existing code to do this
45 :     my $command=$FIG_Config::bin."/get_ev_codes $dest/all_subsys > $dest/ev.codes";
46 :     print STDERR "Running the evidence code command $command\n" if (DEBUG);
47 :     system($command);
48 :    
49 : overbeek 1.8 ### The following adds the dlit and ilit evidence codes to the end of the
50 :     ### others;
51 : overbeek 1.13 if (-s "$FIG_Config::data/Dlits/dlits")
52 : overbeek 1.8 {
53 : overbeek 1.14 system "$FIG_Config::bin/export_dlits";
54 : overbeek 1.13 system "$FIG_Config::bin/compute_extra_dlit_data";
55 : overbeek 1.14 system "$FIG_Config::bin/load_dlits";
56 : overbeek 1.12 system "$FIG_Config::bin/generate_ilits > $FIG_Config::data/Dlits/ilits";
57 :     system "$FIG_Config::bin/generate_dlit_ev_codes > $FIG_Config::data/Dlits/dlit.ev.codes";
58 :     system "$FIG_Config::bin/generate_ilit_ev_codes < $FIG_Config::data/Dlits/ilits > $FIG_Config::data/Dlits/ilit.ev.codes";
59 :     system "cat $FIG_Config::data/Dlits/[di]lit.ev.codes | sort -u >> $dest/ev.codes";
60 : overbeek 1.8 }
61 :    
62 : overbeek 1.1 ##### RELOAD ATTRIBUTES DATABASE
63 : parrello 1.15 system("EvCodeRefresh --trace=3 $dest/ev.codes");
64 : overbeek 1.1

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3