Skip to main content
Glama

diversity_fst

Compute pairwise Weir & Cockerham Fst between sample groups to quantify genetic differentiation. Groups defined by JSON or metadata TSV; results saved as CSV.

Instructions

Pairwise Weir & Cockerham Fst between groups of samples.

Define the groups one of two ways:

  • groups_json — a JSON object mapping each group name to a list of accession names (or callset ids), e.g. {"north": ["112","156"], "south": ["11","42"]}.

  • metadata_tsv + group_column — read groups from a metadata TSV (the same file format used by import_metadata), keyed on id_column (default individual) and grouped by group_column.

Writes fst_pairwise.csv with the Fst for every group pair. (Server-side BrAPI attributes are not used for grouping — that endpoint is unavailable on the target Gigwa 2.12 build.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoGenotype source: 'vcf' (full export, cached) or 'allelematrix' (paged, server-side subset).vcf
regionNoRestrict analysis to a genomic window: 'chrom' or 'chrom:start-end' (1-based).
id_columnNoColumn in the metadata TSV holding the individual/accession id (default 'individual').individual
output_dirNoDirectory for the output CSV(s) (default ./gigwa_results/<module>/).
groups_jsonNoJSON object mapping each group name to a list of accession names/ids.
max_markersNoCap the number of markers analysed (evenly-spaced subsample); omit to use all.
group_columnNoColumn in the metadata TSV holding the group/population label.
metadata_tsvNoPath to a metadata TSV (import_metadata format) used to define groups.
variant_set_db_idYesBrAPI variantSetDbId identifying the run (MODULE§project§run); from list_variant_sets / list_content.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that outputs are written to a CSV, explains the two method options (vcf vs allelematrix), and notes that BrAPI attributes cannot be used for grouping. However, it does not describe error handling, destructive potential, or authentication needs.

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?

The description is concise, with a clear opening sentence followed by an enumerated explanation of grouping options. It is well-structured and front-loaded, though could be slightly more compact.

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?

Given the 9 parameters, presence of an output schema, and no annotations, the description covers the core functionality thoroughly. It explains group definition, output file, and a limitation. It does not cover all edge cases but is sufficient for typical use.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds significant context beyond the schema: it explains the two mutually exclusive grouping approaches (groups_json vs metadata_tsv+group_column), the option to restrict by region, and the effect of max_markers. This aids correct parameter usage.

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 clearly states the tool computes pairwise Weir & Cockerham Fst between groups of samples and writes the output to a CSV. It is specific about the statistical measure and scope, but does not explicitly differentiate from sibling tools like diversity_by_group.

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 guidance on when to use this tool versus other diversity tools. The description focuses on how to define groups but does not mention prerequisites, alternatives, or context for selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gkanogiannis/Gigwa-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server