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

View of /FigKernelScripts/insert_into_a_tree.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Fri Dec 15 00:53:03 2006 UTC (13 years, 6 months ago) by overbeek
Branch: MAIN
Changes since 1.2: +0 -25 lines
remove crud from start of insert_into_tree.pl


use FIG;
use InsertIntoTree;
use strict;

use gjoseqlib;
use gjonewicklib;

my $usage = "usage: insert_into_a_tree [-c CheckPointFile] Alignment Tree [TreeProg] > new.tree\n";

my $check_point = undef;
while ($ARGV[0] =~ /^-/)
{
    my $flag = shift @ARGV;
    if ( $flag =~ /^-c/ )
    {
	$check_point = shift @ARGV;
    }
    else
    {
        die "Error: invalid flag $flag\n$usage"
    }
}

my($aliF,$treeF);
(
 ($aliF  = shift @ARGV) &&
 ($treeF = shift @ARGV)
)
    || die $usage;

my $tree_prog = (@ARGV > 0) ? $ARGV[0] : undef;

my $ali  = &gjoseqlib::read_fasta($aliF);
my $tree = &gjonewicklib::parse_newick_tree_str(join("",`cat $treeF`));

my $new_tree = &InsertIntoTree::update_old_tree_using_new_ali( align => $ali,
                                                               tree => $tree,
                                                               tree_prog => $tree_prog,
                                                               check_point => $check_point
                                                             );
&gjonewicklib::writeNewickTree($new_tree);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3