Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
5161c0f6
"git@developer.sourcefind.cn:OpenDAS/dynamo.git" did not exist on "d0d35a9ee45ae4c5d8aec6d788f7594ec4a28ba6"
Commit
5161c0f6
authored
Nov 30, 2021
by
Gustaf Ahdritz
Browse files
Add non-distillation PDB parsing
parent
57720ec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
openfold/data/data_pipeline.py
openfold/data/data_pipeline.py
+13
-7
No files found.
openfold/data/data_pipeline.py
View file @
5161c0f6
...
@@ -162,17 +162,18 @@ def make_pdb_features(
...
@@ -162,17 +162,18 @@ def make_pdb_features(
protein_object
:
protein
.
Protein
,
protein_object
:
protein
.
Protein
,
description
:
str
,
description
:
str
,
confidence_threshold
:
float
=
0.5
,
confidence_threshold
:
float
=
0.5
,
is_distillation
:
bool
=
True
,
)
->
FeatureDict
:
)
->
FeatureDict
:
""" Use only for distillation set PDBs """
pdb_feats
=
make_protein_features
(
pdb_feats
=
make_protein_features
(
protein_object
,
description
,
_is_distillation
=
True
protein_object
,
description
,
_is_distillation
=
True
)
)
high_confidence
=
protein_object
.
b_factors
>
confidence_threshold
if
(
is_distillation
):
high_confidence
=
np
.
any
(
high_confidence
,
axis
=-
1
)
high_confidence
=
protein_object
.
b_factors
>
confidence_threshold
for
i
,
confident
in
enumerate
(
high_confidence
):
high_confidence
=
np
.
any
(
high_confidence
,
axis
=-
1
)
if
(
not
confident
):
for
i
,
confident
in
enumerate
(
high_confidence
):
pdb_feats
[
"all_atom_mask"
][
i
]
=
0
if
(
not
confident
):
pdb_feats
[
"all_atom_mask"
][
i
]
=
0
return
pdb_feats
return
pdb_feats
...
@@ -471,6 +472,7 @@ class DataPipeline:
...
@@ -471,6 +472,7 @@ class DataPipeline:
self
,
self
,
pdb_path
:
str
,
pdb_path
:
str
,
alignment_dir
:
str
,
alignment_dir
:
str
,
is_distillation
:
bool
=
True
)
->
FeatureDict
:
)
->
FeatureDict
:
"""
"""
Assembles features for a protein in a PDB file.
Assembles features for a protein in a PDB file.
...
@@ -481,7 +483,11 @@ class DataPipeline:
...
@@ -481,7 +483,11 @@ class DataPipeline:
protein_object
=
protein
.
from_pdb_string
(
pdb_str
)
protein_object
=
protein
.
from_pdb_string
(
pdb_str
)
input_sequence
=
_aatype_to_str_sequence
(
protein_object
.
aatype
)
input_sequence
=
_aatype_to_str_sequence
(
protein_object
.
aatype
)
description
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
pdb_path
))[
0
].
upper
()
description
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
pdb_path
))[
0
].
upper
()
pdb_feats
=
make_pdb_features
(
protein_object
,
description
)
pdb_feats
=
make_pdb_features
(
protein_object
,
description
,
is_distillation
)
hits
=
self
.
_parse_template_hits
(
alignment_dir
)
hits
=
self
.
_parse_template_hits
(
alignment_dir
)
template_features
=
make_template_features
(
template_features
=
make_template_features
(
...
...
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