[Bioperl-l] parsing kegg 'ko' file

KARALIUS, JOSEPH (AG/2401) joseph.karalius at monsanto.com
Fri Jan 20 16:57:28 EST 2012


Your print statement should look something like this (not tested).

my  $ann = $seq->annotation();
foreach my $desc ($ann->get_Annotations('description')) {
     print $desc->title, "\n";

See 'perldoc Bio::Seq'.


From: shalabh sharma [mailto:shalabh.sharma7 at gmail.com]
Sent: Friday, January 20, 2012 1:23 PM
Cc: bioperl-l
Subject: Re: [Bioperl-l] parsing kegg 'ko' file

Hi Joseph,
              Thanks a lot, i am feeling so stupid right now..
But when i again ran that code i got following output:

Bio::PrimarySeq=HASH(0x9be888) E3.2.1.1, amyA, malS Bio::Annotation::Comment=HASH(0x9c2484)
Bio::PrimarySeq=HASH(0x9be930) E3.2.1.2 Bio::Annotation::Comment=HASH(0x9be8c4)

How come i am getting object ? Only name filed is fine.
I would really appreciate your help.


On Fri, Jan 20, 2012 at 4:07 PM, KARALIUS, JOSEPH (AG/2401) <joseph.karalius at monsanto.com<mailto:joseph.karalius at monsanto.com>> wrote:
'pimary_id' should be 'primary_id'.


-----Original Message-----
From: bioperl-l-bounces at lists.open-bio.org<mailto:bioperl-l-bounces at lists.open-bio.org> [mailto:bioperl-l-bounces at lists.open-bio.org<mailto:bioperl-l-bounces at lists.open-bio.org>] On Behalf Of shalabh sharma
Sent: Friday, January 20, 2012 12:43 PM
To: bioperl-l
Subject: [Bioperl-l] parsing kegg 'ko' file
Hi All,
       I am trying to parse kegg 'ko' file. I just need three information
out of it.
name, entry and description, so i just wrote this small code:

#!/usr/bin/perl -w
use Bio::SeqIO;
my $in = Bio::SeqIO->new(-file => "ko", -format => 'KEGG');
while(my $seq = $in->next_seq){
     print $seq->pimary_id, "\t" ;
     print $seq->display_id, "\t";
     print $seq->annotation->get_Annotations('description') ,"\n";

But when i tried to run this i got this error:
Can't locate object method "pimary_id" via package "Bio::Seq::RichSeq" at
parseKO_bioperl.pl line 5, <GEN0> line 1.
I am using bioperl -v 1.006001


Shalabh Sharma
Scientific Computing Professional Associate (Bioinformatics Specialist)
Department of Marine Sciences
University of Georgia
Athens, GA 30602-3636
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org<mailto:Bioperl-l at lists.open-bio.org>

Shalabh Sharma
Scientific Computing Professional Associate (Bioinformatics Specialist)
Department of Marine Sciences
University of Georgia
Athens, GA 30602-3636
This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled
to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and
all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.

All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its
subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware".
Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying
this e-mail or any attachment.

The information contained in this email may be subject to the export control laws and regulations of the United States, potentially
including but not limited to the Export Administration Regulations (EAR) and sanctions regulations issued by the U.S. Department of
Treasury, Office of Foreign Asset Controls (OFAC).  As a recipient of this information you are obligated to comply with all
applicable U.S. export laws and regulations.

More information about the Bioperl-l mailing list