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
0d2dd5d0
Commit
0d2dd5d0
authored
Jul 22, 2022
by
Gustaf Ahdritz
Browse files
Fix filtering logic
parent
3246e8ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
openfold/data/data_modules.py
openfold/data/data_modules.py
+6
-3
No files found.
openfold/data/data_modules.py
View file @
0d2dd5d0
...
...
@@ -102,11 +102,14 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
if
(
alignment_index
is
not
None
):
self
.
_chain_ids
=
list
(
alignment_index
.
keys
())
elif
(
filter_path
is
None
):
self
.
_chain_ids
=
list
(
os
.
listdir
(
alignment_dir
))
else
:
self
.
_chain_ids
=
list
(
os
.
listdir
(
alignment_dir
))
if
(
filter_path
is
not
None
):
with
open
(
filter_path
,
"r"
)
as
f
:
self
.
_chain_ids
=
[
l
.
strip
()
for
l
in
f
.
readlines
()]
chains_to_include
=
[
l
.
strip
()
for
l
in
f
.
readlines
()]
self
.
_chain_ids
=
[
c
for
c
in
self
.
_chain_ids
if
c
in
chains_to_include
]
self
.
_chain_id_to_idx_dict
=
{
chain
:
i
for
i
,
chain
in
enumerate
(
self
.
_chain_ids
)
...
...
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