Bio::NEXUS::DistancesBlock

Bio::NEXUS::DistancesBlock is a Perl module that represents DISTANCES block in NEXUS file.
Download

Bio::NEXUS::DistancesBlock Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Tom Hladish
  • Publisher web site:
  • http://search.cpan.org/~tjhladish/Bio-NEXUS-0.67/lib/Bio/NEXUS/DistancesBlock.pm

Bio::NEXUS::DistancesBlock Tags


Bio::NEXUS::DistancesBlock Description

Bio::NEXUS::DistancesBlock is a Perl module that represents DISTANCES block in NEXUS file. Bio::NEXUS::DistancesBlock is a Perl module that represents DISTANCES block in NEXUS file.The DistancesBlock class represents a NEXUS Distances Block and provides methods for reading, writing, and accessing data within these blocks. Distances Blocks contain distance matrices, or a table of calculated distances between each possible pair of taxa.METHODSnew Title : new Usage : block_object = new Bio::NEXUS::DistancesBlock($block_type, $commands, $verbose, $taxa); Function: Creates a new Bio::NEXUS::DistancesBlock object Returns : Bio::NEXUS::DistancesBlock object Args : type (string), the commands/comments to parse (array ref), and a verbose flag (0 or 1)get_matrix Title : get_matrix Usage : $matrix = $self->get_matrix(); Function: Retrieves the entire distance matrix Returns : a hashref of hashrefs Args : none Note : Distance values may be retrieved by specifying the row and column keys, e.g. $dist = $matrix->{$row_taxon}{$col_taxon}get_distances_for Title : get_distances_for Usage : %taxon1_distances = %{ $self->get_distances_for($first_taxon) }; Function: Retrieves a row of the distance matrix Returns : Args : the row label (a taxlabel) for the row desired (string)get_distance_between Title : get_distance_between Usage : $distance = $self->get_distance_between($row_taxon, $column_taxon); Function: Retrieves a cell from the matrix Returns : A scalar (number) Args : the row and column labels (both taxa) for the cell desired Note : Generally get_distance_between($A, $B) == get_distance_between($B, $A); however, this need not be true if the distance matrix is not symmetric. Make sure you are asking for the distance you want. Requirements: · Perl


Bio::NEXUS::DistancesBlock Related Software