Retrieving sequences from Swiss-Prot

The following script retrieves a sequence from Swiss-Prot:

use strict;
use Bio::Perl;

# it retrieves sequences from swissprot and generates fasta output
# this script will not work if you are not connected to the Internet

my $s = get_sequence('swiss',$ARGV[0]);


$ perl P11217 a.fasta
$ perl PYGM_HUMAN b.fasta

Perl commandline parameters are stored in the @ARGV array. The first argument $ARGV[0] stores the Swiss-Prot accession number or identifier. The second argument $ARGV[1] defines the output file.

For more on use SeqIO with files, please refer to