vina 虚拟筛选log文件的分析的脚本
由于附件中不能上传pl文件,你把后缀的doc去掉。脚本中已经包含了使用方法,vina筛选不明白的地方可以联系我。
#!/usr/bin/perl -w
use strict;
print "author: chenzhaoqiang;qq 744891290\n\n";
# 0 1 2 3
if(@ARGV<4)
{
print "usage: perl anly_log.pl -dir e:/log/ -output e:/result.txt
in the dir of log to save xxx.log
function: to anlyse the vina result : extract the best vina docking score
the result format is:
ligandname score
to deal with the log may have three case :
1 empty (in ./test/cmc_3d_9927.pdbqt.log);
2 no docking score(cmc_3d_2277.pdbqt.log);
3 success docking(cmc_3d_1394.pdbqt.log)\n";
#print $ARGV," -dir", $ARGV,"e:/log/";
}
opendir(DR,$ARGV)|| die "can find the dir of log";
my @files=readdir(DR);
if(@files<=2)
{
print "errir :this log dir is empty\n";
}
=pod
#to debug
print $#files,"\n";
print $files,$files,$files,"\n";
=cut
=pod
shift @files;
shift @files;
print $#files,"\n";
print $files;
=cut
###########################################
#put energy to hash table
my %hash;
shift @files;
shift @files;
foreach my $file(@files)
{
my $filepath=$ARGV.$file;
open FH,$filepath or die "in the log dir can't find the file $file";
my @text=<FH>;
close(FH);
if(@text>=28)
{
#print $text," ",$text,"\n";
if($text=~/will\s+be\s+(\S+)/)
{
my $ligandname=$1;
if($text=~/^\s+\d+\s+(\S+)/)
{
$hash{$ligandname}=$1;
}
}
else
{
print "error: the log file is not standard!!!\n";
}
}
}
###################################################
#sort by the energy
if(@ARGV==4)
{
open FF,">$ARGV";
foreach my $key(sort {$hash{$a}<=>$hash{$b}} keys %hash)
{
print FF "$key $hash{$key}\n";
}
print "congratulation!!! successs^^\n";
}
else
{
print "error ,in the command you should follow the format
usage: perl anly_log.pl -dir e:/log/ -output e:/result.txt\n";
}
大神,我用上面的脚本试了,一直出现 ”error: the log file is not standard!!! ”。不知道是哪里出问题了,请求帮忙分析下。
我用的是autodock_vina_1_1_2_win32.msi,所生成的log文件 中总共是34行,一般有9个pose。log文件示例如下:
“”“”
#################################################################
# If you used AutoDock Vina in your work, please cite: #
# #
# O. Trott, A. J. Olson, #
# AutoDock Vina: improving the speed and accuracy of docking #
# with a new scoring function, efficient optimization and #
# multithreading, Journal of Computational Chemistry 31 (2010)#
# 455-461 #
# #
# DOI 10.1002/jcc.21334 #
# #
# Please see http://vina.scripps.edu for more information. #
#################################################################
Reading input ... done.
Setting up the scoring function ... done.
Analyzing the binding site ... done.
Using random seed: 493456392
Performing search ... done.
Refining results ... done.
mode | affinity | dist from best mode
| (kcal/mol) | rmsd l.b.| rmsd u.b.
-----+------------+----------+----------
1 -7.2 0.000 0.000
2 -7.1 1.044 1.769
3 -7.0 2.642 5.304
4 -6.7 1.898 4.831
5 -6.6 1.568 2.499
6 -6.5 3.472 7.128
7 -6.5 3.442 5.705
8 -6.3 3.435 5.350
9 -6.3 3.827 5.811
Writing output ... done.
“”“”“” xufund 发表于 2016-4-27 22:06
谢谢分享。请问如何判断对接结果好还是不好的标准是什么?也就是说结合能一般大于多少算好?除了看结合能外 ...
找个阳性化合物做个对照。一般-10;结合模式 数据挖掘 发表于 2016-5-30 12:58
找个阳性化合物做个对照。一般-10;结合模式
谢谢回答。能具体说一下您编写的脚本怎么使用吗?linux新手,啥也不懂 做个记号,学习一下 不错 学习一下 谢谢分享 非常感谢,学习一下 谢谢分享。请问如何判断对接结果好还是不好的标准是什么?也就是说结合能一般大于多少算好?除了看结合能外,还要看哪些指标?阈值说多少
xufund 发表于 2016-5-30 22:09
谢谢回答。能具体说一下您编写的脚本怎么使用吗?linux新手,啥也不懂
从log文件中提取打分的 本帖最后由 phenylazide 于 2017-5-14 22:12 编辑
linux 下面,用grep命令一下就出来了.
页:
[1]
2