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 files. rds2py supports various base classes from R, and Bioconductor's SummarizedExperiment and SingleCellExperiment S4 classes. For more details, check out rds2cpp library.


Version 0.5.0 brings major changes to the package,

  • Complete overhaul of the codebase using pybind11
  • Streamlined readers for R data types
  • Updated API for all classes and methods

Please refer to the documentation for the latest usage guidelines. Previous versions may have incompatible APIs.

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

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

from rds2py import read_rds
r_obj = read_rds("path/to/file.rds")

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.

To just get the parsed dictionary representation of the RDS file,

from rds2py import parse_rds

robject_dict = parse_rds("path/to/file.rds")
print(robject_dict)

Write-your-own-reader

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

from rds2py import parse_rds

robject = parse_rds("path/to/file.rds")
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.8.1.tar.gz (466.6 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.8.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.8.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rds2py-0.8.1-cp313-cp313-macosx_11_0_arm64.whl (126.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rds2py-0.8.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.8.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rds2py-0.8.1-cp312-cp312-macosx_11_0_arm64.whl (126.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rds2py-0.8.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.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rds2py-0.8.1-cp311-cp311-macosx_11_0_arm64.whl (125.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rds2py-0.8.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.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (187.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rds2py-0.8.1-cp310-cp310-macosx_11_0_arm64.whl (124.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

rds2py-0.8.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.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (187.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

rds2py-0.8.1-cp39-cp39-macosx_11_0_arm64.whl (124.4 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for rds2py-0.8.1.tar.gz
Algorithm Hash digest
SHA256 99ee29d504d907ad7ee757414a3eb00af44fbe1766bfb5fa0db6e3f8453e0a6b
MD5 5e2c7a8eac13329dbd77cfecdcdc7639
BLAKE2b-256 1a998d44fc7d96893fd026d24acfaaa1d695aab879bacd355d592a776f51e397

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 17e04b0d5e70d1bcb5d1b5cb2c74615aca11f4256369f899d10fb889e927d001
MD5 74be695b8b2bf5b465b40efb997aea3f
BLAKE2b-256 4ca1599844e6784648b026864f27a8e4ff55f6fd4221365b162c0057f1a8effd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f5db023a1d99b0ec741c9cd8f588f2f0458de43de4a2c32c7d9e7f6305810e3
MD5 bd98d7ac11f02472f121fe7193238ac0
BLAKE2b-256 97ffcee22218246e736590bc9d63537a4b29fed3a679a360d0f3885e5b51a479

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2125be2673a443209e84f44bed6eb038a7676f033da87ece24d4fda4ff443848
MD5 69f6d954e700ba3993c95a9e76ea4f50
BLAKE2b-256 06f2bab6fd9ff4fd31b2b4368eb0bf7a9972924a49eb1e1e84196554888e0c11

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 999c5c87f48894e7fd2f3016556776235b1c404924c71fa7d12e24502e3e499f
MD5 0dead268f491ec9a7a5fd4c8bf06fd28
BLAKE2b-256 5ddea044b5ea1e264555ed5fb4901b815ba34782d796b105ff3073553fe6c54d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e30e2947d596b9cb8e6f67eab2951667b50d958868ccaae37aab7a1700998ca
MD5 6087cc9d7626d6f74f2fd8f1eddf71a8
BLAKE2b-256 5371be7a8af8cae8bec9507c3c268a298bc16bb599e3c83e2e72b9559c8379da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e3bc07f7b124a52546f397c9cec2ab9f3a4f512bb7d07eedac0a6bfd7e422ff
MD5 8ce889fdd348ece002fc66737f5d38be
BLAKE2b-256 1b993ffe82442f8f58f9baa2b1efd739b4eaa4dadeaf603a27a9940013b772f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a3f5f1cf387774d0b5056ddaf292aae4c2332e239a534dbc00d1e79f6f0bc2ab
MD5 884076da68249a66b813426ee86fbd7e
BLAKE2b-256 e184a80a7404fe3cebfaae04c14e134cd9d94aebcfe0f10a5e2ec7c507054247

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce9331455a39a7450df257658f1fbf0328dbaab3385f55c2bd5450cfeb0ddd57
MD5 7301c7f81a565a1cbfd44273bff0026f
BLAKE2b-256 e45259381bafa317e13a5db44d2cd0d99beaa2d4ebb09402b788dac7e6def40b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3311f0967453ce656bc492494d5fdb0452941d6f9646403334d99c7939140eb
MD5 c19c1000e49f45a69608f885173861be
BLAKE2b-256 df44847422a9e3518d353ab95c3ebe17a5e95a904ff0352a58120fe9fff757ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ee7ea465c1b208dca7e16b5df2af0fde506322f7b90509a4b77f7d9602ad3629
MD5 3ee8180de4063fa33ddcaf31680727ba
BLAKE2b-256 230000c23054aad15b54386e254b60d716b5383f5bb84c08ac15d5d4f8a4dc3e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2630f88cc653edd7862824b7af7d3b53e369e21c7f45f83c5929ed065fb87e89
MD5 895d405eab0e5289e9f4e01e8d8c232b
BLAKE2b-256 36c1b5cec4878573e11c79693737c49d7123bc17ccf254a70c1cd9290c7d5535

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e82362e304aac1f907390667f6e50d9310ac288c2559c1857152d40a7bf61a1c
MD5 1d7c4433beaeaa029de46b85463047e3
BLAKE2b-256 71731751f06c29f9cd9bd40a5159010f597f0f3186fa7ec6f58f0109c39e99a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 63f485861c9f922844d4043db3330250ad06086f6d67ffb1368d10603d1cf6d9
MD5 35d991791d95e594f87749d6fa5d7ed6
BLAKE2b-256 c97f0b8748dfc2dedea67d16828013508e77eb796a6634cd2cef04b544651922

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b39c4fef6a3dcd21b37ed5dd1c693752a997dffb884f7b6b039b05f0b4d7b49
MD5 566b7ba0b7f554ad304f2d14dd082c77
BLAKE2b-256 e82da9c6ae2a0995a1650191a100c5ab155c852a21348e81e555f51429542320

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rds2py-0.8.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 acffe2a36327e81c51386ef60ea34c2034a1cc639970936dc4b7b46e81eeef49
MD5 23920e06873ed12ff4858b66b8949a61
BLAKE2b-256 e9e2cbf05e631ef5a3098a458d949bb380498bab4c1866fb4415c639789fffa5

See more details on using hashes here.

Provenance

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