Skip to main content

CLI and API for searching, manifesting, and downloading recount3 resources.

Project description

Clear BSD License with extra clauses Current library version Supported Python versions GitHub project

The recount3 package is a Python library and command-line tool for interacting with the recount3 data repository, a uniformly processed collection of RNA-seq studies covering human and mouse samples from SRA, GTEx, and TCGA.

The package provides a typed API for discovering, downloading, and assembling recount3 resources into analysis-ready objects. A companion CLI implements a discover -> manifest -> materialize workflow suitable for use in scripts and pipelines.

The recount3 package can be used in two ways:

  • As a Python library for searching, downloading, and assembling recount3 gene/exon/junction count matrices, sample metadata, genome annotations, and BigWig coverage files into SummarizedExperiment / RangedSummarizedExperiment objects via the BiocPy stack.

  • As a command-line tool (recount3) to search the mirror, produce JSONL manifests, and materialize resources to disk or into a .zip archive.

Installation

The core package requires Python 3.10 or newer and depends on NumPy, pandas, and SciPy. Optional extras unlock BiocPy integration and BigWig support.

Install on Linux, Mac OS X

python3 -m pip install recount3

Install on Windows

py -3 -m pip install recount3

Optional extras

Install with BiocPy support (SummarizedExperiment, RangedSummarizedExperiment, GenomicRanges):

python3 -m pip install "recount3[biocpy]"

Install with BigWig support (pybigwig):

python3 -m pip install "recount3[bigwig]"

Install all optional extras:

python3 -m pip install "recount3[biocpy,bigwig]"

Upgrade on Linux, Mac OS X

python3 -m pip install recount3 --upgrade

Upgrade on Windows

py -3 -m pip install recount3 --upgrade

Quickstart

Python API

Discover all resources for a project, stack the gene-level count matrices across samples, and build a RangedSummarizedExperiment:

>>> from recount3 import R3ResourceBundle
>>>
>>> # Discover every resource for a human SRA project.
>>> bundle = R3ResourceBundle.discover(
...     organism="human",
...     data_source="sra",
...     project="SRP009615",
... )
>>>
>>> # Stack raw gene-count matrices across all samples.
>>> counts = bundle.only_counts().stack_count_matrices(genomic_unit="gene")
>>>
>>> # Build a RangedSummarizedExperiment (requires recount3[biocpy]).
>>> rse = bundle.to_ranged_summarized_experiment(genomic_unit="gene")

Command-line tool

Discover resources, save a JSONL manifest, and download in parallel:

# Search for gene-level count files and write a manifest.
recount3 search gene-exon \
    organism=human data_source=sra genomic_unit=gene project=SRP009615 \
    --format=jsonl > manifest.jsonl

# Materialize all resources from the manifest (8 parallel jobs).
recount3 download --from=manifest.jsonl --dest=./downloads --jobs=8

Stream search output directly into download without an intermediate file:

recount3 search annotations \
    organism=human genomic_unit=gene annotation_extension=G026 \
    --format=jsonl | \
recount3 download --from=- --dest=./annotations

Dependencies

Core (installed automatically):

numpy>=2.0
pandas>=2.2
scipy>=1.13

Optional: BiocPy integration (recount3[biocpy]):

biocframe>=0.7
genomicranges>=0.8
summarizedexperiment>=0.6

Optional: BigWig support (recount3[bigwig]):

pybigwig>=0.3.18

Questions, Feature Requests, and Bug Reports

Please submit questions, feature requests, and bug reports on Issues.

License

This package is distributed under the BSD license.

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

recount3-1.0.0.tar.gz (164.5 kB view details)

Uploaded Source

Built Distribution

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

recount3-1.0.0-py3-none-any.whl (105.3 kB view details)

Uploaded Python 3

File details

Details for the file recount3-1.0.0.tar.gz.

File metadata

  • Download URL: recount3-1.0.0.tar.gz
  • Upload date:
  • Size: 164.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for recount3-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d3f96e5c533d71a1d124c5075c1169fa91b50d9a252a0c2c19825095782cba59
MD5 f519b0d9bb204fb92e3804e8ed11eabd
BLAKE2b-256 3a001463032f397a8899b49e9d4a0ea627241697728ec309aa0409e5303d31d7

See more details on using hashes here.

File details

Details for the file recount3-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: recount3-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 105.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for recount3-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb4b7152844c781cb5ed330f789e0fbc177c9d665ff8eeac0e522df0ae496428
MD5 b89211f828693a4b8883a022f3c94460
BLAKE2b-256 87d81a39c002b7c3c7a403b53815a0c4004a22e671552e957e71f29afc990f15

See more details on using hashes here.

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