Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
de129e2e
Commit
de129e2e
authored
15 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Be more helpful in the warning at the end of gen_load() (patch from Andy
Yates). Reformat.
parent
f503b5c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm
+63
-69
63 additions, 69 deletions
modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm
with
63 additions
and
69 deletions
modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm
+
63
−
69
View file @
de129e2e
...
...
@@ -64,112 +64,106 @@ use Bio::EnsEMBL::Utils::Exception qw(warning throw deprecate stack_trace_dump)
#
sub
gen_load
{
sub
gen_load
{
my
(
$dba
)
=
@_
;
my
$config_sub
;
#
a
t some point we hope to set the group in the DBadaptor
# hence this
long check etc should be simpler
#
A
t some point we hope to set the group in the DBadaptor
, hence this
#
long check etc
.
should be simpler
.
if
(
$dba
->
isa
('
Bio::EnsEMBL::Compara::DBSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
))
{
if
(
$dba
->
isa
('
Bio::EnsEMBL::Compara::DBSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
compara
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_compara
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Lite::DBAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_compara
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Lite::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
lite
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_lite
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::External::BlastAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_lite
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::External::BlastAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
blast
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_blast
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::ExternalData::SNPSQL::DBAdaptor
'))
{
if
(
!
defined
(
$dba
->
group
()
))
{
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_blast
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::ExternalData::SNPSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
SNP
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_SNP
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Pipeline::DBSQL::DBAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_SNP
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Pipeline::DBSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
pipeline
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_pipeline
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Hive::DBSQL::DBAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_pipeline
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Hive::DBSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
hive
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_hive
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::ExternalData::Haplotype::DBAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_hive
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::ExternalData::Haplotype::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
haplotype
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_haplotype
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Variation::DBSQL::DBAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_haplotype
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Variation::DBSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
variation
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_variation
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor
')){
if
(
!
defined
(
$dba
->
group
())){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_variation
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
funcgen
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_funcgen
;
}
elsif
(
$dba
->
isa
('
Bio::Ensembl::DBSQL::OntologyTermAdaptor
')
)
{
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_funcgen
;
}
elsif
(
$dba
->
isa
('
Bio::Ensembl::DBSQL::OntologyTermAdaptor
')
)
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
ontology
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_ontology
;
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::DBSQL::DBAdaptor
')){
}
elsif
(
$dba
->
isa
('
Bio::EnsEMBL::DBSQL::DBAdaptor
')
)
{
#vega uses the core DBAdaptor so test if vega is in the dbname
if
(
!
defined
(
$dba
->
group
()
))
{
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
core
');
}
if
(
$dba
->
group
eq
"
estgene
"){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_estgene
;
}
elsif
(
$dba
->
group
eq
"
otherfeatures
"){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_otherfeatures
;
}
elsif
(
$dba
->
group
eq
"
vega
"){
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_vega
;
}
else
{
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_core
;
if
(
$dba
->
group
eq
"
estgene
"
)
{
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_estgene
;
}
elsif
(
$dba
->
group
eq
"
otherfeatures
"
)
{
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_otherfeatures
;
}
elsif
(
$dba
->
group
eq
"
vega
"
)
{
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_vega
;
}
else
{
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_core
;
}
}
else
{
# none standard DBA adaptor
if
(
!
defined
(
$dba
->
group
()
))
{
}
else
{
# none standard DBA adaptor
if
(
!
defined
(
$dba
->
group
()
)
)
{
$dba
->
group
('
none_standard
');
}
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_and_attach_dnadb_to_core
;
$config_sub
=
\
&
Bio::EnsEMBL::Utils::ConfigRegistry::
load_and_attach_dnadb_to_core
;
# throw("Unknown DBAdaptor type $dba\n");
}
# return if the connection and species, group are the same
if
(
defined
(
$dba
->
species
)
)
{
my
$db_reg
=
$reg
->
get_DBAdaptor
(
$dba
->
species
,
$dba
->
group
);
if
(
defined
(
$db_reg
)
)
{
if
(
$dba
->
dbc
->
equals
(
$db_reg
->
dbc
)
)
{
return
$db_reg
}
else
{
warn
"
WARN: Species and group same for two seperate databases
\n
"
.
"
Modify species name for one of these
\n
";
my
$msg
=
sprintf
(
'
WARN: Species (%s) and group (%s)
'
.
'
same for two seperate databases
',
$dba
->
species
(),
$dba
->
group
()
);
warn
"
${msg}
\n
Modify species name for one of these
\n
";
$dba
->
species
(
find_unique_species
(
$dba
->
species
,
$dba
->
group
)
);
}
...
...
@@ -192,14 +186,14 @@ sub gen_load{
}
}
Bio::EnsEMBL::
Registry
->
add_DBAdaptor
(
$dba
->
species
(),
$dba
->
group
(),
$dba
);
Bio::EnsEMBL::
Registry
->
add_DBAdaptor
(
$dba
->
species
(),
$dba
->
group
(),
$dba
);
#call the loading subroutine. (add the adaptors to the DBAdaptor)
&
{
$config_sub
}(
$dba
);
return
$dba
;
}
}
## end sub gen_load
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment