analyze_flow_cytometry
A flow cytometry list-mode file (FCS 2.0, 3.0 or 3.1) from the project, end to end: read and linearize every event ($PnE anti-log, $PnG gain, $TIMESTEP), compensate it with the spillover matrix the file declares, apply a Gating-ML 2.0 gating strategy from the project, and report every population with its event count, percent of parent and percent of all events, the mean, median, SD and CV of every channel in every population, a binned two-channel density for a plot, and a density-valley threshold on any channel (flowDensity deGate).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analyze_flow_cytometry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| A | No | additional negative decades. Only applies when scale is logicle or hyperlog or flowcore-logicle or fasinh. | |
| M | No | decades of the full scale. Only applies when scale is logicle or hyperlog or flowcore-logicle or fasinh. | |
| T | No | top of scale; empty means the file's largest fluorescence $PnR. | |
| W | No | linear width in decades. Only applies when scale is logicle or hyperlog or flowcore-logicle. | |
| bins | No | bins per axis of the density. | |
| scale | No | the display scale of the fluorescence channels (scatter and time stay linear): used for the plot, the threshold and, with `stats_on: scaled`, the statistics. Values: logicle (Logicle (Gating-ML 2.0, Moore & Parks)), fasinh (ArcSinh (Gating-ML 2.0 fasinh)), arcsinh (ArcSinh with a cofactor (asinh(x / c), Cytobank and CyTOF)), hyperlog (Hyperlog (Gating-ML 2.0, Bagwell)), flowcore-logicle (Logicle on a 0–M axis (flowCore)), wsp-biex (Biex (FlowJo 10, channels 0–4096)), flin (Linear (Gating-ML flin)). | logicle |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| gating | No | a Gating-ML 2.0 document in the project, by name or id; empty for no gating (every statistic is then of all events). | |
| plot_x | No | channel (PnN or PnS) on the density plot's x axis; empty for no plot. | |
| plot_y | No | channel on the plot's y axis. | |
| derived | No | derived parameters, `name = expression` separated by `;` (FlowJo's vocabulary: channels by name or [name], + − * / % ^, abs ceil floor neg round max min pow exp ln log sqrt and the trig functions); each becomes a channel of the run. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| cofactor | No | the c in asinh(x / c): 5 is the CyTOF convention, 150 a common one for fluorescence. Only applies when scale is arcsinh. | |
| document | No | the FCS file, by name or id; may be left empty when the project holds exactly one. | |
| stats_on | No | statistics on linear compensated values (MFI) or on the display scale. Values: linear (linear values (MFI)), scaled (display scale). | linear |
| biex_width | No | FlowJo biex width basis (negative; FlowJo's default -10). Only applies when scale is wsp-biex. | |
| compensation | No | `auto`: the file's own $SPILLOVER/$SPILL when it has one, else none; `file`: that, refusing a file without one; `none`: leave the values as acquired. Values: auto (automatic), file (file's own matrix), none (none). | auto |
| biex_negative | No | FlowJo biex extra negative decades. Only applies when scale is wsp-biex. | |
| plot_population | No | the population plotted; empty for all events. | |
| threshold_channel | No | channel to find a density-valley threshold on (flowDensity deGate on the display scale); empty for none. | |
| compensation_method | No | which published algorithm: FlowKit's solve(Sᵀ, Xᵀ) or flowCore's X · S⁻¹. They agree to ~1e-15 of full scale. Values: flowkit (solve(Sᵀ, Xᵀ) (FlowKit)), flowcore (X · S⁻¹ (flowCore)). Only applies when compensation is auto or file. | flowkit |
| threshold_population | No | the population thresholded; empty for all events. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | version, event count, every channel with its role, range, gain and decades | |
| stats | Yes | per population and channel: count, mean, median, SD (n − 1), CV, min, max | |
| events | Yes | events in the file | |
| density | Yes | the two-channel density, events per bin, rows from the top of the plot | |
| threshold | Yes | every density-valley cut on the display scale and as scale values, and how many events lie at or above | |
| populations | Yes | every population: id, parent, event count, percent of parent and of all events | |
| compensation | Yes | the spillover matrix used, its detectors and the algorithm, or null when the file has none |