Skip to content

Main content

Character State Polymorphism Count Tool

Count distinct supplied known character-state tokens without imputing states or inferring biological mechanisms.

Loading tool…

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

  1. Enter stateTokens, missingTokens. Follow any array-alignment requirements below. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
stateTokensState TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
missingTokensMissing TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
distinctStatesDistinct StatesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
stateCountState CountRequired. Safe integer.
polymorphicUnderTokensPolymorphic Under TokensRequired. Boolean.
json
{
  "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

  1. Calculation and input contract: biosystematics/character-state-polymorphism-count — tool.io

Similar or alternative tools