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
FastFold
Commits
9d46d329
Unverified
Commit
9d46d329
authored
Sep 14, 2022
by
LuGY
Committed by
GitHub
Sep 14, 2022
Browse files
support small_bfd with ray (#65)
* support small_bfd with ray * rm useless log
parent
7a449372
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
fastfold/data/feature_pipeline.py
fastfold/data/feature_pipeline.py
+0
-1
fastfold/workflow/template/fastfold_data_workflow.py
fastfold/workflow/template/fastfold_data_workflow.py
+26
-14
No files found.
fastfold/data/feature_pipeline.py
View file @
9d46d329
...
@@ -76,7 +76,6 @@ def np_example_to_features(
...
@@ -76,7 +76,6 @@ def np_example_to_features(
mode
:
str
,
mode
:
str
,
):
):
np_example
=
dict
(
np_example
)
np_example
=
dict
(
np_example
)
print
(
"np_example seq_length"
,
np_example
[
"seq_length"
])
if
is_multimer
:
if
is_multimer
:
num_res
=
int
(
np_example
[
"seq_length"
][
0
])
num_res
=
int
(
np_example
[
"seq_length"
][
0
])
else
:
else
:
...
...
fastfold/workflow/template/fastfold_data_workflow.py
View file @
9d46d329
...
@@ -123,20 +123,32 @@ class FastFoldDataWorkFlow:
...
@@ -123,20 +123,32 @@ class FastFoldDataWorkFlow:
# generate workflow for STEP3
# generate workflow for STEP3
jh_node_2
=
jh_fac
.
gen_node
(
fasta_path
,
mgnify_out_path
)
jh_node_2
=
jh_fac
.
gen_node
(
fasta_path
,
mgnify_out_path
)
# Run HHBlits on BFD
if
not
self
.
use_small_bfd
:
# create HHBlits workflow generator
# Run HHBlits on BFD
hhb_config
=
{
# create HHBlits workflow generator
"binary_path"
:
self
.
db_map
[
"hhblits"
][
"binary"
],
hhb_config
=
{
"databases"
:
self
.
db_map
[
"hhblits"
][
"dbs"
],
"binary_path"
:
self
.
db_map
[
"hhblits"
][
"binary"
],
"n_cpu"
:
self
.
no_cpus
,
"databases"
:
self
.
db_map
[
"hhblits"
][
"dbs"
],
}
"n_cpu"
:
self
.
no_cpus
,
hhb_fac
=
HHBlitsFactory
(
config
=
hhb_config
)
}
# set HHBlits output path
hhb_fac
=
HHBlitsFactory
(
config
=
hhb_config
)
bfd_out_path
=
os
.
path
.
join
(
alignment_dir
,
"bfd_uniclust_hits.a3m"
)
# set HHBlits output path
# generate workflow for STEP4
bfd_out_path
=
os
.
path
.
join
(
alignment_dir
,
"bfd_uniclust_hits.a3m"
)
hhb_node
=
hhb_fac
.
gen_node
(
fasta_path
,
bfd_out_path
)
# generate workflow for STEP4
hhb_node
=
hhb_fac
.
gen_node
(
fasta_path
,
bfd_out_path
)
# run workflow
batch_run
(
workflow_id
=
workflow_id
,
dags
=
[
hhs_node
,
jh_node_2
,
hhb_node
])
else
:
# Run Jackhmmer on small_bfd
# reconfigure jackhmmer factory to use small_bfd DB instead
jh_fac
.
configure
(
'database_path'
,
self
.
db_map
[
"jackhmmer"
][
"dbs"
][
2
])
# set jackhmmer output path
bfd_out_path
=
os
.
path
.
join
(
alignment_dir
,
"bfd_uniclust_hits.a3m"
)
# generate workflow for STEP4_2
jh_node_3
=
jh_fac
.
gen_node
(
fasta_path
,
bfd_out_path
)
# run workflow
# run workflow
batch_run
(
workflow_id
=
workflow_id
,
dags
=
[
hhs_node
,
jh_node_2
,
h
hb
_node
])
batch_run
(
workflow_id
=
workflow_id
,
dags
=
[
hhs_node
,
jh_node_2
,
j
h_node
_3
])
return
return
\ No newline at end of file
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