differential-expressionPOST
Run RNA-seq differential gene expression analysis with DESeq2, edgeR, and limma-voom.
Runs differential gene expression analysis from a raw count matrix and sample metadata. Supports DESeq2, edgeR, limma-voom, or all three methods, returning structured DEG tables, method summaries, consensus genes, QC metrics, and warnings.
Endpoint
POST https://api.frontwind.ai/v1/agents/differential-expressionExample
curl -X POST https://api.frontwind.ai/v1/agents/differential-expression \
-H "Authorization: Bearer fw_live_..." \
-H "Content-Type: application/json" \
-d '{ "counts_csv": "gene_id,ctrl_1,ctrl_2,trt_1,trt_2\\nGeneA,10,12,80,90\\n", "metadata_csv": "sample_id,condition\\nctrl_1,control\\nctrl_2,control\\ntrt_1,treated\\ntrt_2,treated\\n", "condition_column": "condition", "reference_group": "control", "comparison_group": "treated", "method": "all" }'Request body
| Field | Type | Required | Description |
|---|---|---|---|
count_file_id | string | No | Website upload file ID for the count matrix. Use counts_csv for direct API calls. |
metadata_file_id | string | No | Website upload file ID for sample metadata. Use metadata_csv for direct API calls. |
counts_csv | string | No | Inline CSV/TSV count matrix. |
metadata_csv | string | No | Inline CSV/TSV sample metadata. |
gene_id_column | string | No | |
sample_id_column | string | No | |
condition_column | string | Yes | |
reference_group | string | Yes | |
comparison_group | string | Yes | |
method | string | default "all" | |
min_count | integer | default 10 | |
fdr_cutoff | number | default 0.05 | |
log2fc_cutoff | number | default 1 | |
use_cache | boolean | default false |
Response data
| Field | Type | Description |
|---|---|---|
summary | object | |
sample_qc | object | |
method_results | array | |
consensus | object | |
warnings | array |
Example response
{
"ok": true,
"agent": "differential-expression",
"data": {
"summary": {
"comparison": "treated vs control",
"methods_completed": [
"DESeq2",
"edgeR",
"limma-voom"
],
"significant_by_method": {
"DESeq2": 42,
"edgeR": 38,
"limma-voom": 35
}
},
"method_results": [
{
"method": "DESeq2",
"n_tested": 18000,
"n_significant": 42,
"top_up": [
{
"gene_id": "GeneA",
"log2FC": 2.8,
"padj": 0.001
}
]
}
],
"consensus": {
"n_methods": 3,
"n_consensus_significant": 20,
"genes": [
"GeneA"
]
},
"warnings": []
},
"elapsed_s": 42
}