How khanlab/spimquant works
SPIMquant is a Snakebids application for automated lightsheet-brain registration and atlas-based pathology quantification. A participant supplies a BIDS dataset and selects a run; the app hands execution to its Snakemake workflow, which produces subject-level measurements and QC. Group runs combine measurements with participant metadata for model-based contrasts and visualization. The tree lists workflow scripts but not the workflow definition, so internal stage wiring is necessarily summarized; the feature branches below reflect the README and script names, not inspected workflow rules.
Main entry points: workflow Snakemake workflow · run.py BIDS app · perform_group_stats.py Group statistics · create_stats_heatmap.py Stats visualizations
Components 19
App and orchestration
- BIDS app
spimquant/run.py - Snakemake workflow
spimquant/workflow
Image processing
- Segmentation
spimquant/workflow/scripts - Template registration
spimquant/workflow - Registration QC
spimquant/workflow/scripts/reg_qc_report.py - Image QC
spimquant/workflow/scripts
Quantification
- Object measurements
spimquant/workflow/scripts/compute_filtered_regionprops.py - Atlas mapping
spimquant/workflow/scripts/map_atlas_to_regionprops.py - Colocalization
spimquant/workflow/scripts/compute_colocalization.py - Vessel analysis
spimquant/workflow/scripts/skeleton_graph_from_sdt.py - Imaris crops
spimquant/workflow/scripts/create_imaris_crops.py
Analysis and outputs
- Subject statistics
spimquant/workflow/scripts/merge_into_segstats_tsv.py - Group statistics
spimquant/workflow/scripts/perform_group_stats.py - Stats visualizations
spimquant/workflow/scripts/create_stats_heatmap.py
Other components
- Researcher
- BIDS dataset
- Cloud storage
- Coiled compute
- Analysis outputs
Connections 19
- Researcher → BIDS app: starts run
- BIDS dataset → BIDS app: provides dataset
- BIDS app → Snakemake workflow: hands off
- Snakemake workflow → Segmentation: dispatches
- Snakemake workflow → Template registration: dispatches
- Snakemake workflow → Registration QC: dispatches
- Snakemake workflow → Image QC: dispatches
- Snakemake workflow → Object measurements: dispatches
- Snakemake workflow → Atlas mapping: dispatches
- Snakemake workflow → Colocalization: dispatches
- Snakemake workflow → Vessel analysis: dispatches
- Snakemake workflow → Imaris crops: dispatches
- Snakemake workflow → Subject statistics: dispatches
- Snakemake workflow → Group statistics: dispatches
- Snakemake workflow → Stats visualizations: dispatches
- Group statistics → Stats visualizations: results feed
- Snakemake workflow → Analysis outputs: writes
- Cloud storage → Snakemake workflow: supplies data
- Snakemake workflow → Coiled compute: offloads processing