Skip to content

Commit

Permalink
collapse keep common
Browse files Browse the repository at this point in the history
AC instead of MAC
  • Loading branch information
ACEnglish committed Nov 13, 2024
1 parent 2e9ab30 commit 38f4d8d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions truvari/collapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,13 @@ def sort_maxqual(b1, b2):

def sort_common(b1, b2):
"""
Order entries from highest to lowest MAC
Order entries from highest to highest AC
"""
mac1 = truvari.allele_freq_annos(b1)["MAC"]
mac2 = truvari.allele_freq_annos(b2)["MAC"]
if mac1 < mac2:
return 1
mac1 = truvari.allele_freq_annos(b1)["AC"]
mac2 = truvari.allele_freq_annos(b2)["AC"]
if mac1 > mac2:
return 1
if mac1 < mac2:
return -1
return sort_first(b1, b2)

Expand Down

0 comments on commit 38f4d8d

Please sign in to comment.