lib/PDB/molecule.rb
# Extract sequence from input PDB after loading atoms, can't be used in initializer
# Sequences are extracted as an array of strings for each chain
# Resids are also collected for each chain
Extract sequence from input PDB after loading atoms, can't be used in initializer
Sequences are extracted as an array of strings for each chain
Resids are also collected for each chain
Extract sequence from input PDB after loading atoms can ' t be used in initializer Sequences are extracted as an array of strings for each chain Resids are also collected for each chain
def extractSequence
      @index_of_last_residue_added = @residues.first.resid;
      @residues.each do |res|
        @sequence << res.resname
        @resids << res.resid
        if ( (res.resid - @index_of_last_residue_added) > 1)
          @chain_breaks << @index_of_last_residue_added
        end
        @index_of_last_residue_added = res.resid
      end
    end
def extractSequence @index_of_last_residue_added = @residues . first . resid ; @residues . each do | res | @sequence << res . resname @resids << res . resid if ( ( res . resid - @index_of_last_residue_added ) > 1 ) @chain_breaks << @index_of_last_residue_added end @index_of_last_residue_added = res . resid end end
Extract sequence from input PDB after loading atoms, can't be used in initializer
Sequences are extracted as an array of strings for each chain
Resids are also collected for each chain
Extract sequence from input PDB after loading atoms can ' t be used in initializer Sequences are extracted as an array of strings for each chain Resids are also collected for each chain
#@sequence << first # detect discontinuities in chain