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
4d89cbc7
Commit
4d89cbc7
authored
20 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
allow alternate codon tables to be used for translations
parent
f4ef5196
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/Transcript.pm
+14
-2
14 additions, 2 deletions
modules/Bio/EnsEMBL/Transcript.pm
with
14 additions
and
2 deletions
modules/Bio/EnsEMBL/Transcript.pm
+
14
−
2
View file @
4d89cbc7
...
...
@@ -1188,7 +1188,7 @@ sub translate {
# remove final stop codon from the mrna if it is present
# produced peptides will not have '*' at end
# if terminal stop codon is desired call translatable_seq directly
# if terminal stop codon is desired call translatable_seq directly
# and produce a translation from it
if
(
CORE::
length
(
$mrna
)
%
3
==
0
)
{
...
...
@@ -1200,7 +1200,19 @@ sub translate {
-
alphabet
=>
'
dna
',
-
id
=>
$display_id
);
my
$translation
=
$peptide
->
translate
();
# Alternative codon tables (such as the mitochondrial codon table) can
# be sepcified for a sequence region via the seq_region_attrib table.
# A list of codon tables and their codes is at:
# http://www.ncbi.nlm.nih.gov/htbin-post/Taxonomy/wprintgc?mode=c
my
$codon_table
;
if
(
$self
->
slice
())
{
(
$codon_table
)
=
@
{
$self
->
slice
()
->
get_all_Attributes
('
codon_table
')};
}
$codon_table
||=
1
;
# default vertebrate codon table
my
$translation
=
$peptide
->
translate
(
undef
,
undef
,
undef
,
$codon_table
);
if
(
$self
->
edits_enabled
())
{
$self
->
translation
()
->
modify_translation
(
$translation
);
...
...
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