Skip to content

Commit

Permalink
attempting deterministic test for poa
Browse files Browse the repository at this point in the history
  • Loading branch information
ACEnglish committed Jan 6, 2024
1 parent 566ad36 commit cc23323
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file modified repo_utils/answer_key/phab/phab_result_poa.vcf.gz
Binary file not shown.
12 changes: 6 additions & 6 deletions truvari/phab.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ def poa_to_vars(seq_bytes):
"""
Run partial order alignment to create msa
"""
parts = sorted(list(fasta_reader(seq_bytes.decode(), False)))
names = []
seqs = []
for k,v in parts:
names.append(k)
seqs.append(v.decode().strip())
parts = []
for k,v in fasta_reader(seq_bytes.decode(), False):
s = v.decode().strip()
parts.append((len(s), s, k))
parts.sort()
_, seqs, names = zip(*parts)
aligner = pyabpoa.msa_aligner()
aln_result = aligner.msa(seqs, False, True)
return truvari.msa2vcf(dict(zip(names, aln_result.msa_seq)))
Expand Down

0 comments on commit cc23323

Please sign in to comment.