Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
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
ProMod3
Commits
95eab790
Commit
95eab790
authored
5 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-949
: skip olc-check for modified residues.
parent
d27aabe6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modelling/src/model.cc
+12
-2
12 additions, 2 deletions
modelling/src/model.cc
modelling/tests/test_modelling.py
+22
-0
22 additions, 0 deletions
modelling/tests/test_modelling.py
with
34 additions
and
2 deletions
modelling/src/model.cc
+
12
−
2
View file @
95eab790
...
...
@@ -1024,19 +1024,29 @@ void BuildRawChain(const seq::AlignmentHandle& aln,
continue
;
}
const
char
src_olc
=
src_res
.
GetOneLetterCode
();
// sanity check that src_res matches aligned sequence
if
(
src_olc
!=
col
[
1
])
{
std
::
stringstream
ss
;
ss
<<
"Alignment-structure mismatch at pos "
<<
i
<<
" in chain "
<<
chain_name
<<
", alignment is '"
<<
col
[
1
]
<<
"' structure residue is '"
<<
src_olc
<<
"'"
;
throw
promod3
::
Error
(
ss
.
str
());
// We often have non-standard AA residues changing OLC mapping over time.
// This can make it likely for this check to fail and hence we only
// check the 20 standard amino acids.
if
(
conop
::
ResidueToAminoAcid
(
src_res
.
GetHandle
())
==
conop
::
XXX
)
{
ss
<<
". Ok for modified residue "
<<
src_res
.
GetName
()
<<
"."
;
LOG_WARNING
(
ss
.
str
())
}
else
{
ss
<<
". Not ok for standard amino acid "
<<
src_res
.
GetName
()
<<
"!"
;
throw
promod3
::
Error
(
ss
.
str
());
}
}
// remove atoms with conflicting positions (i.e. on top of each other)
CleanupAtomConflicts
(
src_res
);
// check for complete backbone, or in case of Calpha only model building,
// if the src_res has a Calpha atom
if
(
!
CheckBackboneAtoms
(
src_res
)){
if
(
!
CheckBackboneAtoms
(
src_res
))
{
LOG_INFO
(
src_res
<<
" has incomplete backbone. skipping"
);
gap_seq
+=
trg_olc
;
continue
;
...
...
This diff is collapsed.
Click to expand it.
modelling/tests/test_modelling.py
+
22
−
0
View file @
95eab790
...
...
@@ -149,6 +149,28 @@ class ModellingTests(unittest.TestCase):
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
CB
"
))
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
OG
"
))
def
testModifiedMismatch
(
self
):
# test if we allow OLC mismatch for modified AA
tpl
=
io
.
LoadPDB
(
'
data/sep.pdb
'
)
aln
=
seq
.
CreateAlignment
(
seq
.
CreateSequence
(
'
trg
'
,
'
S
'
),
seq
.
CreateSequence
(
'
tpl
'
,
'
X
'
))
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
modelling
.
BuildRawModel
(
aln
)
residues
=
result
.
model
.
residues
# same as before as OLC of SEP is 'S' (i.e. matches)
self
.
assertEqual
(
len
(
residues
),
1
)
self
.
assertEqual
(
len
(
residues
[
0
].
atoms
),
6
)
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
N
"
))
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
CA
"
))
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
C
"
))
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
O
"
))
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
CB
"
))
self
.
assertTrue
(
residues
[
0
].
FindAtom
(
"
OG
"
))
# NOTE: relevant seq-vs-str mismatch tested in testOffset
# See OST's nonstandard.cc for additional tests of handling modified
# residues. Code duplication will be removed in SCHWED-3569.
def
testInsertCBeta
(
self
):
# test if the dst residues contain cbeta, unless they are glycines
tpl
=
io
.
LoadPDB
(
'
data/cbeta.pdb
'
)
...
...
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