Skip to main content
Glama

jean — Molecular Biology & Genomics

discover_gene_tree_discordance

Read-only

Find the genes whose own alignment rejects the species tree. Each named alignment file is one gene, its records the taxa, named as the species tree's tips. For every gene the species tree and each of its nearest-neighbour rearrangements (two per internal branch) is fitted by maximum likelihood under GTR + Γ (rates, base frequencies and shape fitted on the species tree, branch lengths refitted on each rearrangement), and the Shimodaira–Hasegawa test asks whether the species tree is significantly worse than the best of them; the false discovery rate is controlled across genes. A rejection says the gene fits another tree better: incomplete lineage sorting does that to a share of genes among closely spaced species, and so do hidden paralogy, alignment error and transfer, so it is a gene to read, never a call of any one of them. Also reports which genes' best tree is not the species tree, rejected or not, and which alternative trees they choose. Graded against phangorn's pml, optim.pml and SH.test on 122 great-ape genes. About a second of fitting per gene in a browser.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoseed for the bootstrap. Each gene draws from seed + its own index, so a gene's p does not depend on the rest of the corpus. Advanced.
alphaNofalse discovery rate at which a gene counts as rejecting the species tree.
_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.
sh_formNohow each replicate is measured: from its best tree, as Shimodaira and Hasegawa (1999) and Goldman et al. (2000) define the test, or from its worst, as phangorn's SH.test computes it. They agree when the replicates are symmetric. Values: published (Published (from the best tree)), phangorn (phangorn (from the worst tree)). Advanced.published
_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.
alignmentsYesthe gene alignments: library file names, each an aligned multi-FASTA with one record per taxon, the record names being the species tree's tips.
correctionNoBenjamini–Hochberg (independent or positively dependent tests) or Benjamini–Yekutieli (any dependence; less power). Values: BH (Benjamini–Hochberg), BY (Benjamini–Yekutieli).BH
replicatesNoRELL bootstrap replicates of the SH test. The smallest p it can give is 1 / replicates.
species_treeYesthe species tree in Newick, tips named as the alignments' records. Rooted or not; it is tested unrooted.
gamma_categoriesNodiscrete Gamma rate categories; 1 fits no rate variation among sites. Advanced.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
genesYesevery gene: sites, each candidate tree's log-likelihood and SH p, the species tree's p and q
sweepYesthe full result
rejectedYesgenes whose alignment rejects the species tree at the chosen false discovery rate
discordantYesgenes whose best tree is not the species tree, rejected or not
alternativesYeseach alternative tree some gene prefers, with how many prefer it and how many of those reject the species tree

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the 'readOnlyHint' provided in annotations, the description reveals critical behavioral information, such as the underlying maximum likelihood fitting process, the fact that it compares the species tree to two nearest-neighbor rearrangements, and the practical runtime ('About a second of fitting per gene').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is technically thorough, but its length and high density of specialized jargon (Shimodaira–Hasegawa, GTR + Γ, etc.) make it verbose. While every sentence contains valuable information, the pacing is slow due to the sheer volume of methodological detail.

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

Completeness5/5

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

Given the complexity of the biological domain and the number of advanced parameters, the description is exceptionally complete. It covers the methodology, the interpretation of results, the scope of the analysis (122 great-ape genes), and the required input linkages.

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?

Although schema coverage is 100%, the description adds vital conceptual linkages. It confirms that 'Each named alignment file is one gene, its records the taxa, named as the species tree's tips,' cementing the required relationship between the two main inputs.

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 tool explicitly states its purpose: 'Find the genes whose own alignment rejects the species tree.' This highly specific goal, coupled with the detailed mention of the statistical methods (SH test, GTR+Γ), clearly distinguishes it from similar tree analysis tools in the sibling list.

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?

The description provides excellent guidance on interpretation, cautioning the user that a rejection might be due to incomplete lineage sorting, hidden paralogy, or alignment error, not just a clear call. This context guides the agent on when the tool's output should be trusted and how the results should be read.

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