Jason Stajich | 4 Dec 22:49 2005

Re: Bio:Seq $seq_obj->accession_number not returningaccession number?

Sam -
Yeah what Barry said.

It doesn't get set when reading fasta files - see Hilmar's link below  
for more info - all the info is in the display id, available in $seq- 

my ($gi,$acc,$locus);
(undef,$gi,undef,$acc,$locus) = split(/\|/,$seq->display_id);

I thought there was a function already to do this for you, but I  
guess not.  There is something Search::Hit objects to parse accession  
number so maybe we can consolidate this if someone volunteers to do it.

See also Hilmar's response about this:

I've added it as a Q&A to the new wiki FAQ which we'll roll out soon.


On Dec 4, 2005, at 4:23 PM, Barry Moore wrote:

> Sam-
> The fasta parser makes no attempt to parse the fasta header since  
> there
> is no standard format for what should be in a fasta header.  Parse the
> accession out of the primary_id field with a regular expression in  
(Continue reading)