Method: Bio::Sequence::AA#codes

Defined in:
lib/bio/sequence/aa.rb

#codesObject

Generate the list of the names of each residue along with the sequence (3 letters code). Codes used in bioruby are found in the Bio::AminoAcid::NAMES hash.

s = Bio::Sequence::AA.new("RRLE")
puts s.codes                        #=> ["Arg", "Arg", "Leu", "Glu"]

Returns

Array object



95
96
97
98
99
100
101
# File 'lib/bio/sequence/aa.rb', line 95

def codes
  array = []
  self.each_byte do |x|
    array.push(Bio::AminoAcid.names[x.chr])
  end
  return array
end