Skip to main content

Parse and construct Python representations for datasets stored in RDS files

Project description

Project generated with PyScaffold PyPI-Server Unit tests

rds2py

Parse and construct Python representations for datasets stored in RDS or RData files. rds2py supports various base classes from R, and Bioconductor's SummarizedExperiment and SingleCellExperiment S4 classes. For more details, check out rds2cpp library.

Installation

Package is published to PyPI

pip install rds2py

# or install optional dependencies
pip install rds2py[optional]

By default, the package does not install packages to convert python representations to BiocPy classes. Please consider installing all optional dependencies.

Usage

[!NOTE]

If you do not have an RDS object handy, feel free to download one from single-cell-test-files.

from rds2py import read_rds, read_rda
r_obj = read_rds("path/to/file.rds") # or read_rda("path/to/file.rda")

The returned r_obj either returns an appropriate Python class if a parser is already implemented or returns the dictionary containing the data from the RDS file.

Write-your-own-reader

Reading RDS or RData files as dictionary representations allows users to write their own custom readers into appropriate Python representations.

from rds2py import parse_rds, parse_rda

robject = parse_rds("path/to/file.rds") # or use parse_rda for rdata files
print(robject)

If you know this RDS file contains an GenomicRanges object, you can use the built-in reader or write your own reader to convert this dictionary.

from rds2py.read_granges import read_genomic_ranges

gr = read_genomic_ranges(robject)
print(gr)

Type Conversion Reference

R Type Python/NumPy Type
numeric numpy.ndarray (float64)
integer numpy.ndarray (int32)
character list of str
logical numpy.ndarray (bool)
factor list
data.frame BiocFrame
matrix numpy.ndarray or scipy.sparse matrix
dgCMatrix scipy.sparse.csc_matrix
dgRMatrix scipy.sparse.csr_matrix

and integration with BiocPy ecosystem for Bioconductor classes

  • SummarizedExperiment
  • RangedSummarizedExperiment
  • SingleCellExperiment
  • GenomicRanges
  • MultiAssayExperiment

Developer Notes

This project uses pybind11 to provide bindings to the rds2cpp library. Please make sure necessary C++ compiler is installed on your system.

Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.

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

rds2py-0.9.0.tar.gz (471.2 kB view details)

Uploaded Source

Built Distributions

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

rds2py-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

rds2py-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (202.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rds2py-0.9.0-cp313-cp313-macosx_11_0_arm64.whl (138.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rds2py-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

rds2py-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (202.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rds2py-0.9.0-cp312-cp312-macosx_11_0_arm64.whl (138.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rds2py-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

rds2py-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (200.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rds2py-0.9.0-cp311-cp311-macosx_11_0_arm64.whl (137.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rds2py-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

rds2py-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (198.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rds2py-0.9.0-cp310-cp310-macosx_11_0_arm64.whl (135.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

rds2py-0.9.0-cp39-cp39-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

rds2py-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

rds2py-0.9.0-cp39-cp39-macosx_11_0_arm64.whl (136.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file rds2py-0.9.0.tar.gz.

File metadata

  • Download URL: rds2py-0.9.0.tar.gz
  • Upload date:
  • Size: 471.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rds2py-0.9.0.tar.gz
Algorithm Hash digest
SHA256 a08b8a1d1ddc3342401ce0b2fd23bafea3eafa088ac38a3633e0fe97a86739f0
MD5 80450898cb753a09ebafa1e3be644107
BLAKE2b-256 d30969a2a4a182deff83f3b60be728e1778f92e7df9e3502853ba6854c602764

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0.tar.gz:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e1a391ec8463792aad0e8373612a0a4d98716cc3a6df4b2a5428b93206f4c86
MD5 0fe6d4279bae686c8c47b4ae681e9976
BLAKE2b-256 bb4f608bb1387130ca1779d49b7f1f8b218335f85b4951411c6149e267d9cf88

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f0f1fe6ecf105e80fe4993d0706c4aa0ab9b2d64bb060dbc0cb9584158b133d
MD5 a227cd5de5aa0f253f7bb85b4ae229f8
BLAKE2b-256 e5a45ab1b550f0dac3dc99a2e0f95ea6561aa60d117189bd154df50751961435

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fecb05b71afb668266c3b7deb9dabc44c485fb70158c8253aabcf3c4ab84819b
MD5 07f54bd3c6d4843eae3a6eddc9b7450b
BLAKE2b-256 86fe090079f03dcce330815bd39db99dc4b7320316e747beaff2caa2d98b2a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a60aaf4ca45770ba16af77b8fb6858eeb7873a2fa7d596ca57e81d91cd2fffbf
MD5 8355561b009d4eea0d12899eb439fe40
BLAKE2b-256 b2478e6fed3d0808473841eb22b0b750b6924ce3e17f81e0d7d87346732debcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2b8db092f437570014f86a6235357e482f66d0c44086c6584b1c22c931dcb42
MD5 f671b526c92f4e44f53266c9ca23f77a
BLAKE2b-256 b10c67af2e9713e543778dde27949c7c891ac765f4f568dd689d98a481417288

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc409b64915f6e287ae08bc01d78ab52218d77481ec552afeaa24f01b4107c1d
MD5 a273aac6fd2d9920b957a77f931fb91d
BLAKE2b-256 504fadf3ebee9eb56d212962f4b8498793922f6019e23ed52628c215880498f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8bfb4ac6b76fd1b149fb8ca5e444b383512e5f4dc53f549557f1ba20f3306e6a
MD5 123e92fdd00b088d91d7468fbb76c3e7
BLAKE2b-256 6e6191362c05140c52be1a8b1d40300ea1d46539b92a688baecd7c7f6e284a50

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b701e801de8b65286ecb105e1c6d069117a35c8d89c7eb7a6ee76fb8f082130d
MD5 e655824c605aaa47933ada475d66d394
BLAKE2b-256 ca682461155fc2796c54e876814ac4a2ac0ac52f245876f07c228409ed2fc43d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfb17fd950d0cc7b14f22fb0337763df727a4f9390af9038e550f29558072692
MD5 6e8b4b63717166320c18c6c608c88142
BLAKE2b-256 ee9fcd8f4205f4a957ad9d19ec0a5ea8a9e1eabc247e776f2385f54d9dee6a41

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9e1123b0c5dd420b18eec230227542a4dca705811cace0576a5c21c23de30608
MD5 a634aa0c1ea6fc411936049952fe3e6f
BLAKE2b-256 02249b627f39185dcf05df8a46aeabc1d3ac608710e152ca22d74a496d2d31cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a4f10ebf541de23a885afb75d22af4e46c8b9adfb473087922bcdb747ec4fb10
MD5 e368c60ffc0a33570867c30b264e9aab
BLAKE2b-256 ae590b6bf9b1aad21216e5236a1200c09e677702f044aabb07461eaa96b51dea

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76f9a86fb3c1aed0185197b6aaed8317b133338aef0d3b0c201b7c9c9151fb2d
MD5 45915d6c5a959dd9e70dd6702da3a2bc
BLAKE2b-256 70c8044afd4b2b90026adb404deefd400c5d21d40b56ca5f59c20ea917527ebe

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 27de2f6a2b4c13bc44a44834e2f6794f5acc548fa4bd7dd7ee7012d57e5794ae
MD5 be7263a775103ae4fd25c4f955538726
BLAKE2b-256 6d512ab18a2e1709f9a20ad255937af9b61d2985ed7ce04f352e09151bf37ec1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp39-cp39-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cdc731bebd55267a8936b6ef4cc44d422b5df3d010874d8c0041a87b1684fd69
MD5 a8526c3bfd5f7f914efcb563e25efd74
BLAKE2b-256 ba8ee66d04c49203ea9c439753d08aae84e60c48eb3508c8f2aa237297dd3364

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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

File details

Details for the file rds2py-0.9.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd81d7edec83db65e7296081e9e43baec20e7e6e30749eba00720a82ed1450c8
MD5 d57686b4d8e48e5cd35be2961215726b
BLAKE2b-256 e931eeb81bd8ab3bfa7d07f24f996ba3fd246dede17e5e72215efe50d1c0fa9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on BiocPy/rds2py

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