Changeset 160

Show
Ignore:
Timestamp:
03/16/09 14:18:16 (8 months ago)
Author:
cholt
Message:

Maker Updates for OOmycete genome, clone hsps, hits in join.pm

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • MPI/mpi_maker

    r159 r160  
    250250               "predictor=s" =>\$OPT{predictor}, 
    251251               "retry=i" =>\$OPT{retry}, 
    252                "ignore" =>\$OPT{ignore}, 
     252               "clean_try" =>\$OPT{clean_try}, 
     253               "evaluate" =>\$OPT{evaluate}, 
    253254               "quiet" =>\$main::quiet, 
    254255               "CTL" => sub {GI::generate_control_files() if($rank == $root); MPI_Finalize(); exit(0);}, 
  • lib/GI.pm

    r159 r160  
    694694   my $snaphmm = $CTL_OPT->{snaphmm}; 
    695695    
    696    return [] if(not $exe); 
    697          
     696   return [] if(! grep {/snap/} @{$CTL_OPT->{_run}}); 
     697    
    698698   my %params; 
    699699   my $out_file = "$the_void/$seq_id\.all\.snap"; 
    700  
     700    
    701701   $LOG->add_entry("STARTED", $out_file, "");    
    702702 
     
    740740   my $org = $CTL_OPT->{augustus_species}; 
    741741 
    742    return [] if(not $exe); 
     742   return [] if(! grep {/augustus/} @{$CTL_OPT->{_run}}); 
    743743 
    744744   my %params; 
     
    786786   my $org = $CTL_OPT->{fgenesh_par_file}; 
    787787 
    788    return [] if(not $exe); 
     788   return [] if(! grep {/fgenesh/} @{$CTL_OPT->{_run}}); 
    789789 
    790790   my %params; 
     
    832832   my $org = $CTL_OPT->{twinscan_species}; 
    833833 
    834    return [] if(not $exe); 
     834   return [] if(! grep {/twinscan/} @{$CTL_OPT->{_run}}); 
    835835 
    836836   my %params; 
     
    20172017      $CTL_OPT{'rm_gff'} = ''; 
    20182018      $CTL_OPT{'predictor'} = 'est2genome'; 
    2019       $CTL_OPT{'predictor'} = 'gff' if($main::eva); 
     2019      $CTL_OPT{'predictor'} = 'model_gff' if($main::eva); 
    20202020      $CTL_OPT{'snaphmm'} = 'fly'; 
    20212021      $CTL_OPT{'augustus_species'} = 'fly'; 
     
    20382038      $CTL_OPT{'clean_try'} = 0; 
    20392039      $CTL_OPT{'TMP'} = ''; 
    2040       $CTL_OPT{'eval_pred'} = ''; 
    2041       $CTL_OPT{'eval_pred'} = 'snap' if($main::eva)
     2040      $CTL_OPT{'run'} = ''; 
     2041      $CTL_OPT{'unmask'} = 1
    20422042      $CTL_OPT{'clean_up'} = 0; 
    20432043   } 
     
    21842184 
    21852185   #required for evaluator to work 
    2186    $CTL_OPT{predictor} = 'gff' if($main::eva); 
     2186   $CTL_OPT{predictor} = 'model_gff' if($main::eva); 
    21872187   $CTL_OPT{model_pass} = 1 if($main::eva); 
    21882188 
     
    21902190   $CTL_OPT{predictor} =~ s/\s+//g; 
    21912191   my @predictors = split(',', $CTL_OPT{predictor}); 
    2192    $CTL_OPT{_predictor} = \@predictors; 
    2193  
     2192 
     2193   my %uniq; 
    21942194   foreach my $p (@predictors) { 
    2195       if ($p !~ /^snap$|^augustus$|^est2genome$|^fgenesh$/ && 
    2196           $p !~ /^twinscan$|^jigsaw$|^gff$|^abinit$/ 
    2197          ) { 
    2198          $error .= "ERROR: Invalid predictor defined: $p\n". 
    2199          "Valid entries are: est2genome, abinit, gff, snap, augustus,\n". 
    2200          "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"; 
     2195       if ($p !~ /^snap$|^augustus$|^est2genome$|^fgenesh$/ && 
     2196           $p !~ /^twinscan$|^jigsaw$|^model_gff$|^abinit$/ 
     2197           ) { 
     2198           $error .= "ERROR: Invalid predictor defined: $p\n". 
     2199               "Valid entries are: est2genome, model_gff,\n". 
     2200               "snap, augustus, fgenesh, and abinit\n\n"; 
     2201       } 
     2202       else { 
     2203           push(@{$CTL_OPT{_predictor}}, $p) unless($uniq{$p}); 
     2204           push(@{$CTL_OPT{_run}}, $p) unless($uniq{$p}); 
     2205           $uniq{$p}++; 
     2206       } 
     2207   } 
     2208    
     2209   #parse run and error check 
     2210   $CTL_OPT{run} =~ s/\s+//g; 
     2211   my @run_preds = split(',', $CTL_OPT{run}); 
     2212 
     2213   foreach my $p (@run_preds) { 
     2214      if ($p !~ /^snap$|^augustus$|^fgenesh$|^twinscan$|^jigsaw$/) { 
     2215         $error .= "ERROR: Invalid value defined for run: $p\n". 
     2216         "Valid entries are: snap, augustus, or fgenesh\n\n"; 
     2217      } 
     2218      else { 
     2219         push(@{$CTL_OPT{_run}}, $p) unless($uniq{$p}); 
     2220         $uniq{$p}++; 
    22132221      } 
    22142222   } 
     
    22832291   push (@infiles, 'RepeatMasker') if($CTL_OPT{model_org}); 
    22842292   push (@infiles, 'rmlib') if ($CTL_OPT{rmlib}); 
    2285    push (@infiles, 'snap') if (grep (/snap/, $CTL_OPT{predictor})); 
    2286    push (@infiles, 'augustus') if (grep (/augustus/, $CTL_OPT{predictor}));  
    2287    push (@infiles, 'fgenesh') if (grep (/fgenesh/, $CTL_OPT{predictor})); 
    2288    push (@infiles, 'twinscan') if (grep (/twinscan/, $CTL_OPT{predictor})); 
    2289    push (@infiles, 'jigsaw') if (grep (/jigsaw/, $CTL_OPT{predictor})); 
    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})); 
     2293   push (@infiles, 'snap') if (grep (/snap/, @{$CTL_OPT{_run}})); 
     2294   push (@infiles, 'augustus') if (grep (/augustus/, @{$CTL_OPT{_run}}));  
     2295   push (@infiles, 'fgenesh') if (grep (/fgenesh/, @{$CTL_OPT{_run}})); 
     2296   push (@infiles, 'twinscan') if (grep (/twinscan/, @{$CTL_OPT{_run}})); 
     2297   push (@infiles, 'jigsaw') if (grep (/jigsaw/, @{$CTL_OPT{_run}})); 
    22952298   push (@infiles, 'fathom') if ($CTL_OPT{enable_fathom}); 
    22962299   push (@infiles, 'rm_gff') if($CTL_OPT{rm_gff}); 
     
    23062309 
    23072310   #uniq the array 
    2308    my %uniq
     2311   %uniq = ()
    23092312   foreach my $in (@infiles) { 
    23102313      $uniq{$in}++; 
     
    24932496   print OUT "#-----Gene Prediction Options\n" if(!$ev); 
    24942497   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); 
     2498   print OUT "run:$O{run} #ab-initio methods to run (seperate multiple values by ',')\n"; 
     2499   print OUT "predictor:$O{predictor} #prediction methods for annotations (seperate multiple values by ',')\n" if(!$ev); 
     2500   print OUT "unmask:$O{unmask} #Also run ab-initio methods on unmasked sequence, 1 = yes, 0 = no\n"; 
    24972501   print OUT "snaphmm:$O{snaphmm} #SNAP HMM model\n"; 
    24982502   print OUT "augustus_species:$O{augustus_species} #Augustus gene prediction model\n"; 
     
    25092513   print OUT "\n"; 
    25102514   print OUT "#-----Maker Specific Options\n"; 
    2511    print OUT "evaluate:$O{evaluate} #run Evaluator on all annotations\n" if(!$ev); 
     2515   print OUT "evaluate:$O{evaluate} #run Evaluator on all annotations, 1 = yes, 0 = no\n" if(!$ev); 
    25122516   print OUT "max_dna_len:$O{max_dna_len} #length for dividing up contigs into chunks (larger values increase memory usage)\n"; 
    25132517   print OUT "min_contig:$O{min_contig} #all contigs from the input genome file below this size will be skipped\n"; 
  • lib/Process/MpiChunk.pm

    r159 r160  
    648648 
    649649            #==ab initio predictions here 
    650             my $masked_preds = GI::abinits($masked_file, 
    651                                            $the_void, 
    652                                            $safe_seq_id.".masked", 
    653                                            \%CTL_OPT, 
    654                                            $LOG 
    655                                            ); 
    656  
    657             my $preds = GI::abinits($unmasked_file, 
    658                                     $the_void, 
    659                                     $safe_seq_id, 
    660                                     \%CTL_OPT, 
    661                                     $LOG 
    662                                     ); 
    663  
    664             push(@$preds, @$masked_preds); 
     650            #do masked predictions first 
     651            my $preds = GI::abinits($masked_file, 
     652                                    $the_void, 
     653                                    $safe_seq_id.".masked", 
     654                                    \%CTL_OPT, 
     655                                    $LOG 
     656                                   ); 
     657             
     658            #add tag that says these are masked 
     659            foreach my $p (@$masked_preds){ 
     660               my $alg = $p->algorithm(); 
     661               $p->algorithm("$alg\_masked"); 
     662            } 
     663 
     664            #now do unmasked predictions 
     665            my $unmasked_preds = []; 
     666            if($CTL_OPT{unmask}){ 
     667               $unmasked_preds = GI::abinits($unmasked_file, 
     668                                             $the_void, 
     669                                             $safe_seq_id, 
     670                                             \%CTL_OPT, 
     671                                             $LOG 
     672                                            ); 
     673            } 
     674 
     675            push(@$preds, @$unmasked_preds); 
    665676 
    666677            #==QRNA noncoding RNA prediction here 
  • lib/maker/auto_annotator.pm

    r158 r160  
    2424#use evaluator::AED; 
    2525use shadow_AED; 
    26 use Storable qw(dclone); 
    2726 
    2827$Storable::forgive_me = 1;  
     
    582581                                    $v_seq_ref, 
    583582                                    $def, 
    584                                     'gf', 
    585                                     'gff', 
     583                                    'model_gff', 
    586584                                    $the_void, 
    587585                                    $CTL_OPTIONS 
    588586                                   ); 
    589587            
    590            $annotations{'gff'} = group_transcripts($model_trans, 
    591                                                   $v_seq_ref, 
    592                                                   $seq_id, 
    593                                                   $chunk_number, 
    594                                                   $build, 
    595                                                    'gff', 
    596                                                   $the_void, 
    597                                                   $CTL_OPTIONS 
    598                                                 ); 
     588           $annotations{'model_gff'} = group_transcripts($model_trans, 
     589                                                        $v_seq_ref, 
     590                                                        $seq_id, 
     591                                                        $chunk_number, 
     592                                                        $build, 
     593                                                        'model_gff', 
     594                                                        $the_void, 
     595                                                        $CTL_OPTIONS 
     596                                                        ); 
    599597        } 
    600598 
    601599        #---hint based gene prediction here 
    602600        foreach my $prdr (@{$CTL_OPTIONS->{_predictor}}){ 
    603            next if($prdr eq 'gff' || $prdr eq 'abinit'); 
     601           next if($prdr eq 'model_gff' || $prdr eq 'abinit'); 
    604602           print STDERR "Producing $prdr hint based annotations\n" unless($main::quiet); 
    605603 
     
    609607                                    $v_seq_ref, 
    610608                                    $def, 
    611                                     'bx', 
    612609                                    $prdr, 
    613610                                    $CTL_OPTIONS 
     
    635632                                $v_seq_ref, 
    636633                                $def, 
    637                                 'pr', 
    638634                                'abinit', 
    639635                                $CTL_OPTIONS 
     
    687683} 
    688684#------------------------------------------------------------------------ 
     685sub gene2all_phathits { 
     686    my $g = shift; 
     687     
     688    my @hits; 
     689    foreach my $t (@{$g->{t_structs}}){ 
     690        push (@hits, $t->{hit}); 
     691    } 
     692 
     693    return \@hits; 
     694} 
     695#------------------------------------------------------------------------ 
    689696#this subrutine returns finished MAKER annotations 
    690697sub best_annotations { 
     
    702709        #set up lists for plus and minus strands as well as possible mergers 
    703710        #predictor types are processed in the order given by control files 
     711        my @p_bag; 
     712        my @m_bag; 
    704713        foreach my $p (@{$CTL_OPTIONS->{_predictor}}){ 
    705714            foreach my $g (@{$annotations->{$p}}){ 
    706                 next unless($g->{AED} < 1 || $p eq 'gff'); 
    707  
    708715                if($g->{g_strand} == 1){ 
    709                     push(@$p_list, $g); 
     716                    push(@$p_list, $g) if($g->{AED} < 1 || $p eq 'model_gff'); 
     717                    my $hits = gene2all_phathits($g); 
     718                    push(@p_bag, @$hits); 
    710719                } 
    711                 elsif($g->{g_strand} == -1){ 
    712                     push(@$m_list, $g); 
     720                elsif($g->{g_strand} == -1) { 
     721                    push(@$m_list, $g) if($g->{AED} < 1 || $p eq 'model_gff'); 
     722                    my $hits = gene2all_phathits($g); 
     723                    push(@m_bag, @$hits); 
    713724                } 
    714725                else{ 
     
    717728            } 
    718729        } 
    719          
     730 
     731        foreach my $g ($p_list){ 
     732            my $hits = get_hits_overlapping_gene($g, \@p_bag); 
     733            my $abAED = 1; 
     734            foreach my $t ($g->{t_structs}){ 
     735                my $f = $t->{hit}; 
     736                my $ab = shadow_AED::get_abAED($hits, $f); 
     737                $abAED = $ab if($ab < $abAED); 
     738            } 
     739            $g->{abAED} = $abAED; 
     740        } 
     741 
     742        foreach my $g ($m_list){ 
     743            my $hits = get_hits_overlapping_gene($g, \@m_bag); 
     744            my $abAED = 1; 
     745            foreach my $t ($g->{t_structs}){ 
     746                my $f = $t->{hit}; 
     747                my $AED = shadow_AED::get_abAED($hits, $f); 
     748                $abAED = $AED if($AED < $abAED); 
     749            } 
     750            $g->{abAED} = $abAED; 
     751        } 
     752 
    720753        #remove low scoring overlaping genes 
    721754        #@$p_list  = sort {crit1($a) <=> crit1($b) || crit2($a) <=> crit2($b) || crit3($a) <=> crit3($b)} @$p_list; 
     
    733766        my $key = $CTL_OPTIONS->{_predictor}->[0]; 
    734767        foreach my $g (@{$annotations->{$key}}){ 
    735             push(@keepers, $g) if($g->{AED} < 1  || $key eq 'gff'); 
     768            push(@keepers, $g) if($g->{AED} < 1  || $key eq 'model_gff'); 
    736769        } 
    737770    } 
     
    803836    my $v_seq        = shift; 
    804837    my $def          = shift; 
    805     my $id           = shift; 
    806838    my $predictor    = shift; 
    807839    my $CTL_OPTIONS  = shift; 
     
    816848 
    817849        #------gff passthrough and ab-init passthrough 
    818         if ($predictor eq 'gff' || $predictor eq 'abinit') { 
     850        if ($predictor eq 'model_gff' || $predictor eq 'abinit') { 
    819851            next if(! defined $model); 
    820852            my $transcript = $model; 
     
    822854            #add UTR to ab-inits 
    823855            if($predictor eq 'abinit' && defined($ests)){ 
    824                 my $copy = dclone($transcript); 
    825                 my $utr_trans = pneu($ests, $copy, $seq); 
     856                my $utr_trans = pneu($ests, $transcript, $seq); 
    826857                if (! clean::is_identical_form($utr_trans, $transcript)){ 
    827858                    push(@transcripts, [$utr_trans, $set, $transcript]); 
     
    834865            next; 
    835866        } 
     867 
     868        #------ab-init passthrough 
     869        if ($predictor eq 'model_gff' || $predictor eq 'abinit') { 
     870            next if(! defined $model); 
     871            my $transcript = $model; 
     872             
     873            #add UTR to ab-inits 
     874            if($predictor eq 'abinit' && defined($ests)){ 
     875                my $utr_trans = pneu($ests, $transcript, $seq); 
     876                if (! clean::is_identical_form($utr_trans, $transcript)){ 
     877                    push(@transcripts, [$utr_trans, $set, $transcript]); 
     878                } 
     879            } 
     880             
     881            push(@transcripts, [$transcript, $set, undef]); 
     882             
     883            $i++; 
     884            next; 
     885        } 
    836886         
    837887        #------est2genome 
    838888        if ($predictor eq 'est2genome') { 
    839889            next if (! defined $mia); 
    840             my $copy = dclone($mia); 
    841             my $transcript = pneu($ests, $copy, $seq); 
     890            my $transcript = pneu($ests, $mia, $seq); 
    842891            push(@transcripts, [$transcript, $set, $mia]) if $transcript; 
    843892            $i++; 
     
    854903        my ($pred_shots, $strand) = get_pred_shot($seq,  
    855904                                                  $def,  
    856                                                   $id.'.'.$i,  
     905                                                  $i,  
    857906                                                  $the_void,  
    858907                                                  $set, 
     
    881930                my $transcript = pneu($ests, $copy, $seq); 
    882931                if (defined($transcript)) { 
    883                     push(@transcripts, [$transcript, $set, $pred_shot]) 
    884                    
     932                    push(@transcripts, [$transcript, $set, $pred_shot]); 
     933               
    885934                else { 
    886                     push(@transcripts, [$copy, $set, $pred_shot]) 
    887                    
     935                    push(@transcripts, [$copy, $set, $pred_shot]); 
     936               
    888937            } 
    889938            elsif (defined($pred_shot) && !defined($mia)) { 
     
    9941043                  ); 
    9951044         
    996          
    9971045        #evidence AED 
    9981046        my $AED = shadow_AED::get_AED(\@bag, $f); 
    999  
    1000         #average the AED from ab-inits 
    1001         my $abinit_AED = 0; 
    1002         foreach my $ab (@$abinits){ 
    1003             $abinit_AED += shadow_AED::get_AED([$ab], $f); 
    1004         } 
    1005         $abinit_AED = (@$abinits) ? $abinit_AED/@$abinits : 1; 
    1006  
    1007         #combined abinit and evidence AED 
    1008         my $X_AED = ($abinit_AED + $AED) / 2; 
    10091047 
    10101048        my $qi    = maker::quality_index::get_transcript_qi($f,$evi,$offset,$len_3_utr,$l_trans); 
     
    10231061                        't_qi'     => $qi, 
    10241062                        'AED'      => $AED, 
    1025                         'ab_AED'   => $abinit_AED, 
    1026                         'X_AED'    => $X_AED, 
    10271063                        'evi'      => $evi 
    10281064                    }; 
     
    10311067} 
    10321068#------------------------------------------------------------------------                                                            
    1033 sub get_overlapping_hits
    1034    my $eat  = shift; 
     1069sub get_hits_overlapping_gene
     1070   my $g  = shift; 
    10351071   my $hits = shift; 
    1036     
     1072 
     1073   my $B = $g->{g_start}; 
     1074   my $E = $g->{g_end}; 
     1075 
    10371076   my @keepers; 
    10381077   foreach my $hit (@{$hits}){ 
    1039       next unless $hit->strand eq $eat->strand; 
    1040       push(@keepers, $hit) 
    1041       if compare::overlap($hit, $eat, 'query', 3); 
    1042    } 
     1078      next unless $hit->strand eq $g->{g_strand}; 
     1079 
     1080      my $comp = compare::compare ($B, 
     1081                                   $E, 
     1082                                   $hit->start, 
     1083                                   $hit->end 
     1084                                  ); 
     1085      if($comp ne '0'){ 
     1086          push(@keepers, $hit); 
     1087      } 
     1088   } 
     1089 
    10431090   return \@keepers; 
    10441091} 
     
    10901137    
    10911138   my $careful_clusters = []; 
    1092    if ($predictor eq 'gff' ) { 
     1139   if ($predictor eq 'model_gff' ) { 
    10931140      my %index; 
    10941141      my $i = 0; 
     
    11081155   elsif ($predictor eq 'abinit' ) { 
    11091156      foreach my $t (@transcripts) { 
    1110          push(@{$careful_clusters}, [$t]) 
     1157          push(@{$careful_clusters}, [$t]); 
    11111158      } 
    11121159   } 
     
    11361183       
    11371184      my $g_name; 
    1138       if ($predictor eq 'gff') { 
     1185      if ($predictor eq 'model_gff') { 
    11391186         $g_name = $c->[0]->{gene_name}; #affects GFFV3.pm 
    11401187         if ($g_name =~ /^maker-$seq_id|$seq_id-abinit/) { 
  • lib/maker/join.pm

    r151 r160  
    270270        #print "PPPPPPPPPPPPP\n"; 
    271271 
    272         return $g unless (defined($b_5) || defined($b_3)); 
     272        #return $g unless (defined($b_5) || defined($b_3)); 
    273273 
    274274        my $sorted_g = PhatHit_utils::sort_hits($g, 'query'); 
     
    289289        foreach my $hsp (@{$sorted_5}){ 
    290290                last if $i ==  $b_5->{five_j}; 
    291                 push(@anno_hsps, $hsp);        
     291                push(@anno_hsps, clone_hsp($hsp));     
    292292                $i++; 
    293293        } 
    294294        #-- merge the 5-prime overlaping features 
    295295        if ( !defined($join_offset_5) || $join_offset_5 == -1){ 
    296                 push(@anno_hsps, $sorted_g->[0]); 
     296                push(@anno_hsps, clone_hsp($sorted_g->[0])); 
    297297        } 
    298298        else { 
     
    308308        #-- push on the gene pred's interior hsps 
    309309        for (my $i = 1; $i < @{$sorted_g} -1; $i++){ 
    310                 push(@anno_hsps, $sorted_g->[$i]); 
     310                push(@anno_hsps, clone_hsp($sorted_g->[$i])); 
    311311        } 
    312312 
     
    314314        my $omega = $#{$sorted_g}; 
    315315        if (!defined($join_offset_3) || $join_offset_3 == -1){ 
    316                 push(@anno_hsps, $sorted_g->[$omega]); 
     316                push(@anno_hsps, clone_hsp($sorted_g->[$omega])); 
    317317        } 
    318318        else { 
     
    337337        if (defined($b_3->{three_j})){ 
    338338                for (my $i = $b_3->{three_j} + 1; $i < @{$sorted_3}; $i++){ 
    339                         push(@anno_hsps, $sorted_3->[$i]); 
     339                        push(@anno_hsps, clone_hsp($sorted_3->[$i])); 
    340340                }  
    341341        } 
     
    378378} 
    379379#------------------------------------------------------------------------ 
     380sub clone_hsp{ 
     381    my $hsp = shift; 
     382 
     383    my @args; 
     384 
     385    push(@args, '-query_start'); 
     386    push(@args, $hsp->{QUERY_START}); 
     387 
     388    push(@args, '-query_seq'); 
     389    push(@args, $hsp->{QUERY_SEQ}); 
     390 
     391    push(@args, '-score'); 
     392    push(@args, $hsp->{SCORE}); 
     393 
     394    push(@args, '-homology_seq'); 
     395    push(@args, $hsp->{HOMOLOGY_SEQ}); 
     396 
     397    push(@args, '-hit_start'); 
     398    push(@args, $hsp->{HIT_START}); 
     399 
     400    push(@args, '-hit_seq'); 
     401    push(@args, $hsp->{HIT_SEQ}); 
     402 
     403    push(@args, '-hsp_length'); 
     404    push(@args, $hsp->{HSP_LENGTH}); 
     405 
     406    push(@args, '-identical'); 
     407    push(@args, $hsp->{IDENTICAL}); 
     408 
     409    push(@args, '-hit_length'); 
     410    push(@args, $hsp->{HIT_LENGTH}); 
     411 
     412    push(@args, '-query_name'); 
     413    push(@args, $hsp->{QUERY_NAME}); 
     414 
     415    push(@args, '-algorithm'); 
     416    push(@args, $hsp->{ALGORITHM}); 
     417 
     418    push(@args, '-bits'); 
     419    push(@args, $hsp->{BITS}); 
     420 
     421    push(@args, '-evalue'); 
     422    push(@args, $hsp->{EVALUE}); 
     423 
     424    push(@args, '-pvalue'); 
     425    push(@args, $hsp->{PVALUE}); 
     426 
     427    push(@args, '-query_length'); 
     428    push(@args, $hsp->{QUERY_LENGTH}); 
     429 
     430    push(@args, '-query_end'); 
     431    push(@args, $hsp->{QUERY_END}); 
     432 
     433    push(@args, '-conserved'); 
     434    push(@args, $hsp->{CONSERVED}); 
     435 
     436    push(@args, '-hit_name'); 
     437    push(@args, $hsp->{HIT_NAME}); 
     438 
     439    push(@args, '-hit_end'); 
     440    push(@args, $hsp->{HIT_END}); 
     441 
     442    push(@args, '-query_gaps'); 
     443    push(@args, $hsp->{QUERY_GAPS}); 
     444 
     445    push(@args, '-hit_gaps'); 
     446    push(@args, $hsp->{HIT_GAPS}); 
     447 
     448    my $REF = ref($hsp); 
     449    my $clone = new $REF(@args); 
     450 
     451    $clone->{queryName} = $hsp->{queryName}; 
     452    #------------------------------------------------- 
     453    # setting strand because bioperl is all messed up! 
     454    #------------------------------------------------ 
     455 
     456    $clone->{_strand_hack}->{query} = $hsp->{_strand_hack}->{query}; 
     457    $clone->{_strand_hack}->{hit}   = $hsp->{_strand_hack}->{query}; 
     458 
     459    return $clone; 
     460} 
     461#------------------------------------------------------------------------ 
    380462sub merge_hsp { 
    381463        my $ext   = shift; 
     
    384466        my $type  = shift; 
    385467 
    386  
    387468        my $offset; 
    388469        my $class; 
     
    398479        my $sorted_ext = PhatHit_utils::sort_hits($ext->{f}, 'query'); 
    399480        my $ext_hsp = $sorted_ext->[$offset]; 
     481 
     482        $g_hsp = clone_hsp($g_hsp); 
    400483 
    401484        if     ($class eq '1'){ 
  • lib/runlog.pm

    r159 r160  
    2424                  'rm_gff', 
    2525                  'predictor', 
    26                   'eval_pred', 
     26                  'run', 
    2727                  'sort_base', 
    2828                  'snaphmm', 
     
    5858                  'ep_score_limit', 
    5959                  'en_score_limit', 
    60                   'enable_fathom' 
     60                  'enable_fathom', 
     61                  'unmask' 
    6162                 ); 
    6263 
     
    181182                   $log_val =~ s/.*\/(maker\/data\/te_proteins.fasta)$/$1/; 
    182183                } 
     184                elsif($key eq 'run'){ 
     185                   #don't care about order 
     186                   my @set = sort @{$logged_vals{CTL_OPTIONS}{_run}}; 
     187                   $log_val = join(",", @set); 
     188                } 
    183189            } 
    184190             
     
    190196                  #don't care about absolute location 
    191197                  $ctl_val =~ s/.*\/(maker\/data\/te_proteins.fasta)$/$1/; 
     198               } 
     199               elsif($key eq 'run'){ 
     200                  #don't care about order 
     201                  my @set = sort @{$CTL_OPTIONS{_run}}; 
     202                  $ctl_val = join(",", @set); 
    192203               } 
    193204            } 
  • lib/shadow_AED.pm

    r151 r160  
    44package shadow_AED; 
    55use strict; 
     6 
     7sub get_abAED{ 
     8    my $hits = shift; 
     9    my $tran = shift; 
     10 
     11    my $sum; 
     12    foreach my $h (@$hits){ 
     13        $sum += get_AED([$h], $tran); 
     14    } 
     15    return 1 if(! defined $sum); 
     16    return $sum/@$hits; 
     17} 
    618 
    719sub get_AED {