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
e5ad705b
Commit
e5ad705b
authored
13 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
unlink object xrefs doe dependents wherer the master is not the top priority
parent
1b6321ef
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
misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
+25
-3
25 additions, 3 deletions
misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
with
25 additions
and
3 deletions
misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
+
25
−
3
View file @
e5ad705b
...
...
@@ -72,7 +72,8 @@ sub process {
}
my
$update_ox_sth
=
$self
->
xref
->
dbc
->
prepare
('
update object_xref set ox_status = "FAILED_PRIORITY" where object_xref_id = ?
');
my
$update_x_sth
=
$self
->
xref
->
dbc
->
prepare
("
update xref set dumped = 'NO_DUMP_ANOTHER_PRIORITY' where xref_id = ?
");
my
$update_x_sth
=
$self
->
xref
->
dbc
->
prepare
("
update xref set dumped = 'NO_DUMP_ANOTHER_PRIORITY' where xref_id = ?
");
my
$dep_sth
=
$self
->
xref
->
dbc
->
prepare
("
select dependent_xref_id, object_xref_id from dependent_xref where master_xref_id = ?
");
#
# Change of tact here to make the sql easier...
...
...
@@ -129,7 +130,9 @@ NEWS
if
(
$xref_id
!=
$best_xref_id
){
if
(
$status
eq
"
DUMP_OUT
"){
$update_x_sth
->
execute
(
$xref_id
);
$update_ox_sth
->
execute
(
$object_xref_id
);
$update_ox_sth
->
execute
(
$object_xref_id
);
#??? what about dependents
$self
->
process_dependents
(
$xref_id
,
$update_ox_sth
,
$dep_sth
);
}
else
{
$update_x_sth
->
execute
(
$xref_id
);
...
...
@@ -146,7 +149,7 @@ NEWS
else
{
# NEW
if
(
$status
eq
"
DUMP_OUT
"){
$last_acc
=
$acc
;
$best_xref_id
=
$xref_id
;
$best_xref_id
=
$xref_id
;
if
(
@gone
and
$last_name
eq
$acc
){
foreach
my
$d
(
@gone
){
$update_x_sth
->
execute
(
$d
);
...
...
@@ -181,4 +184,23 @@ NEWS
$sth
->
finish
;
}
sub
process_dependents
{
my
(
$self
,
$master_xref_id
,
$update_ox_sth
,
$dep_sth
)
=
@_
;
my
@master_xrefs
;
push
@master_xrefs
,
$master_xref_id
;
while
(
my
$xref_id
=
pop
(
@master_xrefs
)){
$dep_sth
->
execute
(
$xref_id
);
my
(
$dep_xref_id
,
$object_xref_id
);
$dep_sth
->
bind_columns
(
\
$dep_xref_id
,
\
$object_xref_id
);
while
(
$dep_sth
->
fetch
()){
$update_ox_sth
->
execute
(
$object_xref_id
);
push
@master_xrefs
,
$dep_xref_id
;
# remember dependents dependents
}
}
}
1
;
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