Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
92310f88
Commit
92310f88
authored
Mar 17, 2010
by
Steve Trevanion
Browse files
whitespace, remove old Glovar method!
parent
1fcf4a7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
472 additions
and
534 deletions
+472
-534
modules/Bio/EnsEMBL/Utils/ConversionSupport.pm
modules/Bio/EnsEMBL/Utils/ConversionSupport.pm
+472
-534
No files found.
modules/Bio/EnsEMBL/Utils/ConversionSupport.pm
View file @
92310f88
...
...
@@ -394,7 +394,6 @@ sub create_commandline_options {
$param_hash
{
$param
}
=
$first
;
}
}
}
# replace values
...
...
@@ -684,10 +683,8 @@ sub get_database {
"
${prefix}
host
",
"
${prefix}
port
",
"
${prefix}
user
",
# "${prefix}pass", not required since might be empty
"
${prefix}
dbname
",
);
my
%adaptors
=
(
core
=>
'
Bio::EnsEMBL::DBSQL::DBAdaptor
',
ensembl
=>
'
Bio::EnsEMBL::DBSQL::DBAdaptor
',
...
...
@@ -780,60 +777,6 @@ sub get_dbconnection {
}
=head2 get_glovar_database
Example : my $dba = $support->get_glovar_database;
Description : Connects to the Glovar database.
Return type : Bio::EnsEMBL::ExternalData::Glovar::DBAdaptor
Exceptions : thrown if no connection to a core db exists
Caller : general
=cut
sub
get_glovar_database
{
my
$self
=
shift
;
$self
->
check_required_params
(
qw(
glovarhost
glovarport
glovaruser
glovarpass
glovardbname
oracle_home
ld_library_path
glovar_snp_consequence_exp
)
);
# check for core dbadaptor
my
$core_db
=
$self
->
dba
;
unless
(
$core_db
&&
(
ref
(
$core_db
)
=~
/Bio::.*::DBSQL::DBAdaptor/
))
{
$self
->
log_error
("
You have to connect to a core db before you can get a glovar dbadaptor.
\n
");
exit
;
}
# setup Oracle environment
$ENV
{'
ORACLE_HOME
'}
=
$self
->
param
('
oracle_home
');
$ENV
{'
LD_LIBRARY_PATH
'}
=
$self
->
param
('
ld_library_path
');
# connect to Glovar db
$self
->
dynamic_use
('
Bio::EnsEMBL::ExternalData::Glovar::DBAdaptor
');
my
$dba
=
Bio::EnsEMBL::ExternalData::Glovar::
DBAdaptor
->
new
(
-
host
=>
$self
->
param
("
glovarhost
"),
-
port
=>
$self
->
param
("
glovarport
"),
-
user
=>
$self
->
param
("
glovaruser
"),
-
pass
=>
$self
->
param
("
glovarpass
"),
-
dbname
=>
$self
->
param
("
glovardbname
"),
-
group
=>
'
glovar
',
);
# setup adaptor inter-relationships
$dba
->
dnadb
(
$core_db
);
$self
->
dynamic_use
('
Bio::EnsEMBL::ExternalData::Glovar::GlovarSNPAdaptor
');
my
$glovar_snp_adaptor
=
$dba
->
get_GlovarSNPAdaptor
;
$glovar_snp_adaptor
->
consequence_exp
(
$self
->
param
('
glovar_snp_consequence_exp
'));
$core_db
->
add_ExternalFeatureAdaptor
(
$glovar_snp_adaptor
);
return
$dba
;
}
=head2 dba
...
...
@@ -867,8 +810,7 @@ sub dba {
sub
dynamic_use
{
my
(
$self
,
$classname
)
=
@_
;
my
(
$parent_namespace
,
$module
)
=
$classname
=~
/^(.*::)(.*)$/
?
(
$
1
,
$
2
)
:
('
::
',
$classname
);
my
(
$parent_namespace
,
$module
)
=
$classname
=~
/^(.*::)(.*)$/
?
(
$
1
,
$
2
)
:
('
::
',
$classname
);
no
strict
'
refs
';
# return if module has already been imported
...
...
@@ -1272,9 +1214,7 @@ sub log_error {
sub
log_verbose
{
my
(
$self
,
$txt
,
$indent
)
=
@_
;
return
(
0
)
unless
$self
->
param
('
verbose
');
$self
->
log
(
$txt
,
$indent
);
return
(
1
);
}
...
...
@@ -1295,11 +1235,9 @@ sub log_verbose {
sub
log_stamped
{
my
(
$self
,
$txt
,
$indent
)
=
@_
;
# append timestamp and memory usage to log text
$txt
=~
s/(\n*)$//
;
$txt
.=
"
"
.
$self
->
date_and_mem
.
$
1
;
$self
->
log
(
$txt
,
$indent
);
return
(
1
);
}
...
...
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