#! /usr/bin/perl -w

##### Program description #######
#
# Title:     bp_ex2.pl
# Author(s): Mattias Ohlsson
# Description:
#   A small script that converts a fasta file to a swissprot file 
#   using the Bio::SeqIO module in BioPerl.
#
##################################

use strict;
use Bio::SeqIO;

my $in  = Bio::SeqIO->new(-file => 'seqs.fasta',  -format => 'Fasta');
my $out = Bio::SeqIO->new(-file => '>seqs.gbank', -format => 'GenBank');
my $out2 = Bio::SeqIO->new(-file => '>seqs.swiss', -format => 'Swiss');

while ( my $seq = $in->next_seq() ) {
    $out->write_seq($seq); 
    $out2->write_seq($seq); 
}
