gnomad_qc.v5.annotations.annotation_utils
AoU-specific annotation utilities.
Module Functions
|
Annotate genotypes with adj criteria. |
Get adj genotype annotation. |
AoU-specific annotation utilities.
- gnomad_qc.v5.annotations.annotation_utils.annotate_adj_no_dp(mt, adj_gq=20, adj_dp=10, adj_ab=0.2, haploid_adj_dp=5)[source]
Annotate genotypes with adj criteria.
Defaults correspond to gnomAD values. DP is approximated as the sum of the allele depths. Hom-ref calls with no allele depths (reference blocks) are filtered on GQ only; every other call uses the gnomAD cutoffs. See the module comment for details.
Accepts three entry layouts:
LGTandLAD(VDS variant data): full adj criteria.GTandAD(split or dense data): full adj criteria.GTwithout allele depths (VDS reference data, e.g. the AoU reference blocks with onlyGT,GQ,ENDandLEN): every call must be hom-ref and adj isGQ >= adj_gq. A non-hom-ref call raises at runtime rather than being silently marked non-adj.
GQis required in all three cases.- Parameters:
mt (
MatrixTable) – Input MatrixTable.adj_gq (
int) – Minimum GQ. Default is 20.adj_dp (
int) – Minimum DP (sum of allele depths) for calls with allele depths. Default is 10.adj_ab (
float) – Minimum allele balance for het calls. Default is 0.2.haploid_adj_dp (
int) – Minimum DP (sum of allele depths) for haploid calls with allele depths. Default is 5.
- Return type:
- Returns:
MatrixTable with adj annotation.
- gnomad_qc.v5.annotations.annotation_utils.get_adj_expr(gt_expr, gq_expr, ad_expr, adj_gq=20, adj_dp=10, adj_ab=0.2, haploid_adj_dp=5)[source]
Get adj genotype annotation.
Defaults correspond to gnomAD values. Hom-ref calls with a missing ad_expr (reference blocks) are filtered on GQ only. All other calls, including hom-ref calls with defined allele depths, use the standard gnomAD adj criteria (GQ, DP, and AB for het calls) with DP approximated as the sum of ad_expr.
Note
Assumes that the genotype expression is already adjusted for sex ploidy.
- Parameters:
gt_expr (
CallExpression) – Genotype expression.gq_expr (
Union[Int32Expression,Int64Expression]) – GQ expression.ad_expr (
ArrayNumericExpression) – Allele depth expression.adj_gq (
int) – Minimum GQ. Default is 20.adj_dp (
int) – Minimum DP (sum of allele depths) for calls with allele depths. Default is 10.adj_ab (
float) – Minimum allele balance for het calls. Default is 0.2.haploid_adj_dp (
int) – Minimum DP (sum of allele depths) for haploid calls with allele depths. Default is 5.
- Return type:
- Returns:
Expression for adj genotype annotation.