[Bioperl-l] Phlip

Jonathan Manning bmb9jrm at bmb.leeds.ac.uk
Sat Jun 26 07:10:01 EDT 2004


Hi Jason,

Thanks for the reply. Have tried your suggestion, and got a list of
zeros. However, I've solved the problem by adjusting the parameters-
don't think the examples were good for my sequences!

Thanks,

JOn

On Fri, 2004-06-25 at 18:16, Jason Stajich wrote:
> So you are getting a tree back though when you pass in the matrix
> properly? Isn't possible total_branch_length is failing - what happens
> when you do this?
> 
> for my $node ( $tree->get_leaf_nodes ) {
>  print $node->id, " ", $node->branch_length, "\n";
> }
> 
> -jason
> 
> On Fri, 25 Jun 2004, Jonathan Manning wrote:
> 
> > Hi all,
> >
> > Was hoping Jason or someone else could nudge me in the right direction
> > with Phylip. I was having trouble with the suite and tree drawing, and
> > think I've narrowed it down to Neighbour, since the output tree has 0
> > 'total branch length'. I believe Protdist is creating the matrix
> > correctly, since get_column returns a sensible-looking list of values.
> > My snippet of code is:
> >
> > my ($matrix)   = $protdist->run($alnmnt);
> > 		print "Number of rows in matrix: ", $matrix->num_rows(), "\n";
> >         my @n_params = (
> >             'type'     => 'NJ',
> >             'outgroup' => 2,
> >             'lowtri'   => 1,
> >             'upptri'   => 1,
> >             'subrep'   => 1
> >         );
> >         my $neighbor =
> > Bio::Tools::Run::Phylo::Phylip::Neighbor->new(@n_params);
> >         my ($tree)   = $neighbor->run($matrix);
> > 		print $tree, "\n";
> > 		print "Total branch length: ", $tree->total_branch_length(), "\n";
> >
> >
> > The documentation actually states that a matrix argument should be a
> > hash reference, but if I create a reference and pass it in like:
> >
> > my $matrixref = \$matrix;
> >
> > I just get this message:
> >
> > Can't call method "isa" on unblessed reference at
> > /usr/lib/perl5/site_perl/5.8.3/Bio/Tools/Run/Phylo/Phylip/Neighbor.pm
> > line 458.
> >
> >
> > Would be very grateful for any help anyone could offer!
> >
> > Jon
> >
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> 
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 



More information about the Bioperl-l mailing list