Skip to main content

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) and ExpressionSet (microarray) wrapped in SimpleList
  • 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 annotations
  • rowData: gene annotations

Microarray Data

Microarray experiments are returned as ExpressionSet objects containing:

  • exprs: probes × samples matrix (orientation matches R package)
  • phenoData: sample annotations
  • featureData: 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

expression_atlas-0.1.0.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

expression_atlas-0.1.0-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

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

Hashes for expression_atlas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2517f26c6376556d23e8ff5df25820ae4a18e212e28265b1f90af35c03f38665
MD5 918519d990786fe4e3c3684573fc2866
BLAKE2b-256 2a46fde4ba55ccd459ea6c6431235e6649cf9da1d8bc6211198e6b81b01e7400

See more details on using hashes here.

Provenance

The following attestation bundles were made for expression_atlas-0.1.0.tar.gz:

Publisher: publish.yml on gdeol4/expression-atlas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file expression_atlas-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for expression_atlas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c30e6771bac241117ed6b76ee9f2a3af65bc1cf88783624817221cbcf0555915
MD5 5730714c9603c6ede55a9f18879882e5
BLAKE2b-256 2b9c0b0d9b06ac7825b6cb59f26bc152a1c9baa0e440c487039d3023e97fa7ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for expression_atlas-0.1.0-py3-none-any.whl:

Publisher: publish.yml on gdeol4/expression-atlas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page