Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Running your first pipeline

Building your configuration

The pipeline is configure using YAML files. For now, the basic assumption is that your images follow this specific naming scheme : TimeX_PointY_(...).tiff where Time refers to the index in your time loop and Point is the number that we will use as the unique identifier for the position (individual worm if each position contains one worm). All images (planes, channels, etc.) for a given position at a given time should be stored in the same OME-TIFF file.

The pipeline works using atomic building blocks, head to the Building Block section to learn more about them.

After installing the pipeline you will find an example of a working pipeline for measuring organ and body size over development. Let’s break it down!

experiment_dir: "/mnt/towbin.data/shared/spsalmon/pipeline_test_folder/"
analysis_dir_name: "analysis"
raw_dir_name: "raw"
report_format: "parquet"
pixelsize: [ 0.65 ]

If you have different imaging modalities during your timelapse (let’s say you acquire a picture of each worm every 10 minutes but also take a Z-stack every hour), you should split them in different raw directories (e.g. raw and raw_stack). You can then run a pipeline for each of those directories and merge them at the end simply by joining the two dataframes.

get_experiment_time: True

building_blocks:
  - "segmentation"
  - "segmentation"
  - "straightening"
  - "straightening"
  - "straightening"
  - "straightening"
  - "morphology_computation"
  - "morphology_computation"
  - "fluorescence_quantification"
  - "quality_control"
  - "quality_control"
  - "molt_detection"

rerun_segmentation: [ False ]
rerun_straightening: [ False ]
rerun_morphology_computation: [ False ]
rerun_quality_control: [ False ]
rerun_molt_detection: [ False ]
sbatch_memory: 64G
sbatch_time: 0-48:00:00
sbatch_cpus: 32
sbatch_gpus: "rtx6000:1"

Those options control the amount of RAM, CPU cores, and GPU allocated to each building block, as well as their time limit. GPUs will only get allocated to jobs that can make use of them (segmentation, molt detection, or custom script requiring GPU).

After that, you should fill add the parameters for all of your building blocks. Those are described in detail here.

Running the pipeline

Once your configuration is finished, you can save it anywhere. Let’s assume you saved it in ~/towbintools_pipeline/configs/my_configuration.yaml. I recommend picking a folder where you will centralize all your configuration. The configuration you run on an experiment will always be backed up in the analysis/report folder of said experiment. To run this specific configuration :

cd ~/towbintools_pipeline # or wherever you chose to put the pipeline folder
bash run_pipeline.sh -c configs/my_configuration.yaml

The -c argument is used to specify the path to the configuration to be run.

That’s it ! Once you’re happy with your config, all you need to do to fully analyze a new experiment is to change the experiment path in the config file and run this command.