ensembl_regulatory
Retrieve regulatory features, binding matrices, and annotations for genomic regions, proteins, or specific binding sites, using Ensembl genomics data to explore regulatory mechanisms across species.
Instructions
Get regulatory features, binding matrices, and regulatory annotations. Covers regulatory overlap endpoints and binding matrix data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| binding_matrix_id | No | Binding matrix stable ID (e.g., 'ENSPFM0001', 'ENSPFM0123') | |
| feature_type | No | Type of regulatory feature (e.g., 'RegulatoryFeature', 'MotifFeature', 'TF_binding_site') | |
| protein_id | No | Protein ID for regulatory features affecting translation (e.g., 'ENSP00000288602', 'ENSP00000350283') | |
| region | No | Genomic region in format 'chromosome:start-end' (e.g., '17:7565096-7590856', 'X:1000000-2000000', '6:25000000-35000000') | |
| species | No | Species name (e.g., 'homo_sapiens', 'mus_musculus') | homo_sapiens |
Implementation Reference
- src/handlers/tools.ts:453-463 (handler)Direct handler function for the 'ensembl_regulatory' tool. Normalizes input arguments and calls the EnsemblApiClient's getRegulatoryFeatures method to execute the core logic.export async function handleRegulatory(args: any) { try { const normalizedArgs = normalizeEnsemblInputs(args); return await ensemblClient.getRegulatoryFeatures(normalizedArgs); } catch (error) { return { error: error instanceof Error ? error.message : "Unknown error", success: false, }; } }
- src/handlers/tools.ts:47-86 (schema)Tool definition including name, description, and inputSchema for validation of 'ensembl_regulatory' tool parameters.{ name: "ensembl_regulatory", description: "Get regulatory features, binding matrices, and regulatory annotations. Covers regulatory overlap endpoints and binding matrix data.", inputSchema: { type: "object", properties: { region: { type: "string", description: "Genomic region in format 'chromosome:start-end' (e.g., '17:7565096-7590856', 'X:1000000-2000000', '6:25000000-35000000')", }, protein_id: { type: "string", description: "Protein ID for regulatory features affecting translation (e.g., 'ENSP00000288602', 'ENSP00000350283')", }, binding_matrix_id: { type: "string", description: "Binding matrix stable ID (e.g., 'ENSPFM0001', 'ENSPFM0123')", }, species: { type: "string", description: "Species name (e.g., 'homo_sapiens', 'mus_musculus')", default: "homo_sapiens", }, feature_type: { type: "string", description: "Type of regulatory feature (e.g., 'RegulatoryFeature', 'MotifFeature', 'TF_binding_site')", }, }, anyOf: [ { required: ["region"] }, { required: ["protein_id"] }, { required: ["binding_matrix_id"] }, ], }, },
- index.ts:75-83 (registration)MCP server registration: switch case that maps 'ensembl_regulatory' tool calls to the handleRegulatory function.case "ensembl_regulatory": return { content: [ { type: "text", text: JSON.stringify(await handleRegulatory(args), null, 2), }, ], };
- src/utils/ensembl-api.ts:101-132 (helper)Core helper function implementing the regulatory features lookup via Ensembl REST API endpoints for region overlap, translation overlap, and binding matrix retrieval.async getRegulatoryFeatures(args: any): Promise<any> { const { region, protein_id, binding_matrix_id, species = "homo_sapiens", feature_type, } = args; const params: Record<string, string> = {}; if (feature_type) { params.feature = feature_type; } if (region) { return this.makeRequest(`/overlap/region/${species}/${region}`, { ...params, feature: "RegulatoryFeature", }); } else if (protein_id) { return this.makeRequest(`/overlap/translation/${protein_id}`, params); } else if (binding_matrix_id) { return this.makeRequest( `/species/${species}/binding_matrix/${binding_matrix_id}`, params ); } throw new Error( "Either region, protein_id, or binding_matrix_id must be provided" ); }