code: def _double_single_alleles(df, chrom):
          
          # find all single alleles of the specified chromosome
          single_alleles = np.where(
              (df["chrom"] == chrom) & (df["genotype"].str.len() == 1)
          )[0]
  
          # double those alleles
          df.ix[single_alleles, "genotype"] = df.ix[single_alleles, "genotype"] * 2
  
          return df
docs: Double any single alleles in the specified chromosome.
  
          Parameters
          ----------
          df : pandas.DataFrame
              SNPs
          chrom : str
              chromosome of alleles to double
  
          Returns
          -------
          df : pandas.DataFrame
              SNPs with specified chromosome's single alleles doubled