[Bioperl-l] Bio::Matrix::PhylipDist

Jason Stajich jason at cgt.mc.duke.edu
Tue Apr 29 19:50:31 EDT 2003


I would do it this way which is what the synopsis code should look like
(on latest live code I think it does)

my $matparse = Bio::Tools::Phylo::Phylip::ProtDist->new(-file => $matfile);
$matrix = $matparse->next_matrix;

Bio::Matrix::PhylipDist is the matrix object -
Bio::Tools::Phylo::Phylip::ProtDist is the matix parser which creates the
matrix objects.

The error codes and initialization information need to be fixed/updated in
the Matrix::PhylipDist object so this won't be so confusing but I think
the SYNOPSIS gets it right.  Sorry for the confusion - Shawn and I
rengineered things after his first go around on the objects/parser.

-jason

On Tue, 29 Apr 2003, Jack Chen wrote:

> Hi Jason and all,
>
> Have tried to use this module but got stuck the the message:
> ==============================================================
> ------------- EXCEPTION  -------------
> MSG: Need a file or file handle!
> STACK Bio::Matrix::PhylipDist::new
> /usr/lib/perl5/site_perl/5.6.0/Bio/Matrix/PhylipDist.pm:116
>
> ==============================================================
> My code is basically copied from the synopsis:
>
> #!/usr/bin/perl -w
> use strict;
> use lib "/a/blue2/home/BioPipe/bioperl-live/";
>
> use Bio::Tools::Phylo::Phylip::ProtDist;
> use Bio::Matrix::PhylipDist;
>
> my $dist = Bio::Matrix::PhylipDist->new( -file => "outfine",
>                                          -program =>"ProtDist");
>
> #my $dist =
> Bio::Matrix::PhylipDist->new(-fh=>"temp",-program=>"ProtDist");
>
> #get specific entries
> my $distance_value = $dist->get_entry('CBG04330','T19D12.8');
> #my @columns        = $dist->get_column('ALPHA');
> #my @rows           = $dist->get_row('BETA');
> #my @diagonal       = $dist->get_diagonal();
>
> #print the matrix in phylip numerical format
> #print $dist->print_matrix;
>
> print $distance_value, "\n";
>
> Anything I am not aware of?
>
> Thanks,
>
> Jack
>
> +-----O----------------------------------------+
> |    o-o     Jack Chen, Stein Laboratory       |
> |    o---o   Cold Spring Harbor Laboratory     |
> |  o----o    1 Bungtown Road                   |
> | O----O     Cold Spring Harbor, NY, 11724     |
> | 0--o       Tel: 1 516 367 8394               |
> |   O        Website: http://www.wormbase.org  |
> |  o-o       e-mail: chenn at cshl.org            |
> +-o---o----------------------------------------+
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list