1#! /usr/bin/perl -w
2
3
4use strict;
5
6use lib '../lib';
7use Bio::NEXUS;
8use Data::Dumper;
9
10my $file_1 = shift @ARGV;
11if ($file_1) {
12		#print "read $file, write, read again, compare object with original\n";
13    my $nexus_1 = new Bio::NEXUS($file_1, 0);
14	my $treesblock_1 = $nexus_1->get_block('trees');
15	#print Dumper $treesblock_1;
16
17# get trees, print out name and length for each
18foreach my $tree (@{$treesblock_1->get_trees}) {
19	printf( "%s\t%s\n", $tree->get_name, $tree->get_tree_length );
20	}
21}
22
23exit;
24