Click or drag to resize
IAlphabet Interface
An alphabet defines a set of symbols common to a particular representation of a biological sequence. The symbols in these alphabets are those you would find as the individual sequence items in an ISequence variable.

The symbols in an alphabet may represent a particular biological structure or they may represent information helpful in understanding a sequence. For instance gap symbol, termination symbol, and symbols representing items whose definition remains ambiguous are all allowed.

Namespace: Bio
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public interface IAlphabet : IEnumerable<byte>, 
	IEnumerable

The IAlphabet type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the count of symbols present in this alphabet. This includes basic symbols, gaps, terminations and ambiguous symbols present in this alphabet.
Public propertyHasAmbiguity
Gets a value indicating whether the alphabet has one or more symbols that represent an ambiguous item (i.e. and item for which it is not precisely known what it represents).
Public propertyHasGaps
Gets a value indicating whether the alphabet has one or more symbols that represent a gap.
Public propertyHasTerminations
Gets a value indicating whether the alphabet has one or more symbols that represent terminal items.
Public propertyIsComplementSupported
Gets a value indicating whether this alphabet supports complement or not.
Public propertyItem
Provides array like access to the symbols in this alphabet.
Public propertyName
Gets a human readable name for the alphabet. For example "DNA", "RNA", or "Amino Acid".
Top
Methods
  NameDescription
Public methodCheckIsAmbiguous
Checks if the provided item is an ambiguous character or not
Public methodCheckIsGap
Checks if the provided item is a gap character or not
Public methodCompareSymbols
Compares two items and specifies whether they are same or not. If the any of the bytes (Nucleotides) passed not belongs to this alphabet then this method throws an exception. TO Address scenarios like, N!=N, M != A etc. For the Scenarios like A == a, g == G use IsValidSymbol method.
Public methodGetAmbiguousSymbols
Gets the ambiguous symbols present in alphabet.
Public methodGetConsensusSymbol
Find the consensus symbol for a set of symbols.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
(Inherited from IEnumerableByte.)
Public methodGetFriendlyName
Gets the friendly name of a given symbol.
Public methodGetSymbolValueMap
Maps A to A and a to A that is key will contain unique values. This will be used in the IsValidSymbol method to address Scenarios like a == A, G == g etc.
Public methodGetValidSymbols
Gets the symbols that are valid for this alphabet. This Method can be used for better performance where lot of validation happens like in case of Parsers.
Public methodTryGetAmbiguousSymbol
Gets the ambiguous symbol for the specified set of symbols.
Public methodTryGetBasicSymbols
Gets the set of basic symbols for the specified ambiguous symbol.
Public methodTryGetComplementSymbol(Byte, Byte)
Gets the complement for the specified symbol. This is to address the scenarios like in case of DNA complement of A is T etc. Note: If the complement is not supported then this method returns false. To know whether this alphabet supports complement or not, Use IsComplementSupported property.
Public methodTryGetComplementSymbol(Byte, Byte)
Gets the complements for the specified symbols. This is to address the scenarios like in case of DNA complement of A is T etc. Note: If the complement is not supported then this method returns false. To know whether this alphabet supports complement or not, Use IsComplementSupported property.
Public methodTryGetDefaultGapSymbol
Gets the default gap symbol if present in the alphabet.
Public methodTryGetDefaultTerminationSymbol
Gets the default termination symbol if present in the alphabet.
Public methodTryGetGapSymbols
Gets the gap symbols if present in the alphabet.
Public methodTryGetTerminationSymbols
Gets the termination symbols if present in the alphabet.
Public methodValidateSequence
Validates if all symbols match with the specified alphabet type.
Top
Extension Methods
  NameDescription
Public Extension MethodAppendByte(Byte)Overloaded.
Yield an Enumeration of the list with the item appended to the end
(Defined by IEnumerableExtensions.)
Public Extension MethodAppendByte(IEnumerableByte)Overloaded.
Yield a concatenation of the two Enumerable lists
(Defined by IEnumerableExtensions.)
Public Extension MethodCheckIsAmbiguous
Checks if the provided item is an ambiguous character or not
(Defined by AlphabetExtensions.)
Public Extension MethodCheckIsGap
Checks if the provided item is a gap character or not
(Defined by AlphabetExtensions.)
Public Extension MethodCheckIsTermination(Byte)Overloaded.
This returns true/false if the given symbol value is considered a termination value in the alphabet.
(Defined by AlphabetExtensions.)
Public Extension MethodCheckIsTermination(Char)Overloaded.
This returns true/false if the given symbol value is considered a termination value in the alphabet.
(Defined by AlphabetExtensions.)
Public Extension MethodElementAtByte
Returns the element at a specified index in a sequence.
(Defined by IEnumerableExtensions.)
Public Extension MethodForEachByte(ActionByte)Overloaded.
Calls an action on each element of a sequence. The action takes one argument: an element. It has no return value.
(Defined by IEnumerableExtensions.)
Public Extension MethodForEachByte(ActionByte, Int32)Overloaded.
Calls an action on each element of a sequence. The action takes two arguments: an element and the index of the element. It has no return value.
(Defined by IEnumerableExtensions.)
Public Extension MethodGetFriendlyName
Gets the friendly name of a given symbol.
(Defined by AlphabetExtensions.)
Public Extension MethodGetMummerAlphabet
Find corresponding mummer alphabet which supports the concatenation symbol using an existing alphabet
(Defined by MummerAlphabetExtensions.)
Public Extension MethodShuffleByte
Shuffles the elements of a sequence.
(Defined by IEnumerableExtensions.)
Public Extension MethodStringJoinOverloaded.
Creates a string from a sequence of elements. No delimiter is used.
(Defined by IEnumerableExtensions.)
Public Extension MethodStringJoin(String)Overloaded.
Creates a delimited string from a sequence of elements.
(Defined by IEnumerableExtensions.)
Public Extension MethodStringJoin(String, Int32, String)Overloaded.
Creates a delimited string from a sequence of elements. At most maxLength elements will be used and "..." shows that more elements were in the list.
(Defined by IEnumerableExtensions.)
Public Extension MethodSubSequenceByte
Take the items from a sequence starting with item # start (index 0) and contining for count items.
(Defined by IEnumerableExtensions.)
Public Extension MethodToHashSetByteOverloaded.
Creates a HashSet from a sequence. If the sequence is already a HashSet, a new HashSet is still created.
(Defined by IEnumerableExtensions.)
Public Extension MethodToHashSetByte(IEqualityComparerByte)Overloaded.
Creates a HashSet from a sequence. If the sequence is already a HashSet, a new HashSet is still created.
(Defined by IEnumerableExtensions.)
Public Extension MethodToQueueByte
Creates a Queue from a sequence. If the sequence is already a Queue, a new Queue is still created.
(Defined by IEnumerableExtensions.)
Top
See Also

Reference