linkage_disequilibrium
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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vcf": "<vcf>"
},
"name": "linkage_disequilibrium"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | last position (1-based) of the window; 0 is the last site. | |
| vcf | Yes | the call set as VCF text (a .vcf, or a .vcf.gz already decompressed); every record's GT is read, ploidy 2. | |
| group | No | compute over this group's samples only; empty is every sample. | |
| start | No | first position (1-based) of the window; 0 is the first site. | |
| _files | No | The 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. | |
| minMac | No | keep sites where REF and the first ALT are each seen at least this many times (scikit-allel is_biallelic_01 min_mac). | |
| groupBy | No | which column of the sample table groups the samples; empty is its first grouping column. | |
| _subject | No | The 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. | |
| maxSites | No | refuse more sites than this: the pair count grows with its square. | |
| estimator | No | rogersHuff: 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 |
| pruneSize | No | LD pruning window, in sites (locate_unlinked size). | |
| pruneStep | No | sites the pruning window advances (locate_unlinked step). | |
| populations | No | a 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. | |
| pruneThreshold | No | prune the later site of a pair whose Rogers–Huff r² exceeds this (locate_unlinked threshold). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pairs | Yes | condensed 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 | |
| sites | Yes | the sites compared, in order: index into the call set, chrom, pos, ref, alt, and whether pruning kept it | |
| summary | Yes | sites, pairs, mean r², pairs at r² ≥ 0.8, pruning kept, and the strongest pairs |