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
efe1fee8
Commit
efe1fee8
authored
19 years ago
by
Glenn Proctor
Browse files
Options
Downloads
Patches
Plain Diff
Added searching for unlinked transcripts to deal with alternaltive UTRs in elegans.
parent
d9d39b5e
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/BasicMapper.pm
+31
-10
31 additions, 10 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
with
31 additions
and
10 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+
31
−
10
View file @
efe1fee8
...
...
@@ -1001,15 +1001,6 @@ sub dump_direct_xrefs {
my
$ensembl_internal_id
=
$stable_id_to_internal_id
->
{
$type
}
->
{
$ensembl_stable_id
};
# horrible hack to deal with UTR transcripts in Elegans
my
$postfix
=
1
;
while
(
!
$ensembl_internal_id
&&
$postfix
<
5
)
{
my
$utr_stable_id
=
$ensembl_stable_id
.
"
.
$postfix
"
;
$ensembl_internal_id
=
$stable_id_to_internal_id
->
{
$type
}
->
{
$utr_stable_id
};
$postfix
++
;
}
# end horrible hack
if
(
$ensembl_internal_id
)
{
if
(
!
$xrefs_written
{
$xref_id
})
{
...
...
@@ -1022,10 +1013,39 @@ sub dump_direct_xrefs {
}
else
{
print
STDERR
"
Can't find
$type
corresponding to stable ID
$ensembl_stable_id
in
${type}
_stable_id, not writing record for xref
$accession
\n
";
# deal with UTR transcripts in Elegans and potentially others
# Need to link xrefs that are listed as linking to e.g. ZK829.4
# to each of ZK829.4.1, ZK829.4.2, ZK829.4.3
my
$old_object_xref_id
=
$object_xref_id
;
if
(
$source_id
==
get_source_id_from_source_name
(
$self
->
xref
(),
"
wormpep_id
"))
{
# search for matching stable IDs
my
$pat
=
$ensembl_stable_id
.
'
\..+
';
foreach
my
$stable_id
(
keys
%
{
$stable_id_to_internal_id
->
{
$type
}})
{
if
(
$stable_id
=~
/$pat/
)
{
if
(
!
$xrefs_written
{
$xref_id
})
{
print
XREF
(
$xref_id
+
$xref_id_offset
)
.
"
\t
"
.
$external_db_id
.
"
\t
"
.
$accession
.
"
\t
"
.
$label
.
"
\t
"
.
$version
.
"
\t
"
.
$description
.
"
\n
";
$xrefs_written
{
$xref_id
}
=
1
;
}
$ensembl_internal_id
=
$stable_id_to_internal_id
->
{
$type
}
->
{
$stable_id
};
print
OBJECT_XREF
"
$object_xref_id
\t
$ensembl_internal_id
\t
"
.
ucfirst
(
$type
)
.
"
\t
"
.
(
$xref_id
+
$xref_id_offset
)
.
"
\n
";
$object_xref_id
++
;
}
}
# foreach stable_id
}
# if source_id
# if we haven't changed $object_xref_id, nothing was written
print
STDERR
"
Can't find
$type
corresponding to stable ID
$ensembl_stable_id
in
${type}
_stable_id, not writing record for xref
$accession
\n
"
if
(
$object_xref_id
==
$old_object_xref_id
);
}
}
}
...
...
@@ -2041,3 +2061,4 @@ sub upload_external_db {
}
1
;
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