Skip to slides

NEUROTRAILBLAZERS · TEACHING MATERIALS

Data Cleaning and Preprocessing

Reading version. Text reflows with your screen and zoom. Figures retain their available captions. Expand teaching notes for additional context and, where supplied, visual descriptions.

Contents · 31 slides
  1. 1. Data Cleaning and Preprocessing
  2. 2. Learning Objectives
  3. 3. Capability Target
  4. 4. Concept Focus
  5. 5. Concept Focus (continued)
  6. 6. Concept Focus (continued)
  7. 7. Concept Focus (continued)
  8. 8. Core Workflow
  9. 9. Core Workflow (continued)
  10. 10. Core Workflow (continued)
  11. 11. Core Workflow (continued)
  12. 12. Core Workflow (continued)
  13. 13. Core Workflow (continued)
  14. 14. Core Workflow (continued)
  15. 15. Core Workflow (continued)
  16. 16. Core Workflow (continued)
  17. 17. Run of Show (60 min)
  18. 18. Run of Show (60 min) (continued)
  19. 19. Misconceptions to Watch
  20. 20. Misconceptions to Watch (continued)
  21. 21. Misconceptions to Watch (continued)
  22. 22. Studio Activity
  23. 23. Activity Output Checklist
  24. 24. Assessment Rubric
  25. 25. Assessment Rubric
  26. 26. Assessment Rubric
  27. 27. Exit Ticket
  28. 28. Exit Ticket (continued)
  29. 29. References (Instructor)
  30. 30. Teaching Materials
  31. 31. Read, review, or teach

Slide 1 of 31

H01 electron microscopy with object segmentation and original 2 µm scale bar Nanoscale · Module 18

Data Cleaning and Preprocessing

Teaching Deck

Human cortex · H01
Object segmentation over electron microscopy

H01 release · Lichtman Lab / Harvard & Connectomics at Google · CC BY 4.0
Shapson-Coe et al. (2024) · doi:10.1126/science.adk4858

Slide 2 of 31

Learning Objectives

Slide 3 of 31

Capability Target

Produce a reproducible preprocessing release that transforms raw or intermediate connectomics outputs into analysis-ready data, with explicit quality gates and full provenance. Students will be able to identify the specific cleaning operations that shape biological conclusions, justify every threshold decision, and document their preprocessing pipeline so that another researcher can audit and reproduce it.

Slide 4 of 31

Concept Focus

1) Data cleaning in connectomics: what needs fixing and why

Slide 5 of 31

Concept Focus (continued)

Figure description and teaching notes

Further teaching detail from the module:
**Segment size thresholding:** automated segmentation produces many small fragments --- bits of neuropil, partial dendrites, glia misclassified as neurons. Including these in analysis adds noise. Common practice is to exclude segments below a volume or synapse count threshold (e.g., segments with fewer than 2 synapses as pre- or post-synaptic partner).

Slide 6 of 31

Concept Focus (continued)

Figure description and teaching notes

Further teaching detail from the module:
**Handling neurons at volume boundaries:** neurons whose arbors are truncated by the edge of the imaged volume have artificially low synapse counts and incomplete morphologies. These boundary neurons can be flagged (e.g., by checking whether the segment mesh intersects the volume bounding box) and either excluded or analyzed with explicit caveats.

Slide 7 of 31

Concept Focus (continued)

Figure description and teaching notes

Further teaching detail from the module:
**Plain language:** connectomics data is not "clean" when you receive it. Segmentation makes mistakes, synapse detection has false alarms, and the edges of the volume cut through neurons. You must fix these issues before analysis, but every fix is a decision that affects your results.

Slide 8 of 31

Core Workflow

Slide 9 of 31

Core Workflow (continued)

Slide 10 of 31

Core Workflow (continued)

Slide 11 of 31

Core Workflow (continued)

Slide 12 of 31

Core Workflow (continued)

Slide 13 of 31

Core Workflow (continued)

Slide 14 of 31

Core Workflow (continued)

Slide 15 of 31

Core Workflow (continued)

Slide 16 of 31

Core Workflow (continued)

Slide 17 of 31

Run of Show (60 min)

Figure description and teaching notes

Materials
One noisy connectomics table (synapse table with low-confidence entries, duplicate IDs, and missing cell-type labels).
Segment table with size distribution spanning 5 orders of magnitude.
Shared preprocessing decision sheet (printed or digital template).
QC dashboard template (pre/post metric comparison).
Timing and instructor script

00:00-08:00 | Setup and target framing
Instructor presents the scenario: "You have received a connectomics export. Before you can analyze it, you must clean it. But every cleaning decision changes your results. Today we learn to clean responsibly." Display the raw data summary statistics. Define the release objective: an analysis-ready synapse table and neuron table with documented provenance. Define non-negotiable quality gates: no duplicate IDs, no unresolved foreign keys, all thresholds documented.

08:00-18:00 | Instructor modeling: ingest and anomaly screening
Live demonstration: load the synapse table, compute the confidence score distribution, identify the bimodal peak (true synapses vs false positives). Show the segment size distribution on a log scale, point out the debris tail. Check for orphan IDs. Key script line: "Before you touch the data, understand its shape. The distribution plot is your first diagnostic tool."

18:00-32:00 | Team preprocessing design
Teams of 3-4 draft cleaning rules for each identified issue. Each team must produce a preprocessing decision table with columns: issue, proposed action, threshold, rationale, estimated impact. Instructor circulates, challenging threshold choices: "Why 50 and not 40? What do you lose at 50 that you keep at 40?"

32:00-44:00 | QC pass
Teams compute (or estimate from the provided distributions) pre/post metrics: total synapse count, total segment count, mean synapses per neuron, fraction of each cell type remaining. Teams make a release/no-release decision based on their quality gates. Instructor asks: "Did cleaning change the relative representation of cell types? If it did, that is a bias you must report."

44:00-54:00 | Cross-team review
Teams swap preprocessing decision tables and QC reports. Each team audits the other's transform log for: missing rationale, unjustified thresholds, potential biological signal loss, and reproducibility gaps. Teams write two specific improvement suggestions.

54:00-60:00 | Competency checkpoint
Each team submits one release note with: dataset version, all thresholds and parameters, QC metrics with pass/fail, and at least one documented residual risk. Instructor reviews one example live.
Success criteria for this session
Cleaning decisions are deterministic, justified, and documented in real time.
QC thresholds are tied to operational actions (not just reported).
Release note exposes at least one unresolved interpretation risk.

Slide 18 of 31

Run of Show (60 min) (continued)

Slide 19 of 31

Misconceptions to Watch

Slide 20 of 31

Misconceptions to Watch (continued)

Slide 21 of 31

Misconceptions to Watch (continued)

Slide 22 of 31

Studio Activity

Scenario: Your team receives a connectomics export from MICrONS minnie65 (CAVE materialization v795) containing: a synapse table (4.2 million rows) with confidence scores, a segment table (120,000 segments) with volumes, and a cell-type annotation table (8,400 classified neurons). Initial inspection reveals: 12% of synapses have confidence scores below 30, 35,000 segments have fewer than 2 synapses, 847 segments intersect the volume bounding box, and 23 segment IDs appear in the synapse table but not in the segment table.

Slide 23 of 31

Activity Output Checklist

Slide 24 of 31

Assessment Rubric

Minimum pass

Slide 25 of 31

Assessment Rubric

Strong performance

Slide 26 of 31

Assessment Rubric

Common failure modes

Slide 27 of 31

Exit Ticket

Take one connectomics table (real or mock) and write:

  1. Three cleaning rules with rationale tied to specific data artifacts.
  2. Two QC thresholds with associated pass/fail actions and biological justification.
  3. One sensitivity analysis: what happens to your key metric if you relax or tighten your primary threshold by 20%?

Slide 28 of 31

Exit Ticket (continued)

  1. One limitation that remains after preprocessing, stated concretely enough to guide interpretation.

Slide 29 of 31

References (Instructor)

Slide 30 of 31

Teaching Materials

Slide 31 of 31

Read, review, or teach

Read these slides as a page

Open the complete lesson

The reading version includes figure descriptions and discussion guidance.

Nanoscale text: CC BY 4.0. Scientific figures retain their individual credits.