No project description provided
Project description
AnnData ↭ SingleCellExperiment
RPy2 converter from AnnData to SingleCellExperiment and back. (For details about conversion see the docs)
You can for example use it to process your data using both Scanpy and Seurat, as described in this example notebook
Installation
pip install anndata2ri
# or
conda install -c bioconda anndata2ri
Troubleshooting
If you have problems installing or importing anndata2ri, please make sure you first:
Check the stack trace: If the error happens while installing or importing a dependency such as rpy2, report your problem in that project’s bug tracker.
Search the issues. At the time of writing 17 of the 29 bugs (60%) are invalid or rpy2 bugs / install problems.
Make sure you have a compatible R version: rpy2 requires R ≥ 3.6.
Usage from Python
Use the converter as a context manager:
import anndata2ri
from rpy2.robjects import r
from rpy2.robjects.conversion import localconverter
with localconverter(anndata2ri.converter):
adata = r('as(some_data, "SingleCellExperiment")')
Usage from Jupyter
Override the R magic option:
import anndata2ri
%load_ext rpy2.ipython
anndata2ri.set_ipython_converter()
Now you can move objects from Python to R …
import scanpy.datasets as scd
adata_paul = scd.paul15()
%%R -i adata_paul
adata_paul # class: SingleCellExperiment ...
… and back:
%%R -o adata_allen
data(allen, package = 'scRNAseq')
adata_allen <- as(allen, 'SingleCellExperiment')
print(adata_allen) # AnnData object with ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anndata2ri-2.0.tar.gz.
File metadata
- Download URL: anndata2ri-2.0.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98c73a9597446e1dbc9b2d5017094413da0c684f3ede9e336631bc6b9fce290
|
|
| MD5 |
2b1c2b57de71d6ebbf148d5cb506647c
|
|
| BLAKE2b-256 |
12415f7f6eb959d54a6eabc4588823ee40fff2f6fcc8525e87441e61e7c62775
|
Provenance
The following attestation bundles were made for anndata2ri-2.0.tar.gz:
Publisher:
deploy.yml on theislab/anndata2ri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anndata2ri-2.0.tar.gz -
Subject digest:
a98c73a9597446e1dbc9b2d5017094413da0c684f3ede9e336631bc6b9fce290 - Sigstore transparency entry: 380924081
- Sigstore integration time:
-
Permalink:
theislab/anndata2ri@41d2f59c62f4745a7b01ed38deb388cc9b6f7d1c -
Branch / Tag:
refs/tags/v2.0 - Owner: https://github.com/theislab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@41d2f59c62f4745a7b01ed38deb388cc9b6f7d1c -
Trigger Event:
release
-
Statement type:
File details
Details for the file anndata2ri-2.0-py3-none-any.whl.
File metadata
- Download URL: anndata2ri-2.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66c24b0a2a5df42ca101e8f02a145d75d35b06b0c2ff6898780159626f76498a
|
|
| MD5 |
b5435399a32b138b28fe80c6ccca161e
|
|
| BLAKE2b-256 |
29652d75de27c4daa2f07e02ffae0dd58a6cb2df153f6a932946df62fcb1f08f
|
Provenance
The following attestation bundles were made for anndata2ri-2.0-py3-none-any.whl:
Publisher:
deploy.yml on theislab/anndata2ri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anndata2ri-2.0-py3-none-any.whl -
Subject digest:
66c24b0a2a5df42ca101e8f02a145d75d35b06b0c2ff6898780159626f76498a - Sigstore transparency entry: 380924095
- Sigstore integration time:
-
Permalink:
theislab/anndata2ri@41d2f59c62f4745a7b01ed38deb388cc9b6f7d1c -
Branch / Tag:
refs/tags/v2.0 - Owner: https://github.com/theislab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@41d2f59c62f4745a7b01ed38deb388cc9b6f7d1c -
Trigger Event:
release
-
Statement type: