Unverified Commit 9d46d329 authored by LuGY's avatar LuGY Committed by GitHub
Browse files

support small_bfd with ray (#65)

* support small_bfd with ray

* rm useless log
parent 7a449372
...@@ -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:
......
...@@ -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, hhb_node]) batch_run(workflow_id=workflow_id, dags=[hhs_node, jh_node_2, jh_node_3])
return return
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment