Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
7ecca470
Commit
7ecca470
authored
Mar 25, 2013
by
Leo Gordon
Browse files
use param_required() calls wherever a parameter value is required
parent
85880029
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
modules/Bio/EnsEMBL/Hive/RunnableDB/FastaFactory.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/FastaFactory.pm
+1
-1
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/AddTogether.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/AddTogether.pm
+2
-2
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/DigitFactory.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/DigitFactory.pm
+1
-1
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/PartMultiply.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/PartMultiply.pm
+2
-2
modules/Bio/EnsEMBL/Hive/RunnableDB/NotifyByEmail.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/NotifyByEmail.pm
+10
-3
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlHealthcheck.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlHealthcheck.pm
+1
-1
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/FastaFactory.pm
View file @
7ecca470
...
...
@@ -71,7 +71,7 @@ sub param_defaults {
sub
fetch_input
{
my
$self
=
shift
@_
;
my
$inputfile
=
$self
->
param
('
inputfile
')
||
die
"
'inputfile' is an obligatory parameter
"
;
my
$inputfile
=
$self
->
param
_required
('
inputfile
');
die
"
Cannot read '
$inputfile
'
"
unless
(
-
r
$inputfile
);
if
(
$inputfile
=~
/\.(?:gz|Z)$/
)
{
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/AddTogether.pm
View file @
7ecca470
...
...
@@ -40,7 +40,7 @@ use base ('Bio::EnsEMBL::Hive::Process');
sub
fetch_input
{
# fetch all the (relevant) precomputed products
my
$self
=
shift
@_
;
my
$a_multiplier
=
$self
->
param
('
a_multiplier
')
||
die
"
'a_multiplier' is an obligatory parameter
"
;
my
$a_multiplier
=
$self
->
param
_required
('
a_multiplier
');
my
$adaptor
=
$self
->
db
->
get_NakedTableAdaptor
();
$adaptor
->
table_name
(
'
intermediate_result
'
);
...
...
@@ -62,7 +62,7 @@ sub fetch_input { # fetch all the (relevant) precomputed products
sub
run
{
# call the function that will compute the stuff
my
$self
=
shift
@_
;
my
$b_multiplier
=
$self
->
param
('
b_multiplier
')
||
die
"
'b_multiplier' is an obligatory parameter
"
;
my
$b_multiplier
=
$self
->
param
_required
('
b_multiplier
');
my
$product_pair
=
$self
->
param
('
product_pair
');
$self
->
param
('
result
',
_add_together
(
$b_multiplier
,
$product_pair
));
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/DigitFactory.pm
View file @
7ecca470
...
...
@@ -42,7 +42,7 @@ use base ('Bio::EnsEMBL::Hive::Process');
sub
fetch_input
{
my
$self
=
shift
@_
;
my
$b_multiplier
=
$self
->
param
('
b_multiplier
')
||
die
"
'b_multiplier' is an obligatory parameter
"
;
my
$b_multiplier
=
$self
->
param
_required
('
b_multiplier
');
my
%digit_hash
=
();
foreach
my
$digit
(
split
(
//
,
$b_multiplier
))
{
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/LongMult/PartMultiply.pm
View file @
7ecca470
...
...
@@ -49,8 +49,8 @@ sub fetch_input {
sub
run
{
# call the recursive function that will compute the stuff
my
$self
=
shift
@_
;
my
$a_multiplier
=
$self
->
param
('
a_multiplier
')
||
die
"
'a_multiplier' is an obligatory parameter
"
;
my
$digit
=
$self
->
param
('
digit
')
||
die
"
'digit' is an obligatory parameter
"
;
my
$a_multiplier
=
$self
->
param
_required
('
a_multiplier
');
my
$digit
=
$self
->
param
_required
('
digit
');
$self
->
param
('
result
',
_rec_multiply
(
$a_multiplier
,
$digit
,
0
)
||
0
);
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/NotifyByEmail.pm
View file @
7ecca470
...
...
@@ -36,6 +36,13 @@ use strict;
use
base
('
Bio::EnsEMBL::Hive::Process
');
sub
param_defaults
{
return
{
'
subject
'
=>
'
An automatic message from your pipeline
',
};
}
=head2 fetch_input
Description : Implements fetch_input() interface method of Bio::EnsEMBL::Hive::Process that is used to read in parameters and load data.
...
...
@@ -64,9 +71,9 @@ sub fetch_input {
sub
run
{
my
$self
=
shift
;
my
$email
=
$self
->
param
('
email
')
||
die
"
'email' parameter is obligatory
"
;
my
$subject
=
$self
->
param
('
subject
')
||
"
An automatic message from your pipeline
"
;
my
$text
=
$self
->
param
('
text
')
||
die
"
'text' parameter is obligatory
"
;
my
$email
=
$self
->
param
_required
('
email
');
my
$subject
=
$self
->
param
_required
('
subject
');
my
$text
=
$self
->
param
_required
('
text
')
;
open
(
SENDMAIL
,
"
|sendmail
$email
");
print
SENDMAIL
"
Subject:
$subject
\n
";
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlHealthcheck.pm
View file @
7ecca470
...
...
@@ -38,7 +38,7 @@ use base ('Bio::EnsEMBL::Hive::Process');
sub
fetch_input
{
my
$self
=
shift
@_
;
die
"
'inputquery' is a mandatory parameter
"
unless
$self
->
param
('
inputquery
');
$self
->
param
_required
('
inputquery
');
my
$expected_size
=
$self
->
param
('
expected_size
');
unless
(
$expected_size
=~
/^\s*(=|==|>|>=|<|<=|<>|!=|)\s*(\d*)\s*$/
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment