Sex inversion and epigenetic regulation in vertebrates