def flip_alleles(genotypes):
    """Flip the alleles of an Genotypes instance."""
    warnings.warn("deprecated: use 'Genotypes.flip_coded'", DeprecationWarning)
    genotypes.reference, genotypes.coded = (genotypes.coded,
                                            genotypes.reference)
    genotypes.genotypes = 2 - genotypes.genotypes
    return genotypes
Flip the alleles of an Genotypes instance.