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
0025f167
Commit
0025f167
authored
15 years ago
by
Daniel Rios
Browse files
Options
Downloads
Patches
Plain Diff
added indexes in bak tables
parent
ceb7bf0a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/assembly/load_alternative_assembly.pl
+12
-7
12 additions, 7 deletions
misc-scripts/assembly/load_alternative_assembly.pl
with
12 additions
and
7 deletions
misc-scripts/assembly/load_alternative_assembly.pl
+
12
−
7
View file @
0025f167
...
...
@@ -163,13 +163,18 @@ $dbh->{'alt'} = $dba->{'alt'}->dbc->db_handle;
#
$support
->
log_stamped
("
Creating table backups...
\n
");
$support
->
log_stamped
("
seq_region...
\n
",
1
);
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE seq_region_bak SELECT * FROM seq_region
');
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE seq_region_bak LIKE seq_region
');
$dbh
->
{'
ref
'}
->
do
('
INSERT INTO seq_region_bak SELECT * FROM seq_region
');
$support
->
log_stamped
("
assembly...
\n
",
1
);
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE assembly_bak SELECT * FROM assembly
');
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE assembly_bak LIKE assembly
');
$dbh
->
{'
ref
'}
->
do
('
INSERT INTO assembly_bak SELECT * FROM assembly
');
$support
->
log_stamped
("
meta...
\n
",
1
);
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE meta_bak SELECT * FROM meta
');
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE meta_bak LIKE meta
');
$dbh
->
{'
ref
'}
->
do
('
INSERT INTO meta_bak SELECT * FROM meta
');
$support
->
log_stamped
("
coord_system...
\n
",
1
);
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE coord_system_bak SELECT * FROM coord_system
');
$dbh
->
{'
ref
'}
->
do
('
CREATE TABLE coord_system_bak LIKE coord_system
');
$dbh
->
{'
ref
'}
->
do
('
INSERT INTO coord_system_bak SELECT * FROM coord_system
');
$support
->
log_stamped
("
Done.
\n\n
");
#####
...
...
@@ -243,7 +248,7 @@ my $alt_assembly = $support->param('altassembly');
# fetch and insert alternative seq_regions with adjusted seq_region_id and
# coord_system_id
$sql
=
qq(
INSERT INTO $ref_db.seq_region
INSERT
IGNORE
INTO $ref_db.seq_region
SELECT
sr.seq_region_id+$sri_adjust,
sr.name,
...
...
@@ -267,7 +272,7 @@ $support->log_stamped("Adding coord_system entries...\n");
$c
=
0
;
foreach
my
$cs
(
@coord_systems
)
{
$sql
=
qq(
INSERT INTO $ref_db.coord_system
INSERT
IGNORE
INTO $ref_db.coord_system
SELECT coord_system_id+$csi_adjust, 1,name, version,
(SELECT MAX(rank)+1 FROM $ref_db.coord_system), ''
FROM coord_system
...
...
@@ -287,7 +292,7 @@ foreach my $cs (@coord_systems) {
my
$mappingstring
=
"
$cs
:
"
.
$support
->
param
('
assembly
')
.
"
#
$cs
:
"
.
$support
->
param
('
altassembly
');
$sql
=
qq(
INSERT INTO meta (meta_key, meta_value)
INSERT
IGNORE
INTO meta (meta_key, meta_value)
VALUES ('assembly.mapping', '$mappingstring')
)
;
$c
+=
$dbh
->
{'
ref
'}
->
do
(
$sql
);
...
...
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