Skip to main content

RhyDB

High-performance analytical database for sequence alignment data

For information on how to build, test, and contribute to RhyDB, see Contributing.

Python Bindings

RhyDB provides Python bindings via Cython. The bindings wrap the core C++ Database and are installable by pip install rhydb.

See Contributing for build instructions.

Usage

from rhydb import Database

# Create a new database
db = Database()

# Or load from a saved state
db = Database("/path/to/saved/database")

# Create a table with a nucleotide sequence column, whose reference is taken
# from the built-in reference_genomes table
db.append_data_from_string(
    "reference_genomes", '{"name": "main", "type": "nucleotide", "sequence": "ACGT..."}'
)
db.query("createTable(sequences, {id := string, main := nucleotideSequence(reference := main)}, primaryKey := id)")

# Append data from file
db.append_data_from_file("sequences", "/path/to/data.ndjson")

# Get reference sequence
ref = db.get_nucleotide_reference_sequence("sequences", "main")

# Get filtered bitmap (list of matching row indices)
indices = db.get_filtered_bitmap("sequences", "some_filter")

# Query data through the SaneQL front-end
table = db.query("sequences.filter(true)")

# Save database state
db.save_checkpoint("/path/to/save/directory")

# Print all data (to stdout)
db.print_all_data("sequences")

Configuration Files

For RhyDB, there are three different configuration files:

  • DatabaseConfig described in file database_config.h
  • PreprocessingConfig used when started with preprocessing and described in file preprocessing_config.h. For details see rhydb preprocessing --help.
  • RuntimeConfig used when started with api and described in file runtime_config.h For details see rhydb api --help.

The database config contains the schema of the database and is always required when preprocessing data. The database config will be saved together with the output of the preprocessing and is therefore not required when starting RhyDB as an API.

An example configuration file can be seen in testBaseData/exampleDataset/database_config.yaml.

By default, the config files are expected to be YAML files in the current working directory in snake_case (database_config.yaml, preprocessing_config.yaml, runtime_config.yaml), but their location can be overridden using the options --database-config=X, --preprocessing-config=X, and --runtime-config=X.

Preprocessing and Runtime configurations contain default values for all fields and are thus only optional. Their parameters can also be provided as command-line arguments in snake_case and as environment variables prefixed with RHYDB_ in capital SNAKE_CASE. (e.g. RHYDB_INPUT_DIRECTORY).

The precendence is CLI argument > Environment Variable > Configuration File > Default Value

Run The Preprocessing

The preprocessing acts as a program that takes an input directory that contains the to-be-processed data and an output directory where the processed data will be stored. Both need to be mounted to the container.

RhyDB expects a preprocessing config that can be mounted to the default location /app/preprocessing_config.yaml.

Additionally, a database config and a ndjson file containing the data are required. They should typically be mounted in /preprocessing/input.

docker run \
  -v your/input/directory:/preprocessing/input \
  -v your/preprocessing/output:/preprocessing/output \
  -v your/preprocessing_config.yaml:/app/preprocessing_config.yaml \
  ghcr.io/rhyorg/rhydb preprocessing

Both config files can also be provided in custom locations:

rhydb preprocessing --preprocessing-config=./custom/preprocessing_config.yaml --database-config=./custom/database_config.yaml

The Docker image contains a default preprocessing config that sets defaults specific for running RhyDB in Docker. Apart from that, there are default values if neither user-provided nor default config specify fields. The user-provided preprocessing config can be used to overwrite the default values. For a full reference, see the help text.

Run docker container (api)

After preprocessing the data, the api can be started with the following command:

docker run \
  -p 8081:8081 \
  -v your/preprocessing/output:/data \
  ghcr.io/rhyorg/rhydb api

The directory where RhyDB expects the preprocessing output can be overwritten via rhydb api --data-directory=/custom/data/directory or in a corresponding configuration file.

Acknowledgments

Original genome indexing logic with roaring bitmaps by Prof. Neumann: https://db.in.tum.de/~neumann/gi/

Metadata

Release files for rhydb 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for rhydb 0.16.0
File Actions
rhydb-0.16.0-cp314-cp314-manylinux_2_35_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.35+ x86-64 Details for rhydb-0.16.0-cp314-cp314-manylinux_2_35_x86_64.whl
rhydb-0.16.0-cp314-cp314-manylinux_2_35_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.0-cp314-cp314-manylinux_2_35_aarch64.whl
rhydb-0.16.0-cp314-cp314-macosx_15_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 15.0+ x86-64 Details for rhydb-0.16.0-cp314-cp314-macosx_15_0_x86_64.whl
rhydb-0.16.0-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details for rhydb-0.16.0-cp314-cp314-macosx_15_0_arm64.whl
rhydb-0.16.0-cp313-cp313-manylinux_2_35_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.35+ x86-64 Details for rhydb-0.16.0-cp313-cp313-manylinux_2_35_x86_64.whl
rhydb-0.16.0-cp313-cp313-manylinux_2_35_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.0-cp313-cp313-manylinux_2_35_aarch64.whl
rhydb-0.16.0-cp313-cp313-macosx_15_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 15.0+ x86-64 Details for rhydb-0.16.0-cp313-cp313-macosx_15_0_x86_64.whl
rhydb-0.16.0-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details for rhydb-0.16.0-cp313-cp313-macosx_15_0_arm64.whl
rhydb-0.16.0-cp312-cp312-manylinux_2_35_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.35+ x86-64 Details for rhydb-0.16.0-cp312-cp312-manylinux_2_35_x86_64.whl
rhydb-0.16.0-cp312-cp312-manylinux_2_35_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.0-cp312-cp312-manylinux_2_35_aarch64.whl
rhydb-0.16.0-cp312-cp312-macosx_15_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 15.0+ x86-64 Details for rhydb-0.16.0-cp312-cp312-macosx_15_0_x86_64.whl
rhydb-0.16.0-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details for rhydb-0.16.0-cp312-cp312-macosx_15_0_arm64.whl
rhydb-0.16.0-cp311-cp311-manylinux_2_35_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.35+ x86-64 Details for rhydb-0.16.0-cp311-cp311-manylinux_2_35_x86_64.whl
rhydb-0.16.0-cp311-cp311-manylinux_2_35_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.0-cp311-cp311-manylinux_2_35_aarch64.whl
rhydb-0.16.0-cp311-cp311-macosx_15_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 15.0+ x86-64 Details for rhydb-0.16.0-cp311-cp311-macosx_15_0_x86_64.whl
rhydb-0.16.0-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for rhydb-0.16.0-cp311-cp311-macosx_15_0_arm64.whl

Total release size: 114.2 MB

Release files / rhydb-0.16.0-cp314-cp314-manylinux_2_35_x86_64.whl

Download URL rhydb-0.16.0-cp314-cp314-manylinux_2_35_x86_64.whl
Size 8.8 MB
Tags CPython 3.14 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
c507b516b2afd68be3f2055b3f05b9e1fbbd926514e019a99ecc9cc033981e3c
BLAKE2b-256 checksum
How to use checksums
d5032113d88d54d65bcd6e966803c97a03edb59def17cf7fdd21d4033eabd6d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp314-cp314-manylinux_2_35_aarch64.whl

Download URL rhydb-0.16.0-cp314-cp314-manylinux_2_35_aarch64.whl
Size 8.0 MB
Tags CPython 3.14 Linux glibc 2.35+ ARM64
SHA-256 checksum
How to use checksums
63e42b40d47182a467b6fdd7952f9b193b1364ee5b5d184bd606ef8ea2e60273
BLAKE2b-256 checksum
How to use checksums
e42f81c61fadf402949ac1e50f30467de9971eec7f65cc32c8182354462a4a4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp314-cp314-macosx_15_0_x86_64.whl

Download URL rhydb-0.16.0-cp314-cp314-macosx_15_0_x86_64.whl
Size 6.4 MB
Tags CPython 3.14 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
84dcafb6f1c8180c691945596dfdef5e72d6792c22d1128e322644467dcb2b68
BLAKE2b-256 checksum
How to use checksums
1d37337b904ddb06b0b4acb86e8927ce6a4a3a2629988a7c062f38df1c5066da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp314-cp314-macosx_15_0_arm64.whl

Download URL rhydb-0.16.0-cp314-cp314-macosx_15_0_arm64.whl
Size 5.4 MB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
000fa5bd5a217b84c792821494efa6b98bcbd763c85ca04e36d596d126df03fb
BLAKE2b-256 checksum
How to use checksums
36a3e6e67f209d321799a0fbb592deb9f974a37956124481763bb4f54d87db2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp313-cp313-manylinux_2_35_x86_64.whl

Download URL rhydb-0.16.0-cp313-cp313-manylinux_2_35_x86_64.whl
Size 8.8 MB
Tags CPython 3.13 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
646af0a6f9a691453f5ed4e9fbc3cdabe90b19a07093f4cca3dd311b7154c6c0
BLAKE2b-256 checksum
How to use checksums
910b349b3d34523e035e21dfa01ffd1ab7b94e73711fe6c02d218ad88999fd06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp313-cp313-manylinux_2_35_aarch64.whl

Download URL rhydb-0.16.0-cp313-cp313-manylinux_2_35_aarch64.whl
Size 8.0 MB
Tags CPython 3.13 Linux glibc 2.35+ ARM64
SHA-256 checksum
How to use checksums
61b84dc5775f994ecbaba56a5fd91039e62cc2b19ab49252412b095a9bca404a
BLAKE2b-256 checksum
How to use checksums
09079b490c0fde8387d017147e4d256d16f12dddfff6237c570587fc74247d54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp313-cp313-macosx_15_0_x86_64.whl

Download URL rhydb-0.16.0-cp313-cp313-macosx_15_0_x86_64.whl
Size 6.4 MB
Tags CPython 3.13 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
4a77d11bcb460752a5c466c75b8456f402f17e17e78d11d2fe441b282438bef9
BLAKE2b-256 checksum
How to use checksums
e4bf318b56b6c5d359af140176199c262ccebac061a88683373e8e3c3249a7cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp313-cp313-macosx_15_0_arm64.whl

Download URL rhydb-0.16.0-cp313-cp313-macosx_15_0_arm64.whl
Size 5.4 MB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
44570187fd52935e9a52120aaa0cba0d6523756dd11cf0695339354014aaee5b
BLAKE2b-256 checksum
How to use checksums
67123809618bb1ecf74d14f9cda4cc74a1510c834f04028bc865a1df9b40290c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp312-cp312-manylinux_2_35_x86_64.whl

Download URL rhydb-0.16.0-cp312-cp312-manylinux_2_35_x86_64.whl
Size 8.8 MB
Tags CPython 3.12 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
7ac80af6f2564e9f8062073ed690bc28c45c8d772afab9dd81db1dc156f64096
BLAKE2b-256 checksum
How to use checksums
dc2922358ba733aff53a83eeb9ed48c13edb4d5e5143a8660cc7f721ca24d70b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp312-cp312-manylinux_2_35_aarch64.whl

Download URL rhydb-0.16.0-cp312-cp312-manylinux_2_35_aarch64.whl
Size 8.0 MB
Tags CPython 3.12 Linux glibc 2.35+ ARM64
SHA-256 checksum
How to use checksums
d698239d483b067f249777b598badaf680592c17ed664a7f89052e84b97d70e7
BLAKE2b-256 checksum
How to use checksums
39905e3a29b2b56090417846101465c41d938b3ba4610f75e02c5e62b03556eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp312-cp312-macosx_15_0_x86_64.whl

Download URL rhydb-0.16.0-cp312-cp312-macosx_15_0_x86_64.whl
Size 6.4 MB
Tags CPython 3.12 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
7e21aac09d2919457e31666e2db34c98b15401dd2bd9d3a4856408d59966984f
BLAKE2b-256 checksum
How to use checksums
0e146f5b6c0a25e994a04ab6b7d7f474fcc201294ccdd833952a8bae6ad9e5a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp312-cp312-macosx_15_0_arm64.whl

Download URL rhydb-0.16.0-cp312-cp312-macosx_15_0_arm64.whl
Size 5.4 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
1fc3ccfa9a23522750a3e9ed55bb36b5d6ac975f6534828d0f7cd2dd832bd225
BLAKE2b-256 checksum
How to use checksums
3a38988351acd01d5561163899d0f65497037917e6686e7800ff4e945fdffde0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp311-cp311-manylinux_2_35_x86_64.whl

Download URL rhydb-0.16.0-cp311-cp311-manylinux_2_35_x86_64.whl
Size 8.8 MB
Tags CPython 3.11 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
e10cc47ddc5850abcf2073bb9c5fb0bd0bb7ee795dfafea64757baf5b151ede2
BLAKE2b-256 checksum
How to use checksums
fda655060b8cb5a13f9a0d8fbf7bba221079675eeac61ec389897d5f1a8b6b98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp311-cp311-manylinux_2_35_aarch64.whl

Download URL rhydb-0.16.0-cp311-cp311-manylinux_2_35_aarch64.whl
Size 8.0 MB
Tags CPython 3.11 Linux glibc 2.35+ ARM64
SHA-256 checksum
How to use checksums
ff0ed87b29d7c186564b09672470b840aa5c8ad3e6c4f0981e6365fca4f49946
BLAKE2b-256 checksum
How to use checksums
338d2a3ee0f5778d4c581f10ca34195a9422a82bfb8c3a7b18000c819d0bd426
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp311-cp311-macosx_15_0_x86_64.whl

Download URL rhydb-0.16.0-cp311-cp311-macosx_15_0_x86_64.whl
Size 6.4 MB
Tags CPython 3.11 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
d46693e32aab3a79656493404818f9f47d79c068e865c4e5fd48bb1a0e1910c1
BLAKE2b-256 checksum
How to use checksums
19b1e075ddeeaf7d53a33a427f4d7ae8fbc8638e209021510f99975606ac34c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / rhydb-0.16.0-cp311-cp311-macosx_15_0_arm64.whl

Download URL rhydb-0.16.0-cp311-cp311-macosx_15_0_arm64.whl
Size 5.4 MB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
a0eb6b0089850a6873de54ec73d71dddbca8ec8cb56a4f9642007a272291aa22
BLAKE2b-256 checksum
How to use checksums
c00db70d10b6afb9f4722b7785d465f90e92e30e3a164cb586a11d742e8a5e73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for rhydb 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page