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
734ce915
Commit
734ce915
authored
Dec 21, 2021
by
Sachin Kadyan
Browse files
Added test for delete_extra_msa
parent
09564595
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
tests/test_data_transforms.py
tests/test_data_transforms.py
+12
-1
No files found.
tests/test_data_transforms.py
View file @
734ce915
...
...
@@ -11,7 +11,7 @@ import unittest
from
data.data_transforms
import
make_seq_mask
,
add_distillation_flag
,
make_all_atom_aatype
,
fix_templates_aatype
,
\
correct_msa_restypes
,
squeeze_features
,
randomly_replace_msa_with_unknown
,
MSA_FEATURE_NAMES
,
sample_msa
,
\
crop_extra_msa
crop_extra_msa
,
delete_extra_msa
from
openfold.config
import
model_config
...
...
@@ -146,6 +146,17 @@ class TestDataTransforms(unittest.TestCase):
if
"extra_"
+
k
in
protein
:
assert
protein
[
"extra_"
+
k
].
shape
[
0
]
==
min
(
max_extra_msa
,
num_seq
)
def
test_delete_extra_msa
(
self
):
protein
=
{
'extra_msa'
:
torch
.
rand
((
512
,
100
,
23
))}
extra_msa_has_deletion_shape
=
list
(
protein
[
'extra_msa'
].
shape
)
extra_msa_has_deletion_shape
[
2
]
=
1
protein
[
'extra_deletion_matrix'
]
=
torch
.
rand
(
extra_msa_has_deletion_shape
)
protein
=
delete_extra_msa
(
protein
)
print
(
protein
)
for
k
in
MSA_FEATURE_NAMES
:
assert
'extra_'
+
k
not
in
protein
assert
'extra_msa'
not
in
protein
if
__name__
==
'__main__'
:
unittest
.
main
()
...
...
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