Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
8a47dff6
Commit
8a47dff6
authored
4 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Residue numbers must be unique when using them to align residues to a SEQRES
parent
3544f890
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/seq/alg/pymod/__init__.py
+7
-0
7 additions, 0 deletions
modules/seq/alg/pymod/__init__.py
with
7 additions
and
0 deletions
modules/seq/alg/pymod/__init__.py
+
7
−
0
View file @
8a47dff6
...
...
@@ -100,10 +100,17 @@ def AlignToSEQRES(chain, seqres, try_resnum_first=False, validate=True):
return
seq
.
CreateAlignment
()
if
try_resnum_first
:
aln_seq
=
seq
.
CreateSequence
(
'
atoms
'
,
'
-
'
*
len
(
seqres
))
aligned_resnums
=
set
()
for
r1
in
residues
:
if
r1
.
number
.
num
in
aligned_resnums
:
LogWarning
(
'
Residue numbers must be unique. Already observed %i,
'
\
'
cannot align %s anymore.
'
%
(
r1
.
number
.
num
,
r1
.
qualified_name
))
try_resnum_first
=
False
break
if
r1
.
number
.
num
<=
len
(
seqres
)
and
r1
.
number
.
num
>
0
:
if
IsEqual
(
seqres
[
r1
.
number
.
num
-
1
],
r1
.
one_letter_code
):
aln_seq
[
r1
.
number
.
num
-
1
]
=
r1
.
one_letter_code
aligned_resnums
.
add
(
r1
.
number
.
num
)
else
:
LogWarning
(
'
Sequence mismatch: chain has
"'
+
r1
.
one_letter_code
+
'"
, while SEQRES is
"'
+
seqres
[
r1
.
number
.
num
-
1
]
+
...
...
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