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
f94ee668
Commit
f94ee668
authored
Nov 02, 2023
by
Christina Floristean
Browse files
Fixes for inference alignment generation
parent
5eacd8b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
run_pretrained_openfold.py
run_pretrained_openfold.py
+17
-17
No files found.
run_pretrained_openfold.py
View file @
f94ee668
...
...
@@ -68,34 +68,34 @@ def precompute_alignments(tags, seqs, alignment_dir, args):
os
.
path
.
join
(
alignment_dir
,
tag
),
)
if
args
.
use_precomputed_alignments
is
None
and
not
os
.
path
.
isdir
(
local_alignment_dir
)
:
if
args
.
use_precomputed_alignments
is
None
:
logger
.
info
(
f
"Generating alignments for
{
tag
}
..."
)
os
.
makedirs
(
local_alignment_dir
)
os
.
makedirs
(
local_alignment_dir
,
exist_ok
=
True
)
if
"multimer"
in
args
.
config_preset
:
template_searcher
=
hmmsearch
.
Hmmsearch
(
binary_path
=
args
.
hmmsearch_binary_path
,
hmmbuild_binary_path
=
args
.
hmmbuild_binary_path
,
database_path
=
args
.
pdb_seqres_database_path
,
)
else
:
template_searcher
=
hhsearch
.
HHSearch
(
binary_path
=
args
.
hhsearch_binary_path
,
databases
=
[
args
.
pdb70_database_path
],
)
# In seqemb mode, use AlignmentRunner only to generate templates
if
args
.
use_single_seq_mode
:
alignment_runner
=
data_pipeline
.
AlignmentRunner
(
jackhmmer_binary_path
=
args
.
jackhmmer_binary_path
,
uniref90_database_path
=
args
.
uniref90_database_path
,
template_searcher
=
template_searcher
,
no_cpus
=
args
.
cpus
,
)
embedding_generator
=
EmbeddingGenerator
()
embedding_generator
.
run
(
tmp_fasta_path
,
alignment_dir
)
else
:
is_multimer
=
"multimer"
in
args
.
config_preset
if
is_multimer
:
template_searcher
=
hmmsearch
.
Hmmsearch
(
binary_path
=
args
.
hmmsearch_binary_path
,
hmmbuild_binary_path
=
args
.
hmmbuild_binary_path
,
database_path
=
args
.
pdb_seqres_database_path
,
)
else
:
template_searcher
=
hhsearch
.
HHSearch
(
binary_path
=
args
.
hhsearch_binary_path
,
databases
=
[
args
.
pdb70_database_path
],
)
alignment_runner
=
data_pipeline
.
AlignmentRunner
(
jackhmmer_binary_path
=
args
.
jackhmmer_binary_path
,
hhblits_binary_path
=
args
.
hhblits_binary_path
,
...
...
@@ -107,7 +107,7 @@ def precompute_alignments(tags, seqs, alignment_dir, args):
uniprot_database_path
=
args
.
uniprot_database_path
,
template_searcher
=
template_searcher
,
use_small_bfd
=
args
.
bfd_database_path
is
None
,
no_cpus
=
args
.
cpus
_per_task
no_cpus
=
args
.
cpus
)
alignment_runner
.
run
(
...
...
@@ -244,7 +244,7 @@ def main(args):
tags
,
seqs
=
parse_fasta
(
data
)
if
((
not
is_multimer
)
and
len
(
tags
)
!=
1
)
:
if
not
is_multimer
and
len
(
tags
)
!=
1
:
print
(
f
"
{
fasta_path
}
contains more than one sequence but "
f
"multimer mode is not enabled. Skipping..."
...
...
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