| 24小時(shí)熱門版塊排行榜 |
| 5 | 1/1 | 返回列表 |
| 查看: 2158 | 回復(fù): 11 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
xueshuhan木蟲 (正式寫手)
|
[求助]
Perl 編程 請(qǐng)大神們幫忙!!生物信息的牛人請(qǐng)進(jìn)
|
||
|
我是學(xué)生物的研究生,我們一個(gè)老師講perl編程,才學(xué)了10個(gè)小時(shí),本人對(duì)編程一竅不通,希望好心人幫忙解答,謝謝了!! 下面是我的編程: 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. |
木蟲 (正式寫手)
|
前一半這樣寫是否正確: #!/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 ) } |
木蟲 (正式寫手)
|
-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. |
木蟲 (小有名氣)
|
【1】當(dāng)你使用”use strict; use warnings ”, 語句"$input=$ARGV[0];"應(yīng)該寫成“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 ) ” 這個(gè)語句,我沒有看懂。 |

木蟲 (正式寫手)
|
這回寫是否正確,還有就是網(wǎng)絡(luò)服務(wù)調(diào)用部分如何編寫??? #!/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" ) } |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿食品科學(xué)與工程083200求調(diào)劑 +4 | XQTJZ 2026-03-30 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 277跪求調(diào)劑 +8 | 1915668 2026-03-27 | 12/600 |
|
|
[考研] 281求調(diào)劑 +5 | 亞克西good 2026-03-26 | 7/350 |
|
|
[考研] 346求調(diào)劑 一志愿070303有機(jī)化學(xué) +7 | 蘿卜燉青菜 2026-03-28 | 8/400 |
|
|
[考研] 327求調(diào)劑 +5 | 小卡不卡. 2026-03-29 | 5/250 |
|
|
[考研]
|
gr哈哈哈 2026-03-28 | 3/150 |
|
|
[考研] 求調(diào)劑 +10 | 家佳佳佳佳佳 2026-03-29 | 10/500 |
|
|
[考研] 332求調(diào)劑 +6 | @MZB382400 2026-03-28 | 6/300 |
|
|
[考研] 332求調(diào)劑 +6 | Lyy930824@ 2026-03-29 | 6/300 |
|
|
[考研] 調(diào)劑求院校招收 +6 | 鶴鯨鴿 2026-03-28 | 6/300 |
|
|
[考研] 347求調(diào)劑 +3 | 山頂見α 2026-03-25 | 3/150 |
|
|
[考研] 070300求調(diào)劑306分 +4 | 26要上岸 2026-03-27 | 4/200 |
|
|
[考研] 材料277求調(diào)劑 +7 | min3 2026-03-24 | 7/350 |
|
|
[考研] 339求調(diào)劑,想調(diào)回江蘇 +6 | 烤麥芽 2026-03-27 | 8/400 |
|
|
[考研] 340求調(diào)劑 +5 | jhx777 2026-03-27 | 5/250 |
|
|
[考研] 0703化學(xué)338求調(diào)劑! +6 | Zuhui0306 2026-03-26 | 7/350 |
|
|
[考研]
|
平樂樂樂 2026-03-26 | 4/200 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-25 | 3/150 |
|
|
[考研] 347求調(diào)劑 +4 | L when 2026-03-25 | 4/200 |
|
|
[考研] 一志愿吉林大學(xué)材料與化工303分求調(diào)劑 +4 | 為學(xué)666 2026-03-24 | 4/200 |
|