[Bioperl-l] The results of your email commands
Chris Fields
cjfields at uiuc.edu
Wed Sep 20 14:52:28 UTC 2006
It looks like no tree object is used as input for TreeIO::newick, which
Phylo::Consense apparently needs (makes sense, as the command-line version
also needs this). Strange that there isn't an error thrown, but you're
using an older version of bioperl, so it may be fixed (I noticed that the
line the error corresponds to for my local CVS copy of bioperl doesn't match
up, so changes were obviously made at some point).
This could occur at pretty much any step along your pipeline. Have you
tried checking the output data from each step to make sure it's working
correctly?
I also noticed you have differing versions of Bioperl (1.5.0) and
bioperl-run (1.4). You should always try to maintain the same versions for
both to make sure they are compatible with one another.
Christopher Fields
Postdoctoral Researcher - Switzer Lab
Dept. of Biochemistry
University of Illinois Urbana-Champaign
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Kary Ann Del Carmen Soriano Ocana
> Sent: Tuesday, September 19, 2006 12:24 PM
> To: bioperl-l at lists.open-bio.org
> Cc: karyanna at yahoo.com
> Subject: [Bioperl-l] The results of your email commands
>
> 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);
>
>
>
> }
>
>
>
>
>
>
>
>
>
More information about the Bioperl-l
mailing list