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
29c4a475
Commit
29c4a475
authored
15 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Modify store() so that it also stores the alternative translations
associated with the transcript.
parent
a729a87b
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
modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm
+49
-2
49 additions, 2 deletions
modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm
with
49 additions
and
2 deletions
modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm
+
49
−
2
View file @
29c4a475
...
...
@@ -745,9 +745,9 @@ sub store {
}
my
$original_translation
=
$transcript
->
translation
();
my
$original
=
$transcript
;
my
$original
=
$transcript
;
my
$seq_region_id
;
(
$transcript
,
$seq_region_id
)
=
$self
->
_pre_store
(
$transcript
);
(
$transcript
,
$seq_region_id
)
=
$self
->
_pre_store
(
$transcript
);
# first store the transcript w/o a display xref
# the display xref needs to be set after xrefs are stored which needs to
...
...
@@ -855,6 +855,53 @@ sub store {
$original_translation
->
adaptor
(
$translation
->
adaptor
()
);
}
## end if ( defined($translation...))
# Do the eqivalent of the above for all alternative translations, if
# there are any.
my
$alt_translations
=
$transcript
->
get_all_alternative_translations
();
if
(
defined
(
$alt_translations
)
&&
scalar
(
@
{
$alt_translations
}
)
>
0
)
{
foreach
my
$alt_translation
(
@
{
$alt_translations
}
)
{
my
$start_exon
=
$alt_translation
->
start_Exon
();
my
$end_exon
=
$alt_translation
->
end_Exon
();
if
(
!
defined
(
$start_exon
)
)
{
throw
("
Translation does not define a start exon.
");
}
elsif
(
!
defined
(
$end_exon
)
)
{
throw
("
Translation does not defined an end exon.
");
}
if
(
!
defined
(
$start_exon
->
dbID
()
)
)
{
my
$key
=
$start_exon
->
hashkey
();
(
$start_exon
)
=
grep
{
$_
->
hashkey
()
eq
$key
}
@
{
$exons
};
if
(
defined
(
$start_exon
)
)
{
$alt_translation
->
start_Exon
(
$start_exon
);
}
else
{
throw
(
"
Translation's start_Exon does not appear to be one of the
"
.
"
exons in its associated Transcript
"
);
}
}
elsif
(
!
defined
(
$end_exon
->
dbID
()
)
)
{
my
$key
=
$end_exon
->
hashkey
();
(
$end_exon
)
=
grep
{
$_
->
hashkey
()
eq
$key
}
@$exons
;
if
(
defined
(
$end_exon
)
)
{
$translation
->
end_Exon
(
$end_exon
);
}
else
{
throw
(
"
Translation's end_Exon does not appear to be one of the
"
.
"
exons in its associated Transcript.
"
);
}
}
$db
->
get_TranslationAdaptor
()
->
store
(
$alt_translation
,
$transc_dbID
);
}
## end foreach my $alt_translation...
}
## end if ( defined($alt_translations...))
#
# store the xrefs/object xref mapping
#
...
...
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