NAME
age2bl.pl - converts node ages to branch lengths.
SYNOPSIS
DESCRIPTION
The age2bl program takes a newick tree with labelled nodes, such as ((A,B)n1,C)n2;
, and a tab-delimited 'age file', a text file that lists for all labelled nodes their ages, i.e. distance from present. The first token on each line should be the node name, the next token the node's age:
n1 1
n2 2
The program then traverses the tree and calculates what the branch lengths on the tree should be. With the input shown here, the output would be as follows: (C:2,(B:1,A:1)n1:1)n2:0;
, i.e. an ultrametric tree where the path lengths work out to the ages provided in the input.
I (RVOSA) initially wrote this script because I was using ape (http://cran.r-project.org/src/contrib/Descriptions/ape.html) in which some analyses produce a list of node ages, and I wanted branch lengths. It is now provided as part of Bio::Phylo to showcase how to traverse and manipulate trees using the Bio::Phylo API.
OPTIONS AND ARGUMENTS
- -treefile <tree file>
-
A text file containing at least one newick formatted tree description (first tree is used).
- -agefile <age file>
-
A file containing a table with node ages.
- -h|-help|-?
-
Print help message and quit.
- -man
-
Print manual page and quit.
FILES
The program requires a valid newick-formatted tree file and a file containing node ages, formatted as described above.
SEE ALSO
Rutger Vos: http://search.cpan.org/~rvosa, Bio::Phylo