relative_expression
Relative gene expression from a Ct table, by all THREE models the Analyze panel offers: delta-delta-Ct (normalised to a reference gene AND calibrated to a reference group), delta-Ct (calibrated to a reference group only), and the two-step standard-curve model, which fits each gene's own dilution series and converts Ct to amount before taking the ratio.
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": {
"ct_table": "<ct_table>",
"groups": "<groups>",
"reference_group": "<reference_group>"
},
"name": "relative_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tube | No | `separate_tube`: target and reference amplified in different wells, errors independent. `same_tube`: multiplexed in one well, subtracted per well before averaging. Advanced. | separate_tube |
| model | No | which model. `delta_delta_ct` and `relative_curve` need a reference gene, `delta_ct` does not; `relative_curve` additionally needs `standard_ct_table` and `amounts`, because it fits a real dilution series rather than assuming efficiency. Values: delta_delta_ct (Delta-delta-Ct (normalised + calibrated)), delta_ct (Delta-Ct (calibrated only)), relative_curve (Standard curve (fitted amounts)). | delta_delta_ct |
| _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. | |
| groups | Yes | the group each sample belongs to, one per line, in the same order as the Ct rows (e.g. six lines of `control` then six of `treated`). | |
| amounts | No | the input amount of each dilution row, one per row of `standard_ct_table`, whitespace- or comma-separated. The fit is against log10 of these, so every value must be positive. Advanced. | |
| lm_mode | No | how `lm.design` normalises the target against the reference gene before fitting: `subtract` the reference Ct (the delta-Ct scale), or `divide` by it. Values: subtract (Subtract (ΔCt = target − reference)), divide (Divide (target ÷ reference)). Only applies when sig_test is lm.design. Advanced. | subtract |
| _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. | |
| ct_table | Yes | the Ct table: a header row of gene names, then one row per sample. Tab- or comma-separated, the same table the Analyze tab takes. | |
| sig_test | No | which significance test runs beside the model. `t.test` is Welch's two-sample test on the normalised values; `lm` is the equivalent linear model, which reports the same p with a confidence interval; `wilcox.test` is the rank-sum test, for plates too small or too skewed to assume normality; `lm.design` fits `lm(norm ~ model_matrix + 0)` for designs the two-group form cannot express, and is reported through `design` rather than the test table. Values: none (None), t.test (Welch t-test), lm (Linear model (two-group)), wilcox.test (Wilcoxon rank-sum), lm.design (Design-matrix linear model). Advanced. | none |
| lm_formula | No | the design formula for `lm.design`, in R's own notation (`~ group`, `~ group + dose`, `~ group * run`). `group` is always available from `groups` with no paste at all. Only applies when sig_test is lm.design. Advanced. | ~ group |
| lm_variables | No | extra design variables for `lm.design`: a header row of variable names, then one row per sample in the Ct table's order. A column whose every value parses as a number is a covariate, otherwise a factor - the same distinction R makes. Leave empty to model on `group` alone. Only applies when sig_test is lm.design. Advanced. | |
| wilcox_exact | No | which Wilcoxon null distribution. `auto` applies R's own rule (exact while both groups are under 50 and there are no ties); `exact` forces the exact distribution, which is costly on large groups; `normal` forces the approximation. Values: auto (Auto (exact if both groups < 50)), exact (Exact conditional), normal (Normal approximation). Only applies when sig_test is wilcox.test. Advanced. | auto |
| lm_conf_level | No | confidence level for the `lm.design` coefficient intervals. Only applies when sig_test is lm.design. Advanced. | |
| reference_gene | No | the gene expression is normalised to. Required for delta-delta-Ct and for the standard-curve model; ignored by delta-Ct, which normalises to a group only. Only applies when model is delta_delta_ct or relative_curve. | |
| wilcox_correct | No | tail refinement for the Wilcoxon normal approximation: `none`, R's `continuity` correction, or 1-3 Edgeworth terms. Ignored when the exact distribution is used. Values: none (None), continuity (Continuity), 1 (Continuity + Edgeworth 1), 2 (Continuity + Edgeworth 2), 3 (Continuity + Edgeworth 3). Only applies when sig_test is wilcox.test. Advanced. | continuity |
| reference_group | Yes | the group everything is calibrated against: the untreated / time-zero / wild-type arm. | |
| assess_efficiency | No | run `pcr_assess(method = 'efficiency')` beside delta-delta-Ct: delta-Ct against the reference gene regressed on log10 amount, per gene. This is how the model's equal-efficiency assumption is CHECKED rather than assumed - a slope far from zero says delta-delta-Ct is the wrong model for this plate. Needs `standard_ct_table` and `amounts`. Advanced. | |
| standard_ct_table | No | the SERIAL-DILUTION Ct table the standard curve is fitted to - a second plate, not the sample one. Required by `relative_curve`, and by `assess_efficiency` on any model. Advanced. | |
| wilcox_conf_level | No | confidence level for the Wilcoxon location-shift interval. Only applies when sig_test is wilcox.test. Advanced. | |
| wilcox_alternative | No | the Wilcoxon alternative hypothesis. Values: two.sided (Two-sided), less (Less (shift < 0)), greater (Greater (shift > 0)). Only applies when sig_test is wilcox.test. Advanced. | two.sided |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | one row per group x gene: the normalised and calibrated delta-Ct (or fitted amount ratio), the fold change and its bounds | |
| test | Yes | the significance test beside the model - one row per gene, with the statistic, p value and interval - or null when none was asked for | |
| count | Yes | how many rows the model produced | |
| genes | Yes | the genes measured, reference gene excluded under delta-delta-Ct | |
| model | Yes | the model that produced them | |
| trend | Yes | the per-gene standard curve (intercept, slope, R-squared) the `relative_curve` model consumed, or null | |
| design | Yes | the design-matrix linear model: the formula, the columns it built, and per gene a coefficient table WITH the fit diagnostics. Null unless `sig_test` is `lm.design` | |
| groups | Yes | the groups, in the order the rows use | |
| efficiency | Yes | the equal-efficiency check: delta-Ct regressed on log10 amount per gene. A slope far from zero says delta-delta-Ct is the wrong model here. Null unless `assess_efficiency` ran | |
| referenceGene | Yes | the gene every target was normalised to under delta-delta-Ct; null for the models that use none | |
| standardPoints | Yes | the dilution observations behind that curve, with fitted values and residuals - a standard curve is judged by whether a dilution sits off the line, not by R-squared |