Skip to content

Tutorials

Welcome to the sleap-roots tutorials! These interactive Jupyter notebooks provide hands-on walkthroughs of analyzing plant root systems with different pipeline types.

Overview

Each tutorial demonstrates a complete analysis workflow from loading SLEAP predictions to computing and exporting morphological traits. The notebooks include:

  • Step-by-step code examples
  • Visualization of intermediate results
  • Trait computation and interpretation
  • Export to CSV for downstream analysis

Available Tutorials

Primary Pipelines

  • 🌱 Dicot Pipeline


    Analyze dicot root systems with primary and lateral roots (soy, canola, arabidopsis).

    Tutorial

  • 🌾 Younger Monocot Pipeline


    Process early-stage monocots with primary and crown roots (rice, maize).

    Tutorial

  • 🌽 Older Monocot Pipeline


    Analyze mature monocots with crown roots only (rice, maize).

    Tutorial

Multi-Plant Pipelines

  • 🪴 Multiple Dicot Pipeline


    Batch process multiple dicot plants in a single image.

    Tutorial

  • 🌿 Multiple Primary Root Pipeline


    Analyze multiple plants with primary roots.

    Tutorial

Specialized Pipelines

  • 🌳 Primary Root Pipeline


    Focus on primary root traits only.

    Tutorial

  • 🍂 Lateral Root Pipeline


    Specialized analysis for lateral root systems.

    Tutorial

How to Use These Tutorials

Option 1: View Online

All tutorials are rendered directly in the documentation. You can read through them and copy code snippets as needed.

Option 2: Run Interactively

To run the notebooks yourself:

  1. Clone the sleap-roots repository:

    git clone https://github.com/talmolab/sleap-roots.git
    cd sleap-roots
    

  2. Install with dev dependencies:

    pip install -e ".[dev]"
    

  3. Launch Jupyter:

    jupyter notebook notebooks/
    

  4. Open any tutorial notebook and run the cells.

Data Requirements

The tutorials use example data included in the repository's test fixtures. To use your own data:

  • Replace file paths with your SLEAP prediction files (.h5, .slp)
  • Ensure your SLEAP models match the expected node structure for each pipeline
  • See Data Formats for details

Troubleshooting

Notebook won't run: - Ensure you've installed sleap-roots: pip install sleap-roots - Check that Git LFS data is downloaded: git lfs pull

Missing data files: - The example data is stored with Git LFS - Run git lfs install && git lfs pull to download

Trait values look wrong: - Verify your SLEAP predictions use the correct skeleton structure - Check pixel-to-mm conversion if needed (see Trait Reference)

Next Steps

After completing a tutorial: