Codex is a connectome explorer for several Drosophila datasets. Current public datasets are:
  • FlyWire FAFB - Female Adult Fly Brain; default snapshot 783; available in Codex: v783 - Oct 2023 [latest release]
  • FlyWire BANC - Female Adult Fly Brain and Nerve Cord; default snapshot 626; available in Codex: v626 - Jul 20, 2025 [latest release], v610 - Jul 08, 2025, v587 - Jun 12, 2025
  • MANC - Male Adult Fly Nerve Cord; default snapshot 1.2.1; available in Codex: v1.2.1
  • MAOL - Male Adult Fly Right Optic Lobe; default snapshot 1.1; available in Codex: v1.1
  • MCNS - Male Adult Fly CNS; default snapshot 0.9; available in Codex: v0.9
Use the dataset/version selector in the navigation bar or the home-page dataset tiles to switch context. Most pages are dataset-specific: search results, stats, cell details, network graphs, and downloads refer to the selected dataset unless noted otherwise.
Codex provides access to static connectome data releases, sometimes referred to as snapshots or versions. These releases generally include cells marked as proofread in the source project. The default version for each dataset is shown in the dataset selector and home-page dataset tiles. Development environments may also expose older versions. For live queries against proofreading database tables, use the CAVE Client Python library or the corresponding source-project tooling. Codex search only sees data included in the selected snapshot, so annotations or root IDs created after that snapshot may not appear until a later Codex data update.
Use them for different jobs. CAVE is a live database-backed system used primarily to build connectomes: editing, proofreading, correcting merges and splits, and tracking the lineage of neuron reconstructions across versions. Codex, by contrast, serves consolidated static snapshots of the connectome data. These snapshots are intended to be complete, self-consistent releases for users who want to analyze the connectome rather than edit or proofread it. Codex cell typing information is consolidated from multiple sources, including flagship FlyWire paper annotations, optic-lobe cell types, auditory-cell work, doublesex and fruitless annotations, and other periodically updated publications. Before import, sources are cleaned, deduplicated, and reconciled so the most specific current type information can be selected where possible. For bulk analysis, export the static CSV files from Info -> Download Data. Codex intentionally does not provide a general programmatic live-query API for bulk access; use the static downloads instead of scraping pages or running many app queries. For an example of accessing and processing Codex data programmatically from the downloadable files, see this Colab notebook.
For public users, Codex currently offers downloadable datasets for the FlyWire datasets (FAFB, BANC). Visit the data download portal while one of those datasets is selected to review available files, metadata, sizes, formats, and citation requirements. For non-FlyWire datasets such as MANC, MAOL, and MCNS, Codex is primarily an interactive browser; please use the respective project homepages or archives for canonical downloads:Files in the Codex portal are synchronized with the current Codex data, so they may differ from original publication-time archives. The download page links to original static archives when applicable.
For programmatic analysis, use Codex's static downloadable files rather than issuing many live app queries. A worked example is available in this Colab notebook. It demonstrates the recommended Python pattern: inspect available FAFB data products at https://codex.flywire.ai/api/download?dataset=fafb, fetch gzipped CSV resources through https://codex.flywire.ai/api/download_resource?data_product=...&dataset=fafb, and process them locally with standard Python tools such as urllib.request, gzip, csv, and collections.defaultdict. In the example, the notebook loads consolidated_cell_types and connections_princeton, finds the two HSN cells from the consolidated cell-type table, joins those types to the connection table, and reports the top input cell types by synapse count. The result should match the corresponding Codex Stats view for cell_type==HSN. Replace the data_product and dataset parameters with the files and dataset you need; public download resources are currently focused on FlyWire datasets.
Interactive Codex apps require Google sign-in to prevent abuse, enable rate limiting, and keep the service available. Static pages such as FAQ, About, Sample Queries, and public challenge pages can be viewed without signing in. A CAVE/FlyWire access token is only needed for operations that require live source-project permissions, such as mapping root IDs through CAVE, viewing your FlyWire label history, or accessing protected/unpublished dataset permissions. You can manage your token from the Account page.
Codex supports both free-form and structured search. Free-form search scans indexed annotations such as labels, cell types, classes, genes, neurotransmitter predictions, body parts, functions, and other dataset-specific fields. Exact whole-word matches rank above partial or fuzzy matches. Use the settings button (Cc W) to toggle case-sensitive matching, whole-word matching, sorting, page size, or a top-N result limit. Typeahead suggestions appear in search boxes; structured-query snippets and operators are prioritized in the suggestions.
Yes. In the main Search app, prepend the query with @. For example, @ T4a searches for T4a across all datasets and shows which datasets have matches. The home page also has a separate search cells and annotations in all datasets box. Cross-dataset search is a discovery step: click a dataset result to open the normal dataset-specific search page for detailed actions.
Search results can be reused throughout Codex. The action strip above results links the current query to the List, Stats, Taxonomy, Network, and 3D views. For small enough result sets you can copy root IDs directly to the clipboard or download connections. You can also download a CSV summary of the result rows or a comma-separated Cell IDs file. Result-table plus/minus buttons add structured include/exclude filters for values such as neurotransmitter type, labels, classification fields, and other attributes.
Root IDs are tied to a specific source segmentation and data snapshot. If a cell was edited, merged, split, or introduced after the selected Codex snapshot, its ID may not be searchable in that snapshot. When a searched root ID is missing, Codex links to the Map Root IDs tool. Mapping relies on CAVE permissions for the relevant FlyWire dataset, so you may be asked for a CAVE/FlyWire access token. If mapping fails, open the source project viewer or homepage and verify the ID there.
A cell detail page collects the selected cell's core attributes, annotations, top connections, embedded 3D view, synapse/partner summaries, similar cells, related analyses, and available external links. It can link to upstream/downstream searches, reciprocal partners, similar morphology, shared partner searches, similar projection searches, synapse-coordinate JSON, SWC skeleton download when available, NeuronBridge, BrainCircuits.io line matching, and an error-report form for proofreading or classification issues.
The Stats page summarizes either the whole selected dataset or the cells matching the current query. Charts and tables cover annotations, connectivity, neurotransmitters, and other available fields. Many chart segments are clickable: clicking a segment refines the search using a structured query. For moderate-size result sets, Stats also embeds a 3D render of the queried cells.
The 3D Viewer renders cells in Neuroglancer from any Codex search query or root ID list. For a single cell, Codex can show input/output synapse markers. For multiple cells, you can color by attributes such as type or classification, choose a palette, optionally load the EM layer, and for FAFB show brain regions. If too many cells match, Codex asks whether to show a random sample, filter through Stats, or load all cells. Neuroglancer works best on desktop browsers; Codex warns before opening it on unsupported browsers or mobile iOS devices.
Use Annotations to browse top values for fields such as predicted neurotransmitter type, flow, class, cell type, hemilineage, nerve, side, labels, connectivity tags, body parts, functions, and influence fields. Clicking a value opens a structured search for matching cells. Use Cell Types to compare cell-type counts across datasets and Taxonomy to visualize the current query by flow, super class, class, sub class, resolved type, and side.
Codex indexes several annotation layers. Cell types are consolidated from multiple sources and Codex selects a primary/resolved type when more than one type is present. Community labels are free-form identification tags contributed by the FlyWire community; Codex displays cleaned labels but raw label logs and credits are available from each FlyWire cell detail page. Hierarchical classification fields include flow, super class, class, sub class, side, neuromere, nerve, and hemilineage. Attribution details are available on the About FlyWire page and in the info modals beside the table headers.
Cell names were assigned automatically based on neuropils (brain regions) where the cells have most synaptic connections. Names are kept as consistent as possible across snapshots, but proofreading or upstream data changes can cause names to change.
Codex displays predicted neurotransmitter type and confidence score when available, and may also show verified neurotransmitter types or verified neuropeptides from curated sources. Search supports both abbreviations and names where possible, for example nt_type == GABA. Because predictions and verified annotations come from different sources, they may disagree; treat verified fields as curated annotations and predicted fields as model output.
Connectivity is directed: an edge goes from the presynaptic cell to the postsynaptic cell. A pair of cells is considered connected when the total synapse count for that pair meets the selected minimum threshold. Default minimum thresholds are dataset-specific:
  • FAFB: 5+ synapses
  • BANC: 3+ synapses
  • MANC: 1+ synapses
  • MAOL: 1+ synapses
  • MCNS: 5+ synapses
The Network and Pathways tools let you raise the minimum threshold, but they will not go below the dataset's default minimum. Connection tables can contain multiple rows for the same pair when synapses occur in multiple regions/neuropils.
The connectome forms a directed graph where nodes correspond to neurons and edges to synaptic connections. Edges have the following properties: number of synapses, region (neuropil), predicted neurotransmitter type. Nodes have various annotations, including hierarchical classification, identification labels, neurotransmitter predictions, side, and more. A pair of nodes can be connected with multiple edges corresponding to different brain regions.
The Network tool visualizes connectivity for one or more queried cells. If only one cell matches, Codex includes that cell's partners so the graph is not a single isolated node. Settings let you change node labels, group nodes by annotation categories, include partners of queried cells, show brain regions, raise the minimum synapse threshold, cap the number of top connections displayed, and filter edges such as top inputs, top outputs, inside-column, or cross-column edges. Generated connection tables can be downloaded as CSV or JSON when the result is not too large.
Shortest path length is the minimum number of 'hops' needed to reach the target cell from the source cell through synaptic connections in the connectome network. The Pathways tool accepts one or more source queries and one or more target queries, then returns a source-by-target matrix. From a non-empty matrix cell, you can open the pathway as a graph or list the cells on the shortest pathway. The table can be downloaded as CSV. You can also group sources/targets by annotation category and raise the minimum synapse threshold. In the FlyWire FAFB dataset, the default threshold is 5+ synapses; other datasets use their own defaults listed above.
Yes. The Motifs app searches three-node motifs with nodes A, B, and C. For each directed edge (A to B, B to A, and so on) you can enable or disable the constraint, choose a region, set a minimum synapse count, and optionally restrict neurotransmitter type. Each node can also have its own Codex search query, or be left blank to match any cell.
Connectivity tags are network-analysis descriptors such as rich club, broadcaster, integrator, attractor, repeller, reciprocal, feedforward-loop participant, 3-cycle participant, highly reciprocal neuron, and neuropil-specific reciprocal neuron. They can be browsed on the Annotations page, viewed in cell details, or queried with structured search such as connectivity_tag == reciprocal.
Most core tools (Search, Stats, Cell Details, 3D Viewer, Network, Pathways, Motifs, Annotations, Taxonomy, and Cell Type Counts) work across the selected Codex dataset. Some specialized tools are currently dataset-limited: the Neuropil Explorer is available for FAFB; Body Parts Explorer is available for BANC; the Visual Cell Types Catalog, Visual Field Map, and Visual Columns Map are available for FAFB optic-lobe data; the FlyWire proofreading/editor link is available for FAFB only. When a tool is not available for the selected dataset, Codex usually links to a dataset where that tool can be explored.
For issues with a specific cell, open the cell detail page and use Report error / issue with this cell; the FlyWire/Codex team will review the report and may follow up by email. For bulk annotations or other curated data, email a CSV or other plain text file to arie@princeton.edu. Please clearly mark the cell ID and annotation columns and include a description, citation, and data source.
Not directly from Codex. Cell detail pages may link to SWC skeleton downloads where skeletons are available, but full 3D meshes are not served from Codex. To download meshes, use the Meshparty package; see the Meshparty instructions.
NBLAST is a method for assigning morphology-similarity scores to neuron pairs. Scores are not necessarily symmetric and range from 1 (similar) to -1 (not similar).
For FlyWire connectomes, the Neuroglancer based 3D viewer generally uses coordinate system with 4, 4, 40 nm voxels (shown in the upper left). The origin of the 3D viewer was chosen as a corner of the bounding box surrounding the image volume. The orientation of the coordinate system is roughly as follows: the x-axis runs from left to right (lateral), the y-axis from dorsal to ventral, and the z-axis from anterior to posterior. These are rough alignments because they were put in place when the sample was cut.
In FlyWire FAFB, neuron side is decided based on SOMA (cell body) position, and both neuropil and neuron side annotations are from the fly's perspective. After the initial FlyWire release, we learned that the FAFB dataset used in FlyWire was left/right inverted during image acquisition. This impacted neurons labeled L/R, neuropil names, and any other use of left/right. This issue was addressed by inverting the left/right orientation of all annotations and labels in both CAVE and Codex. However, we decided not to change the imagery or segmentation data, which means that all images and 3D views are inverted, both for cells and neuropils. Questions? Contact flywire@princeton.edu.
Connectomes are generated using a combination of automated image analysis and human proofreading. Electron microscopy is used to image thin (~10 nanometer) slices of brain tissue. Then these images are aligned and segmented into 3D neuron segments with bespoke AI-assisted algorithms. The preliminary connectome is then proofread and corrected by a community of researchers and citizen scientists using the FlyWire proofreading platform. For more information, see the FlyWire homepage.
Exodiac is the Codex AI helper available from the About menu and from failed-search help links. It is given Codex FAQ content, sample queries, dataset metadata, supported search attributes/operators, and selected annotation values. It helps with Codex how-to questions and search-query construction. For query help it should return valid Codex syntax rather than SQL-style syntax.
Request to join with this invitation link or by emailing flywire@princeton.edu (please include your name and affiliation).