get_tissue_specific_genes
Identify genes with specific expression in particular human tissues using GTEx data, helping researchers analyze tissue-specific gene activity patterns.
Instructions
Get genes with tissue-specific expression patterns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datasetId | No | GTEx dataset ID (default: gtex_v8) | gtex_v8 |
| selectionCriteria | No | Selection criteria for tissue specificity (default: highestInGroup) | highestInGroup |
| tissueSiteDetailId | Yes | Tissue site detail ID (e.g., Muscle_Skeletal, Brain_Cortex) |
Implementation Reference
- The main handler function that implements the logic for the get_tissue_specific_genes tool. It retrieves top expressed genes in the specified tissue and formats them as tissue-specific gene candidates, using the GTEx API client.async getTissueSpecificGenes(args: any) { if (!args.tissueId || typeof args.tissueId !== 'string') { throw new Error('tissueId parameter is required and must be a tissue ID string'); } // Get top expressed genes for this tissue const topGenesResult = await this.apiClient.getTopExpressedGenes( args.tissueId, args.datasetId || 'gtex_v8', true, // Filter MT genes 100 // Get more genes for specificity analysis ); if (topGenesResult.error) { return { content: [{ type: "text", text: `Error retrieving tissue-specific genes: ${topGenesResult.error}` }], isError: true }; } const topGenes = topGenesResult.data || []; if (topGenes.length === 0) { return { content: [{ type: "text", text: `No expression data found for tissue: ${args.tissueId}` }] }; } // For tissue specificity, we'll analyze the top genes // In a real implementation, this would compare across all tissues const tissueDisplayName = this.getTissueDisplayName(args.tissueId); let output = `**Tissue-Specific Genes in ${tissueDisplayName}**\n`; output += `Dataset: ${topGenes[0]?.datasetId}\n`; output += `Analysis: Top expressing genes (tissue specificity analysis)\n\n`; // Show top tissue-specific candidates const specificGenes = topGenes.slice(0, 20); output += `**Candidate Tissue-Specific Genes (${specificGenes.length}):**\n`; specificGenes.forEach((gene, index) => { output += `${(index + 1).toString().padStart(2)}. **${gene.geneSymbol}** (${gene.gencodeId})\n`; output += ` • Expression: ${gene.median.toFixed(3)} ${gene.unit}\n`; output += ` • Rank in tissue: ${index + 1}\n`; }); output += `\n**Note:** This analysis shows highly expressed genes in ${tissueDisplayName}. `; output += `True tissue specificity requires comparison across all tissues using advanced statistical methods.\n`; return { content: [{ type: "text", text: output }] }; }
- src/index.ts:127-151 (schema)Tool schema definition in the list of available tools, specifying the name, description, and input schema (parameters like tissueSiteDetailId, selectionCriteria, datasetId) for get_tissue_specific_genes.{ name: "get_tissue_specific_genes", description: "Get genes with tissue-specific expression patterns", inputSchema: { type: "object", properties: { tissueSiteDetailId: { type: "string", description: "Tissue site detail ID (e.g., Muscle_Skeletal, Brain_Cortex)" }, selectionCriteria: { type: "string", description: "Selection criteria for tissue specificity (default: highestInGroup)", enum: ["highestInGroup", "aboveThreshold"], default: "highestInGroup" }, datasetId: { type: "string", description: "GTEx dataset ID (default: gtex_v8)", default: "gtex_v8" } }, required: ["tissueSiteDetailId"] } },
- src/index.ts:644-650 (registration)Dispatch logic in the main tool call handler that routes calls to 'get_tissue_specific_genes' to the expressionHandlers.getTissueSpecificGenes method, mapping input arguments.if (name === "get_tissue_specific_genes") { return await expressionHandlers.getTissueSpecificGenes({ tissueId: args?.tissueSiteDetailId, selectionCriteria: args?.selectionCriteria, datasetId: args?.datasetId }); }