cellink.resources.get_eqtl_catalog_dataset_associations#
- cellink.resources.get_eqtl_catalog_dataset_associations(dataset_id, data_home=None, refresh=False, return_path=False, region=None, **params)#
Retrieve cis-QTL summary statistics for one eQTL Catalogue dataset.
- Parameters:
dataset_id (str) – eQTL Catalogue dataset ID (e.g.,
"QTD000625", OneK1K Treg memory).data_home (str or Path, optional) – Directory to store cached files. Defaults to user data directory.
refresh (bool, default=False) – If True, ignore cached data and re-fetch.
return_path (bool, default=False) – If True, return the local cached file path instead of a DataFrame. Only meaningful for a whole-dataset download (
region=None).region (str or sequence of str, optional) – One or more regions in tabix syntax (
"6:89900000-90300000"), fetched with a remote range query instead of downloading the file. Chromosomes are named without a ``chr`` prefix and coordinates are GRCh38. Strongly recommended: a single dataset’s full summary statistics are ~1.4 GB.**params (
Any) – Post-hoc row filters applied to the result ascolumn=value, e.g.gene_id="ENSG00000112182"(BACH2) orrsid="rs72928038".
- Return type:
DataFrame|Path- Returns:
pd.DataFrame or Path Summary statistics, or the cached file path when
return_path=True.
Notes
The eQTL Catalogue REST API this function previously used (
https://www.ebi.ac.uk/eqtl/api/v3) was retired and now returns HTTP 410 for every endpoint and version. Access is via the FTP/tabix distribution described at https://www.ebi.ac.uk/eqtl/Data_access/.Examples
>>> import cellink as cl >>> # cis-eQTLs at the BACH2 locus in OneK1K memory Tregs >>> df = cl.resources.get_eqtl_catalog_dataset_associations( ... "QTD000625", region="6:89900000-90300000" ... ) >>> df.nsmallest(5, "pvalue")[["rsid", "gene_id", "pvalue", "beta"]]