In case you weren’t paying attention, a lot has been happening in the science of genomics over the past few years. It is, for example, now possible to read one human genome and correct all known errors. Perhaps this sounds terrifying, but genomic science has a track-record in making science fiction reality. ‘Everything that’s alive we want to rewrite,’ boasted Austen Heinz, the CEO of Cambrian Genomics, last year.

It was only in 2010 that Craig Venter’s team in Maryland led us into the era of synthetic genomics when they created Synthia, the first living organism to have a computer for a mother. A simple bacterium, she has a genome just over half a million letters of DNA long, but the potential for scaling up is vast; synthetic yeast and worm projects are underway.

Two years after the ‘birth’ of Synthia, sequencing was so powerful that it was used to extract the genome of a newly discovered, 80,000-year-old human species, the Denisovans, from a pinky bone found in a frozen cave in Siberia. In 2015, the United Kingdom became the first country to legalise the creation of ‘three-parent babies’ – that is, babies with a biological mother, father and a second woman who donates a healthy mitochondrial genome, the energy producer found in all human cells.

Commensurate with their power to change biology as we know it, the new technologies are driving renewed ethical debates. Uneasiness is being expressed, not only among the general public, but also in high-profile articles and interviews by scientists. When China announced it was modifying human embryos this April, the term ‘CRISPR/Cas9’ trended on the social media site Twitter. CRISPR/Cas9, by the way, is a protein-RNA combo that defends bacteria against marauding viruses. Properly adapted, it allows scientists to edit strings of DNA inside living cells with astonishing precision. It has, for example, been used to show that HIV can be ‘snipped’ out of the human genome, and that female mosquitoes can be turned male to stop the spread of malaria (only females bite).

But one of CRISPR’s co-developers, Jennifer Doudna of the University of California in Berkeley, has ‘strongly discouraged’ any attempts to edit the human genome pending a review of the ethical issues. Well, thanks to China, that ship has sailed. Indeed, now the technology appears to be finding its way into the hands of hobbyists: Nature recently reported that members of the ‘biohacker’ sub-culture have been messing around with CRISPR, though the enthusiast they interviewed didn’t appear to have a clear idea of what he wanted to do with it.

Given that our genetic abilities appear to be reaching a critical threshold, it is worth taking a fairly hard-headed look at what the next few years promise. For instance, could DNA solve some of our pressing energy issues? One project hopes to engineer trees that glow in the dark. You can sign up to preorder one now – at least the weed version of it; trees take too long to mature to be good prototypes. Perhaps the day is not far off when our streets are lined with bioluminescent foliage. This would presumably drive electric streetlamps into obsolescence, like so many other energy-hungry ‘old-fashioned’ technologies.

But this is hardly the only potentially revolutionary project that aims to play out in the next five to 10 years. Venter is working on re-engineering pig lungs so that they can be used in human transplants. This could have a much larger impact than is immediately obvious: about one in 10 deaths in Europe is caused by lung disease. Farther afield, Venter is in the race to find life on Mars with DNA sequencers, and is developing methods of ‘biological teleportation’ – the idea is that you sequence microbial DNA on Mars and then reconstruct the genomes on Earth using 3D printing. The process could work the other way around, too. Venter and Elon Musk are talking of using this technology to terraform Mars with 3D-printed earthly microbes. The whole thing boggles the imagination, of course, but Venter and Musk do have form for pulling off amazing feats. Nevertheless, perhaps we should start our tour of the horizon closer to home.

By 2020, many hospitals will have genomic medicine departments, designing medical therapies based on your personal genetic constitution. Gene sequencers – machines that can take a blood sample and reel off your entire genetic blueprint – will shrink below the size of USB drives. Supermarkets will have shelves of home DNA tests, perhaps nestled between the cosmetics and medicines, for everything from whether your baby will be good at sports to the breed of cat you just adopted, to whether your kitchen counter harbours enough ‘good bacteria’. We will all know someone who has had their genome probed for medical reasons, perhaps even ourselves. Personal DNA stories – including the quality of the bugs in your gut– will be the stuff of cocktail party chitchat.

By 2025, projections suggest that we will have sequenced the genomes of billions of individuals. This is largely down to the explosive growth in the field of cancer genomics. Steve Jobs, the co-founder of Apple, became one of the early adopters of genomic medicine when he had the cancer that killed him sequenced. Many others will follow. And we will become more and more willing to act on what our genes tell us. Just as the actress Angelina Jolie chose to undergo a double mastectomy to stem her chances of developing breast cancer, society will think nothing of making decisions based on a wide range of genes and gene combinations. Already a study has quantified the ‘Angelina Jolie effect’. Following her public announcement, the number of women turning to DNA testing to assess their risk for familial breast cancer doubled.

For better or worse, we will increasingly define ourselves by our DNA. There are hints of this already in the issues of privacy surrounding disease genes such as the ApoE gene, the largest known genetic determinant of Alzheimer’s disease. In 2007, James Watson – one of the discoverers of the structure of DNA – became the second person ever to have his genome sequenced. He refused to learn whether he had the ApoE gene, terrified that he would meet the same fate as his mother, who died of dementia. At the other end of the spectrum, John Wilbanks, a proponent of genomic openness, freely admitted that his profile carried a risk of Alzheimer’s. Society will have to develop new norms to cope with such dilemmas, but whether they will stick closer to the path of Watson or Wilbanks remains to be seen.

Perhaps the most profound long-term societal change will be DNA’s contribution towards what the American futurologist and entrepreneur Peter Diamandis calls ‘perfect knowledge’. Diamandis seemed to be thinking mainly about omnipresent cameras:

With a trillion sensors gathering data everywhere (autonomous cars, satellite systems, drones, wearables, cameras), you’ll be able to know anything you want, anytime, anywhere, and query that data for answers and insights.

You can see what he means in certain areas already: for example, geography. Due to satellite imaging, we can see the entire surface of our planet. There can be no undiscovered land masses. The map of the world is complete. And we should expect the same thing for genetics. DNA testing will become so pervasive it will transform the medical, legal and social foundations of society. If blanket genome sequencing takes off, it will be impossible to obscure human relationships or ignore the content of our DNA.

Unlawfully drop trash you’ve touch, licked or chewed, like gum or a tissue, and you might find a facsimile of your face on a bus stop

The tell-tale signs of the possible future are wide-spread. DNA testing is already the gold standard of criminal evidence. It takes only a hair, a fingerprint, or a glass that has been drunk from, to get enough DNA to identify a suspect, and there are millions of DNA profiles in the FBI’s CODIS database to match against. Some gated communities in the United States require DNA from pets. Owners who let their pets defile shared grounds are fined: the authorities only have to match what they fail to scoop against their entry in the mandatory pet registry. In Hong Kong the same goes for those who litter. Unlawfully drop trash you’ve touch, licked or chewed, like gum or a tissue, and you might find a facsimile of your face on a bus stop. The latest advances in DNA identification permit life-like 3D reconstructions.

What next? Presumably a consolidated genomic registry isn’t far off. It already exists to a limited extent, populated on a voluntary basis by early adopters. There are several million-human genome projects. The consumer genetics company 23andMe in California can boast more than 1 million customers. National genomics programmes are taking shape across the globe, led by countries such as Iceland, which has now sequenced or inferred the genomic content of a third of its population on a voluntary basis – so far. Kuwait, on the other hand, recently introduced mandatory DNA testing of its entire population as an anti-terrorism measure.

The social and political consequences of such an archive frankly defy my futurological abilities. A certain amount of alarm does not seem misplaced, for if any technology lends itself to state or private abuse, it is this one. But my interests are basically scientific, and while a registry of the genome of every human on the planet would be one of the most tremendous scientific assets ever created, it would still only scratch the surface of what genomics might achieve.

We are beginning to think of the DNA on Earth as a whole. All life, including humans, ultimately exists in one system, our Pale Blue Dot. Let’s give it a name. Let’s call the sum of DNA on Earth ‘The Biocode’.

Scientists have just estimated this Biocode’s size. Combining information about genome size with information about the biomass of different organisms suggests that the Biocode exceeds ±3.6 × 1031 million base pairs. Multiplying the genome sizes of organisms, ranging from bacteria to bees to birds, by the numbers of organisms in all groups of life on Earth yields a (very rough) estimate of 50 billion tons of DNA. This is enough of the invisible code of life to fill 1 billion shipping containers.

How much do we know about it? Shockingly little. We remain overwhelmed by its biodiversity, especially when it comes to the invisible majority: microbes. Not only are we appreciating that our guts are filled with trillions of microbial cells, but so is the planet. Single-celled, microbial life comprises 50 per cent of the planet’s biomass and 99 per cent of its genetic diversity. It is ancient, drives our biogeochemical cycles, helps the planet sustain life, and is largely unknown.

But that will change. One of the greatest achievements of the coming century will be the characterisation of the Biocode, not just as a list of genomes of different species, but as patterns of interacting communities. Our first guess at its size opens a door. We will start to understand how it has fluctuated in composition in the past and how it will change in the future. We can start to learn how it works.

By 2050 we should aim to finally have a handle not only on human genetic diversity but on the biodiversity of the planet. We will have hopefully completed a DNA-based Systema Natura, the work that Linnaeus, the father of taxonomy, first published in 1735. The key question will be how much of the Earth’s genetic legacy will remain. Projects such as the Smithsonian’s Global Genome Initiative are trying to freeze samples from all extant organisms for future DNA sequencing, both to await even cheaper costs and to protect genomes that might become extinct prior to being read.

This updated edition of the Systema Natura should elucidate not only the true evolutionary relationships between organisms, but also the ways in which ecologically-related genomes interact. At the moment, we are still largely at the inventory stage. We are reading the DNA of everything from Neanderthals to woolly mammoths, to the microbes of the New York subway system. Here’s one interesting area in which we have been making progress, for example: we have a significant fraction of the ‘panda biocode’. This includes 2 per cent of the genomes of all extant pandas, their primary food, bamboo, and samples of the panda microbiome, a collection of microbes that can digest cellulose and thereby enable this carnivore with canine teeth to live like a vegetarian on its otherwise indigestible plant diet.

If all life has DNA and it is interlinked on our planet, then the entire planetary ecology can be likened to a giant computer

But we have a long way to go. There could be more than 20 million species on Earth. The Earth Microbiome Project alone has catalogued some 9 million microbial species, and it is only one of an array of projects sequencing the branches of the tree of life. This is Big Science indeed; in fact, it is one of the biggest scientific enterprises in history, the de facto Planetary Genome Project.

The authors who estimated the size of the Biocode seized on the metaphor of DNA as software to produce a tremendous thought. If all life has DNA and it is interlinked on our planet, then the entire planetary ecology can be likened to a giant computer. For example, it is because of life that Earth has an oxygen-filled atmosphere. Oxygen comes from the DNA software in plants and microbes using sunlight and carbon dioxide to drive the chemical process of photosynthesis. This system-view of the planet allows us to make further daunting calculations. Say that the processing power of this computer is the rate at which information is processed from DNA sequence to proteins. This suggests that our planet boasts computational power 1022 times that of China’s Tianhe‑2, which is currently the fastest supercomputer ever built. Modern society is obsessed with computers, and now we have to consider that we live inside one, at least in some figurative sense. If we accept this analogy, we also have to accept that we know little about how it works.

Of course, even as we are developing the ability to decipher the code of this great computer, we are hacking away parts of it, largely ignorant of the consequences. We face a sixth mass extinction, defined as the loss of more than 75 per cent of the species on Earth in a short geological time period. Ever since humans evolved, we have been reprogramming the Biocode, but the pace is stepping up. Never mind those notionally alarming genetics projects: we clear-cut forests, plant mono-culture crops, hunt and fish prey to extinction, poison vast tracts of remaining biodiversity or force its migration off land we claim for ourselves. Now the pace of extinction alone might be as high as 100 times background rates. In most cases, extinction is like wiping clean a computer’s hard drive. The information is irretrievable.

Most who worry about the power of genomics fear the spectre of designer babies, bio-terrorism, denial of insurance coverage, discrimination based on DNA, or genetic surveillance. Perhaps we should worry more about the fact that we are rewriting the code of life on Earth at a terrifying pace, usually without even considering that this is what we are doing.

By 2100, could the Biocode be significantly synthetic in nature? It is not too far-fetched to suppose that we will see both the rise of industrially produced bespoke creatures and the loss of naturally occurring organisms born without the intervention of a computer. Whether the future of genomics is set to be shadowed in darkness or bask in bright light, what is perhaps the most incredible about its potential is its reach. The Biocode has been crunching away on Earth since life originated some 3.5 billion years ago. Pretty much regardless of what humans do, it will surely continue well into the future in some form, no doubt of mind-blowing complexity. It might even include new species of human, wrought by the coming generation, whether by accident, design, or some combination of the two.