“One pill makes you larger, and one pill makes you small,” sang Grace Slick in Jefferson Airplane’s classic White Rabbit, conjuring images of Alice in Wonderland in Lewis Carroll’s 1865 novel. But Alice also nibbled a mushroom to grow taller or smaller, following the advice of a hookah-smoking caterpillar perched atop the fungus.

Alice might have munched one of the 200 species of mushroom that produce psilocybin, a hallucinogen. A recent article in Evolution Letters, from Jason Slot, an assistant professor of fungal evolutionary genomics at The Ohio State University and co-workers, reports the sequencing of the genomes of three species of psychedelic mushrooms: Psilocybe cyanescens, Gymnopilus dilepis, and Panaeolus cyanescens.

Their research reveals how the hallucinogen that could make Alice think she was growing or shrinking and that hippies loved in the 1960s is actually a fungal defense mechanism, and the product of a set of genes that flit from one species of fungus to another. The biochemical shields the mushrooms from the bugs that share the rotting-log and dung-heap habitats.

Brief history of fungus-based drugs

Fungi have long played an important role in the pharmaceutical industry. They lie behind the famous penicillin story from 1941, and provide the natural products that inspired such varied drugs as cephalosporin antibiotics, statins and immune suppressants.

The ergot alkaloids were early migraine drugs. The most famous is LSD, lysergic acid diethylamide. It comes from a fungus of genus Claviceps that grows on certain grains, such as rye.

Of course drugs require a specific dose. But bread made from Claviceps-infected grain can cause the uncontrollable movements and terrifying visions of ergotism. People high on contaminated bread would imagine they were being chased by snakes or possessed by the devil. Ergotism may have been one impetus for burning women at the stake in colonial New England for being witches. Also called St. Anthony’s Fire, ergotism killed thousands in Europe in the Middle Ages.

Albert Hofmann, a chemist at Sandoz Laboratories in Basel, Switzerland, first synthesized LSD in 1938, in search of a migraine treatment. In a notebook entry after he went home early because he was dizzy, Hofmann wrote that he felt “a not unpleasant delirium which was marked by an extreme degree of fantasy … visions of extraordinary vividness accompanied by a kaleidoscopic play of intense coloration continuously swirled around me.” After he calmed down, Hofmann wondered if he’d unintentionally eaten crystals of LSD left at his work area.

To find out, he ate some more.

After 40 minutes, Hofmann wrote, he experienced “mild dizziness, restlessness, inability to concentrate, visual disturbance, and uncontrollable laughter.” Someone helped him home, where he began running around, although he thought he was still. Terrifying faces loomed, he had a metallic taste in his mouth, and thought he was looking down at himself from afar. “Multihued metamorphizing fantastic images overwhelmed me,” he wrote.

From Hofmann’s discovery until the mid-1960s, Sandoz labs tried to develop drugs to treat mental illnesses from LSD. But then Harvard psychology professor Timothy Leary’s promoting of LSD as a recreational drug led to a halt of research. In 1966, Sandoz turned over its LSD stash to the National Institute of Mental Health for research.

Progress on developing fungal psychedelics languished until 1999, when Roland Griffiths of Johns Hopkins began studying the effects on behavior of drugs of abuse. One of his first subjects: psilocybin. Dr. Hofmann described and synthesized it in 1958. Psilocybin is activated in the body, and may have been what Alice took when she sampled the mushroom.

Today ClinicalTrials.gov lists 23 studies on psilocybin, including some at highly respected institutions such as Johns Hopkins’ Heffter Research Institute. The eclectic applications include obsessive-compulsive disorder, depression, smoking cessation, spiritual practice, “depression, grief, and distress in long-term AIDS survivors,” “experience associated with classical mystical experiences,” effect on religious professionals, alcohol and cocaine dependence, and anxiety from having cancer. And, of course, migraines.

Understanding how mushrooms make psilocybin might provide clues to developing new pharmaceuticals. That’s what Dr. Slot’s team investigates.

Psilocybin as mushroom’s weapon

To a gilled mushroom, a chomping insect poses as much of a threat as a stomping human hiker, and the compound the fungus produces to preserve its niche affects insects and us.

A phenomenon called horizontal gene transfer — HGT — explains why 200 species of mushrooms that don’t have much in common nevertheless produce the same psychoactive compound, psilocybin.

Vertical gene transfer is familiar — grandparent to parent to child. Horizontal gene transfer moves a bunch of genes from one species to another. Barbara McClintock discovered these “jumping genes” in 1951 as spotting white or yellow corn kernels. Her discovery was years before researchers identified similar “transposons” in bacteria.

Jumping genes can cause genetic disease in people when they plop into important genes, disrupting their functions. They are also responsible for the transfer of sets of antibiotic resistance genes from one type of bacterium to another, which explains how multiple drug resistances spread easily in hospitals.

Dr. Slot and his co-workers suspected horizontal gene transfer behind psilocybin production because it takes five biochemical steps to get from the amino acid tryptophan to psilocybin, which is a “prodrug.” A digestive enzyme in the animal that eats the mushroom removes a phosphate from psilocybin, releasing the active drug psilocin. It binds to a subset of receptors for the neurotransmitter serotonin, which affects the behavior of various species of flies, beetles, ants, termites, and other arthropods. Perhaps they hallucinate, as Alice did.

(We may not live on dung heaps or in rotting logs, but we have serotonin and serotonin receptors. Many drugs, both therapeutic and recreational, interact with the serotonin pathway, such as the selective serotonin reuptake inhibitors – SSRIs).

“The psilocybin probably doesn’t just poison predators or taste bad. These mushrooms are altering the insects’ ‘mind’ — if they have minds — to meet their own needs,” Dr. Slot said in a news release, which is not quite how evolution works. (News releases tend to oversimplify.) Natural selection isn’t purposeful.

Over time, mushrooms containing biochemical that discourages predators were more likely to survive to reproduce, passing on their ability. And that talent could move to other fungal species thanks to horizontal gene transfer.

Imagining nauseated ants tottering off mushrooms, I asked Dr. Slot if the reaction is like a person taking syrup of ipecac to induce vomiting after swallowing poison. It doesn’t appear to be that straightforward. “I’m taking a bigger picture of behavior modification. The substance changes the rate of feeding. Specific activity on neurotransmitter receptors might indicate direct manipulation of the neurological controllers of behavior,” he hypothesizes.

Mushroom mind control? It happens. Other fungi that manipulate neurotransmitters include those of the genus Ophiocordyceps that enslave zombie ants and the effects of psilocybin on spinning spider webs.

Genome sequencing of mushrooms is part of the field of neurochemical ecology, and the current research “provides a methodological roadmap for the future discovery of novel fungal pharmaceuticals, with both social and medical applications,” Dr. Slot said.

Unlike synthetic chemist Dr. Hofmann or the pharmacologists tweaking natural hallucinogens today, Dr. Slot, an evolutionary ecologist, prefers to look to nature. “I find the possibility of identifying unexpected derivatives that have been refined by natural selection more intriguing.”

(The section on history is from “Discovery: Windows on the Life Sciences,” by Ricki Lewis, Blackwell Science, 2001.)

Ricki Lewis is the GLP’s senior contributing writer focusing on gene therapy and gene editing. She has a PhD in genetics and is a genetic counselor, science writer and author of The Forever Fix: Gene Therapy and the Boy Who Saved It, the only popular book about gene therapy. BIO. Follow her at her website or Twitter @rickilewis.