<!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). <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> $bml->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, 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->{'_stats'}->{'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> my $bml = Bio::Tools::Run::Phylo::PAML::Baseml->new(<br>
-params => { 'runmode' =>2,<br>
'model'=>7,<br>
'verbose'=>0},<br>
-save_tempfile =>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>; </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>-><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>-><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>