Python client for searching and downloading gene expression datasets from EMBL-EBI Expression Atlas
Project description
Expression Atlas Python Client
Python client for searching and downloading gene expression datasets from EMBL-EBI Expression Atlas, mirroring the R Bioconductor package.
Features
- Search for Expression Atlas experiments by properties and species
- Download RNA-seq and microarray experiment data
- R-compatible data structures:
SummarizedExperiment(RNA-seq) andExpressionSet(microarray) wrapped inSimpleList - Sync API with full type hints
Installation
pip install expression-atlas
For development:
pip install -e ".[dev]"
Quick Start
from expression_atlas import ExpressionAtlasClient
client = ExpressionAtlasClient()
# Search experiments (DataFrame with Accession/Species/Type/Title)
results = client.search_experiments(properties=["cancer"], species="homo sapiens")
# Download a single experiment (SimpleList)
exp = client.get_experiment("E-MTAB-1624")
# RNA-seq example
rnaseq = exp["rnaseq"] # SummarizedExperiment
counts = rnaseq.assays["counts"] # numpy array genes × samples
sample_annotations = rnaseq.colData
# Microarray example
eset = exp["A-AFFY-126"] # ExpressionSet
exprs = eset.exprs # probes × samples
pheno = eset.phenoData
# Multiple experiments
exps = client.get_experiments(["E-MTAB-1624", "E-MTAB-1625"])
Data Structures
RNA-seq Data
RNA-seq experiments are returned as SummarizedExperiment objects containing:
assays["counts"]: genes × samples matrix (orientation matches R package)colData: sample annotationsrowData: gene annotations
Microarray Data
Microarray experiments are returned as ExpressionSet objects containing:
exprs: probes × samples matrix (orientation matches R package)phenoData: sample annotationsfeatureData: probe annotations
API Reference
ExpressionAtlasClient
search_experiments(properties, species=None)
Search for experiments matching given properties.
Parameters:
properties: List of search terms (e.g.,["cancer", "breast"])species: Optional species filter (e.g.,"homo sapiens")
Returns: pandas.DataFrame with columns: Accession, Species, Type, Title
get_experiment(accession)
Download a single experiment.
Parameters:
accession: ArrayExpress/BioStudies accession (e.g.,"E-MTAB-1624")
Returns: ExperimentSummary object
get_experiments(accessions)
Download multiple experiments.
Parameters:
accessions: List of accessions
Returns: Dictionary mapping accessions to ExperimentSummary objects
License
GPL-3.0-or-later
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file expression_atlas-0.1.0.tar.gz.
File metadata
- Download URL: expression_atlas-0.1.0.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2517f26c6376556d23e8ff5df25820ae4a18e212e28265b1f90af35c03f38665
|
|
| MD5 |
918519d990786fe4e3c3684573fc2866
|
|
| BLAKE2b-256 |
2a46fde4ba55ccd459ea6c6431235e6649cf9da1d8bc6211198e6b81b01e7400
|
Provenance
The following attestation bundles were made for expression_atlas-0.1.0.tar.gz:
Publisher:
publish.yml on gdeol4/expression-atlas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
expression_atlas-0.1.0.tar.gz -
Subject digest:
2517f26c6376556d23e8ff5df25820ae4a18e212e28265b1f90af35c03f38665 - Sigstore transparency entry: 798910225
- Sigstore integration time:
-
Permalink:
gdeol4/expression-atlas@49c36b58242ef50ef8138bda840e38a85ca4e2ff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gdeol4
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@49c36b58242ef50ef8138bda840e38a85ca4e2ff -
Trigger Event:
release
-
Statement type:
File details
Details for the file expression_atlas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: expression_atlas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c30e6771bac241117ed6b76ee9f2a3af65bc1cf88783624817221cbcf0555915
|
|
| MD5 |
5730714c9603c6ede55a9f18879882e5
|
|
| BLAKE2b-256 |
2b9c0b0d9b06ac7825b6cb59f26bc152a1c9baa0e440c487039d3023e97fa7ec
|
Provenance
The following attestation bundles were made for expression_atlas-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on gdeol4/expression-atlas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
expression_atlas-0.1.0-py3-none-any.whl -
Subject digest:
c30e6771bac241117ed6b76ee9f2a3af65bc1cf88783624817221cbcf0555915 - Sigstore transparency entry: 798910226
- Sigstore integration time:
-
Permalink:
gdeol4/expression-atlas@49c36b58242ef50ef8138bda840e38a85ca4e2ff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gdeol4
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@49c36b58242ef50ef8138bda840e38a85ca4e2ff -
Trigger Event:
release
-
Statement type: