[Bioperl-l] Genbank LOCUS entry

Hilmar Lapp hlapp at gmx.net
Wed Feb 2 16:52:01 EST 2005


You do get the LOCUS name - what you are asking for is the entire LOCUS 
line. There no method for the entire line; but if that's all you need 
then I'd just do

	$ grep "^LOCUS" < my-genbank-file

on the command line.

	-hilmar

On Wednesday, February 2, 2005, at 01:38  PM, Matthias Adams wrote:

> Hello!
>
> I have a problem concerning the genbank LOCUS entry:
> As described in the BioPerl documentation
> (http://search.cpan.org/~birney/bioperl-1.4/Bio/Seq.pm):
> "The display_id() method returns the LOCUS name of a Genbank entry"
> (also described somewhere else)
>
> I can not reproduce this behavior, some test code:
> #!/usr/bin/perl -w
> use Bio::DB::GenBank;
> use Bio::Perl;
>
> use strict;
> use Error qw(:try);
>
> my $seqio;
>
>         my $gb = new Bio::DB::GenBank();
>         my $q;
>         my $qstring="BV421351";
>         $q =Bio::DB::Query::GenBank->new
>                 (-query   =>$qstring,
>                 -db      => 'nucleotide',
>                 -verbose => 0);
>         $seqio = $gb->get_Stream_by_query($q);
>         while( my $seq =  $seqio->next_seq ) {
>         #       print $seq->desc(), "\n";
>                 print "LOCUS: \"", $seq->display_id(), "\"\n";
>         }
>
> The only output is:
> LOCUS: "BV421351"
>
> It's just the accession number.
> But I need the LOCUS line as in genbank:
> BV421351                 590 bp    DNA     linear   STS 01-FEB-2005
>
> So whats my problem? Do I have to call another sub?
>
> Thanks for your help, Matze.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list