gate_droplets
Two-channel ddPCR droplet-amplitude exports to a template concentration, by CLASSIFYING the raw droplets rather than trusting a count the instrument already made.
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": {
"files": "<files>"
},
"name": "gate_droplets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | the droplet exports, as `<filename>` and its CSV body. QuantaSoft writes one `<name>_<well>_Amplitude.csv` per well with columns `Assay1 Amplitude, Assay2 Amplitude, Cluster`; the well id is read from the FILE NAME because the body does not carry it. Separate files with a line containing only `---`, and start each with `# <filename>`. | |
| x_var | No | name for the X channel, which is the file's SECOND amplitude column. Bio-Rad's Ch2 is usually HEX or VIC. | HEX |
| y_var | No | name for the Y channel, which is the file's FIRST amplitude column. Bio-Rad's Ch1 is usually FAM. | FAM |
| _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. | |
| _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. | |
| cutoff_sd | No | how many standard deviations above the LOWER mixture component's mean the empty cutoff sits. This is the knob that decides which droplets are empty, and therefore the concentration. | |
| cutoff_iqr | No | how many interquartile ranges above the third quartile of that slice a droplet must sit to be an outlier. | |
| random_seed | No | re-seeded before EVERY k-means and EVERY mixture fit, not once per run. Neither has a deterministic start, so this value IS part of the answer: a different seed lands the mixture on a different local optimum and moves the empty cutoff. Upstream's default is 8. | |
| top_percent | No | the top slice of droplets, pooled across the SUCCESSFUL wells, that the outlier cutoff is computed on. One cutoff per axis for the whole plate, not one per well. | |
| total_drops_t | No | fewer accepted droplets than this and the well is rejected before it is clustered at all. | |
| empty_lambda_low | No | smallest empty-droplet fraction a well may have. Below it the smaller k-means cluster is too small to be the empty population, which means the run did not separate. | |
| droplet_volume_ul | No | mean volume of ONE droplet, in µL. A per-platform constant: 0.85e-3 µL (0.85 nL) for the Bio-Rad QX200, which is what the QuantaSoft export comes from. | |
| empty_lambda_high | No | largest empty-droplet fraction a well may have. Above it almost every droplet is empty, so there is no positive population to quantify and a concentration would be an extrapolation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | how many wells were read | |
| wells | Yes | one row per well: droplet counts by cluster, the empty fraction, the per-well cutoffs, and the concentration in copies/uL — null for a rejected well, never a number | |
| params | Yes | every parameter the run used, including the ones left at their defaults: the seed and the two cutoff multipliers change the concentration, so a reading without them is not comparable | |
| rejected | Yes | how many wells were rejected by the quality check and so carry no concentration | |
| verdicts | Yes | why each well passed or was rejected, with the k-means the verdict was taken from: both cluster centres, their sizes, their distances to the origin and the gap between them | |
| outlierCutoff | Yes | the two plate-wide outlier cutoffs, echoed because they were computed from the successful wells only and so depend on which wells passed | |
| totalDroplets | Yes | every droplet read, across every well — the denominator the cluster counts account for |