Skip to main content
Glama
taehojo
by taehojo

predict_allele_specific_effects

Analyze how genetic variants affect gene regulation differently across alleles to support allele-specific expression analysis and imprinting studies.

Instructions

Analyze allele-specific regulatory effects.

Detailed analysis of how each allele affects gene regulation differently.

Perfect for: ASE analysis, imprinting studies.

Example: "Analyze allele-specific effects of chr15:67890123A>G"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chromosomeYes
positionYes
refYes
altYes
tissue_typeNo

Implementation Reference

  • MCP callTool request handler case that executes the tool by calling the AlphaGenomeClient method.
    case 'predict_allele_specific_effects': {
      const params = validateInput(variantPredictionSchema, args) as VariantPredictionParams;
      const result = await getClient().predictAlleleSpecificEffects(params);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Tool schema definition including input validation schema, description, and name.
    export const PREDICT_ALLELE_SPECIFIC_EFFECTS_TOOL: Tool = {
      name: 'predict_allele_specific_effects',
      description: `Analyze allele-specific regulatory effects.
    
    Detailed analysis of how each allele affects gene regulation differently.
    
    Perfect for: ASE analysis, imprinting studies.
    
    Example: "Analyze allele-specific effects of chr15:67890123A>G"`,
      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/tools.ts:709-730 (registration)
    Registration of the tool in the ALL_TOOLS array exported for use in MCP listTools handler.
    export const ALL_TOOLS: Tool[] = [
      PREDICT_VARIANT_TOOL,
      BATCH_SCORE_TOOL,
      ASSESS_PATHOGENICITY_TOOL,
      PREDICT_TISSUE_SPECIFIC_TOOL,
      COMPARE_VARIANTS_TOOL,
      PREDICT_SPLICE_IMPACT_TOOL,
      PREDICT_EXPRESSION_IMPACT_TOOL,
      ANALYZE_GWAS_LOCUS_TOOL,
      COMPARE_ALLELES_TOOL,
      BATCH_TISSUE_COMPARISON_TOOL,
      PREDICT_TF_BINDING_IMPACT_TOOL,
      PREDICT_CHROMATIN_IMPACT_TOOL,
      COMPARE_PROTECTIVE_RISK_TOOL,
      BATCH_PATHOGENICITY_FILTER_TOOL,
      COMPARE_VARIANTS_SAME_GENE_TOOL,
      PREDICT_ALLELE_SPECIFIC_EFFECTS_TOOL,
      ANNOTATE_REGULATORY_CONTEXT_TOOL,
      BATCH_MODALITY_SCREEN_TOOL,
      GENERATE_VARIANT_REPORT_TOOL,
      EXPLAIN_VARIANT_IMPACT_TOOL,
    ];
  • Core handler function implementing the allele-specific effects prediction by calculating ASE ratio from reference and alternate expression scores.
    def predict_allele_specific_effects(client, params: Dict[str, Any]) -> Dict[str, Any]:
        """Analyze allele-specific expression effects."""
        result = predict_variant_effect(client, params)
    
        rna_data = result['predictions'].get('rna_seq', {})
        ref_score = rna_data.get('reference_score', 0)
        alt_score = rna_data.get('alternate_score', 0)
    
        # Calculate allele-specific ratio
        if ref_score + alt_score > 0:
            ase_ratio = alt_score / (ref_score + alt_score)
        else:
            ase_ratio = 0.5
    
        return {
            'variant': result['variant'],
            'ref_expression': ref_score,
            'alt_expression': alt_score,
            'ase_ratio': float(ase_ratio),
            'interpretation': 'alt_biased' if ase_ratio > 0.6 else ('ref_biased' if ase_ratio < 0.4 else 'balanced')
        }
  • Helper client method that invokes the Python bridge for the tool execution.
    async predictAlleleSpecificEffects(params: VariantPredictionParams): Promise<any> {
      try {
        return await this.callPythonBridge('predict_allele_specific_effects', params);
      } catch (error) {
        if (error instanceof ApiError) throw error;
        throw new ApiError(`Allele-specific effects prediction failed: ${error}`, 500);
      }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions 'detailed analysis' and provides use cases, it doesn't describe what the tool actually returns, whether it's computationally intensive, what permissions might be required, or any limitations. For a tool with 5 parameters and no output schema, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with 4 sentences that each add value: purpose statement, elaboration, usage contexts, and example. It's front-loaded with the core purpose and efficiently structured. The example is particularly helpful for understanding parameter format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters with 0% schema coverage, no annotations, no output schema, and a complex domain (genomic analysis), the description is insufficiently complete. It doesn't explain what kind of analysis results to expect, doesn't clarify the optional 'tissue_type' parameter, and leaves too much undefined for a tool with this level of complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for all 5 parameters, the description must compensate but fails to do so. It mentions 'allele-specific effects' and provides an example with chromosome:position:ref>alt format, but doesn't explain what 'tissue_type' parameter does or provide any semantic context for the required chromosome, position, ref, and alt parameters beyond what's implied by the example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as analyzing allele-specific regulatory effects and how each allele affects gene regulation differently. It uses specific verbs ('analyze', 'affects') and identifies the resource (allele-specific effects). However, it doesn't explicitly differentiate from sibling tools like 'compare_alleles' or 'predict_variant_effect' which might have overlapping domains.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage contexts with 'Perfect for: ASE analysis, imprinting studies' which gives clear guidance on when to use this tool. It also includes an example that demonstrates typical usage. However, it doesn't specify when NOT to use this tool or mention alternatives among the many sibling tools available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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