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
08ef6e9f
Commit
08ef6e9f
authored
Sep 15, 2023
by
Sachin Kadyan
Browse files
Add sequence embedding mode option to .core file parser
parent
395a9f1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
openfold/data/data_modules.py
openfold/data/data_modules.py
+1
-0
openfold/data/data_pipeline.py
openfold/data/data_pipeline.py
+9
-2
No files found.
openfold/data/data_modules.py
View file @
08ef6e9f
...
@@ -240,6 +240,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
...
@@ -240,6 +240,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
elif
(
ext
==
".core"
):
elif
(
ext
==
".core"
):
data
=
self
.
data_pipeline
.
process_core
(
data
=
self
.
data_pipeline
.
process_core
(
path
,
alignment_dir
,
alignment_index
,
path
,
alignment_dir
,
alignment_index
,
seqemb_mode
=
self
.
config
.
seqemb_mode
.
enabled
,
)
)
elif
(
ext
==
".pdb"
):
elif
(
ext
==
".pdb"
):
structure_index
=
None
structure_index
=
None
...
...
openfold/data/data_pipeline.py
View file @
08ef6e9f
...
@@ -802,6 +802,7 @@ class DataPipeline:
...
@@ -802,6 +802,7 @@ class DataPipeline:
core_path
:
str
,
core_path
:
str
,
alignment_dir
:
str
,
alignment_dir
:
str
,
alignment_index
:
Optional
[
str
]
=
None
,
alignment_index
:
Optional
[
str
]
=
None
,
seqemb_mode
:
bool
=
False
,
)
->
FeatureDict
:
)
->
FeatureDict
:
"""
"""
Assembles features for a protein in a ProteinNet .core file.
Assembles features for a protein in a ProteinNet .core file.
...
@@ -821,9 +822,15 @@ class DataPipeline:
...
@@ -821,9 +822,15 @@ class DataPipeline:
self
.
template_featurizer
,
self
.
template_featurizer
,
)
)
msa_features
=
self
.
_process_msa_feats
(
alignment_dir
,
input_sequence
)
sequence_embedding_features
=
{}
# If in sequence embedding mode, generate dummy MSA features using just the input sequence
if
seqemb_mode
:
msa_features
=
make_dummy_msa_feats
(
input_sequence
)
sequence_embedding_features
=
self
.
_process_seqemb_features
(
alignment_dir
)
else
:
msa_features
=
self
.
_process_msa_feats
(
alignment_dir
,
input_sequence
)
return
{
**
core_feats
,
**
template_features
,
**
msa_features
}
return
{
**
core_feats
,
**
template_features
,
**
msa_features
,
**
sequence_embedding_features
}
def
process_multiseq_fasta
(
self
,
def
process_multiseq_fasta
(
self
,
fasta_path
:
str
,
fasta_path
:
str
,
...
...
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