Modeller使用入門


Tutorial of Basic:http://salilab.org/modeller/tutorial/basic.html

 

一、Modeller環境准備

1、Python安裝

  • 下載地址:http://python.org/ftp/python/2.7.3/python-2.7.3.msi
  • 下載完,直接雙擊安裝
  • 在CMD命令行里輸入python,如果進不了如下所述的python shell,則需要配置環境變量
  • 將Python的安裝目錄“E:\Python27”添加到環境變量的path里面
C:\Program Files\Modeller9.11>python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>>

 

2、Modeller安裝

 

3、Input、Output文件下載

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

二、Modeller腳本運行

1、雙擊腳本運行

2、IDLE打開腳本==》Run==》Run Module  F5

3、CMD命令行運行

  • 如果直接在命令行里“C:\>C:\basic-example\build_profile.py”會報IOError錯,文件路徑錯誤

  • 解決方式:修改build_profile.py中的文件路徑

 

三、Modeller腳本修改

  • 修改前
from modeller import *

log.verbose()
env = environ()

#-- Prepare the input files

#-- Read in the sequence database
sdb = sequence_db(env)
sdb.read(seq_database_file='pdb_95.pir', seq_database_format='PIR',
         chains_list='ALL', minmax_db_seq_len=(30, 4000), clean_sequences=True)

#-- Write the sequence database in binary form
sdb.write(seq_database_file='pdb_95.bin', seq_database_format='BINARY',
          chains_list='ALL')

#-- Now, read in the binary database
sdb.read(seq_database_file='pdb_95.bin', seq_database_format='BINARY',
         chains_list='ALL')

#-- Read in the target sequence/alignment
aln = alignment(env)
aln.append(file='TvLDH.ali', alignment_format='PIR', align_codes='ALL')

#-- Convert the input sequence/alignment into
#   profile format
prf = aln.to_profile()

#-- Scan sequence database to pick up homologous sequences
prf.build(sdb, matrix_offset=-450, rr_file='${LIB}/blosum62.sim.mat',
          gap_penalties_1d=(-500, -50), n_prof_iterations=1,
          check_profile=False, max_aln_evalue=0.01)

#-- Write out the profile in text format
prf.write(file='build_profile.prf', profile_format='TEXT')

#-- Convert the profile back to alignment format
aln = prf.to_alignment()

#-- Write out the alignment file
aln.write(file='build_profile.ali', alignment_format='PIR')
  • 修改后
from modeller import *

log.verbose()
env = environ()

path = "C://basic-example/"

#-- Prepare the input files

#-- Read in the sequence database
sdb = sequence_db(env)
sdb.read(seq_database_file=path+'pdb_95.pir', seq_database_format='PIR',
         chains_list='ALL', minmax_db_seq_len=(30, 4000), clean_sequences=True)

#-- Write the sequence database in binary form
sdb.write(seq_database_file=path+'pdb_95.bin', seq_database_format='BINARY',
          chains_list='ALL')

#-- Now, read in the binary database
sdb.read(seq_database_file=path+'pdb_95.bin', seq_database_format='BINARY',
         chains_list='ALL')

#-- Read in the target sequence/alignment
aln = alignment(env)
aln.append(file=path+'TvLDH.ali', alignment_format='PIR', align_codes='ALL')

#-- Convert the input sequence/alignment into
#   profile format
prf = aln.to_profile()

#-- Scan sequence database to pick up homologous sequences
prf.build(sdb, matrix_offset=-450, rr_file='${LIB}/blosum62.sim.mat',
          gap_penalties_1d=(-500, -50), n_prof_iterations=1,
          check_profile=False, max_aln_evalue=0.01)

#-- Write out the profile in text format
prf.write(file=path+'build_profile.prf', profile_format='TEXT')

#-- Convert the profile back to alignment format
aln = prf.to_alignment()

#-- Write out the alignment file
aln.write(file=path+'build_profile.ali', alignment_format='PIR')

raw_input()

 

四、Python版本需求

  理論上應該是可以支持所有python版本的,但是對於Python 2.5的支持有些問題

  對於Python 2.5會報如下的錯,因為“C:\Program Files\Modeller9.11\modlib\python2.5”目錄下沒有_modeller.pyd這個文件,導致程序運行到“C:\Program Files\Modeller9.11\modlib\modeller\__init__.py”里的“import _modeller”時,出現錯誤

# Set Modeller install location and license
import _modeller
if hasattr(config, 'license'):
    _modeller.mod_license_key_set(config.license)
if hasattr(config, 'install_dir'):
    _modeller.mod_install_dir_set(config.install_dir)

_modeller.mod_start()

  所以,推薦安裝最新版本的Python


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM