[Bio] / FigKernelScripts / root_at_midpoint.pl Repository:
ViewVC logotype

View of /FigKernelScripts/root_at_midpoint.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Tue Nov 11 14:29:39 2014 UTC (5 years ago) by overbeek
Branch: MAIN
CVS Tags: HEAD
root a tree at the midpoint

#
# Copyright (c) 2003-2006 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
#
# This file is part of the SEED Toolkit.
# 
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License. 
#
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.
#

# usage:  root_at_midpoint < tree > rooted
use tree_utilities;
use Carp;

@tree = <STDIN>;
($tree = &uproot(&parse_newick_tree(join("",@tree))))
    || die "could not parse the tree";
$tabsP = &tree_index_tables($tree);

$tree1 = &root_at_midpoint($tree,$tabsP);
$new_tree = &to_newick($tree1);
print "$new_tree\n";


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3