Skip to main content
Glama

jean — Molecular Biology & Genomics

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). Validated on every pair of 1000 Genomes phase 3 APOL1 sites.

Input Schema

TableJSON 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

TableJSON 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.7/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 the safety profile is covered. The description adds that rogersHuff requires no phasing and that results were validated against 1000 Genomes phase 3 APOL1 sites, but most remaining behavior (site-count refusal, ploidy, window semantics) is restated from the schema rather than new disclosure.

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 dense sentence with the primary purpose front-loaded, followed by the two computational modes and the validation note. Zero filler, though the run-on structure with tool version citations (scikit-allel, PLINK 1.9) makes it slightly harder to scan than a segmented description would be.

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?

An output schema exists and the schema documents all 14 parameters, so the description need not cover return values or window/group semantics. It adequately answers what the tool computes and which algorithmic path it takes; the only gap is the absence of guidance on the pruning workflow relative to plain LD computation.

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%, so the schema already explains every parameter including the estimator enum and pruning window defaults. The description's estimator gloss ('r between alt-allele dosages, no phasing') largely duplicates the enum description, adding only limited interpretive value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first clause names a specific computation ('Linkage disequilibrium between every pair of biallelic sites of a call set') and then enumerates the two estimator families and the pruning mode. It is easily separable from siblings like population_fst, population_site_stats or genotype_pca, which also operate on call sets.

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 implied by the estimator split (dosage r with no phasing vs. ML haplotype r²/D′), which helps an agent pick a mode, but there is no explicit 'use this when / not when' and no named alternative tool for the same task. The pruning functionality is mentioned without saying when an agent should want it.

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