| 5 | 1/1 | 返回列表 |
| 查看: 2161 | 回復(fù): 11 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | |||
xueshuhan木蟲 (正式寫手)
|
[求助]
Perl 編程 請大神們幫忙!!生物信息的牛人請進
|
||
|
我是學(xué)生物的研究生,我們一個老師講perl編程,才學(xué)了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. |
木蟲 (小有名氣)
|
【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 ) ” 這個語句,我沒有看懂。 |

木蟲 (正式寫手)
|
-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. |
木蟲 (正式寫手)
|
前一半這樣寫是否正確: #!/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 ) } |
木蟲 (正式寫手)
|
這回寫是否正確,還有就是網(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ā)表 | |
|---|---|---|---|---|
|
[考研] 362求調(diào)劑 +9 | 西南交材料專碩3 2026-03-31 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 334分 一志愿武理-080500 材料求調(diào)劑 +9 | 李李不服輸 2026-03-25 | 9/450 |
|
|
[考研] 085601 材料工程 313分 求調(diào)劑 +6 | Ong3 2026-03-27 | 6/300 |
|
|
[考研] 本科211生物醫(yī)學(xué)工程085409求調(diào)劑339分 +7 | 里子木yy 2026-03-29 | 7/350 |
|
|
[考研] 一志愿211,335分,0856,求調(diào)劑院校和導(dǎo)師 +10 | 傾____蕭 2026-03-27 | 11/550 |
|
|
[考研] 生物學(xué) 296 求調(diào)劑 +7 | 朵朵- 2026-03-26 | 9/450 |
|
|
[考研] 求調(diào)劑 +8 | 11ggg 2026-03-30 | 8/400 |
|
|
[考研] 0703化學(xué) +20 | 妮妮ninicgb 2026-03-27 | 20/1000 |
|
|
[考研] 張芳銘-中國農(nóng)業(yè)大學(xué)-環(huán)境工程專碩-298 +8 | 手機用戶 2026-03-26 | 8/400 |
|
|
[考研] 323分 食品與營養(yǎng)調(diào)劑 +3 | 嘿ooo 2026-03-31 | 3/150 |
|
|
[考研] 11408總分309,一志愿東南大學(xué)求調(diào)劑,不挑專業(yè) +5 | 天賦帶到THU 2026-03-29 | 6/300 |
|
|
[碩博家園] 求調(diào)劑 有機化學(xué)考研356分 +10 | Nadiums 2026-03-25 | 11/550 |
|
|
[考研] 085404求調(diào)劑,總分309,本科經(jīng)歷較為豐富 +6 | 來財aa 2026-03-25 | 6/300 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +4 | 邱gl 2026-03-26 | 7/350 |
|
|
[考研] 279求調(diào)劑 +4 | 蝶舞輕繞 2026-03-29 | 4/200 |
|
|
[考研] 085600,專業(yè)課化工原理,321分求調(diào)劑 +5 | 大饞小子 2026-03-28 | 5/250 |
|
|
[考研] 339求調(diào)劑,想調(diào)回江蘇 +6 | 烤麥芽 2026-03-27 | 8/400 |
|
|
[考研] 308求調(diào)劑 +7 | 墨墨漠 2026-03-27 | 7/350 |
|
|
[考研] 298調(diào)劑 +3 | jiyingjie123 2026-03-27 | 3/150 |
|
|
[考研]
|
平樂樂樂 2026-03-26 | 4/200 |
|