Skip to content
/ gpmap Public
forked from harmslab/gpmap

A python API for analyzing and manipulating combinatorial genotype-phenotype maps

Notifications You must be signed in to change notification settings

harmsm/gpmap

 
 

Repository files navigation

GPMap

PyPI version Join the chat at https://gitter.im/harmslab/gpmap Documentation Status Build Status nbviewer Binder

A Python API for managing genotype-phenotype map data

gpmap defines a flexible object for managing combinatorial genotype-phenotype map data.

To visualize genotype-phenotype objects created by GPMap, checkout GPGraph.

Basic example

Import the package's base object.

from gpmap import GenotypePhenotypeMap

Pass your data to the object.

# 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]
uncertainties = [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05]

# Initialize the object
gpm = GenotypePhenotypeMap(wildtype,
                           genotypes,
                           phenotypes,
                           uncertainties=uncertainties)

# Check out the data.
gpm.data

Or load a dataset from disk.

gpm = GenotypePhenotypeMap.read_json("data.json")

Installation

Users This simplest way to install this package is using pip:

pip install gpmap

Developers The recommended way to install this package for development is using pipenv.

  1. Clone this repository:
git clone https://github.com/harmslab/gpmap
  1. Install the package using pipenv.
cd gpmap
pipenv install --dev -e .
  1. Run tests using pytest
pytest

Dependencies

The following modules are required. Also, the examples/tutorials are written in Jupyter notebooks and require IPython to be installed.

About

A python API for analyzing and manipulating combinatorial genotype-phenotype maps

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.4%
  • Cython 1.6%