Skip to main content

Efficiently access the 'Bedrock Bio' library of open-access computational biology datasets.

Project description

bedrock-bio

Open-Access Computational Biology Datasets

Description

Efficiently access a curated library of open-access computational biology datasets. Tables support predicate pushdown and projection to the cloud storage backend, enabling quick, iterative access to otherwise massive, unwieldy tables.

bedrock_bio consists of five user-facing functions:

  • list_namespaces(): returns a list of available namespace (data source) identifiers
  • describe_namespace('<name>'): returns a namespace's name, citation, license, context, and its tables
  • list_tables(namespace): returns a list of table identifiers, optionally filtered to one namespace
  • describe_table('<name>'): returns a table's context, column definitions, and partition columns (with their allowed values)
  • load_table('<name>'): returns a lazy DuckDB relation for a table

DuckDB methods (filter, select, limit) can be used on the relation returned by load_table to push down row filters and column selections to the storage backend. Filtering on the partition columns returned by describe_table gives the fastest reads.

Installation

To install the latest release from PyPI:

pip install bedrock-bio

Or install the current development version from GitHub:

pip install git+https://github.com/bedrock-bio/bedrock-bio-client.git@main#subdirectory=python

Examples

import bedrock_bio as bb

List available tables:

bb.list_tables()

Describe a table to see its metadata, citation, and columns:

bb.describe_table('ukb_ppp.pqtls')

Lazily load a table, filter on partition columns (for fastest reads), select columns, and collect into an in-memory data frame:

df = (
    bb.load_table('ukb_ppp.pqtls')
      .filter("ancestry = 'EUR' AND protein_id = 'A0FGR8' AND panel = 'Inflammation'")
      .select('chromosome, position, effect_allele, other_allele, beta, neg_log_10_p_value')
      .df()
)

Dataset Requests

To request the addition of a new table to the library, open an issue.

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

bedrock_bio-2.0.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

bedrock_bio-2.0.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file bedrock_bio-2.0.0.tar.gz.

File metadata

  • Download URL: bedrock_bio-2.0.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bedrock_bio-2.0.0.tar.gz
Algorithm Hash digest
SHA256 46eacb2788feaf3af60d57eeeb8b4b8e7b37a50d9a5a9ed708649cea6bc15482
MD5 5e495da1c2a62e687cc610226eccd80e
BLAKE2b-256 a947b38729c4bdd9aa27a66cfcc0892c955f341922a3d6f956f340c62606526a

See more details on using hashes here.

File details

Details for the file bedrock_bio-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: bedrock_bio-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bedrock_bio-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e613aece3882f858b5eed77d9b21f59c1267c66043528ecbb0ca1f1d909cbc9b
MD5 a27aff77d604c579c1b0f0b4bc30e28e
BLAKE2b-256 0f8a789981d495a18ccfb5ed3185e639b93caf8e4cde2052b23000bdabe9d400

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