Skip to content

Commit e056c66

Browse files
committed
Removed chr_x, chr_y args from default_annotate_sex, also updated docstring
1 parent 3a677b8 commit e056c66

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

gnomad_hail/utils/sample_qc.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,15 @@ def default_annotate_sex(
285285
excluded_intervals: Optional[hl.Table] = None,
286286
included_intervals: Optional[hl.Table] = None,
287287
normalization_contig: str = 'chr20',
288-
chr_x: Optional[str] = None,
289-
chr_y: Optional[str] = None,
290288
sites_ht: Optional[hl.Table] = None,
291289
aaf_expr: Optional[str] = None,
292290
gt_expr: str = 'GT',
293291
f_stat_cutoff: float = 0.5,
294292
aaf_threshold: float = 0.001
295293
) -> hl.Table:
296294
"""
297-
Imputes sample sex based on X-chromosome heterozygosity and sex chromosome ploidy.
295+
Imputes sample sex based on X-chromosome heterozygosity and sex chromosome ploidy.
296+
298297
Returns Table with the following fields:
299298
- s (str): Sample
300299
- chr20_mean_dp (float32): Sample's mean coverage over chromosome 20.
@@ -314,9 +313,7 @@ def default_annotate_sex(
314313
:param bool is_sparse: Whether input MatrixTable is in sparse data format
315314
:param excluded_intervals: Optional table of intervals to exclude from the computation.
316315
:param included_intervals: Optional table of intervals to use in the computation. REQUIRED for exomes.
317-
:param normalization_contig: Which chromosome to normalize by
318-
:param chr_x: Optional X Chromosome contig name (by default uses the X contig in the reference)
319-
:param chr_y: Optional Y Chromosome contig name (by default uses the Y contig in the reference)
316+
:param normalization_contig: Which chromosome to use to normalize sex chromosome coverage. Used in determining sex chromosome ploidies.
320317
:param sites_ht: Optional Table to use. If present, filters input MatrixTable to sites in this Table prior to imputing sex,
321318
and pulls alternate allele frequency from this Table.
322319
:param aaf_expr: Optional. Name of field in input MatrixTable with alternate allele frequency.
@@ -329,7 +326,7 @@ def default_annotate_sex(
329326
if is_sparse:
330327
ploidy_ht = impute_sex_ploidy(
331328
mt, excluded_intervals, included_intervals,
332-
normalization_contig, chr_x, chr_y
329+
normalization_contig
333330
)
334331
else:
335332
raise NotImplementedError("Imputing sex ploidy does not exist yet for dense data.")

0 commit comments

Comments
 (0)