NEW YORK -- If in the beginning there was male and female, fish seem to have forgotten the memo.
For nearly 500 fish species, including the clownfish in "Finding Nemo," the great divide between sexes is more like a murky line: If circumstances call for it, the fish can swap their sex, with females turning into males in some species and males turning into females in others.
People think of sex as being fixed, said biologist Erica Todd from the University of Otago in New Zealand, "but there are so many fish that can push it in the other direction."
Scientists have known for decades about the sex trades, but they've had limited understanding of how the exchange happens. In a study published Wednesday in Science Advances, Todd and her colleagues detail the molecular events behind this ability, as well as what keeps mammals stuck as one sex or another.
The researchers looked at the bluehead wrasse, a reef fish that swims in small groups of a dominant blue-headed male and a posse of smaller yellow females. Normally the male and females stay as they are, feeding together and occasionally mating. But if a predator happens to snatch up the lead male, the dominant female in the group will become a male.
"The sex change in this species is remarkable because it's so quick," Todd said. It takes only minutes to a few hours for the female's behavior to become more territorial and aggressive like a male. In a few days, she courts other females. And after eight to 10 days, she's fully transitioned to a male.
Todd and her team removed the lead males from several wrasse groups in the Florida Keys. As the females changed sexes, the researchers took DNA from cells in the animal's brains and genitals so they could follow what was happening at the genetic level.
They found that removing the males likely stressed females. The hormones released from that stress dial back the activity of the gene that makes the female hormone estrogen, and eventually ovary cells start to die. At the same time, those hormones increase activity in the genes that produce male hormones, and later testicles form.
At a certain point, the reproductive gland "is mostly dying female cells and proliferation of early male cells," Todd said.
But hormones weren't the only thing switching around. The scientists also saw a complete rearrangement of chemical tags that attach to DNA. These tags turn genes on or off and have specific arrangements in males and females.
As female wrasse transitioned to a male, these tags were removed and reorganized, almost as if the fish was being reprogrammed.
"They're sort of poised and ready to go either direction" like a seesaw, she said. The hormones help push it to the male side.
Laura Casas, a biologist in Spain who was not involved in the study, called the results surprising. She expects the findings can apply to other sex-changing fish, including her study animal clownfish, which shift from male to female.
Matthew Grober, of Georgia State University, was more skeptical, especially of stress as the source that triggers the change. He questioned how the fish avoid changing sex from day-to-day stress and suspects something else is at play.
All animals with a backbone, including humans, share these genes, raising the question of whether all of them have a deep-seated capability to switch sex.
That's unlikely. Our reproductive systems are more complex and would be far more complicated to rewire, Todd said. There's also cell machinery that aggressively opposes the seesaw from swinging the other way.
"These fish are just able to go back and remove that suppression," she said.
Follow Jeremy Rehm on Twitter @jrehm—sci
The Associated Press Health and Science Department receives support from the Howard Hughes Medical Institute's Department of Science Education. The AP is solely responsible for all content.