blib/lib/BioX/Wrapper.pm

filter: Statementstmt 68.4% 26 / 38 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 62.2% 33 / 53 CC 4 SCAR 20.8
CC
4
Cov
59%
print_opts
20.0
__ANON__
2.0
BEGIN
1.0
CRAP 8.0
↑ Summary Build »
1 package BioX::Wrapper;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use File::Find::Rule;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use File::Basename;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use File::Path qw(make_path remove_tree);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use File::Find::Rule;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 with 'MooseX::Getopt::Usage';
11 1 with 'MooseX::Getopt::Usage::Role::Man';
12 1 with 'MooseX::SimpleConfig';
13  
14 1 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 1 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 ▶ my($self) = @_;
Subroutine print_opts: not called CC=4 SCAR=30.0
Pod documented
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++){
Branch: 1 branch
BranchTrueFalseTotal
if ($x <= $#ARGV) 0 0 0
55 0 ▶ next unless $ARGV[$x];
Branch: 1 branch
BranchTrueFalseTotal
unless $ARGV[$x] 0 0 0
56 0 print "#\t$ARGV[$x]\t";
57 0 ▶ if($ARGV[$x+1]){
Branch: 1 branch
BranchTrueFalseTotal
if ($ARGV[$x + 1]) 0 0 0
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 1 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 0 ▶ default => sub { return getcwd() },
Subroutine __ANON__: not called CC=1 SCAR=6.9
100 1 );
101  
102 1 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
↑ Summary Build »