hail.vds.filter_chromosomes
- hail.vds.filter_chromosomes(vds, *, keep=None, remove=None, keep_autosomes=False)[source]
Filter chromosomes of a
VariantDataset
in several possible modes.Notes
There are three modes for
filter_chromosomes()
, based on which argument is passed to the function. Exactly one of the below arguments must be passed by keyword.keep
: This argument expects a single chromosome identifier or a list of chromosome identifiers, and the function returns aVariantDataset
with only those chromosomes.remove
: This argument expects a single chromosome identifier or a list of chromosome identifiers, and the function returns aVariantDataset
with those chromosomes removed.keep_autosomes
: This argument expects the valueTrue
, and returns a dataset without sex and mitochondrial chromosomes.
- Parameters:
vds (
VariantDataset
) – Dataset.keep – Keep a specified list of contigs.
remove – Remove a specified list of contigs
keep_autosomes – If true, keep only autosomal chromosomes.
- Returns: