Bio::SeqIO

It’s in the package “Bioperl“->”Bio::SeqIO“.

1.open file

my $io = Bio::SeqIO->new(-file => "noN.fa",-format =>"fasta");

2. readin one sequence

my $record = $io -> next_seq;

3. variable

$record->id;     #identifier
$record->desc;   #description
$record->length; #length of this sequence
$record->seq;    #sequence