Parse genotypes from the file and iteration with relevant marker \
            details.

        :param iteration: ParseLocus object which is returned per iteration
        :return: True indicates current locus is valid.

        StopIteration is thrown if the marker reaches the end of the file or
        the valid genomic region for analysis.

def populate_iteration(self, iteration):
        """Parse genotypes from the file and iteration with relevant marker \
            details.

        :param iteration: ParseLocus object which is returned per iteration
        :return: True indicates current locus is valid.

        StopIteration is thrown if the marker reaches the end of the file or
        the valid genomic region for analysis.
        """
        global encoding
        line, info, exp_freq = self.get_next_line()

        if info > Parser.info_threshold:
            junk, iteration.rsid, iteration.pos, iteration.major_allele, iteration.minor_allele = line[0:5]
            iteration.chr = self.current_chrom
            iteration.pos = int(iteration.pos)
            if DataParser.boundary.TestBoundary(iteration.chr, iteration.pos, iteration.rsid):
                frequencies = []
                idx = 5
                total_maf = 0.0
                additive = []
                for is_ignored in self.ind_mask[:,0]:
                    if not is_ignored:
                        AA,Aa,aa = [float(x) for x in line[idx:idx+3]]
                        additive.append(Aa+2*aa)
                        if encoding==Encoding.Dominant:
                            estimate = Aa + aa
                        elif encoding==Encoding.Additive:
                            estimate = additive[-1]
                        elif encoding==Encoding.Recessive:
                            estimate = aa
                        elif encoding==Encoding.Genotype:
                            if Aa >= AA and Aa >= aa:
                                estimate = 1
                            elif AA >= Aa and AA >= aa:
                                estimate = 0
                            else:
                                estimate = 2
                        elif encoding==Encoding.Raw:
                            estimate = [AA, Aa, aa]
                        total_maf += numpy.sqrt(aa)
                        frequencies.append(estimate)
                    idx += 3
                iteration.non_missing_alc = len(additive)*2
                maf = numpy.mean(numpy.array(additive))/2
                iteration.allele_count2 = maf * (len(additive) * 2)
                iteration.effa_freq = maf

                if maf > 0.5:
                    iteration.min_allele_count = len(additive)*2 - iteration.allele_count2
                    iteration.maj_allele_count = iteration.allele_count2
                    maf = 1.0 - maf
                else:
                    iteration.min_allele_count = iteration.allele_count2
                    iteration.maj_allele_count = len(additive)*2 - iteration.allele_count2

                iteration._maf = maf
                iteration.genotype_data = numpy.array(frequencies)

                return iteration.maf >= DataParser.min_maf and iteration.maf <= DataParser.max_maf
            else:
                return False
        else:
            return False