Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
mutalyzer
Commits
9fd4b961
Commit
9fd4b961
authored
11 years ago
by
Laros
Committed by
Vermaat
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Loosen error severity when CDS cannot be translated
parent
126bd632
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
mutalyzer/variantchecker.py
+26
-17
26 additions, 17 deletions
mutalyzer/variantchecker.py
with
26 additions
and
17 deletions
mutalyzer/variantchecker.py
+
26
−
17
View file @
9fd4b961
...
...
@@ -1799,35 +1799,44 @@ def check_variant(description, output):
if
not
len
(
cds_original
)
%
3
:
try
:
# FIXME this is a bit of a rancid fix.
protein_original
=
cds_original
.
translate
(
table
=
transcript
.
txTable
,
cds
=
True
,
to_stop
=
True
)
protein_original
=
cds_original
.
translate
(
table
=
transcript
.
txTable
,
cds
=
True
,
to_stop
=
True
)
except
Bio
.
Data
.
CodonTable
.
TranslationError
:
output
.
addMessage
(
__file__
,
4
,
"
ETRANS
"
,
"
Original
"
\
"
CDS could not be translated.
"
)
return
protein_variant
=
cds_variant
.
translate
(
table
=
transcript
.
txTable
,
to_stop
=
True
)
try
:
cds_length
=
util
.
cds_length
(
m
ut
ator
.
shift_sites
(
transcript
.
CDS
.
positionList
))
transcript
.
proteinDescription
=
util
.
protein_description
(
cds_length
,
protein_original
,
protein_variant
)[
0
]
except
IndexError
:
# Todo: Probably CDS start was hit by removal of exon...
if
transcript
.
current
:
output
.
addMessage
(
__file__
,
2
,
"
WTRANS
"
,
"
Original CDS could not be translated in gene
"
"
%s, transcript variant %s (selected).
"
%
(
gene
.
name
,
transcript
.
name
))
else
:
o
ut
put
.
addMessage
(
__file__
,
2
,
"
WTRANS_OTHER
"
,
"
Original CDS could not be translated in gene
"
"
%s, transcript variant %s.
"
%
(
gene
.
name
,
transcript
.
name
))
transcript
.
proteinDescription
=
'
p.?
'
else
:
protein_variant
=
cds_variant
.
translate
(
table
=
transcript
.
txTable
,
to_stop
=
True
)
try
:
cds_length
=
util
.
cds_length
(
mutator
.
shift_sites
(
transcript
.
CDS
.
positionList
))
transcript
.
proteinDescription
=
util
.
protein_description
(
cds_length
,
protein_original
,
protein_variant
)[
0
]
except
IndexError
:
# Todo: Probably CDS start was hit by removal of exon..
transcript
.
proteinDescription
=
'
p.?
'
else
:
if
transcript
.
current
:
output
.
addMessage
(
__file__
,
2
,
"
WCDS
"
,
"
CDS length is
"
\
"
not a multiple of three in gene %s, transcript
"
\
"
variant %s (selected).
"
%
(
gene
.
name
,
transcript
.
name
))
transcript
.
proteinDescription
=
'
p.?
'
else
:
output
.
addMessage
(
__file__
,
2
,
"
WCDS_OTHER
"
,
"
CDS length is
"
\
"
not a multiple of three in gene %s, transcript
"
\
"
variant %s.
"
%
(
gene
.
name
,
transcript
.
name
))
transcript
.
proteinDescription
=
'
p.?
'
transcript
.
proteinDescription
=
'
p.?
'
reference
=
output
.
getOutput
(
'
reference
'
)[
-
1
]
if
'
;
'
in
record
.
record
.
description
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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