The tiny, transparent roundworm known as Caenorhabditis elegans is roughly the size of a comma. Its entire body is made up of just about 1,000 cells. A third are brain cells, or neurons, that govern how the worm wriggles and when it searches for food — or abandons a meal to mate. It is one of the simplest organisms with a nervous system.

The circuitry of C. elegans has made it a common test subject among scientists wanting to understand how the nervous system works in other animals. Now, a team of researchers has completed a map of all the neurons, as well as all 7,000 or so connections between those neurons, in both sexes of the worm.

“It’s a major step toward understanding how neurons interact with each other to give rise to different behaviors,” said Scott Emmons, a developmental biologist at the Albert Einstein College of Medicine in New York who led the research.

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

Structure dictates function in several areas of biology, Dr. Emmons said. The shape of wings provided insight into flight, the helical form of DNA revealed how genes are coded, and the structure of proteins suggested how enzymes bind to targets in the body.