Skip to main content
Glama
shukwong
by shukwong

get_structural_variants

Retrieve structural variants within a specified genomic region using gnomAD datasets. Input chromosome, start, stop positions, and dataset ID to analyze genetic variations efficiently.

Instructions

Get structural variants in a genomic region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chromYesChromosome
datasetNoDataset ID (gnomad_sv_r4, gnomad_sv_r2_1)gnomad_sv_r4
reference_genomeNoReference genomeGRCh38
startYesStart position
stopYesStop position

Implementation Reference

  • Handler function for the 'get_structural_variants' tool within the CallToolRequestSchema switch statement. It constructs variables from input arguments, calls makeGraphQLRequest with the predefined GraphQL query, and extracts the structural_variants from the response.
    case "get_structural_variants": result = await makeGraphQLRequest(QUERIES.getStructuralVariants, { chrom: String(args.chrom), start: parseInt(String(args.start)), stop: parseInt(String(args.stop)), datasetId: parseDatasetId((args.dataset as string) || "gnomad_sv_r4"), referenceGenome: parseReferenceGenome((args.reference_genome as string) || "GRCh38"), }); formattedResult = result.data?.region?.structural_variants || []; break;
  • Input schema (JSON Schema) for the 'get_structural_variants' tool, defining parameters like chrom, start, stop, dataset, and reference_genome.
    inputSchema: { type: "object", properties: { chrom: { type: "string", description: "Chromosome", }, start: { type: "number", description: "Start position", }, stop: { type: "number", description: "Stop position", }, dataset: { type: "string", description: "Dataset ID (gnomad_sv_r4, gnomad_sv_r2_1)", default: "gnomad_sv_r4", }, reference_genome: { type: "string", description: "Reference genome", default: "GRCh38", }, }, required: ["chrom", "start", "stop"], },
  • src/index.ts:585-616 (registration)
    Registration of the 'get_structural_variants' tool in the tools array returned by the ListToolsRequestSchema handler.
    { name: "get_structural_variants", description: "Get structural variants in a genomic region", inputSchema: { type: "object", properties: { chrom: { type: "string", description: "Chromosome", }, start: { type: "number", description: "Start position", }, stop: { type: "number", description: "Stop position", }, dataset: { type: "string", description: "Dataset ID (gnomad_sv_r4, gnomad_sv_r2_1)", default: "gnomad_sv_r4", }, reference_genome: { type: "string", description: "Reference genome", default: "GRCh38", }, }, required: ["chrom", "start", "stop"], }, },
  • GraphQL query template QUERIES.getStructuralVariants used by the handler to fetch structural variants data from gnomAD API.
    getStructuralVariants: ` query GetStructuralVariants($chrom: String!, $start: Int!, $stop: Int!, $datasetId: DatasetId!, $referenceGenome: ReferenceGenomeId!) { region(chrom: $chrom, start: $start, stop: $stop, reference_genome: $referenceGenome) { structural_variants(dataset: $datasetId) { variant_id chrom pos end length type alts ac an af homozygote_count hemizygote_count filters } } } `,

Other Tools

Related 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/shukwong/gnomad-mcp-server'

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