Getting Started with Cells2Stats for Cytoprofiling
Cells2Stats processes AVITI24™ System cytoprofiling data to generate detailed statistics and outputs that enable downstream analysis, including visualization using CytoCanvas™. ElemBio Cloud™ offers a Cells2Stats verified flow that executes in ElemBio Catalyst™. Cells2Stats is also available as an executable through a docker container or static binary.
This tutorial uses simulated data to demonstrate how to manually set up and execute Cells2Stats in a Linux or Windows environment, and covers the following topics:
- The structure of a Cells2Stats execution command
- How to execute Cells2Stats for your OS and distribution method
- The creation of visualization files for CytoCanvas
Before You Begin
Make sure that you complete the following necessary prerequisites for this tutorial:
Install Docker or the static binary.
- The static binary is only compatible with Linux OS.
- When you install Docker for Windows OS, review the system requirements. Element Biosciences™ recommends that you enable the WSL 2 backend feature.
Install tree, a Command Line Interface (CLI) tool that maps folder directories.
- Windows OS includes tree by default.
- For Debian-based Linux OS, use the following command to install tree:
apt-get install tree
Set Up Docker
If you are not using Docker for this tutorial, continue to Create a Directory. If you use Docker for this tutorial, complete the following setup steps:
Make sure that Docker for Desktop is running on your system.
Open a CLI terminal.
In the CLI terminal, run the following command to pull the latest Cells2Stats image from the Element public registry that is hosted on DockerHub.
The CLI displays the current Cells2Stats version.
docker run elembio/cells2stats cells2stats --version
Create a Directory
Create a
cells2stats-setupfolder for this tutorial:mkdir cells2stats-setupTo prepare for downloading the simulated data, make the
cells2stats-setupfolder the working directory in the CLI:cd ./cells2stats-setup
Download the Simulated Data
Download and extract the simulated output data for a Teton™ MAPK cell cycle run.
An Amazon S3 cloud storage bucket hosts the data. The data uses the standard format and structure for output files from an AVITI24 System.
curl https://element-share-data.s3.us-west-2.amazonaws.com/cells2stats-share/20250813_cells2stats_demo-teton-sim-run.tar.gz -o 20250813_cells2stats_demo-teton-sim-run.zipExtract the simulated data from the following zip file:
tar -xvf 20250813_cells2stats_demo-teton-sim-run.zipUse
treeto visualize the files in a tree format and confirm successful extraction of the data:tree 20250813_cells2stats_demo-teton-sim-run
Execution Command Overview
Select one of the following tabs based on your OS and Cells2Stats distribution:
- Docker for Windows OS
- Docker for Linux OS
- Static Binary for Linux OS
When you execute with Docker, the Cells2Stats execution commands in this tutorial include the following components:
docker runinvokes the Docker daemon.elembio/cells2statsidentifies the image that you want to pull.cells2statsinvokes the Cells2Stats software inside the Docker image.
The commands end with the input locations for the execution.
When you use Docker to run Cells2Stats, you must mount your test directory to the Docker container. The commands in this tutorial use a bind mount (-v) to mount the current working directory (pwd) to the container with a Docker volume. The commands bind the current working directory to the variable /data to make the input and output locations for the execution accessible to the Docker container.
Adding --rm to the command removes the image after the execution completes. Element recommends using this argument to keep your system clean.
Windows includes both the Windows Command Prompt and Powershell command line interfaces that each use different commands. In Powershell, the current directory is referenced using ${PWD}. In Command Prompt, the current directory is referenced using %cd% and may require additional handling such as enclosing paths in double quotes to handle any spaces in the path.
Commands in this tutorial use the Powershell interface for Windows commands.
When you execute with Docker, the Cells2Stats execution commands in this tutorial include the following components:
docker runinvokes the Docker daemon.elembio/cells2statsidentifies the image that you want to pull.cells2statsinvokes the Cells2Stats software inside the Docker image.
The commands end with the input and output locations for the execution.
When you use Docker to run Cells2Stats, mount your test directory to the Docker container. The commands in this tutorial use a bind mount (-v) to mount the current working directory (pwd) to the container with a Docker volume to do so. The commands bind the current working directory to the variable /data to make the input and output locations for the execution accessible to the Docker container.
Adding --rm to the command removes the image after the execution completes. Element recommends using this argument to keep your system clean.
For the static binary, the Cells2Stats execution commands in this tutorial use ./cells2stats to invoke the executable. This command states the input directory for the execution. The basic structure of the command is as follows:
./cells2stats <input-directory>
Execute Cells2Stats
- Docker for Windows OS
- Docker for Linux OS
- Static Binary for Linux OS
Execute Cells2Stats with the following command, which uses
${pwd}:/datato mount the current working directory to the Docker container:docker run --rm -v ${pwd}:/data elembio/cells2stats cells2stats /data/20250813_cells2stats_demo-teton-sim-runWait until the execution completes. The execution is complete when the CLI displays similar to the following log lines:
20250902T191241Zis an example timestamp in the following command. Your execution will display a different timestamp.timestamp [info]: Analysis completed successfully.
timestamp [info]: Output written to /data/20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/<20250902T191241Z>Use
treeto visualize the execution output. The command/fdisplays the names of files in the folders. Replacetimestampwith the timestamp of your execution.tree ./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp /fReview the
treedirectory to make sure that all output files are present:The following is an example of how the CLI lists the files:
./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp
│ AverageNormWellStats.csv
│ multiqc_report.html
│ Panel.json
│ RawCellStats.csv
│ RawCellStats.parquet
│ RunManifest.csv
│ RunManifest.json
│ RunParameters.json
│ RunStats.json
│ Versions.json
│
├───CellSegmentation
│ ├───WellA1
│ │ L2R02C03S1_Cell.tif
│ │ L2R02C03S1_Nuclear.tif
│ │
│ └───WellA2
│ L1R02C02S1_Cell.tif
│ L1R02C02S1_Nuclear.tif
│
├───Logs
│ Cells2Stats.log
│ MultiQCWrapper.log
│
├───multiqc_data
│ barcoding_bar_Assigned_Reads.txt
│ barcoding_bar_Mismatches.txt
│ batch_metrics.txt
│ batch_metrics_table.txt
│ BETA-multiqc.parquet
│ cell_assignment_bar_Batch_Counts.txt
│ cell_assignment_bar_Batch_Density.txt
│ cell_assignment_bar_Extracellular_Ratio.txt
│ cell_assignment_bar_Total_Counts.txt
│ cell_assignment_bar_Total_Density.txt
│ cell_segmentation_bar_Cell_Count.txt
│ cell_segmentation_bar_Cell_Diameter.txt
│ cell_segmentation_bar_Confluency.txt
│ cell_segmentation_bar_Nucleated_Cells.txt
│ controls_bar_Negative_Control_1.txt
│ controls_bar_Negative_Control_2.txt
│ controls_bar_Negative_Control_3.txt
│ controls_bar_Negative_Control_4.txt
│ controls_bar_Positive_Control_1.txt
│ multiqc.log
│ multiqc_citations.txt
│ multiqc_data.json
│ multiqc_software_versions.txt
│ multiqc_sources.txt
│ well_assignment_plot.txt
│ well_barcoding_plot.txt
│ well_control_plot.txt
│ well_metrics.txt
│ well_metrics_table.txt
│ well_segmentation_plot.txt
│
└───Wells
├───WellA1
│ ├───B01
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B02
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B03
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B04
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B05
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B06
│ │ L2R02C03S1_barcodes.parquet
│ │
│ └───B07
│ L2R02C03S1_barcodes.parquet
│
└───WellA2
├───B01
│ L1R02C02S1_barcodes.parquet
│
├───B02
│ L1R02C02S1_barcodes.parquet
│
├───B03
│ L1R02C02S1_barcodes.parquet
│
├───B04
│ L1R02C02S1_barcodes.parquet
│
├───B05
│ L1R02C02S1_barcodes.parquet
│
├───B06
│ L1R02C02S1_barcodes.parquet
│
└───B07
L1R02C02S1_barcodes.parquetAccess files in the output.
- Access
Logs/Cells2Stats.logto view logs and check if any errors occurred. - Open
multiqc_report.htmlto view the MultiQC report.
- Access
Execute Cells2Stats with the following command, which uses
$(pwd):"/data"to mount the current working directory to the Docker container:docker run --rm -v $(pwd):"/data" elembio/cells2stats cells2stats /data/20250813_cells2stats_demo-teton-sim-runWait until the execution completes. The execution is complete when the CLI displays similar to the following log lines:
20250902T191241Zis an example timestamp in the following command. Your execution will display a different timestamp.timestamp [info]: Analysis completed successfully.
timestamp [info]: Output written to /data/20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/<20250902T191241Z>Use
treeto visualize the execution output. Replacetimestampwith the timestamp of your execution.tree ./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestampReview the
treedirectory to make sure that all output files are present:The following is an example of how the CLI lists the files:
./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp
│ AverageNormWellStats.csv
│ multiqc_report.html
│ Panel.json
│ RawCellStats.csv
│ RawCellStats.parquet
│ RunManifest.csv
│ RunManifest.json
│ RunParameters.json
│ RunStats.json
│ Versions.json
│
├───CellSegmentation
│ ├───WellA1
│ │ L2R02C03S1_Cell.tif
│ │ L2R02C03S1_Nuclear.tif
│ │
│ └───WellA2
│ L1R02C02S1_Cell.tif
│ L1R02C02S1_Nuclear.tif
│
├───Logs
│ Cells2Stats.log
│ MultiQCWrapper.log
│
├───multiqc_data
│ barcoding_bar_Assigned_Reads.txt
│ barcoding_bar_Mismatches.txt
│ batch_metrics.txt
│ batch_metrics_table.txt
│ BETA-multiqc.parquet
│ cell_assignment_bar_Batch_Counts.txt
│ cell_assignment_bar_Batch_Density.txt
│ cell_assignment_bar_Extracellular_Ratio.txt
│ cell_assignment_bar_Total_Counts.txt
│ cell_assignment_bar_Total_Density.txt
│ cell_segmentation_bar_Cell_Count.txt
│ cell_segmentation_bar_Cell_Diameter.txt
│ cell_segmentation_bar_Confluency.txt
│ cell_segmentation_bar_Nucleated_Cells.txt
│ controls_bar_Negative_Control_1.txt
│ controls_bar_Negative_Control_2.txt
│ controls_bar_Negative_Control_3.txt
│ controls_bar_Negative_Control_4.txt
│ controls_bar_Positive_Control_1.txt
│ multiqc.log
│ multiqc_citations.txt
│ multiqc_data.json
│ multiqc_software_versions.txt
│ multiqc_sources.txt
│ well_assignment_plot.txt
│ well_barcoding_plot.txt
│ well_control_plot.txt
│ well_metrics.txt
│ well_metrics_table.txt
│ well_segmentation_plot.txt
│
└───Wells
├───WellA1
│ ├───B01
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B02
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B03
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B04
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B05
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B06
│ │ L2R02C03S1_barcodes.parquet
│ │
│ └───B07
│ L2R02C03S1_barcodes.parquet
└───WellA2
├───B01
│ L1R02C02S1_barcodes.parquet
│
├───B02
│ L1R02C02S1_barcodes.parquet
│
├───B03
│ L1R02C02S1_barcodes.parquet
│
├───B04
│ L1R02C02S1_barcodes.parquet
│
├───B05
│ L1R02C02S1_barcodes.parquet
│
├───B06
│ L1R02C02S1_barcodes.parquet
│
└───B07
L1R02C02S1_barcodes.parquetAccess files in the output.
- Access
Logs/Cells2Stats.logto view logs and check if any errors occurred. - Open
multiqc_report.htmlto view the MultiQC report.
- Access
Make sure that you are at the home directory in the CLI, where the static binary executable is installed. If you are still in the
cells2stats-setupfolder, use the commandcd ..to move to the home directory.Execute Cells2Stats with the following command:
./cells2stats cells2tats-setup/20250813_cells2stats_demo-teton-sim-runWait until the execution completes. The execution is complete when the CLI displays similar to the following log lines:
20250902T191241Zis an example timestamp in the following command. Your execution will display a different timestamp.timestamp [info]: Analysis completed successfully.
timestamp [info]: Output written to /data/20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/<20250902T191241Z>Use
treeto visualize the execution output. Replacetimestampwith the timestamp of your execution.tree ./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestampReview the
treedirectory to make sure that all output files are present:The following is an example of how the CLI lists the files:
./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp
│ AverageNormWellStats.csv
│ multiqc_report.html
│ Panel.json
│ RawCellStats.csv
│ RawCellStats.parquet
│ RunManifest.csv
│ RunManifest.json
│ RunParameters.json
│ RunStats.json
│ Versions.json
│
├───CellSegmentation
│ ├───WellA1
│ │ L2R02C03S1_Cell.tif
│ │ L2R02C03S1_Nuclear.tif
│ │
│ └───WellA2
│ L1R02C02S1_Cell.tif
│ L1R02C02S1_Nuclear.tif
│
├───Logs
│ Cells2Stats.log
│ MultiQCWrapper.log
│
├───multiqc_data
│ barcoding_bar_Assigned_Reads.txt
│ barcoding_bar_Mismatches.txt
│ batch_metrics.txt
│ batch_metrics_table.txt
│ BETA-multiqc.parquet
│ cell_assignment_bar_Batch_Counts.txt
│ cell_assignment_bar_Batch_Density.txt
│ cell_assignment_bar_Extracellular_Ratio.txt
│ cell_assignment_bar_Total_Counts.txt
│ cell_assignment_bar_Total_Density.txt
│ cell_segmentation_bar_Cell_Count.txt
│ cell_segmentation_bar_Cell_Diameter.txt
│ cell_segmentation_bar_Confluency.txt
│ cell_segmentation_bar_Nucleated_Cells.txt
│ controls_bar_Negative_Control_1.txt
│ controls_bar_Negative_Control_2.txt
│ controls_bar_Negative_Control_3.txt
│ controls_bar_Negative_Control_4.txt
│ controls_bar_Positive_Control_1.txt
│ multiqc.log
│ multiqc_citations.txt
│ multiqc_data.json
│ multiqc_software_versions.txt
│ multiqc_sources.txt
│ well_assignment_plot.txt
│ well_barcoding_plot.txt
│ well_control_plot.txt
│ well_metrics.txt
│ well_metrics_table.txt
│ well_segmentation_plot.txt
│
└───Wells
├───WellA1
│ ├───B01
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B02
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B03
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B04
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B05
│ │ L2R02C03S1_barcodes.parquet
│ │
│ ├───B06
│ │ L2R02C03S1_barcodes.parquet
│ │
│ └───B07
│ L2R02C03S1_barcodes.parquet
│
└───WellA2
├───B01
│ L1R02C02S1_barcodes.parquet
│
├───B02
│ L1R02C02S1_barcodes.parquet
│
├───B03
│ L1R02C02S1_barcodes.parquet
│
├───B04
│ L1R02C02S1_barcodes.parquet
│
├───B05
│ L1R02C02S1_barcodes.parquet
│
├───B06
│ L1R02C02S1_barcodes.parquet
│
└───B07
L1R02C02S1_barcodes.parquetAccess files in the output.
- Access
Logs/Cells2Stats.logto view logs and check if any errors occurred. - Open
multiqc_report.htmlto view the MultiQC report.
- Access
Troubleshooting
- Docker for Windows OS
- Docker for Linux OS
- Static Binary for Linux OS
If you receive an error message that states the input files do not exist, make sure that the input files are available to the Docker container through the mounted file system.
Run the Docker container in interactive mode and attempt to list the files in the mounted file system:
docker run --rm -i -v ${pwd}:/data elembio/cells2stats ls /data/20250813_cells2stats_demo-teton-sim-runReview the returned list of files. If the input folder for the command is correct, the CLI lists the following files:
BaseCalling
CellSegmentation
Cytoprofiling
Panel.json
Projection
RunManifest.csv
RunManifest.json
RunParameters.jsonIf the CLI does not list the expected files, complete the following troubleshooting steps:
- Make sure that you are at the home directory in the CLI, where the static binary executable is installed.
- Make sure that the input data is present in your current working directory.
If you receive an error message that states the input files do not exist, make sure that the input files are available to the Docker container through the mounted file system.
Run the Docker container in interactive mode and attempt to list the files in the mounted file system:
docker run --rm -i -v $(pwd):"/data" elembio/cells2stats ls /data/20250813_cells2stats_demo-teton-sim-runReview the returned list of files. If the input folder for the command is correct, the CLI lists the following files:
BaseCalling
CellSegmentation
Cytoprofiling
Panel.json
Projection
RunManifest.csv
RunManifest.json
RunParameters.jsonIf the CLI does not list the expected files, complete the following troubleshooting steps:
- Make sure that you are at the home directory in the CLI, where the static binary executable is installed.
- Make sure that the input data is present in your current working directory.
If you receive an error message that states the input files do not exist, make sure that the input files are available in the input folder.
Attempt to list the files in the input directory:
ls cells2stats-setup/20250813_cells2stats_demo-teton-sim-runReview the returned list of files. If the input folder for the command is correct, the CLI lists the following files:
BaseCalling
CellSegmentation
Cytoprofiling
Panel.json
Projection
RunManifest.csv
RunManifest.json
RunParameters.jsonIf the CLI does not list the expected files, complete the following troubleshooting steps:
- Make sure that you are at the home directory in the CLI, where the static binary executable is installed.
- Make sure that the input data is present in your current working directory.
Visualization Files for CytoCanvas
AVITI24 output files require preprocessing by Cells2Stats to be used with CytoCanvas. Preprocessing includes tiling images and building a visualization manifest. To generate visualization files when you run Cells2Stats, use one of the following methods:
- Use the
--visualizationargument to regenerate all cells statistics and generate visualization files. - Use the
--visualization-onlyargument to generate only the visualization files.
The following instructions demonstrate how to generate visualization using simulated data:
- Docker for Windows OS
- Docker for Linux OS
- Static Binary for Linux OS
Append the following
--visualizationor--visualization-onlyoptional argument to the end of your execution command and reexecute the command. The following example command uses--visualization-only:docker run --rm -v ${pwd}:/data elembio/cells2stats cells2stats /data/20250813_cells2stats_demo-teton-sim-run --visualization-onlyWhen the execution completes, the visualization files are available at
./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp/visualization.(Optional) Install CytoCanvas and visualize the data.
Append the following
--visualizationor--visualization-onlyoptional argument to the end of your execution command and reexecute the command. The following example command uses--visualization-only:docker run --rm -v $(pwd):"/data" elembio/cells2stats cells2stats /data/20250813_cells2stats_demo-teton-sim-run --visualization-onlyWhen the execution completes, the visualization files are available at
./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp/visualization.(Optional) Install CytoCanvas and visualize the data.
Append the following
--visualizationor--visualization-onlyoptional argument to the end of your execution command and reexecute the command. The following example command uses--visualization-only:./cells2stats cells2tats-setup/20250813_cells2stats_demo-teton-sim-run --visualization-onlyWhen the execution completes, the visualization files are available at
./20250813_cells2stats_demo-teton-sim-run/Cytoprofiling/timestamp/visualization.(Optional) Install CytoCanvas and visualize the data.
Additional Resources
For more information related to the topics in this tutorial, see the following resources: