Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use LWP::Simple; my @fasta; my $o; # Note: @accession defined earlier has 603 elements for (my $i=0; $i<@accession; $i++) { if ($accession[$i] =~ /^(\w+)\_(\w+)\_(\w+)\;/) { #print "$accession[$i]\n"; if ($1 eq $3) { # USE $1 AS THE ACCESSION NUMBER my $seq = get "http://us.expasy.org/cgi-bin/get-sprot- +fasta?$1"; #print "$seq\n"; push (@fasta, $seq); push @fasta, "> COULDN'T FIND IT" unless defin +ed $seq; } else { # # USE $3 AS THE ACCESSION NUMBER my $seq = "http://us.expasy.org/cgi-bin/get-sprot-fas +ta?$3"; push (@fasta, $seq); push @fasta, "> COULDN'T FIND IT" unless defin +ed $seq; } } } #print "$o\n"; # fasta only has 537 / 603 elements print "@fasta\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP::Simple problems
by chromatic (Archbishop) on Jan 29, 2005 at 16:31 UTC | |
by davido (Cardinal) on Jan 29, 2005 at 16:34 UTC | |
by monkey_boy (Priest) on Jan 30, 2005 at 20:23 UTC | |
|
Re: LWP::Simple problems
by ZlR (Chaplain) on Jan 29, 2005 at 13:16 UTC | |
by saskaqueer (Friar) on Jan 29, 2005 at 17:38 UTC | |
|
Re: LWP::Simple problems
by foil (Sexton) on Jan 29, 2005 at 17:24 UTC |