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.1

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.1
File Actions
rhydb-0.16.1-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.1-cp314-cp314-manylinux_2_35_x86_64.whl
rhydb-0.16.1-cp314-cp314-manylinux_2_35_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.1-cp314-cp314-manylinux_2_35_aarch64.whl
rhydb-0.16.1-cp314-cp314-macosx_15_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 15.0+ x86-64 Details for rhydb-0.16.1-cp314-cp314-macosx_15_0_x86_64.whl
rhydb-0.16.1-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details for rhydb-0.16.1-cp314-cp314-macosx_15_0_arm64.whl
rhydb-0.16.1-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.1-cp313-cp313-manylinux_2_35_x86_64.whl
rhydb-0.16.1-cp313-cp313-manylinux_2_35_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.1-cp313-cp313-manylinux_2_35_aarch64.whl
rhydb-0.16.1-cp313-cp313-macosx_15_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 15.0+ x86-64 Details for rhydb-0.16.1-cp313-cp313-macosx_15_0_x86_64.whl
rhydb-0.16.1-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details for rhydb-0.16.1-cp313-cp313-macosx_15_0_arm64.whl
rhydb-0.16.1-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.1-cp312-cp312-manylinux_2_35_x86_64.whl
rhydb-0.16.1-cp312-cp312-manylinux_2_35_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.1-cp312-cp312-manylinux_2_35_aarch64.whl
rhydb-0.16.1-cp312-cp312-macosx_15_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 15.0+ x86-64 Details for rhydb-0.16.1-cp312-cp312-macosx_15_0_x86_64.whl
rhydb-0.16.1-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details for rhydb-0.16.1-cp312-cp312-macosx_15_0_arm64.whl
rhydb-0.16.1-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.1-cp311-cp311-manylinux_2_35_x86_64.whl
rhydb-0.16.1-cp311-cp311-manylinux_2_35_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.35+ ARM64 Details for rhydb-0.16.1-cp311-cp311-manylinux_2_35_aarch64.whl
rhydb-0.16.1-cp311-cp311-macosx_15_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 15.0+ x86-64 Details for rhydb-0.16.1-cp311-cp311-macosx_15_0_x86_64.whl
rhydb-0.16.1-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for rhydb-0.16.1-cp311-cp311-macosx_15_0_arm64.whl

Total release size: 114.3 MB

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

Download URL rhydb-0.16.1-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
a2aed17607cdb22d69fe9b92aa6cc66154cc2203d94b8bcfa0b2bebce5926350
BLAKE2b-256 checksum
How to use checksums
0d2be232c7e43619e8234a2d300118002788e2fcf2e5db09345af7010434ff11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
60531361df244f940796425f175d175ba47a7f9eaecee28d557bc79b458aa7a3
BLAKE2b-256 checksum
How to use checksums
3c8eaf01fe3536282f10a8dc4795eb9b3a5aac7c09c613da079f721557429c9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
082389a50725fa6ec246b13a8b2e2555c70c08f2d9583e80641364746f4854df
BLAKE2b-256 checksum
How to use checksums
43cef82618519551bc39264db01a1d663e92895b1f7dc14e0e7aace628b07533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
d0474213fbe77c28bf056791a0ee87fe1d867516a0075e1c477c28a5eaabb1b1
BLAKE2b-256 checksum
How to use checksums
aa271fc038b51fcb663cee6f8c3828772f2648d9bbea0b80de7bb1fea51873e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
4bfeb9183a436466258e6ff4d457da39460d6019ef19f48be1ddf5b7b73c03b5
BLAKE2b-256 checksum
How to use checksums
4d91eced5cd0fbac08d0bea4da29d857fd04f23ad5e8e81c075be2b46eeb85e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
7dc01aedfe9223d31ad50c40e89a973c05cf79cd965df1f26a1998d5a0ff7154
BLAKE2b-256 checksum
How to use checksums
f4bccf1587a13aeca01fd0e99e23454cf3208bf6e93fd59db873063e7dce3e89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
16611f4a337ff821b69134e4b4db46da8a5907dd265376fe785a1c968c76d4f8
BLAKE2b-256 checksum
How to use checksums
db5b81504f703b6ca7fe7f30c80bf3e5670599c37d432c92970329394edcebed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
dd5bcbee8cba993db9736db00472e71e30887358104631a2d02900799b401db3
BLAKE2b-256 checksum
How to use checksums
a664a5e1a1f00d754bc422d61f16fb2077a4feb490163f9d4f6c4edd884ce34b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
bf9e9968b88b781c8e67e8111d574aa3412cece7b1a352d05b72286165fc30b1
BLAKE2b-256 checksum
How to use checksums
a719a0d8a18048fbe6a3d59bc06e20ff3ed5a3981db20673fa4975adcf9b6e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
be1174d10763624fa1e63ea136e201af039b5fef91eefd2fc94c33155a7545d3
BLAKE2b-256 checksum
How to use checksums
5ffe62554467bd29433fff2a8c9393599fcf2032972d6c716b600483ca977a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
23f922e0053b293ec4b6b4ab4300aa63993b83c3cd108411c6bfa5c83e3b8c55
BLAKE2b-256 checksum
How to use checksums
b9877b2a57acf3c734ca0e7677b0b9854328ecf6803574aec38a74f0a0884705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
1e8f2d41bfbf62ed78979de1956c883638db49476045df540aea1846aebb6b1c
BLAKE2b-256 checksum
How to use checksums
f46d223c9af09bdc403dc9fa318db3fefee0caf66391ea9ec0fe4d084324eb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
eb6124f81f82d282c662648fd7d06ec611689f9d2f0a8d776615ff2d6fdcf7e2
BLAKE2b-256 checksum
How to use checksums
4ac8bd04dba6f742e02989152cb7594b31c9a5183c73e37c6402fbc4bb96f914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
bb4c76dcc56e2672acf758b4cdcf61aa41b3e2274e6181fe4e41a39f35f17ac8
BLAKE2b-256 checksum
How to use checksums
65e51d761919fedd12cb1e0d8c6d82b5d339443bb3ef63ae223b87920a3bd9fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
a90ee9b2ce1feb709244b6b3663eb1eac011b0f7d3db1ff49643ab248d01cb75
BLAKE2b-256 checksum
How to use checksums
764292818359ed2436d495ebd609c3b7507685b45c0d1f43aa5be4a19651ab53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

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

Download URL rhydb-0.16.1-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
6ad95226cfeeacea0b485ea8e35c00dd73940b2a93778fe20b9ebdecacd1dc5f
BLAKE2b-256 checksum
How to use checksums
f9ebd08565bac94d6c6ed1058d7c5cc2943d7babbc4d606e2e35898cd9767fd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for rhydb 0.16.1

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