Skip to content

Commit

Permalink
Merge pull request #567 from broadinstitute/jg/modify_annotate_adj_fo…
Browse files Browse the repository at this point in the history
…r_local

Modify `annotate_adj` to support LGT and LAD
  • Loading branch information
jkgoodrich authored Jul 27, 2023
2 parents 24c069e + 1fc3df9 commit 511b8d7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion gnomad/utils/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,9 +798,21 @@ def annotate_adj(
Defaults correspond to gnomAD values.
"""
if "GT" not in mt.entry and "LGT" in mt.entry:
logger.warning("No GT field found, using LGT instead.")
gt_expr = mt.LGT
else:
gt_expr = mt.GT

if "AD" not in mt.entry and "LAD" in mt.entry:
logger.warning("No AD field found, using LAD instead.")
ad_expr = mt.LAD
else:
ad_expr = mt.AD

return mt.annotate_entries(
adj=get_adj_expr(
mt.GT, mt.GQ, mt.DP, mt.AD, adj_gq, adj_dp, adj_ab, haploid_adj_dp
gt_expr, mt.GQ, mt.DP, ad_expr, adj_gq, adj_dp, adj_ab, haploid_adj_dp
)
)

Expand Down

0 comments on commit 511b8d7

Please sign in to comment.