Skip to main content
Glama

compare_expression_profiles

Analyze and compare expression profiles of 2-10 proteins across tissues, brain regions, blood, or single-cell data using Human Protein Atlas information. Output in JSON or TSV format.

Instructions

Compare expression profiles between multiple proteins

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionTypeNoType of expression data to compare (default: tissue)
formatNoOutput format (default: json)
genesYesArray of gene symbols to compare (2-10)

Implementation Reference

  • Main handler function that validates input, fetches expression data for each gene using appropriate helper based on expressionType (tissue/brain/blood), collects into comparisons array, and returns JSON stringified response or error.
    private async handleCompareExpressionProfiles(args: any) { if (!isValidBatchArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid comparison arguments'); } try { const expressionType = (args as any).expressionType || 'tissue'; const comparisons = []; for (const gene of args.genes) { let expressionData; switch (expressionType) { case 'tissue': expressionData = await this.fetchTissueExpression(gene); break; case 'brain': expressionData = await this.fetchBrainExpression(gene); break; case 'blood': expressionData = await this.fetchBloodExpression(gene); break; default: expressionData = await this.fetchTissueExpression(gene); } comparisons.push({ gene, expressionData }); } return { content: [ { type: 'text', text: JSON.stringify({ expressionComparison: comparisons }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error comparing expression profiles: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Input schema defining parameters: genes (array 2-10 strings, required), expressionType (enum), format (json/tsv). Note: single_cell enum value not handled in handler.
    inputSchema: { type: 'object', properties: { genes: { type: 'array', items: { type: 'string' }, description: 'Array of gene symbols to compare (2-10)', minItems: 2, maxItems: 10 }, expressionType: { type: 'string', enum: ['tissue', 'brain', 'blood', 'single_cell'], description: 'Type of expression data to compare (default: tissue)' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, }, required: ['genes'], },
  • src/index.ts:637-648 (registration)
    Tool registration in the tools list passed to server.setRequestHandler, including name, description, and inputSchema.
    name: 'compare_expression_profiles', description: 'Compare expression profiles between multiple proteins', inputSchema: { type: 'object', properties: { genes: { type: 'array', items: { type: 'string' }, description: 'Array of gene symbols to compare (2-10)', minItems: 2, maxItems: 10 }, expressionType: { type: 'string', enum: ['tissue', 'brain', 'blood', 'single_cell'], description: 'Type of expression data to compare (default: tissue)' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, }, required: ['genes'], }, },
  • src/index.ts:703-704 (registration)
    Dispatch case in the request handler switch statement that routes to the specific handler method.
    case 'compare_expression_profiles': return this.handleCompareExpressionProfiles(args);
  • One of the key helper functions used by the handler to fetch tissue expression data via searchProteins with specific columns.
    private async fetchTissueExpression(gene: string): Promise<any> { const columns = ['g', 'eg', 'rnats', 'rnatd', 'rnatss', 't_RNA_adipose_tissue', 't_RNA_adrenal_gland', 't_RNA_brain', 't_RNA_breast', 't_RNA_colon', 't_RNA_heart_muscle', 't_RNA_kidney', 't_RNA_liver', 't_RNA_lung', 't_RNA_ovary', 't_RNA_pancreas', 't_RNA_prostate', 't_RNA_skeletal_muscle', 't_RNA_skin_1', 't_RNA_spleen', 't_RNA_stomach_1', 't_RNA_testis', 't_RNA_thyroid_gland']; return this.searchProteins(gene, 'json', columns, 1); }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Augmented-Nature/ProteinAtlas-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server