gnomad_toolbox.analysis.general

Set of general functions for gnomAD analysis.

Module Functions

gnomad_toolbox.analysis.general.get_variant_count_by_freq_bin([...])

Count variants by frequency bin.

Set of general functions for gnomAD analysis.

gnomad_toolbox.analysis.general.get_variant_count_by_freq_bin(af_cutoffs=None, singletons=False, doubletons=False, pass_only=True, **kwargs)[source]

Count variants by frequency bin.

By default, this function counts PASS variants that are AC0, AF < 0.01%, and AF 0.01% - 0.1%.

The function can also include counts of singletons and doubletons, with or without passing filters.

Note

This function works for gnomAD exomes and genomes data types, not yet for gnomAD joint data type, since the HT schema is slightly different.

Parameters:
  • af_cutoffs (Optional[List[float]]) – List of allele frequencies cutoffs.

  • singletons (bool) – Include singletons.

  • doubletons (bool) – Include doubletons.

  • pass_only (bool) – Include only PASS variants.

  • kwargs – Keyword arguments to pass to _get_dataset. Includes ‘ht’, ‘data_type’, and ‘version’.

Return type:

Dict[str, int]

Returns:

Dictionary with counts.