[Bioperl-l] Parsing PAML mlc files

Lorenzo Carretero Paulet locarpau at upvnet.upv.es
Thu Sep 1 10:49:06 EDT 2011


Hi all,
I'm trying to parse mlc output files from PAML using Bio::Tools::Phylo::PAML as:

my $mlcfile = "/Applications/Bioinformatics/paml44/bin/mlc";
my $parserF = Bio::Tools::Phylo::PAML->new (-file =>$mclfile);
if ( my $paml_result = $parserF->next_result )
{
say Dumper $paml_result; #Prints Ok
	for ( my $model_result= $paml_result->get_NSSite_results )
	{
        #say Dumper $model_result; #Prints nothing
        $ns_string = "model ".$model_result->model_num."\n
".$model_result->model_description()."\n ".$model_result->time_used."\n";
	$dnds_site_classes = $model_result->dnds_site_classes; #a hashref
	#say Dumper $dnds_site_classes;
	for my $sites ( $model_result->get_BEB_pos_selected_sites )
        ...
         ...
          ...

The Bio::Tools::Phylo::PAML::Result object is ok, as I can print it using
DUmper. In contrast, it seems that the Bio::Tools::Phylo::PAML::ModelResult
object is not being properly instantiated, as I get the error message:

"Can't call method "model_num" without a package or object reference at ..."

What am I missing?
Best,
Lorenzo




More information about the Bioperl-l mailing list