Example workflow¶
We’ll work with pylibseq’s wrapper to libsequence’s SimData, which is used to process bi-allele data encoded as 0/1 = ancestral/derived, respectively
In [1]: from __future__ import print_function
In [2]: import libsequence
Assigning to an object¶
You may assign from a list of tuples.
Each tuple is a site: (pos:genotypes)
Here, there are 2 sites and a sample size of \(n=4\)
In [3]: rawData1 = [(0.1,'0101'),(0.2,'1010')]
#We can construct objects straight from these tuples
In [4]: sd = libsequence.SimData(rawData1)
In [5]: sd.size()
Out[5]: 4
In [6]: sd.pos()