Description
Return the directed matrix cell for parent-to-child transition.
A trait-transition model assigns costs to changes between states. A directed cost lookup is one input to ancestral reconstruction; the matrix may encode asymmetry and need not behave like a physical distance.
Return the directed matrix cell for parent-to-child transition.
When to use this tool
Use Trait State Parsimony Cost when you need a supplied trait-transition cost.
How to use the tool and how it works
- Enter parentState, childState, states, costs. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read cost. Use the output convention below.
Require unique states, known parent/child and a square nonnegative cost matrix. Return the directed matrix cell for parent-to-child transition.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| parentState | Parent State | Required. Text; maximum UTF-16 length 8192. |
| childState | Child State | Required. Text; maximum UTF-16 length 8192. |
| states | States | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| costs | Costs | Required. Array of array of finite number; maximum items 128; maximum items 128. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cost | Cost | Required. Finite number. |
{
"input": {
"parentState": "A",
"childState": "B",
"states": [
"A",
"B"
],
"costs": [
[
0,
2
],
[
3,
0
]
]
},
"output": {
"cost": 2
}
} Limitations and assumptions
- Costs need not be symmetric or satisfy a metric. One lookup is not a full ancestral-state reconstruction or tree-parsimony solution.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Run the complete ancestral-state or parsimony method on the intended tree. Review state definitions, transition assumptions and missing observations rather than inferring a reconstruction from one matrix entry.
References
Similar or alternative tools
- Selection Dominance Coefficient Fitness Gap
Return fitnesses 1, 1-hs and 1-s.
- Codon Synonymous Site Mask
Mark neighbors matching its nonexcluded amino-acid token and sum their weights by changed position and overall.