Skip to main content

NetworkX for genotype-phenotype maps.

Project description


# GPGraph

**Genotype-phenotype maps in NetworkX**

Port a `GenotypePhenotypeMap` to a [NetworkX Digraph](https://networkx.github.io/).

## Basic Example

GPGraph follows NetworkX syntax. Initialize a graph, add the
genotype-phenotype map object, and draw the graph. This library even
comes with a draw method, `draw_flattened`, suited for genotype-phenotype maps.

```python
from gpmap.simulate import MountFujiSimulation
from gpgraph import GenotypePhenotypeGraph, draw_flattened

# Simulate a genotype-phenotype map
sim = MountFujiSimulation.from_length(4, roughness_width=1)

# Turn the genotype-phenotype map into a networkx object
G = GenotypePhenotypeGraph(gpm)

# Draw the graph
draw_flattened(G, with_labels=False, node_size=100)
```
<img src="docs/_img/readme-fig.png" width="350">


## Install

Clone this repo and install with `pip`:

```
pip install -e .
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpgraph-0.1.4.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

gpgraph-0.1.4-py2.py3-none-any.whl (8.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file gpgraph-0.1.4.tar.gz.

File metadata

  • Download URL: gpgraph-0.1.4.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for gpgraph-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9d3a6ddc8b5e32149dfcb21a7d75b746d740cf3bbddf11b32be5c954d49d7d3b
MD5 efac1fcf660e8566ab64f5295591ff59
BLAKE2b-256 7d07cb35b7e9e0d08e731e5164d9671864c2569370a080d24979974fd8098b08

See more details on using hashes here.

File details

Details for the file gpgraph-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: gpgraph-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for gpgraph-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 849a39d8eafa3654f6a3c47971571e800652e4d0c020471ff72ed030ac5e23d4
MD5 3834d1173cdf3488b7b54d08f5b4bcc4
BLAKE2b-256 b314abf0d1844b1f58a9adb97ca98637f0ece089bd5e411c7d0d4f6f95d62f50

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page