Commit 2778c93e authored by Leo Gordon's avatar Leo Gordon
Browse files

trying to follow EnsEMBL API convention about "fetch_by" and "fetch_all_by"

parent 19dd6b12
...@@ -343,7 +343,7 @@ sub determine_status { ...@@ -343,7 +343,7 @@ sub determine_status {
sub check_blocking_control_rules { sub check_blocking_control_rules {
my $self = shift; my $self = shift;
my $ctrl_rules = $self->adaptor->db->get_AnalysisCtrlRuleAdaptor->fetch_by_ctrled_analysis_id($self->analysis_id); my $ctrl_rules = $self->adaptor->db->get_AnalysisCtrlRuleAdaptor->fetch_all_by_ctrled_analysis_id($self->analysis_id);
my $all_ctrl_rules_done = 1; my $all_ctrl_rules_done = 1;
......
...@@ -47,11 +47,11 @@ use Bio::EnsEMBL::Utils::Exception; ...@@ -47,11 +47,11 @@ use Bio::EnsEMBL::Utils::Exception;
use base ('Bio::EnsEMBL::DBSQL::BaseAdaptor'); use base ('Bio::EnsEMBL::DBSQL::BaseAdaptor');
=head2 fetch_by_ctrled_analysis_id =head2 fetch_all_by_ctrled_analysis_id
Arg [1] : int $id Arg [1] : int $id
the unique database identifier for the feature to be obtained the unique database identifier for the feature to be obtained
Example : $ctrlRuleArray = $adaptor->fetch_by_ctrled_analysis_id($ctrled_analysis->dbID); Example : $ctrlRuleArray = $adaptor->fetch_all_by_ctrled_analysis_id($ctrled_analysis->dbID);
Description: Returns an array reference of all the AnalysisCtrlRule objects Description: Returns an array reference of all the AnalysisCtrlRule objects
for the specified controled analysis. for the specified controled analysis.
Returntype : listref of Bio::EnsEMBL::Hive::AnalysisCtrlRule objects Returntype : listref of Bio::EnsEMBL::Hive::AnalysisCtrlRule objects
...@@ -60,11 +60,11 @@ use base ('Bio::EnsEMBL::DBSQL::BaseAdaptor'); ...@@ -60,11 +60,11 @@ use base ('Bio::EnsEMBL::DBSQL::BaseAdaptor');
=cut =cut
sub fetch_by_ctrled_analysis_id{ sub fetch_all_by_ctrled_analysis_id {
my ($self,$id) = @_; my ($self,$id) = @_;
unless(defined $id) { unless(defined $id) {
throw("fetch_by_ctrled_analysis_id must have an id"); throw("fetch_all_by_ctrled_analysis_id must have an id");
} }
my $constraint = "r.ctrled_analysis_id = $id"; my $constraint = "r.ctrled_analysis_id = $id";
...@@ -128,6 +128,13 @@ sub store { ...@@ -128,6 +128,13 @@ sub store {
Function: removes all the control rules for this condition analysis URL Function: removes all the control rules for this condition analysis URL
Returns : - Returns : -
NB: This method is not called by ensembl-hive code itself,
however it is used by two Compara pipeline modules,
Bio/EnsEMBL/Compara/Production/GenomicAlignBlock/CreateAlignmentChainsJobs.pm
and
Bio/EnsEMBL/Compara/Production/GenomicAlignBlock/CreateAlignmentNetsJobs.pm
in order to avoid blocking by an empty analysis. It should be re-written by using can_be_empty=1 analyses.
=cut =cut
sub remove_by_condition_analysis_url { sub remove_by_condition_analysis_url {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment