File Coverage

bin/biotree
Criterion Covered Total %
statement 36 36 100.0
branch 3 6 50.0
condition n/a
subroutine 10 10 100.0
pod n/a
total 49 52 94.2


line stmt bran cond sub pod time code
1             #!/usr/bin/env perl
2 15     15   76086 use strict;
  15         30  
  15         602  
3 15     15   71 use warnings;
  15         23  
  15         1101  
4 15     15   190 use v5.10;
  15         51  
5              
6 15     15   13704 use Path::Tiny;
  15         272435  
  15         1751  
7 15     15   9107 use lib path($0)->absolute->parent->sibling('lib')->stringify;
  15         11636  
  15         71  
8 15     15   16678 use Pod::Usage;
  15         1227594  
  15         4804  
9 15     15   13143 use Getopt::Long qw( :config bundling permute no_getopt_compat );
  15         213026  
  15         118  
10              
11 15     15   12561 use Bio::BPWrapper;
  15         46  
  15         551  
12 15     15   10214 use Bio::BPWrapper::TreeManipulations;
  15         144  
  15         2101  
13              
14 15     15   134 use constant PROGRAM => File::Basename::basename(__FILE__);
  15         35  
  15         1604720  
15              
16             ####################### Option parsing ######################
17 15 50       1283034 pod2usage(1) if scalar(@ARGV) < 1;
18 15         97 my %opts;
19 15 50       202 GetOptions(\%opts,
20             "help|h",
21             "man",
22             "version|V",
23             "as-text|t", # for preview text tree
24             "ci|c=s", # attach binary trait table
25             "clean-br|b",
26             "clean-boot|B",
27             "cut-tree=f", # cut tree to identify groups
28             "cut-sis=i", # identify sister node with fewer than i descendants
29             "del-otus|d=s",
30             "del-low-boot|D=f",
31             "del-short-br|E=f",
32             "depth=s",
33             "dist=s",
34             "dist-all",
35             "ead", # edge-length abundance distribution; O'Dwyer et al. PNAS (2015)
36             "input|i=s",
37             "ids-all",
38             "label-nodes",
39             "label-selected-nodes=s", # based on a file
40             "lca=s",
41             "length|l",
42             "length-all|L",
43             "ltt=s",
44             "mid-point|m",
45             "multi2bi",
46             "otus-all|u",
47             "otus-desc|U:s",
48             "otus-num|n",
49             "output|o=s",
50             "random=i",
51             "ref=s", # specify reference OTU (move to top)
52             "rename-tips=s",
53             "reroot|r=s",
54             "rotate-node=s", # rotate around an internal node (give node id)
55             "sis-pairs", # pairwise OTU togetherness
56             # "sort-child=s", # sort child by height (default) or others (to make output tree consistent)
57             "subset|s=s",
58             "swap-otus=s", # ??
59             "tips-to-root",
60             "tree-shape", # for apTreeshape package
61             "trim-tips=f",
62             "walk|w=s",
63             "walk-edge=s",
64             # "rmbl|R",
65             # "bootclean|b:f",
66             # "collapse|c=s@",
67             # "getroot|g",
68             # "prune|p=s@",
69             # "compnames|x",
70             # "collabel|C:s",
71             # "tree2tableid|I:s",
72             # "joindata|J=s@",
73             # "rename|N",
74             # "tree2table|T",
75             # "comptrees|X",
76             ) or pod2usage(2);
77              
78 15 50       62468 Bio::BPWrapper::print_version(PROGRAM) if $opts{"version"};
79              
80             # Create a new BioTree object and initialize that.
81 15         48 unshift @ARGV, \%opts;
82 15         119 initialize(@ARGV);
83 15         246 write_out(\%opts);
84              
85             ################# POD Documentation ##################
86             __END__