line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Wrapper; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
16994
|
use Moose; |
|
1
|
|
|
|
|
449988
|
|
|
1
|
|
|
|
|
11
|
|
4
|
1
|
|
|
1
|
|
9757
|
use File::Find::Rule; |
|
1
|
|
|
|
|
9141
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
45
|
use File::Basename; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
107
|
|
6
|
1
|
|
|
1
|
|
6
|
use File::Path qw(make_path remove_tree); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
77
|
|
7
|
1
|
|
|
1
|
|
6
|
use File::Find::Rule; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
8
|
1
|
|
|
1
|
|
47
|
use Cwd; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
419
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'MooseX::Getopt::Usage'; |
11
|
|
|
|
|
|
|
with 'MooseX::Getopt::Usage::Role::Man'; |
12
|
|
|
|
|
|
|
with 'MooseX::SimpleConfig'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '1.4'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# For pretty man pages! |
17
|
|
|
|
|
|
|
$ENV{TERM}='xterm-256color'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 BioX::Wrapper |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Base class for BioX::Wrapper |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 Wrapper Options |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head3 example.yml |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
--- |
30
|
|
|
|
|
|
|
indir: "/path/to/files" |
31
|
|
|
|
|
|
|
outdir: "path/to/testdir" |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has '+configfile' => ( |
36
|
|
|
|
|
|
|
required => 0, |
37
|
|
|
|
|
|
|
documentation => q{ |
38
|
|
|
|
|
|
|
If you get tired of putting all your options on the command line create a config file instead. |
39
|
|
|
|
|
|
|
--- |
40
|
|
|
|
|
|
|
indir: "/path/to/files" |
41
|
|
|
|
|
|
|
outdir: "path/to/testdir" |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 print_opts |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Print out the command line options |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub print_opts { |
52
|
0
|
|
|
0
|
|
|
my($self) = @_; |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
print "#######################################################################\n"; |
55
|
0
|
|
|
|
|
|
print "# This file was generated with the following options\n"; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
for(my $x=0; $x<=$#ARGV; $x++){ |
58
|
0
|
0
|
|
|
|
|
next unless $ARGV[$x]; |
59
|
0
|
|
|
|
|
|
print "#\t$ARGV[$x]\t"; |
60
|
0
|
0
|
|
|
|
|
if($ARGV[$x+1]){ |
61
|
0
|
|
|
|
|
|
print $ARGV[$x+1]; |
62
|
|
|
|
|
|
|
} |
63
|
0
|
|
|
|
|
|
print "\n"; |
64
|
0
|
|
|
|
|
|
$x++; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
print "#######################################################################\n\n"; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head3 indir |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
A path to your vcf files can be given, and using File::Find::Rule it will recursively search for vcf or vcf.gz |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
has 'indir' => ( |
77
|
|
|
|
|
|
|
is => 'rw', |
78
|
|
|
|
|
|
|
isa => 'Str|Undef', |
79
|
|
|
|
|
|
|
required => 0, |
80
|
|
|
|
|
|
|
); |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head3 outdir |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Path to write out annotation files. It creates the structure |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
outdir |
87
|
|
|
|
|
|
|
--annovar_interim |
88
|
|
|
|
|
|
|
--annovar_final |
89
|
|
|
|
|
|
|
--vcf-annotate_interim #If you choose to reannotate VCF file |
90
|
|
|
|
|
|
|
--vcf-annotate_final #If you choose to reannotate VCF file |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
A lot of interim files are created by annovar, and the only one that really matters unless you debugging a new database is the multianno file found in annovar_final |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
If not given the outdirectory is assumed to be the current working directory. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
has 'outdir' => ( |
99
|
|
|
|
|
|
|
is => 'rw', |
100
|
|
|
|
|
|
|
isa => 'Str', |
101
|
|
|
|
|
|
|
required => 1, |
102
|
|
|
|
|
|
|
default => sub { return getcwd() }, |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
106
|
|
|
|
|
|
|
__END__ |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=encoding utf-8 |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 NAME |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
BioX::Wrapper - Base class for BioX::Wrappers |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SYNOPSIS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
use BioX::Wrapper; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 DESCRIPTION |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
BioX::Wrapper is |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 AUTHOR |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Jillian Rowe E<lt>jillian.e.rowe@gmail.comE<gt> |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 COPYRIGHT |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Copyright 2015- Jillian Rowe |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 LICENSE |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
133
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 SEE ALSO |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=cut |