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
| Name | Required | Description | Default |
|---|---|---|---|
| variants | Yes | ||
| modality | Yes | Regulatory modality to screen |
Implementation Reference
- scripts/alphagenome_bridge.py:622-656 (handler)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 }
- src/index.ts:258-263 (handler)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) }], }; }
- src/tools.ts:635-659 (schema)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'], }, };
- src/alphagenome-client.ts:436-442 (helper)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); }