Genetic differentiation in populations with different classes of individuals