Skip to main content
Glama

population_ancestry

Read-only

Individual ancestry coefficients, the ADMIXTURE-style picture: each sample as a mixture of K ancestral populations, fitted by sparse non-negative matrix factorisation for every K in a range, with K scored by the cross-entropy of predicting genotypes held out at random (LEA snmf, Frichot et al. 2014).

Input Schema

NameRequiredDescriptionDefault
kToNolargest number of ancestral populations to fit; every K from kFrom up is fitted, on one random stream.
vcfYesthe call set as VCF text (a .vcf, or a .vcf.gz already decompressed); every record's GT is read, ploidy 2.
seedNoR's set.seed value: it fixes the held-out genotypes and every K's random start, so a run is reproducible and citable.
alphaNoregularisation added to every cell of FᵀF in the Q step: larger values push each sample toward fewer ancestries. Advanced.
kFromNosmallest number of ancestral populations to fit.
_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.
ploidyNo2 for diploid ALT counts 0/1/2, 1 for haploid 0/1. Advanced.
groupByNowhich column of the sample table groups the samples; empty is its first grouping column.
holdOutNohold out a share of genotypes and score each K by the cross-entropy of predicting them; the K with the lowest is the one the data support best.
_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.
toleranceNostop when the relative change in the least-squares criterion falls below this (after 16 passes). Advanced.
iterationsNomost alternating passes per K. Advanced.
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.
holdOutShareNoshare of genotypes held out for the cross-entropy. Only applies when holdOut is true.

Output Schema

NameRequiredDescriptionDefault
runsYesone row per K: K, the masked cross-entropy (null without holding out), and the passes the fit took
bestKYesthe K with the lowest cross-entropy, or the largest fitted K when nothing was held out
ancestryYesone row per sample at the best K: sample, its group, and its share of each ancestral population
ancestralGenotypeFrequenciesYesone row per site at the best K: chrom, pos, ref, alt, and each ancestral population's frequency of each genotype (0, 1, 2 ALT copies)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/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 is covered; the description's added value is methodological, explaining what is fitted and how K is scored by held-out-genotype cross-entropy. It does not disclose the practical cost of fitting every K in the range (up to 20 alternating NMF runs on a whole VCF), nor does it warn about runtime or memory, which are the main behavioral risks for this tool.

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?

One dense but well-structured sentence: resource first, then method, then K-selection criterion, then citation. It is appropriately short for a tool whose parameters are fully documented elsewhere, though the stacked jargon (sparse non-negative matrix factorisation, cross-entropy) makes it slightly harder to scan than a plainer phrasing would.

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

Completeness3/5

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

For a 14-parameter tool with nested objects and an output schema, the description correctly leaves return values to the schema but omits the usage context an agent needs to pick it (versus population_fst or genotype_pca) and says nothing about the sample-table input that drives groupBy/populations. It is adequate as a definition of the computation but thin as a decision aid.

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 documents all 14 parameters including kFrom/kTo, holdOut, alpha and seed with meaningful explanations. The description adds no parameter-level detail beyond the schema (it mentions 'K in a range' and held-out scoring, which the schema already captures), so the baseline 3 applies.

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 specific computation ('individual ancestry coefficients, the ADMIXTURE-style picture') and pins the method (LEA snmf, sparse NMF, cross-entropy over K). It is clear this is a population-structure/ancestry estimation tool, distinct in substance from siblings like population_fst or genotype_pca, though it never names those alternatives explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use guidance at all: nothing says when ancestry-coefficient estimation is the right choice versus population_fst, population_site_stats, genotype_pca, or linkage_disequilibrium. No prerequisites are stated (a VCF is required, and the populations/groupBy relationship is left entirely to the schema), and there are no exclusions or caveats about input size or ploidy assumptions.

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