[Bioperl-l] passing twice a codon MSA to codeml factory

Lorenzo Carretero Paulet locarpau at upvnet.upv.es
Wed Jun 29 14:23:40 UTC 2011


Hi,
I'm using what I think are the latest versions of both Bioperl (1.006901 
) and PAML (4.4). I didn't found the way of passing the same alignment 
object to the BioPerl codeml factory several times. I had to realign the 
sequences and create a new alignment object each time.
Cheers,
Lorenzo

  El 29/06/11 15:48, Chris Fields escribió:
> There was a lot of PAML refactoring done over the last several releases; wouldn't be surprised if there is some discordance between the BioPerl-supported version (I think the policy was only the latest PAML is supported in bioperl-live) and the one here.  Lorenzo, can you give us a bit more information on what versions of BioPerl and PAML you are using?
>
> chris
>
> On Jun 29, 2011, at 12:34 AM, Jason Stajich wrote:
>
>> Lorenzo -
>>
>> Did you ever find a workaround - I lost track of this bug and I still don't really have time to figure it out, maybe this is elevated one someone else's radar?
>>
>> When I did try to debug this I was not convinced this it is because you are re-using the codon_MSA object. I would have to go back to a simple code example that we can reproduce the error from to track this down.
>>
>> Usually the seqtype error is because codeml crashed and you can also print out the error string from the program and save the mlc out file to see what the errors were.
>>
>>
>>
>> On Jun 12, 2011, at 6:35 PM, Lorenzo Carretero wrote:
>>
>>> Hi,
>>>
>>> I'm trying to pass the same codon MSA several times to a sub which runs codeml with the parameters passed as arguments. However, the second time it is passed, the program stops with the error message:
>>>
>>> --------------------- WARNING ---------------------
>>> MSG: There was an error - see error_string for the program output
>>> ---------------------------------------------------
>>>
>>> ------------- EXCEPTION: Bio::Root::NotImplemented -------------
>>> MSG: Unknown format of PAML output did not see seqtype
>>> STACK: Error::throw
>>> STACK: Bio::Root::Root::throw /Library/Perl//5.10.0/Bio/Root/Root.pm:472
>>> STACK: Bio::Tools::Phylo::PAML::_parse_summary /Library/Perl//5.10.0/Bio/Tools/Phylo/PAML.pm:526
>>> STACK: Bio::Tools::Phylo::PAML::next_result /Library/Perl//5.10.0/Bio/Tools/Phylo/PAML.pm:271
>>> STACK: main::BranchSiteEvolAnalysis /Users/Lorenzo/Documents/workspace/PlantEvolGen/test.pl:364
>>> STACK: /Users/Lorenzo/Documents/workspace/PlantEvolGen/test.pl:233
>>>
>>> Here is just some partial code to illustrate what I'm saying:
>>>
>>> my $codon_MSA = Method_to_get_codonMSA ( $sequencesfilenameAA, $sequencesfilenameNT );
>>> ( $lnL, $omegas, $pamlrun ) = BranchSiteEvolAnalysis ( $codon_MSA,  2, $tree, 0, 0, 0, 8 );
>>> #The first time runs OK
>>> ( $lnL, $omegas, $pamlrun ) = BranchSiteEvolAnalysis ( $codon_MSA,  0, $tree, 0, 0, 0, 8 );
>>> #The second time crashes
>>> #Method to_run PAML with the codon_MSA, tree, and codeml parameters passed as arguments
>>> sub BranchSiteEvolAnalysis
>>> {
>>> my ( $codon_MSA, $model, $tree, $NSsites, $fix_omega, $omega, $ncatG ) = @_;
>>> .
>>> .
>>> .
>>> my $codeml_factory = new Bio::Tools::Run::Phylo::PAML::Codeml
>>>                        (
>>>                                -alignment =>  $codon_MSA,
>>>                                -tree =>     $biotree,
>>>                                -params =>      {
>>>                                        #'verbose' =>  0,
>>>                                        #'noisy' =>  9,
>>>                                        'runmode' =>  0, #user tree
>>>                                        'seqtype' =>  1,
>>>                                        'model' =>  $model,
>>>                                        'NSsites' =>  $NSsites,
>>>                                        'fix_omega' =>  $fix_omega,
>>>                                        'omega' =>  $omega,
>>>                                        'ncatG' =>  $ncatG,
>>>                                        #'icode' =>  0,
>>>                                        #'fix_alpha' =>  0,
>>>                                        #'fix_kappa' =>  0,
>>>                                        #'RateAncestor' =>  0,
>>>                                        'CodonFreq' =>  2,
>>>                                        'cleandata' =>  0, # remove sites with amibguity data (1 yes, 0 no),
>>>                                        'ndata' =>  2
>>>                                        },
>>>                        );
>>> .
>>> .
>>> .
>>> }
>>>
>>> I verified and the $codon_MSA ref point to the same location in memory before and after running the codeml_factory, so I guess it is not modified by the package in such a way that it couldn't be passed more than once. DO you know of any way to avoid redoing the $codon_MSA each time i want to pass it to the codeml_factory.
>>>
>>> Thank you very much,
>>>
>>> Lorenzo
>>>
>>>
>>>
>>> -- 
>>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>>> Lorenzo Carretero Paulet
>>> Institute for Plant Molecular and Cell Biology - IBMCP (CSIC-UPV)
>>> Integrative Systems Biology Group
>>> C/ Ingeniero Fausto Elio s/n.
>>> 46022 Valencia, Spain
>>>
>>> Phone:  +34 963879934
>>> Fax:    +34 963877859
>>> e-mail: locarpau at upvnet.upv.es
>>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l


-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Lorenzo Carretero Paulet
Institute for Plant Molecular and Cell Biology - IBMCP (CSIC-UPV)
Integrative Systems Biology Group
C/ Ingeniero Fausto Elio s/n.
46022 Valencia, Spain

Phone:  +34 963879934
Fax:    +34 963877859
e-mail: locarpau at upvnet.upv.es
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*




More information about the Bioperl-l mailing list