*A general utility to download a file, with optional status messages and a progress bar.
Args: url (str): The URL of the file to download. filename (str): The name for the saved file. sub_dir (Path, optional): A subdirectory under the main data path. Defaults to None. verbose (bool, optional): If True, prints status messages and shows a progress bar. Defaults to True.
Returns: Path: The full path to the downloaded file, or None on error.*
*Download liftover chain file between genome versions from UCSC goldenPath liftOver.
Chain files enable coordinate conversion between different genome builds. For example, converting hg19 (GRCh37) coordinates to hg38 (GRCh38).
Args: genome_from (str): The original reference genome name (e.g., ‘hg19’, ‘hg38’, ‘mm10’). genome_to (str): The new reference genome name (e.g., ‘hg19’, ‘hg38’, ‘mm10’). **kwargs: Additional keyword arguments to be passed to download_file() (e.g., verbose=False)
Returns: Path: The path to the downloaded file, or None if an error occurred.
Examples: >>> # Download chain file for hg19 to hg38 conversion >>> chain_path = get_liftover_chain(“hg19”, “hg38”) >>> print(f”Chain file saved to: {chain_path}“)*