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
4bccb1da
Commit
4bccb1da
authored
13 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Remove internal one-off script.
parent
5e54877a
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
sql/rnaseq_update_version.sql
+0
-64
0 additions, 64 deletions
sql/rnaseq_update_version.sql
with
0 additions
and
64 deletions
sql/rnaseq_update_version.sql
deleted
100644 → 0
+
0
−
64
View file @
5e54877a
CREATE
PROCEDURE
rnaseq_version_update
()
BLOCK1
:
BEGIN
DECLARE
v_count
INT
;
DECLARE
v_stable_id
varChar
(
128
);
DECLARE
v_version
INT
;
DECLARE
done
INT
DEFAULT
0
;
DECLARE
cur1
CURSOR
FOR
select
count
(
1
)
,
stable_id
,
version
from
gene_stable_id
group
by
stable_id
,
version
having
count
(
1
)
>
1
;
DECLARE
CONTINUE
HANDLER
FOR
NOT
FOUND
SET
done
=
TRUE
;
OPEN
cur1
;
LOOP1
:
loop
SET
done
=
FALSE
;
FETCH
cur1
INTO
v_count
,
v_stable_id
,
v_version
;
IF
done
THEN
LEAVE
LOOP1
;
END
IF
;
BLOCK2
:
BEGIN
DECLARE
v2_gene_id
INT
;
DECLARE
v2_version
INT
;
DECLARE
done2
INT
DEFAULT
0
;
DECLARE
counter
INT
DEFAULT
0
;
DECLARE
initial_version
INT
;
DECLARE
cur2
CURSOR
FOR
select
g
.
gene_id
,
gs
.
version
from
seq_region
s
,
gene_stable_id
gs
,
gene
g
where
g
.
gene_id
=
gs
.
gene_id
and
s
.
seq_region_id
=
g
.
seq_region_id
and
stable_id
=
v_stable_id
;
DECLARE
CONTINUE
HANDLER
FOR
NOT
FOUND
SET
done2
=
TRUE
;
OPEN
cur2
;
SET
counter
=
0
;
LOOP2
:
loop
SET
done2
=
FALSE
;
FETCH
cur2
INTO
v2_gene_id
,
v2_version
;
IF
done2
THEN
LEAVE
LOOP2
;
END
IF
;
SET
counter
=
counter
+
1
;
IF
(
counter
=
1
)
THEN
SET
initial_version
=
v2_version
;
END
IF
;
IF
(
counter
>
1
)
THEN
UPDATE
gene_stable_id
set
version
=
(
initial_version
+
counter
-
1
)
where
gene_id
=
v2_gene_id
;
END
IF
;
END
loop
LOOP2
;
CLOSE
cur2
;
end
BLOCK2
;
END
loop
LOOP1
;
CLOSE
cur1
;
END
BLOCK1
;
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