<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>hi, Jason<br>
<br>
I just looked into the code for Baseml when I was stopped by an error;
the parameters for Baseml new object can not be passed like the
following way:<br>
<br>
<b>&nbsp; my $bml = Bio::Tools::Run::Phylo::PAML::Baseml-&gt;new(<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; -params =&gt; { 'runmode' =&gt;2,<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'model'=&gt;7,<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'verbose'=&gt;0},<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; -save_tempfile =&gt;0);</b><br>
<br>
I guess you missed several lines of code (as below) before <span
 id="perlKey">return</span> <span id="var">$self</span>;&nbsp;</tt><tt>
(maybe there is phone call to stop you </tt><tt>when writing the
"new()" source </tt><tt>):<br>
</tt>
<pre><b>  <span id="perlKey">if</span><span id="braces">(</span> <span
 id="perlFunc">defined</span> <span id="var">$params</span> <span
 id="braces">)</span> <span id="braces">{</span>
      <span id="perlKey">if</span><span id="braces">(</span> <span
 id="perlFunc">ref</span><span id="braces">(</span><span id="var">$params</span><span
 id="braces">)</span> !~ <span id="regExp">/HASH/i</span> <span
 id="braces">)</span> <span id="braces">{</span> 
          <span id="var">$self</span>-&gt;<span id="perlFunc">warn</span><span
 id="braces">(</span><span id="dqStr">"Must provide a valid hash ref for parameter -FLAGS"</span><span
 id="braces">)</span>;
      <span id="braces">}</span> <span id="perlKey">else</span> <span
 id="braces">{</span>
          <span id="perlFunc">map</span> <span id="braces">{</span> <span
 id="var">$self</span>-&gt;<span id="method">set_parameter</span><span
 id="braces">(</span><span id="var">$_</span>, $$params<span id="braces">{</span><span
 id="var">$_</span><span id="braces">}</span><span id="braces">)</span> <span
 id="braces">}</span> <span id="perlFunc">keys</span> %$params;
      <span id="braces">}</span>
  <span id="braces">}</span></b></pre>
<tt>This could be seen from the new() code in Codeml:<br>
<a class="moz-txt-link-freetext" href="http://doc.bioperl.org/releases/bioperl-current/bioperl-run/Bio/Tools/Run/Phylo/PAML/Codeml.html#CODE3">http://doc.bioperl.org/releases/bioperl-current/bioperl-run/Bio/Tools/Run/Phylo/PAML/Codeml.html#CODE3</a><br>
But not in new() code of Baseml:<br>
<a class="moz-txt-link-freetext" href="http://doc.bioperl.org/releases/bioperl-current/bioperl-run/Bio/Tools/Run/Phylo/PAML/Baseml.html#CODE3">http://doc.bioperl.org/releases/bioperl-current/bioperl-run/Bio/Tools/Run/Phylo/PAML/Baseml.html#CODE3</a><br>
<br>
Regards,<br>
<br>
Xianjun</tt><br>
</body>
</html>