grnndata


Namegrnndata JSON
Version 1.1.5 PyPI version JSON
download
home_pageNone
SummaryAwesome gene regulatory network enhanced anndata
upload_time2024-11-27 15:38:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords anndata gene regulatory networks scprint scrnaseq
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GRnnData

[![codecov](https://codecov.io/gh/cantinilab/GRnnData/branch/main/graph/badge.svg?token=GRnnData_token_here)](https://codecov.io/gh/cantinilab/GRnnData)
[![CI](https://github.com/cantinilab/GRnnData/actions/workflows/main.yml/badge.svg)](https://github.com/cantinilab/GRnnData/actions/workflows/main.yml)
[![PyPI version](https://badge.fury.io/py/GRnnData.svg)](https://badge.fury.io/py/benGRN)
[![Downloads](https://pepy.tech/badge/GRnnData)](https://pepy.tech/project/GRnnData)
[![Downloads](https://pepy.tech/badge/GRnnData/month)](https://pepy.tech/project/GRnnData)
[![Downloads](https://pepy.tech/badge/GRnnData/week)](https://pepy.tech/project/GRnnData)
[![GitHub issues](https://img.shields.io/github/issues/cantinilab/GRnnData)](https://img.shields.io/github/issues/cantinilab/GRnnData)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![DOI](https://img.shields.io/badge/DOI-10.1101%2F2024.07.29.605556-blue)](https://doi.org/10.1101/2024.07.29.605556)

<img src="./grnndata.png" width="300"/>

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](https://doi.org/10.1101/2024.07.29.605556) and [model](https://github.com/cantinilab/scPRINT), and the GRN benchmarking tool [BenGRN](https://github.com/jkobject/BenGRN)
## Install it from PyPI

```bash
pip install grnndata
```

### Install it locally and run the notebooks:

```bash
git clone https://github.com/cantinilab/GRnnData.git
pip install -e GRnnData
```

## Usage

```py
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](https://cantinilab.github.io/GRnnData/).

usage examples can be seen in the example notebooks of:
- [scPRINT](https://www.jkobject.com/scPRINT/notebooks/cancer_usecase/)
- [BenGRN](https://www.jkobject.com/benGRN/notebooks/bench_omni_genie3/)

### 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](CONTRIBUTING.md) file.

Awesome gene regulatory network enhanced anndata created by @jkobject and @r-trimbour

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "grnndata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "anndata, gene regulatory networks, scPRINT, scRNAseq",
    "author": null,
    "author_email": "jkobject <jkobject@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/85/51/62d32a56494fadb45807cd700cde85b1ac82135605fae8d41561db9727c0/grnndata-1.1.5.tar.gz",
    "platform": null,
    "description": "# GRnnData\n\n[![codecov](https://codecov.io/gh/cantinilab/GRnnData/branch/main/graph/badge.svg?token=GRnnData_token_here)](https://codecov.io/gh/cantinilab/GRnnData)\n[![CI](https://github.com/cantinilab/GRnnData/actions/workflows/main.yml/badge.svg)](https://github.com/cantinilab/GRnnData/actions/workflows/main.yml)\n[![PyPI version](https://badge.fury.io/py/GRnnData.svg)](https://badge.fury.io/py/benGRN)\n[![Downloads](https://pepy.tech/badge/GRnnData)](https://pepy.tech/project/GRnnData)\n[![Downloads](https://pepy.tech/badge/GRnnData/month)](https://pepy.tech/project/GRnnData)\n[![Downloads](https://pepy.tech/badge/GRnnData/week)](https://pepy.tech/project/GRnnData)\n[![GitHub issues](https://img.shields.io/github/issues/cantinilab/GRnnData)](https://img.shields.io/github/issues/cantinilab/GRnnData)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![DOI](https://img.shields.io/badge/DOI-10.1101%2F2024.07.29.605556-blue)](https://doi.org/10.1101/2024.07.29.605556)\n\n<img src=\"./grnndata.png\" width=\"300\"/>\n\nGRnnData 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.\n\nGRnnData is a subclass of anndata.AnnData, it enforces only that a .varp exists for the anndata\n\nGRnnData 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,...\n\nThe package has been designed together with the [scPRINT paper](https://doi.org/10.1101/2024.07.29.605556) and [model](https://github.com/cantinilab/scPRINT), and the GRN benchmarking tool [BenGRN](https://github.com/jkobject/BenGRN)\n## Install it from PyPI\n\n```bash\npip install grnndata\n```\n\n### Install it locally and run the notebooks:\n\n```bash\ngit clone https://github.com/cantinilab/GRnnData.git\npip install -e GRnnData\n```\n\n## Usage\n\n```py\nfrom grnndata import GRNAnnData, read_h5ad\nfrom grnndata import utils\n\ngrn = np.random.rand(10,10)\nadata = anndata.AnnData(X=np.random.rand(10,10))\n\ngrn = GRNAnnData(adata, grn=grn)\n\nprint(grn) #shows the number of elements\ngrn.varp['GRN'] or grn.grn #shows the GRN\nsubgrn = grn.get(['gene1', 'gene2']) #only gets some elements from the GRN\nsubgrn.targets #shows the target connections\nsubgrn.plot() # displays the network\n\nsubgrn.write_h5ad('grn.h5ad') #writes it\nread_h5ad('grn.h5ad') #reads it\n\n# or use some utils functions like:\n# compute_connectivities\n# get_centrality\n# compute_cluster\n# enrichment\n# metrics\n# see more in the documentation\n\nutils.some_function(grn)\n```\n\nGRnnData works similarly to anndata. Learn more about usages in the documentation and its notebooks in the [docs](https://cantinilab.github.io/GRnnData/).\n\nusage examples can be seen in the example notebooks of:\n- [scPRINT](https://www.jkobject.com/scPRINT/notebooks/cancer_usecase/)\n- [BenGRN](https://www.jkobject.com/benGRN/notebooks/bench_omni_genie3/)\n\n### How do I do if I generate a GRN per cell type?\n\nIn 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.\n\n### How do I do if I generate a GRN per cell?\n\nIn 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\n\n## Development\n\nRead the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\nAwesome gene regulatory network enhanced anndata created by @jkobject and @r-trimbour\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Awesome gene regulatory network enhanced anndata",
    "version": "1.1.5",
    "project_urls": {
        "repository": "https://github.com/cantinilab/GRnnData"
    },
    "split_keywords": [
        "anndata",
        " gene regulatory networks",
        " scprint",
        " scrnaseq"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "54230f535a399d66ea82ac96cd7df4c9cc82f0e1234fb7b8337e6cb837aa5f5c",
                "md5": "96223f597d8e1cb72d6bb519fdd21fc8",
                "sha256": "57750cc6e29f4f00e028fab91a2bfe7f7e4cb10424db371f6c083e63a07edb69"
            },
            "downloads": -1,
            "filename": "grnndata-1.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96223f597d8e1cb72d6bb519fdd21fc8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 47735,
            "upload_time": "2024-11-27T15:38:35",
            "upload_time_iso_8601": "2024-11-27T15:38:35.501924Z",
            "url": "https://files.pythonhosted.org/packages/54/23/0f535a399d66ea82ac96cd7df4c9cc82f0e1234fb7b8337e6cb837aa5f5c/grnndata-1.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "855162d32a56494fadb45807cd700cde85b1ac82135605fae8d41561db9727c0",
                "md5": "250781f3ed280d46bdcbcb35aab6d794",
                "sha256": "8f73d00488820389196a9550397b4af26cb17759008629d48302b3645a219dec"
            },
            "downloads": -1,
            "filename": "grnndata-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "250781f3ed280d46bdcbcb35aab6d794",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 13124181,
            "upload_time": "2024-11-27T15:38:37",
            "upload_time_iso_8601": "2024-11-27T15:38:37.202613Z",
            "url": "https://files.pythonhosted.org/packages/85/51/62d32a56494fadb45807cd700cde85b1ac82135605fae8d41561db9727c0/grnndata-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-27 15:38:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cantinilab",
    "github_project": "GRnnData",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "grnndata"
}
        
Elapsed time: 0.43484s