Installer/Clustalw.pm

filter: Statementstmt 51.1% 22 / 43 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 100% 2 / 2 totaltotal 50.8% 31 / 61 SCAR 19.0
CC
4
Cov
45%
_execute_make
20.0
get_default
2.0
install
2.0
CRAP 6.7
« Tools/Run/Alignment/Clustalw.pm ↑ Summary
1 package Bio::Installer::Clustalw;
2 1 $Bio::Installer::Clustalw::VERSION = '1.7.2';
3 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use vars qw(@ISA %DEFAULTS);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # Object preamble - inherits from Bio::Root::Root
10  
11 1 ▶use Bio::Root::Root;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Bio::Installer::Generic;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 @ISA = qw(Bio::Installer::Generic );
15  
16 # ABSTRACT: DESCRIPTION of Object
17 # AUTHOR: Albert Vilella <avilella@gmail.com>
18 # OWNER: Albert Vilella <avilella@gmail.com>
19 # LICENSE: Perl_5
20  
21  
22 BEGIN {
23 1 ▶ %DEFAULTS = ( 'ORIGIN_DOWNLOAD_DIR' => 'ftp://ftp.ebi.ac.uk/pub/software/unix/clustalw',
Subroutine BEGIN: called CC=1 SCAR=0.0
24 'BIN_FOLDER' => '',
25 'DESTINATION_DOWNLOAD_DIR' => '/tmp',
26 'DESTINATION_INSTALL_DIR' => "$ENV{'HOME'}",
27 'PACKAGE_NAME' => 'clustalw1.83.UNIX.tar.gz',
28 'DIRECTORY_NAME' => 'clustalw1.83',
29 'ENV_NAME' => 'CLUSTALDIR',
30 );
31 }
32  
33  
34  
35 sub get_default {
36 0 ▶ my $self = shift;
Subroutine get_default: not called CC=1 SCAR=6.9
Pod documented
37 0 my $param = shift;
38 0 return $DEFAULTS{$param};
39 }
40  
41  
42  
43 sub install{
44 0 ▶ my ($self,@args) = @_;
Subroutine install: not called CC=1 SCAR=6.9
Pod documented
45 0 my $dir;
46 0 $self->_decompress;
47 0 $self->_execute_make;
48 0 $dir = $self->destination_install_dir;
49 0 $self->_remember_env;
50 }
51  
52  
53  
54 sub _execute_make{
55 0 ▶ my ($self,@args) = @_;
Subroutine _execute_make: not called CC=4 SCAR=30.0
56 0 my $call;
57  
58 0 my $destination = $self->destination_install_dir . "/" . $self->directory_name;
59  
60 0 print "\n\nCompiling with make -- (this might take a while)\n\n";sleep 1;
61 0 ▶ if (($^O =~ /dec_osf|linux|unix|bsd|solaris|darwin/i)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /dec_osf|linux|unix|bsd|solaris|darwin/i) { } 0 0 0
62 0 ▶ chdir $destination or die "Cant cd to $destination $!\n";
Branch: 1 branch
BranchTrueFalseTotal
chdir $destination or die "Cant cd to $destination $!\n" 0 0 0
63  
64 0 print "\n\nCalling make (this might take a while)\n\n";sleep 1;
65 0 $call = "make";
66 0 ▶ system("$call") == 0 or $self->throw("Error when trying to run make");
Branch: 1 branch
BranchTrueFalseTotal
system("$call") == 0 or $self->throw("Error when trying to run make") 0 0 0
67 } else {
68 0 $self->throw("_execute_make not yet implemented in this platform");
69 }
70 }
71  
72  
73 1 1;
74  
75 __END__
« Tools/Run/Alignment/Clustalw.pm ↑ Summary