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
7fd559e5
Commit
7fd559e5
authored
9 years ago
by
Kieron Taylor
Committed by
Magali Ruffier
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove egregious spelling and comments. Also fix some tabulation.
parent
13c23615
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
+26
-35
26 additions, 35 deletions
misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
with
26 additions
and
35 deletions
misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
+
26
−
35
View file @
7fd559e5
...
...
@@ -40,7 +40,7 @@ use IPC::Open3;
#
# 3) for each of the source names
# set ox_status to 'FAILED_PRIORITY' for those not the best match
# Also do this f
r
o its depenedents
# Also do this fo
r
its depenedents
#
sub
new
{
...
...
@@ -84,7 +84,7 @@ sub process {
my
@names
=
$self
->
get_priority_names
();
print
"
The fo
i
llowing will be processed as priority xrefs
\n
"
if
(
$self
->
verbose
);
print
"
The following will be processed as priority xrefs
\n
"
if
(
$self
->
verbose
);
foreach
my
$name
(
@names
){
print
"
\t
$name
\n
"
if
(
$self
->
verbose
);
}
...
...
@@ -92,10 +92,6 @@ 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 = ?
");
#
# Change of tact here to make the sql easier...
#
# 1) Set to failed all those that have no object xrefs.
my
$f_sql
=
(
<<
FSQL
);
...
...
@@ -179,7 +175,7 @@ SEQCP
my
@gone
;
while
(
$sth
->
fetch
){
if
(
$last_acc
eq
$acc
){
if
(
$xref_id
!=
$best_xref_id
){
if
(
$xref_id
!=
$best_xref_id
){
if
(
$xref_id
==
$last_xref_id
)
{
$seen
=
1
;
}
else
{
...
...
@@ -197,7 +193,7 @@ SEQCP
$best_ox_sth
->
fetch
();
$idx_copy_sth
->
execute
(
$query_identity
,
$target_identity
,
$hit_start
,
$hit_end
,
$translation_start
,
$translation_end
,
$cigar_line
,
$score
,
$evalue
,
$best_object_xref_id
);
}
if
(
$status
eq
"
DUMP_OUT
"){
if
(
$status
eq
"
DUMP_OUT
"){
$update_ox_sth
->
execute
(
$object_xref_id
);
## If it is the first time processing this xref_id, also process dependents and update status
if
(
!
$seen
)
{
...
...
@@ -207,33 +203,33 @@ SEQCP
$self
->
process_dependents
(
$xref_id
,
$best_xref_id
,
$object_type
,
\
@best_ensembl_id
);
}
}
else
{
$update_x_sth
->
execute
(
$xref_id
);
}
}
else
{
else
{
$update_x_sth
->
execute
(
$xref_id
);
}
}
else
{
## There might be several mappings for the best priority
push
@best_ensembl_id
,
$ensembl_id
;
}
if
(
@gone
){
#best priority failed so anoth
r
e one now found so set dumped;
if
(
$last_name
eq
$acc
){
foreach
my
$d
(
@gone
){
$update_x_sth
->
execute
(
$d
);
}
}
}
if
(
@gone
){
#best priority failed so anothe
r
one now found so set dumped;
if
(
$last_name
eq
$acc
){
foreach
my
$d
(
@gone
){
$update_x_sth
->
execute
(
$d
);
}
}
}
}
else
{
# NEW
if
(
$status
eq
"
DUMP_OUT
"){
$last_acc
=
$acc
;
$best_xref_id
=
$xref_id
;
@best_ensembl_id
=
(
$ensembl_id
);
if
(
@gone
and
$last_name
eq
$acc
){
foreach
my
$d
(
@gone
){
$update_x_sth
->
execute
(
$d
);
}
@gone
=
();
}
}
if
(
$status
eq
"
DUMP_OUT
"){
$last_acc
=
$acc
;
$best_xref_id
=
$xref_id
;
@best_ensembl_id
=
(
$ensembl_id
);
if
(
@gone
and
$last_name
eq
$acc
){
foreach
my
$d
(
@gone
){
$update_x_sth
->
execute
(
$d
);
}
@gone
=
();
}
}
else
{
if
(
$last_name
eq
$acc
){
push
@gone
,
$xref_id
;
}
...
...
@@ -255,11 +251,6 @@ SEQCP
$idx_copy_sth
->
finish
;
$syn_copy_sth
->
finish
;
# We want to make sure that if a priority xref is NOT MAPPEd then we only
$sth
=
$self
->
xref
->
dbc
->
prepare
("
insert into process_status (status, date) values('prioritys_flagged',now())
");
$sth
->
execute
();
$sth
->
finish
;
...
...
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