Open the teaching deck, worksheet, and editable slide source.
Interactive Lab
Practice in short loops: checkpoint quiz, microtask decision, and competency progress tracking.
Checkpoint Quiz
Microtask Decision
Choose the action that best improves scientific reliability.
Progress Tracker
State is saved locally in your browser for this module.
0% complete
Annotation Challenge
Click the hotspot with the strongest evidence for the requested feature.
Selected hotspot: none
Capability target
Build one connectome graph representation and justify two metric choices for a defined hypothesis.
Concept set
1) From EM to graph: a lossy transformation
A connectome graph is an abstraction. The path from EM images to a graph involves: raw images → segmentation → synapse detection → neuron-to-neuron edge list → graph. Each step loses information: the graph retains connectivity topology but discards spatial relationships, organelle details, and membrane geometry. This is a feature (graphs are computationally efficient and analytically tractable) and a limitation (the graph cannot answer questions that require spatial context).
Key decision: What are your nodes? What are your edges? Neurons as nodes and synapses as directed edges is the default, but alternatives exist — compartment-level nodes (axon vs dendrite of the same neuron), type-level nodes (aggregating neurons by class), and different edge weightings (binary, synapse count, cleft area).
2) The threshold problem
In real connectomes, many neuron pairs share only 1-2 synapses. Are these “real” connections or detection noise? The choice of minimum synapse threshold for defining an edge dramatically changes the graph:
Threshold = 1: maximum sensitivity, maximum noise
Threshold = 5: cleaner graph, but genuine weak connections lost
No threshold: use continuous weights
There is no universally correct threshold. Report results across multiple thresholds (sensitivity analysis) and justify your choice based on the analysis question.
3) Graph metrics and what they mean biologically
Degree (in/out): How many partners does this neuron have? Hub neurons have high degree.
Clustering coefficient: Are a neuron’s partners connected to each other? High clustering = dense local circuits.
Path length: How many synapses separate two neurons? Short paths = efficient information flow.
Reciprocity: Fraction of connections that are bidirectional. High reciprocity in cortex (4× enriched, Song et al. 2005).
Modularity: Can the graph be partitioned into densely connected subgroups? Modules may correspond to functional units or cell-type communities.
4) Null models and the interpretation trap
A graph metric is meaningless without a baseline. “Clustering coefficient = 0.15” tells you nothing until you compare to a random graph with the same degree distribution (where clustering might be 0.02 — making 0.15 highly significant). Every metric computation should include the corresponding null-model comparison.
Core workflow
Define node/edge schema: what are your nodes, what are your edges, what weighting scheme?
Construct graph from synapse table (e.g., using CAVEclient + NetworkX). Inspect: number of nodes, edges, density, connected components.
Compare each metric to null-model expectation (degree-preserving random graph as minimum).
Interpret metrics against hypothesis. Report which metrics are significant and which are not.
Document abstraction limits: what information was lost in the graph construction?
60-minute tutorial run-of-show
Pre-class preparation (10 min async)
Read the graph representations content library entry
Install NetworkX: pip install networkx
Minute-by-minute plan
**00:00-08:00
Graph abstraction choices**
Show the same circuit as: (a) 3D EM rendering, (b) adjacency matrix, (c) node-link diagram. “These are three views of the same biology. Today we work with (b) and (c).”
Discussion: “What did we gain and lose in each transformation?”
**08:00-20:00
Graph build demo**
Live coding: load a synapse table, construct a NetworkX DiGraph, apply threshold, print basic stats.
Visualize the graph with spring layout. Color nodes by cell type.
“Notice: the spatial layout in this diagram is arbitrary. The graph doesn’t know where neurons are in the brain.”
**20:00-34:00
Metric computation**
Hands-on: learners compute degree distribution, clustering coefficient, and average path length.
Plot degree distribution (log-log). Is it heavy-tailed?
Compute clustering and compare to a random graph (NetworkX: nx.watts_strogatz_graph for comparison).
**34:00-46:00
Interpretation and null concerns**
“Your clustering coefficient is 3× higher than the random graph. What does that mean biologically?”
Discuss: spatial proximity as a confound. Would a spatially constrained null model change the conclusion?
Walk through one example: reciprocal connections. Count in real data vs degree-preserving null.
**46:00-60:00
Competency check**
Each learner writes a 1-paragraph graph analysis summary:
Schema (nodes, edges, threshold)
Two metrics with values and null-model comparisons
One biological interpretation and one limitation
Exit ticket: “Name one reason a graph metric might be misleading in your dataset.”
Studio activity: graph analysis report (60-75 minutes)
Scenario: You have the connectivity graph of 500 neurons in a cortical column from the MICrONS dataset. Your PI asks: “Is this circuit small-world? Are there hub neurons? Are there communities?”
Task sequence:
Load the graph and compute basic statistics (nodes, edges, density, components).
Compute: degree distribution, clustering coefficient, average path length.
Compare to degree-preserving random graph and Watts-Strogatz small-world reference.
Identify candidate hub neurons (top 5% by degree or betweenness centrality).
Run community detection (Louvain or Leiden). Do detected communities align with cell types?
Write a 1-page graph analysis report with figures, metrics, null comparisons, and biological interpretation.
Expected outputs:
Graph statistics summary table.
Degree distribution plot (log-log scale).
Community detection results with cell-type comparison.
1-page report.
Assessment rubric
Minimum pass: Coherent graph model and metric rationale. Null comparison included.
Strong performance: Clear link between each metric and a biological question. Multiple null models tested. Community structure validated against external data.
Common failure to flag: Metric dumping without hypothesis alignment — computing every metric available without explaining what question each answers.