Commit 02493a8c authored by Christina Floristean's avatar Christina Floristean Committed by jnwei
Browse files

Hotfix to switch order of feature dict generation

parent 945ecc0c
...@@ -131,7 +131,16 @@ def generate_feature_dict( ...@@ -131,7 +131,16 @@ def generate_feature_dict(
args, args,
): ):
tmp_fasta_path = os.path.join(args.output_dir, f"tmp_{os.getpid()}.fasta") tmp_fasta_path = os.path.join(args.output_dir, f"tmp_{os.getpid()}.fasta")
if len(seqs) == 1:
if "multimer" in args.config_preset:
with open(tmp_fasta_path, "w") as fp:
fp.write(
'\n'.join([f">{tag}\n{seq}" for tag, seq in zip(tags, seqs)])
)
feature_dict = data_processor.process_fasta(
fasta_path=tmp_fasta_path, alignment_dir=alignment_dir,
)
elif len(seqs) == 1:
tag = tags[0] tag = tags[0]
seq = seqs[0] seq = seqs[0]
with open(tmp_fasta_path, "w") as fp: with open(tmp_fasta_path, "w") as fp:
...@@ -143,14 +152,6 @@ def generate_feature_dict( ...@@ -143,14 +152,6 @@ def generate_feature_dict(
alignment_dir=local_alignment_dir, alignment_dir=local_alignment_dir,
seqemb_mode=args.use_single_seq_mode, seqemb_mode=args.use_single_seq_mode,
) )
elif "multimer" in args.config_preset:
with open(tmp_fasta_path, "w") as fp:
fp.write(
'\n'.join([f">{tag}\n{seq}" for tag, seq in zip(tags, seqs)])
)
feature_dict = data_processor.process_fasta(
fasta_path=tmp_fasta_path, alignment_dir=alignment_dir,
)
else: else:
with open(tmp_fasta_path, "w") as fp: with open(tmp_fasta_path, "w") as fp:
fp.write( fp.write(
......
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