[BioRuby] How to renumber a PDB file using BioRuby ?

K. Shameer shameer at ncbs.res.in
Thu Apr 10 08:49:11 UTC 2008


Hi,

I automated Alex's (thanks a lot, alex) script and finished my renumbering
job :)

> ruby renumber.rb xxxx.pdb step_size

__START__

require 'bio'
pdb = Bio::PDB.new(File.read(ARGV[0]))
step_size = ARGV[1]
pdb.each_atom do |atom|
  atom.resSeq += step_size.to_i
end
puts pdb

__END__

K. Shameer




More information about the BioRuby mailing list