Bio::NEXUS::TreesBlock

Bio::NEXUS::TreesBlock is a Perl module that represents TREES block of a NEXUS file.
Download

Bio::NEXUS::TreesBlock Ranking & Summary

Advertisement

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

Bio::NEXUS::TreesBlock Tags


Bio::NEXUS::TreesBlock Description

Bio::NEXUS::TreesBlock is a Perl module that represents TREES block of a NEXUS file. Bio::NEXUS::TreesBlock is a Perl module that represents TREES block of a NEXUS file.SYNOPSIS if ( $type =~ /trees/i ) { $block_object = new Bio::NEXUS::TreesBlock( $block_type, $block, $verbose ); }If a NEXUS block is a Trees Block, this module parses the block and stores the tree data.METHODSnew Title : new Usage : block_object = new Bio::NEXUS::TreesBlock($block_type, $commands, $verbose ); Function: Creates a new Bio::NEXUS::TreesBlock object and automatically reads the file Returns : Bio::NEXUS::TreesBlock object Args : type (string), the commands/comments to parse (array ref), and a verbose flag (0 or 1; optional)clone Title : clone Usage : my $newblock = $block->clone(); Function: clone a block object (shallow) Returns : Block object Args : noneset_trees Title : set_trees Usage : $block->set_trees($trees); Function: Sets the list of trees (Bio::NEXUS::Tree objects) Returns : none Args : ref to array of Bio::NEXUS::Tree objectsadd_tree Title : add_tree Usage : $block->add_tree($tree); Function: Add trees (Bio::NEXUS::Tree object) Returns : none Args : a Bio::NEXUS::Tree objectadd_tree_from_newick Title : add_tree_from_newick Usage : $block->add_tree_from_newick($newick_tree, $tree_name); Function: Add a tree (Bio::NEXUS::Tree object) Returns : none Args : a tree string in newick format and a name for the tree (scalars)get_trees Title : get_trees Usage : $block->get_trees(); Function: Gets the list of trees (Bio::NEXUS::Tree objects) and returns it Returns : ref to array of Bio::NEXUS::Tree objects Args : noneget_tree Title : get_tree Usage : $block->get_tree($treename); Function: Gets the first tree (Bio::NEXUS::Tree object) that matches the name given or the first tree if $treename is not specified. If no tree matches, returns undef. Returns : a Bio::NEXUS::Tree object Args : tree name or noneset_translate Title : set_translate Usage : $block->set_translate($translate); Function: Sets the hash of translates for nodes names Returns : none Args : hash of translatestranslate Title : translate Usage : $self->translate($num); Function: Translates a number with its associated name. Returns : integer or string Args : integer Method : Returns the name associated with that number's translated name. If it can't find an association, returns the number.reroot_tree Title : reroot_tree Usage : $block->reroot_tree($outgroup,$root_position, $treename); Function: Reroot a tree using an OTU as new outgroup. Returns : none Args : outgroup name, the distance before the root position and tree namereroot_all_trees Title : reroot_all_trees Usage : $block->reroot_all_trees($outgroup, $root_position); Function: Reroot all the trees in the treesblock tree. use an OTU as new outgroup Returns : none Args : outgroup name and root position rename_otus Title : rename_otus Usage : $block->rename_otus(%translation); Function: Renames nodes based on a translation hash Returns : none Args : hash containing translation (e.g., { old_name => new_name} ) Comments: nodes not included in translation hash are unaffectedselect_otus Name : select_otus Usage : $nexus->select_otus(@otunames); Function: select a subset of OTUs Returns : a new nexus object Args : a ref to array of OTU namesselect_tree Name : select_tree Usage : $nexus->select_tree($treename); Function: select a tree Returns : a new nexus object Args : a tree nameselect_subtree Name : select_subtree Usage : $nexus->select_subtree($inodename); Function: select a subtree Returns : a new nexus object Args : an internal node name for subtree to be selectedexclude_subtree Name : exclude_subtree Usage : $nexus->exclude_subtree($inodename); Function: remove a subtree Returns : a new nexus object Args : an internal node for subtree to be removedequals Name : equals Usage : $nexus->equals($another); Function: compare if two NEXUS objects are equal Returns : boolean Args : a NEXUS object Requirements: · Perl


Bio::NEXUS::TreesBlock Related Software