Rank substitution models, with the margin over the runners-up
select_substitution_modelCompare and rank substitution models for aligned nucleotide or protein sequences using AIC, AICc, or BIC, then report top models, score gaps, and criterion agreement.
Instructions
Compare substitution models and report how much the winner won by.
A single model name reads as a finding. The ranking, the delta to the next model, and whether AIC/AICc/BIC agree are what make it one.
Args:
fasta: Aligned sequences in FASTA, nucleotide or protein as declared by
sequence_type.
criterion: "AIC", "AICc" or "BIC". BIC penalises parameters more heavily.
seed: Fixes the engine's search.
top_n: How many ranked models to return.
sequence_type: "dna" (default) or "protein". Ranks within that molecule
type's model set — nucleotide and protein models are not comparable.
fasta_path: Path of a FASTA file to read instead of fasta.
models: Rank only these models (IQ-TREE names, e.g. ["JC", "K2P",
"F81+F", "HKY+F"]), all returned. Bare "F81"/"HKY" have equal base
frequencies in IQ-TREE; JC69, K80 and HKY85 are accepted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| fasta | No | ||
| top_n | No | ||
| models | No | ||
| criterion | No | AIC | |
| fasta_path | No | ||
| sequence_type | No | dna |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | Yes | ||
| ranking | Yes | ||
| warnings | Yes | ||
| alignment | Yes | ||
| criterion | Yes | ||
| best_model | Yes | ||
| restricted_to | No | ||
| criteria_agree | Yes | ||
| resolved_names | No | ||
| best_by_criterion | Yes | ||
| n_models_compared | Yes | ||
| indistinguishable_from_best | Yes |