-- This is the set of NCBI sequence code tables
-- J.Ostell  10/18/91
--

Seq-code-set ::= {
    codes {                              -- codes
        {                                -- IUPACna
            code iupacna ,
            num 25 ,                     -- continuous 65-89
            one-letter TRUE ,            -- all one letter codes
            start-at 65 ,                -- starts with A, ASCII 65
            table {
                { symbol "A", name "Adenine" },
                { symbol "B" , name "G or T or C" },
                { symbol "C", name "Cytosine" },
                { symbol "D", name "G or A or T" },
                { symbol "", name "" },
                { symbol "", name "" },
                { symbol "G", name "Guanine" },
                { symbol "H", name "A or C or T" } ,
                { symbol "", name "" },
                { symbol "", name "" },
                { symbol "K", name "G or T" },
                { symbol "", name ""},
                { symbol "M", name "A or C" },
                { symbol "N", name "A or G or C or T" } ,
                { symbol "", name "" },
                { symbol "", name "" },
                { symbol "", name ""},
                { symbol "R", name "G or A"},
                { symbol "S", name "G or C"},
                { symbol "T", name "Thymine"},
                { symbol "", name ""},
                { symbol "V", name "G or C or A"},
                { symbol "W", name "A or T" },
                { symbol "", name ""},
                { symbol "Y", name "T or C"}
            } ,                           -- end of table
            comps {                      -- complements
                84,
                86,
                71,
                72,
                69,
                70,
                67,
                68,
                73,
                74,
                77,
                76,
                75,
                78,
                79,
                80,
                81,
                89,
                83,
                65,
                85,
                66,
                87,
                88,
                82
            }
        } ,
        {                                -- IUPACaa
            code iupacaa ,
            num 26 ,                     -- continuous 65-90
            one-letter TRUE ,            -- all one letter codes
            start-at 65 ,                -- starts with A, ASCII 65
            table {
                { symbol "A", name "Alanine" },
                { symbol "B" , name "Asp or Asn" },
                { symbol "C", name "Cysteine" },
                { symbol "D", name "Aspartic Acid" },
                { symbol "E", name "Glutamic Acid" },
                { symbol "F", name "Phenylalanine" },
                { symbol "G", name "Glycine" },
                { symbol "H", name "Histidine" } ,
                { symbol "I", name "Isoleucine" },
                { symbol "", name "" },
                { symbol "K", name "Lysine" },
                { symbol "L", name "Leucine" },
                { symbol "M", name "Methionine" },
                { symbol "N", name "Asparagine" } ,
                { symbol "", name "" },
                { symbol "P", name "Proline" },
                { symbol "Q", name "Glutamine"},
                { symbol "R", name "Arginine"},
                { symbol "S", name "Serine"},
                { symbol "T", name "Threonine"},
                { symbol "", name ""},
                { symbol "V", name "Valine"},
                { symbol "W", name "Tryptophan" },
                { symbol "X", name "Undetermined or atypical"},
                { symbol "Y", name "Tyrosine"},
                { symbol "Z", name "Glu or Gln" }
            }                            -- end of table            
        } ,
        {                                -- IUPACeaa
            code ncbieaa ,
            num 49 ,                     -- continuous 42-90
            one-letter TRUE ,            -- all one letter codes
            start-at 42 ,                -- starts with *, ASCII 42
            table {
                { symbol "*", name "Termination" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "-", name "Gap" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "", name "" } ,
                { symbol "A", name "Alanine" },
                { symbol "B" , name "Asp or Asn" },
                { symbol "C", name "Cysteine" },
                { symbol "D", name "Aspartic Acid" },
                { symbol "E", name "Glutamic Acid" },
                { symbol "F", name "Phenylalanine" },
                { symbol "G", name "Glycine" },
                { symbol "H", name "Histidine" } ,
                { symbol "I", name "Isoleucine" },
                { symbol "", name "" },
                { symbol "K", name "Lysine" },
                { symbol "L", name "Leucine" },
                { symbol "M", name "Methionine" },
                { symbol "N", name "Asparagine" } ,
                { symbol "", name "" },
                { symbol "P", name "Proline" },
                { symbol "Q", name "Glutamine"},
                { symbol "R", name "Arginine"},
                { symbol "S", name "Serine"},
                { symbol "T", name "Threonine"},
                { symbol "U", name "Selenocysteine"},
                { symbol "V", name "Valine"},
                { symbol "W", name "Tryptophan" },
                { symbol "X", name "Undetermined or atypical"},
                { symbol "Y", name "Tyrosine"},
                { symbol "Z", name "Glu or Gln" }
            }                            -- end of table            
        } ,
        {                                -- IUPACaa3
            code iupacaa3 ,
            num 26 ,                     -- continuous 0-25
            one-letter FALSE ,            -- all 3 letter codes
            table {
                { symbol "---", name "Gap" } ,
                { symbol "Ala", name "Alanine" },
                { symbol "Asx" , name "Asp or Asn" },
                { symbol "Cys", name "Cysteine" },
                { symbol "Asp", name "Aspartic Acid" },
                { symbol "Glu", name "Glutamic Acid" },
                { symbol "Phe", name "Phenylalanine" },
                { symbol "Gly", name "Glycine" },
                { symbol "His", name "Histidine" } ,
                { symbol "Ile", name "Isoleucine" },
                { symbol "Lys", name "Lysine" },
                { symbol "Leu", name "Leucine" },
                { symbol "Met", name "Methionine" },
                { symbol "Asn", name "Asparagine" } ,
                { symbol "Pro", name "Proline" },
                { symbol "Gln", name "Glutamine"},
                { symbol "Arg", name "Arginine"},
                { symbol "Ser", name "Serine"},
                { symbol "Thr", name "Threonine"},
                { symbol "Val", name "Valine"},
                { symbol "Trp", name "Tryptophan" },
                { symbol "Xxx", name "Undetermined or atypical"},
                { symbol "Tyr", name "Tyrosine"},
                { symbol "Glx", name "Glu or Gln" },
                { symbol "Sec", name "Selenocysteine"},
                { symbol "Ter", name "Termination" } 
            }                            -- end of table            
        } ,
        {                                -- NCBIstdaa
            code ncbistdaa ,
            num 26 ,                     -- continuous 0-25
            one-letter TRUE ,            -- all one letter codes
            table {
                { symbol "-", name "Gap" } ,                -- 0
                { symbol "A", name "Alanine" },             -- 1
                { symbol "B" , name "Asp or Asn" },         -- 2
                { symbol "C", name "Cysteine" },            -- 3
                { symbol "D", name "Aspartic Acid" },       -- 4
                { symbol "E", name "Glutamic Acid" },       -- 5
                { symbol "F", name "Phenylalanine" },       -- 6
                { symbol "G", name "Glycine" },             -- 7
                { symbol "H", name "Histidine" } ,          -- 8
                { symbol "I", name "Isoleucine" },          -- 9
                { symbol "K", name "Lysine" },              -- 10
                { symbol "L", name "Leucine" },             -- 11
                { symbol "M", name "Methionine" },          -- 12
                { symbol "N", name "Asparagine" } ,         -- 13
                { symbol "P", name "Proline" },             -- 14
                { symbol "Q", name "Glutamine"},            -- 15
                { symbol "R", name "Arginine"},             -- 16
                { symbol "S", name "Serine"},               -- 17
                { symbol "T", name "Threoine"},             -- 18
                { symbol "V", name "Valine"},               -- 19
                { symbol "W", name "Tryptophan" },          -- 20
                { symbol "X", name "Undetermined or atypical"},  -- 21
                { symbol "Y", name "Tyrosine"},             -- 22
                { symbol "Z", name "Glu or Gln" },          -- 23
                { symbol "U", name "Selenocysteine"},       -- 24 
                { symbol "*", name "Termination" }          -- 25
            }                            -- end of table            
        } ,
        {                                -- NCBI2na
            code ncbi2na ,
            num 4 ,                     -- continuous 0-3
            one-letter TRUE ,            -- all one letter codes
            table {
                { symbol "A", name "Adenine" },
                { symbol "C", name "Cytosine" },
                { symbol "G", name "Guanine" },
                { symbol "T", name "Thymine/Uracil"}
            } ,                          -- end of table            
            comps {                      -- complements
                3,
                2,
                1,
                0
            }
        } ,
        {                                -- NCBI4na
            code ncbi4na ,
            num 16 ,                     -- continuous 0-15
            one-letter TRUE ,            -- all one letter codes
            table {
                { symbol "-", name "Gap" } ,
                { symbol "A", name "Adenine" },
                { symbol "C", name "Cytosine" },
                { symbol "M", name "A or C" },
                { symbol "G", name "Guanine" },
                { symbol "R", name "G or A"},
                { symbol "S", name "G or C"},
                { symbol "V", name "G or C or A"},
                { symbol "T", name "Thymine/Uracil"},
                { symbol "W", name "A or T" },
                { symbol "Y", name "T or C"} ,
                { symbol "H", name "A or C or T" } ,
                { symbol "K", name "G or T" },
                { symbol "D", name "G or A or T" },
                { symbol "B" , name "G or T or C" },
                { symbol "N", name "A or G or C or T" }
            } ,                           -- end of table            
            comps {                       -- complements
                0 ,
                8 ,
                4 ,
                12,
                2 ,
                10,
                6 ,
                14,
                1 ,
                9 ,
                5 ,
                13,
                3 ,
                11,
                7 ,
                15
            }
        } ,
    } ,                                  -- end of codes
    maps {
        {
            from iupacna ,
            to ncbi2na ,
            num 25 ,
            start-at 65 ,
            table {
                0,     -- A -> A
                1,     -- B -> C
                1,     -- C -> C
                2,     -- D -> G
                255,
                255,
                2,     -- G -> G
                0,     -- H -> A
                255,
                255,
                2,     -- K -> G
                255,
                1,     -- M -> C
                0,     -- N -> A
                255,
                255,
                255,
                2,     -- R -> G
                1,     -- S -> C
                3,     -- T -> T
                255,
                0,     -- V -> A
                3,     -- W -> T
                255,
                3 }    -- Y -> T
        } ,
        {
            from iupacna ,
            to ncbi4na ,
            num 26 ,
            start-at 64 ,
            table {
		0,     -- @ used by FastaToSeqEntry to convert hyphen to gap
                1,     -- A
                14,    -- B
                2,     -- C
                13,    -- D
                255,
                255,
                4,     -- G
                11,    -- H
                255,
                255,
                12,    -- K
                255,
                3,     -- M
                15,    -- N
                255,
                255,
                255,
                5,     -- R
                6,     -- S
                8,     -- T
                255,
                7,     -- V
                9,     -- W
                255,
                10 }   -- Y
        } ,
        {
            from ncbi2na ,
            to iupacna ,
            num 4 ,
            table {
                65,     -- A
                67,     -- C
                71,     -- G
                84 }    -- T
        } ,
        {
            from ncbi2na ,
            to ncbi4na ,
            num 4 ,
            table {
                1,     -- A
                2,     -- C
                4,     -- G
                8 }    -- T
        } ,
        {
            from ncbi4na ,
            to iupacna ,
            num 16 ,
            table {
                78,    -- gap -> N
                65,    -- A
                67,    -- C
                77,    -- M
                71,    -- G
                82,    -- R
                83,    -- S
                86,    -- V
                84,    -- T
                87,    -- W
                89,    -- Y
                72,    -- H
                75,    -- K
                68,    -- D
                66,    -- B
                78 }   -- N
        } ,
        {
            from ncbi4na ,
            to ncbi2na ,
            num 16 ,
            table {
                3,    -- gap -> T
                0,    -- A -> A
                1,    -- C -> C
                1,    -- M -> C
                2,    -- G -> G
                2,    -- R -> G
                1,    -- S -> C
                0,    -- V -> A
                3,    -- T -> T
                3,    -- W -> T
                3,    -- Y -> T
                0,    -- H -> A
                2,    -- K -> G
                2,    -- D -> G
                1,    -- B -> C
                0 }   -- N -> A
        } ,
        {
            from iupacaa ,
            to ncbieaa ,
            num 26 ,
            start-at 65 ,
            table {
                65 ,    -- they map directly
                66 ,
                67 ,
                68,
                69,
                70,
                71,
                72,
                73,
                255,  -- J
                75,
                76,
                77,
                78,
                255,  -- O
                80,
                81,
                82,
                83,
                84,
                255,  -- U
                86,
                87,
                88,
                89,
                90 }
        } ,
        {
            from ncbieaa ,
            to iupacaa ,
            num 49 ,
            start-at 42 ,
            table {
                88 ,   -- termination -> X
                255,
                255,
                88,    -- Gap -> X
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                65 ,    -- from here they map directly
                66 ,
                67 ,
                68,
                69,
                70,
                71,
                72,
                73,
                255,  -- J
                75,
                76,
                77,
                78,
                255,  -- O
                80,
                81,
                82,
                83,
                84,
                88,  -- U -> X
                86,
                87,
                88,
                89,
                90 }
        } ,
        {
            from iupacaa ,
            to ncbistdaa ,
            num 26 ,
            start-at 65 ,
            table {
                1 ,    -- they map directly
                2 ,
                3 ,
                4,
                5,
                6,
                7,
                8,
                9,
                255,  -- J
                10,
                11,
                12,
                13,
                255,  -- O
                14,
                15,
                16,
                17,
                18,
                255,  -- U
                19,
                20,
                21,
				22,
                23 }
        } ,
        {
            from ncbieaa ,
            to ncbistdaa ,
            num 49 ,
            start-at 42 ,
            table {
                25,   -- termination
                255,
                255,
                0,    -- Gap
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                255,
                1 ,    -- they map directly
                2 ,
                3 ,
                4,
                5,
                6,
                7,
                8,
                9,
                255,  -- J
                10,
                11,
                12,
                13,
                255,  -- O
                14,
                15,
                16,
                17,
                18,
                24,  -- U
                19,
                20,
                21,
                22,
                23 }
        }  ,
        {
            from ncbistdaa ,
            to ncbieaa ,
            num 26 ,
            table {
                45 ,  --   "-"
                65 ,    -- they map directly with holes for O and J
                66 ,
                67 ,
                68,
                69,
                70,
                71,
                72,
                73,
                75,
                76,
                77,
                78,
                80,
                81,
                82,
                83,
                84,
                86,
                87,
                88,
                89,
                90,
                85,	 -- U
                42}  -- *
        } ,
        {
            from ncbistdaa ,
            to iupacaa ,
            num 26 ,
            table {
                255 ,  --   "-"
                65 ,    -- they map directly with holes for O and J
                66 ,
                67 ,
                68,
                69,
                70,
                71,
                72,
                73,
                75,
                76,
                77,
                78,
                80,
                81,
                82,
                83,
                84,
                86,
                87,
                88,
                89,
                90,
                88,  -- U
                255}  -- *
        } 
    }
}    -- end of seq-code-set

