Installation

Installation#

Python 3.8 or greater is required. As the current Genetic Inheritance Graph Library API is not stable, you are currently encouraged to install the latest version from Github, as follows

python -m pip install git+https://github.com/hyanwong/giglib

After this, you should be able to test it in a Python session using something like the following (assuming you have also installed msprime)

import msprime
import giglib as gigl  # 😁

ts = msprime.sim_ancestry(
    4, sequence_length=100, recombination_rate=0.01, random_seed=1
)
gig = gigl.Graph.from_tree_sequence(ts)
print(len(gig.nodes), "nodes in this GIG")
16 nodes in this GIG

As this GIG was created from a standard tree sequence, it will not contain any structural variation.