Skip to main content
Glama

jean — Molecular Biology & Genomics

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). Single-base records only, as LEA's vcf2geno keeps them. Validated against LEA 3.19.8 on every record and sample of 1000 Genomes phase 3 APOL1.

Input Schema

TableJSON 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

TableJSON 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

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and a closed world, so the safety profile is covered. The description adds genuine context beyond that: the underlying engine (LEA snmf, Frichot et al. 2014), the single-base-record input limitation, and a concrete validation claim against LEA 3.19.8 on 1000 Genomes phase 3 APOL1.

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?

Three dense sentences that front-load the purpose, then add the mechanism and the input constraint. Every sentence carries weight, though the parenthetical citation and validation detail verge on scholarly rather than operational padding.

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?

For a complex 14-parameter tool with an output schema and rich annotations, the description covers what it computes, the method, and the key input restriction. Return-value details are rightly delegated to the output schema, leaving only minor gaps around result shape and output routing.

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 in detail (kFrom/kTo, seed, alpha, holdOut, etc.). The description reinforces the K-range and cross-entropy concepts but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 description names a specific verb+resource (fitting individual ancestry coefficients, ADMIXTURE-style, via LEA sNMF over a K range) and is clearly distinguishable from siblings like population_fst, population_site_stats, and genotype_pca. An agent can identify exactly what output it produces without opening the schema.

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

Usage Guidelines4/5

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

It states a hard usage constraint ('single-base records only, as LEA's vcf2geno keeps them') that tells the agent when the tool is inapplicable, and frames the method as the ADMIXTURE-style picture. It does not, however, explicitly name an alternative or contrast against a sibling for cases where the constraint fails, so it falls short of full when/when-not routing.

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