Skip to main content
Glama
taehojo
by taehojo

predict_expression_impact

Analyze how genetic variants affect gene expression using RNA-seq and CAGE data. Supports eQTL analysis and expression-related variant studies.

Instructions

Focus on gene expression effects only.

Analyzes RNA-seq and CAGE predictions for expression changes.

Perfect for: eQTL analysis, expression-related variants.

Example: "Analyze expression impact of rs744373"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chromosomeYes
positionYes
refYes
altYes
tissue_typeNo

Implementation Reference

  • Core handler function that executes the predict_expression_impact tool logic by setting specific output types for RNA-seq and CAGE, calling the base variant effect predictor, and returning expression-focused results.
    def predict_expression_impact(client, params: Dict[str, Any]) -> Dict[str, Any]:
        """
        Focus on gene expression effects only.
        """
        params['output_types'] = [
            dna_client.OutputType.RNA_SEQ,
            dna_client.OutputType.CAGE
        ]
    
        result = predict_variant_effect(client, params)
    
        return {
            'variant': result['variant'],
            'expression_predictions': result['predictions'].get('rna_seq', {}),
            'fold_change': result['predictions'].get('rna_seq', {}).get('fold_change', 0),
            'impact_level': result['interpretation']['impact_level']
        }
  • Defines the tool schema including name, description, and input validation schema for variant parameters.
    export const PREDICT_EXPRESSION_IMPACT_TOOL: Tool = {
      name: 'predict_expression_impact',
      description: `Focus on gene expression effects only.
    
    Analyzes RNA-seq and CAGE predictions for expression changes.
    
    Perfect for: eQTL analysis, expression-related variants.
    
    Example: "Analyze expression impact of rs744373"`,
      inputSchema: {
        type: 'object',
        properties: {
          chromosome: { type: 'string', pattern: '^chr([1-9]|1[0-9]|2[0-2]|X|Y)$' },
          position: { type: 'number', minimum: 1 },
          ref: { type: 'string', pattern: '^[ATGCatgc]+$' },
          alt: { type: 'string', pattern: '^[ATGCatgc]+$' },
          tissue_type: { type: 'string' },
        },
        required: ['chromosome', 'position', 'ref', 'alt'],
      },
    };
  • src/index.ts:176-182 (registration)
    MCP server tool call handler that routes 'predict_expression_impact' requests, validates input, calls the client bridge, and formats the response.
    case 'predict_expression_impact': {
      const params = validateInput(variantPredictionSchema, args) as VariantPredictionParams;
      const result = await getClient().predictExpressionImpact(params);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • TypeScript client method that bridges the tool call to the Python backend by invoking callPythonBridge with the 'predict_expression_impact' action.
    async predictExpressionImpact(params: VariantPredictionParams): Promise<any> {
      try {
        return await this.callPythonBridge('predict_expression_impact', {
          chromosome: params.chromosome,
          position: params.position,
          ref: params.ref,
          alt: params.alt,
          tissue_type: params.tissue_type,
        });
      } catch (error) {
        if (error instanceof ApiError) throw error;
        throw new ApiError(`Expression impact prediction failed: ${error}`, 500);
      }
    }
  • Backend Python dispatch logic in main() that registers and routes the 'predict_expression_impact' action to the handler function.
    elif action == 'predict_expression_impact':
        result = predict_expression_impact(client, params)

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/taehojo/alphagenome-mcp'

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