#! /usr/bin/perl -w

##### Program description #######
#
# Title:     bp_ex1.pl
# Author(s): Mattias Ohlsson
# Description:
#   A small script that reads a sequences stored in fasta format and
#   then prints the ID for these sequences. BioPerl is used.
#
##################################

use strict;
use Bio::SeqIO;

# Create an object that points to the file containing fasta sequences
my $in  = Bio::SeqIO->new(-file   => "seqs.fasta", 
			  -format => 'Fasta');

# Make a loop over all the sequences
while ( my $seq = $in->next_seq() ) {
    my $Id = $seq->display_id();
    my $desc = $seq->description();
    print "$Id\n";
    print "$desc\n";
}
