Changeset 160
- Timestamp:
- 03/16/09 14:18:16 (8 months ago)
- Files:
-
- MPI/mpi_maker (modified) (1 diff)
- lib/GI.pm (modified) (12 diffs)
- lib/Process/MpiChunk.pm (modified) (1 diff)
- lib/maker/auto_annotator.pm (modified) (20 diffs)
- lib/maker/join.pm (modified) (8 diffs)
- lib/runlog.pm (modified) (4 diffs)
- lib/shadow_AED.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
MPI/mpi_maker
r159 r160 250 250 "predictor=s" =>\$OPT{predictor}, 251 251 "retry=i" =>\$OPT{retry}, 252 "ignore" =>\$OPT{ignore}, 252 "clean_try" =>\$OPT{clean_try}, 253 "evaluate" =>\$OPT{evaluate}, 253 254 "quiet" =>\$main::quiet, 254 255 "CTL" => sub {GI::generate_control_files() if($rank == $root); MPI_Finalize(); exit(0);}, lib/GI.pm
r159 r160 694 694 my $snaphmm = $CTL_OPT->{snaphmm}; 695 695 696 return [] if( not $exe);697 696 return [] if(! grep {/snap/} @{$CTL_OPT->{_run}}); 697 698 698 my %params; 699 699 my $out_file = "$the_void/$seq_id\.all\.snap"; 700 700 701 701 $LOG->add_entry("STARTED", $out_file, ""); 702 702 … … 740 740 my $org = $CTL_OPT->{augustus_species}; 741 741 742 return [] if( not $exe);742 return [] if(! grep {/augustus/} @{$CTL_OPT->{_run}}); 743 743 744 744 my %params; … … 786 786 my $org = $CTL_OPT->{fgenesh_par_file}; 787 787 788 return [] if( not $exe);788 return [] if(! grep {/fgenesh/} @{$CTL_OPT->{_run}}); 789 789 790 790 my %params; … … 832 832 my $org = $CTL_OPT->{twinscan_species}; 833 833 834 return [] if( not $exe);834 return [] if(! grep {/twinscan/} @{$CTL_OPT->{_run}}); 835 835 836 836 my %params; … … 2017 2017 $CTL_OPT{'rm_gff'} = ''; 2018 2018 $CTL_OPT{'predictor'} = 'est2genome'; 2019 $CTL_OPT{'predictor'} = ' gff' if($main::eva);2019 $CTL_OPT{'predictor'} = 'model_gff' if($main::eva); 2020 2020 $CTL_OPT{'snaphmm'} = 'fly'; 2021 2021 $CTL_OPT{'augustus_species'} = 'fly'; … … 2038 2038 $CTL_OPT{'clean_try'} = 0; 2039 2039 $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; 2042 2042 $CTL_OPT{'clean_up'} = 0; 2043 2043 } … … 2184 2184 2185 2185 #required for evaluator to work 2186 $CTL_OPT{predictor} = ' gff' if($main::eva);2186 $CTL_OPT{predictor} = 'model_gff' if($main::eva); 2187 2187 $CTL_OPT{model_pass} = 1 if($main::eva); 2188 2188 … … 2190 2190 $CTL_OPT{predictor} =~ s/\s+//g; 2191 2191 my @predictors = split(',', $CTL_OPT{predictor}); 2192 $CTL_OPT{_predictor} = \@predictors; 2193 2192 2193 my %uniq; 2194 2194 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}++; 2213 2221 } 2214 2222 } … … 2283 2291 push (@infiles, 'RepeatMasker') if($CTL_OPT{model_org}); 2284 2292 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}})); 2295 2298 push (@infiles, 'fathom') if ($CTL_OPT{enable_fathom}); 2296 2299 push (@infiles, 'rm_gff') if($CTL_OPT{rm_gff}); … … 2306 2309 2307 2310 #uniq the array 2308 my %uniq;2311 %uniq = (); 2309 2312 foreach my $in (@infiles) { 2310 2313 $uniq{$in}++; … … 2493 2496 print OUT "#-----Gene Prediction Options\n" if(!$ev); 2494 2497 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"; 2497 2501 print OUT "snaphmm:$O{snaphmm} #SNAP HMM model\n"; 2498 2502 print OUT "augustus_species:$O{augustus_species} #Augustus gene prediction model\n"; … … 2509 2513 print OUT "\n"; 2510 2514 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); 2512 2516 print OUT "max_dna_len:$O{max_dna_len} #length for dividing up contigs into chunks (larger values increase memory usage)\n"; 2513 2517 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 648 648 649 649 #==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); 665 676 666 677 #==QRNA noncoding RNA prediction here lib/maker/auto_annotator.pm
r158 r160 24 24 #use evaluator::AED; 25 25 use shadow_AED; 26 use Storable qw(dclone);27 26 28 27 $Storable::forgive_me = 1; … … 582 581 $v_seq_ref, 583 582 $def, 584 'gf', 585 'gff', 583 'model_gff', 586 584 $the_void, 587 585 $CTL_OPTIONS 588 586 ); 589 587 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_OPTIONS598 );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 ); 599 597 } 600 598 601 599 #---hint based gene prediction here 602 600 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'); 604 602 print STDERR "Producing $prdr hint based annotations\n" unless($main::quiet); 605 603 … … 609 607 $v_seq_ref, 610 608 $def, 611 'bx',612 609 $prdr, 613 610 $CTL_OPTIONS … … 635 632 $v_seq_ref, 636 633 $def, 637 'pr',638 634 'abinit', 639 635 $CTL_OPTIONS … … 687 683 } 688 684 #------------------------------------------------------------------------ 685 sub 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 #------------------------------------------------------------------------ 689 696 #this subrutine returns finished MAKER annotations 690 697 sub best_annotations { … … 702 709 #set up lists for plus and minus strands as well as possible mergers 703 710 #predictor types are processed in the order given by control files 711 my @p_bag; 712 my @m_bag; 704 713 foreach my $p (@{$CTL_OPTIONS->{_predictor}}){ 705 714 foreach my $g (@{$annotations->{$p}}){ 706 next unless($g->{AED} < 1 || $p eq 'gff');707 708 715 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); 710 719 } 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); 713 724 } 714 725 else{ … … 717 728 } 718 729 } 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 720 753 #remove low scoring overlaping genes 721 754 #@$p_list = sort {crit1($a) <=> crit1($b) || crit2($a) <=> crit2($b) || crit3($a) <=> crit3($b)} @$p_list; … … 733 766 my $key = $CTL_OPTIONS->{_predictor}->[0]; 734 767 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'); 736 769 } 737 770 } … … 803 836 my $v_seq = shift; 804 837 my $def = shift; 805 my $id = shift;806 838 my $predictor = shift; 807 839 my $CTL_OPTIONS = shift; … … 816 848 817 849 #------gff passthrough and ab-init passthrough 818 if ($predictor eq ' gff' || $predictor eq 'abinit') {850 if ($predictor eq 'model_gff' || $predictor eq 'abinit') { 819 851 next if(! defined $model); 820 852 my $transcript = $model; … … 822 854 #add UTR to ab-inits 823 855 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); 826 857 if (! clean::is_identical_form($utr_trans, $transcript)){ 827 858 push(@transcripts, [$utr_trans, $set, $transcript]); … … 834 865 next; 835 866 } 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 } 836 886 837 887 #------est2genome 838 888 if ($predictor eq 'est2genome') { 839 889 next if (! defined $mia); 840 my $copy = dclone($mia); 841 my $transcript = pneu($ests, $copy, $seq); 890 my $transcript = pneu($ests, $mia, $seq); 842 891 push(@transcripts, [$transcript, $set, $mia]) if $transcript; 843 892 $i++; … … 854 903 my ($pred_shots, $strand) = get_pred_shot($seq, 855 904 $def, 856 $i d.'.'.$i,905 $i, 857 906 $the_void, 858 907 $set, … … 881 930 my $transcript = pneu($ests, $copy, $seq); 882 931 if (defined($transcript)) { 883 push(@transcripts, [$transcript, $set, $pred_shot]) 884 }932 push(@transcripts, [$transcript, $set, $pred_shot]); 933 } 885 934 else { 886 push(@transcripts, [$copy, $set, $pred_shot]) 887 }935 push(@transcripts, [$copy, $set, $pred_shot]); 936 } 888 937 } 889 938 elsif (defined($pred_shot) && !defined($mia)) { … … 994 1043 ); 995 1044 996 997 1045 #evidence AED 998 1046 my $AED = shadow_AED::get_AED(\@bag, $f); 999 1000 #average the AED from ab-inits1001 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 AED1008 my $X_AED = ($abinit_AED + $AED) / 2;1009 1047 1010 1048 my $qi = maker::quality_index::get_transcript_qi($f,$evi,$offset,$len_3_utr,$l_trans); … … 1023 1061 't_qi' => $qi, 1024 1062 'AED' => $AED, 1025 'ab_AED' => $abinit_AED,1026 'X_AED' => $X_AED,1027 1063 'evi' => $evi 1028 1064 }; … … 1031 1067 } 1032 1068 #------------------------------------------------------------------------ 1033 sub get_ overlapping_hits{1034 my $ eat= shift;1069 sub get_hits_overlapping_gene { 1070 my $g = shift; 1035 1071 my $hits = shift; 1036 1072 1073 my $B = $g->{g_start}; 1074 my $E = $g->{g_end}; 1075 1037 1076 my @keepers; 1038 1077 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 1043 1090 return \@keepers; 1044 1091 } … … 1090 1137 1091 1138 my $careful_clusters = []; 1092 if ($predictor eq ' gff' ) {1139 if ($predictor eq 'model_gff' ) { 1093 1140 my %index; 1094 1141 my $i = 0; … … 1108 1155 elsif ($predictor eq 'abinit' ) { 1109 1156 foreach my $t (@transcripts) { 1110 push(@{$careful_clusters}, [$t])1157 push(@{$careful_clusters}, [$t]); 1111 1158 } 1112 1159 } … … 1136 1183 1137 1184 my $g_name; 1138 if ($predictor eq ' gff') {1185 if ($predictor eq 'model_gff') { 1139 1186 $g_name = $c->[0]->{gene_name}; #affects GFFV3.pm 1140 1187 if ($g_name =~ /^maker-$seq_id|$seq_id-abinit/) { lib/maker/join.pm
r151 r160 270 270 #print "PPPPPPPPPPPPP\n"; 271 271 272 return $g unless (defined($b_5) || defined($b_3));272 #return $g unless (defined($b_5) || defined($b_3)); 273 273 274 274 my $sorted_g = PhatHit_utils::sort_hits($g, 'query'); … … 289 289 foreach my $hsp (@{$sorted_5}){ 290 290 last if $i == $b_5->{five_j}; 291 push(@anno_hsps, $hsp);291 push(@anno_hsps, clone_hsp($hsp)); 292 292 $i++; 293 293 } 294 294 #-- merge the 5-prime overlaping features 295 295 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])); 297 297 } 298 298 else { … … 308 308 #-- push on the gene pred's interior hsps 309 309 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])); 311 311 } 312 312 … … 314 314 my $omega = $#{$sorted_g}; 315 315 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])); 317 317 } 318 318 else { … … 337 337 if (defined($b_3->{three_j})){ 338 338 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])); 340 340 } 341 341 } … … 378 378 } 379 379 #------------------------------------------------------------------------ 380 sub 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 #------------------------------------------------------------------------ 380 462 sub merge_hsp { 381 463 my $ext = shift; … … 384 466 my $type = shift; 385 467 386 387 468 my $offset; 388 469 my $class; … … 398 479 my $sorted_ext = PhatHit_utils::sort_hits($ext->{f}, 'query'); 399 480 my $ext_hsp = $sorted_ext->[$offset]; 481 482 $g_hsp = clone_hsp($g_hsp); 400 483 401 484 if ($class eq '1'){ lib/runlog.pm
r159 r160 24 24 'rm_gff', 25 25 'predictor', 26 ' eval_pred',26 'run', 27 27 'sort_base', 28 28 'snaphmm', … … 58 58 'ep_score_limit', 59 59 'en_score_limit', 60 'enable_fathom' 60 'enable_fathom', 61 'unmask' 61 62 ); 62 63 … … 181 182 $log_val =~ s/.*\/(maker\/data\/te_proteins.fasta)$/$1/; 182 183 } 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 } 183 189 } 184 190 … … 190 196 #don't care about absolute location 191 197 $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); 192 203 } 193 204 } lib/shadow_AED.pm
r151 r160 4 4 package shadow_AED; 5 5 use strict; 6 7 sub 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 } 6 18 7 19 sub get_AED {
