GRnnData
GRnnData works similarly to anndata. The goal was to use the .varm/.varp of anndata to store the GRN data associated with a dataset and have a formal way to work with GRNs.
GRnnData is a subclass of anndata.AnnData, it enforces only that a .varp exists for the anndata
GRnnData also contains multiple helper functions to work with GRNs in scRNAseq like compute_connectivities, get_centrality, compute_cluster, enrichment, metrics, etc. but also accessing the grn with .grn, .targets, .regulators,...
The package has been designed together with the scPRINT paper and model, and the GRN benchmarking tool BenGRN
Install it from PyPI
pip install grnndata
Install it locally and run the notebooks:
git clone https://github.com/cantinilab/GRnnData.git
pip install -e GRnnData
Usage
from grnndata import GRNAnnData, read_h5ad
from grnndata import utils
grn = np.random.rand(10,10)
adata = anndata.AnnData(X=np.random.rand(10,10))
grn = GRNAnnData(adata, grn=grn)
print(grn) #shows the number of elements
grn.varp['GRN'] or grn.grn #shows the GRN
subgrn = grn.get(['gene1', 'gene2']) #only gets some elements from the GRN
subgrn.targets #shows the target connections
subgrn.plot() # displays the network
subgrn.write_h5ad('grn.h5ad') #writes it
read_h5ad('grn.h5ad') #reads it
# or use some utils functions like:
# compute_connectivities
# get_centrality
# compute_cluster
# enrichment
# metrics
# see more in the documentation
utils.some_function(grn)
GRnnData works similarly to anndata. Learn more about usages in the documentation and its notebooks in the docs.
usage examples can be seen in the example notebooks of:
How do I do if I generate a GRN per cell type?
In this context, we recommend creating a grnndata per cell type. This will allow you to store the GRN data in the .varm of the grnndata and have a formal way to work with GRNs.
How do I do if I generate a GRN per cell?
In this context, we recommend trying to merge them across a similar group of cells in some way and storing uncertainty or variance in the GRN and then creating a grnndata across this group of cells
Development
Read the CONTRIBUTING.md file.
Awesome gene regulatory network enhanced anndata created by @jkobject and @r-trimbour
Metadata
Release files for grnndata 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grnndata-1.3.2.tar.gz | 13.1 MB | Without provenance | Details for grnndata-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grnndata-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for grnndata-1.3.2-py3-none-any.whl |
Total release size: 13.2 MB
Release files / grnndata-1.3.2.tar.gz
| Download URL | grnndata-1.3.2.tar.gz |
|---|---|
| Size | 13.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd0d2e9ffa34fb953d7bfdc1a55ea340d5a1b8e4d768fbed9c46760d0de3ade
|
|
BLAKE2b-256 checksum How to use checksums |
5c297507d1e4ccc9e7d36feb15db6786196e8798e495d908f168aed6b8967833
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / grnndata-1.3.2-py3-none-any.whl
| Download URL | grnndata-1.3.2-py3-none-any.whl |
|---|---|
| Size | 38.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9445e8f254e97883edace58a9de8eeec5853a708a492eab2dcc58e26681d5876
|
|
BLAKE2b-256 checksum How to use checksums |
7a63dedaea0161327a4b16c3d127d983df417239d7de21b0c4fc50fb4d6491c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for grnndata 1.3.2
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.