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
8ca6c93b
Commit
8ca6c93b
authored
3 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
lDDT: return number of expected and conserved global contacts if requested
parent
612ea8fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mol/alg/pymod/lddt.py
+14
-7
14 additions, 7 deletions
modules/mol/alg/pymod/lddt.py
with
14 additions
and
7 deletions
modules/mol/alg/pymod/lddt.py
+
14
−
7
View file @
8ca6c93b
...
...
@@ -351,13 +351,17 @@ class lDDTScorer:
value: :class:`ost.seq.AlignmentHandle`
:param return_dist_test: Whether to additionally return the underlying
per-residue data for the distance difference
test. Adds three objects to the return tuple.
First: list with length of scored residues.
test. Adds five objects to the return tuple.
First: Number of total contacts summed over all
thresholds
Second: Number of conserved contacts summed
over all thresholds
Third: list with length of scored residues.
Contains indices referring to model.residues.
Second
: numpy array of size
Fourth
: numpy array of size
len(scored_residues) containing the number of
expected distance
s,
Third
: numpy matrix of shape
total contact
s,
Fifth
: numpy matrix of shape
(len(scored_residues), len(thresholds))
specifying how many for each threshold are
conserved.
...
...
@@ -495,7 +499,9 @@ class lDDTScorer:
if
penalize_extra_chains
:
n_distances
+=
self
.
_GetExtraModelChainPenalty
(
model
,
chain_mapping
)
lDDT
=
np
.
sum
(
per_res_conserved
)
/
(
n_thresh
*
n_distances
)
lDDT_tot
=
int
(
n_thresh
*
n_distances
)
lDDT_cons
=
int
(
np
.
sum
(
per_res_conserved
))
lDDT
=
float
(
lDDT_cons
)
/
lDDT_tot
# set properties if necessary
if
local_lddt_prop
:
...
...
@@ -514,7 +520,8 @@ class lDDTScorer:
int
(
np
.
sum
(
per_res_conserved
[
idx
,:])))
if
return_dist_test
:
return
lDDT
,
per_res_lDDT
,
res_indices
,
per_res_exp
,
per_res_conserved
return
lDDT
,
per_res_lDDT
,
lDDT_tot
,
lDDT_cons
,
res_indices
,
\
per_res_exp
,
per_res_conserved
else
:
return
lDDT
,
per_res_lDDT
...
...
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