[Bio] / FortyEight / rp_rapid_propagation.pl Repository:
ViewVC logotype

Diff of /FortyEight/rp_rapid_propagation.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10, Wed Nov 5 22:39:29 2008 UTC revision 1.11, Mon May 18 16:54:56 2009 UTC
# Line 9  Line 9 
9  use File::Basename;  use File::Basename;
10  use GenomeMeta;  use GenomeMeta;
11  use Carp 'croak';  use Carp 'croak';
12    use POSIX;
13    
14  @ARGV == 1 or die "Usage: $0 job-dir\n";  @ARGV == 1 or die "Usage: $0 job-dir\n";
15    
# Line 134  Line 135 
135      @keep_genecalls_flag = ("--keep");      @keep_genecalls_flag = ("--keep");
136  }  }
137    
138    #
139    # Make sure we don't have any leftover restart directories in $errdir, since
140    # they will make rapid_propagation think it's restarting, which would be bad.
141    # Also reset the status.rp.* values to zero.
142    #
143    
144    my @restart_dirs = <$errdir/$genome.*>;
145    if (@restart_dirs)
146    {
147        my $targ = strftime("$errdir/restart.%Y-%m-%d-%H-%M-%S", localtime);
148        mkdir($targ);
149        for my $dir (@restart_dirs)
150        {
151            my $b = basename($dir);
152            rename($dir, "$targ/$b");
153            $meta->add_log_entry($0, "Moved existing restart directory $b to $targ");
154        }
155    }
156    
157    for my $key (grep { /^status\.rp\./ } $meta->get_metadata_keys())
158    {
159        my $old = $meta->get_metadata($key);
160        $meta->add_log_entry($0, "Reset old $key=$old to 0");
161        $meta->set_metadata($key, 0);
162    }
163    
164  @cmd = ("$FIG_Config::bin/rapid_propagation", "--errdir", $errdir,  @cmd = ("$FIG_Config::bin/rapid_propagation", "--errdir", $errdir,
165          @keep_genecalls_flag,          @keep_genecalls_flag,
166          "--code", $genetic_code,          "--code", $genetic_code,

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3