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_gpgraph
, suited for genotype-phenotype graphs.
from gpmap.simulate import MountFujiSimulation
from gpgraph import GenotypePhenotypeGraph
from gpgraph.pyplot import draw_gpgraph, draw_edges
# Simulate a genotype-phenotype map
sim = MountFujiSimulation.from_length(4, roughness_width=1)
# Turn the genotype-phenotype map into a networkx object
G = GenotypePhenotypeGraph(sim)
# Draw the graph
figure = draw_gpgraph(G,
edge_colors = 'gray',
node_size=400)
Install
Clone this repo and install with pip
:
pip install -e .
To develop
Clone this repo and run setup.py
as follows
python setup.py develop --user
This way, if only python scripts are being changed nothing has to be reinstalled.
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.2.0.tar.gz
(131.0 kB
view details)
Built Distribution
gpgraph-0.2.0-py3-none-any.whl
(19.4 kB
view details)
File details
Details for the file gpgraph-0.2.0.tar.gz
.
File metadata
- Download URL: gpgraph-0.2.0.tar.gz
- Upload date:
- Size: 131.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34c8ea8b21eb06b1fe4ddbdf7b0358f96dd5f982f62cf5295278baaf420151bf |
|
MD5 | f41156c6a6ac1563c4cc83be116a3cb6 |
|
BLAKE2b-256 | 11178f9c1f831d3dbfad1777d184781db885946b34387c6050236fb9d0099d98 |
File details
Details for the file gpgraph-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: gpgraph-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79f8aacd4a87aa8059123796af42e2f83e7571742cecf90195f44143b80af8d9 |
|
MD5 | e9f7533b0a0786c534c6dfddd383591e |
|
BLAKE2b-256 | 1b2448b7812701b76dfd8743b581b7438f5b669cb37d45e249d3cb1d6c37f58d |