blib/lib/BioX/Wrapper.pm

filter: Statementstmt 69.2% 27 / 39 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 62.9% 34 / 54 SCAR 16.1
CC
4
Cov
60%
print_opts
20.0
__ANON__
2.0
BEGIN
1.0
CRAP 5.0
« Build ↑ Summary
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.4';
15  
16 # For pretty man pages!
17 1 $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 1 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 ▶ my($self) = @_;
Subroutine print_opts: not called CC=4 SCAR=30.0
Pod documented
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++){
Branch: 1 branch
BranchTrueFalseTotal
if ($x <= $#ARGV) 0 0 0
58 0 ▶ next unless $ARGV[$x];
Branch: 1 branch
BranchTrueFalseTotal
unless $ARGV[$x] 0 0 0
59 0 print "#\t$ARGV[$x]\t";
60 0 ▶ if($ARGV[$x+1]){
Branch: 1 branch
BranchTrueFalseTotal
if ($ARGV[$x + 1]) 0 0 0
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 1 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 0 ▶ default => sub { return getcwd() },
Subroutine __ANON__: not called CC=1 SCAR=6.9
103 1 );
104  
105 1 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
« Build ↑ Summary