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
9ac2cd93
Commit
9ac2cd93
authored
20 years ago
by
Steve Trevanion
Browse files
Options
Downloads
Patches
Plain Diff
late commit, plus addition of new logic name for vega genscans
parent
46b2c141
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/SchemaConversion.pm
+67
-26
67 additions, 26 deletions
modules/Bio/EnsEMBL/Utils/SchemaConversion.pm
with
67 additions
and
26 deletions
modules/Bio/EnsEMBL/Utils/SchemaConversion.pm
+
67
−
26
View file @
9ac2cd93
...
...
@@ -65,13 +65,14 @@ sub new {
my
$siteroot
=
$self
->
conv_support
->
serverroot
;
$self
->
conv_support
->
param
('
vega_sql
',
$siteroot
.
$self
->
conv_support
->
param
('
vega_sql
'));
$self
->
conv_support
->
param
('
core_sql
',
$siteroot
.
$self
->
conv_support
->
param
('
core_sql
'));
$self
->
conv_support
->
param
('
patch_sql
',
$siteroot
.
$self
->
conv_support
->
param
('
patch_sql
'));
return
$self
;
}
=head2 conv_support
Example : $conversion->conv_support;
Description :
This method p
rovides access to Bio::EnsEMBL::Utils::ConversionSupport methods
Description :
P
rovides access to Bio::EnsEMBL::Utils::ConversionSupport methods
Return type : Bio::EnsEMBL::Utils::ConversionSuppor object
Exceptions : none
Caller : general
...
...
@@ -83,6 +84,22 @@ sub conv_support {
return
$self
->
{
config
};
}
=head2 conv_obj
Example : $conversion->conv_obj;
Description : Provides access to SeqStoreConverter::BasicConverter methods
Return type : SeqStoreConverter::BasicConverter object
Exceptions : none
Caller : general
=cut
sub
conv_obj
{
my
$self
=
shift
;
return
$self
->
{'
converter_object
'};
}
=head2 species_alias
Example : $self->species_alias
...
...
@@ -175,40 +192,63 @@ sub choose_conversion_type {
sub
do_conversion
{
my
$self
=
shift
;
$self
->
{
conv
erter_object
}
->
debug
(
"
\n\n
*** converting
"
.
$self
->
{
conv
erter_object
}
->
source
.
"
to
"
.
$self
->
{
conv
erter_object
}
->
target
()
.
"
***
");
$self
->
{
conv
erter_object
}
->
transfer_meta
();
$self
->
{
conv
erter_object
}
->
create_coord_systems
();
$self
->
{
conv
erter_object
}
->
create_seq_regions
();
$self
->
{
conv
erter_object
}
->
create_assembly
();
$self
->
{
conv
erter_object
}
->
create_attribs
();
$self
->
{
conv
erter_object
}
->
set_top_level
();
$self
->
conv
_obj
->
debug
(
"
\n\n
*** converting
"
.
$self
->
conv
_obj
->
source
.
"
to
"
.
$self
->
conv
_obj
->
target
()
.
"
***
");
$self
->
conv
_obj
->
transfer_meta
();
$self
->
conv
_obj
->
create_coord_systems
();
$self
->
conv
_obj
->
create_seq_regions
();
$self
->
conv
_obj
->
create_assembly
();
$self
->
conv
_obj
->
create_attribs
();
$self
->
conv
_obj
->
set_top_level
();
$self
->
{
conv
erter_object
}
->
transfer_dna
();
$self
->
{
conv
erter_object
}
->
transfer_genes
();
$self
->
{
conv
erter_object
}
->
transfer_prediction_transcripts
();
$self
->
conv
_obj
->
transfer_dna
();
$self
->
conv
_obj
->
transfer_genes
();
$self
->
conv
_obj
->
transfer_prediction_transcripts
();
if
(
$self
->
conv_support
->
param
('
do_features
'))
{
$self
->
{
conv
erter_object
}
->
transfer_features
();
$self
->
conv
_obj
->
transfer_features
();
}
if
(
$self
->
conv_support
->
param
('
do_vega_schema_conversion
'))
{
$self
->
{
converter_object
}
->
transfer_vega_stable_ids
();
}
else
{
$self
->
{
converter_object
}
->
transfer_stable_ids
();
}
$self
->
{
converter_object
}
->
copy_other_tables
();
$self
->
{
converter_object
}
->
copy_repeat_consensus
();
$self
->
{
converter_object
}
->
create_meta_coord
();
#use this for both ensembl and vega for now,
#but might need changing when vega gets eg transcript modified dates
$self
->
conv_obj
->
transfer_vega_stable_ids
();
$self
->
conv_obj
->
copy_other_tables
();
$self
->
conv_obj
->
copy_repeat_consensus
();
$self
->
conv_obj
->
create_meta_coord
();
if
(
$self
->
conv_support
->
param
('
do_vega_schema_conversion
'))
{
$self
->
{
converter_object
}
->
update_clone_info
();
$self
->
{
converter_object
}
->
remove_supercontigs
();
$self
->
{
converter_object
}
->
copy_internal_clone_names
();
$self
->
conv_obj
->
update_clone_info
();
$self
->
conv_obj
->
remove_supercontigs
();
$self
->
conv_obj
->
copy_internal_clone_names
();
$self
->
conv_obj
->
update_genscan
();
}
print
STDERR
"
*** All finished ***
\n
";
}
=head2 make_schema_up_to_date
Example : $conversion->make_schema_up_to_date
Description : patches schema to latest version
Return type : none
Exceptions : none
Caller : $conversion
=cut
sub
make_schema_up_to_date
{
my
$self
=
shift
;
$self
->
conv_obj
->
debug
("
\n
*** Patching schema to latest version ***
\n
");
my
$user
=
$self
->
conv_obj
->
user
;
my
$pass
=
$self
->
conv_obj
->
password
;
my
$port
=
$self
->
conv_obj
->
port
;
my
$host
=
$self
->
conv_obj
->
host
;
my
$target
=
$self
->
conv_obj
->
target
;
my
$patch_schema
=
$self
->
conv_support
->
param
('
patch_sql
');
my
$cmd
=
"
/usr/local/mysql/bin/mysql -u
$user
-p
$pass
-P
$port
-h
$host
$target
<
$patch_schema
";
system
(
$cmd
);
}
=head2 conv_usage
Example : $conversion->conv_usage("message")
...
...
@@ -242,6 +282,7 @@ options: -pass <password> the mysql user's password (required)
target_db (schema 20+ trget database)
core_sql (location of ensembl schema creation script eg ensembl/sql/table.sql)
vega_sql (location of creation script for additinoal vega tables eg ensembl/sql/vega_specific_tables.sql)
patch_sql (location of schema patching script eg ensembl/sql/vega_latest_schema.sql)
force (overwrite existing target database? 0 or 1)
verbose (print out debug statements 0 or 1)
do_features (0 or 1 - transfer dna- and protein-align features, for debugging)
...
...
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