----- Original Message ----- From: "SG Edwards" <[EMAIL PROTECTED]>
To: <beginners@perl.org>
Sent: Wednesday, March 16, 2005 10:10 AM
Subject: Simple HASH query
Hi,
I am using bioperl to get the primary id of a protein out of a flat file as
follows:
while ($seq_obj = $seqio_obj->next_seq){ my $primary_id = $seq_obj->primary_id; print $primary_id; }
exit;
However, this returns:
Bio::Seq::RichSeq=HASH(0xa1a1b7c)
I suspect that your flat file does not contain sequence with *primary_id* in it.
From bioperl 1.4: => look for ** below,
Title : primary_id Usage : $unique_key = $obj->primary_id; Function: Returns the unique id for this object in this implementation. This allows implementations to manage their own object ids in a way the implementaiton can control clients can expect one id to map to one object.
** For sequences with no natural primary id, this method should return a stringified memory location.
Returns : A string Args : A string (optional, for setting)
How do I get the actual value I want out of the hash?
Thanks
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>