[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.1 - (download) (as text) (annotate)
Fri Dec 15 00:09:52 2006 UTC (13 years, 6 months ago) by overbeek
Branch: MAIN
add ability to insert sequences into a tree

#!/usr/bin/env /Volumes/seagate/FIGdisk/env/mac/bin/perl

BEGIN {
    @INC = qw(
              /Volumes/seagate/FIGdisk/dist/releases/ross/mac/lib
              /Volumes/seagate/FIGdisk/dist/releases/ross/mac/lib/FigKernelPackages
              /Volumes/seagate/FIGdisk/dist/ross/mac/lib
              /Volumes/seagate/FIGdisk/dist/ross/mac/lib/FigKernelPackages
              /Volumes/seagate/FIGdisk/env/mac/lib/perl5/5.8.7/darwin-2level
              /Volumes/seagate/FIGdisk/env/mac/lib/perl5/5.8.7
              /Volumes/seagate/FIGdisk/env/mac/lib/perl5/site_perl/5.8.7/darwin-2level
              /Volumes/seagate/FIGdisk/env/mac/lib/perl5/site_perl/5.8.7
              /Volumes/seagate/FIGdisk/env/mac/lib/perl5/site_perl
              .
              /Volumes/seagate/FIGdisk/config
 
);
}
use Data::Dumper;
use Carp;
use FIG_Config;
$ENV{'BLASTMAT'} = "/Volumes/seagate/FIGdisk/BLASTMAT";
$ENV{'FIG_HOME'} = "/Volumes/seagate/FIGdisk";
# end of tool_hdr
########################################################################

use FIG;
use InsertIntoTree;
use strict;

use gjoseqlib;
use gjonewicklib;

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

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($ali,$tree,$tree_prog);
&gjonewicklib::writeNewickTree($new_tree);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3