[Bioperl-l] problem with SeqIO.pm

Simon Chan schan@xenongenetics.com
Mon, 28 Jan 2002 10:12:01 -0800


Hey All,

Let's say I want to parse a FASTA file and I want to fish out all the headers.
So, if my file looks like this:

> exon_name (Simon's Data - Hand's off!)
NNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNN
etc.

The following code only returns to me "exon_name" and not the part in brackets.  So, it seems that not the whole header is being returned.

my $input= Bio::SeqIO->newFh(-file => "$input " , -format => "$format");

while (my $info = <$input>){


    push (@header, $info->display_id());
    push (@bases ,$info->seq());

}


I read over the doc for this module and did not fine anything helpful.  The problem can be avoided if you just read in the input via a good old fashion <FILEHANDLE>, but I was taught that an efficient programmer is also a lazy programmer!  ;-) 

Thanks for your time, All.

##############################