Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
e7eba346
Commit
e7eba346
authored
Mar 22, 2010
by
Ian Longden
Browse files
Get synonyms via the xref database
parent
2815b709
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
misc-scripts/xref_mapping/XrefParser/UniProtDirectParser.pm
misc-scripts/xref_mapping/XrefParser/UniProtDirectParser.pm
+19
-1
No files found.
misc-scripts/xref_mapping/XrefParser/UniProtDirectParser.pm
View file @
e7eba346
...
...
@@ -78,6 +78,12 @@ sub run {
my
$add_dependent_xref_sth
=
$dbi
->
prepare
("
INSERT INTO dependent_xref (master_xref_id,dependent_xref_id,linkage_annotation, linkage_source_id) VALUES (?,?,?,?)
");
my
$get_aliases_sth
=
$dbi
->
prepare
("
select synonym from synonym where xref_id = ?
");
my
$add_alias_sth
=
$dbi
->
prepare
("
INSERT INTO synonym (xref_id, synonym) VALUES (?, ?)
");
my
$err_count
;
foreach
my
$key
(
keys
%prot2ensembl
){
...
...
@@ -108,13 +114,25 @@ sub run {
$linkage_source_id
{
$dependent_xref_id
}
=
$linkage_source_id
;
}
# print $key."\t";
#
# Add the new xref
#
my
$xref_id
=
XrefParser::
BaseParser
->
add_xref
(
$key
,
$version
,
$label
,
$description
,
$source_id
,
$species_id
,
"
DIRECT
");
#
# Add the synonyms
#
my
$synonym
;
$get_aliases_sth
->
execute
(
$old_xref_id
);
$get_aliases_sth
->
bind_columns
(
\
$synonym
);
while
(
$get_aliases_sth
->
fetch
()){
$add_alias_sth
->
execute
(
$xref_id
,
$synonym
)
||
die
"
Could not add synonym for
$xref_id
,
$synonym
";
}
foreach
my
$trans
(
@
{
$prot2ensembl
{
$key
}}){
#
#add the direct xref entry
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment