grelu.data.utils#

grelu.data.utils contains Dataset-related utility functions.

Functions#

get_chromosomes(→ List[str])

Return a list of chromosomes given shortcut names.

Module Contents#

grelu.data.utils.get_chromosomes(chroms: str | List[str], genome=None) → List[str][source]#

Return a list of chromosomes given shortcut names.

Parameters:
  • chroms – The chromosome name(s) or shortcut name(s). Supported shortcuts are “autosomes”, “autosomesX”, and “autosomesXY”.

  • genome – A genome object with a sizes_file attribute (e.g. from get_genome()). When provided, chromosome names are read from the genome instead of using hardcoded human defaults.

Returns:

A list of chromosome name(s).