Conversion tables

BioSymbols.char_to_dnaConstant

Lookup table used for converting characters to DNA symbol values

The provided convert method should be used rather than this table, but you can use it if you insist and know what your are doing.

Note

The array is indexed by converting a character to an integer. When indexed, it returns a UInt8 with the bit pattern on the corresponding nucleic acid. The convert(DNA, x) method does this for you.

Warning

If you index this array with a character that is greater than 'ÿ', then you will get a bounds error. The convert(DNA, x) method checks such things to avoid this for you.

Warning

If you index this array with a character that does not have a corresonding DNA symbol, then you get a byte with the bit pattern 0x80, which is an invalid DNA symbol and will be of no use to you. The convert(DNA, x) checks such things for you and throws an exception gracefully if such a situation arises.

source
BioSymbols.dna_to_charConstant

Lookup table for converting DNA symbol values to characters

The provided convert method should be used rather than this table, but you can use it if you insist and know what your are doing.

Note

The array is indexed by reinterpreting a DNA symbol value as an UInt8. When indexed, it returns the character corresponding to the symbol. The convert(Char, x::DNA) method does this for you.

Warning

If you index this array with an invalid DNA symbol, then you will hit a bounds error. If you construct DNA symbols properly, then this scenario should never occur.

source
BioSymbols.char_to_rnaConstant

Lookup table used for converting characters to RNA symbol values

The provided convert method should be used rather than this table, but you can use it if you insist and know what your are doing.

Note

The array is indexed by converting a character to an integer. When indexed, it returns a UInt8 with the bit pattern on the corresponding nucleic acid. The convert(RNA, x) method does this for you.

Warning

If you index this array with a character that is greater than 'ÿ', then you will get a bounds error. The convert(RNA, x) method checks such things to avoid this for you.

Warning

If you index this array with a character that does not have a corresonding RNA symbol, then you get a byte with the bit pattern 0x80, which is an invalid RNA symbol and will be of no use to you. The convert(RNA, x) checks such things for you and throws an exception gracefully if such a situation arises.

source
BioSymbols.rna_to_charConstant

Lookup table for converting RNA symbol values to characters

The provided convert method should be used rather than this table, but you can use it if you insist and know what your are doing.

Note

The array is indexed by reinterpreting a RNA symbol value as an UInt8. When indexed, it returns the character corresponding to the symbol. The convert(Char, x::RNA) method does this for you.

Warning

If you index this array with an invalid RNA symbol, then you will hit a bounds error. If you construct RNA symbols properly, then this scenario should never occur.

source