Skip to content

Conversation

jkgoodrich
Copy link
Contributor

@jkgoodrich jkgoodrich commented Sep 14, 2022

NOTE: This PR is stacked on the annotate_sex_variant_filters PR #479

If helpful for testing:

import hail as hl
from gnomad_qc.v4.resources.basics import (
    calling_intervals,
    get_gnomad_v4_vds,
)
from bokeh.plotting import output_notebook, show

hl.init(default_reference='GRCh38')
output_notebook()

vds = get_gnomad_v4_vds(
    remove_hard_filtered_samples=False,
    remove_hard_filtered_samples_no_sex=True,
    test=True,
)
calling_intervals=calling_intervals(interval_name='intersection', calling_interval_padding=50).ht()
freq_ht = hl.read_table("gs://gnomad/v4.0/sample_qc/exomes/gnomad.exomes.v4.0.f_stat_sites.ht")

sex_ht = annotate_sex(vds, included_intervals=calling_intervals, sites_ht=freq_ht, aaf_expr="AF", gt_expr="LGT", use_gaussian_mixture_model=True, variants_only_x_ploidy=True, compute_x_frac_variants_hom_alt=True)

show(hl.plot.histogram(sex_ht.chrx_frac_hom_alt_adj))
show(hl.plot.scatter(sex_ht.chrX_ploidy, sex_ht.chrx_frac_hom_alt_adj, label=sex_ht.sex_karyotype))

…tate_sex_variant_filter_options' of https://github.com/broadinstitute/gnomad_methods into jg/annotate_sex_add_frac_hom_alt_option

� Conflicts:
�	gnomad/sample_qc/pipeline.py
Base automatically changed from jg/annotate_sex_variant_filter_options to main September 21, 2022 17:16
@jkgoodrich jkgoodrich requested a review from klaricch September 21, 2022 18:36
Copy link
Contributor

@klaricch klaricch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jkgoodrich jkgoodrich merged commit bcfd8d9 into main Sep 21, 2022
@jkgoodrich jkgoodrich deleted the jg/annotate_sex_add_frac_hom_alt_option branch September 21, 2022 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants