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
95304162
Commit
95304162
authored
13 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
Add synonyms
parent
16615a5a
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/MGIParser.pm
+14
-0
14 additions, 0 deletions
misc-scripts/xref_mapping/XrefParser/MGIParser.pm
with
14 additions
and
0 deletions
misc-scripts/xref_mapping/XrefParser/MGIParser.pm
+
14
−
0
View file @
95304162
...
...
@@ -51,6 +51,7 @@ sub run {
my
%description
;
my
%accession
;
my
$dbi
=
$self
->
dbi
();
my
$sql
=
'
select source_id, priority_description from source where name like "MGI"
';
...
...
@@ -80,7 +81,15 @@ sub run {
}
}
$sth
->
finish
;
#synonyms
$sql
=
"
insert into synonym (xref_id, synonym) values (?, ?)
";
my
$add_syn_sth
=
$dbi
->
prepare
(
$sql
);
my
$syn_hash
=
$self
->
get_ext_synonyms
("
MGI
");
my
$count
=
0
;
my
$syn_count
=
0
;
while
(
my
$line
=
$file_io
->
getline
()
)
{
#MGI:1915941 1110028C15Rik RIKEN cDNA 1110028C15 gene 33.61 1 ENSMUSG00000026004 ENSMUST00000042389 ENSMUST00000068168 ENSMUST00000113987 ENSMUST00000129190 ENSMUST00000132960 ENSMUSP00000036975 ENSMUSP00000063843 ENSMUSP00000109620 ENSMUSP00000118603
...
...
@@ -89,6 +98,11 @@ sub run {
my
$ensid
=
$
2
;
my
$xref_id
=
XrefParser::
BaseParser
->
add_xref
(
$acc
,
$version
{
$acc
},
$label
{
$acc
},
$description
{
$acc
},
$source_id
,
$species_id
,
"
DIRECT
");
XrefParser::
BaseParser
->
add_direct_xref
(
$xref_id
,
$ensid
,
"
Gene
",
'');
if
(
defined
(
$syn_hash
->
{
$acc
})){
foreach
my
$syn
(
@
{
$syn_hash
->
{
$acc
}}){
$add_syn_sth
->
execute
(
$xref_id
,
$syn
);
}
}
$count
++
;
}
else
{
...
...
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