Skip to main content

NetworkX for genotype-phenotype maps.

Project description

# GPGraph

**Genotype-phenotype maps in NetworkX**

Port a `GenotypePhenotypeMap` to a [NetworkX Digraph](

## 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.

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

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

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

# 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.

Files for gpgraph, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size gpgraph-0.1.1-py2.py3-none-any.whl (6.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size gpgraph-0.1.1.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page