FlyWire: mapping a whole fly brain
In 2024 the FlyWire team published a complete wiring map of an adult fruit fly brain. Learn how it was built with electron microscopes, AI and many human proofreaders.
In 60 seconds
FlyWire: mapping a whole fly brain
In 2024 the FlyWire team published a complete wiring map of an adult fruit fly brain. Learn how it was built with electron microscopes, AI and many human proofreaders.
How the map was made
- 1
Thin slices
The brain of one fly was cut into extremely thin slices. - 2
Electron microscope images
Each slice was photographed with an electron microscope, which shows details far smaller than a light microscope can. - 3
AI tracing
AI models found the edges of neurons in the images and joined the pieces from slice to slice. They also detected the synapses. - 4
Human proofreading
Many people, including trained scientists and citizen scientists, checked the AI's work and fixed wrong joins and breaks. - 5
Open data
The finished map was shared openly, so anyone can explore it.
Why AI needed human help
| Mistake | What happens | Effect on the map |
|---|---|---|
| Merge | Two different neurons are joined into one | One fake neuron with connections it does not really have |
| Split | One neuron is broken into pieces | Missing connections, and fragments that look like small neurons |
What scientists do with the map
- Follow a pathway, for example from taste neurons towards the neurons that control feeding.
- Group neurons into cell types with similar shapes and connections.
- Compare the left and right sides of the brain.
- Build computer models of the whole brain, as you will see in lesson 3.
Adding up connections
import pandas as pd
# MADE-UP synapse records, only for practice.
rows = [("taste_1", "relay", 3), ("taste_1", "relay", 4),
("taste_2", "relay", 2), ("relay", "feed_cmd", 9)]
df = pd.DataFrame(rows, columns=["pre", "post", "synapses"])
pairs = df.groupby(["pre", "post"], as_index=False)["synapses"].sum()
print(pairs)Watch and read more
Lab
A pandas analysis of made-up synapse records: summed connections, a strength filter, and the strongest input to a neuron.
The problem
This runs in your browser. All data is made up.
- Run the starter. It shows a table of made-up synapse records. The same pair of neurons can appear on more than one row.
- Make
pairs: one row per(pre, post)pair, withsynapsesadded up. Hint:groupbyandsum. - Make
strong: only the pairs with at leastMIN_SYNAPSESsynapses. - Set
top_inputto the name of the neuron that sends the most synapses in total to"feed_cmd". - Look at the raw rows: which neuron has the single biggest row into
"feed_cmd"? Why is that a different answer?
Practice lab
Edit the code and run it. Python runs in your browser — nothing is sent to our server.
No output. Add print(...) to see values.
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1Why might a very low threshold, such as 1 synapse, make a connectome analysis less reliable?Reveal
Automatic synapse detection makes some mistakes, and a single detected synapse between two neurons may be an error. With a threshold of 1, those errors count as real connections and can create fake pathways. A higher threshold removes most such noise, but it can also drop some real weak connections, so results should be checked with more than one threshold.
Q2The FlyWire map comes from one female fly. What questions can it not answer on its own?Reveal
It cannot show how much brains differ between individual flies, or between males and females, or how a brain changes with age and experience. For that, scientists need maps from more animals and experiments on living flies. One careful map is a reference, not the final word.
Questions people ask
Why a fruit fly and not a mouse?
A fly brain is small enough to map completely with today's tools, yet the fly does many complex things. A mouse brain has far more neurons, so a complete map of it is a much bigger job.
Did AI do all the work?
No. AI did most of the first tracing, which would have taken people far too long by hand. But humans proofread the results and fixed many errors. The map needed both.
Is the map perfect?
No map of this size is perfect. Some small errors remain, and some kinds of connections are hard to see in the images. The team shared the data openly so that others can check it and improve it.
Can I use the data for a school or college project?
Yes, the data is openly browsable online. Check the site's current terms for how to use and credit it.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.