NAME
Bio::Gonzales::Phylo::Util - utility functions for phylogenetic analysis
SYNOPSIS
use Bio::Gonzales::Phylo::Util qw(leaf_mapper consensus_tree);
DESCRIPTION
SUBROUTINES
- $map_iterator = leaf_mapper($code_ref // $pattern_or_map // '%s09d')
-
Example for a code reference:
my $map; my $handler = sub { my ($id) = @_; return $map->{$id} // $id . '.NA'; }; my $map_iterator = leaf_mapper($handler); my $mapped_tree = $map_iterator->($tree);
The iterator takes a Bio::Phylo::Forest::Tree object and remaps it. The mapping takes place directly on the tree, thus alters it.
- consensus_tree($input_trees_file, $consensus_tree_file)
-
Parses the
$input_tree_file
, builds a consensus tree and writes it to$consensus_tree_file
.
SEE ALSO
AUTHOR
jw bargsten, <joachim.bargsten at wur.nl>