#!/usr/bin/perl -w ################################################################## # # File: TreePhyNex.pl # # Input: A phylip-foramtted treefile # Output: standalone nexus-fromat # # Usage: perl TreePhyNex.pl infile.PHYLIP > outfile.nex # # Author(s): Jun Inoue inoue@scs.fsu.edu # # Change History: # 11/6/07 # ################################################################## if(! open F, "<$ARGV[0]") { die "Can't open $ARGV[0]"; } print "#nexus\n\nbegin trees;\n\n"; while($line = ) { if($line =~ m/(^\(.*$)/i){ $tree = $1; print "tree mytree = $tree \n"; } } print "\nend;\n"; close F;