The operating instructions for nature’s tallest and biggest trees have long been hidden inside their tiny seeds — until now.

On Tuesday, scientists are announcing an ambitious plan to decode the full genetic sequences of California’s two most iconic trees — the coast redwood and giant sequoia — to better understand and protect California’s grandest forests.

Why are some trees more resilient than others? Could they offer hope for future generations? That’s what the $2.6 million project, a partnership between UC Davis, Johns Hopkins University and the San Francisco-based Save the Redwoods League, aims to discover.

The two related species are stressed by loss of habitat and changing environmental conditions. Environmentalists have fought to protect forests and combat climate change. But now it’s time for the next step — Conservation 2.0: Revealing the DNA of the hardiest trees could guide a rescue strategy for troubled forests.

“It is really easy to look for big trees in old forests and protect them,” said Emily Burns, director of science for Save The Redwoods and the lead investigator for the genome project.

“But something is hidden in the forest that we don’t understand nearly well enough — and that is genetic diversity,” she said.

When the project is complete in mid-2018, the team will have the so-called “reference genomes,” the Rosetta Stones of the two species. It will be made freely available to the public.

Then scientists can roam the forests in search of trees with a wide range of differing genes that help them fend off drought, disease, fire, pests and rising temperatures.

Genetic diversity acts as insurance against the total loss of an irreplaceable species.

Determining the complete DNA sequence of a single species has become almost commonplace, with comprehensive gene catalogs for hundreds of species ranging from microbes to humans.

Sequencing is a powerful tool to better understand human disease and design therapeutics, said professor David Neale, who will lead the UC Davis work in the university’s Department of Plant Sciences. It also has played a big role in agriculture, customizing the genetics of livestock and crops.

But the new redwood project, said Neale, is different, because it’s applying genetics to environmental restoration.

“These long-lived trees must survive where they’re born,” he said.

They share a common ancestor, diverging 50 million years ago.

The coast redwood is the tallest living tree on Earth, reaching up to 379 feet high. It lives along coastal California and the southwestern corner of Oregon.

The giant sequoia is the largest living thing by volume. The widest tree on record is 31 feet, the length of two Toyota Priuses. The largest weighs 642 tons, as much as 107 elephants. It grows on the western slopes of the Sierra Nevada Mountains.

Before commercial logging and clearing began by the 1850s, these massive trees occurred naturally in millions of acres in California.

For the genome project, scientists extracted DNA from seeds inside the cones of two old-growth trees, selected to act as representatives of their species.

The coast redwood DNA came from a tree at Butano State Park in San Mateo County. The giant sequoia DNA came from a tree in Sequoia National Park.

The ancient species have odd, large and uniquely challenging genetics.

Redwood trees’ genomes are 10 times larger than the human genome, said Neale. The coast redwood is especially tricky, with six sets of large chromosomes. Humans only have two sets.

In 2014, Neale conducted a pilot effort to prove that sequencing the redwood genome was feasible. Then his team produced a preliminary sequence for the coast redwood that is serving as the foundation for the project.

Recent innovations in sequencing technologies make the project possible, he said.

For many years, DNA was sequenced by a method that was developed in 1975 and used to sequence the first human genome in 2003, at a cost of at least $500 million.

Now so-called “next generation sequencing” technologies have made the process faster and cheaper.

The first phase of the sequencing project, performed at UC Davis’ Genome Center with Illumina technologies, is already finished. Now it moves to the second phase at Johns Hopkins University, using a newer tool called Oxford Nanopore.

The final step is to understand and interpret what the technologies reveal. That means going back into the forest to collect and compare genetics from many more trees, said Neale.

“Once we’ve done one genome, and have a road map as a template, we can more easily do the second, or the thousandth,” said Neale. “It’s faster and more efficient.”

Finally, they’ll link the genes to the environment. What genetic variations help a tree adapt to extreme drought, high temperatures or shrinking fog? That’s what they hope to learn.

In the future, when restoring a damaged or depleted landscape, scientists will strive to protect the trees with the best and most diverse genetics. Perhaps they may even select seedlings that are well matched for a landscape.

“We have to be thinking about how to set them up for success,” said Burns. “Sequencing is the first high-tech strategy to give us the information we need to do conservation work.”

Save the Redwoods League is seeking donations for the $2.6 million needed to sequence the genomes and inventory forests.