blib/script/consense_tree.pl untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 45 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/env perl
2  
3 use warnings;
4 use strict;
5  
6 use Data::Dumper;
7 use Carp;
8  
9 use 5.010;
10  
11 use Bio::Gonzales::Phylo::Util qw/consensus_tree/;
12  
13  
14 use Getopt::Long::Descriptive;
15  
16 my ($opt, $usage) = describe_options(
17 '%c %o <input_forest> <output_consensus_tree>',
18 [ 'fraction|f=f', "set bootstrap cutoff", {default => 0.5} ],
19 [ 'help', "print usage message and exit" ],
20 );
21  
22 print($usage->text), exit if $opt->help;
23  
24 my ($input, $output) = @ARGV;
25  
26 die "couldn't open $input" unless($input && -f $input);
27  
28 die "no output file" unless($output);
29  
30 consensus_tree($input, $output, $opt->fraction);