Changeset 273

Show
Ignore:
Timestamp:
10/03/09 16:26:20 (2 months ago)
Author:
cholt
Message:

fix to check if snap, augustus, exonerate and RepeatMasker?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Widget/RepeatMasker.pm

    r249 r273  
    116116 
    117117        my %hsps; 
     118        my $count; #used to see if file finished 
    118119        while (my $line = <$fh>){ 
     120                $count++; 
    119121                next if $line =~ /There were no repetitive sequences detected in/; 
    120122                next unless $line =~ /^\s*\d/; 
     
    246248        } 
    247249        $fh->close(); 
     250         
     251        #checks if RepeatMasker really finished 
     252        unless($count){ 
     253            unlink($file); 
     254            die "ERROR: The file $file appears to be incomplete\n". 
     255                "MAKER will need to delete the file, before trying again\n\n"; 
     256        } 
    248257 
    249258        my @keepers; 
  • lib/Widget/augustus.pm

    r216 r273  
    448448           $fh->open($report); 
    449449 
    450         <$fh>; # shift off the header 
     450        my $header = <$fh>; # shift off the header 
     451 
     452        #checks if Augustus really finished 
     453        unless($header){ 
     454            unlink($report); 
     455            die "ERROR: The file $report appears to be incomplete\n". 
     456                "MAKER will need to delete the file, before trying again\n\n"; 
     457        } 
    451458 
    452459        my @genes; 
  • lib/Widget/exonerate/est2genome.pm

    r127 r273  
    3939         $fh->open($file); 
    4040 
    41         $/ = 'C4 Alignment:'; 
     41        local $/ = 'C4 Alignment:'; 
    4242 
    4343        my @chunks; 
     
    4747        $fh->close(); 
    4848 
    49         $/ = "\n"; 
     49        local $/ = "\n"; 
     50 
     51        #checks if exonerate really finished 
     52        unless(grep {/completed exonerate analysis/} $chunks[-1]){ 
     53            unlink($file); 
     54            die "ERROR: The file $file appears to be incomplete\n". 
     55                "MAKER will need to delete the file, before trying again\n\n"; 
     56        } 
    5057 
    5158        return \@chunks; 
  • lib/Widget/exonerate/protein2genome.pm

    r127 r273  
    3636         $fh->open($file); 
    3737 
    38         $/ = 'C4 Alignment:'; 
     38        local $/ = 'C4 Alignment:'; 
    3939 
    4040        my @chunks; 
     
    4444        $fh->close(); 
    4545 
    46         $/ = "\n"; 
     46        local $/ = "\n"; 
     47 
     48        #checks if exonerate realy finished 
     49        unless(grep {/completed exonerate analysis/} $chunks[-1]){ 
     50            unlink($file); 
     51            die"ERROR: The file $file appears to be incomplete\n". 
     52                "MAKER will need to delete the file, before trying again\n\n"; 
     53        } 
    4754 
    4855        return \@chunks; 
  • lib/Widget/snap.pm

    r222 r273  
    251251           $fh->open($report); 
    252252 
    253         <$fh>; # shift off the header 
     253        my $header = <$fh>; # shift off the header 
     254 
     255        #checks if snap really finished 
     256        unless($header){ 
     257            unlink($report); 
     258            die "ERROR: The file $report appears to be incomplete\n". 
     259                "MAKER will need to delete the file, before trying again\n\n"; 
     260        } 
     261 
    254262        my %g; 
    255263        my $i = -1;