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.1.tar.gz (471.4 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.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rds2py-0.9.1-cp313-cp313-macosx_11_0_arm64.whl (139.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rds2py-0.9.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rds2py-0.9.1-cp312-cp312-macosx_11_0_arm64.whl (139.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rds2py-0.9.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (191.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rds2py-0.9.1-cp311-cp311-macosx_11_0_arm64.whl (137.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rds2py-0.9.1-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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (190.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rds2py-0.9.1-cp310-cp310-macosx_11_0_arm64.whl (136.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

rds2py-0.9.1-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.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (190.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

rds2py-0.9.1-cp39-cp39-macosx_11_0_arm64.whl (136.5 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for rds2py-0.9.1.tar.gz
Algorithm Hash digest
SHA256 de881474b71939b800db48aefcb0106ce13743994e7433e6d76e1c10e9b272e0
MD5 2c0b98061971c434e4db4c0d195054d7
BLAKE2b-256 1a5e82eedb588eb4aec07beb36a216dc52607773020863a1b42ed5b2c3f490c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1.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.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d21be3e4f90fc4a3c90d001d61f935769391ee0f8b7ce860fd7626e592bd27d6
MD5 fa873faf5eb8f721cb54ed38d0d1d4c9
BLAKE2b-256 266aa582211b17f2cc1de6220ce5bcd429eb084bcea1ff39f7fe44721aa4c8ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae79557b810b88a1bc19e8313ddc38c10e80c946adbf83e894d83addd3b94eb8
MD5 eccab07d6dd9e13904ba178ae0ce9764
BLAKE2b-256 2634e0a3cd3034fa71d5bbefe3749b3756a81875449418c70360f102c49ff6fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3738d81d603023ef8a47cb3b216f4013d01e9c60728294654416852653c2e9c
MD5 8d15a7ad17834e928fab3753d2786960
BLAKE2b-256 a906f488cca700269faf7754edff4c110cd5f358cbbe32744fd5b796236d5f26

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 92ff791fb7bb87938b6677f23a54c5117f0419ad665e95a6d3c19de42b5f2540
MD5 dea3f98c0b270c09a56e2e7d89408072
BLAKE2b-256 1be9415a1deccf6caf30b3a612b50bb69f6758f10bf30151c76de5ef12871c56

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03e7c4a62ba4d3a83b087f6fc7e673992d348caef39ce15f9a570a667bfb92ec
MD5 8f6156bc0bfdf0d96797fc85c767c84f
BLAKE2b-256 3e4b9082f9abe87871f2b94450641fde94f43e3117d5c4f6c42ba305a6ae1a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a50a619c6ef2f15a69dd8c6368e2471e567fc163e4924699a43e60e8df2e8eac
MD5 1853ab1ae507c3783e5649663b3e7506
BLAKE2b-256 87bcf08e19fcf6ab32aadc277fe10161f5e05a0ba862d9e30a5fe226c9c66531

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2d187bcb38c1df6faae9c347a217983bd0eedba9d0025ccf62101d514ae30679
MD5 5dc20d830b3f9bba84eaecabab92556c
BLAKE2b-256 547b5b0fcdb9e5c85dabf98ba27da22bee1aede47a0d501a16eba976d713c695

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58f84ad14b431f727b34e300d33f6e6ee0307851138308848514d7294a301370
MD5 2d99430b381b141e2dac5dc3286cb13b
BLAKE2b-256 0afdd21fde758804552fb5194d92a87237b87f425bd0e6dcc386136adde7f96b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3449be99530597f999ca7d7621c2f311052c192a1596c470a7eeac834a356a7
MD5 c03cae6c734690a7cee1d73e36af0598
BLAKE2b-256 0ed82c16ae84a85757ea20cb10bc87b75cd567359f08fd76e4f82a9eca63bf44

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 58e7178508663fe16e797eb97ca77027d73b4544b27c8c44562f87b75f1b2028
MD5 ec872b027ddc20e9b2ba5cd718c995b3
BLAKE2b-256 c4890b7af982561c937629341b042b8e444cdd0e9f5934486a48ac0419345b12

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ab9fab7d1ef64c0e4d2529c7b8be9e367a76397be069fab761bf5a362994bd9
MD5 cd59c80b49a99bb16bc70334ddc4b5fe
BLAKE2b-256 6ea3a341142d6c41c3e6bf1ef6529d8d7bef52b15499d79173c99ee7ba2a7e3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70648c7586eef44d7f6ae99a0ffde98edaff70557179f8d916db8743d7d7d005
MD5 20bec33baa67c49448243b95015969c8
BLAKE2b-256 7f4be37554707a21c7ac8ea1bc9fa5d02a4cc52a6d07bfe7cf01559839f253d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ac2056f8404fd3beb418921902c8bc8625cb520ac09f99f639939563e8f120af
MD5 2c8431d2deb1d6736dd04559cad8a54b
BLAKE2b-256 706782c603a12453d9798eff665846c212762437b9f4a1482f694c7c586fbb03

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ac4b3941e86113c6df31ebe18eedc9c04998df07ce3cb201d130f08587c9d3f
MD5 601a22c4acf78e90b63b1525aa3af232
BLAKE2b-256 988b928688a4b1e73aa424bdea856eedef17d5988793e402d76afc0254ecb220

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rds2py-0.9.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5a1486d8827ace6ef17c08648bdb9236377bc75ebac77a9f4401ab8be80e3a29
MD5 f40ba20ec15d70120a1e6fcbced02086
BLAKE2b-256 74a4f4853ba8110b6acbdffd195bc5333ee29e8ee26cad07596f402b8c6626ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for rds2py-0.9.1-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