<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Additionally, since the %VALIDVALUES's first values are slightly
different to those in Codeml (eg. default ndata=5 in Baseml, while 1 in
Codeml).&nbsp; <br>
It might be helpful to remind those who have similar error as here:<br>
<a class="moz-txt-link-freetext" href="http://www.nabble.com/baseml-p1926009.html">http://www.nabble.com/baseml-p1926009.html</a><br>
<br>
To set the parameters manually, one should pay attention to the default
value used in<br>
<a class="moz-txt-link-freetext" href="http://doc.bioperl.org/releases/bioperl-current/bioperl-run/Bio/Tools/Run/Phylo/PAML/Baseml.html#BEGIN1">http://doc.bioperl.org/releases/bioperl-current/bioperl-run/Bio/Tools/Run/Phylo/PAML/Baseml.html#BEGIN1</a><br>
<b>&nbsp;$bml-&gt;set_parameter('ndata', 1); # num(seqs)-1</b><br>
<br>
BTW, I can not find method to reach the loglikelihood value for Baseml
output result,&nbsp; even there is a member in output
Bio::Tools::Phylo::PAML::Result object.<br>
I am not sure it's added in the new version of Bio-Perl. (I'm using
bioperl-1.5.1).<br>
Alternatively, one could use <b>$result-&gt;{'_stats'}-&gt;{'loglikelihood'}</b>
to get the stats values in Result object.<br>
<br>
Regards,<br>
<br>
Xianjun<br>
<span id="var"><br>
<br>
<br>
</span>Xianjun Dong wrote:
<blockquote cite="mid46812425.8000509@ii.uib.no" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
  <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>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
---------------------------
Sterding (Xianjun) Dong
PhD student, Boris Lenhard's group
Bergen Center of Computational Science
Bergen University, Norway
Mobile: 0047-47361688
Telephone: 0047-55276381
Skype: xianjun.dong
</pre>
</body>
</html>