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
ea268756
Commit
ea268756
authored
17 years ago
by
Will Spooner
Browse files
Options
Downloads
Patches
Plain Diff
Added parameter checking to add_to_xrefs method
parent
55dce2ed
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/XrefParser/BaseParser.pm
+20
-3
20 additions, 3 deletions
misc-scripts/xref_mapping/XrefParser/BaseParser.pm
with
20 additions
and
3 deletions
misc-scripts/xref_mapping/XrefParser/BaseParser.pm
+
20
−
3
View file @
ea268756
...
...
@@ -1426,6 +1426,7 @@ sub get_direct_xref{
return
undef
;
}
sub
get_xref
{
my
(
$self
,
$acc
,
$source
)
=
@_
;
...
...
@@ -1461,12 +1462,28 @@ sub add_xref {
sub
add_to_xrefs
{
my
(
$self
,
$master_xref
,
$acc
,
$version
,
$label
,
$description
,
$linkage
,
$source_id
,
$species_id
)
=
@_
;
$master_xref
||
die
(
"
Need a master_xref_id on which this xref depends
"
);
$acc
||
die
(
"
Need an accession of this dependent xref
"
);
$version
||=
0
;
$label
||=
$acc
;
$description
||=
undef
;
$linkage
||=
undef
;
$source_id
||
die
(
"
Need a source_id for this dependent xref
"
);
$species_id
||
die
(
"
Need a species_id for this dependent xref
"
);
if
(
!
defined
(
$add_xref_sth
)){
$add_xref_sth
=
dbi
->
prepare
("
INSERT INTO xref (accession,version,label,description,source_id,species_id)
"
.
"
VALUES(?,?,?,?,?,?)
");
$add_xref_sth
=
dbi
->
prepare
("
INSERT INTO xref
(accession,version,label,description,source_id,species_id)
VALUES
(?,?,?,?,?,?)
");
}
if
(
!
defined
(
$add_dependent_xref_sth
)){
$add_dependent_xref_sth
=
dbi
->
prepare
("
INSERT INTO dependent_xref VALUES(?,?,?,?)
");
$add_dependent_xref_sth
=
dbi
->
prepare
("
INSERT INTO dependent_xref
(master_xref_id,dependent_xref_id,linkage_annotation,linkage_source_id)
VALUES
(?,?,?,?)
");
}
my
$dependent_id
=
$self
->
get_xref
(
$acc
,
$source_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