Changeset 159

Show
Ignore:
Timestamp:
03/09/09 00:50:16 (9 months ago)
Author:
cholt
Message:

maker update for all oomycete

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • MPI/mpi_maker

    r151 r159  
    250250               "predictor=s" =>\$OPT{predictor}, 
    251251               "retry=i" =>\$OPT{retry}, 
     252               "ignore" =>\$OPT{ignore}, 
    252253               "quiet" =>\$main::quiet, 
    253254               "CTL" => sub {GI::generate_control_files() if($rank == $root); MPI_Finalize(); exit(0);}, 
  • bin/fasta_merge

    r154 r159  
    7979     
    8080    dump_it($trans, "$outfile.all.$source.transcripts.fasta"); 
    81     dump_it($prot, "$outfile.all.$source.proteinss.fasta"); 
     81    dump_it($prot, "$outfile.all.$source.proteins.fasta"); 
    8282} 
    8383 
  • bin/maker

    r151 r159  
    143143           "predictor=s" =>\$OPT{predictor}, 
    144144           "retry=i" =>\$OPT{retry}, 
     145           "clean_try" =>\$OPT{clean_try}, 
     146           "evaluate" =>\$OPT{evaluate}, 
    145147           "quiet" => \$main::quiet, 
    146148           "CTL" => sub {GI::generate_control_files(); exit(0);}, 
     
    236238   #-set up variables that are the result of chunk accumulation 
    237239   my $masked_total_seq; 
    238    my $p_fastas; 
    239    my $t_fastas; 
    240     
     240   my %p_fastas; 
     241   my %t_fastas; 
    241242 
    242243   my $GFF3 = Dumper::GFF::GFFV3->new("$out_dir/$safe_seq_id.gff", 
     
    718719                                                              ); 
    719720 
     721      my $non_over = maker::auto_annotator::get_non_overlaping_abinits($maker_anno, 
     722                                                                       $annotations->{abinit} 
     723                                                                       ); 
     724       
    720725      #==OUTPUT DATA HERE 
    721726       
     
    734739      $GFF3->resolved_flag if (not $chunk->is_last); #adds ### between contigs 
    735740             
    736       #--- building fastas for annotations (grows with itteration) 
    737       my ($p_fasta, $t_fasta) = GI::maker_p_and_t_fastas($maker_anno); 
    738       $p_fastas .= $p_fasta; 
    739       $t_fastas .= $t_fasta; 
     741      #--- building fastas for annotations (grows with iteration) 
     742      GI::maker_p_and_t_fastas($maker_anno, 
     743                               $non_over, 
     744                               $annotations->{abinit}, 
     745                               \%p_fastas, 
     746                               \%t_fastas, 
     747                               ); 
    740748   } 
    741749   #END CONTIG 
    742750    
    743751   #--- write fastas for ab-initio predictions 
    744    my ($p_snap_fastas, 
    745        $t_snap_fastas) = GI::abinit_p_and_t_fastas($preds, 
    746                                                    $safe_seq_id, 
    747                                                    $q_seq_ref, 
    748                                                    $out_dir 
    749                                                   ); 
    750     
    751    #--Write fasta files now that all chunks are finished 
    752    FastaFile::writeFile(\$p_fastas, 
    753                         "$out_dir/$safe_seq_id.maker.proteins.fasta" 
    754                        ); 
    755    FastaFile::writeFile(\$t_fastas, 
    756                         "$out_dir/$safe_seq_id.maker.transcripts.fasta" 
    757                        ); 
     752    
     753   #--Write annotation fasta files now that all chunks are finished 
     754   GI::write_p_and_t_fastas(\%p_fastas, \%t_fastas, $safe_seq_id, $out_dir); 
    758755    
    759756   #--- write GFF3 file 
  • lib/Dumper/GFF/GFFV3.pm

    r151 r159  
    485485            $type = $k eq 'hit' ? 'match' : 'match_part'; 
    486486        } 
    487         elsif ($class =~ /^repeat/i){ 
     487        elsif ($class =~ /^blastx\:repeat/i){ 
     488            $type = $k eq 'hit' ? 'protein_match' : 'match_part'; 
     489        } 
     490        elsif ($class =~ /^repeatmasker$/i){ 
     491            $type = $k eq 'hit' ? 'match' : 'match_part'; 
     492        } 
     493        elsif ($class =~ /^maker$/i){ #pasthrough maker annotation as evidence 
    488494            $type = $k eq 'hit' ? 'match' : 'match_part'; 
    489495        } 
  • lib/GFFDB.pm

    r157 r159  
    181181           
    182182          my $table; 
    183           if($l->{source} =~ /^repeatmasker$|^blastx\:repeatmask$|^repeat_gff\:/i){ 
     183          if($l->{source} =~ /^repeatmasker$|^blastx\:repeat|^repeat_gff\:/i){ 
    184184             next if (! $codes{rm_pass}); 
    185185             next if ($skip{repeat_maker}); 
     
    618618        $f->{gene_id} = $gene_id unless(! $gene_id); 
    619619        $f->{gene_name} = $gene_name unless(! $gene_name); 
     620        $f->{_tran_name} = $tran_name unless(! $gene_name); 
    620621        $f->{_tran_id}   = $tran_id unless(! $tran_id); 
    621622        $f->{maker_qi}  = $t->{maker_qi} unless(! $t->{maker_qi}); 
  • lib/GI.pm

    r153 r159  
    3939use repeat_mask_seq; 
    4040use maker::sens_spec; 
     41use File::NFSLock; 
    4142 
    4243@ISA = qw( 
     
    4647#------------------------------------------------------------------------ 
    4748#--------------------------- CLASS FUNCTIONS ---------------------------- 
     49#------------------------------------------------------------------------ 
     50sub set_global_temp { 
     51    my $dir = shift; 
     52 
     53    $TMP = $dir; 
     54} 
    4855#------------------------------------------------------------------------ 
    4956sub get_preds_on_chunk { 
     
    414421# } 
    415422#----------------------------------------------------------------------------- 
    416 sub abinit_p_and_t_fastas { 
    417    my $preds = shift; 
    418    my $id = shift; 
    419    my $seq_ref = shift; 
    420    my $out_dir = shift; 
    421  
    422    my %fhs; 
    423  
    424    foreach my $hit (@{$preds}) { 
    425       my $source = $hit->algorithm; 
    426       $source = uri_escape($source, 
    427                            '\*\?\|\\\/\'\"\{\}\<\>\;\,\^\(\)\$\~\:' 
    428                           ); 
    429       my $t_name = $hit->name(); # note this is being set in GFFV3::pred_data 
    430       my $t_seq  = maker::auto_annotator::get_transcript_seq($hit, $seq_ref);    
    431                  
    432       my ($p_seq, $offset, $end) =  
    433       maker::auto_annotator::get_translation_seq($t_seq); 
    434                  
    435       my $score = 0; 
    436       foreach my $hsp ($hit->hsps) { 
    437          $score += $hsp->score(); 
    438       } 
    439       my $t_def = ">$t_name transcript offset:$offset score:$score"; 
    440       my $p_def = ">$t_name protein score:$score"; 
    441        
    442       if (! exists $fhs{$source}) { 
    443          open(my $t_fh, "> $out_dir/$id.maker.$source.transcripts.fasta"); 
    444          open(my $p_fh, "> $out_dir/$id.maker.$source.proteins.fasta"); 
    445          $fhs{$source}{t} = $t_fh; 
    446          $fhs{$source}{p} = $p_fh; 
    447       } 
    448  
    449       my $t_fh = $fhs{$source}{t}; 
    450       my $p_fh = $fhs{$source}{p}; 
    451  
    452       print $t_fh Fasta::toFasta($t_def, \$t_seq); 
    453       print $p_fh Fasta::toFasta($p_def, \$p_seq); 
    454    } 
    455 } 
    456 #----------------------------------------------------------------------------- 
    457423sub maker_p_and_t_fastas { 
    458    my $annotations = shift @_; 
     424   my $maker    = shift @_; 
     425   my $non_over = shift @_; 
     426   my $abinit   = shift @_; 
     427   my $p_fastas = shift @_; 
     428   my $t_fastas = shift @_; 
    459429    
    460    my $p_fastas = ''; 
    461    my $t_fastas = ''; 
    462     
    463    foreach my $an (@$annotations) { 
     430   foreach my $an (@$maker) { 
    464431      foreach my $a (@{$an->{t_structs}}) { 
    465432         my ($p_fasta, $t_fasta) = get_p_and_t_fastas($a); 
    466          $p_fastas .= $p_fasta; 
    467          $t_fastas .= $t_fasta; 
    468       } 
     433         $p_fastas->{maker} .= $p_fasta; 
     434         $t_fastas->{maker} .= $t_fasta; 
     435      } 
     436   } 
     437 
     438   foreach my $an (@$non_over) { 
     439       foreach my $a (@{$an->{t_structs}}) { 
     440           my ($p_fasta, $t_fasta) = get_p_and_t_fastas($a); 
     441           $p_fastas->{non_overlapping_ab_initio} .= $p_fasta; 
     442           $t_fastas->{non_overlapping_ab_initio} .= $t_fasta; 
     443       } 
    469444   } 
    470445    
    471    return $p_fastas, $t_fastas; 
     446   foreach my $an (@$abinit) { 
     447       foreach my $a (@{$an->{t_structs}}) { 
     448           my ($p_fasta, $t_fasta) = get_p_and_t_fastas($a); 
     449           my $source = $a->{hit}->algorithm; 
     450           $source =~ s/pred_gff\://; 
     451           $p_fastas->{$source} .= $p_fasta; 
     452           $t_fastas->{$source} .= $t_fasta; 
     453       } 
     454   } 
    472455} 
    473456 
     
    488471         
    489472   return($p_fasta, $t_fasta); 
     473} 
     474#---------------------------------------------------------------------------- 
     475sub write_p_and_t_fastas{ 
     476    my $p_fastas = shift @_; 
     477    my $t_fastas = shift @_; 
     478    my $safe_seq_id = shift @_; 
     479    my $out_dir = shift @_; 
     480 
     481    while( my $key = each %$p_fastas){ 
     482        my $name = "$out_dir/$safe_seq_id.maker"; 
     483        $name .= ".$key" unless($key eq 'maker'); 
     484        $name .= "\.proteins.fasta"; 
     485 
     486        FastaFile::writeFile(\$p_fastas->{$key}, 
     487                             $name, 
     488                            ); 
     489    } 
     490 
     491    while( my $key = each %$t_fastas){ 
     492        my $name = "$out_dir/$safe_seq_id.maker"; 
     493        $name .= ".$key" unless($key eq 'maker'); 
     494        $name .= "\.transcripts.fasta"; 
     495 
     496        FastaFile::writeFile(\$t_fastas->{$key}, 
     497                             $name, 
     498                            ); 
     499    } 
    490500} 
    491501#---------------------------------------------------------------------------- 
     
    10521062#----------------------------------------------------------------------------- 
    10531063sub build_all_indexes { 
    1054    my @dbs = @_; 
    1055  
    1056    foreach my $db (@dbs) { 
    1057       my $index = new Bio::DB::Fasta($db); 
     1064   my $CTL_OPT = shift; 
     1065 
     1066   my @dbs = ($CTL_OPT->{_est}, 
     1067              $CTL_OPT->{_protein}, 
     1068              $CTL_OPT->{_repeat_protein}, 
     1069              $CTL_OPT->{_est_reads}, 
     1070              $CTL_OPT->{_altest} 
     1071             ); 
     1072 
     1073   foreach my $db (@dbs){ 
     1074       next if(! $db); 
     1075       new Bio::DB::Fasta($db); 
    10581076   } 
    10591077} 
     
    11361154 
    11371155   $db =~ /([^\/]+)$/; 
    1138    my $tmp_db = "$t_dir/$1"; 
     1156   my $tmp_db = "$TMP/$1"; 
    11391157 
    11401158   $LOG->add_entry("STARTED", $blast_finished, "") if($LOG_FLAG);  
    11411159 
    1142    #copy db to local tmp dir and run xdformat or formatdb  
    1143    if (! @{[<$tmp_db.xn?*>]} && (! -e $blast_finished || $opt_f) ) { 
    1144       copy($db, $tmp_db); 
    1145       dbformat($formater, $tmp_db, 'blastn'); 
     1160   #copy db to local tmp dir and run xdformat or formatdb 
     1161   if ((! @{[<$tmp_db.x?d*>]} || ! @{[<$tmp_db.?sq*>]}) && (! -e $blast_finished || $opt_f)) { 
     1162       if(my $lock = new File::NFSLock("$tmp_db.lock", 'EX', , 300)){ 
     1163           copy($db, $tmp_db) if(! -e $tmp_db); 
     1164           dbformat($formater, $tmp_db, 'blastn'); 
     1165           $lock->unlock; 
     1166       } 
    11461167   } 
    11471168   elsif (-e $blast_finished && ! $opt_f) { 
     
    13851406     
    13861407   $db =~ /([^\/]+)$/; 
    1387    my $tmp_db = "$t_dir/$1"; 
     1408   my $tmp_db = "$TMP/$1"; 
    13881409 
    13891410   $LOG->add_entry("STARTED", $blast_finished, "") if($LOG_FLAG); 
    13901411 
    13911412   #copy db to local tmp dir and run xdformat or format db  
    1392    if (! @{[<$tmp_db.xp?*>]} && (! -e $blast_finished || $opt_f) ) { 
    1393        copy($db, $tmp_db); 
    1394        dbformat($formater, $tmp_db, 'blastx'); 
     1413   if ((! @{[<$tmp_db.x?d*>]} || ! @{[<$tmp_db.?sq*>]}) && (! -e $blast_finished || $opt_f) ) { 
     1414       if(my $lock = new File::NFSLock("$tmp_db.lock", 'EX', , 300)){ 
     1415           copy($db, $tmp_db) if(! -e $tmp_db); 
     1416           dbformat($formater, $tmp_db, 'blastx'); 
     1417           $lock->unlock; 
     1418       } 
    13951419   } 
    13961420   elsif (-e $blast_finished && ! $opt_f) { 
     
    16461670 
    16471671   $db =~ /([^\/]+)$/; 
    1648    my $tmp_db = "$t_dir/$1"; 
     1672   my $tmp_db = "$TMP/$1"; 
    16491673 
    16501674   $LOG->add_entry("STARTED", $blast_finished, "") if($LOG_FLAG);  
    16511675 
    16521676   #copy db to local tmp dir and run xdformat or formatdb 
    1653    if (! @{[<$tmp_db.xn?*>]} && (! -e $blast_finished || $opt_f) ) { 
    1654       copy($db, $tmp_db); 
    1655       dbformat($formater, $tmp_db, 'tblastx'); 
     1677   if ((! @{[<$tmp_db.x?d*>]} || ! @{[<$tmp_db.?sq*>]}) && (! -e $blast_finished || $opt_f) ) { 
     1678       if(my $lock = new File::NFSLock("$tmp_db.lock", 'EX', , 300)){ 
     1679           copy($db, $tmp_db) if(! -e $tmp_db); 
     1680           dbformat($formater, $tmp_db, 'tblastx'); 
     1681           $lock->unlock; 
     1682       } 
    16561683   } 
    16571684   elsif (-e $blast_finished && ! $opt_f) { 
     
    19772004      $CTL_OPT{'model_pass'} = 1; 
    19782005      $CTL_OPT{'pred_pass'} = 0; 
    1979       $CTL_OPT{'other_pass'} = 1
     2006      $CTL_OPT{'other_pass'} = 0
    19802007      $CTL_OPT{'est'} = ''; 
    19812008      $CTL_OPT{'est_reads'} = ''; 
     
    19902017      $CTL_OPT{'rm_gff'} = ''; 
    19912018      $CTL_OPT{'predictor'} = 'est2genome'; 
     2019      $CTL_OPT{'predictor'} = 'gff' if($main::eva); 
    19922020      $CTL_OPT{'snaphmm'} = 'fly'; 
    19932021      $CTL_OPT{'augustus_species'} = 'fly'; 
     
    19962024      $CTL_OPT{'pred_gff'} = ''; 
    19972025      $CTL_OPT{'other_gff'} = ''; 
    1998       $CTL_OPT{'alt_peptide'} = 'c'; 
     2026      $CTL_OPT{'alt_peptide'} = 'C'; 
    19992027      $CTL_OPT{'cpus'} = 1; 
     2028      $CTL_OPT{'evaluate'} = 0; 
     2029      $CTL_OPT{'evaluate'} = 1 if($main::eva); 
    20002030      $CTL_OPT{'max_dna_len'} = 100000; 
    20012031      $CTL_OPT{'min_contig'} = 1; 
     
    20032033      $CTL_OPT{'pred_flank'} = 200; 
    20042034      $CTL_OPT{'single_exon'} = 0; 
     2035      $CTL_OPT{'single_length'} = 250; 
    20052036      $CTL_OPT{'keep_preds'} = 0; 
    20062037      $CTL_OPT{'retry'} = 1; 
    2007       $CTL_OPT{'datastore'} = 0; 
     2038      $CTL_OPT{'clean_try'} = 0; 
     2039      $CTL_OPT{'TMP'} = ''; 
     2040      $CTL_OPT{'eval_pred'} = ''; 
     2041      $CTL_OPT{'eval_pred'} = 'snap' if($main::eva); 
    20082042      $CTL_OPT{'clean_up'} = 0; 
    20092043   } 
     
    20752109      $CTL_OPT{'eva_gspmax'} = 100; 
    20762110      $CTL_OPT{'enable_fathom'} = 0; 
    2077  
     2111      $CTL_OPT{'enable_fathom'} = 1 if($main::eva); 
    20782112   } 
    20792113    
     
    21332167   #--load command line options 
    21342168   $CTL_OPT{genome} = $OPT{genome} if (defined $OPT{genome}); 
     2169   $CTL_OPT{genome_gff} = $OPT{genome_gff} if (defined $OPT{genome_gff}); 
    21352170   $CTL_OPT{force} = $OPT{force} if (defined $OPT{force}); 
    21362171   $CTL_OPT{predictor} = $OPT{predictor} if (defined $OPT{predictor}); 
    21372172   $CTL_OPT{retry} = $OPT{retry} if (defined $OPT{retry}); 
    21382173   $CTL_OPT{cpus} = $OPT{cpus} if (defined $OPT{cpus}); 
     2174   $CTL_OPT{clean_try} = $OPT{clean_try} if (defined $OPT{clean_try}); 
    21392175 
    21402176   #skip repeat masking command line option 
     
    21472183   } 
    21482184 
     2185   #required for evaluator to work 
     2186   $CTL_OPT{predictor} = 'gff' if($main::eva); 
     2187   $CTL_OPT{model_pass} = 1 if($main::eva); 
     2188 
    21492189   #parse predictor and error check 
    21502190   $CTL_OPT{predictor} =~ s/\s+//g; 
    21512191   my @predictors = split(',', $CTL_OPT{predictor}); 
    2152    $CTL_OPT{_predictor} = \ @predictors; 
     2192   $CTL_OPT{_predictor} = \@predictors; 
    21532193 
    21542194   foreach my $p (@predictors) { 
     
    21592199         "Valid entries are: est2genome, abinit, gff, snap, augustus,\n". 
    21602200         "or fgenesh\n\n"; 
     2201      } 
     2202   } 
     2203 
     2204   #parse eval_pred and error check 
     2205   $CTL_OPT{eval_pred} =~ s/\s+//g; 
     2206   my @eval_preds = split(',', $CTL_OPT{eval_pred}); 
     2207   $CTL_OPT{_eval_pred} = \@eval_preds; 
     2208 
     2209   foreach my $p (@eval_preds) { 
     2210      if ($p !~ /^snap$|^augustus$|^fgenesh$|^twinscan$|^jigsaw$|^gff$/) { 
     2211         $error .= "ERROR: Invalid eval_pred defined: $p\n". 
     2212         "Valid entries are: gff, snap, augustus, or fgenesh\n\n"; 
    21612213      } 
    21622214   } 
     
    22322284   push (@infiles, 'rmlib') if ($CTL_OPT{rmlib}); 
    22332285   push (@infiles, 'snap') if (grep (/snap/, $CTL_OPT{predictor})); 
    2234    push (@infiles, 'snap') if ($CTL_OPT{snap}); 
    22352286   push (@infiles, 'augustus') if (grep (/augustus/, $CTL_OPT{predictor}));  
    2236    push (@infiles, 'augustus') if ($CTL_OPT{augustus}); 
    22372287   push (@infiles, 'fgenesh') if (grep (/fgenesh/, $CTL_OPT{predictor})); 
    2238    push (@infiles, 'fgenesh') if ($CTL_OPT{fgenesh}); 
    22392288   push (@infiles, 'twinscan') if (grep (/twinscan/, $CTL_OPT{predictor})); 
    2240    push (@infiles, 'twinscan') if ($CTL_OPT{twinscan}); 
    22412289   push (@infiles, 'jigsaw') if (grep (/jigsaw/, $CTL_OPT{predictor})); 
    2242    push (@infiles, 'jigsaw') if ($CTL_OPT{jigsaw}); 
    2243    push (@infiles, 'qrna') if ($CTL_OPT{qrna}); 
     2290   push (@infiles, 'snap') if (grep (/snap/, $CTL_OPT{eval_red})); 
     2291   push (@infiles, 'augustus') if (grep (/augustus/, $CTL_OPT{eval_pred}));  
     2292   push (@infiles, 'fgenesh') if (grep (/fgenesh/, $CTL_OPT{eval_pred})); 
     2293   push (@infiles, 'twinscan') if (grep (/twinscan/, $CTL_OPT{eval_pred})); 
     2294   push (@infiles, 'jigsaw') if (grep (/jigsaw/, $CTL_OPT{eval_pred})); 
     2295   push (@infiles, 'fathom') if ($CTL_OPT{enable_fathom}); 
    22442296   push (@infiles, 'rm_gff') if($CTL_OPT{rm_gff}); 
    22452297   push (@infiles, 'est_gff') if($CTL_OPT{est_gff}); 
     
    22662318         next; 
    22672319      } 
    2268  
    2269       if (not -e $CTL_OPT{$in}) { 
     2320      elsif (not -e $CTL_OPT{$in}) { 
    22702321         $error .= "ERROR: The \'$in\' file $CTL_OPT{$in} does not exist.\n". 
    22712322         "Please check your control files: maker_opts.ctl, maker_bopts, or maker_exe.ctl\n\n"; 
     
    22792330                                
    22802331   #--error check that values are meaningful 
    2281    if ($CTL_OPT{augustus} && not $CTL_OPT{augustus_species}) { 
     2332   if (grep (/^augustus$/, @infiles) && not $CTL_OPT{augustus_species}) { 
    22822333      warn "WARNING: There is no species specified for Augustus in maker_opts.ctl augustus_species.\n". 
    22832334      "As a result the default (fly) will be used.\n\n"; 
    22842335      $CTL_OPT{augustus_species} = "fly"; 
    22852336   } 
    2286    if ($CTL_OPT{augustus} && 
     2337   if (grep (/^augustus$/, @infiles) && 
    22872338       (! $ENV{AUGUSTUS_CONFIG_PATH} || ! -e "$ENV{AUGUSTUS_CONFIG_PATH}/extrinsic/extrinsic.MPE.cfg") 
    22882339      ) { 
    22892340      $error .= "ERROR: The environmental variable AUGUSTUS_CONFIG_PATH has not been set\n". 
    22902341      "or is not set correctly Please set this in your profile per Augustus\n". 
    2291       "installation instructions\n\n"; 
    2292    } 
    2293    if (($CTL_OPT{snap}||$CTL_OPT{enable_fathom}) && not $CTL_OPT{snaphmm}) { 
    2294       warn "WARNING: There is no model specified for for Snap in maker_opts.ctl snaphmm.\n". 
     2342      "installation instructions then try again.\n\n"; 
     2343   } 
     2344   if (grep (/^snaps$|^fathom$/, @infiles) && not $CTL_OPT{snaphmm}) { 
     2345      warn "WARNING: There is no model specified for for Snap/Fathom in maker_opts.ctl snaphmm.\n". 
    22952346      "As a result, the default (fly) will be used.\n\n"; 
    22962347      $CTL_OPT{snaphmm} = "fly"; 
    22972348   } 
    2298  
    2299    if (($CTL_OPT{snap} || $CTL_OPT{enable_fathom}) && 
    2300        ! -e $CTL_OPT{snaphmm} && 
     2349   if (grep (/^snap$|^fathom$/, @infiles) && ! -e $CTL_OPT{snaphmm} && 
    23012350       (! exists $ENV{ZOE} || ! -e $ENV{ZOE}."/HMM/".$CTL_OPT{snaphmm}) 
    23022351      ) { 
    2303       $error .= "ERROR: The snaphmm specified for Snap in maker_opts.ctl does not exist.\n\n"; 
    2304    } 
    2305    if ($CTL_OPT{fgenesh}) { 
     2352      $error .= "ERROR: The snaphmm specified for Snap/Fathom in maker_opts.ctl does not exist.\n\n"; 
     2353   } 
     2354   if (grep (/^fgenesh$/, @infiles)) { 
    23062355      if (! $CTL_OPT{fgenesh_par_file}) { 
    23072356         $error .= "ERROR: There is no parameter file secified for for FgenesH in\n". 
     
    23232372   } 
    23242373   if ($CTL_OPT{retry} < 0) { 
    2325       warn "WARNING: \'retry\' must be set to 0 or greater.\n\n"; 
     2374      warn "WARNING: \'retry\' must be set to 0 or greater.\n". 
     2375           "It will now be set to 0\n\n"; 
    23262376      $CTL_OPT{retry} = 0; 
    2327    } 
    2328  
     2377   }  
     2378   if($CTL_OPT{TMP} && ! -d $CTL_OPT{TMP}){ 
     2379       $error .= "The TMP value \'$CTL_OPT{TMP}\' is not a directory or does not exist\n"; 
     2380   } 
     2381    
    23292382   die $error if ($error);    
    23302383 
     
    23422395   if ($iterator->number_of_entries() > 1000 && ! $CTL_OPT{datastore}) { 
    23432396      warn "WARNING:  There are more than 1000 fasta entries in the input file.\n". 
    2344       "Datastore will be used to avoid overloading the data structure of\n". 
     2397      "A two depth datastore will be used to avoid overloading the data structure of\n". 
    23452398      "the output directory.\n\n"; 
    23462399       
     
    23652418   } 
    23662419 
    2367    #---set up blast databases for analyisis 
     2420   #---set up blast databases and indexes for analyisis 
    23682421   create_blastdb(\%CTL_OPT, $mpi_size); 
     2422   build_all_indexes(\%CTL_OPT); 
     2423 
     2424   #--set up optional global TMP 
     2425   if($CTL_OPT{TMP}){ 
     2426       $CTL_OPT{_TMP} = tempdir("maker_XXXXXX", CLEANUP => 1, DIR => 1); 
     2427   } 
    23692428 
    23702429   #--set values for datastructure 
     
    23902449   my $dir = shift || Cwd::cwd(); 
    23912450   my %O = (@_) ? @_ : set_defaults(); 
    2392  
    2393    #--build maker_opts.ctl file 
    2394    open (OUT, "> $dir/maker_opts.ctl"); 
    2395    print OUT "#-----Genome (Required for De-Novo Annotations)\n"; 
    2396    print OUT "genome:$O{genome} #genome sequence file in fasta format\n"; 
    2397    print OUT "\n"; 
    2398    print OUT "#-----Re-annotation Options\n"; 
    2399    print OUT "genome_gff:$O{genome_gff} #re-annotate genome based on this gff3 file\n"; 
     2451   $main::eva = 1; 
     2452   my $ev = $main::eva; 
     2453 
     2454   #--build opts.ctl file 
     2455   open (OUT, "> $dir/eval_opts.ctl") if($ev); 
     2456   open (OUT, "> $dir/maker_opts.ctl") if(!$ev); 
     2457   print OUT "#-----Genome (Required for De-Novo Annotation)\n" if(!$ev); 
     2458   print OUT "genome:$O{genome} #genome sequence file in fasta format\n"if(!$ev); 
     2459   print OUT "\n"if(!$ev); 
     2460   print OUT "#-----Re-annotation Options (Only Maker derived GFF3)\n" if(!$ev); 
     2461   print OUT "#-----Maker Derived GFF3 Annotations to Evaluate (genome fasta is internal to GFF3)\n" if($ev); 
     2462   print OUT "genome_gff:$O{genome_gff} #re-annotate genome based on this gff3 file\n" if(!$ev); 
     2463   print OUT "genome_gff:$O{genome_gff} #Maker derived gff3 file\n" if($ev); 
    24002464   print OUT "est_pass:$O{est_pass} #use ests in genome_gff: 1 = yes, 0 = no\n"; 
    24012465   print OUT "altest_pass:$O{altest_pass} #use alternate organism ests in genome_gff: 1 = yes, 0 = no\n"; 
    24022466   print OUT "protein_pass:$O{protein_pass} #use proteins in genome_gff: 1 = yes, 0 = no\n"; 
    2403    print OUT "rm_pass:$O{protein_pass} #use repeats in genome_gff: 1 = yes, 0 = no\n"; 
    2404    print OUT "model_pass:$O{protein_pass} #use gene models in genome_gff: 1 = yes, 0 = no\n"
     2467   print OUT "rm_pass:$O{rm_pass} #use repeats in genome_gff: 1 = yes, 0 = no\n"; 
     2468   print OUT "model_pass:$O{model_pass} #use gene models in genome_gff: 1 = yes, 0 = no\n" if(!$ev)
    24052469   print OUT "pred_pass:$O{pred_pass} #use ab-initio predictions in genome_gff: 1 = yes, 0 = no\n"; 
    2406    print OUT "other_pass:$O{protein_pass} #passthrough everything else in genome_gff: 1 = yes, 0 = no\n"
     2470   print OUT "other_pass:$O{other_pass} #passthrough everything else in genome_gff: 1 = yes, 0 = no\n" if(!$ev)
    24072471   print OUT "\n"; 
    2408    print OUT "#-----EST Evidence (you must provide a value for at least one)\n"; 
     2472   print OUT "#-----External GFF3 Annotations to Evaluate\n" if($ev); 
     2473   print OUT "model_gff:$O{model_gff} #gene models from an external gff3 file\n" if($ev); 
     2474   print OUT "genome:$O{genome} #genome sequence file in fasta format for GFF3\n"if($ev); 
     2475   print OUT "\n"if($ev); 
     2476   print OUT "#-----EST Evidence (you should provide a value for at least one)\n"; 
    24092477   print OUT "est:$O{est} #non-redundant set of assembled ESTs in fasta format (classic EST analysis)\n"; 
    24102478   print OUT "est_reads:$O{est_reads} #un-assembled EST reads in fasta format (for deep nextgen mRNASeq)\n"; 
    24112479   print OUT "altest:$O{altest} #EST/cDNA sequence file in fasta format from an alternate organism\n"; 
    2412    print OUT "est_gff:$O{est_gff} #EST evidence from a seperate gff3 file\n"; 
     2480   print OUT "est_gff:$O{est_gff} #EST evidence from an external gff3 file\n"; 
    24132481   print OUT "altest_gff:$O{altest_gff} #Alternate organism EST evidence from a seperate gff3 file\n"; 
    24142482   print OUT "\n"; 
    2415    print OUT "#-----Protein Homology Evidence (you must provide a value for at least one)\n"; 
     2483   print OUT "#-----Protein Homology Evidence (you should provide a value for at least one)\n"; 
    24162484   print OUT "protein:$O{protein}  #protein sequence file in fasta format\n"; 
    2417    print OUT "protein_gff:$O{protein_gff}  #protein homology evidence from a gff3 file\n"; 
     2485   print OUT "protein_gff:$O{protein_gff}  #protein homology evidence from an external gff3 file\n"; 
    24182486   print OUT "\n"; 
    24192487   print OUT "#-----Repeat Masking (leave values blank to skip)\n"; 
     
    24212489   print OUT "repeat_protein:$O{repeat_protein} #a database of transposable element proteins in fasta format\n"; 
    24222490   print OUT "rmlib:$O{rmlib} #an organism specific repeat library in fasta format\n"; 
    2423    print OUT "rm_gff:$O{rm_gff} #repeat elements from a gff3 file\n"; 
     2491   print OUT "rm_gff:$O{rm_gff} #repeat elements from an external gff3 file\n"; 
    24242492   print OUT "\n"; 
    2425    print OUT "#-----Gene Prediction Options\n"; 
    2426    print OUT "predictor:$O{predictor} #prediction method for annotations (seperate multiple values by ',')\n"; 
     2493   print OUT "#-----Gene Prediction Options\n" if(!$ev); 
     2494   print OUT "#-----Evaluator Ab-Initio Comparison Options\n" if($ev); 
     2495   print OUT "predictor:$O{predictor} #prediction method for annotations (seperate multiple values by ',')\n" if(!$ev); 
     2496   print OUT "eval_pred:$O{eval_pred} #prediction method for comparisons (seperate multiple values by ',')\n" if($ev); 
    24272497   print OUT "snaphmm:$O{snaphmm} #SNAP HMM model\n"; 
    24282498   print OUT "augustus_species:$O{augustus_species} #Augustus gene prediction model\n"; 
    24292499   print OUT "fgenesh_par_file:$O{fgenesh_par_file} #Fgenesh parameter file\n"; 
    2430    print OUT "model_gff:$O{model_gff} #gene models from a gff3 file (annotation passthrough)\n"
    2431    print OUT "pred_gff:$O{model_gff} #ab-initio predictions from a gff3 file\n"; 
     2500   print OUT "model_gff:$O{model_gff} #gene models from an external gff3 file (annotation pass-through)\n" if(!$ev)
     2501   print OUT "pred_gff:$O{model_gff} #ab-initio predictions from an external gff3 file\n"; 
    24322502   print OUT "\n"; 
    2433    print OUT "#-----Other Annotation Type Options (features maker doesn't recognize)\n"
    2434    print OUT "other_gff:$O{other_gff} #features to passthrough to final output from a gff3 file\n"
    2435    print OUT "\n"
     2503   print OUT "#-----Other Annotation Type Options (features maker doesn't recognize)\n" if(!$ev)
     2504   print OUT "other_gff:$O{other_gff} #features to pass-through to final output from an extenal gff3 file\n" if(!$ev)
     2505   print OUT "\n" if(!$ev)
    24362506   print OUT "#-----External Application Specific Options\n"; 
    24372507   print OUT "alt_peptide:$O{alt_peptide} #amino acid used to replace non standard amino acids in blast databases\n"; 
     
    24392509   print OUT "\n"; 
    24402510   print OUT "#-----Maker Specific Options\n"; 
     2511   print OUT "evaluate:$O{evaluate} #run Evaluator on all annotations\n" if(!$ev); 
    24412512   print OUT "max_dna_len:$O{max_dna_len} #length for dividing up contigs into chunks (larger values increase memory usage)\n"; 
    24422513   print OUT "min_contig:$O{min_contig} #all contigs from the input genome file below this size will be skipped\n"; 
    2443    print OUT "split_hit:$O{split_hit} #length for the splitting of hits (expected max intron size for EST and protein alignments)\n"; 
     2514   print OUT "split_hit:$O{split_hit} #length for the splitting of hits (expected max intron size for evidence alignments)\n"; 
    24442515   print OUT "pred_flank:$O{pred_flank} #length of sequence surrounding EST and protein evidence used to extend gene predictions\n"; 
    2445    print OUT "single_exon:$O{single_exon} #consider EST hits aligning to single exons when generating annotations, 1 = yes, 0 = no\n"; 
    2446    print OUT "keep_preds:$O{keep_preds} #keep ab-initio predictions that do not overlap a maker annotation, 1 = yes, 0 = no\n"; 
     2516   print OUT "single_exon:$O{single_exon} #consider single exon EST evidence when generating annotations, 1 = yes, 0 = no\n"; 
     2517   print OUT "single_length:$O{single_length} #min length required for single exon ESTs if \'single_exon\ is enabled'\n"; 
     2518   print OUT "keep_preds:$O{keep_preds} #Add non-overlapping ab-inito gene prediction to final annotation set, 1 = yes, 0 = no\n" if(!$ev); 
    24472519   print OUT "retry:$O{retry} #number of times to retry a contig if annotation fails for some reason\n"; 
    2448    print OUT "clean_up:$O{clean_up} #remove theVoid directory: 1 = yes, 0 = no\n"; 
     2520   print OUT "clean_try:$O{clean_try} #remove all data from previous run before retrying, 1 = yes, 0 = no\n"; 
     2521   print OUT "TMP:$O{TMP} #secify a directory other than the system default temporary directory for temporary files\n"; 
     2522   print OUT "clean_up:$O{clean_up} #removes theVoid directory with individual analysis files, 1 = yes, 0 = no\n"; 
    24492523   close (OUT); 
    24502524     
    2451    #--build maker_bopts.ctl file 
    2452    open (OUT, "> $dir/maker_bopts.ctl"); 
     2525   #--build bopts.ctl file 
     2526   open (OUT, "> $dir/eval_bopts.ctl") if($ev); 
     2527   open (OUT, "> $dir/maker_bopts.ctl") if(!$ev); 
    24532528   print OUT "#-----BLAST and Exonerate Statistics Thresholds\n"; 
    24542529   print OUT "blast_type:$O{blast_type} #set to 'wublast' or 'ncbi'\n"; 
     
    24792554     
    24802555   #--build maker_exe.ctl file 
    2481    open (OUT, "> $dir/maker_exe.ctl"); 
    2482    print OUT "#-----Location of Executables Used by Maker\n"; 
     2556   open (OUT, "> $dir/eval_exe.ctl") if($ev); 
     2557   open (OUT, "> $dir/maker_exe.ctl") if(!$ev); 
     2558   print OUT "#-----Location of Executables Used by Maker/Evaluator\n"; 
    24832559   print OUT "formatdb:$O{formatdb} #location of NCBI formatdb executable\n"; 
    24842560   print OUT "blastall:$O{blastall} #location of NCBI blastall executable\n"; 
     
    24942570   print OUT "augustus:$O{augustus} #location of augustus executable\n"; 
    24952571   print OUT "fgenesh:$O{fgenesh} #location of fgenesh executable\n"; 
    2496 #   print OUT "twinscan:$O{twinscan} #location of twinscan executable\n"; 
    2497    print OUT "fathom:$O{fathom} #location of fathom executable\n"; 
     2572   print OUT "twinscan:$O{twinscan} #location of twinscan executable (not yet implemented)\n"; 
    24982573   print OUT "\n"; 
    24992574   print OUT "#-----Other Algorithms\n"; 
    25002575   print OUT "jigsaw:$O{jigsaw} #location of jigsaw executable (not yet implemented)\n"; 
    25012576   print OUT "qrna:$O{qrna} #location of qrna executable (not yet implemented)\n"; 
     2577   print OUT "fathom:$O{fathom} #location of fathom executable (not yet implemented)\n"; 
    25022578   close(OUT); 
    25032579     
  • lib/Process/MpiChunk.pm

    r151 r159  
    130130      #-set up variables that are the result of chunk accumulation 
    131131      $VARS->{masked_total_seq} = ''; 
    132       $VARS->{p_fastas} = ''
    133       $VARS->{t_fastas} = ''
     132      $VARS->{p_fastas} = {}
     133      $VARS->{t_fastas} = {}
    134134 
    135135      #--prebuild an index of the databases 
     
    650650            my $masked_preds = GI::abinits($masked_file, 
    651651                                           $the_void, 
    652                                            $safe_seq_id
     652                                           $safe_seq_id.".masked"
    653653                                           \%CTL_OPT, 
    654654                                           $LOG 
     
    15271527                                                                     \%CTL_OPT 
    15281528                                                                    ); 
    1529              
    1530             #-------------------------CODE 
    1531  
    1532             #------------------------RESULTS 
    1533             %results = (maker_anno => $maker_anno); 
     1529 
     1530            my $non_over = maker::auto_annotator::get_non_overlaping_abinits($maker_anno, 
     1531                                                                             $annotations->{abinit} 
     1532                                                                             );      
     1533            #-------------------------CODE 
     1534 
     1535            #------------------------RESULTS 
     1536            %results = (maker_anno => $maker_anno, annotations => $annotations, non_over => $non_over); 
    15341537            #------------------------RESULTS 
    15351538         } 
     
    15511554            @args = (qw{chunk 
    15521555                        maker_anno 
     1556                        non_over 
     1557                        annotations 
    15531558                        blastx_data 
    15541559                        blastn_data 
     
    15691574         elsif ($flag eq 'run') { 
    15701575            #-------------------------CODE 
    1571             my $chunk = $VARS->{chunk}; 
    1572             my $maker_anno = $VARS->{maker_anno}; 
     1576            my $chunk       = $VARS->{chunk}; 
     1577            my $maker_anno  = $VARS->{maker_anno}; 
     1578            my $non_over    = $VARS->{non_over}; 
     1579            my $annotations = $VARS->{annotations}; 
    15731580            my $blastx_data = $VARS->{blastx_data}; 
    15741581            my $blastn_data = $VARS->{blastn_data}; 
     
    16011608            $GFF3->resolved_flag if (not $chunk->is_last); #adds ### between contigs 
    16021609             
    1603             #--- building fastas for annotations (grows with itteration) 
    1604             my ($p_fasta, $t_fasta) = GI::maker_p_and_t_fastas($maker_anno); 
    1605             $p_fastas .= $p_fasta; 
    1606             $t_fastas .= $t_fasta; 
     1610            #--- building fastas for annotations (grows with iteration) 
     1611            GI::maker_p_and_t_fastas($maker_anno, 
     1612                                     $non_over, 
     1613                                     $annotations->{abinit}, 
     1614                                     $p_fastas, 
     1615                                     $t_fastas, 
     1616                                   ); 
    16071617            #-------------------------CODE 
    16081618 
     
    16611671 
    16621672            #--- write fastas for ab-initio predictions 
    1663             my ($p_snap_fastas, 
    1664                 $t_snap_fastas) = GI::abinit_p_and_t_fastas($preds, 
    1665                                                             $safe_seq_id, 
    1666                                                             $q_seq_ref, 
    1667                                                             $out_dir 
    1668                                                            ); 
    1669              
    1670             #--Write fasta files now that all chunks are finished 
    1671             FastaFile::writeFile(\$p_fastas, 
    1672                                  "$out_dir/$safe_seq_id.maker.proteins.fasta" 
    1673                                 ); 
    1674             FastaFile::writeFile(\$t_fastas, 
    1675                                  "$out_dir/$safe_seq_id.maker.transcripts.fasta" 
    1676                                 ); 
     1673            GI::write_p_and_t_fastas($p_fastas, $t_fastas, $safe_seq_id, $out_dir); 
    16771674             
    16781675            #--- write GFF3 file 
     
    18211818   my $tag = shift || 'throw'; 
    18221819 
    1823    $E->{-text} = "ERROR: Failed while ".$extra."!!\n\n"
     1820   $E->{-text} .= "ERROR: Failed while ".$extra."!!\n\n" if($extra)
    18241821    
    18251822   if($tag eq 'handle'){ 
  • lib/Process/MpiTiers.pm

    r144 r159  
    260260   if($chunk->failed){ 
    261261      my $E = $chunk->exception; 
    262       $self->_handler($E, "ERROR: Chunk failed at level $level_num\n"); 
     262      $self->_handler($E, "Chunk failed at level $level_num\n"); 
    263263   } 
    264264   else{ 
  • lib/Widget/RepeatMasker.pm

    r127 r159  
    250250        foreach my $key (keys %hsps){ 
    251251                 my $f = 
    252                      Bio::Search::Hit::PhatHit::repeatmasker->new('-name' => $q_name
     252                     Bio::Search::Hit::PhatHit::repeatmasker->new('-name' => $key
    253253                                                                  '-description'  => 'NA', 
    254254                                                                  '-algorithm'    => 'repeat_masker', 
  • lib/Widget/fgenesh.pm

    r143 r159  
    157157 
    158158        my $iterator = new Iterator::Fasta($q_file); 
    159         my $fasta = $iterator->nextEntry(); 
     159        my $fasta = $iterator->nextFasta(); 
    160160 
    161161        my $def     = Fasta::getDef($fasta); 
    162162        my $q_seq   = Fasta::getSeqRef($fasta); 
    163          
    164         my ($q_name)  = $def =~ /^>(.+?) /; 
     163        my $q_name  = Fasta::def2SeqID($def);; 
    165164         
    166165        my $fh = new FileHandle(); 
  • lib/cluster.pm

    r151 r159  
    1414use compare; 
    1515use SimpleCluster; 
     16use Shadower; 
     17 
    1618@ISA = qw( 
    1719       ); 
     
    166168        my $ref = $hit->algorithm; 
    167169 
    168         return  0 if $ref =~ /repeat/i; 
     170        return  0 if $ref =~ /^repeat/i; 
     171        return  0 if $ref =~ /^repeat_gff\:/i; 
    169172        return  1 if $ref =~ /^snap$/i; 
    170173        return  1 if $ref =~ /^augustus$/i; 
    171174        return  1 if $ref =~ /^fgenesh$/i; 
    172175        return  1 if $ref =~ /^twinscan$/i; 
     176        return  1 if $ref =~ /^jigsaw$/i; 
     177        return  1 if $ref =~ /^pred_gff\:/i; 
    173178        return  2 if $ref =~ /^blastn$/i; 
    174179        return  2 if $ref =~ /^tblastx$/i; 
     180        return  2 if $ref =~ /^altest_gff\:/i; 
    175181        return  3 if $ref =~ /^blastx$/i; 
     182        return  3 if $ref =~ /^protein_gff\:/i; 
    176183        return  4 if $ref =~ /2genome$/i; 
     184        return  4 if $ref =~ /^est_gff\:/i; 
     185        return  5 if $ref =~ /^maker$/i; 
     186        return  5 if $ref =~ /^model_gff\:/i; 
    177187        die "UNKNOWN CLASS(".ref($hit)."), ALGORITHM($ref), in cluster::criteria\n"; 
    178188} 
     
    182192 
    183193        my $score =  $hit->score(); 
     194        $score = '' if(! defined $score); 
    184195        #check if value is numerical ad adjust if not 
    185196        if($score !~ /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/){ 
    186            $score = $hit->bits() 
     197            $score = $hit->bits(); 
     198            $score = '' if(! defined $score); 
    187199        } 
    188200        if($score !~ /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/){ 
    189201            $score = $hit->significance; 
     202            $score = '' if(! defined $score); 
    190203            if($score =~ /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/){ 
    191204                $score = 10000 - (10000 * $score); 
  • lib/evaluator/evaluate.pm

    r156 r159  
    2121#--------------------------------- METHODS ------------------------------------ 
    2222#------------------------------------------------------------------------------ 
    23  
    2423sub evaluate_in_maker { 
    2524 
     
    114113        } 
    115114} 
    116  
     115#------------------------------------------------------------------------------- 
     116sub evaluate_maker_annotations { 
     117    my $annotations = shift; 
     118    my $seq         = shift; 
     119    my $out_base    = shift; 
     120    my $the_void    = shift; 
     121    my $CTL_OPTIONS = shift; 
     122 
     123    #iterate over each gene annotation 
     124    foreach my $ann (@$annotations){ 
     125        my @t_cluster; 
     126        my @pol_p_hits; 
     127        my @pol_e_hits; 
     128        my @blastx_hits; 
     129        my @tblastx_hits; 
     130        my @ab_inits; 
     131 
     132        #collect all evidence and transcripts hit for the gene 
     133        foreach my $t_struct (@{$ann->{t_structs}}){ 
     134            my $hit = $t_struct->{hit}; 
     135            my $evi = $t_struct->{evi}; 
     136 
     137            $pol_p   = maker::auto_annotator::get_selected_types($evi->{gomiph}, 'protein2genome'); 
     138            $pol_e   = maker::auto_annotator::get_selected_types($evi->{ests}, 'est2genome', 'est_gff'); 
     139            $blastx  = maker::auto_annotator::get_selected_types($evi->{gomiph},'blastx', 'protein_gff'); 
     140            $tblastx = maker::auto_annotator::get_selected_types($evi->{alt_ests},'tblastx', 'altest_gff'); 
     141            $ab      = $evi->{all_preds}; 
     142 
     143            push(@t_cluster, $hit); 
     144            push(@pol_p_hits, @$pol_p); 
     145            push(@pol_e_hits, @$pol_e); 
     146            push(@blastx_hits, @$blastx); 
     147            push(@tblastx_hits, @$tblastx); 
     148            push(@ab_inits, @$ab); 
     149        } 
     150 
     151        #unique the set of evidence 
     152        foreach my $hit (@pol_p_hits, @pol_e_hits, @blastx_hits, @tblastx_hits, @ab_inits){ 
     153            $hit->{_uniq_set} = 0; 
     154        } 
     155        @pol_p_hits   = grep {$_->{_uniq_set}++ == 0} @pol_p_hits; 
     156        @pol_e_hits   = grep {$_->{_uniq_set}++ == 0} @pol_e_hits; 
     157        @blastx_hits  = grep {$_->{_uniq_set}++ == 0} @blastx_hits; 
     158        @tblastx_hits = grep {$_->{_uniq_set}++ == 0} @tblastx_hits; 
     159        @ab_inits     = grep {$_->{_uniq_set}++ == 0} @ab_inits; 
     160 
     161        #get gene level statistics 
     162        my $so_code = evaluator::so_classifier::so_code(\@t_cluster); 
     163        my $alt_spli_sup = evaluator::funs::alt_spli(\@t_cluster, \@pol_e_hits, $seq); 
     164        my $geneAED = evaluator::AED::gene_AED($c, \@pol_e_hits, \@pol_p_hits, \@blastx_hits, \@ab_inits, $seq); 
     165 
     166        $ann->{geneAED} = $geneAED; 
     167        $ann->{so_code} = $so_code; 
     168 
     169        #get transcript level statistics; 
     170        foreach my $t_struct (@{$ann->{t_structs}}){ 
     171            my $t_name = $t_struct->{t_name}; 
     172 
     173            #run evaluator 
     174            my $eva = power_evaluate($f, 
     175                                     $seq, 
     176                                     \@pol_p_hits, 
     177                                     \@pol_e_hits, 
     178                                     \@blastx_hits, 
     179                                     \@abinits, 
     180                                     $so_code, 
     181                                     $geneAED, 
     182                                     $alt_spli_sup, 
     183                                     $t_name, 
     184                                     $CTL_OPTIONS, 
     185                                     $the_void, 
     186                                     ); 
     187 
     188            $t_struct->{report} = $eva->{report}; 
     189 
     190            #print report 
     191            my $dir = "$out_base/evaluator"; 
     192            mkdir($dir) if(! -e $dir);       
     193            my $file = "$dir/".Fasta::seqID2SafeID($t->{hit}->name); 
     194            ($file) = $file =~ /^([^\s\t\n]+)/; 
     195            $file . = ".eva"; 
     196            open(my $FH, "> $file"); 
     197            print $FH $t->{report}; 
     198            close($FH); 
     199        } 
     200    } 
     201
    117202#------------------------------------------------------------------------------- 
    118203sub power_evaluate { 
  • lib/runlog.pm

    r145 r159  
    2424                  'rm_gff', 
    2525                  'predictor', 
     26                  'eval_pred', 
    2627                  'sort_base', 
    2728                  'snaphmm', 
     
    3435                  'pred_flank', 
    3536                  'single_exon', 
     37                  'single_length', 
    3638                  'keep_preds', 
    3739                  'alt_peptide', 
     40                  'evaluate', 
    3841                  'blast_type', 
    3942                  'pcov_blastn', 
     
    5558                  'ep_score_limit', 
    5659                  'en_score_limit', 
     60                  'enable_fathom' 
    5761                 ); 
    5862 
     
    155159         } 
    156160         else{ 
    157             $continue_flag = 2;       #rerun died 
     161            $continue_flag = ($CTL_OPTIONS{clean_try}) ? 2 : 3;       #rerun died 
    158162            $continue_flag = -1 if($self->{die_count} > $CTL_OPTIONS{retry}); #only let die up to count 
    159163            $rm_key{retry}++ if ($continue_flag == 2); 
     
    196200               $continue_flag = 1; #re-run because ctlopts changed 
    197201             
    198                $rm_key{preds}++; #all changes affect final predictions 
    199                 
     202               if($key ne 'evaluate' && 
     203                  $key ne 'enable_fathom'){ 
     204                   $rm_key{preds}++; #almost all changes affect final predictions 
     205               } 
     206 
    200207               if (-e $gff_file) { 
    201208                  $rm_key{gff}++; #always rebuild gff when some option has changed 
     
    544551      print STDERR "#---------------------------------------------------------------------\n", 
    545552                   "Now retrying the contig!!\n", 
     553                   "All contig related data will be erased before continuing!!\n", 
     554                   "SeqID: $seq_id\n", 
     555                   "Length: $length\n", 
     556                   "Retry: $die_count!!\n", 
     557                   "#---------------------------------------------------------------------\n\n\n"; 
     558   } 
     559   elsif($flag == 3){ 
     560      print STDERR "#---------------------------------------------------------------------\n", 
     561                   "Now retrying the contig!!\n", 
    546562                   "SeqID: $seq_id\n", 
    547563                   "Length: $length\n", 
     
    587603   } 
    588604   elsif($flag == 2){ 
    589       $message = 'RETRY'; #re-run previously died 
     605      $message = 'RETRY_CLEAN'; #re-run previously died 
     606   } 
     607   elsif($flag == 3){ 
     608       $message = 'RETRY'; #re-run previously died 
    590609   } 
    591610   elsif($flag == -1){