| 5 | 1/1 | 返回列表 |
| 查看: 2151 | 回復(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. |
木蟲 (小有名氣)
|
【1】問(wèn)題一:如何讓第一個(gè)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】問(wèn)題二:為什么我在命令欄里輸入核苷酸的ID卻提示命令沒有找到 不好意思,這個(gè)我也沒有用過(guò)。這個(gè)網(wǎng)頁(yè)你可以看看http://www.ebi.ac.uk/Tools/webse ... perl/soap/soap-lite,希望對(duì)你有幫助 |

木蟲 (正式寫手)
|
-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 ) } |
木蟲 (小有名氣)
|
【1】當(dāng)你使用”use strict; use warnings ”, 語(yǔ)句"$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è)語(yǔ)句,我沒有看懂。 |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 2026年華南師范大學(xué)歡迎化學(xué),化工,生物,生醫(yī)工等專業(yè)優(yōu)秀學(xué)子加入! +3 | llss0711 2026-03-28 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 食品工程專碩一志愿中海洋309求調(diào)劑 +4 | 小張zxy張 2026-03-26 | 8/400 |
|
|
[考研] 070300求調(diào)劑306分 +4 | 26要上岸 2026-03-27 | 4/200 |
|
|
[考研] 材料求調(diào)劑一志愿哈工大324 +7 | 閆旭東 2026-03-28 | 9/450 |
|
|
[考研] 085404求調(diào)劑,總分309,本科經(jīng)歷較為豐富 +4 | 來(lái)財(cái)aa 2026-03-25 | 4/200 |
|
|
[考研] 295求調(diào)劑 +5 | 1428151015 2026-03-27 | 6/300 |
|
|
[考研] 291求調(diào)劑 +7 | 孅華 2026-03-22 | 7/350 |
|
|
[考研] 一志愿華東理工大學(xué)081700,初試分?jǐn)?shù)271 +6 | kotoko_ik 2026-03-23 | 7/350 |
|
|
[考研] 312求調(diào)劑 +9 | 上岸吧ZJY 2026-03-22 | 13/650 |
|
|
[考研] 一志愿鄭大085600,310分求調(diào)劑 +5 | 李瀟可 2026-03-26 | 5/250 |
|
|
[考研]
|
鐘llll 2026-03-26 | 4/200 |
|
|
[考研] 343求調(diào)劑 +4 | 贈(zèng)我一本書 2026-03-23 | 4/200 |
|
|
[考研] 327求調(diào)劑 +7 | prayer13 2026-03-23 | 7/350 |
|
|
[考研] 334分 一志愿武理 材料求調(diào)劑 +4 | 李李不服輸 2026-03-26 | 4/200 |
|
|
[考研] 材料科學(xué)與工程 317求調(diào)劑 +4 | JKSOIID 2026-03-26 | 4/200 |
|
|
[考研] 081700 調(diào)劑 267分 +11 | 迷人的哈哈 2026-03-23 | 11/550 |
|
|
[考研] 309求調(diào)劑 +4 | gajsj 2026-03-25 | 5/250 |
|
|
[考研] 一志愿武理085500機(jī)械專業(yè)總分300求調(diào)劑 +3 | an10101 2026-03-24 | 7/350 |
|
|
[考研] 求調(diào)劑一志愿武漢理工大學(xué)材料工程(085601) +5 | WW.' 2026-03-23 | 7/350 |
|
|
[考研] 335求調(diào)劑 +4 | yuyu宇 2026-03-23 | 5/250 |
|