Skip to main content
Glama

linkage_disequilibrium

Read-only

Linkage disequilibrium between every pair of biallelic sites of a call set: the dosage correlation r of Rogers and Huff (scikit-allel), or haplotype r² and D′ from the maximum-likelihood two-locus haplotype frequencies (PLINK 1.9 --r2 dprime-signed), plus LD pruning by sliding windows (scikit-allel locate_unlinked).

Input Schema

NameRequiredDescriptionDefault
endNolast position (1-based) of the window; 0 is the last site.
vcfYesthe call set as VCF text (a .vcf, or a .vcf.gz already decompressed); every record's GT is read, ploidy 2.
groupNocompute over this group's samples only; empty is every sample.
startNofirst position (1-based) of the window; 0 is the first site.
_filesNoThe project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name.
minMacNokeep sites where REF and the first ALT are each seen at least this many times (scikit-allel is_biallelic_01 min_mac).
groupByNowhich column of the sample table groups the samples; empty is its first grouping column.
_subjectNoThe record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several.
maxSitesNorefuse more sites than this: the pair count grows with its square.
estimatorNorogersHuff: r between alt-allele dosages, no phasing (scikit-allel). haplotype: r² and D′ from the maximum-likelihood haplotype frequencies (PLINK 1.9). Values: rogersHuff (Rogers–Huff r (genotype dosages)), haplotype (Haplotype r² and D′ (maximum likelihood)).rogersHuff
pruneSizeNoLD pruning window, in sites (locate_unlinked size).
pruneStepNosites the pruning window advances (locate_unlinked step).
populationsNoa sample table: a header row with a `sample` column and one or more grouping columns (tab-separated, as 1000 Genomes' .panel). Samples it does not list belong to no group.
pruneThresholdNoprune the later site of a pair whose Rogers–Huff r² exceeds this (locate_unlinked threshold).

Output Schema

NameRequiredDescriptionDefault
pairsYescondensed upper triangle, pair (i, j > i) in row order: r (rogersHuff) or [r², D′] (haplotype), null where a site is monomorphic among the samples called at both
sitesYesthe sites compared, in order: index into the call set, chrom, pos, ref, alt, and whether pruning kept it
summaryYessites, pairs, mean r², pairs at r² ≥ 0.8, pruning kept, and the strongest pairs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety needs no restating. The description adds genuine behavioral context by naming the underlying implementations (scikit-allel vs PLINK 1.9) and the fact that two estimators produce different statistics, which affects interpretation. It does not say whether pairwise LD and the pruned set are both returned or what volume of output to expect, so it is useful but not rich.

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?

A single front-loaded sentence that leads with the primary computation and appends the secondary pruning capability, with parentheticals reserved for implementation provenance. It is dense but every clause carries information; the heavy jargon and punctuation make it slightly harder to scan than necessary.

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

Completeness4/5

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

With a rich 14-parameter schema, a declared output schema and read-only annotations, the description only has to establish scope and method — which it does. The main residual gap is that the tool exposes two distinct operations (pairwise statistics and pruning) and the description never clarifies that both run together over the same site window.

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

Parameters3/5

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

Schema description coverage is 100% across 14 parameters, so the schema carries parameter meaning and the baseline is 3. The description does add interpretive value for the estimator parameter — explaining that rogersHuff gives dosage r while haplotype gives r² and D′ — but says nothing about the window (start/end), the maxSites guard, or how pruneSize/pruneStep/pruneThreshold interact.

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 names a precise computation ('linkage disequilibrium between every pair of biallelic sites of a call set') and enumerates both the statistics (Rogers–Huff dosage r, haplotype r²/D′) and the second capability, sliding-window LD pruning. It is clearly distinguishable from siblings such as population_fst or population_site_stats. It stops short of naming a sibling it is not, so it stays at 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is only implied: the reader infers you pass a VCF call set with biallelic GT-annotated sites and pick an estimator. There is no statement of when to prefer this over population_site_stats or genotype_pca, no prerequisites (sample size, ploidy, phasing), and no note on when pruning versus pairwise statistics is the point.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources