²é¿´: 2126  |  »Ø¸´: 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.
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

zhusheng303

ľ³æ (СÓÐÃûÆø)

ÒýÓûØÌû:
6Â¥: Originally posted by xueshuhan at 2012-01-31 18:49:35:
ÎÒдµÄÕâ¸öÎÊÌ⣬µ«²»ÖªµÀÔõô¸Ä
ÎÊÌâÒ»£ºÈçºÎÈõÚÒ»¸öargumentÐèҪΪ±äÁ¿
ÎÊÌâ¶þ£ºÎªÊ²Ã´ÎÒÔÚÃüÁîÀ¸ÀïÊäÈëºËÜÕËáµÄIDÈ´ÌáʾÃüÁîûÓÐÕÒµ½
#!/usr/bin/perl
use warnings;
use SOAP::Lite;

if ( $#ARGV &l ...

¡¾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
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 12 ¸ö»Ø´ð

xueshuhan

ľ³æ (ÕýʽдÊÖ)

-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
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

xueshuhan

ľ³æ (ÕýʽдÊÖ)

ǰһ°ëÕâÑùдÊÇ·ñÕýÈ·£º
#!/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
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

zhusheng303

ľ³æ (СÓÐÃûÆø)

¡ï
ben_ladeng(½ð±Ò+1): »¶Ó­³£À´ 2012-01-31 13:58:28
xueshuhan: »ØÌûÖö¥ 2012-01-31 16:46:17
ÒýÓûØÌû:
3Â¥: Originally posted by xueshuhan at 2012-01-31 02:03:29:
ǰһ°ëÕâÑùдÊÇ·ñÕýÈ·£º
#!/usr/bin/perl
use strict;
use warnings;
use SOAP::Lite;

if ( $#ARGV < 0 )
        {
                print "Usage: please input "; exit;
        }
# Get the first argumentmy
...

¡¾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
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 085700×ÊÔ´Óë»·¾³308Çóµ÷¼Á +3 īīĮ 2026-03-18 3/150 2026-03-18 22:35 by bingxueer79
[¿¼ÑÐ] 085600²ÄÁÏÓ뻯¹¤µ÷¼Á 324·Ö +8 llllkkkhh 2026-03-18 8/400 2026-03-18 21:01 by Catalysis25
[¿¼ÑÐ] 085601ר˶£¬×Ü·Ö342Çóµ÷¼Á£¬µØÇø²»ÏÞ +5 share_joy 2026-03-16 5/250 2026-03-18 14:48 by haxia
[¿¼ÑÐ] 0854£¬¼ÆËã»úÀàÕÐÊÕµ÷¼Á +3 ºúÀ±ÌÀ·ÅÌÇ 2026-03-15 6/300 2026-03-18 12:09 by Éϰ¶Éϰ¶¡­¡­..
[¿¼ÑÐ] 293Çóµ÷¼Á +11 zjlµÄºÅ 2026-03-16 16/800 2026-03-18 08:10 by zhukairuo
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤Çóµ÷¼Á +6 Ϊѧ666 2026-03-16 6/300 2026-03-17 20:15 by peike
[¿¼ÑÐ] ¿¼Ñл¯Ñ§Ñ§Ë¶µ÷¼Á£¬Ò»Ö¾Ô¸985 +4 ÕÅvvvv 2026-03-15 6/300 2026-03-17 17:15 by ruiyingmiao
[¿¼ÑÐ] 0854¿ØÖƹ¤³Ì 359Çóµ÷¼Á ¿É¿çרҵ +3 626776879 2026-03-14 9/450 2026-03-16 17:42 by 626776879
[¿¼ÑÐ] 283Çóµ÷¼Á +10 С¥¡£ 2026-03-12 14/700 2026-03-16 16:08 by 13811244083
[¿¼ÑÐ] ÖпÆÔº²ÄÁÏ273Çóµ÷¼Á +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
[¿¼ÑÐ] 085600µ÷¼Á +5 ÑúÑú123sun 2026-03-12 6/300 2026-03-16 15:58 by ÑúÑú123sun
[¿¼ÑÐ] 0703 ÎïÀí»¯Ñ§µ÷¼Á +3 ÎÒ¿ÉÒÔÉϰ¶µÄ¶Ô 2026-03-13 5/250 2026-03-16 10:50 by ÎÒ¿ÉÒÔÉϰ¶µÄ¶ÔÂ
[¿¼ÑÐ] 0856Çóµ÷¼Á +3 ÁõÃÎ΢ 2026-03-15 3/150 2026-03-16 10:00 by houyaoxu
[¿¼ÑÐ] 085601²ÄÁϹ¤³Ì315·ÖÇóµ÷¼Á +3 yang_0104 2026-03-15 3/150 2026-03-15 10:58 by peike
[¿¼ÑÐ] 288Çóµ÷¼Á +4 Ææµã0314 2026-03-14 4/200 2026-03-14 23:04 by JourneyLucky
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤£¨0856£©304ÇóBÇøµ÷¼Á +6 Çñgl 2026-03-12 7/350 2026-03-13 23:24 by Çñgl
[¿¼ÑÐ] 329Çóµ÷¼Á +3 miaodesi 2026-03-12 4/200 2026-03-13 20:53 by 18595523086
[¿¼ÑÐ] 307Çóµ÷¼Á +5 ³¬¼¶ÒÁ°º´óÍõ 2026-03-12 5/250 2026-03-13 15:56 by °ô°ôÇòÊÖ
[¿¼ÑÐ] ÍÁľµÚÒ»Ö¾Ô¸276Çóµ÷¼Á£¬¿ÆÑкͼ¼ÄÜÊ®·Ö·á¸»£¬ÇóÐÂÐË·½ÏòµÄµ¼Ê¦ÊÕÁô +3 ÍÁľСÌì²Å 2026-03-12 3/150 2026-03-13 15:01 by JourneyLucky
[¿¼ÑÐ] 283Çóµ÷¼Á£¬²ÄÁÏ¡¢»¯¹¤½Ô¿É +8 ËÕ´òË®7777 2026-03-11 10/500 2026-03-13 09:06 by Linda Hu
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û