| 1 | #!/usr/bin/env perl | ||||||||||
| 2 | 16 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 16 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 16 | ▶ | use rlib '../lib'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 16 | ▶ | use v5.10; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 16 | ▶ | use Bio::BPWrapper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 16 | ▶ | use Bio::BPWrapper::TreeManipulations; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 16 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 16 | ▶ | use Getopt::Long qw( :config bundling permute no_getopt_compat ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 16 | ▶ | use Pod::Usage; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 16 | ▶ | use constant PROGRAM => File::Basename::basename(__FILE__); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | ####################### Option parsing ###################### | ||||||||||
| 15 | 16 | ▶ | pod2usage(1) if scalar(@ARGV) < 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 16 | my %opts; | |||||||||
| 17 | 16 | ▶ | GetOptions(\%opts, | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | "help|h", | ||||||||||
| 19 | "man", | ||||||||||
| 20 | "distance|d=s", | ||||||||||
| 21 | "input|i:s", | ||||||||||
| 22 | "length|l", | ||||||||||
| 23 | "numOTU|n", | ||||||||||
| 24 | "output|o:s", | ||||||||||
| 25 | "reroot|r=s", | ||||||||||
| 26 | "subset|s=s", | ||||||||||
| 27 | "otu|u", | ||||||||||
| 28 | "lca|A=s", | ||||||||||
| 29 | "labelnodes|B", | ||||||||||
| 30 | "distanceall|D", | ||||||||||
| 31 | "ltt|G=s", | ||||||||||
| 32 | "lengthall|L", | ||||||||||
| 33 | "random|M:i", | ||||||||||
| 34 | "depth|P=s", | ||||||||||
| 35 | "rmbl|R", | ||||||||||
| 36 | "allchildOTU|U=s", | ||||||||||
| 37 | "version|V", | ||||||||||
| 38 | "walk|W=s", | ||||||||||
| 39 | "multi2bi", | ||||||||||
| 40 | "cleanbr", | ||||||||||
| 41 | "cleanboot", | ||||||||||
| 42 | "delete-otus=s", | ||||||||||
| 43 | "sis-pairs", # pairwise OTU togetherness | ||||||||||
| 44 | "swap-otus=s", # output trees with each possible pairs (with the designated one) swapped | ||||||||||
| 45 | "ead", # edge-length abundance distribution; ODwyer et al. PNAS (2015) | ||||||||||
| 46 | "tree-shape", # for apTreeshape | ||||||||||
| 47 | # "bootclean|b:f", | ||||||||||
| 48 | # "collapse|c=s@", | ||||||||||
| 49 | # "getroot|g", | ||||||||||
| 50 | # "prune|p=s@", | ||||||||||
| 51 | # "compnames|x", | ||||||||||
| 52 | # "collabel|C:s", | ||||||||||
| 53 | # "tree2tableid|I:s", | ||||||||||
| 54 | # "joindata|J=s@", | ||||||||||
| 55 | # "rename|N", | ||||||||||
| 56 | # "tree2table|T", | ||||||||||
| 57 | # "comptrees|X", | ||||||||||
| 58 | ) or pod2usage(2); | ||||||||||
| 59 | |||||||||||
| 60 | 16 | ▶ | Bio::BPWrapper::print_version(PROGRAM) if $opts{"version"}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 61 | |||||||||||
| 62 | # Create a new BioTree object and initialize that. | ||||||||||
| 63 | 16 | unshift @ARGV, \%opts; | |||||||||
| 64 | 16 | initialize(@ARGV); | |||||||||
| 65 | 16 | write_out(\%opts); | |||||||||
| 66 | |||||||||||
| 67 | ################# POD Documentation ################## | ||||||||||
| 68 | __END__ | ||||||||||