A master registry mapping state symbols to their definitions.
There are two classes or “denominations” of states:
 fundamental states
 These are the basic, atomic, selfcontained states of the alphabet, distinct and mutuallyexclusive from every other fundamental state. E.g., for DNA: adenine, guanine, cytosine, and thymine.
 multistate states
 The states are secondlevel or “pseudostates”, in that they are not properly states in and of themselves, but rather each consist of a set of other states. That is, a multistate state is a set of two or more fundamental states. Multistate states are of one of two types: “ambiguous” and “polymorphic” states. “Ambiguous” states represent states in which the true fundamental state is unknown, but consists of one of the fundamental states to which the ambiguous states map. “Polymorphic” states represent states in which the entity actually has multiple fundamental states simultaneously. “Ambiguous” states are an expression of uncertainty or lack of knowledge about the identity of state. With “polymorphic” states, on the other hand, there is no uncertaintly or lack of knowledge about the state: the state is known definitively, and it consists of multiple fundamental states. An example of an ambiguous state would be ‘N’, representing any base in molecular sequence data. An example of a polymorphic state would be the range of a widespread species found in multiple geographic units. Note that multistate states can be specified in terms of other multistate states, but that upon instantiation, these member multistates will be expanded to their fundamental states.
State definitions or identities are immutable: their symbology and mappings cannot be changed after creation/initialization. State definitions and identities, however, can be added/removed from a state alphabet.
Parameters: 


Returns state identity corresponding to key.
Parameters:  key (integer or string) – If and integer value, looks up and returns state identity by index. If a string value, looks up and returns state identity by symbol. 

Returns:  s (StateIdentity instance) – Returns a StateIdentity corresponding to key. 
Raises:  KeyError if ``key`` is not valid. 
Returns StateAlphabet.state_iter: iterator over all state identities.
Returns an iterator over all symbols (including synonyms, unless include_synonyms is False) that map to ambiguous states.
Dictionary with state symbols as keys and states as values. Does not include symbol synonyms or case variations.
Builds lookup tables/mappings for quick referencing and dereferencing of symbols/states.
Builds lookup tables/mappings for quick referencing and dereferencing of ambiguous/polymorphic states based on the fundamental states to which they map.
Builds lookup tables/mappings for quick referencing and dereferencing of state symbology.
Dictionary with state symbols as keys and states as values. Includes symbol synonyms or case variations.
Returns an iterator over all symbols (including synonyms, unless include_synonyms is False) that map to fundamental states.
Returns the canonical state symbol for the state to which symbol maps. E.g., in a DNA alphabet, return ‘A’ for ‘a’.
Returns:  s (string) – Canonical symbol for state with symbol or synonym symbol of symbol. 

Returns list of fundamental states corresponding to symbols.
Returns:  s (list of StateIdentity) – A list of fundamental StateIdentity instances corresponding to symbols given in symbols, with multistate states expanded into their fundamental symbols. 

Returns list of states corresponding to symbols.
Returns:  s (list of StateIdentity) – A list of StateIdentity instances corresponding to symbols given in symbols. 

Returns ambiguous state with fundamental member states represented by symbols given in symbols.
Returns:  s (StateIdentity instance) 

Returns polymorphic state with fundamental member states represented by symbols given in symbols.
Returns:  s (StateIdentity instance) 

Returns ambiguous or polymorphic state with fundamental member states represented by symbols given in symbols.
Parameters:  symbols (iterable of string symbols) – Symbols representing states to be dereferenced. 

Returns:  s (StateIdentity instance) 
Returns an iterator over all ambiguous and polymorphic state identities.
Returns an iterator over all symbols (including synonyms, unless include_synonyms is False) that map to multistate states.
Adds a new ambiguous state to the collection of states in this alphabet.
Parameters: 


Returns:  s (StateIdentity) – The new state created and added. 
Adds a new fundamental state to the collection of states in this alphabet.
Parameters:  symbol (string) – The symbol used to represent this state. Cannot have previously been used to refer to any other state, fundamental or otherwise, as a primary or synonymous symbol (including implicit synonyms given by casevariants if the state alphabet is not casesensitive). Cannot be blank (“”) or None. 

Returns:  s (StateIdentity) – The new state created and added. 
Adds a new polymorphic or ambiguous state to the collection of states in this alphabet.
Parameters: 


Returns:  s (StateIdentity) – The new state created and added. 
Adds a new polymorphic state to the collection of states in this alphabet.
Parameters: 


Returns:  s (StateIdentity) – The new state created and added. 
Defines an alternative symbol mapping for an existing state.
Parameters:  

Returns: 

Returns an iterator over all symbols (including synonyms, unless include_synonyms is False) that map to polymorphic states.
Sets the given state as an attribute of this alphabet. The name of the attribute will be attr_name if specified, or the state symbol otherwise.
Parameters: 


Tuple of all state identities in this alphabet.
Returns an iterator over all symbols paired with the state to which the they symbols map.
Tuple of all state symbols in this alphabet.
A character state definition, which can either be a fundamental state or a mapping to a set of other character states (for polymorphic or ambiguous characters).
A state is immutable with respect to its definition and identity. Specifically, it ‘symbol’, ‘index’, ‘multistate’, and ‘member_states’ properties are set upon definition/creation, and after that are readonly.
Parameters: 


Returns a tuple of fundamental state indexes (i.e., tuple of index values of single states) to which this state maps.
Returns a tuple of fundamental state indexes (i.e., tuple of index values of single states) to which this state maps, with gaps being substituted with missing (nodata) states.
Returns a tuple of fundamental states (i.e., tupe of single states) to which this state maps.
Returns a tuple of fundamental state symbols (i.e., tuple of symbols representing single states) to which this state maps.
Tries to determine if two StateIdentity definitions are equivalent by matching symbols.
True if a FUNDAMENTAL state.
True if a FUNDAMENTAL state.
Returns the (fundamental) member states that this state maps to if not itself a fundamental state.
Representation of member states of self.
Type of multistatedness: FUNDAMENTAL (not a multistate), AMBIGUOUS, or POLYMORPHIC.
Canonical (primary) symbol of this state.
The collection of symbol synonyms (alternatives/equivalents to the canonical symbol) which also map to this state.