[From nobody Tue Sep 19 18:16:55 2006 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_003_01C6DB54.8DD63780" X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: Help with consense module Date: Mon, 18 Sep 2006 15:29:59 -0300 Message-ID: <29AC1A3F62AAF54BA71E367C6D62CEB096C4F8@alpha.ioc.fiocruz.br> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: confirm 9e68c570c38fde39e9fed0e1e7974923b77a093a Thread-Index: AcbIafwn9SDHERDYTNeuIww58QclvwS5AgIo From: "Kary Ann Del Carmen Soriano Ocana" <Kary@ioc.fiocruz.br> To: <bioperl-l-request@lists.open-bio.org> This is a multi-part message in MIME format. ------_=_NextPart_003_01C6DB54.8DD63780 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I need help with a consense module. I am using bioperl to run clustalw, seq= boot, protdist(that are goingo to change by puzzle), weighbor and consense,= but for some reason I get this message:=20 MESSAGE 1 Can't call method "get_root_node" on an undefined value at /usr/local/biope= rl-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/bioper= l-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=20=20 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 =3D $_[0];=20 my $length_weighbor =3D $_[1];=09=09=09=09 my $inputfilename =3D ""; &makeInvariantAwk($length_weighbor);=20 open (READDIRMOD, "find $dirin_mafft |") or die "Cannot open $dirin_mafft= : $!"; =20=20 while ($inputfilename =3D <READDIRMOD>){=20 for ($inputfilename =3D~ /\.mafft$/) { $inputfilename =3D~ s/\n//;=20=20=20=20=20 #Create a SimpleAlign object my @params_align =3D ( 'ktuple' =3D> 2,=20 'matrix' =3D> 'BLOSUM', 'output' =3D> 'PHYLIP', 'outfile' =3D> $inputfilename.'.phy'); my $factory =3D Bio::Tools::Run::Alignment::Clustalw->new(@params_al= ign); my $aln =3D $factory->align($inputfilename); # $aln is a SimpleAl= ign object. #Use seqboot to generate bootstrap alignments my @params =3D ( 'datatype'=3D>'SEQUENCE', # 'replicates'=3D>1000); 'replicates'=3D>1); my $seqboot_factory =3D Bio::Tools::Run::Phylo::Phylip::SeqBoot->new(@par= ams); my $aln_ref =3D $seqboot_factory->run($aln); #next build distance matrices=20 my @params_protdist =3D ('MODEL' =3D> 'PAM'); my $protdist_factory =3D Bio::Tools::Run::Phylo::Phylip::ProtDist->new(@p= arams_protdist); #next construct trees #Build a Pise factory my $weighbor_factory =3D new Bio::Tools::Run::AnalysisFactory::Pise();=20= =20 #Then create an application object (Pise::Run::Tools::PiseApplication): my $weighbor =3D $weighbor_factory->program('weighbor'); my @tree; foreach my $a (@{$aln_ref}){ my $matrix =3D $protdist_factory->create_distance_matrix($a); push @tree, $weighbor->run('infile' =3D> $matrix, 'length' =3D> 500,=09=09=09 'size' =3D> 3.85); # Size of the alphabet (-b) =20=20 }=20=20=20=20=20=20=20 #use consense to get a final tree my $consense_factory =3D Bio::Tools::Run::Phylo::Phylip::Consense->new(); my ($tree) =3D $consense_factory->run(\@tree); =20=20 #now draw the tree my $draw_factory =3D Bio::Tools::Run::Phylo::Phylip::DrawTree->new(); my $image_filename =3D $draw_factory->draw_tree($tree); }=20=20=20=20 } close (READDIRMOD); } ------_=_NextPart_003_01C6DB54.8DD63780-- ]