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
3246e8ca
"git@developer.sourcefind.cn:OpenDAS/openpcdet.git" did not exist on "9fdb4435ac5375adba530b8813ef608dffb681c0"
Commit
3246e8ca
authored
Jul 22, 2022
by
Gustaf Ahdritz
Browse files
Rename mapping parameter
parent
b8034138
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
openfold/data/data_modules.py
openfold/data/data_modules.py
+11
-11
train_openfold.py
train_openfold.py
+6
-6
No files found.
openfold/data/data_modules.py
View file @
3246e8ca
...
...
@@ -34,7 +34,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
template_release_dates_cache_path
:
Optional
[
str
]
=
None
,
shuffle_top_k_prefiltered
:
Optional
[
int
]
=
None
,
treat_pdb_as_distillation
:
bool
=
True
,
mapping
_path
:
Optional
[
str
]
=
None
,
filter
_path
:
Optional
[
str
]
=
None
,
mode
:
str
=
"train"
,
alignment_index
:
Optional
[
Any
]
=
None
,
_output_raw
:
bool
=
False
,
...
...
@@ -102,10 +102,10 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
if
(
alignment_index
is
not
None
):
self
.
_chain_ids
=
list
(
alignment_index
.
keys
())
elif
(
mapping
_path
is
None
):
elif
(
filter
_path
is
None
):
self
.
_chain_ids
=
list
(
os
.
listdir
(
alignment_dir
))
else
:
with
open
(
mapping
_path
,
"r"
)
as
f
:
with
open
(
filter
_path
,
"r"
)
as
f
:
self
.
_chain_ids
=
[
l
.
strip
()
for
l
in
f
.
readlines
()]
self
.
_chain_id_to_idx_dict
=
{
...
...
@@ -496,8 +496,8 @@ class OpenFoldDataModule(pl.LightningDataModule):
predict_data_dir
:
Optional
[
str
]
=
None
,
predict_alignment_dir
:
Optional
[
str
]
=
None
,
kalign_binary_path
:
str
=
'/usr/bin/kalign'
,
train_
mapping
_path
:
Optional
[
str
]
=
None
,
distillation_
mapping
_path
:
Optional
[
str
]
=
None
,
train_
filter
_path
:
Optional
[
str
]
=
None
,
distillation_
filter
_path
:
Optional
[
str
]
=
None
,
obsolete_pdbs_file_path
:
Optional
[
str
]
=
None
,
template_release_dates_cache_path
:
Optional
[
str
]
=
None
,
batch_seed
:
Optional
[
int
]
=
None
,
...
...
@@ -525,8 +525,8 @@ class OpenFoldDataModule(pl.LightningDataModule):
self
.
predict_data_dir
=
predict_data_dir
self
.
predict_alignment_dir
=
predict_alignment_dir
self
.
kalign_binary_path
=
kalign_binary_path
self
.
train_
mapping
_path
=
train_
mapping
_path
self
.
distillation_
mapping
_path
=
distillation_
mapping
_path
self
.
train_
filter
_path
=
train_
filter
_path
self
.
distillation_
filter
_path
=
distillation_
filter
_path
self
.
template_release_dates_cache_path
=
(
template_release_dates_cache_path
)
...
...
@@ -589,7 +589,7 @@ class OpenFoldDataModule(pl.LightningDataModule):
train_dataset
=
dataset_gen
(
data_dir
=
self
.
train_data_dir
,
alignment_dir
=
self
.
train_alignment_dir
,
mapping
_path
=
self
.
train_
mapping
_path
,
filter
_path
=
self
.
train_
filter
_path
,
max_template_hits
=
self
.
config
.
train
.
max_template_hits
,
shuffle_top_k_prefiltered
=
self
.
config
.
train
.
shuffle_top_k_prefiltered
,
...
...
@@ -603,7 +603,7 @@ class OpenFoldDataModule(pl.LightningDataModule):
distillation_dataset
=
dataset_gen
(
data_dir
=
self
.
distillation_data_dir
,
alignment_dir
=
self
.
distillation_alignment_dir
,
mapping
_path
=
self
.
distillation_
mapping
_path
,
filter
_path
=
self
.
distillation_
filter
_path
,
max_template_hits
=
self
.
config
.
train
.
max_template_hits
,
treat_pdb_as_distillation
=
True
,
mode
=
"train"
,
...
...
@@ -645,7 +645,7 @@ class OpenFoldDataModule(pl.LightningDataModule):
self
.
eval_dataset
=
dataset_gen
(
data_dir
=
self
.
val_data_dir
,
alignment_dir
=
self
.
val_alignment_dir
,
mapping
_path
=
None
,
filter
_path
=
None
,
max_template_hits
=
self
.
config
.
eval
.
max_template_hits
,
mode
=
"eval"
,
)
...
...
@@ -655,7 +655,7 @@ class OpenFoldDataModule(pl.LightningDataModule):
self
.
predict_dataset
=
dataset_gen
(
data_dir
=
self
.
predict_data_dir
,
alignment_dir
=
self
.
predict_alignment_dir
,
mapping
_path
=
None
,
filter
_path
=
None
,
max_template_hits
=
self
.
config
.
predict
.
max_template_hits
,
mode
=
"predict"
,
)
...
...
train_openfold.py
View file @
3246e8ca
...
...
@@ -405,14 +405,14 @@ if __name__ == "__main__":
help
=
"Path to the kalign binary"
)
parser
.
add_argument
(
"--train_
mapping
_path"
,
type
=
str
,
default
=
None
,
help
=
'''Optional path to a
.json
file containing
a mapping from
consecutive numerical indices to sample names
. Used to filter
the training
set'''
"--train_
filter
_path"
,
type
=
str
,
default
=
None
,
help
=
'''Optional path to a
text
file containing
names of training
examples to include, one per line
. Used to filter
the training
set'''
)
parser
.
add_argument
(
"--distillation_
mapping
_path"
,
type
=
str
,
default
=
None
,
help
=
"""See --train_
mapping
_path"""
"--distillation_
filter
_path"
,
type
=
str
,
default
=
None
,
help
=
"""See --train_
filter
_path"""
)
parser
.
add_argument
(
"--obsolete_pdbs_file_path"
,
type
=
str
,
default
=
None
,
...
...
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