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

Jason Stajich jason.stajich at gmail.com
Wed Jun 29 05:34:16 UTC 2011


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





More information about the Bioperl-l mailing list