The choice to have sex has everything to do with location, at least for tiny freshwater creatures called rotifers.

Rotifers can reproduce sexually or asexually, and the decision to go one way or another depends on the animals’ habitat, according to a new study in the journal Nature.

The researchers bred rotifers in three different environments: one in which the quality of available food was high, one in which it was low and one in which it was mixed. The rate of sexual reproduction remained the same where the food quality was consistently high or low, but it increased significantly in the mixed region over generations, the researchers found.

Image Sexual female rotifers, top, carrying resting eggs (the darker eggs) along with asexual females carrying lighter-shaded amictic eggs, and a single asexual female with an attached asexual egg. Credit... Jan Kuiper and Lutz Becks

In the mixed environment, asexual females were more likely to produce sexually reproducing female offspring. In the two homogenous regions, females tended to produce asexual females  carbon copies of themselves.