line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::MUST::Apps::Roles::Configable; |
2
|
|
|
|
|
|
|
# ABSTRACT: Attributes and methods common to Leel and FortyTwo objects |
3
|
|
|
|
|
|
|
$Bio::MUST::Apps::Roles::Configable::VERSION = '0.210570'; |
4
|
1
|
|
|
1
|
|
844
|
use Moose::Role; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6053
|
use autodie; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
7
|
1
|
|
|
1
|
|
5341
|
use feature qw(say); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
105
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
7
|
use Smart::Comments -ENV; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
729
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
399
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'config' => ( |
15
|
|
|
|
|
|
|
traits => ['Hash'], |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
isa => 'HashRef', |
18
|
|
|
|
|
|
|
required => 1, |
19
|
|
|
|
|
|
|
handles => { |
20
|
|
|
|
|
|
|
args_for => 'get', |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'infiles' => ( |
26
|
|
|
|
|
|
|
traits => ['Array'], |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
29
|
|
|
|
|
|
|
required => 1, |
30
|
|
|
|
|
|
|
handles => { |
31
|
|
|
|
|
|
|
all_infiles => 'elements', |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub inject_args { |
37
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
38
|
0
|
|
0
|
|
|
|
my $args = shift // {}; # HashRef (should not be empty...) |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# do some pre-flight QC |
41
|
|
|
|
|
|
|
# and propagate 'defaults' args as default values for all org args |
42
|
0
|
|
0
|
|
|
|
my %def_args = %{ $self->args_for('defaults') // {} }; |
|
0
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
for my $org_args ( @{ $self->args_for('orgs') } ) { |
|
0
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# check that org has no underscore between genus and species |
46
|
|
|
|
|
|
|
# to prevent app from distinguishing Genus_species and Genus species |
47
|
0
|
|
|
|
|
|
_check_org_format( $org_args->{org} ); |
48
|
0
|
|
|
|
|
|
$org_args = { %def_args, %{ $org_args } }; |
|
0
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# same check for query_orgs (42) |
52
|
|
|
|
|
|
|
_check_org_format($_) |
53
|
0
|
|
0
|
|
|
|
for @{ $self->args_for('query_orgs') // [] }; |
|
0
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# combine YAML and CLI parameters (e.g., debug_mode) |
56
|
|
|
|
|
|
|
# Note: CLI take precedences over YAML (in case of duplicates) |
57
|
0
|
|
|
|
|
|
my %args = ( %{ $self->config }, %{$args} ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# add infiles |
60
|
0
|
|
|
|
|
|
$args{infiles} = $self->infiles; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
### [CFG] Bio::FastParsers...........: $Bio::FastParsers::VERSION |
63
|
|
|
|
|
|
|
### [CFG] Bio::MUST::Core............: $Bio::MUST::Core::VERSION |
64
|
|
|
|
|
|
|
### [CFG] Bio::MUST::Drivers.........: $Bio::MUST::Drivers::VERSION |
65
|
|
|
|
|
|
|
### [CFG] Bio::MUST::Apps::FortyTwo..: $Bio::MUST::Apps::FortyTwo::VERSION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
### [CFG] BMD_BLAST_BINDIR...........: $ENV{BMD_BLAST_BINDIR} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
### [CFG] config: %args |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
return %args; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _check_org_format { |
76
|
0
|
|
|
0
|
|
|
my $org = shift; |
77
|
|
|
|
|
|
|
|
78
|
0
|
0
|
|
|
|
|
carp "[CFG] Warning: '$org' incorrectly written; use '$1 $2' instead!" |
79
|
|
|
|
|
|
|
if $org =~ m/^(\S+)_(.*)/xms; |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
return; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
1
|
|
|
1
|
|
9
|
no Moose::Role; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=pod |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 NAME |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Bio::MUST::Apps::Roles::Configable - Attributes and methods common to Leel and FortyTwo objects |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 VERSION |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
version 0.210570 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SYNOPSIS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# TODO |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 DESCRIPTION |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# TODO |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 AUTHOR |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Denis BAURAIN <denis.baurain@uliege.be> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
116
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |