[Bioperl-l] How can i get tag Comments from Genbank file

Jason Stajich jason at cgt.duhs.duke.edu
Sat Nov 22 07:10:50 EST 2003


my $seqio = new Bio::SeqIO(-format => 'genbank', -file => 'yourfile.gb');
my $seq = $seqio->next_seq;
if( $seq ) {
 print "comments are:\n";
 # get the comment annotations as an array
 for my $comm ( $seq->annotation->get_Annotations('comment') ) {
  print $comm->text();
}


See Bio::Seq, Bio::Annotation::Collection, and Bio::Annotation::Comment
for more information.
-jason
On Fri, 21 Nov 2003, [ISO-8859-1] Fabiola Sánchez wrote:

> Hello!
> i need your help
> I'm reading  files in genbank format
> i want to parser the second paragraph of  the COMMENT
> how can i get this ?
> for example
> COMMENT
> ------------------------------------------------------------------
>             This SWISS-PROT entry is copyright. It is produced through a
>             collaboration between the Swiss Institute of Bioinformatics and
>             the EMBL outstation - the European Bioinformatics Institute. The
>             original entry is available from http://www.expasy.ch/sprot and
>             http://www.ebi.ac.uk/sprot
>
> -----------------------------------------------------------------.
>             [CATALYTIC ACTIVITY] An alcohol + NAD(+) = an aldehyde or
> ketone +
>             NADH. [COFACTOR] Binds 1 zinc ion per subunit (By similarity).
>             [SIMILARITY] Belongs to the zinc-containing alcohol
> dehydrogenase
>             family.
>
> I need get :
> -----------------------------------------------------------------.
>             [CATALYTIC ACTIVITY] An alcohol + NAD(+) = an aldehyde or
> ketone +
>             NADH. [COFACTOR] Binds 1 zinc ion per subunit (By similarity).
>             [SIMILARITY] Belongs to the zinc-containing alcohol
> dehydrogenase
>             family.
>
>
> Thank you.
>
> Fabi
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu



More information about the Bioperl-l mailing list