differential_abundance_flow_cytometry
diffcyt differential abundance over project FCS files and a sample sheet: every sample's events (optionally one gated population) clustered together by FlowSOM on asinh-transformed channels, counted per sample, and each cluster's abundance compared between two levels of a sample-sheet column by edgeR (negative binomial GLM, Cox-Reid common and shrunk tagwise dispersions, likelihood-ratio test, Benjamini-Hochberg), optionally adjusting for a second column; with state channels, also each cluster's median of each state channel compared between the levels by limma (diffcyt testDS_limma: medians weighted by event count, empirical Bayes, moderated t, Benjamini-Hochberg).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sample_sheet": "<sample_sheet>",
"condition": "<condition>"
},
"name": "differential_abundance_flow_cytometry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xdim | No | FlowSOM map width. | |
| ydim | No | FlowSOM map height. | |
| _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 or FlowJo .wsp in the project; empty for none. | |
| meta_k | No | the number of metaclusters. Only applies when meta_clustering is true. | |
| derived | No | as analyze_flow_cytometry. | |
| samples | No | the FCS files to compare, by name or id, comma-separated; empty for every FCS file in the project. | |
| _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. | |
| channels | No | the channels to cluster on (diffcyt's type markers), comma-separated PnN or PnS; empty for every fluorescence channel. | |
| compared | No | the level compared with the baseline; empty for the first other one. | |
| document | No | the FCS file in the project, by name or id. | |
| condition | Yes | the sample sheet's column whose two levels are compared. | |
| covariate | No | a second sample-sheet column the model adjusts for (donor, batch, time); empty for none. | |
| min_cells | No | a cluster is tested when at least min_samples samples hold this many of its events. | |
| normalize | No | TMM normalisation factors on the cluster counts. | |
| reference | No | the condition's baseline level; empty for the first in the sheet. | |
| population | No | a population of the strategy, gated in every file before clustering; empty for every event. | |
| min_samples | No | see min_cells; empty for half the samples. | |
| state_trend | No | testDS_limma's trend: the prior variance follows each row's average median (limma eBayes trend = TRUE). | |
| cluster_seed | No | R's set.seed before the map is trained (diffcyt seed_clustering). | |
| compensation | No | as analyze_flow_cytometry. | auto |
| covariate_as | No | the adjusting column as groups (a factor) or as a number. Values: factor (groups), number (a number). | factor |
| sample_sheet | Yes | a CSV in the project whose first column, headed sample, names each FCS file. | |
| state_channels | No | channels whose per-cluster medians are compared too (diffcyt's state markers, testDS_limma), comma-separated PnN or PnS, none of them clustered on; empty for none. | |
| meta_clustering | No | group the map nodes into metaclusters by ConsensusClusterPlus (otherwise every node is a cluster). | |
| cluster_cofactor | No | asinh(x / cofactor) before clustering: diffcyt's default 5 is the CyTOF one, 150 common for fluorescence. | |
| compensation_method | No | as analyze_flow_cytometry. | flowkit |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| counts | Yes | the cluster × sample event counts, the samples and the clustered channels | |
| clusters | Yes | per cluster: logFC, logCPM, LR, p and adjusted p (NaN, with the reason, where the filter left it out) | |
| dispersion | Yes | edgeR's common dispersion, the tested clusters' tagwise dispersions and the prior degrees of freedom | |
| differential_state | Yes | when state channels were given: per cluster and state marker, the median difference (asinh scale), average median, moderated t, p and adjusted p, and the prior df |