find_differentially_expressed_genes
Identify top up- and down-regulated genes for a given GeneLab assay using log2 fold change and adjusted p-value thresholds, returning ranked genes with means and standard deviations.
Instructions
USE THIS TOOL (not the query tool) for any "up/down-regulated genes",
"DEGs", or "differential expression" question for a single assay.
The query tool can express the same Cypher, but using it for this
category loses the formatted markdown tables, the inline CSV
side-channel, the proper adj_p_value handling, and the parallel
execution of the count queries this tool already provides correctly.
Return the top-N up- and down-regulated genes for a given assay_id.
This tool runs two queries on the GeneLab KG:
Top-N upregulated genes (log2fc > 0, adj_p_value <= adj_p_threshold, highest log2fc first)
Top-N downregulated genes (log2fc < 0, adj_p_value <= adj_p_threshold, lowest log2fc first)
Returning all passing rows:
Pass top_n=None to return ALL rows that pass the filters rather
than a top-N ranking. Use this when the user asks for "all
significantly up/downregulated genes" or wants the complete
filtered set as CSV.
Results include gene symbol, gene name, log2 fold change, adjusted p-value, and group means and standard deviations for each condition.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | How many genes to display for each of up- and down-regulated lists. Pass None (or omit) to return ALL genes passing the adj_p_value filter rather than a top-N — useful when the user asks for 'all significantly upregulated genes' or wants the complete filtered set as CSV. When the full set is large, the CSV contains every row passing the filter. | |
| assay_id | Yes | Assay identifier (e.g., 'OSD-253-6c5f9f37b9cb2ebeb2743875af4bdc86') | |
| session_id | No | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on every tool call. If the server replies that the session is unknown or expired, call `create_session()` again and use the new id. | |
| adj_p_threshold | No | Adjusted p-value threshold for significance (default: 0.05). Only genes with adj_p_value <= this value are returned. |