blib/lib/Bio/Tools/Run/Phylo/Phylip/Consense.pm

filter: Statementstmt 24.8% 40 / 161 Branchbran 6.9% 4 / 58 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 60.0% 12 / 20 Podpod 100% 6 / 6 totaltotal 24.0% 62 / 258 CC 36 SCAR 41.8
CC
36
Cov
19%
_setparams
210.0
_run
42.0
_setinput
42.0
CRAP 65.2
« blib/lib/Bio/Tools/Run/Alignment/Kalign.pm ↑ Summary blib/lib/Bio/Tools/Run/Primate.pm »
1 # BioPerl module for Bio::Tools::Run::Phylo::Phylip::Consense
2 #
3 # Created by
4 #
5 # Shawn Hoon
6 #
7 # You may distribute this module under the same terms as perl itself
8  
9 # POD documentation - main docs before the code
10  
11 =head1 NAME
12  
13 Bio::Tools::Run::Phylo::Phylip::Consense - Wrapper for the phylip
14 program Consense
15  
16 =head1 SYNOPSIS
17  
18  
19 use Bio::Tools::Run::Phylo::Phylip::Consense;
20 use Bio::Tools::Run::Phylo::Phylip::SeqBoot;
21 use Bio::Tools::Run::Phylo::Phylip::ProtDist;
22 use Bio::Tools::Run::Phylo::Phylip::Neighbor;
23 use Bio::Tools::Run::Phylo::Phylip::DrawTree;
24  
25  
26 #first get an alignment
27 my $aio= Bio::AlignIO->new(-file=>$ARGV[0],-format=>"clustalw");
28 my $aln = $aio->next_aln;
29  
30 # To prevent truncation of sequence names by PHYLIP runs, use set_displayname_safe
31 my ($aln_safe, $ref_name)=$aln->set_displayname_safe();
32  
33 #next use seqboot to generate multiple aligments
34 my @params = ('datatype'=>'SEQUENCE','replicates'=>10);
35 my $seqboot_factory = Bio::Tools::Run::Phylo::Phylip::SeqBoot->new(@params);
36  
37 my $aln_ref= $seqboot_factory->run($aln);
38  
39 Or, for long sequence names:
40  
41 my $aln_ref= $seqboot_factory->run($aln_safe);
42  
43 #next build distance matrices and construct trees
44 my $pd_factory = Bio::Tools::Run::Phylo::Phylip::ProtDist->new();
45 my $ne_factory = Bio::Tools::Run::Phylo::Phylip::Neighbor->new();
46  
47 foreach my $a (@{$aln_ref}){
48 my $mat = $pd_factory->create_distance_matrix($a);
49 push @tree, $ne_factory->create_tree($mat);
50 }
51  
52 #now use consense to get a final tree
53 my $con_factory = Bio::Tools::Run::Phylo::Phylip::Consense->new();
54  
55 #you may set outgroup either by the number representing the order in
56 #which species are entered or by the name of the species
57  
58 $con_factory->outgroup(1);
59 $con_factory->outgroup('HUMAN');
60  
61 my $tree = $con_factory->run(\@tree);
62  
63 # Restore original sequence names, after ALL phylip runs:
64 my @nodes = $tree->get_nodes();
65 foreach my $nd (@nodes){
66 $nd->id($ref_name->{$nd->id_output}) if $nd->is_Leaf;
67 }
68  
69 #now draw the tree
70 my $draw_factory = Bio::Tools::Run::Phylo::Phylip::DrawTree->new();
71 my $image_filename = $draw_factory->draw_tree($tree);
72  
73 =head1 DESCRIPTION
74  
75 Wrapper for phylip consense program
76  
77 Taken from phylip documentation...
78  
79 CONSENSE reads a file of computer-readable trees and prints out
80 (and may also write out onto a file) a consensus tree. At the moment
81 it carries out a family of consensus tree methods called the M[l] methods
82 (Margush and McMorris, 1981). These include strict consensus
83 and majority rule consensus. Basically the consensus tree consists of monophyletic
84 groups that occur as often as possible in the data.
85  
86 More documentation on using Consense and setting parameters may be found
87 in the phylip package.
88  
89 VERSION Support
90  
91 This wrapper currently supports v3.5 of phylip. There is also support for v3.6 although
92 this is still experimental as v3.6 is still under alpha release and not all functionalities maybe supported.
93  
94 =head1 PARAMETERS FOR Consense
95  
96 =head2 TYPE
97  
98 Title : TYPE
99 Description : (optional)
100 Only avaliable in phylip v3.6
101  
102 This program supports 3 types of consensus generation
103  
104 MRe : Majority Rule (extended) Any set of species that
105 appears in more than 50% of the trees is included.
106 The program then considers the other sets of species
107 in order of the frequency with which they have appeared,
108 adding to the consensus tree any which are compatible
109 with it until
110  
111 STRICT: A set of species must appear in all input trees to be
112 included in the strict consensus tree.
113  
114 MR : A set of species is included in the consensus tree
115 if it is present in more than half of the input trees.
116  
117 Ml : The user is asked for a fraction between 0.5 and 1, and
118 the program then includes in the consensus tree any set
119 of species that occurs among the input trees more than
120 that fraction of then time. The Strict consensus and the
121 Majority Rule consensus are extreme cases of the M[l] consensus,
122 being for fractions of 1 and 0.5 respectively
123  
124 usage: my $factory = Bio::Tools::Run::Phylo::Phylip::Consense->new(-type=>"Ml 0.7");
125  
126  
127 Defaults to MRe
128  
129 =head2 ROOTED
130  
131 Title: ROOTED
132 Description: (optional)
133  
134 toggles between the default assumption that the input trees are unrooted trees and
135 the selection that specifies that the tree is to be treated as a rooted tree and not
136 re-rooted. Otherwise the tree will be treated as outgroup-rooted and will be
137 re-rooted automatically at the first species encountered on the first tree
138 (or at a species designated by the Outgroup option)
139  
140 usage: my $factory = Bio::Tools::Run::Phylo::Phylip::Consense->new(-rooted=>1);
141  
142 Defaults to unrooted
143  
144 =head2 OUTGROUP
145  
146 Title : OUTGROUP
147 Description : (optional)
148  
149 It is in effect only if the Rooted option selection is not in effect.
150 The trees will be re-rooted with a species of your choosing.
151  
152 usage my $factory = Bio::Tools::Run::Phylo::Phylip::Consense->new(-outgroup=>2);
153  
154 Defaults to first species encountered.
155  
156 =head1 FEEDBACK
157  
158 =head2 Mailing Lists
159  
160 User feedback is an integral part of the evolution of this and other
161 Bioperl modules. Send your comments and suggestions preferably to one
162 of the Bioperl mailing lists. Your participation is much appreciated.
163  
164 bioperl-l@bioperl.org - General discussion
165 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
166  
167 =head2 Support
168  
169 Please direct usage questions or support issues to the mailing list:
170  
171 I<bioperl-l@bioperl.org>
172  
173 rather than to the module maintainer directly. Many experienced and
174 reponsive experts will be able look at the problem and quickly
175 address it. Please include a thorough description of the problem
176 with code and data examples if at all possible.
177  
178 =head2 Reporting Bugs
179  
180 Report bugs to the Bioperl bug tracking system to help us keep track
181 the bugs and their resolution. Bug reports can be submitted via the
182 web:
183  
184 http://redmine.open-bio.org/projects/bioperl/
185  
186 =head1 AUTHOR - Shawn Hoon
187  
188 Email shawnh@fugu-sg.org
189  
190 =head1 APPENDIX
191  
192 The rest of the documentation details each of the object
193 methods. Internal methods are usually preceded with a _
194  
195 =cut
196  
197 #'
198  
199
200 package Bio::Tools::Run::Phylo::Phylip::Consense;
201  
202 1 use vars qw($AUTOLOAD @ISA $PROGRAM $PROGRAMDIR $PROGRAMNAME
203 @CONSENSE_PARAMS @OTHER_SWITCHES
204 1 ▶ %OK_FIELD);
Subroutine BEGIN: called CC=1 SCAR=0.0
205 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
206 1 ▶use Bio::SimpleAlign;
Subroutine BEGIN: called CC=1 SCAR=0.0
207 1 ▶use Bio::TreeIO;
Subroutine BEGIN: called CC=1 SCAR=0.0
208 1 ▶use Bio::Tools::Run::Phylo::Phylip::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
209 1 ▶use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
Subroutine BEGIN: called CC=1 SCAR=0.0
210 1 ▶use IO::String;
Subroutine BEGIN: called CC=1 SCAR=0.0
211 1 ▶use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
212  
213  
214 # inherit from Phylip::Base which has some methods for dealing with
215 # Phylip specifics
216 1 @ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
217  
218 # You will need to enable the Consense program. This
219 # can be done in (at least) 3 ways:
220 #
221 # 1. define an environmental variable PHYLIPDIR:
222 # export PHYLIPDIR=/home/shawnh/PHYLIP/bin
223 #
224 # 2. include a definition of an environmental variable PHYLIPDIR in
225 # every script that will use Consense.pm.
226 # $ENV{PHYLIPDIR} = '/home/shawnh/PHYLIP/bin';
227 #
228 # 3. You can set the path to the program through doing:
229 # my @params('executable'=>'/usr/local/bin/consense');
230 # my $Consense_factory = Bio::Tools::Run::Phylo::Phylip::Consense->new(@params);
231 #
232  
233  
234 BEGIN {
235 1 ▶ @CONSENSE_PARAMS = qw(TYPE OUTGROUP ROOTED);
Subroutine BEGIN: called CC=2 SCAR=6.9
236 1 @OTHER_SWITCHES = qw(QUIET);
237 1 foreach my $attr(@CONSENSE_PARAMS,@OTHER_SWITCHES) {
238 4 $OK_FIELD{$attr}++;
239 }
240 }
241  
242 =head2 program_name
243  
244 Title : program_name
245 Usage : $obj->program_name()
246 Function: holds the program name
247 Returns: string
248 Args : None
249  
250 =cut
251  
252 sub program_name {
253 6 ▶ return 'consense';
Subroutine program_name: called CC=1 SCAR=0.0
Pod documented
254 }
255  
256 =head2 program_dir
257  
258 Title : program_dir
259 Usage : ->program_dir()
260 Function: returns the program directory, obtained from ENV variable.
261 Returns: string
262 Args :
263  
264 =cut
265  
266 sub program_dir {
267 3 ▶ return Bio::Root::IO->catfile($ENV{PHYLIPDIR}) if $ENV{PHYLIPDIR};
Subroutine program_dir: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
if $ENV{"PHYLIPDIR"} 0 3 3
268 }
269  
270 sub new {
271 1 ▶ my ($class,@args) = @_;
Subroutine new: called CC=5 SCAR=21.5
Pod documented
272 1 my $self = $class->SUPER::new(@args);
273
274 1 my ($attr, $value);
275 1 ▶ while (@args) {
Branch: 1 branch
BranchTrueFalseTotal
if (@args) 1 1 2
276 1 $attr = shift @args;
277 1 $value = shift @args;
278
279 1 ▶ next if( $attr =~ /^-/ ); # don't want named parameters
Branch: 1 branch
BranchTrueFalseTotal
if $attr =~ /^-/ 1 0 1
280 0 ▶ if ($attr =~/PROGRAM/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($attr =~ /PROGRAM/i) 0 0 0
281 0 $self->executable($value);
282 0 next;
283 }
284 0 ▶ if ($attr =~ /IDLENGTH/i){
Branch: 1 branch
BranchTrueFalseTotal
if ($attr =~ /IDLENGTH/i) 0 0 0
285 0 $self->idlength($value);
286 0 next;
287 }
288 0 $self->$attr($value);
289 }
290 1 return $self;
291 }
292  
293 sub AUTOLOAD {
294 0 ▶ my $self = shift;
Subroutine AUTOLOAD: not called CC=3 SCAR=24.8
295 0 my $attr = $AUTOLOAD;
296 0 $attr =~ s/.*:://;
297 0 $attr = uc $attr;
298 0 ▶ $self->throw("Unallowed parameter: $attr !") unless $OK_FIELD{$attr};
Branch: 1 branch
BranchTrueFalseTotal
unless $Bio::Tools::Run::Phylo::Phylip::Consense::OK_FIELD{$attr} 0 0 0
299 0 ▶ $self->{$attr} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
300 0 return $self->{$attr};
301 }
302  
303 =head2 idlength
304  
305 Title : idlength
306 Usage : $obj->idlength ($newval)
307 Function:
308 Returns : value of idlength
309 Args : newvalue (optional)
310  
311  
312 =cut
313  
314 sub idlength{
315 0 ▶ my $self = shift;
Subroutine idlength: not called CC=2 SCAR=17.9
Pod documented
316 0 ▶ if( @_ ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
317 0 my $value = shift;
318 0 $self->{'idlength'} = $value;
319 }
320 0 return $self->{'idlength'};
321  
322 }
323  
324  
325 =head2 run
326  
327 Title : run
328 Usage :
329 $inputfilename = 't/data/prot.treefile';
330 $tree= $Consense_factory->run($inputfilename);
331 or
332  
333 $tree= $consense_factory->run(\@tree);
334  
335 Function: Create bootstrap sets of alignments
336 Example :
337 Returns : a L<Bio::Tree::Tree>
338 Args : either a file containing trees in newick format
339 or an array ref of L<Bio::Tree::Tree>
340  
341 Throws an exception if argument is not either a string (eg a
342 filename) or a Bio::Tree::TreeI object. If
343 argument is string, throws exception if file corresponding to string
344 name can not be found.
345  
346 =cut
347  
348 sub run{
349  
350 0 ▶ my ($self,$input) = @_;
Subroutine run: not called CC=2 SCAR=17.9
Pod documented
351 0 my ($infilename);
352  
353 # Create input file pointer
354 0 $infilename = $self->_setinput($input);
355 0 ▶ if (!$infilename) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($infilename) 0 0 0
356 0 $self->throw("Problems setting up for Consense. Probably bad input data in $input !");
357 }
358
359 # Create parameter string to pass to Consense program
360 0 my $param_string = $self->_setparams();
361 # run Consense
362 0 my $aln = $self->_run($infilename,$param_string);
363 }
364  
365 #################################################
366  
367 =head2 _run
368  
369 Title : _run
370 Usage : Internal function, not to be called directly
371 Function: makes actual system call to Consense program
372 Example :
373 Returns : an array ref of <Bio::Tree::Tree>
374 Args : Name of a file containing a set of tree in newick format
375 and a parameter string to be passed to Consense
376  
377  
378 =cut
379  
380 sub _run {
381 0 ▶ my ($self,$infile,$param_string) = @_;
Subroutine _run: not called CC=6 SCAR=37.4
382 0 my $instring;
383 0 my $curpath = cwd;
384 0 ▶ unless( File::Spec->file_name_is_absolute($infile) ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ("File::Spec"->file_name_is_absolute($infile)) 0 0 0
385 0 $infile = $self->io->catfile($curpath,$infile);
386 }
387 0 my $tmpdir = $self->tempdir;
388 0 chdir($self->tempdir);
389 # open a pipe to run Consense to bypass interactive menus
390 0 ▶ if ($self->quiet() || $self->verbose() < 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->quiet or $self->verbose < 0) { } 0 0 0
Condition0%0/3
$self->quiet or $self->verbose < 0
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->quiet or $self->verbose < 0
$self->quiet $self->verbose < 0
Truth table0%0/3
A or B
A= $self->quietB= $self->verbose < 0
ABresult
1X1
011
000
391 0 open(Consense,"| ".$self->executable .">/dev/null");
392 }
393 else {
394 0 open(Consense,"| ".$self->executable);
395 }
396 0 $instring = $infile."\n".$param_string;
397 0 $self->debug( "Program ".$self->executable." $instring\n");
398 0 print Consense $instring;
399 0 close(Consense);
400
401 # get the results
402 0 my $outfile = $self->io->catfile($self->tempdir,$self->treefile);
403 0 chdir($curpath);
404
405 0 ▶ $self->throw("Consense did not create files correctly ($outfile)")
Branch: 1 branch
BranchTrueFalseTotal
unless -e $outfile 0 0 0
406 unless (-e $outfile);
407  
408 #parse the alignments
409
410 0 my @aln;
411 0 my $tio = Bio::TreeIO->new(-file=>$outfile,-format=>"newick");
412 0 my $tree = $tio->next_tree;
413  
414 # Clean up the temporary files created along the way...
415 0 ▶ unlink $outfile unless $self->save_tempfiles;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->save_tempfiles 0 0 0
416
417 0 return $tree;
418 }
419  
420 sub _set_names_from_tree {
421 0 ▶ my ($self,$tree) = @_;
Subroutine _set_names_from_tree: not called CC=2 SCAR=17.9
422 0 my $newick;
423 0 my $ios = IO::String->new($newick);
424 0 my $tio = Bio::TreeIO->new(-fh=>$ios,-format=>'newick');
425 0 $tio->write_tree($tree);
426 0 my @names = $newick=~/(\w+):\d+/g;
427 0 my %names;
428 0 ▶ for(my $i=0; $i < $#names; $i++){
Branch: 1 branch
BranchTrueFalseTotal
if ($i < $#names) 0 0 0
429 0 $names{$names[$i]} = $i+1;
430 }
431 0 $self->names(\%names);
432  
433 0 return;
434 }
435  
436  
437 =head2 _setinput()
438  
439 Title : _setinput
440 Usage : Internal function, not to be called directly
441 Function: Create input file for Consense program
442 Example :
443 Returns : name of file containing a trees in newick format
444 Args : an array ref of Bio::Tree::Tree object or input file name
445  
446  
447 =cut
448  
449 sub _setinput {
450 0 ▶ my ($self, $input) = @_;
Subroutine _setinput: not called CC=6 SCAR=37.4
451 0 my ($alnfilename,$tfh);
452  
453 # a phy formatted alignment file
454 0 ▶ unless (ref $input) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $input) 0 0 0
455 # check that file exists or throw
456 0 $alnfilename= $input;
457 0 ▶ unless (-e $input) {return 0;}
Branch: 1 branch
BranchTrueFalseTotal
unless (-e $input) 0 0 0
458 0 my $tio = Bio::TreeIO->new(-file=>$alnfilename,-format=>'newick');
459 0 my $tree = $tio->next_tree;
460 0 $self->_set_names_from_tree($tree);
461 0 return $alnfilename;
462 }
463  
464 # $input may be a SimpleAlign Object
465 0 ▶ my @input = ref($input) eq "ARRAY" ? @{$input} : ($input);
Branch: 1 branch
BranchTrueFalseTotal
ref $input eq 'ARRAY' ? : 0 0 0
466 0 ($tfh,$alnfilename) = $self->io->tempfile(-dir=>$self->tempdir);
467 0 my $treeIO = Bio::TreeIO->new(-fh => $tfh,
468 -format=>'newick');
469  
470 0 foreach my $tree(@input){
471 0 ▶ $tree->isa('Bio::Tree::TreeI') || $self->throw('Expected a Bio::TreeI object');
Branch: 1 branch
BranchTrueFalseTotal
$tree->isa("Bio::Tree::TreeI") or $self->throw("Expected a Bio::TreeI object") 0 0 0
472 0 $treeIO->write_tree($tree);
473 }
474 #get the species names in order, using the first one
475 0 $self->_set_names_from_tree($input[0]);
476 0 $treeIO->close();
477 0 close($tfh);
478 0 undef $tfh;
479 0 return $alnfilename;
480 }
481  
482 =head2 names()
483  
484 Title : names
485 Usage : $tree->names(\%names)
486 Function: get/set for a hash ref for storing names in matrix
487 with rank as values.
488 Example :
489 Returns : hash reference
490 Args : hash reference
491  
492 =cut
493  
494 sub names {
495 0 ▶ my ($self,$name) = @_;
Subroutine names: not called CC=2 SCAR=17.9
Pod documented
496 0 ▶ if($name){
Branch: 1 branch
BranchTrueFalseTotal
if ($name) 0 0 0
497 0 $self->{'_names'} = $name;
498 }
499 0 return $self->{'_names'};
500 }
501  
502 =head2 _setparams()
503  
504 Title : _setparams
505 Usage : Internal function, not to be called directly
506 Function: Create parameter inputs for Consense program
507 Example :
508 Returns : parameter string to be passed to Consense
509 Args : name of calling object
510  
511 =cut
512  
513 sub _setparams {
514 0 ▶ my ($attr, $value, $self);
Subroutine _setparams: not called CC=14 SCAR=53.5
515  
516 #do nothing for now
517 0 $self = shift;
518 0 my $param_string = "";
519 0 my $rooted = 0;
520  
521 #for case where type is Ml
522 0 my $Ml = 0;
523 0 my $frac = 0.5;
524 0 my %menu = %{$Menu{$self->version}->{'CONSENSE'}};
525  
526 0 foreach my $attr ( @CONSENSE_PARAMS) {
527 0 $value = $self->$attr();
528 0 ▶ next unless (defined $value);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 0 0 0
529 0 ▶ if ($attr =~/ROOTED/i){
Branch: 3 branches
BranchTrueFalseTotal
if ($attr =~ /ROOTED/i) { } 0 0 0
elsif ($attr =~ /OUTGROUP/i) { } 0 0 0
elsif ($attr =~ /TYPE/i) { } 0 0 0
530 0 $rooted = 1;
531 0 $param_string .= $menu{'ROOTED'};
532 }
533 elsif($attr =~/OUTGROUP/i){
534 0 ▶ if($rooted == 1){
Branch: 1 branch
BranchTrueFalseTotal
if ($rooted == 1) 0 0 0
535 0 $self->warn("Outgroup option cannot be used with a rooted tree");
536 0 next;
537 }
538 0 ▶ if($value !~/^\d+$/){ # is a name
Branch: 1 branch
BranchTrueFalseTotal
unless ($value =~ /^\d+$/) 0 0 0
539 0 my %names = %{$self->names};
540 0 ▶ $names{$value} || $self->throw("Outgroup $value not found");
Branch: 1 branch
BranchTrueFalseTotal
$names{$value} or $self->throw("Outgroup $value not found") 0 0 0
541 0 $value = $names{$value};
542 }
543 0 $param_string .=$menu{'OUTGROUP'}."$value\n";
544 }
545 elsif($attr=~/TYPE/i){
546 0 ▶ if($value=~/Ml/i){
Branch: 1 branch
BranchTrueFalseTotal
if ($value =~ /Ml/i) 0 0 0
547 0 ($value,$frac) = split(/\s+/,$value);
548 #default if not given
549 0 ▶ $frac ||= 0.5;
Condition0%0/2
$frac ||= "0.5"
l!l
00
MC/DC0%0/1
$frac ||= "0.5"
$frac
Truth table0%0/2
A
A= $frac
Aresult
11
00
550 0 ▶ if($frac <= 0.5 || $frac > 1){
Branch: 1 branch
BranchTrueFalseTotal
if ($frac <= "0.5" or $frac > 1) 0 0 0
Condition0%0/3
$frac <= "0.5" or $frac > 1
l!l&&r!l&&!r
000
MC/DC0%0/2
$frac <= "0.5" or $frac > 1
$frac <= "0.5" $frac > 1
Truth table0%0/3
A or B
A= $frac <= "0.5"B= $frac > 1
ABresult
1X1
011
000
551 0 $self->warn("fraction given is out of range 0.5<frac<1, setting to 0.5");
552 0 $frac = 0.5;
553 }
554 0 $Ml=1;
555 }
556 0 $param_string.=$menu{'TYPE'}{uc $value};
557 }
558 else {
559 0 $param_string.=$menu{uc $attr};
560 }
561 }
562 0 $param_string .= $menu{'SUBMIT'};
563 0 ▶ if($Ml){
Branch: 1 branch
BranchTrueFalseTotal
if ($Ml) 0 0 0
564 0 $param_string.=$frac."\n";
565 }
566  
567 0 return $param_string;
568 }
569  
570  
571  
572 =head1 Bio::Tools::Run::Wrapper methods
573  
574 =cut
575  
576 =head2 no_param_checks
577  
578 Title : no_param_checks
579 Usage : $obj->no_param_checks($newval)
580 Function: Boolean flag as to whether or not we should
581 trust the sanity checks for parameter values
582 Returns : value of no_param_checks
583 Args : newvalue (optional)
584  
585  
586 =cut
587  
588 =head2 save_tempfiles
589  
590 Title : save_tempfiles
591 Usage : $obj->save_tempfiles($newval)
592 Function:
593 Returns : value of save_tempfiles
594 Args : newvalue (optional)
595  
596  
597 =cut
598  
599 =head2 outfile_name
600  
601 Title : outfile_name
602 Usage : my $outfile = $Consense->outfile_name();
603 Function: Get/Set the name of the output file for this run
604 (if you wanted to do something special)
605 Returns : string
606 Args : [optional] string to set value to
607  
608  
609 =cut
610  
611  
612 =head2 tempdir
613  
614 Title : tempdir
615 Usage : my $tmpdir = $self->tempdir();
616 Function: Retrieve a temporary directory name (which is created)
617 Returns : string which is the name of the temporary directory
618 Args : none
619  
620  
621 =cut
622  
623 =head2 cleanup
624  
625 Title : cleanup
626 Usage : $codeml->cleanup();
627 Function: Will cleanup the tempdir directory after a Consense run
628 Returns : none
629 Args : none
630  
631  
632 =cut
633  
634 =head2 io
635  
636 Title : io
637 Usage : $obj->io($newval)
638 Function: Gets a L<Bio::Root::IO> object
639 Returns : L<Bio::Root::IO>
640 Args : none
641  
642  
643 =cut
644  
645 1 1; # Needed to keep compiler happy
« blib/lib/Bio/Tools/Run/Alignment/Kalign.pm ↑ Summary blib/lib/Bio/Tools/Run/Primate.pm »