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