lib/PDB/atom.rb
# Convert 3-letter residue to 1-letter
# input is a string
Convert 3-letter residue to 1-letter
input is a string
Convert 3 - letter residue to 1 - letter input is a string
def convert_to_one_letter(residue)
      res = {
          "GUA" => "G",
          "ADE" => "A",
          "CYT" => "C",
          "URI" => "U",
          "THY" => "T",
          "Gr" => "G",
          "Ar" => "A",
          "Cr" => "C",
          "Ur" => "U",
          "ALA" => "A",
          "ARG" => "R",
          "ASN" => "N",
          "ASP" => "D",
          "CYS" => "C",
          "GLU" => "E",
          "GLN" => "Q",
          "GLY" => "G",
          "HIS" => "H",
          "ILE" => "I",
          "LEU" => "L",
          "LYS" => "K",
          "MET" => "M",
          "PHE" => "F",
          "PRO" => "P",
          "SER" => "S",
          "THR" => "T",
          "TRP" => "W",
          "TYR" => "Y",
          "VAL" => "V",
          "SEC" => "U",
          "PCA" => "J"
      }
      return res[residue]
    end
def convert_to_one_letter ( residue ) res = { "GUA" => "G" , "ADE" => "A" , "CYT" => "C" , "URI" => "U" , "THY" => "T" , "Gr" => "G" , "Ar" => "A" , "Cr" => "C" , "Ur" => "U" , "ALA" => "A" , "ARG" => "R" , "ASN" => "N" , "ASP" => "D" , "CYS" => "C" , "GLU" => "E" , "GLN" => "Q" , "GLY" => "G" , "HIS" => "H" , "ILE" => "I" , "LEU" => "L" , "LYS" => "K" , "MET" => "M" , "PHE" => "F" , "PRO" => "P" , "SER" => "S" , "THR" => "T" , "TRP" => "W" , "TYR" => "Y" , "VAL" => "V" , "SEC" => "U" , "PCA" => "J" } return res [ residue ] end
Convert 3-letter residue to 1-letter
input is a string
Convert 3 - letter residue to 1 - letter input is a string
residue
<not_specific>