[Bioperl-l] The results of your email commands

Kary Ann Del Carmen Soriano Ocana Kary at ioc.fiocruz.br
Tue Sep 19 13:23:56 EDT 2006


Dear all,
I need help with a consense module. I am using bioperl to run clustalw, seqboot, protdist(that are goingo to change by puzzle), weighbor and consense, but for some reason I get this message: 
    MESSAGE 1
    Can't call method "get_root_node" on an undefined value at /usr/local/bioperl-1.5.0/Bio/TreeIO/newick.pm line 236.
    MESSAGE 2
    ------------- EXCEPTION  -------------
    MSG: Expected a Bio::TreeI object
    STACK Bio::Tools::Run::Phylo::Phylip::Consense::_setinput /usr/local/bioperl-run-1.4/Bio/Tools/Run/Phylo/Phylip/Consense.pm:448
    STACK Bio::Tools::Run::Phylo::Phylip::Consense::run /usr/local/bioperl-run-1.4/Bio/Tools/Run/Phylo/Phylip/Consense.pm:331
    STACK main::makePhylogenyPipeline filogenia_pipeline.pl:120
    STACK main::main filogenia_pipeline.pl:61
    STACK toplevel filogenia_pipeline.pl:42
    --------------------------------------

    I have no idea where to get started to try to solve this. Here is my object with the principal reference.
    Thank you for the help.
    Regards
    Kary
    ################################################################################

    
    #!/usr/bin/perl -w  
    use lib "/usr/local/bioperl-1.5.0";
    use lib "/usr/local/bioperl-run-1.4";
    use Bio::Tools::Run::Alignment::Clustalw;
    use Bio::Tools::Run::Phylo::Phylip::SeqBoot;
    use Bio::Tools::Run::Phylo::Phylip::ProtDist;
    use Bio::Tools::Run::Phylo::Phylip::Neighbor;
    use Bio::Tools::Run::AnalysisFactory::Pise;
    use Bio::Tools::Run::Phylo::Phylip::Consense;
    use Bio::Tools::Run::Phylo::Phylip::DrawTree;
    use Bio::AlignIO;
    use Bio::SimpleAlign;
    use strict;
    
    ################## dir #########################
    
    sub makePhylogenyPipeline{
      my $dirin_mafft	= $_[0]; 
      my $length_weighbor	= $_[1];				
      my $inputfilename	= "";
    
      &makeInvariantAwk($length_weighbor); 
    
      open (READDIRMOD, "find $dirin_mafft |") or die "Cannot open $dirin_mafft: $!";
      
      while ($inputfilename = <READDIRMOD>){ 
        for ($inputfilename =~ /\.mafft$/) {
          $inputfilename =~ s/\n//;     
    #Create a SimpleAlign object
          my @params_align = (	'ktuple' => 2, 
      				'matrix' => 'BLOSUM',
    				'output' => 'PHYLIP',
    				'outfile' => $inputfilename.'.phy');
    
           my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params_align);
           my $aln = $factory->align($inputfilename); 			# $aln is a SimpleAlign object.
    
    #Use seqboot to generate bootstrap alignments
      my @params = (	'datatype'=>'SEQUENCE',
    #			'replicates'=>1000);
    			'replicates'=>1);
      my $seqboot_factory = Bio::Tools::Run::Phylo::Phylip::SeqBoot->new(@params);
      my $aln_ref = $seqboot_factory->run($aln);
    
    #next build distance matrices 
      my @params_protdist = ('MODEL' => 'PAM');
      my $protdist_factory = Bio::Tools::Run::Phylo::Phylip::ProtDist->new(@params_protdist);
    
    #next construct trees
      #Build a Pise factory
      my $weighbor_factory = new Bio::Tools::Run::AnalysisFactory::Pise();  
    
      #Then create an application object (Pise::Run::Tools::PiseApplication):
      my $weighbor = $weighbor_factory->program('weighbor');
    
      my @tree;
    
      foreach my $a (@{$aln_ref}){
        my $matrix = $protdist_factory->create_distance_matrix($a);
        push @tree, $weighbor->run('infile' => $matrix,
    			       'length' => 500,			
     			       'size'   => 3.85);		# Size of the alphabet (-b)
      
      }       
    
    #use consense to get a final tree
      my $consense_factory = Bio::Tools::Run::Phylo::Phylip::Consense->new();
      my ($tree) = $consense_factory->run(\@tree);
      
    #now draw the tree
      my $draw_factory = Bio::Tools::Run::Phylo::Phylip::DrawTree->new();
      my $image_filename = $draw_factory->draw_tree($tree);
    
        }    
      }
      close (READDIRMOD);
    
    
    
    }
    
    
    
    
    





-------------- next part --------------
An embedded message was scrubbed...
From: "Kary Ann Del Carmen Soriano Ocana" <Kary at ioc.fiocruz.br>
Subject: Help with consense module
Date: Mon, 18 Sep 2006 15:29:59 -0300
Size: 4639
Url: http://lists.open-bio.org/pipermail/bioperl-l/attachments/20060919/00b28bb7/attachment-0001.mht 


More information about the Bioperl-l mailing list