Skip to main content
Glama
taehojo
by taehojo

batch_modality_screen

Screen multiple genomic variants for specific regulatory effects like expression, splicing, TF binding, or chromatin changes. Use for targeted regulatory studies and modality-specific analysis.

Instructions

Screen variants across specific regulatory modalities.

Efficiently tests multiple variants for specific regulatory effects.

Perfect for: targeted regulatory screens, modality-specific studies.

Example: "Screen 20 variants for splicing effects"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variantsYes
modalityYesRegulatory modality to screen

Implementation Reference

  • Core implementation of batch_modality_screen: maps modality to specific output types, processes each variant by calling predict_variant_effect, collects and returns results.
    def batch_modality_screen(client, params: Dict[str, Any]) -> Dict[str, Any]:
        """Screen variants across specific modalities."""
        variants_data = params.get('variants', [])
        modality = params.get('modality', 'expression')
    
        # Map modality names to OutputType enums
        modality_map = {
            'expression': [dna_client.OutputType.RNA_SEQ, dna_client.OutputType.CAGE],
            'splicing': [dna_client.OutputType.SPLICE_SITES],
            'tf_binding': [dna_client.OutputType.CHIP_TF],
            'chromatin': [dna_client.OutputType.DNASE, dna_client.OutputType.ATAC]
        }
        modalities = modality_map.get(modality, [dna_client.OutputType.RNA_SEQ, dna_client.OutputType.SPLICE_SITES])
    
        results = []
        for v in variants_data:
            # Create a copy with output_types
            variant_params = v.copy()
            variant_params['output_types'] = modalities
            try:
                result = predict_variant_effect(client, variant_params)
                results.append({
                    'variant': result['variant'],
                    'predictions': result['predictions'],
                    'impact': result['interpretation']['impact_level']
                })
            except Exception as e:
                print(f"Warning: Failed: {e}", file=sys.stderr)
                continue
    
        return {
            'modalities_tested': [modality],  # Return string representation
            'total_variants': len(results),
            'results': results
        }
  • MCP server tool handler: invokes AlphaGenomeClient.batchModalityScreen and formats result as MCP content response.
    case 'batch_modality_screen': {
      const result = await getClient().batchModalityScreen(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema defining variants array (with chromosome, position, ref, alt) and modality enum.
    inputSchema: {
      type: 'object',
      properties: {
        variants: {
          type: 'array',
          items: {
            type: 'object',
            properties: {
              chromosome: { type: 'string' },
              position: { type: 'number' },
              ref: { type: 'string' },
              alt: { type: 'string' },
            },
            required: ['chromosome', 'position', 'ref', 'alt'],
          },
          minItems: 1,
        },
        modality: {
          type: 'string',
          enum: ['expression', 'splicing', 'tf_binding', 'chromatin'],
          description: 'Regulatory modality to screen',
        },
      },
      required: ['variants', 'modality'],
    },
  • src/tools.ts:626-660 (registration)
    Tool definition and registration: exports BATCH_MODALITY_SCREEN_TOOL with name, description, and schema for MCP tool listing.
    export const BATCH_MODALITY_SCREEN_TOOL: Tool = {
      name: 'batch_modality_screen',
      description: `Screen variants across specific regulatory modalities.
    
    Efficiently tests multiple variants for specific regulatory effects.
    
    Perfect for: targeted regulatory screens, modality-specific studies.
    
    Example: "Screen 20 variants for splicing effects"`,
      inputSchema: {
        type: 'object',
        properties: {
          variants: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                chromosome: { type: 'string' },
                position: { type: 'number' },
                ref: { type: 'string' },
                alt: { type: 'string' },
              },
              required: ['chromosome', 'position', 'ref', 'alt'],
            },
            minItems: 1,
          },
          modality: {
            type: 'string',
            enum: ['expression', 'splicing', 'tf_binding', 'chromatin'],
            description: 'Regulatory modality to screen',
          },
        },
        required: ['variants', 'modality'],
      },
    };
  • Bridge method in AlphaGenomeClient: calls Python bridge script with 'batch_modality_screen' action.
    async batchModalityScreen(params: any): Promise<any> {
      try {
        return await this.callPythonBridge('batch_modality_screen', params);
      } catch (error) {
        if (error instanceof ApiError) throw error;
        throw new ApiError(`Batch modality screen failed: ${error}`, 500);
      }

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