converting genotypes to bitmasks