背景:
所筛选的小分子库不是商业库,筛完药以后,我们会得到打分比较靠前的化合物,这时候我们需要想办法购买。
chemical book上面有供应商的信息,是根据cas号查询的。
利用chemical book网站,化合物的cas号以及perl,告诉你那些化合物是买的到的。
脚本puravailable.pl
puravailable.pl
:
===============================================
#!/usr/bin/perl -w
use strict;
use LWP::Simple;
#use Encode;
use utf8;
binmode(STDIN, :encoding(utf8)
binmode(STDOUT, :encoding(utf8)
binmode(STDERR, :encoding(utf8)
#funciont: according the cas id to report the chemical is available in china
#usage:perl puravailable.pl -input cas.txt -output buy.txt
#author :Zhaoqiang Chen 744891290@qq.com
my $name;
my $baseurl= http://www.chemicalbook.com/Search.aspx?keyword=
my $url;
if(@ARGV!=4)
{
$name= 11006-56-7
print #usage:perl puravailable.pl -input cas.txt -output buy.txt
$url= $baseurl . $name
#print $url;
my $content=get($url);
if($content=~/国内供应商(\\(\\d+\\))/)
{
print example:11006-56-7 have
print $1;
print vendors in china,the details in chemical book\\n
}
print \\n
}
else
{
open FH,$ARGV[1];
open FF, $ARGV[3]
while( FH )
{
chomp($_);
$name=$_;
$url= $baseurl . $name
my $content=get($url);
if($content=~/国内供应商\\((\\d+)\\)/)
{
print $_ have
print $1;
print vendors in china,the details in chemical book\\n
print FF $_
print FF $1;
print FF n
}
}
}
转载本文请联系原作者获取授权,同时请注明本文来自陈照强科学网博客。
链接地址:http://blog.sciencenet.cn/blog-950202-737517.html
上一篇:vina怎么高通量筛选(参数,速度,精度)
下一篇:perl的LWP 和linux 的crontab每天自动到小木虫上取金币
本文链接: http://murlinchemical.immuno-online.com/view-739155.html