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

Annotation of /FigKernelScripts/insert_into_a_tree.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (view) (download) (as text)

1 : overbeek 1.1
2 : overbeek 1.2
3 : overbeek 1.1 use FIG;
4 :     use InsertIntoTree;
5 :     use strict;
6 :    
7 :     use gjoseqlib;
8 :     use gjonewicklib;
9 :    
10 : overbeek 1.2 my $usage = "usage: insert_into_a_tree [-c CheckPointFile] Alignment Tree [TreeProg] > new.tree\n";
11 :    
12 :     my $check_point = undef;
13 :     while ($ARGV[0] =~ /^-/)
14 :     {
15 :     my $flag = shift @ARGV;
16 :     if ( $flag =~ /^-c/ )
17 :     {
18 :     $check_point = shift @ARGV;
19 :     }
20 :     else
21 :     {
22 :     die "Error: invalid flag $flag\n$usage"
23 :     }
24 :     }
25 : overbeek 1.1
26 :     my($aliF,$treeF);
27 :     (
28 :     ($aliF = shift @ARGV) &&
29 :     ($treeF = shift @ARGV)
30 :     )
31 :     || die $usage;
32 :    
33 :     my $tree_prog = (@ARGV > 0) ? $ARGV[0] : undef;
34 :    
35 :     my $ali = &gjoseqlib::read_fasta($aliF);
36 :     my $tree = &gjonewicklib::parse_newick_tree_str(join("",`cat $treeF`));
37 :    
38 : overbeek 1.2 my $new_tree = &InsertIntoTree::update_old_tree_using_new_ali( align => $ali,
39 :     tree => $tree,
40 :     tree_prog => $tree_prog,
41 :     check_point => $check_point
42 :     );
43 : overbeek 1.1 &gjonewicklib::writeNewickTree($new_tree);
44 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3