| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Bio::MUST::Drivers::Blast::Database::Temporary; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: Internal class for BLAST driver |
|
3
|
|
|
|
|
|
|
$Bio::MUST::Drivers::Blast::Database::Temporary::VERSION = '0.193030'; |
|
4
|
5
|
|
|
5
|
|
47
|
use Moose; |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
40
|
|
|
5
|
5
|
|
|
5
|
|
31640
|
use namespace::autoclean; |
|
|
5
|
|
|
|
|
11
|
|
|
|
5
|
|
|
|
|
50
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
507
|
use autodie; |
|
|
5
|
|
|
|
|
11
|
|
|
|
5
|
|
|
|
|
51
|
|
|
8
|
5
|
|
|
5
|
|
24311
|
use feature qw(say); |
|
|
5
|
|
|
|
|
12
|
|
|
|
5
|
|
|
|
|
488
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
5
|
|
|
5
|
|
44
|
use Carp; |
|
|
5
|
|
|
|
|
12
|
|
|
|
5
|
|
|
|
|
459
|
|
|
11
|
5
|
|
|
5
|
|
30
|
use IPC::System::Simple qw(system); |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
257
|
|
|
12
|
5
|
|
|
5
|
|
31
|
use Module::Runtime qw(use_module); |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
40
|
|
|
13
|
5
|
|
|
5
|
|
342
|
use Path::Class qw(file); |
|
|
5
|
|
|
|
|
12
|
|
|
|
5
|
|
|
|
|
1949
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
extends 'Bio::MUST::Core::Ali::Temporary'; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with 'Bio::MUST::Drivers::Roles::Blastable'; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# overload equivalent attribute in plain Database |
|
21
|
|
|
|
|
|
|
sub remote { |
|
22
|
0
|
|
|
0
|
0
|
|
return 0; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub BUILD { |
|
26
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# provision executable |
|
29
|
0
|
|
|
|
|
|
my $app = use_module('Bio::MUST::Provision::Blast')->new; |
|
30
|
0
|
|
|
|
|
|
$app->meet(); |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $in = $self->filename; |
|
33
|
0
|
|
|
|
|
|
my $dbtype = $self->type; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# create makeblastdb command |
|
36
|
0
|
|
|
|
|
|
my $pgm = file($ENV{BMD_BLAST_BINDIR}, 'makeblastdb'); |
|
37
|
0
|
|
|
|
|
|
my $cmd = "$pgm -in $in -dbtype $dbtype > /dev/null 2> /dev/null"; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# try to robustly execute makeblastdb |
|
40
|
0
|
|
|
|
|
|
my $ret_code = system( [ 0, 127 ], $cmd); |
|
41
|
0
|
0
|
|
|
|
|
if ($ret_code == 127) { |
|
42
|
|
|
|
|
|
|
# TODO: do something to abort construction |
|
43
|
0
|
|
|
|
|
|
carp "[BMD] Warning: cannot execute $pgm command; returning!"; |
|
44
|
0
|
|
|
|
|
|
return; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub DEMOLISH { |
|
51
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# unlink temp files |
|
54
|
0
|
|
|
|
|
|
my $basename = $self->filename; |
|
55
|
0
|
0
|
|
|
|
|
my @suffices = $self->type eq 'prot' ? qw(phr pin psq) : qw(nhr nin nsq); |
|
56
|
0
|
|
|
|
|
|
file($_)->remove for map { "$basename.$_" } @suffices; |
|
|
0
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return; |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
62
|
|
|
|
|
|
|
1; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
__END__ |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=pod |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 NAME |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Bio::MUST::Drivers::Blast::Database::Temporary - Internal class for BLAST driver |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 VERSION |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
version 0.193030 |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# TODO |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
# TODO |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Denis BAURAIN <denis.baurain@uliege.be> |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
93
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |