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
869b0661
"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "0210a105bfb4527f31e2bf1fb5086b0341ffe156"
Unverified
Commit
869b0661
authored
Sep 01, 2022
by
Fazzie-Maqianli
Committed by
GitHub
Sep 01, 2022
Browse files
fix inference (#56)
parent
6d8b97ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
inference.py
inference.py
+42
-42
No files found.
inference.py
View file @
869b0661
...
@@ -158,48 +158,48 @@ def main(args):
...
@@ -158,48 +158,48 @@ def main(args):
print
(
"Generating features..."
)
print
(
"Generating features..."
)
local_alignment_dir
=
os
.
path
.
join
(
alignment_dir
,
tag
)
local_alignment_dir
=
os
.
path
.
join
(
alignment_dir
,
tag
)
# if global_is_multimer:
if
global_is_multimer
:
# print("Multimer")
# else:
# if (args.use_precomputed_alignments is None):
# if not os.path.exists(local_alignment_dir):
# os.makedirs(local_alignment_dir)
# if args.enable_workflow:
# print("Running alignment with ray workflow...")
# alignment_data_workflow_runner = FastFoldDataWorkFlow(
# jackhmmer_binary_path=args.jackhmmer_binary_path,
# hhblits_binary_path=args.hhblits_binary_path,
# hhsearch_binary_path=args.hhsearch_binary_path,
# uniref90_database_path=args.uniref90_database_path,
# mgnify_database_path=args.mgnify_database_path,
# bfd_database_path=args.bfd_database_path,
# uniclust30_database_path=args.uniclust30_database_path,
# pdb70_database_path=args.pdb70_database_path,
# use_small_bfd=use_small_bfd,
# no_cpus=args.cpus,
# )
# t = time.perf_counter()
# alignment_data_workflow_runner.run(fasta_path, output_dir=output_dir_base, alignment_dir=local_alignment_dir)
# print(f"Alignment data workflow time: {time.perf_counter() - t}")
# else:
# alignment_runner = data_pipeline.AlignmentRunner(
# jackhmmer_binary_path=args.jackhmmer_binary_path,
# hhblits_binary_path=args.hhblits_binary_path,
# hhsearch_binary_path=args.hhsearch_binary_path,
# uniref90_database_path=args.uniref90_database_path,
# mgnify_database_path=args.mgnify_database_path,
# bfd_database_path=args.bfd_database_path,
# uniclust30_database_path=args.uniclust30_database_path,
# pdb70_database_path=args.pdb70_database_path,
# use_small_bfd=use_small_bfd,
# no_cpus=args.cpus,
# )
# alignment_runner.run(fasta_path, local_alignment_dir)
# feature_dict = data_processor.process_fasta(fasta_path=fasta_path,
# alignment_dir=local_alignment_dir)
feature_dict
=
pickle
.
load
(
open
(
"/home/lcmql/data/features_pdb1o5d.pkl"
,
"rb"
))
feature_dict
=
pickle
.
load
(
open
(
"/home/lcmql/data/features_pdb1o5d.pkl"
,
"rb"
))
else
:
if
(
args
.
use_precomputed_alignments
is
None
):
if
not
os
.
path
.
exists
(
local_alignment_dir
):
os
.
makedirs
(
local_alignment_dir
)
if
args
.
enable_workflow
:
print
(
"Running alignment with ray workflow..."
)
alignment_data_workflow_runner
=
FastFoldDataWorkFlow
(
jackhmmer_binary_path
=
args
.
jackhmmer_binary_path
,
hhblits_binary_path
=
args
.
hhblits_binary_path
,
hhsearch_binary_path
=
args
.
hhsearch_binary_path
,
uniref90_database_path
=
args
.
uniref90_database_path
,
mgnify_database_path
=
args
.
mgnify_database_path
,
bfd_database_path
=
args
.
bfd_database_path
,
uniclust30_database_path
=
args
.
uniclust30_database_path
,
pdb70_database_path
=
args
.
pdb70_database_path
,
use_small_bfd
=
use_small_bfd
,
no_cpus
=
args
.
cpus
,
)
t
=
time
.
perf_counter
()
alignment_data_workflow_runner
.
run
(
fasta_path
,
output_dir
=
output_dir_base
,
alignment_dir
=
local_alignment_dir
)
print
(
f
"Alignment data workflow time:
{
time
.
perf_counter
()
-
t
}
"
)
else
:
alignment_runner
=
data_pipeline
.
AlignmentRunner
(
jackhmmer_binary_path
=
args
.
jackhmmer_binary_path
,
hhblits_binary_path
=
args
.
hhblits_binary_path
,
hhsearch_binary_path
=
args
.
hhsearch_binary_path
,
uniref90_database_path
=
args
.
uniref90_database_path
,
mgnify_database_path
=
args
.
mgnify_database_path
,
bfd_database_path
=
args
.
bfd_database_path
,
uniclust30_database_path
=
args
.
uniclust30_database_path
,
pdb70_database_path
=
args
.
pdb70_database_path
,
use_small_bfd
=
use_small_bfd
,
no_cpus
=
args
.
cpus
,
)
alignment_runner
.
run
(
fasta_path
,
local_alignment_dir
)
feature_dict
=
data_processor
.
process_fasta
(
fasta_path
=
fasta_path
,
alignment_dir
=
local_alignment_dir
)
# feature_dict = pickle.load(open("/home/lcmql/data/features_pdb1o5d.pkl", "rb"))
# Remove temporary FASTA file
# Remove temporary FASTA file
os
.
remove
(
fasta_path
)
os
.
remove
(
fasta_path
)
...
...
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