Skip to content

Commit

Permalink
Merge pull request aqlaboratory#164 from bayer-science-for-a-better-l…
Browse files Browse the repository at this point in the history
…ife/fix-multifasta-predictions

Fix tag-sequence mismatch when predicting for multiple fastas
  • Loading branch information
gahdritz authored Jul 19, 2022
2 parents 33f2f8e + 88450a6 commit 939a82c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run_pretrained_openfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ def main(args):
# assert len(tags) == len(set(tags)), "All FASTA tags must be unique"
tag = '-'.join(tags)

tag_list.append(tag)
tag_list.append((tag, tags))
seq_list.append(seqs)

seq_sort_fn = lambda target: sum([len(s) for s in target[1]])
sorted_targets = sorted(zip(tag_list, seq_list), key=seq_sort_fn)
feature_dicts = {}
for model, output_directory in load_models_from_command_line(args, config):
cur_tracing_interval = 0
for tag, seqs in sorted_targets:
for (tag, tags), seqs in sorted_targets:
output_name = f'{tag}_{args.config_preset}'
if args.output_postfix is not None:
output_name = f'{output_name}_{args.output_postfix}'
Expand Down

0 comments on commit 939a82c

Please sign in to comment.