Birds are the living scion of the dinosaurs, and studying birds can offer clues to how dinosaurs worked under the hood. Paleontologists seldom find even the faintest trace of soft tissue clothing the bones of a fossilized dinosaur. Without evidence of external cues like colors or chemical signatures that the dinosaurs could have used to distinguish between sexes, we have to rely on detective work across millions of years.

Even in terms of gross skeletal anatomy, as far as we can tell, dinosaurs were not sexually dimorphic. Lucky finds do happen: paleontologist Tamaki Sato and coauthors reported in 2005 on a birdlike oviraptorosaur, found preserved with her eggs still cradled between her hip bones. Obviously a female. But such rare and precious discoveries are the exception, not the rule. So how do we tell anything about the way dinosaurs lived and died? One way is to use birds as a living genetic Rosetta stone.

When birds lay their eggs, the eggs have a hard, calcified shell. That calcification happens while the egg is still inside the mama bird, and the calcium has to come from somewhere. Somewhere, as it turns out, is the mama bird’s own bones. The spike in estrogen after a bird ovulates sends a signal to its body to start stripping away bone cells and scrapping them for their calcium content.

But the mother bird’s body won’t just leave her without bones, or with Swiss cheese for a skeleton. In the place of the bone stripped away to enclose the developing egg, the mother bird lays down what’s called medullary bone: loosely organized, messy ranks of soft placeholder bone cells full of shock-absorbing structural sugars called glycosaminoglycans, that she’ll remineralize later when food is more abundant. We find medullary bone only in gravid (pregnant egg-laying) animals, and we see it in their bigger bones, like the femur and humerus. Dinosaurs and birds share this trait. Molecular biologist Mary Schweitzer and team have also found medullary bone, another part of the genetic Rosetta stone (full text!), deep inside the thigh bone of a Tyrannosaurus rex.

Other experts argued (also full text), based on spongy bone they found in a male pterodactyl jaw, that what Schweitzer found in the T. rex femur only looked like medullary bone, but was actually the result of some pathology. So Schweitzer spent the better part of a decade applying sophisticated imaging and chemical testing to the T. rex thigh bone, to find out once and for all what was going on. In the work leading to Schweitzer’s 2012 report on T. rex and gender, the team applied an antigen-antibody test that reacted only to bird osteocytes. They found that the dinosaur bone had osteocytes similar enough to bird osteocytes to give a positive result. On this most recent sample, they used a chemical stain that adheres to glycosaminoglycans, which are found in medullary bone but not in other kinds of bone. It lights up blue under a microscope, clearly showing the presence of medullary bone. CT scans confirmed it: they had found medullary bone. Since medullary bone is only found in gravid females, that meant the T. rex was gravid, in the process of developing an egg, when she died.

What this means is that now we can use fine skeletal anatomy to distinguish gravid (pregnant) dinosaurs from other fossils, even if the eggs they were developing weren’t preserved along with the mother’s bones. We have a way of telling male from female reliably, even though soft tissue isn’t preserved over the millennia. And using this kind of testing, we may be able to tease out far more information from the bones of our more recent relatives than we knew we could.