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
d8c2a979
Commit
d8c2a979
authored
Nov 10, 2023
by
Christina Floristean
Browse files
Fix naming error in alignment runner, add error message for missing uniprot files.
parent
7e2b36e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
openfold/data/data_pipeline.py
openfold/data/data_pipeline.py
+8
-3
No files found.
openfold/data/data_pipeline.py
View file @
d8c2a979
...
@@ -448,7 +448,7 @@ class AlignmentRunner:
...
@@ -448,7 +448,7 @@ class AlignmentRunner:
n_cpu
=
no_cpus
,
n_cpu
=
no_cpus
,
)
)
self
.
_uniprot_
msa_
runner
=
None
self
.
jackhmmer
_uniprot_runner
=
None
if
(
uniprot_database_path
is
not
None
):
if
(
uniprot_database_path
is
not
None
):
self
.
jackhmmer_uniprot_runner
=
jackhmmer
.
Jackhmmer
(
self
.
jackhmmer_uniprot_runner
=
jackhmmer
.
Jackhmmer
(
binary_path
=
jackhmmer_binary_path
,
binary_path
=
jackhmmer_binary_path
,
...
@@ -1180,15 +1180,20 @@ class DataPipelineMultimer:
...
@@ -1180,15 +1180,20 @@ class DataPipelineMultimer:
# sequences.
# sequences.
if
not
is_homomer_or_monomer
:
if
not
is_homomer_or_monomer
:
all_seq_msa_features
=
self
.
_all_seq_msa_features
(
all_seq_msa_features
=
self
.
_all_seq_msa_features
(
chain_fasta_path
,
chain_alignment_dir
chain_alignment_dir
)
)
chain_features
.
update
(
all_seq_msa_features
)
chain_features
.
update
(
all_seq_msa_features
)
return
chain_features
return
chain_features
def
_all_seq_msa_features
(
self
,
fasta_path
,
alignment_dir
):
@
staticmethod
def
_all_seq_msa_features
(
alignment_dir
):
"""Get MSA features for unclustered uniprot, for pairing."""
"""Get MSA features for unclustered uniprot, for pairing."""
uniprot_msa_path
=
os
.
path
.
join
(
alignment_dir
,
"uniprot_hits.sto"
)
uniprot_msa_path
=
os
.
path
.
join
(
alignment_dir
,
"uniprot_hits.sto"
)
if
not
os
.
path
.
exists
(
uniprot_msa_path
):
chain_id
=
os
.
path
.
basename
(
os
.
path
.
normpath
(
alignment_dir
))
raise
ValueError
(
f
"Missing 'uniprot_hits.sto' for
{
chain_id
}
. "
f
"This is required for Multimer MSA pairing."
)
with
open
(
uniprot_msa_path
,
"r"
)
as
fp
:
with
open
(
uniprot_msa_path
,
"r"
)
as
fp
:
uniprot_msa_string
=
fp
.
read
()
uniprot_msa_string
=
fp
.
read
()
msa
=
parsers
.
parse_stockholm
(
uniprot_msa_string
)
msa
=
parsers
.
parse_stockholm
(
uniprot_msa_string
)
...
...
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