You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wiki/BioJava:Cookbook:Alphabets:Component.mediawiki
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
== How do I break Symbols from CrossProductAlphabets into their component Symbols? ==
2
2
3
-
[[Biojava:Cookbook:Alphabets:CrossProduct|CrossProductAlphabets]] are used to represent groups of [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbols] as a single Symbol. This is very useful for treating things like codons as single [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbols]. Sometimes however, you might want to covert the [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbols] back into their component [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbols]. The following recipe demonstrates how this can be done.
3
+
[[Biojava:Cookbook:Alphabets:CrossProduct|CrossProductAlphabets]] are used to represent groups of [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbols] as a single Symbol. This is very useful for treating things like codons as single [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbols]. Sometimes however, you might want to covert the [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbols] back into their component [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbols]. The following recipe demonstrates how this can be done.
4
4
5
-
The [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbols] from a [[Biojava:Cookbook:Alphabets:CrossProduct|CrossProductAlphabet]] are implementations of the [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/AtomicSymbol.html AtomicSymbol] interface. The prefix 'Atomic' suggests that the [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbols] cannot be divided so one might ask, 'how can an indivisible Symbol be divided into it's component parts?'. The full definition of the [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/AtomicSymbol.html AtomicSymbol] is that it cannot be divided into a simpler Symbol that is still part of the same [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Alphabet.html Alphabet]. The component parts of an [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/AtomicSymbol.html AtomicSymbol] from a [[Biojava:Cookbook:Alphabets:CrossProduct|CrossProductAlphabet]] are not members of the same [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Alphabet.html Alphabet] so the 'Atomic' definition still stands. A [[wp:codon|codon]] would be from the (DNA x DNA x DNA) Alphabet whereas the components of the [[wp:codon|codon]] [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Symbol.html Symbol] are from the DNA alphabet.
5
+
The [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbols] from a [[Biojava:Cookbook:Alphabets:CrossProduct|CrossProductAlphabet]] are implementations of the [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/AtomicSymbol.html AtomicSymbol] interface. The prefix 'Atomic' suggests that the [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbols] cannot be divided so one might ask, 'how can an indivisible Symbol be divided into it's component parts?'. The full definition of the [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/AtomicSymbol.html AtomicSymbol] is that it cannot be divided into a simpler Symbol that is still part of the same [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Alphabet.html Alphabet]. The component parts of an [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/AtomicSymbol.html AtomicSymbol] from a [[Biojava:Cookbook:Alphabets:CrossProduct|CrossProductAlphabet]] are not members of the same [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Alphabet.html Alphabet] so the 'Atomic' definition still stands. A [[wp:codon|codon]] would be from the (DNA x DNA x DNA) Alphabet whereas the components of the [[wp:codon|codon]] [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Symbol.html Symbol] are from the DNA alphabet.
6
6
7
-
Contrast this with the definition of a [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol]. A [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol] can be validly divided into components that are still part of the same [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/Alphabet.html Alphabet]. In this way a [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol] can be ambiguous. For further discussion of [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol] follow this [http://www.biojava.org/docs/api14/org/biojava/bio/symbol/BasisSymbol.html link].
7
+
Contrast this with the definition of a [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol]. A [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol] can be validly divided into components that are still part of the same [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/Alphabet.html Alphabet]. In this way a [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol] can be ambiguous. For further discussion of [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/BasisSymbol.html BasisSymbol] follow this [http://www.biojava.org/docs/api1.8/org/biojava/bio/symbol/BasisSymbol.html link].
0 commit comments