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
4c422576
Commit
4c422576
authored
11 years ago
by
Laros
Committed by
Vermaat
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Switched to new style string formatting.
parent
ede6619d
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/describe.py
+13
-13
13 additions, 13 deletions
mutalyzer/describe.py
with
13 additions
and
13 deletions
mutalyzer/describe.py
+
13
−
13
View file @
4c422576
...
...
@@ -264,20 +264,20 @@ class RawVar(models.RawVar):
if
not
self
.
start
:
return
"
=
"
descr
=
"
%i
"
%
self
.
start
descr
=
"
{}
"
.
format
(
self
.
start
)
if
self
.
end
:
descr
+=
"
_
%i
"
%
self
.
end
descr
+=
"
_
{}
"
.
format
(
self
.
end
)
if
self
.
type
!=
"
subst
"
:
descr
+=
"
%s
"
%
self
.
type
descr
+=
"
{}
"
.
format
(
self
.
type
)
if
self
.
inserted
:
return
descr
+
"
%s
"
%
self
.
inserted
return
descr
+
"
{}
"
.
format
(
self
.
inserted
)
return
descr
#if
return
descr
+
"
%s>%s
"
%
(
self
.
deleted
,
self
.
inserted
)
return
descr
+
"
{}>{}
"
.
format
(
self
.
deleted
,
self
.
inserted
)
#__DNADescription
def
__proteinDescription
(
self
):
...
...
@@ -300,22 +300,22 @@ class RawVar(models.RawVar):
if
self
.
type
==
"
ext
"
:
descr
+=
'
*
'
else
:
descr
+=
"
%s
"
%
seq3
(
self
.
startAA
)
descr
+=
"
{}
"
.
format
(
seq3
(
self
.
startAA
)
)
#if
else
:
descr
+=
"
%s
"
%
seq3
(
self
.
deleted
)
descr
+=
"
%i
"
%
self
.
start
descr
+=
"
{}
"
.
format
(
seq3
(
self
.
deleted
)
)
descr
+=
"
{}
"
.
format
(
self
.
start
)
if
self
.
end
:
descr
+=
"
_
%s%i
"
%
(
seq3
(
self
.
endAA
),
self
.
end
)
descr
+=
"
_
{}{}
"
.
format
(
seq3
(
self
.
endAA
),
self
.
end
)
if
self
.
type
not
in
[
"
subst
"
,
"
stop
"
,
"
ext
"
,
"
fs
"
]:
# fs is not a type
descr
+=
self
.
type
if
self
.
inserted
:
descr
+=
"
%s
"
%
seq3
(
self
.
inserted
)
descr
+=
"
{}
"
.
format
(
seq3
(
self
.
inserted
)
)
if
self
.
type
==
"
stop
"
:
return
descr
+
'
*
'
if
self
.
term
:
return
descr
+
"
fs*
%i
"
%
self
.
term
return
descr
+
"
fs*
{}
"
.
format
(
self
.
term
)
return
descr
#__proteinDescription
...
...
@@ -424,7 +424,7 @@ def allele_description(allele):
@rval: unicode
"""
if
len
(
allele
)
>
1
:
return
"
[
%s]
"
%
'
;
'
.
join
(
map
(
lambda
x
:
x
.
hgvs
,
allele
))
return
"
[
{}]
"
.
format
(
'
;
'
.
join
(
map
(
lambda
x
:
x
.
hgvs
,
allele
))
)
return
allele
[
0
].
hgvs
#allele_description
...
...
@@ -450,7 +450,7 @@ def printpos(s, start, end, fill=0):
# visualisation in the __mutate() function of mutator.py
fs
=
10
# Flank size.
return
"
%s %s%s %s
"
%
(
s
[
start
-
fs
:
start
],
s
[
start
:
end
],
'
-
'
*
fill
,
return
"
{} {}{} {}
"
.
format
(
s
[
start
-
fs
:
start
],
s
[
start
:
end
],
'
-
'
*
fill
,
s
[
end
:
end
+
fs
])
#printpos
...
...
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