主要内容

从MATLAB®调用BIoPerl函数

此示例显示了MATLAB®和BIoPerl的互操作性 - 将MATLAB与Perl脚本传递给Perl脚本以及将Blast搜索数据拉回Matlab的互操作性。

注意:必须安装Perl和BioPerl模块以在此示例中运行Perl脚本。自版本1.4以来,BioPerl模块具有警告。Perl的Per依赖性需要至少5.6版。如果您遇到困难运行Perl脚本,请确保Perl5lib环境变量包括BioPerl安装的路径或尝试从BioPerl安装目录运行。查看链接https://www.perl.com.https://bioperl.org/有关当前发布文件和完整的安装说明。

介绍

Gleevec™(STI571或Imatinib甲磺酸盐)是第一个特异性地关闭已知癌症蛋白质的信号的批准药物。最初批准治疗慢性髓性白血病(CML),它也有效地治疗胃肠道间质肿瘤(GIST)。

研究已经确定了几个Gleevec的基因靶点,包括原癌基因酪氨酸蛋白激酶ABL1 (NP_009297)、原癌基因酪氨酸蛋白激酶Kit (NP_000213)和血小板衍生生长因子受体α前体(NP_006197)。

target_ABL1 ='np_009297';target_Kit =“NP_000213”;target_pdgfra =.'np_006197'

访问序列信息

可以使用以下方法从本地GenPept文本文件加载这些蛋白质的序列信息genpeptread

ABL1_seq = getfield (genpeptread ('abl1_gp.txt'),“序列”);Kit_seq = getfield (genpeptread ('kit_gp.txt'),“序列”);pdgfra_seq = getfield(genpeptread('pdgfra_gp.txt'),“序列”);

或者,您可以直接从国家生物技术信息中心(NCBI)维护的在线Genpept数据库中获得蛋白质信息。

运行这些命令以从NCBI下载数据:

% ABL1_seq = getgenpept(target_ABL1, 'SequenceOnly', true);% Kit_seq = getgenpept(target_Kit, 'SequenceOnly', true);% PDGFRA_seq = getgenpept(target_PDGFRA, 'SequenceOnly', true); / /锁定目标

matlab.命令提供有关这些序列大小的信息。

abl1_seq.Kit_seqpdgfra_seq.
名称大小字节类属性abl1_seq 1x1149 2298 char name大小字节类属性kit_seq 1x976 1952 char name大小字节类属性pdgfra_seq 1x1089 2178 char

从Matlab调用Perl程序

来自MATLAB,您可以利用现有的BIoPerl模块在这些序列上运行BLAST搜索。MW_BLAST.PL是基于RelmembLast BioPerl模块的Perl程序。它读取来自Fasta文件的序列,因此首先为每个序列创建Fasta文件。

fastawrite ('abl1.fa''Abl1原癌基因酪氨酸蛋白激酶(NP_009297)', ABL1_seq);fastawrite ('kit.fa'原癌基因酪氨酸蛋白激酶试剂盒(NP_000213),kit_seq);fastawrite (“PDGFRA.fa”'pdgfra alpha precesor(np_006197)',pdgfra_seq);

BLAST搜索可能需要很长时间才能返回结果,Perl程序MW_BLAST包含一个重复的睡眠状态来等待报告。示例结果已经包含在本示例中,但是如果您想尝试使用三个序列运行BLAST搜索,请取消以下命令的注释。pl将BLAST结果保存在磁盘上的三个文件ABL1中。工具包。PDGFRA.out。这个过程可能需要15分钟或更长时间。

% 尝试%perl('mw_blast.pl','blastp','pdb','1e-10','abl1.fa','kit.fa','pdgfra.fa');%抓%错误(消息('BioInfo:BioPerldemo:PerlError'))%结束

这是mw_blast的perl代码:

类型mw_blast.pl.
#!/ usr / bin / perl -w使用bio ::工具:: run :: remoteblast;使用严格;使用5.006;#基于RemoteBlast.PM BioPerl模块的示例BLAST程序。取#参数进行BLAST搜索程序,数据库和期望#或E-Value(默认值:BLASTP,PDB,1E-10),然后是包含要搜索的序列的FastA文件#列表。#版权所有2003-2004 MathWorks,Inc。#检索参数和设置参数My $ prog = shift @argv;我的$ db = shift @argv;我的$ e_val = shift @argv;我的@params =('-prog'=> $ prog,'-data'=> $ db,'-expect'=> $ e_val,'-readmethod'=>'searchio');#创建一个远程BLAST FACTURE MY $ Factory = Bio :: Tools :: Run :: RemoteBlast-> New(@params); # Change a parameter in RemoteBlast $Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'} = 'Homo sapiens [ORGN]'; # Remove a parameter from RemoteBlast delete $Bio::Tools::Run::RemoteBlast::HEADER{'FILTER'}; # Submit each file while ( defined($ARGV[0])) { my $fa_file = shift @ARGV; my $str = Bio::SeqIO->new(-file=>$fa_file, '-format' => 'fasta' ); my $r = $factory->submit_blast($fa_file); # Wait for the reply and save the output file while ( my @rids = $factory->each_rid ) { foreach my $rid ( @rids ) { my $rc = $factory->retrieve_blast($rid); if( !ref($rc) ) { if( $rc < 0 ) { $factory->remove_rid($rid); } sleep 5; } else { my $result = $rc->next_result(); my $filename = $result->query_name()."\.out"; $factory->save_output($filename); $factory->remove_rid($rid); } } } }

下一步是解析输出报告并找到得分> = 100.然后可以识别多种蛋白质发现的命中以进行进一步的研究,可能识别药物治疗的新目标。

尝试protein_list = perl ('mw_parse.pl', ('abl1.out'), ('kit.out'), ('pdgfra.out')))抓住错误信息('BioInfo:BioPerldemo:Perlerror')))结尾
protectr_list ='--------------------警告-------------------- MSG:没有HSP对于这种最小的命中(PDB | 1H01 | A)如果使用NCBI Blast,则检查BITS()--------------------------------  -  -  -  -  -  -  -  -  -  -   -  -  -  -  -  -  -  -  -  - - 警告  -  -  --------------- MSG:如果使用NCBI Blast,则没有HSP,如果使用NCBI Blast,则检查BITS()-----------------------------------------------------------------警告-------------------- MSG:没有HSP,用于这个最小的命中(PDB | 1GII | A)如果使用ncbi blast,检查bits()--------------------------------------  -  -  -  -   -  -  -  -  -  -  -  -  -  - - 警告  -  -  -  -  -  -  -  -  ---- MSG:如果使用NCBI BLAST,则没有HSP,如果使用NCBI BLAST,请查看BITS()------------------------------------------------------------------------警告-------------------- MSG:如果使用NCBI BLAST,则没有HSP(PDB | 1F3M | C)如果使用NCBI BLAST,则检查位()------------------------------------------  -------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1A81|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1H1W|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1B6C|B) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1IG1|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1JKK|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1JOW|B) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1BI8|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1O6K|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1GZK|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1GZN|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1O6L|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1BHF|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1LCJ|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1PME|) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1CM8|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1A1A|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|3HCK|) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1AOT|F) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1PMQ|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1LKK|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1JNK|) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1SHD|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1LKL|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1BM2|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1BMB|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1CWD|L) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1BHH|B) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1IA8|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1FBZ|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- --------------------- WARNING --------------------- MSG: No HSPs for this minimal Hit (pdb|1IJR|A) If using NCBI BLAST, check bits() instead --------------------------------------------------- C:\TEMP\Bdoc18b_888831_12060\ib9A0E24\0\tpe948340f\ex40921867\ABL1.out 1OPL, 2584, 0.0, Chain A, Structural Basis For The Auto-Inhibition Of C-Abl... 1FMK, 923, 1e-100, Crystal Structure Of Human Tyrosine-Protein Kinase C-Src p... 1QCF, 919, 1e-100, Chain A, Crystal Structure Of Hck In Complex With A Src Fa... 1KSW, 916, 1e-100, Chain A, Structure Of Human C-Src Tyrosine Kinase (Thr338g... 1AD5, 883, 6e-96, Chain A, Src Family Kinase Hck-Amp-Pnp Complex pdb|1AD5|B ... 2ABL, 866, 5e-94, Sh3-Sh2 Domain Fragment Of Human Bcr-Abl Tyrosine Kinase 3LCK, 666, 9e-71, The Kinase Domain Of Human Lymphocyte Kinase (Lck), Activa... 1QPE, 666, 9e-71, Chain A, Structural Analysis Of The Lymphocyte-Specific Ki... 1QPD, 656, 1e-69, Chain A, Structural Analysis Of The Lymphocyte-Specific Ki... 1K2P, 620, 2e-65, Chain A, Crystal Structure Of Bruton's Tyrosine Kinase Dom... 1BYG, 592, 3e-62, Chain A, Kinase Domain Of Human C-Terminal Src Kinase (Csk... 1M7N, 561, 1e-58, Chain A, Crystal Structure Of Unactivated Apo Insulin-Like... 1JQH, 560, 2e-58, Chain A, Igf-1 Receptor Kinase Domain pdb|1JQH|B Chain B, ... 1P4O, 560, 2e-58, Chain A, Structure Of Apo Unactivated Igf-1r Kinase Domain... 1K3A, 553, 1e-57, Chain A, Structure Of The Insulin-Like Growth Factor 1 Rec... 1GJO, 550, 2e-57, Chain A, The Fgfr2 Tyrosine Kinase Domain 1FVR, 540, 3e-56, Chain A, Tie2 Kinase Domain pdb|1FVR|B Chain B, Tie2 Kinas... 1AB2, 528, 9e-55, Proto-Oncogene Tyrosine Kinase (E.C.2.7.1.112) (Src Homolo... 1IRK, 525, 2e-54, Insulin Receptor (Tyrosine Kinase Domain) Mutant With Cys ... 1I44, 523, 3e-54, Chain A, Crystallographic Studies Of An Activation Loop Mu... 1IR3, 522, 4e-54, Chain A, Phosphorylated Insulin Receptor Tyrosine Kinase I... 1FGK, 522, 4e-54, Chain A, Crystal Structure Of The Tyrosine Kinase Domain O... 1P14, 521, 6e-54, Chain A, Crystal Structure Of A Catalytic-Loop Mutant Of T... 1M14, 496, 4e-51, Chain A, Tyrosine Kinase Domain From Epidermal Growth Fact... 1PKG, 496, 4e-51, Chain A, Structure Of A C-Kit Kinase Product Complex pdb|1... 1VR2, 463, 3e-47, Chain A, Human Vascular Endothelial Growth Factor Receptor... 1JU5, 330, 8e-32, Chain C, Ternary Complex Of An Crk Sh2 Domain, Crk-Derived... 1BBZ, 317, 3e-30, Chain A, Crystal Structure Of The Abl-Sh3 Domain Complexed... 1AWO, 303, 1e-28, The Solution Nmr Structure Of Abl Sh3 And Its Relationship... 1BBZ, 303, 1e-28, Chain E, Crystal Structure Of The Abl-Sh3 Domain Complexed... 1G83, 287, 8e-27, Chain A, Crystal Structure Of Fyn Sh3-Sh2 pdb|1G83|B Chain... 1LCK, 270, 7e-25, Chain A, Sh3-Sh2 Domain Fragment Of Human P56-Lck Tyrosine... 1MUO, 233, 1e-20, Chain A, Crystal Structure Of Aurora-2, An Oncogenic Serin... 1GRI, 232, 2e-20, Chain A, Grb2 pdb|1GRI|B Chain B, Grb2 1A9U, 220, 4e-19, The Complex Structure Of The Map Kinase P38SB203580 pdb|1B... 1BMK, 213, 3e-18, Chain A, The Complex Structure Of The Map Kinase P38SB2186... 1IAN, 209, 8e-18, Human P38 Map Kinase Inhibitor Complex 1GZ8, 208, 1e-17, Chain A, Human Cyclin Dependent Kinase 2 Complexed With Th... 1OVE, 208, 1e-17, Chain A, The Structure Of P38 Alpha In Complex With A Dihy... 1OIT, 207, 1e-17, Chain A, Imidazopyridines: A Potent And Selective Class Of... 1B38, 206, 2e-17, Chain A, Human Cyclin-Dependent Kinase 2 pdb|1B39|A Chain ... 1OGU, 206, 2e-17, Chain A, Structure Of Human Thr160-Phospho Cdk2CYCLIN A CO... 1E9H, 206, 2e-17, Chain A, Thr 160 Phosphorylated Cdk2 - Human Cyclin A3 Com... 1JST, 206, 2e-17, Chain A, Phosphorylated Cyclin-Dependent Kinase-2 Bound To... 1WFC, 206, 2e-17, Structure Of Apo, Unphosphorylated, P38 Mitogen Activated ... 1QMZ, 206, 2e-17, Chain A, Phosphorylated Cdk2-Cyclyin A-Substrate Peptide C... 1DI8, 206, 2e-17, Chain A, The Structure Of Cyclin-Dependent Kinase 2 (Cdk2)... 1H1P, 206, 2e-17, Chain A, Structure Of Human Thr160-Phospho Cdk2CYCLIN A CO... 1DI9, 205, 2e-17, Chain A, The Structure Of P38 Mitogen-Activated Protein Ki... 1H4L, 202, 5e-17, Chain A, Structure And Regulation Of The Cdk5-P25(Nck5a) C... C:\TEMP\Bdoc18b_888831_12060\ib9A0E24\0\tpe948340f\ex40921867\Kit.out 1PKG, 974, 1e-106, Chain A, Structure Of A C-Kit Kinase Product Complex pdb|1... 1VR2, 805, 6e-87, Chain A, Human Vascular Endothelial Growth Factor Receptor... 1GJO, 730, 3e-78, Chain A, The Fgfr2 Tyrosine Kinase Domain 1FGK, 700, 8e-75, Chain A, Crystal Structure Of The Tyrosine Kinase Domain O... 1OPL, 410, 4e-41, Chain A, Structural Basis For The Auto-Inhibition Of C-Abl... 1FVR, 405, 1e-40, Chain A, Tie2 Kinase Domain pdb|1FVR|B Chain B, Tie2 Kinas... 1M7N, 383, 5e-38, Chain A, Crystal Structure Of Unactivated Apo Insulin-Like... 1P4O, 383, 5e-38, Chain A, Structure Of Apo Unactivated Igf-1r Kinase Domain... 1JQH, 381, 8e-38, Chain A, Igf-1 Receptor Kinase Domain pdb|1JQH|B Chain B, ... 1QCF, 377, 2e-37, Chain A, Crystal Structure Of Hck In Complex With A Src Fa... 1K3A, 371, 1e-36, Chain A, Structure Of The Insulin-Like Growth Factor 1 Rec... 1I44, 368, 3e-36, Chain A, Crystallographic Studies Of An Activation Loop Mu... 1IRK, 367, 3e-36, Insulin Receptor (Tyrosine Kinase Domain) Mutant With Cys ... 1P14, 361, 2e-35, Chain A, Crystal Structure Of A Catalytic-Loop Mutant Of T... 1IR3, 361, 2e-35, Chain A, Phosphorylated Insulin Receptor Tyrosine Kinase I... 3LCK, 354, 1e-34, The Kinase Domain Of Human Lymphocyte Kinase (Lck), Activa... 1QPE, 354, 1e-34, Chain A, Structural Analysis Of The Lymphocyte-Specific Ki... 1QPD, 354, 1e-34, Chain A, Structural Analysis Of The Lymphocyte-Specific Ki... 1AD5, 348, 6e-34, Chain A, Src Family Kinase Hck-Amp-Pnp Complex pdb|1AD5|B ... 1KSW, 344, 2e-33, Chain A, Structure Of Human C-Src Tyrosine Kinase (Thr338g... 1FMK, 344, 2e-33, Crystal Structure Of Human Tyrosine-Protein Kinase C-Src p... 1BYG, 342, 3e-33, Chain A, Kinase Domain Of Human C-Terminal Src Kinase (Csk... 1M14, 335, 2e-32, Chain A, Tyrosine Kinase Domain From Epidermal Growth Fact... 1K2P, 294, 1e-27, Chain A, Crystal Structure Of Bruton's Tyrosine Kinase Dom... 1H4L, 167, 5e-13, Chain A, Structure And Regulation Of The Cdk5-P25(Nck5a) C... 1PME, 158, 6e-12, Structure Of Penta Mutant Human Erk2 Map Kinase Complexed ... 1F3M, 156, 1e-11, Chain C, Crystal Structure Of Human SerineTHREONINE KINASE... C:\TEMP\Bdoc18b_888831_12060\ib9A0E24\0\tpe948340f\ex40921867\PDGFRA.out 1PKG, 625, 5e-66, Chain A, Structure Of A C-Kit Kinase Product Complex pdb|1... 1VR2, 550, 2e-57, Chain A, Human Vascular Endothelial Growth Factor Receptor... 1FGI, 500, 1e-51, Chain A, Crystal Structure Of The Tyrosine Kinase Domain O... 1GJO, 492, 1e-50, Chain A, The Fgfr2 Tyrosine Kinase Domain 1FVR, 419, 4e-42, Chain A, Tie2 Kinase Domain pdb|1FVR|B Chain B, Tie2 Kinas... 1QCF, 380, 1e-37, Chain A, Crystal Structure Of Hck In Complex With A Src Fa... 1QPE, 364, 9e-36, Chain A, Structural Analysis Of The Lymphocyte-Specific Ki... 1QPD, 364, 9e-36, Chain A, Structural Analysis Of The Lymphocyte-Specific Ki... 3LCK, 360, 2e-35, The Kinase Domain Of Human Lymphocyte Kinase (Lck), Activa... 1OPL, 358, 4e-35, Chain A, Structural Basis For The Auto-Inhibition Of C-Abl... 1FMK, 354, 1e-34, Crystal Structure Of Human Tyrosine-Protein Kinase C-Src p... 1KSW, 353, 2e-34, Chain A, Structure Of Human C-Src Tyrosine Kinase (Thr338g... 1AD5, 353, 2e-34, Chain A, Src Family Kinase Hck-Amp-Pnp Complex pdb|1AD5|B ... 1BYG, 352, 2e-34, Chain A, Kinase Domain Of Human C-Terminal Src Kinase (Csk... 1I44, 351, 3e-34, Chain A, Crystallographic Studies Of An Activation Loop Mu... 1IRK, 350, 4e-34, Insulin Receptor (Tyrosine Kinase Domain) Mutant With Cys ... 1M7N, 349, 5e-34, Chain A, Crystal Structure Of Unactivated Apo Insulin-Like... 1JQH, 349, 5e-34, Chain A, Igf-1 Receptor Kinase Domain pdb|1JQH|B Chain B, ... 1P4O, 349, 5e-34, Chain A, Structure Of Apo Unactivated Igf-1r Kinase Domain... 1P14, 344, 2e-33, Chain A, Crystal Structure Of A Catalytic-Loop Mutant Of T... 1IR3, 343, 2e-33, Chain A, Phosphorylated Insulin Receptor Tyrosine Kinase I... 1K3A, 338, 9e-33, Chain A, Structure Of The Insulin-Like Growth Factor 1 Rec... 1M14, 332, 4e-32, Chain A, Tyrosine Kinase Domain From Epidermal Growth Fact... 1K2P, 315, 4e-30, Chain A, Crystal Structure Of Bruton's Tyrosine Kinase Dom... 1PME, 167, 6e-13, Structure Of Penta Mutant Human Erk2 Map Kinase Complexed ... 1JOW, 155, 1e-11, Chain B, Crystal Structure Of A Complex Of Human Cdk6 And ... 1BI8, 155, 1e-11, Chain A, Mechanism Of G1 Cyclin Dependent Kinase Inhibitio... 1F3M, 150, 6e-11, Chain C, Crystal Structure Of Human SerineTHREONINE KINASE... '

这是mw_parse的代码:

类型mw_parse.pl.
#!/ usr / bin / perl使用bio :: searchio;使用严格;使用5.006;#基于Search.pm BioPerl模块的示例爆炸解析程序。拍摄#爆炸报告文件列表,并根据任意最小分数打印来自每个#报告的顶部命中列表。#版权所有2003-2012 MathWorks,Inc。#设置RAW分数的截止值。我的$ min_score = 100;#拍摄每个报告名称并打印有关顶部命中的信息。我的$ seq_count = 0;虽然(定义了($ argv [0])){My $ Breport = Shift @Argv; print "\n$breport\n"; my $in = new Bio::SearchIO(-format => 'blast', -file => $breport); my $num_hit = 0; my $short_desc; while ( my $result = $in->next_result) { while ( my $curr_hit = $result->next_hit ) { if ( $curr_hit->raw_score >= $min_score ) { if (length($curr_hit->description) >= 60) { $short_desc = substr($curr_hit->description, 0, 58)."..."; } else { $short_desc = $curr_hit->description; } print $curr_hit->accession, ", ", $curr_hit->raw_score, ", ", $curr_hit->significance, ", ", $short_desc, "\n"; } $num_hit++; } } $seq_count++; }

在Perl程序中调用MATLAB函数

如果在Windows®上运行,也可以调用Perl调用MATLAB函数。您可以通过使用Matlab Startup命令中的/自动化开关(例如D:\ Applications \ Matlab7x \ Bin \ Matlab.exe / Automation)在自动化服务器模式下在自动化服务器模式下启动MATLAB。

这是一个脚本来说明启动自动化服务器的过程,调用MATLAB函数并在Perl和Matlab之间传递变量。

类型matlab_from_perl.pl.pl.
#!/ usr / bin / perl -w使用win32 :: OLE;使用win32 :: OLE :: Variant;#简单的perl脚本要在MATLAB中执行命令。#注意名称Win32 :: OLE正在误导,这实际上使用了COM!##如果MATLAB已在运行,则使用现有实例。eval {$ matlabapp = win32 :: ole-> getactiveObject('matlab.application')};if $ @;除非(定义为$ matlabapp){$ matlabapp = win32 :: ole-> new('matlab.application')或die“oops,无法启动matlab”;执行MATLAB命令的示例 - 这些函数在#MATLAB中执行并返回状态。@exe_commands =(“irk = pdbread('pdb1irk.ent');”,lck = pdbread('pdb3lck.ent');“,”seqdisp(irk)“,”seqdisp(lck)“,”[得分, Alignment] = swalign(IRK, LCK,'showscore',1);"); # send the commands to Matlab foreach $exe_command (@exe_commands) { $status = &send_to_matlab('Execute', $exe_command); print "Matlab status = ", $status, "\n"; } sub send_to_matlab { my ($call, @command) = @_; my $status = 0; print "\n>> $call( @command )\n"; $result = $matlabApp->Invoke($call, @command); if (defined($result)) { unless ($result =~ s/^.\?{3}/Error:/) { print "$result\n" unless ($result eq ""); } else { print "$result\n"; $status = -1; } } return $status; } # Examples of passing variables between MATLAB and Perl. # # MATLAB supoprts passing character arrays directly with the following syntax: # # PutCharArray([in] BSTR name, [in] BSTR workspace, [in] BSTR string); # GetCharArray([in] BSTR name, [in] BSTR workspace, [out] BSTR string); &send_to_matlab('PutCharArray', 'centralDogma', 'base', 'DNA->RNA->Protein.'); &send_to_matlab('GetCharArray', 'centralDogma', 'base'); # Numeric arrays can be passed by reference in a SAFEARRAY using the # PutFullMatrix and GetFullMatrix functions. # # PutFullMatrix([in] BSTR name, [in] BSTR workspace, [in] BSTR data); # GetFullMatrix([in] BSTR varname, [in] BSTR workspace, [out] BSTR retdata); $mReal = Variant(VT_ARRAY|VT_R8, 4, 4); $mImag = Variant(VT_ARRAY|VT_R8, 4, 4); $mReal->Put([[0,0,0,0], [0,0,0,0], [0,0,0,0], [0,0,0,0]]); print "\n>> PutFullMatrix( 'magicArray', 'base', ",'$mReal, $mImag'," )\n"; $matlabApp->PutFullMatrix('magicArray', 'base', $mReal, $mImag); $matlabApp->Execute('magicArray = magic(4)'); $m2Real = Variant(VT_ARRAY|VT_R8|VT_BYREF,4,4); $m2Imag = Variant(VT_ARRAY|VT_R8|VT_BYREF,4,4); print "\n>> GetFullMatrix( 'magicArray', 'base', ",'$m2Real, $m2Imag'," )\n"; $matlabApp->GetFullMatrix('magicArray', 'base', $m2Real, $m2Imag); for ($i = 0; $i < 4; $i++) { printf "%3d %3d %3d %3d\n", $m2Real->Get($i,0), $m2Real->Get($i,1), $m2Real->Get($i,2), $m2Real->Get($i,3); } # Additionally, you can use Variants to send scalar variables by reference # to MATLAB for all data types except sparse arrays and function handles through # PutWorkspaceData: # PutWorkspaceData([in] BSTR name, [in] BSTR workspace, [in] BSTR data); # # Results are passed back to Perl directly with GetVariable: # HRESULT = GetVariable([in] BSTR Name, [in] BSTR Workspace); # Create and initialize a date Variant. $dnaDate = Variant->new(VT_DATE|VT_BYREF, 'Feb 28, 1953'); &send_to_matlab('PutWorkspaceData', 'dnaDate', 'base', $dnaDate); &send_to_matlab('Execute', 'dnaDate'); # Create and initialize a new string Variant. $aminoString = Variant->new(VT_BSTR|VT_BYREF, 'matlap'); &send_to_matlab('PutWorkspaceData', 'aminoAcids', 'base', $aminoString); # Change the value in MATLAB &send_to_matlab('Execute', "aminoAcids = 'ARNDCQEGHILKMFPSTWYV';"); # Bring the new value back $aa = $matlabApp->GetVariable('aminoAcids', 'base'); printf "Amino acid codes: %s\n", $aa; undef $matlabApp; # close Matlab if we opened it

Bioinformatics工具箱™中的蛋白质分析工具

Matlab为蛋白质分析提供了额外的工具,并通过这些蛋白质进一步研究。例如,为了进入序列并在人胰岛素受体(PDB 1RK)的酪氨酸激酶结构域和人淋巴细胞激酶(PDB 3LCK)的激酶结构域的酪氨酸激酶结构域上进行全史密斯 - 水曼对齐,加载序列数据:

惹恼= pdbread ('pdb1irk.ent');lck = pdbread(“pdb3lck.ent”);%运行这些命令以从互联网带来数据:% IRK = getpdb('1IRK');%lck = getpdb('3lck');

现在与史密斯 - 水工算法进行局部对齐。MATLAB使用Blosum 50作为AA字符串的默认评分矩阵,其中差距为8.当然,您可以更改任何这些参数。

[得分,对齐] = spalign(irk,lck,'showscore',真正的);

MATLAB和BIOINFORMATICS TOOLBOX™提供了用于研究核苷酸和氨基酸序列的额外工具。例如,pdbdistplot在PDB结构中显示原子和氨基酸之间的距离,同时拉马桑德兰生成蛋白序列的扭转角PHI和扭转角PSI的图。工具箱函数proteinplot提供图形用户界面(GUI),以轻松导入序列并绘制各种属性,例如疏水性。