GPGraph¶
Genotype-phenotype maps in NetworkX
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)