Description
Count distinct nonmissing character-state tokens.
Systematic character records distinguish observed states, ambiguity, missing data and inapplicability. Marker tokens and key-couplet references encode a supplied scheme; checking a local row does not determine actual homology, a complete valid key or a phylogenetic result.
Count distinct nonmissing character-state tokens.
When to use this tool
Use Character State Polymorphism Count when checking the stated systematic-character or identification-key record convention.
How to use the tool and how it works
- Enter stateTokens, missingTokens. Follow any array-alignment requirements below. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read distinctStates, stateCount, polymorphicUnderTokens. Inspect polymorphicUnderTokens before interpreting the associated values.
Count distinct nonmissing character-state tokens. Remove literal missingTokens, deduplicate in first-occurrence order and return stateCount and polymorphicUnderTokens when more than one remains.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| stateTokens | State Tokens | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| missingTokens | Missing Tokens | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| distinctStates | Distinct States | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| stateCount | State Count | Required. Safe integer. |
| polymorphicUnderTokens | Polymorphic Under Tokens | Required. Boolean. |
{
"input": {
"stateTokens": [
"0",
"1",
"1",
"?"
],
"missingTokens": [
"?"
]
},
"output": {
"distinctStates": [
"0",
"1"
],
"stateCount": 2,
"polymorphicUnderTokens": true
}
} Limitations and assumptions
- Token diversity is not proof of biological polymorphism; uncertainty, coding conventions and actual character homology are not resolved.
- 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
Validate the complete character vocabulary, specimen observations and key graph; use an appropriate systematic or phylogenetic analysis for biological conclusions.
References
Similar or alternative tools
- Character State Ambiguity Count
Count ambiguous and missing encoded character-state sets.
- Character State Unobserved Marker
Locate supplied missing and inapplicable character markers.