tracts.legacy.Indiv#

class Indiv(Ls=None, label='POP', fname=None, labs=('_A', '_B'), selectchrom=None, chroms=None, name=None)#

Bases: object

The class of diploid individuals. An individual can hence be though of as a list of pairs of chromosomes. Equivalently, a diploid individual is a pair of haploid individuals.

Thus, it is possible to construct instances of this class from a pair of instances of the haploid class, as well as directly from a sequence of chropair instances.

The interface for loading individuals from files uses the haploid-oriented approach, since individual .bed files describe only one haplotype. The loading process is thus the following:

  1. Load haploid individuals for each haplotype,

  2. Combine the haploid individuals into a diploid individual.