# PLNmodels: Poisson lognormal models
> The Poisson lognormal model and variants can be used for analysis of mutivariate count data.
> This package implements
> efficient algorithms extracting meaningful data from difficult to interpret
> and complex multivariate count data. It has been built to scale on large datasets even
> though it has memory limitations. Possible fields of applications include
> - Genomics (number of times a gene is expressed in a cell)
> - Ecology (species abundances)
>
> One main functionality is to normalize the count data to obtain more valuable
> data. It also analyse the significance of each variable and their correlation as well as the weight of
> covariates (if available).
<!-- accompanied with a set of -->
<!-- > functions for visualization and diagnostic. See [this deck of -->
<!-- > slides](https://pln-team.github.io/slideshow/) for a -->
<!-- > comprehensive introduction. -->
## Getting started
The getting started can be found [here](Getting_started.ipynb). If you need just a quick view of the package, see the quickstart next.
## 🛠 Installation
**pyPLNmodels** is available on
[pypi](https://pypi.org/project/pyPLNmodels/). The development
version is available on [GitHub](https://github.com/PLN-team/pyPLNmodels).
### Package installation
```
pip install pyPLNmodels
```
## ⚡️ Quickstart
The package comes with an ecological data set to present the functionality
```
import pyPLNmodels
from pyPLNmodels.models import PlnPCAcollection, Pln, ZIPln
from pyPLNmodels.oaks import load_oaks
oaks = load_oaks()
```
### Unpenalized Poisson lognormal model (aka PLN)
```
pln = Pln.from_formula("counts ~ 1 + tree + dist2ground + orientation ", data = oaks, take_log_offsets = True)
pln.fit()
print(pln)
transformed_data = pln.transform()
```
### Rank Constrained Poisson lognormal for Poisson Principal Component Analysis (aka PLNPCA)
```
pca = PlnPCAcollection.from_formula("counts ~ 1 + tree + dist2ground + orientation ", data = oaks, take_log_offsets = True, ranks = [3,4,5])
pca.fit()
print(pca)
transformed_data = pca.best_model().transform()
```
### Zero inflated Poisson Log normal Model (aka ZIPln)
```
zi = ZIPln.from_formula("counts ~ 1 + tree + dist2ground + orientation ", data = oaks, take_log_offsets = True)
zi.fit()
print(zi)
transformed_data = zi.transform()
```
## 👐 Contributing
Feel free to contribute, but read the [CONTRIBUTING.md](https://forgemia.inra.fr/bbatardiere/pyplnmodels/-/blob/main/CONTRIBUTING.md) first. A public roadmap will be available soon.
## ⚡️ Citations
Please cite our work using the following references:
- J. Chiquet, M. Mariadassou and S. Robin: Variational inference for
probabilistic Poisson PCA, the Annals of Applied Statistics, 12:
2674–2698, 2018. [link](http://dx.doi.org/10.1214/18%2DAOAS1177)
Raw data
{
"_id": null,
"home_page": "",
"name": "pyPLNmodels",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Bastien Batardi\u00e8re <bastien.batardiere@gmail.com>, Julien Chiquet <julien.chiquet@inrae.fr>",
"keywords": "python,count,data,count data,high dimension,scRNAseq,PLN",
"author": "",
"author_email": "Bastien Batardiere <bastien.batardiere@gmail.com>, Julien Chiquet <julien.chiquet@inrae.fr>, Joon Kwon <joon.kwon@inrae.fr>",
"download_url": "https://files.pythonhosted.org/packages/e2/ec/820691de7c2eef2531d81661f609e3ab0a0a41b240fa12b6648eccbb7f78/pyPLNmodels-0.0.72.tar.gz",
"platform": null,
"description": "\n# PLNmodels: Poisson lognormal models\n\n> The Poisson lognormal model and variants can be used for analysis of mutivariate count data.\n> This package implements\n> efficient algorithms extracting meaningful data from difficult to interpret\n> and complex multivariate count data. It has been built to scale on large datasets even\n> though it has memory limitations. Possible fields of applications include\n> - Genomics (number of times a gene is expressed in a cell)\n> - Ecology (species abundances)\n>\n> One main functionality is to normalize the count data to obtain more valuable\n> data. It also analyse the significance of each variable and their correlation as well as the weight of\n> covariates (if available).\n<!-- accompanied with a set of -->\n<!-- > functions for visualization and diagnostic. See [this deck of -->\n<!-- > slides](https://pln-team.github.io/slideshow/) for a -->\n<!-- > comprehensive introduction. -->\n\n## Getting started\nThe getting started can be found [here](Getting_started.ipynb). If you need just a quick view of the package, see the quickstart next.\n\n## \ud83d\udee0 Installation\n\n**pyPLNmodels** is available on\n[pypi](https://pypi.org/project/pyPLNmodels/). The development\nversion is available on [GitHub](https://github.com/PLN-team/pyPLNmodels).\n\n### Package installation\n\n```\npip install pyPLNmodels\n```\n\n## \u26a1\ufe0f Quickstart\n\nThe package comes with an ecological data set to present the functionality\n```\nimport pyPLNmodels\nfrom pyPLNmodels.models import PlnPCAcollection, Pln, ZIPln\nfrom pyPLNmodels.oaks import load_oaks\noaks = load_oaks()\n```\n\n### Unpenalized Poisson lognormal model (aka PLN)\n\n```\npln = Pln.from_formula(\"counts ~ 1 + tree + dist2ground + orientation \", data = oaks, take_log_offsets = True)\npln.fit()\nprint(pln)\ntransformed_data = pln.transform()\n```\n\n\n### Rank Constrained Poisson lognormal for Poisson Principal Component Analysis (aka PLNPCA)\n\n```\npca = PlnPCAcollection.from_formula(\"counts ~ 1 + tree + dist2ground + orientation \", data = oaks, take_log_offsets = True, ranks = [3,4,5])\npca.fit()\nprint(pca)\ntransformed_data = pca.best_model().transform()\n```\n### Zero inflated Poisson Log normal Model (aka ZIPln)\n```\nzi = ZIPln.from_formula(\"counts ~ 1 + tree + dist2ground + orientation \", data = oaks, take_log_offsets = True)\nzi.fit()\nprint(zi)\ntransformed_data = zi.transform()\n```\n\n\n## \ud83d\udc50 Contributing\n\nFeel free to contribute, but read the [CONTRIBUTING.md](https://forgemia.inra.fr/bbatardiere/pyplnmodels/-/blob/main/CONTRIBUTING.md) first. A public roadmap will be available soon.\n\n\n## \u26a1\ufe0f Citations\n\nPlease cite our work using the following references:\n- J. Chiquet, M. Mariadassou and S. Robin: Variational inference for\n probabilistic Poisson PCA, the Annals of Applied Statistics, 12:\n 2674\u20132698, 2018. [link](http://dx.doi.org/10.1214/18%2DAOAS1177)\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Package implementing PLN models",
"version": "0.0.72",
"project_urls": {
"Documentation": "https://bbatardiere.pages.mia.inra.fr/pyplnmodels",
"Repository": "https://github.com/PLN-team/pyPLNmodels"
},
"split_keywords": [
"python",
"count",
"data",
"count data",
"high dimension",
"scrnaseq",
"pln"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7afc43c0544a85b510caa5e857ffad6430ae3653be48bdac062f99e1d900ecee",
"md5": "7df5782c823726badbf4988652c91970",
"sha256": "5d3cfb91e27b3ee1dcb379a3c49501a975bebb801a3bfae7d1e0fe2f300e7595"
},
"downloads": -1,
"filename": "pyPLNmodels-0.0.72-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7df5782c823726badbf4988652c91970",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3641,
"upload_time": "2024-01-25T12:55:50",
"upload_time_iso_8601": "2024-01-25T12:55:50.479813Z",
"url": "https://files.pythonhosted.org/packages/7a/fc/43c0544a85b510caa5e857ffad6430ae3653be48bdac062f99e1d900ecee/pyPLNmodels-0.0.72-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e2ec820691de7c2eef2531d81661f609e3ab0a0a41b240fa12b6648eccbb7f78",
"md5": "fa1fd57aa9ee9cb0024b1fa875ce5716",
"sha256": "d61c24e06e7bfa91c3007d7bd110f6a24817283f13dd6c202033a1bcf7b4f7f7"
},
"downloads": -1,
"filename": "pyPLNmodels-0.0.72.tar.gz",
"has_sig": false,
"md5_digest": "fa1fd57aa9ee9cb0024b1fa875ce5716",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 1707762,
"upload_time": "2024-01-25T12:55:53",
"upload_time_iso_8601": "2024-01-25T12:55:53.817598Z",
"url": "https://files.pythonhosted.org/packages/e2/ec/820691de7c2eef2531d81661f609e3ab0a0a41b240fa12b6648eccbb7f78/pyPLNmodels-0.0.72.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-25 12:55:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PLN-team",
"github_project": "pyPLNmodels",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyplnmodels"
}