| 查看: 2016 | 回复: 11 | ||
xueshuhan木虫 (正式写手)
|
[求助]
Perl 编程 请大神们帮忙!!!生物信息的牛人请进
|
|
|
我是学生物的研究生,我们一个老师讲perl编程,才学了10个小时,本人对编程一窍不通,希望好心人帮忙解答,谢谢了!!! 下面是我的编程: Develop a Perl program that receives as argument on the command linethe id of a nucleotide sequence (in the form db:id) and invokes the"sixpack" Web Service from EBI printing its result. |
» 猜你喜欢
不自信的我
已经有11人回复
北核录用
已经有3人回复
要不要辞职读博?
已经有6人回复
实验室接单子
已经有3人回复
磺酰氟产物,毕不了业了!
已经有8人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有10人回复
26申博(荧光探针方向,有机合成)
已经有4人回复
论文终于录用啦!满足毕业条件了
已经有26人回复
2026年机械制造与材料应用国际会议 (ICMMMA 2026)
已经有4人回复
Cas 72-43-5需要30g,定制合成,能接单的留言
已经有8人回复
» 本主题相关价值贴推荐,对您同样有帮助:
大神们,帮忙认一下这些植物!谢谢先!
已经有14人回复
懂图位克隆的请进
已经有3人回复
用过亚磷酸三乙酯的牛人请进
已经有6人回复
ANSYS14.0的大神们进~~
已经有20人回复
perl程序求助,请大神们赐教~~~
已经有9人回复
perl程序求大神加以修改~~
已经有8人回复
请帮忙编写一个perl程序处理文本
已经有26人回复
请各位大神过来....帮帮小弟!!!!!!!!!!!!!!!!!!!!!!!
已经有5人回复
计算机图形学中用VC++6.0编程实现AUTOCAD中ERASE命令
已经有3人回复
【求助】请教一个Perl语言的编程,谢谢!
已经有3人回复
【求助】(⊙o⊙)…大神们,帮我看看好不,拜托啦
已经有3人回复
编辑意见,请大侠帮忙
已经有15人回复
zhusheng303
木虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 3137.3
- 帖子: 68
- 在线: 45.6小时
- 虫号: 880479
- 注册: 2009-10-22
- 性别: GG
- 专业: 生物信息学
★
ben_ladeng(金币+1): 欢迎常来 2012-01-31 13:58:28
xueshuhan: 回帖置顶 2012-01-31 16:46:17
ben_ladeng(金币+1): 欢迎常来 2012-01-31 13:58:28
xueshuhan: 回帖置顶 2012-01-31 16:46:17
|
【1】当你使用”use strict; use warnings ”, 语句"$input=$ARGV[0];"应该写成“my $input=$ARGV[0]”,“my”定义变量的作用,限定变量的作用域。 【2】“die ( There is an error there.\n )”,最好写成“die (There is an error there.\n );”。 【3】“if ( $ARGV[0]<>1 ) ” 这个语句,我没有看懂。 |

4楼2012-01-31 10:13:09
xueshuhan
木虫 (正式写手)
- 应助: 8 (幼儿园)
- 金币: 2979.7
- 红花: 2
- 帖子: 613
- 在线: 142.3小时
- 虫号: 1538750
- 注册: 2011-12-15
- 性别: GG
- 专业: 生物技术药物
xueshuhan: 回帖置顶 2012-02-02 09:18:42
|
在多位朋友帮助下终于写好了,下面是perl : #!/usr/bin/perl -w use strict; use SOAP::Lite; my($USAGE) = "$0 PROTEIN\n\n"; unless (@ARGV) { print $USAGE; exit; } unless (@ARGV==1) { print "There is an error.\n"; exit; } my($sequence) = $ARGV[0]; unless ($sequence =~ /[:]/g) { print "There is another error\n"; } my($service) = SOAP::Lite->proxy( 'http://www.ebi.ac.uk/soaplab/services/nucleic_gene_finding.sixpack' ); my($soap_response) = $service->runAndWaitFor( SOAP: ata->type( map => { sequence_usa =>$sequence} ) ); my(@res) = $soap_response->paramsout; my($res) = $soap_response->result; my($outfile) = %$res->{'outfile'}; print "$outfile\n"; exit; |
10楼2012-02-02 09:18:06
xueshuhan
木虫 (正式写手)
- 应助: 8 (幼儿园)
- 金币: 2979.7
- 红花: 2
- 帖子: 613
- 在线: 142.3小时
- 虫号: 1538750
- 注册: 2011-12-15
- 性别: GG
- 专业: 生物技术药物
|
-It checks the number of arguments received on the command line and if the number is not 1 it prints an error message and exits. -It assigns the first argument to one variable. -It checks with a pattern matching that the variable contains the character ":". If not it prints an error message. -It calls the "sixpack" Web Service as in the examples seen in class passing the received variable. -It assigns to a variable the "outfile" returned by the service. -It prints this variable. |
2楼2012-01-30 22:31:01
xueshuhan
木虫 (正式写手)
- 应助: 8 (幼儿园)
- 金币: 2979.7
- 红花: 2
- 帖子: 613
- 在线: 142.3小时
- 虫号: 1538750
- 注册: 2011-12-15
- 性别: GG
- 专业: 生物技术药物
|
前一半这样写是否正确: #!/usr/bin/perl use strict; use warnings; use SOAP::Lite; if ( $#ARGV < 0 ) { print "Usage: please input "; exit; } # Get the first argumentmy if ( $ARGV[0]<>1 ) { print "There is an error there"; exit; } $input=$ARGV[0]; unless ( $ input =~ m/:/ ) { die ( There is an error there.\n ) } |
3楼2012-01-31 02:03:29
xueshuhan
木虫 (正式写手)
- 应助: 8 (幼儿园)
- 金币: 2979.7
- 红花: 2
- 帖子: 613
- 在线: 142.3小时
- 虫号: 1538750
- 注册: 2011-12-15
- 性别: GG
- 专业: 生物技术药物
|
这回写是否正确,还有就是网络服务调用部分如何编写??? #!/usr/bin/perl use strict; use warnings; use SOAP::Lite; if ( $#ARGV < 0 ) { print "Usage: please input "; exit; } # Get the first argumentmy if ( $ARGV[0]!=1 ) { print "There is an error there"; exit; } my $input=$ARGV[0]; unless ( $ARGV[0]=~ m/:/ ) { die ( "There is an error there.\n" ) } |
5楼2012-01-31 16:42:45
xueshuhan
木虫 (正式写手)
- 应助: 8 (幼儿园)
- 金币: 2979.7
- 红花: 2
- 帖子: 613
- 在线: 142.3小时
- 虫号: 1538750
- 注册: 2011-12-15
- 性别: GG
- 专业: 生物技术药物
6楼2012-01-31 18:49:35
xueshuhan
木虫 (正式写手)
- 应助: 8 (幼儿园)
- 金币: 2979.7
- 红花: 2
- 帖子: 613
- 在线: 142.3小时
- 虫号: 1538750
- 注册: 2011-12-15
- 性别: GG
- 专业: 生物技术药物
7楼2012-01-31 18:50:50
zhusheng303
木虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 3137.3
- 帖子: 68
- 在线: 45.6小时
- 虫号: 880479
- 注册: 2009-10-22
- 性别: GG
- 专业: 生物信息学

8楼2012-02-01 10:37:12
zhusheng303
木虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 3137.3
- 帖子: 68
- 在线: 45.6小时
- 虫号: 880479
- 注册: 2009-10-22
- 性别: GG
- 专业: 生物信息学
|
【1】问题一:如何让第一个argument需要为变量 Use $ARGV[n] to display argument. Use $#ARGV to get total number of passed argument to a perl script. 例如:./foo.pl one two three $ARGV[0]:one $ARGV[1]: two $ARGV[2]: three 【2】问题二:为什么我在命令栏里输入核苷酸的ID却提示命令没有找到 不好意思,这个我也没有用过。这个网页你可以看看http://www.ebi.ac.uk/Tools/webse ... perl/soap/soap-lite,希望对你有帮助 |

9楼2012-02-01 11:01:49












回复此楼
ata->type( map => { sequence_usa =>$sequence