[Bio] / FigKernelPackages / proml.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/proml.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5, Mon Jan 29 18:14:50 2007 UTC revision 1.6, Wed Jan 31 01:06:51 2007 UTC
# Line 332  Line 332 
332      unlink 'outfile' if -f 'outfile';  # Just checking      unlink 'outfile' if -f 'outfile';  # Just checking
333      unlink 'outtree' if -f 'outtree';  # ditto      unlink 'outtree' if -f 'outtree';  # ditto
334    
335      &write_infile( @align ) or print STDERR "proml::proml: Could write infile\n"      &write_infile( @align ) or print STDERR "proml::proml: Could not write infile\n"
336                                 and chdir $cwd                                 and chdir $cwd
337                                 and return ();                                 and return ();
338    
# Line 341  Line 341 
341                                  and return ();                                  and return ();
342    
343    
344      #  Start writing optoins for program:      #  Start writing options for program:
345    
346      if ( $categories )      if ( $categories )
347      {      {
# Line 372  Line 372 
372    
373      if ( @user_trees )      if ( @user_trees )
374      {      {
375          &write_intree( @user_trees ) or print STDERR "proml::proml: Could write intree\n"          &write_intree( @user_trees ) or print STDERR "proml::proml: Could not write intree\n"
376                                          and chdir $cwd                                          and chdir $cwd
377                                          and return ();                                          and return ();
378          print PROML "U\n";          print PROML "U\n";
# Line 446  Line 446 
446  #-------------------------------------------------------------------------------  #-------------------------------------------------------------------------------
447  #  A perl interface for using proml to estimate site-specific rates of change  #  A perl interface for using proml to estimate site-specific rates of change
448  #  #
449  #     ( $categories, $weights ) = estimate_protein_site_rates( \@align, $tree, proml_opts )  #     ( $categories, $weights ) = estimate_protein_site_rates( \@align, $tree,  %proml_opts )
450    #     ( $categories, $weights ) = estimate_protein_site_rates( \@align, $tree, \%proml_opts )
451  #  #
452  #     $categories = [ [ $rate1, ... ], $site_categories ];  #     $categories = [ [ $rate1, ... ], $site_categories ];
453  #  #
# Line 495  Line 496 
496    
497      my $kmin = 1 / ( gjonewicklib::newick_tree_length( $tree ) || 1 );      my $kmin = 1 / ( gjonewicklib::newick_tree_length( $tree ) || 1 );
498    
 #   print STDERR "Length = ", gjonewicklib::newick_tree_length( $tree ), "; kmin = $kmin\n"; ## DEBUG ##  
   
499      #  Generate "rate variation" by rescaling the supplied tree.  We could use a      #  Generate "rate variation" by rescaling the supplied tree.  We could use a
500      #  finer grain estimator, then categorize the inferred values.  This might      #  finer grain estimator, then categorize the inferred values.  This might
501      #  work slightly better (this is what DNArates currently does).      #  work slightly better (this is what DNArates currently does).
# Line 516  Line 515 
515      #  Adjust (a copy of) the proml opts:      #  Adjust (a copy of) the proml opts:
516    
517      my %proml_opts = ( ref( $proml_opts[0] ) eq 'HASH' ) ? %{ $proml_opts[0] } : @proml_opts;      my %proml_opts = ( ref( $proml_opts[0] ) eq 'HASH' ) ? %{ $proml_opts[0] } : @proml_opts;
518      $proml_opts{ alpha        } =  undef;  
     $proml_opts{ categories   } =  0;  
     $proml_opts{ coef_of_var  } =  0;  
     $proml_opts{ gamma_bins   } =  0;  
     $proml_opts{ invar_frac   } =  0;  
     $proml_opts{ jumble_seed  } =  0;  
     $proml_opts{ n_jumble     } =  0;  
     $proml_opts{ rearrange    } =  0;  
519      $proml_opts{ user_lengths } =  1;      $proml_opts{ user_lengths } =  1;
520      $proml_opts{ user_trees   } = \@trees;      $proml_opts{ user_trees   } = \@trees;
521      $proml_opts{ tree_format  } = 'gjo';      $proml_opts{ tree_format  } = 'gjo';
522    
523      #  Work throught the sites, finding their optimal categories:      delete $proml_opts{ alpha       } if exists $proml_opts{ alpha       };
524        delete $proml_opts{ categories  } if exists $proml_opts{ categories  };
525        delete $proml_opts{ coef_of_var } if exists $proml_opts{ coef_of_var };
526        delete $proml_opts{ gamma_bins  } if exists $proml_opts{ gamma_bins  };
527        delete $proml_opts{ invar_frac  } if exists $proml_opts{ invar_frac  };
528        delete $proml_opts{ jumble_seed } if exists $proml_opts{ jumble_seed };
529        delete $proml_opts{ n_jumble    } if exists $proml_opts{ n_jumble    };
530        delete $proml_opts{ rearrange   } if exists $proml_opts{ rearrange   };
531    
532        #  Work throught the sites, finding their optimal rates/categories:
533    
534      my @categories;      my @categories;
535      my @weights;      my @weights;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3