A Python API for managing genotype-phenotype map data
Project description
# GPMap
[![Join the chat at https://gitter.im/harmslab/gpmap](https://badges.gitter.im/harmslab/gpmap.svg)](https://gitter.im/harmslab/gpmap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Documentation Status](https://readthedocs.org/projects/gpmap/badge/?version=latest)](http://gpmap.readthedocs.io/en/latest/?badge=latest)
*A Python API for managing genotype-phenotype map data*
GPMap defines a flexible object for managing genotype-phenotype (GP) map data. At it's core,
it stores all data in Pandas DataFrames and thus, interacts seamlessly with the
PyData egosystem.
To visualize genotype-phenotype objects created by GPMap, checkout [GPGraph](https://github.com/Zsailer/gpgraph).
<img src="docs/_img/gpm.png"> <img src="docs/_img/dataframe.png" width="400">
## Basic example
Import the package's base object.
```python
from gpmap import GenotypePhenotypeMap
```
Pass your data to the object.
```python
# Data
wildtype = "AAA"
genotypes = ["AAA", "AAT", "ATA", "TAA", "ATT", "TAT", "TTA", "TTT"]
phenotypes = [0.1, 0.2, 0.2, 0.6, 0.4, 0.6, 1.0, 1.1]
stdeviations = [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05]
# Initialize the object
gpm = GenotypePhenotypeMap(wildtype,
genotypes,
phenotypes,
stdeviations=stdeviations)
# Check out the data.
gpm.data
```
<img src="docs/_img/dataframe.png" width="350">
Or load a dataset from disk.
```python
gpm = GenotypePhenotypeMap.read_json("data.json")
```
## Installation
To install this package, clone from source and use pip.
```
git clone https://github.com/harmslab/gpmap
cd gpmap
pip install -e .
```
## Dependencies
The following modules are required. Also, the examples/tutorials are written in Jupyter notebooks and require IPython to be install.
* [Numpy](http://www.numpy.org/)
* [Pandas](https://pandas.pydata.org/)
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
gpmap-0.4.2.tar.gz
(16.9 kB
view details)
Built Distribution
gpmap-0.4.2-py2.py3-none-any.whl
(31.1 kB
view details)
File details
Details for the file gpmap-0.4.2.tar.gz
.
File metadata
- Download URL: gpmap-0.4.2.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9890163201f6749e5e20321d958ecda18f1b374ac24ed3d10d710d19741f2a0b |
|
MD5 | 0f669c3816a6bfe88fcd1d0f4173e2a1 |
|
BLAKE2b-256 | dbef67f697117fab72ca0e9a4a5a5a3eab311f03a97402ecf32b8f351c01e70c |
Provenance
File details
Details for the file gpmap-0.4.2-py2.py3-none-any.whl
.
File metadata
- Download URL: gpmap-0.4.2-py2.py3-none-any.whl
- Upload date:
- Size: 31.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf9954e5581f9e13a93638048b00260b8a5cfeb727923cc9b4a32fef63bd090 |
|
MD5 | bdcd4d865164797a2b753f7b6c287e39 |
|
BLAKE2b-256 | 8de7127f0a4b57f7665f3050b6697e12a24c77f57d2dfca083257a61a21a30aa |