Skip to main content
Glama

batch_pathogenicity_filter

Filter genomic variants by pathogenicity threshold to identify pathogenic variants from large lists for clinical prioritization and VCF filtering.

Instructions

Filter variants by pathogenicity threshold.

Efficiently identifies pathogenic variants from large lists.

Perfect for: VCF filtering, prioritizing clinical variants.

Example: "Filter 100 variants for pathogenicity > 0.7"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variantsYes
thresholdNoPathogenicity threshold (0-1, default: 0.5)

Implementation Reference

  • Core handler function that processes a batch of variants, assesses pathogenicity for each using assess_pathogenicity helper, filters those above threshold, sorts by score, and returns summary.
    def batch_pathogenicity_filter(client, params: Dict[str, Any]) -> Dict[str, Any]: """Filter variants by pathogenicity threshold.""" variants_data = params.get('variants', []) threshold = params.get('threshold', 0.5) pathogenic_variants = [] for v in variants_data: try: result = assess_pathogenicity(client, v) if result['pathogenicity_score'] >= threshold: pathogenic_variants.append({ 'variant': result['variant'], 'score': result['pathogenicity_score'], 'classification': result['classification'] }) except Exception as e: print(f"Warning: Failed for variant: {e}", file=sys.stderr) continue pathogenic_variants.sort(key=lambda x: x['score'], reverse=True) return { 'total_analyzed': len(variants_data), 'pathogenic_count': len(pathogenic_variants), 'pathogenic_variants': pathogenic_variants }
  • Defines the Tool object with name, description, and inputSchema for validating batch variant inputs and threshold.
    export const BATCH_PATHOGENICITY_FILTER_TOOL: Tool = { name: 'batch_pathogenicity_filter', description: `Filter variants by pathogenicity threshold. Efficiently identifies pathogenic variants from large lists. Perfect for: VCF filtering, prioritizing clinical variants. Example: "Filter 100 variants for pathogenicity > 0.7"`, 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, }, threshold: { type: 'number', minimum: 0, maximum: 1, description: 'Pathogenicity threshold (0-1, default: 0.5)', }, }, required: ['variants'], }, };
  • src/index.ts:228-233 (registration)
    Registers the tool in the MCP server request handler switch statement, calling the client method.
    case 'batch_pathogenicity_filter': { const result = await getClient().batchPathogenicityFilter(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
  • Client proxy method that invokes the Python bridge with action 'batch_pathogenicity_filter'.
    async batchPathogenicityFilter(params: any): Promise<any> { try { return await this.callPythonBridge('batch_pathogenicity_filter', params); } catch (error) { if (error instanceof ApiError) throw error; throw new ApiError(`Batch pathogenicity filter failed: ${error}`, 500); } }
  • src/tools.ts:709-730 (registration)
    Exports the full list of tools including BATCH_PATHOGENICITY_FILTER_TOOL, used by the MCP server for listTools.
    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, ];

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