ensembl-hive  2.6
EnsemblGeneric_conf.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 DESCRIPTION
8 
9  Generic configuration module for all Ensembl-derived pipelines.
10  It extends HiveGeneric_conf with specifically Ensembl things (knows about the release number, for instance).
11 
12  So if your pipeline has anything to do with Ensembl API/schema, please inherit (directly or not) your config from this file.
13 
14 =head1 LICENSE
15 
16  Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
17  Copyright [2016-2024] EMBL-European Bioinformatics Institute
18 
19  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
20  You may obtain a copy of the License at
21 
22  http://www.apache.org/licenses/LICENSE-2.0
23 
24  Unless required by applicable law or agreed to in writing, software distributed under the License
25  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26  See the License for the specific language governing permissions and limitations under the License.
27 
28 =head1 CONTACT
29 
30  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
31 
32 =cut
33 
34 
35 package Bio::EnsEMBL::Hive::PipeConfig::EnsemblGeneric_conf;
36 
37 use strict;
38 use warnings;
39 
41 
42 use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');
43 
44 
45 =head2 default_options
46 
47  Description : Interface method that should return a hash of option_name->default_option_value pairs.
48  Please see existing PipeConfig modules for examples.
49 
50 =cut
51 
52 sub default_options {
53  my ($self) = @_;
54  return {
55  %{ $self->SUPER::default_options() }, # inherit from parent
56 
57  # Please note: ENVironment variables may be "exported" to inherit from enclosing shell,
58  # but if you want to *prevent* that you need to specifically say so
59  # (setting a password to empty string does exactly that - sets it to an empty string)
60  #
61  # [bash] export -n ENSEMBL_CVS_ROOT_DIR # will stop exporting, but the value in current shell stays as it was
62  # [tcsh] unsetenv ENSEMBL_CVS_ROOT_DIR # will destroy the variable even in current shell, and stop exporting
63 
64  # have to be careful not to check for $self->o('ensembl_cvs_root_dir') unless no env variable is set, or else
65  # it will cause options missing errors. Also, the $self->o() system doesn't support optional options at
66  # the time of this commit, so we can only have one of ensembl_root_dir or ensembl_cvs_root_dir, otherwise
67  # there would always be an options missing error. We choose ensembl_cvs_root_dir for backwards compatibility.
68  'ensembl_cvs_root_dir' => defined($ENV{'ENSEMBL_ROOT_DIR'} || $ENV{'ENSEMBL_CVS_ROOT_DIR'}) ?
69  $ENV{'ENSEMBL_ROOT_DIR'} || $ENV{'ENSEMBL_CVS_ROOT_DIR'} : $self->o('ensembl_cvs_root_dir'),
70  'ensembl_root_dir' => $self->o('ensembl_cvs_root_dir'),
71  'ensembl_release' => Bio::EnsEMBL::ApiVersion::software_version(), # snapshot of EnsEMBL Core API version. Please do not change if not sure.
72  'rel_suffix' => '', # an empty string by default, a letter otherwise
73  'rel_with_suffix' => $self->o('ensembl_release').$self->o('rel_suffix'),
74 
75  'pipeline_name' => $self->default_pipeline_name().'_'.$self->o('rel_with_suffix'),
76 
77  'user' => $ENV{'EHIVE_USER'} || 'ensadmin',
78  'password' => $ENV{'EHIVE_PASS'} // $ENV{'ENSADMIN_PSW'} // $self->o('password'), # people will have to make an effort NOT to insert it into config files like .bashrc etc
79  };
80 }
81 
82 
83 =head2 pipeline_wide_parameters
84 
85  Description : Interface method that should return a hash of pipeline_wide_parameter_name->pipeline_wide_parameter_value pairs.
86  The value doesn't have to be a scalar, can be any Perl structure now (will be stringified and de-stringified automagically).
87  Please see existing PipeConfig modules for examples.
88 
89 =cut
90 
91 sub pipeline_wide_parameters {
92  my ($self) = @_;
93  return {
94  %{ $self->SUPER::pipeline_wide_parameters() }, # inherit from parent
95 
96 # 'schema_version' => $self->o('ensembl_release'), # commented out to avoid duplicating 'schema_version' inserted by the schema mysql file
97  };
98 }
99 
100 1;
101 
EnsEMBL
Definition: Filter.pm:1
Bio::EnsEMBL::ApiVersion::software_version
public software_version()
Bio::EnsEMBL::Hive::Version
Definition: Version.pm:19
about
public about()
Bio::EnsEMBL::Hive::PipeConfig::EnsemblGeneric_conf
Definition: EnsemblGeneric_conf.pm:14
Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf
Definition: HiveGeneric_conf.pm:54
Bio::EnsEMBL::Hive
Definition: Hive.pm:38
Bio::EnsEMBL::ApiVersion
Definition: ApiVersion.pm:17