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安装
- 下载地址: http://salilab.org/modeller/download_installation.html
- 下载完,直接双击安装
- 安装过程中需要输入一个LICENSEE,申请地址:http://salilab.org/modeller/registration.html
- 需要教育网邮箱,所以我直接在网上找了一个LICENSEE
- LICENSEE:“MODELIRANJE”(From:http://www.mdbbs.org/thread-24166-1-1.html)
3、Input、Output文件下载
- 下载地址:http://salilab.org/modeller/tutorial/basic-example.zip
- 直接解压,里面是输入、输出文件,以及.py脚本
二、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