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
40f37b1a
Commit
40f37b1a
authored
17 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
UPDATE existing analysis if it doesn't match the 'parameters'.
parent
cb5edcf3
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/CoordinateMapper.pm
+38
-16
38 additions, 16 deletions
misc-scripts/xref_mapping/XrefMapper/CoordinateMapper.pm
with
38 additions
and
16 deletions
misc-scripts/xref_mapping/XrefMapper/CoordinateMapper.pm
+
38
−
16
View file @
40f37b1a
...
...
@@ -22,7 +22,7 @@ our @EXPORT = qw( run_coordinatemapping );
our
$coding_weight
=
2
;
our
$ens_weight
=
3
;
our
$transcript_score_threshold
=
0.
90
;
our
$transcript_score_threshold
=
0.
75
;
sub
run_coordinatemapping
{
my
(
$mapper
,
$do_upload
)
=
@_
;
...
...
@@ -100,29 +100,51 @@ sub run_coordinatemapping {
my
$analysis_id
=
$analysis_sth
->
fetchall_arrayref
()
->
[
0
][
0
];
if
(
!
defined
(
$analysis_id
)
)
{
log_progress
("
Can not find analysis ID for this analysis:
\n
");
log_progress
("
logic_name = 'XrefCoordinateMapping'
\n
");
log_progress
(
"
parameters = '%s'
\n
",
$analysis_params
);
$analysis_id
=
$core_dbh
->
selectall_arrayref
(
"
SELECT analysis_id FROM analysis
"
.
"
WHERE logic_name = 'XrefCoordinateMapping'
"
)
->
[
0
][
0
];
if
(
defined
(
$analysis_id
)
&&
$do_upload
)
{
log_progress
(
"
Will update 'analysis' table
"
.
"
with new parameter settings
\n
"
);
if
(
$do_upload
)
{
#-----------------------------------------------------------------
#
Store a new
analysis.
#
Update an existing
analysis.
#-----------------------------------------------------------------
log_progress
("
A new analysis will be added
\n
");
my
$sql
=
qq(
UPDATE analysis
SET created = now(), parameters = ?
WHERE analysis_id = ?
)
;
$core_dbh
->
do
(
$sql
,
undef
,
$analysis_params
,
$analysis_id
);
}
else
{
log_progress
("
Can not find analysis ID for this analysis:
\n
");
log_progress
("
logic_name = 'XrefCoordinateMapping'
\n
");
log_progress
(
"
parameters = '%s'
\n
",
$analysis_params
);
$analysis_id
=
$core_dbh
->
selectall_arrayref
(
if
(
$do_upload
)
{
#---------------------------------------------------------------
# Store a new analysis.
#---------------------------------------------------------------
log_progress
("
A new analysis will be added
\n
");
$analysis_id
=
$core_dbh
->
selectall_arrayref
(
'
SELECT MAX(analysis_id) FROM analysis
')
->
[
0
][
0
];
log_progress
(
"
Last used analysis_id is %d
\n
",
$analysis_id
);
log_progress
(
"
Last used analysis_id is %d
\n
",
$analysis_id
);
my
$sql
=
'
INSERT INTO analysis
'
.
'
VALUES(?, now(), ?, \N, \N, \N, ?, \N, \N, ?, ?, \N, \N, \N)
';
my
$sth
=
$core_dbh
->
prepare
(
$sql
);
my
$sql
=
'
INSERT INTO analysis
'
.
'
VALUES(?, now(), ?, \N, \N, \N, ?, \N, \N, ?, ?, \N, \N, \N)
';
my
$sth
=
$core_dbh
->
prepare
(
$sql
);
$sth
->
execute
(
++
$analysis_id
,
'
XrefCoordinateMapping
',
'
xref_mapper.pl
',
$analysis_params
,
'
CoordinateMapper.pm
'
);
}
$sth
->
execute
(
++
$analysis_id
,
'
XrefCoordinateMapping
',
'
xref_mapper.pl
',
$analysis_params
,
'
CoordinateMapper.pm
'
);
}
}
## end else [ if ( defined($analysis_id...
}
## end if ( !defined($analysis_id...
if
(
defined
(
$analysis_id
)
)
{
...
...
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