GenomeUtils.Downloaders
Abstract base for downloaders with caching, logging, and cleanup helpers for fetched files. |
|
Ensembl-specific implementation that locates genome resources with |
Classes
- class GenomeUtils.Downloaders.Downloader(download_dir=None)[source]
Bases:
ABCAbstract base class for all downloaders.
- Parameters:
download_dir (Path | None)
- class GenomeUtils.Downloaders.EnsemblGenomeDownloader(assembly_id, ensembl_release, species, genomes_root_dir=PosixPath('data/genomes'))[source]
Bases:
DownloaderDownloads genome data from Ensembl FTP.
This downloader constructs URLs directly from the Ensembl FTP layout and downloads the files, storing them in genomes_root_dir/ensembl/{assembly_id}/{ensembl_release}.
- FTP_BASE = 'https://ftp.ensembl.org/pub'
- download(force=False, output_db=False)[source]
Download DNA, cDNA, and Annotation files from Ensembl FTP.
- Returns:
A dictionary mapping a file type to the local Path. Keys are dna, cdna, and annotation. When
output_dbis true, the returned mapping also contains the annotation database path under the db key.- Parameters:
- Return type: