/usr/lib/transdecoder/util/ffindex_resume.pl is in transdecoder 5.0.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #!/usr/bin/env perl
use strict;
use warnings;
my $input_idx = shift;
my $done_input_idx = shift||die ("input IDX, basename of done IDX\n");
my $done_input = $done_input_idx;
$done_input =~s/\.idx$/.db/;
my $counter=int(0);
my (%hash_done,%hash_all);
open (IN,"$input_idx") ||die;
while (my $ln=<IN>){
$ln=~/^(\d+)\s/ ||next;
$hash_all{$1} = $ln;
}
close IN;
my @files_done = glob("./$done_input_idx*");
foreach my $done (@files_done){
open (IN,$done);
while (my $ln=<IN>){
$ln=~/^(\d+)\s/ ||next;
next if $ln=~/\b1$/;
$hash_done{$1}=1;
}
close IN;
}
print "All: ".scalar(keys(%hash_all))."\n";
print "Done: ".scalar(keys(%hash_done))."\n";
open (OUT,">".$input_idx.".notdone");
foreach my $i (sort {$a <=> $b} keys %hash_all){
next if $hash_done{$i};
$counter++;
print OUT $hash_all{$i};
}
close OUT;
print "Found $counter unfinished\n";
if ($counter==0){
unlink($input_idx.".notdone");
system("cat $done_input | tr -d '\000' > $done_input.txt");
exit;
}
|