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

View of /FigKernelScripts/pg_check_gapfills.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Thu Mar 21 20:20:48 2013 UTC (6 years, 7 months ago) by overbeek
Branch: MAIN
CVS Tags: rast_rel_2014_0729, rast_rel_2014_0912, HEAD
add gapfilling

use strict;
use Data::Dumper;
use Getopt::Long;
use SeedEnv;
use JSON::XS;

my $usage = "usage: check_gapfills -d Data\n";
my $dataD;
my $rc  = GetOptions('d=s' => \$dataD,);

if ((! $rc) || (! -d $dataD)) { print STDERR $usage; exit }


my $cr = "\r";

$| = 1;

my @jobs = (`cat $dataD/gapfill_jobs.table`);
my $size = @jobs;
my $left = $size;
my $finished = 0;
my $tries = 0;
my $check;
#foreach $_ (`cat $dataD/gapfill_jobs.table`)

while (@jobs) {
    foreach $_ (@jobs)
    {
            if ($_ =~ /^(\S+)\t(\S+)/) {
                my($job,$key) = ($1,$2);
                my $cmd = "kbfba-checkjob $key ";
                my $txt = `$cmd`;
                $txt =~ /Is complete: (.*)$/m;
                if ($1 == 1) {
                    @jobs = grep { $_ != $job } @jobs;
                    $finished++;
                }
    #            print "$cr Started $size, checking $job, finished $finished";
    #           print "$job\t$1\n";
            }
    }

    $tries++;
    print "$cr Try # $tries. Started $size, finished: $finished, to go: $left";
    sleep 100;
}
print "\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3