Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pdbfixer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pdbfixer
Commits
4e2daa1e
Unverified
Commit
4e2daa1e
authored
Aug 09, 2019
by
peastman
Committed by
GitHub
Aug 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #184 from peastman/insertion
Improved handling of insertion codes
parents
9f93a85b
a9feaed6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
pdbfixer/pdbfixer.py
+11
-6
No files found.
pdbfixer/pdbfixer.py
View file @
4e2daa1e
...
@@ -599,12 +599,17 @@ class PDBFixer(object):
...
@@ -599,12 +599,17 @@ class PDBFixer(object):
# Find the sequence of each chain, with gaps for missing residues.
# Find the sequence of each chain, with gaps for missing residues.
for
chain
in
chains
:
for
chain
in
chains
:
minResidue
=
min
(
int
(
r
.
id
)
for
r
in
chain
.
residues
())
residues
=
list
(
chain
.
residues
())
maxResidue
=
max
(
int
(
r
.
id
)
for
r
in
chain
.
residues
())
ids
=
[
int
(
r
.
id
)
for
r
in
residues
]
residues
=
[
None
]
*
(
maxResidue
-
minResidue
+
1
)
for
i
,
res
in
enumerate
(
residues
):
for
r
in
chain
.
residues
():
if
res
.
insertionCode
not
in
(
''
,
' '
):
residues
[
int
(
r
.
id
)
-
minResidue
]
=
r
.
name
for
j
in
range
(
i
,
len
(
residues
)):
chainWithGaps
[
chain
]
=
residues
ids
[
j
]
+=
1
minResidue
=
min
(
ids
)
maxResidue
=
max
(
ids
)
chainWithGaps
[
chain
]
=
[
None
]
*
(
maxResidue
-
minResidue
+
1
)
for
r
,
id
in
zip
(
residues
,
ids
):
chainWithGaps
[
chain
][
id
-
minResidue
]
=
r
.
name
# Try to find the chain that matches each sequence.
# Try to find the chain that matches each sequence.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment