Tools/Run/Phylo/Phylip/Base.pm

filter: Statementstmt 65.7% 25 / 38 Branchbran 25.0% 3 / 12 Conditioncond 7.1% 1 / 14 MC/DCmcdc 0.0% 0 / 9 Subroutinesub 66.6% 8 / 12 Podpod 100% 5 / 5 totaltotal 46.6% 42 / 90 CC 12 SCAR 19.5
CC
12
Cov
45%
outfile
12.0
treefile
12.0
plotfile
12.0
CRAP 7.0
« Tools/Run/tRNAscanSE.pm ↑ Summary Tools/Run/BlastPlus.pm »
1 # $Id $
2 #
3 # BioPerl module for Bio::Tools::Run::Phylo::Phylip::Base
4 #
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 #
7 # Cared for by Jason Stajich <jason-AT-bioperl_DOT_org>
8 #
9 # Copyright Jason Stajich
10 #
11 # You may distribute this module under the same terms as perl itself
12  
13 # POD documentation - main docs before the code
14  
15 =head1 NAME
16  
17 Bio::Tools::Run::Phylo::Phylip::Base - Base object for Phylip modules
18  
19 =head1 SYNOPSIS
20  
21 # Do not use directly
22 # This module is for setting basic data sets for the Phylip wrapper
23 # modules
24  
25 =head1 DESCRIPTION
26  
27 This module is just a base object for Bioperl Phylip wrappers.
28  
29 IMPORTANT PHYLIP VERSION ISSUES
30 By default we assume you have Phylip 3.6 installed, if you
31 have installed Phylip 3.5 you need to set the environment variable
32 PHYLIPVERSION
33  
34  
35 =head1 FEEDBACK
36  
37 =head2 Mailing Lists
38  
39 User feedback is an integral part of the evolution of this and other
40 Bioperl modules. Send your comments and suggestions preferably to
41 the Bioperl mailing list. Your participation is much appreciated.
42  
43 bioperl-l@bioperl.org - General discussion
44 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
45  
46 =head2 Support
47  
48 Please direct usage questions or support issues to the mailing list:
49  
50 I<bioperl-l@bioperl.org>
51  
52 rather than to the module maintainer directly. Many experienced and
53 reponsive experts will be able look at the problem and quickly
54 address it. Please include a thorough description of the problem
55 with code and data examples if at all possible.
56  
57 =head2 Reporting Bugs
58  
59 Report bugs to the Bioperl bug tracking system to help us keep track
60 of the bugs and their resolution. Bug reports can be submitted via the
61 web:
62  
63 http://redmine.open-bio.org/projects/bioperl/
64  
65 =head1 AUTHOR - Jason Stajich
66  
67 Email jason-at-bioperl.org
68  
69 =head1 APPENDIX
70  
71 The rest of the documentation details each of the object methods.
72 Internal methods are usually preceded with a _
73  
74 =cut
75  
76  
77 # Let the code begin...
78  
79  
80 package Bio::Tools::Run::Phylo::Phylip::Base;
81 7 ▶use vars qw(@ISA %DEFAULT %FILENAME);
Subroutine BEGIN: called CC=1 SCAR=0.0
82 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
83  
84 7 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.6
85 7 eval { require File::Spec };
86 0 ▶ if( $@) { Bio::Root::RootI->throw("Must have installed File::Spec to run Bio::Tools::Run::Phylo::Phylip tools");
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 7 7
87 }
88
89 }
90  
91 7 ▶use Bio::Root::Root;
Subroutine BEGIN: called CC=1 SCAR=0.0
92 7 ▶use Bio::Tools::Run::WrapperBase;
Subroutine BEGIN: called CC=1 SCAR=0.0
93 7 ▶use Bio::Tools::Run::Phylo::Phylip::PhylipConf;
Subroutine BEGIN: called CC=1 SCAR=0.0
94 7 @ISA = qw(Bio::Root::Root Bio::Tools::Run::WrapperBase);
95  
96 7 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.2
97 %DEFAULT = (
98 7 ▶ 'VERSION' => $ENV{'PHYLIPVERSION'} || '3.6',
Condition50%1/2
$ENV{'PHYLIPVERSION'} || '3.6'
l!l
07
MC/DC0%0/1
$ENV{'PHYLIPVERSION'} || '3.6'
$ENV{'PHYLIPVERSION'}
Truth table50%1/2
A
A= $ENV{'PHYLIPVERSION'}
Aresult
11
00
99 );
100 7 %FILENAME = %Bio::Tools::Run::Phylo::Phylip::PhylipConf::FileName;
101 }
102  
103 =head2 new
104  
105 Title : new
106 Usage : my $obj = Bio::Tools::Run::Phylo::Phylip::Base->new();
107 Function: Builds a new Bio::Tools::Run::Phylo::Phylip::Base object
108 Returns : an instance of Bio::Tools::Run::Phylo::Phylip::Base
109 Args :
110  
111 =cut
112  
113 =head2 outfile
114  
115 Title : outfile
116 Usage : $obj->outfile($newval)
117 Function: Get/Set default PHYLIP outfile name ('outfile' usually)
118 Changing this is only necessary when you have compiled
119 PHYLIP to use a different filename for the default 'outfile'
120 This will not change the default output filename by
121 PHYLIP
122 Returns : value of outfile
123 Args : newvalue (optional)
124  
125  
126 =cut
127  
128 0 ▶sub outfile{
Subroutine outfile: not called CC=3 SCAR=24.8
Pod documented
129 0 my $self = shift;
130 0 ▶ $self->{'_outfile'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
131 0 ▶ return $self->{'_outfile'} || $FILENAME{$self->version}{'OUTFILE'}
Condition0%0/3
$self->{'_outfile'} || $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'OUTFILE'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'_outfile'} || $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'OUTFILE'}
$self->{'_outfile'} $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'OUTFILE'}
Truth table0%0/3
A || B
A= $self->{'_outfile'}B= $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'OUTFILE'}
ABresult
1X1
011
000
132 }
133  
134  
135 =head2 treefile
136  
137 Title : treefile
138 Usage : $obj->treefile($newval)
139 Function: Get/Set the default PHYLIP treefile name ('treefile' usually)
140 Returns : value of treefile
141 Args : newvalue (optional)
142  
143  
144 =cut
145  
146 0 ▶sub treefile{
Subroutine treefile: not called CC=3 SCAR=24.8
Pod documented
147 0 my $self = shift;
148 0 ▶ $self->{'_treefile'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
149 0 ▶ return $self->{'_treefile'} || $FILENAME{$self->version}{'TREEFILE'};
Condition0%0/3
$self->{'_treefile'} || $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'TREEFILE'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'_treefile'} || $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'TREEFILE'}
$self->{'_treefile'} $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'TREEFILE'}
Truth table0%0/3
A || B
A= $self->{'_treefile'}B= $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'TREEFILE'}
ABresult
1X1
011
000
150 }
151  
152  
153 =head2 fontfile
154  
155 Title : fontfile
156 Usage : $obj->fontfile($newval)
157 Function: Get/Set the fontfile
158 Returns : value of fontfile (a scalar)
159 Args : on set, new value (a scalar or undef, optional)
160  
161  
162 =cut
163  
164 4 ▶sub fontfile{
Subroutine fontfile: called CC=2 SCAR=6.9
Pod documented
165 4 my $self = shift;
166  
167 4 ▶ return $self->{'fontfile'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 2 4
168 2 return $self->{'fontfile'} ;
169 }
170  
171 =head2 plotfile
172  
173 Title : plotfile
174 Usage : $obj->plotfile($newval)
175 Function: Get/Set the plotfile
176 Returns : value of plotfile (a scalar)
177 Args : on set, new value (a scalar or undef, optional)
178  
179  
180 =cut
181  
182 0 ▶sub plotfile {
Subroutine plotfile: not called CC=3 SCAR=24.8
Pod documented
183 0 my $self = shift;
184  
185 0 ▶ return $self->{'plotfile'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
186 0 ▶ return $self->{'plotfile'} || $FILENAME{$self->version}{'PLOTFILE'};
Condition0%0/3
$self->{'plotfile'} || $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'PLOTFILE'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'plotfile'} || $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'PLOTFILE'}
$self->{'plotfile'} $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'PLOTFILE'}
Truth table0%0/3
A || B
A= $self->{'plotfile'}B= $Bio::Tools::Run::Phylo::Phylip::Base::FILENAME{$self->version}{'PLOTFILE'}
ABresult
1X1
011
000
187 }
188  
189 =head2 version
190  
191 Title : version
192 Usage : $obj->version($newval)
193 Function: Get/Set the version
194 Returns : value of version (a scalar)
195 Args : on set, new value (a scalar or undef, optional)
196  
197  
198 =cut
199  
200 0 ▶sub version {
Subroutine version: not called CC=3 SCAR=24.8
Pod documented
201 0 my $self = shift;
202  
203 0 ▶ return $self->{'version'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
204 0 ▶ return $self->{'version'} || $DEFAULT{'VERSION'};
Condition0%0/3
$self->{'version'} || $Bio::Tools::Run::Phylo::Phylip::Base::DEFAULT{'VERSION'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'version'} || $Bio::Tools::Run::Phylo::Phylip::Base::DEFAULT{'VERSION'}
$self->{'version'} $Bio::Tools::Run::Phylo::Phylip::Base::DEFAULT{'VERSION'}
Truth table0%0/3
A || B
A= $self->{'version'}B= $Bio::Tools::Run::Phylo::Phylip::Base::DEFAULT{'VERSION'}
ABresult
1X1
011
000
205 }
206 7 1;
« Tools/Run/tRNAscanSE.pm ↑ Summary Tools/Run/BlastPlus.pm »