PDBãã¡ã¤ã«ã«å¤ç°ãå ¥ããããã°ã©ã (Ruby)ã
ç 究室ã§ã¡ãã£ã¨ããããã°ã©ã ã使ãå¿
è¦ãåºããã®ã§ä½ã£ãã
PDBãã¡ã¤ã«ã®ç¹å®ã®æ®åºåãæ¸ãæããå¾ãAMBERããã±ã¼ã¸ã使ã£ã¦é©åãªæ§é ã«ç´ãã¦ãååååå¦è¨ç®(MDè¨ç®)ãè¡ãããã®PDBãã¡ã¤ã«ã®æ¸ãæããèªåã§ãã£ã¦ãããããã°ã©ã ï¼PDBãæè©®ã¯ããã¹ããã¡ã¤ã«ãªã®ã§ï¼ã
BioRubyã使ã£ã¦ããããã ãï¼ã¨ããããã®æ¹ã楽ï¼ããããªæã§ããªãã¨ããã°ã©ã æ¸ããªãããç·´ç¿ãã¦ãã«ãã¾ãä½ãããä¹
ãã¶ãã«Rubyã£ã¦ã¿ããã£ãã...ã¨ããããã§å°é¢¨ã®åæã家ã«ããã£ã¦æ¸ãä¸ããå¤ç°ä½ä½æããã°ã©ã (ä¸å¥åº·ãªã®ã§ææ¥ã¯åºãããã)ã
100è¡è¶³ããã®çãããã°ã©ã ã ããçµæ§æºè¶³ã次ã¯å¤ç°å
¥ãããããããçµã¿åããã¦ãã¤ãã¼åãã((20Ã20-20)/2)éãã®ãããä½ãä½ãå¿
è¦ãããã®ã§ããããä½ããããªã
使ãæ¹ã
å¼æ°ã¨ãã¦é ã«ãå¤ç°ãå ¥ãããPDBããæ®åºçªå·ããå¤ãããã¢ããé ¸ããæå®ããã
> pdbmutator.rb pdbfile target_residue_number mutation
mutationã¯å¤§æåä¸åã®ã¢ããé
¸ç¥ç§°ãæ³å®ã
ãã¨ãã°2zta.pdbã¨ãããã¡ã¤ã«ã®30æ®åºç®ãã°ãªã·ã³ã«ãããå ´åã¯ã
> pdbmutator.rb 2zta.pdb 30 GLY
ä¸å¿å¤ç°ã¨è¨ã£ã¦ãé侵襲çã§ãå
ã®PDBãæ®ããªããæ°ããªPDBãã¡ã¤ã«ãä½ãã
å¤ç°ä½ãã¡ã¤ã«ã¯ãä¸ã®ä¾ã§è¨ãã¨2zta.pdb_30toGã¨ãã表è¨ã«ãªãã
èªåã®ç 究ï¼æ°åæ®åºã®ããããããæ±ããªãï¼ç¨ã«ä½ã£ãã®ã§ãåºã使ãã¨ããããåé¡ãåºããã ãªã
#! /usr/bin/ruby # # ---usage--- # # > pdbmutator.rb PDBFILENAME TARGET_RSD MUTATION # # <todo> # - when raw pdb is loaded, strip header and footer... Names = { 'ALA' => 'A', 'CYS' => 'C', 'ASP' => 'D', 'GLU' => 'E', 'PHE' => 'F', 'GLY' => 'G', 'HIS' => 'H', 'ILE' => 'I', 'LYS' => 'K', 'LEU' => 'L', 'MET' => 'M', 'ASN' => 'N', 'PRO' => 'P', 'GLN' => 'Q', 'ARG' => 'R', 'SER' => 'S', 'THR' => 'T', 'VAL' => 'V', 'TRP' => 'W', 'TYR' => 'Y' } if ARGV[0] == nil || ARGV[1] == nil || ARGV[2] == nil print("usage:"+"\n"+ "> pdbmutator.rb PDBFILENAME TARGET_RSD MUTATION") exit end require 'fileutils.rb' filename = ARGV[0] workfile = filename + "_tmp" FileUtils.cp(filename, workfile) target_rsd = ARGV[1].to_i mutation = ARGV[2] open(workfile){|a| residno = -1 prev_residno = -2 uni = File.open("#{filename}_#{target_rsd}to#{Names[mutation]}", "w") ######################## line loop start ######################## while line = a.gets column = line.split(/\s+/) ### a sample of read "column" #### ### ["ATOM", "12", "N", "MET", "A", "2", ### "37.447", "16.947", "15.901", "1.00", "33.89", "N"] ### unless line is "TER" or "END"# if column[0] == "ATOM" then ### Terminal resid names may be joined w/ the atom name.# ### In such a case, you need to fix it. # if column[2].length > 4 then tmpatom = column[2][0..2] tmpresidue = column[2][3..column[2].length] ### insert the "atom" in column[2] # ### and replace column[3] to the real resid.# column[2,0] = tmpatom column[3] = tmpresidue end ### just a output ajustment.# ### inform the sequence now processing.# residno = column[5].to_i if residno != prev_residno print "#{residno}: #{column[3]} " if (residno % 5 == 0) || residno == target_rsd print "\n" end end ####################################################################### ######################## when target resid No. ######################## ####################################################################### if residno == target_rsd resid0 = column[3] line = line.sub(/#{resid0}/, "#{mutation}") puts "ATOM No. #{column[1]}: #{resid0} has been mutated to #{mutation}" end ####################################################################### end # unless line is "TER" or "END" uni.puts <<-"EOB" #{line.strip} EOB prev_residno = residno end ######################## line loop end ######################## }