Source code for geno4sd.utils.read_plink

import struct, time, sys, multiprocessing as mp
import numpy as np
import pandas


# for each row (1st index) of samples, the columns contain allele info:
#   0 = homozygous in 1st allele listed in the .bim file
#   1 = missing information
#   2 = heterozygous -- one of each of the alleles in the .map file
#   3 = homozygous in the rt hand allele in the .bim
#  in https://www.cog-genomics.org/plink/1.9/formats#bed