---
title: Cytometry inputs and parameters
description: >-
  File formats, marker panels, FlowSOM clustering parameters, and segmentation
  options for the cytometry tools.
tags:
  - cytometry
  - inputs
---

> **Retired tools**

> `flow_gate`, `flow_cluster` and `flow_differential` are retired and can no longer be run. For FCS clustering use `flowsom`, which runs real FlowSOM SOM + consensus metaclustering. There is no hosted tool for automated gating, PhenoGraph clustering or differential abundance; ask Ivy to run those in Python in the chat's [code workspace](/docs/sandbox), using `flowsom` for the cluster labels if you need them.

You provide single-cell cytometry data — FCS event files for flow and mass cytometry, or multi-channel TIFF/MCD acquisitions for imaging mass cytometry. The marker panel you include is what most shapes the result, since every cluster and spatial call is defined by the markers present.

> **Documented parameters go beyond the implemented tools**

> The IMC tables below describe the intended parameter surface. `imc_segment` and `imc_spatial` as currently registered accept only a file key and an optional panel CSV. The `flowsom` parameters are the ones in its tool schema.

## Cytometry inputs and parameters

## Common file formats

| Tool | Accepted Formats | Description |
|------|-----------------|-------------|
| `flowsom` | FCS | Flow/mass cytometry event data |
| `imc_segment` | Multi-channel TIFF, MCD | Imaging mass cytometry acquisitions |
| `imc_spatial` | CSV | Cell data with X/Y coordinates and type labels |

### FCS file requirements

- FCS 3.0 or 3.1 format
- Flow cytometry data should be compensated before upload
- CyTOF data does not require compensation
- Maximum file size: 500 MB per file
- Maximum events: 10 million per file

## FlowSOM parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `fcs_key` | string | Yes | -- | Key of the uploaded FCS file to cluster |
| `cols_to_use` | string[] | No | All channels | Channel or marker names to cluster on |
| `cols_indices` | integer[] | No | All channels | Channel indices to cluster on, as an alternative to `cols_to_use` |
| `xdim` | integer | No | `10` | SOM grid width (2-50). Larger gives finer-grained clusters |
| `ydim` | integer | No | `10` | SOM grid height (2-50) |
| `n_clusters` | integer | No | `10` | Number of consensus metaclusters (2-100) |
| `seed` | integer | No | `42` | Random seed for reproducibility |
| `generate_plot` | boolean | No | `true` | Render a star plot of the SOM grid |
| `max_events` | integer | No | -- | Subsample cap for very large files (at least 1000) |

## IMC Segment parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `image` | file | Yes | -- | Multi-channel TIFF or MCD file |
| `method` | string | No | `"cellpose"` | Segmentation method |
| `nuclear_markers` | string[] | Yes | -- | Channel names for nuclear signal |
| `membrane_markers` | string[] | No | -- | Channel names for membrane signal |
| `min_area` | integer | No | `50` | Minimum cell area in pixels |
| `max_area` | integer | No | `5000` | Maximum cell area in pixels |
| `pixel_size` | number | No | `1.0` | Pixel size in microns |
| `expand_radius` | integer | No | `3` | Pixels to expand from nucleus to estimate cell boundary |
| `normalize` | boolean | No | `true` | Percentile-normalize marker intensities |

### Segmentation methods

| Method | Code | Description | Speed | Accuracy |
|--------|------|-------------|-------|----------|
| Cellpose | `cellpose` | Deep learning, handles diverse morphologies | Moderate | High |
| DeepCell/Mesmer | `deepcell` | Optimized for tissue with nuclear + membrane | Moderate | High |
| Watershed | `watershed` | Classical marker-controlled watershed | Fast | Moderate |

## IMC Spatial parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `cell_data` | file | Yes | -- | CSV with cell coordinates, types, and marker intensities |
| `analysis_type` | string | No | `"neighborhood"` | Analysis type |
| `cell_type_column` | string | No | `"cell_type"` | Column containing cell type labels |
| `x_column` | string | No | `"x"` | Column containing X coordinates |
| `y_column` | string | No | `"y"` | Column containing Y coordinates |
| `radius` | number | No | `30` | Neighborhood radius in microns |
| `permutations` | integer | No | `1000` | Number of permutations for significance testing |
| `cell_types` | string[] | No | All types | Cell types to include in analysis |
| `min_cells` | integer | No | `10` | Minimum cells of a type to include in analysis |

### Analysis types

| Type | Code | Description |
|------|------|-------------|
| Neighborhood | `neighborhood` | Cell type enrichment/depletion within radius |
| Interaction | `interaction` | Pairwise cell-cell contact frequency |
| Spatial statistics | `spatial_stats` | Ripley's K/L, nearest-neighbor, Moran's I |
| Community | `community` | Recurring multi-cell neighborhood patterns |

## Read next
