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

Lorenzo Carretero locarpau at upvnet.upv.es
Mon Jun 13 01:35:50 UTC 2011


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
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*




More information about the Bioperl-l mailing list